[00:00] jetienne: http://www.dhteumeuleu.com/the-dolls/ this one is nice. clearly good imagination [00:02] maushu: jetienne, creepy. [00:02] JimBastard: ughh jetienne that doll one made me dizzy [00:02] JimBastard: oofa [00:03] saikat has joined the channel [00:06] jetienne: http://www.dhteumeuleu.com/low-enough/ yep a funny personn ;) [00:07] maushu: I wonder if it's faster to use divs or a canvas for multiple moving objects. [00:08] saikat: maushu: divs [00:08] saikat: if i understand correctly [00:08] mostlygeek has joined the channel [00:08] saikat: depends on the browser, but i have yet to encounter a browser where redrawing a canvas is faster than moving a div [00:09] saikat: it might also depend on the size of your canvas [00:09] saikat: definitely smaller canvas = faster performance, but again, i'm not sure if it'll ever be faster than a simple move on the div [00:09] stagas: the sources all look so simple [00:09] _announcer: Twitter: "Today tweak Node.js" [ja] -- 天沢(弱). http://twitter.com/amasawa/status/16265213347 [00:09] technowe_ has joined the channel [00:10] jetienne: http://www.dhteumeuleu.com/what-power/ this one *is* creepy :) [00:10] stagas: I'm really annoyed by such talent [00:11] kodisha has joined the channel [00:12] _announcer: Twitter: "Expresso for testing my nodejs code, written using Emacs' Espresso-mode, and a client in Cappuccino. Strict coffee-only programming diet." -- Saikat Chakrabarti. http://twitter.com/saikatc/status/16265382816 [00:13] saikat has left the channel [00:13] slaskis has joined the channel [00:19] _announcer: Twitter: "Node.js to make that. Yeah Throw ..." [ja] -- 天沢(弱). http://twitter.com/amasawa/status/16265796652 [00:20] JimBastard: AHAHAH [00:20] JimBastard: automatic translator ftw [00:22] mjr_ has joined the channel [00:26] _announcer: Twitter: "@flipsasser I exploited node.js once, but then the plague sent a rabbit after me and crash override had to bail me out. True story." -- Brian Sierakowski. http://twitter.com/bsierakowski/status/16266234185 [00:28] sztanpet has joined the channel [00:32] hpoydar has joined the channel [00:35] mikeal: ryah: you around? [00:36] mikeal: isaacs: you around? [00:36] stevendavie1 has joined the channel [00:40] mjr_: mikeal: did you succeed in making anything out of pcap? [00:41] kodisha has joined the channel [00:42] maushu has joined the channel [00:44] mikeal: not yet [00:44] mikeal: i got hung up messing with web sockets [00:44] mjr_: Yeah, I know how that goes. [00:44] mjr_: So tempting. [00:45] mjr_: But now you could write a decoder and printer for websockets. [00:47] everton has joined the channel [00:52] visnup has joined the channel [00:54] _announcer: Twitter: "Awesome video from jsconf. "Ryan Dahl – Less is More with Node.js" http://bit.ly/aAvXUl" -- Gastown Labs. http://twitter.com/gastownlabs/status/16267855258 [00:56] _announcer: Twitter: "node.js I wonder if I receive command line arguments" [ja] -- 天沢(弱). http://twitter.com/amasawa/status/16267976986 [00:57] JimBastard: cheaaaaa [00:57] JimBastard: maushu: that one can be answered! [00:57] JimBastard: he wants to know how to get command lines arguments [00:58] JimBastard: im tempted to respond through translate.js lol [00:58] maushu: JimBastard, ...do you speak moonspeak? [00:58] JimBastard: dude [00:58] JimBastard: it gets normalized [00:58] JimBastard: use your head [00:58] JimBastard: wonder [00:58] JimBastard: if [00:58] JimBastard: recieve [00:58] JimBastard: command line [00:58] JimBastard: he wants to know how to get the args [00:59] aglemann has joined the channel [00:59] mikeal: mjr_: i just want a web socket to the web client to show the traffic info [01:00] _announcer: Twitter: "@amasawa process.argv http://nodejs.org/api.html#process-argv-56" -- Diogo Gomes. http://twitter.com/graphnode/status/16268268234 [01:00] _announcer: Twitter: "Great and informative article on node.js - http://bit.ly/bliFCB" -- Elliott Draper. http://twitter.com/ejdraper/status/16268286222 [01:00] maushu: JimBastard, sent it, lets see if he understands it. [01:01] JimBastard: you sent back in moonspeak right? [01:01] maushu: No. [01:01] JimBastard: fail [01:01] maushu: Just sent the command. [01:01] JimBastard: ohh [01:01] JimBastard: i would have added some text man [01:01] maushu: No moonspeak, english speak needed. [01:01] JimBastard: fair enough [01:02] JimBastard: i really want to get automatic twitter / stackoverflow integration in this channel with command line triggers for +v , #bastardfacts [01:02] mjr_: mikeal: if you make a ws server framework, I can show you how to plug in the pcap data to it. [01:02] JimBastard: can we do that? [01:02] JimBastard: and by "can" i mean "now" and by "we" i mean "you" [01:02] dabreaka has joined the channel [01:03] JimBastard: or, "someone else" [01:03] JimBastard: >.< [01:03] isaacs: mikeal: back [01:03] isaacs: sup? [01:03] mikeal: i've been thinking about this a lot [01:03] mikeal: I kinda want to get rid of [01:04] mikeal: require('name/sub') [01:04] mikeal: just have a main.js [01:04] mikeal: and it uses relative imports [01:04] isaacs: mikeal: ok [01:04] mikeal: nothing else is public [01:04] isaacs: you can do that with npm pretty easily [01:04] mikeal: i was wondering what you thought [01:04] isaacs: yeah, that's fine. [01:04] isaacs: just don't have your folder named "lib" [01:04] mikeal: no no [01:05] mikeal: lib/main.js [01:05] mikeal: and lib still gets installed [01:05] mikeal: but you can't import anything but "name" [01:05] mikeal: i'm actually suggesting it be the default behavior for the Packages spec [01:05] Aria has joined the channel [01:05] isaacs: well, but you can, though, if there is a folder named "lib", [01:05] isaacs: because directories.lib defaults to "lib" [01:06] isaacs: with npm, if you have a main module, then that's require("foo"), but if you have lib/bar.js then that'll be available via require("foo/bar") [01:06] Aria has left the channel [01:06] mikeal: right, i think that should be removed [01:06] mikeal: :) [01:06] isaacs: the second bit? [01:06] mikeal: yeah [01:07] mikeal: i don't think it's necessary and it's actually kind of toxic [01:07] isaacs: i see. but what about if you have "directories" : { "lib" : "./foo" } [01:07] mikeal: i've been pondering some of the stuff ryah was talking about [01:07] mikeal: and this is something i think that we carried over from the old module systems that doesn't belong [01:08] mikeal: modules should be small and lean towards keeping most of their stuff private [01:08] mikeal: that's what the Modules spec does, with you having to explicitly make things public, everything else defaults to private [01:08] isaacs: hm. [01:09] isaacs: i'm not opposed to removing the default. i'll still keep supporting an explicit "lib" folder if one is provided, though [01:09] mikeal: i mean, should modules really be exposing sub modules for consumption? [01:09] isaacs: i just wonder if people will start whining about it making stuff not work [01:09] mikeal: i don't think they should [01:09] isaacs: so, the use case would be something where you bundle a few different utils into a single package. [01:10] isaacs: it makes sense for something like narwhal to be composed of a bunch of different modules. [01:10] mikeal: but those shouldn't be at narwhal/ [01:10] isaacs: they are [01:10] mikeal: they should just be in the root namespace [01:10] kodisha has joined the channel [01:10] mikeal: yeah, i'm just disagreeing with that style [01:10] isaacs: oh, mixed the word order there ;) [01:10] mikeal: i mean [01:10] mikeal: like, we need to get everything smaller [01:11] isaacs: so, narwhal actually *does* require that things be put at the root namespace, and also that it be able to modify the require.paths permanently, which can't be done by npm atm [01:11] mikeal: like ryah was saying [01:12] mikeal: these module systems are built for huge VMs where they load all this crap in to memory and then share them out via threads [01:12] mikeal: if we're going to spin down and up processes on changes and scale them at will, we need to get all these little bits smaller [01:12] isaacs: i didn't see where ryah was saying that. [01:12] sveimac has joined the channel [01:13] mikeal: it might have been in person :) [01:13] isaacs: haha, o [01:13] isaacs: ok [01:13] mikeal: he said the first part, the second part about getting modules smaller is what i'm saying [01:13] isaacs: i don't think it really much matters how many parts are in any given npm package. [01:14] mikeal: having one place where the API is exposed [01:14] isaacs: but yeah, encapsulation and separation of concerns is generally a great thing. [01:14] mikeal: means it's a lot easier to hot load modules too [01:14] mikeal: because the references that might languish around are smaller [01:16] isaacs: that's true [01:16] isaacs: but, really, hot-loading needs to be tracking at the require() level, not at the api exposure level [01:17] isaacs: like nodules doe [01:17] isaacs: s [01:17] softdrink has joined the channel [01:18] isaacs: so, modules need to be small, but that's not going to be affected by getting rid of require("foo/bar") [01:18] isaacs: if anything, forcing everything to be in a single module is going to make them bigger. [01:19] mikeal: it encourages smaller [01:19] mikeal: i wouldn't say it solves the problem [01:19] isaacs: ie, making packages smaller doesn't necessarily make modules smaller, or even mean the same thing. [01:19] mikeal: but it also keeps the packages a little more in line with the way Modules work [01:19] isaacs: we need smaller pieces, but we're always going to have some programs that are composed of a lot of different modules. [01:19] mikeal: with single point to expose the public API [01:19] isaacs: for instance, npm itself [01:19] mikeal: and the rest private [01:19] isaacs: if a module has been require()ed, then it doesn't matter if it's "public" or not. [01:20] isaacs: it's *always* possible to require(".npm/foo/0.1.2/package/lib/bar") [01:20] isaacs: require("foo/bar") is just a convenience, and doesn't actually encourage modules themselves to be bigger or smaller. [01:20] isaacs: the "module" is bar.js, which is included in the *package* foo [01:22] JimBastard: bar.js , imonit [01:23] _announcer: Twitter: "RJS makes me feel so dirty. Node RJS, doubly so. #nodejs #node.js #node" -- Pavel Zaitsev. http://twitter.com/zoftie/status/16269720015 [01:23] mikeal: i'm pondering this [01:23] isaacs: JimBastard: i fully expect to see a http://github.com/Marak/bar.js by the end of the evening. [01:23] isaacs: JimBastard: it should use some kind of api to find me the nearest open bar [01:23] JimBastard: ahaha, i dont have any ideas for that [01:23] pavelz: what the ... [01:23] JimBastard: i call my bars measures in http://github.com/marak/JSONloops [01:24] JimBastard: ill do a 3 letter one though isaacs [01:24] JimBastard: im on it [01:24] JimBastard: no guessing [01:24] JimBastard: brb [01:25] pavelz: thats nifty, symbols referring to each other... make a loop. [01:26] ditesh|cassini has joined the channel [01:29] pavelz: isaacs: would that not be a bad practice to define many packages in a module or package be spread across many modules. I would refer to a recent well publicized post by Linus [01:29] pavelz: You want one thing in one place and be least ambiguous about it. [01:29] isaacs: sure. [01:30] isaacs: pavelz: but a) linus is talking about single-namespace compiled OS programs, b) module and package aren't the same thing as what you're sayign, i think. [01:30] isaacs: pavelz: package is a folder with a package.json file in it. module is a javascript file [01:30] mscdex: and an addon is a c++ file [01:30] mscdex: :P [01:30] isaacs: it's possible for package to contain 1 or more modules [01:31] isaacs: mscdex: right, but it's still ultimately one require(thing) [01:31] mscdex: i don't even know what the topic of conversation is hehe [01:31] isaacs: mscdex: whereas a package is a folder with a package.json file, which may include build/install instructions, requirements, etc. [01:31] pavelz: thought package as a set of code wrapped in a namespace and module is a file defining it. As per what you have said - I am wrong [01:31] mscdex: yeah [01:32] isaacs: npm isn't concerned with the "modules are too big" problem. it's concerned with the "there are too many different ways to install crap, and dependencies are a bitch" problem [01:32] pavelz: right, thanks foir clarification. [01:32] isaacs: np [01:32] _announcer: Twitter: "TDD # Express framework for # nodejs is now available from BOTH kiwi and npm. Npm `install Express' or` kiwi `install Express." [pt] -- TJ Holowaychuk. http://twitter.com/tjholowaychuk/status/16270324418 [01:32] sveimac has joined the channel [01:33] mscdex: can/does npm automatically link a latest version of a module? [01:33] Yuffster has joined the channel [01:33] mscdex: if you don't specify a version when installing? [01:33] saikat has joined the channel [01:33] isaacs: mscdex: it tries to get the "stable" version by default if no version is specified. [01:33] isaacs: mscdex: you can change this behavior to get the latest version instead by doing: npm config set tag latest [01:33] mscdex: that reminds me.... *checks the npm issue* [01:33] isaacs: mscdex: or npm --tag latest install foo [01:34] isaacs: mscdex: or npm install foo@latest [01:35] _announcer: Twitter: "Has anyone been able to get node.js to build on a Jailbroken iPad?" -- Rob Righter. http://twitter.com/robrighter/status/16270496076 [01:35] mscdex: any progress on having a master/head version? [01:36] isaacs: mscdex: not at the moment. [01:36] mscdex: ok [01:38] isaacs: mscdex: the "straightforward" way to do this would be: 1. {"head":"http://github.com/user/project/tarball/master"} and then 2. make @head a special tag that fetches that tarball, and then cleans out the cache afterwards, so that the same version can be installed later, and then 3. give it a special version flag (like link packages get) so that it's clear it's not official (since the package.json will probably have the previous version, [01:38] isaacs: mscdex: the problem is that that's special-casing a whole bunch of stuff, and that sucks [01:39] isaacs: mscdex: plus, it's not that hard to accomplish the same use-case by just cloning the repo and then doing "npm link ." [01:39] isaacs: in fact, that's easier, because then you can just do a git pull to update the code in-place. [01:40] mscdex: what if you don't have git installed? [01:40] isaacs: mscdex: also, you can already do npm install http://url-to-tarball [01:40] isaacs: mscdex: then you're not a developer, and you shouldn't be using development packages. [01:40] mscdex: heh... [01:40] mscdex: i didn't use git until i got into node [01:40] technoweenie has joined the channel [01:40] mscdex: but i've been developing for a long time :P [01:41] isaacs: mscdex: and because you're a developer, you said "oh, this needs git? guess i'll go install that, then..." [01:42] isaacs: mscdex: so, if someone submits a patch, and it's really clean, and well thought-out, and doesn't require all kinds of deep architectural changes (or if the deep architectural changes it requires are for the better), and it's documented, i'll accept it [01:42] mscdex: no, because i had done testing for ry and i needed a place to host source where other people could access it and post issues and such [01:42] mscdex: heh [01:42] isaacs: i'm not against it in principle. [01:43] mscdex: i think git is better than other version control systems, but it's still over my head when it comes to some things [01:43] isaacs: git isn't really a version control system. it's an editor that you use to write the ongoing story of your code. [01:43] mscdex: probably because i'm not required to use it (often enough) [01:43] isaacs: and you can edit that story [01:44] mscdex: revision control system then? :P [01:44] isaacs: it lets you shoot yourself in the foot. but i mean, that's like saying that a text editor lets you use backspace. [01:54] creationix has joined the channel [01:58] malkomalko has joined the channel [01:58] everton has joined the channel [01:58] CIA-76: node: 03Ryan Dahl 07master * r6bed15e 10/ (9 files in 3 dirs): [01:58] CIA-76: node: Refactor: Utf8Decoder -> StringDecoder [01:58] CIA-76: node: Instead of just decoding Utf8, this will proxy requests to buffer.toString() [01:58] CIA-76: node: for other encodings. This makes for a simpler interface. - http://bit.ly/9dtEC6 [01:58] CIA-76: node: 03Ryan Dahl 07master * red5f4f3 10/ lib/crypto.js : RootCaCerts shouldn't be global - http://bit.ly/cs4wA1 [01:59] ryah: isaacs: where was that patch? [01:59] ryah: isaacs: the querystring one? [01:59] ryah: i didn't have a chance to look at it last night [01:59] isaacs: ryah: http://gist.github.com/438699 [02:00] isaacs: ryah: line 170 is where it asplodes [02:00] ryah: isaacs: can you give me a format-patch ? [02:01] ryah: nevermind.. [02:03] isaacs: ryah: http://gist.github.com/440027 [02:03] isaacs: ryah: or check my querystring-fix branch [02:03] isaacs: this is the weird bad bit: + // go boom here: [02:03] isaacs: + delete out; [02:04] Tim_Smart has joined the channel [02:04] ryah: isaacs: you have to free strdup() strings [02:04] ryah: not delete [02:04] isaacs: ryah: you should find whoever wrote that code, and kick his ass, then [02:04] isaacs: ;P [02:05] isaacs: gtk [02:05] ryah: isaacs: can you check that it fixes your problem. [02:05] isaacs: compiling... [02:05] ryah: changing it to free(out) [02:06] isaacs: hm, same crash [02:06] isaacs: node(9834) malloc: *** error for object 0x100501370: incorrect checksum for freed object - object was probably modified after being freed. [02:06] isaacs: *** set a breakpoint in malloc_error_break to debug [02:06] isaacs: Abort trap [02:06] ryah: i'm not getting the crash [02:06] isaacs: that's when i run: node test/simple/test-querystring.js [02:07] ryah: yeah, it works for me [02:07] isaacs: that's odd. [02:07] ryah: you on a mac? [02:07] isaacs: yep [02:08] ryah: you can probably take out out[out_index] = '\0'; [02:08] isaacs: if i change the line above it to: String::New(strdup(out), out_index-1); then it works [02:09] isaacs: ok, this is odd. [02:09] isaacs: ryah: http://gist.github.com/440042 [02:10] isaacs: but duplicating the string again is probably not ideal, i'm assuming, since that means double the memory [02:11] ryah: yeah... [02:11] isaacs: yeah, it's the out[out_index] = '\0'; that breaks it [02:11] isaacs: take that out, and it works fine [02:11] ryah: also - [02:12] ryah: case HEX0 [02:12] ryah: those should all be n = [02:12] isaacs: oh, yeah, huh [02:12] isaacs: weird that that was working... [02:14] isaacs: wow, i guess ALL the tests were doing %[0-9] [02:14] isaacs: i mean, i wasn't really trying to test decodeURIComponent when i wrote it, though, s othat makes sense, i guess [02:14] ryah: yeah [02:14] ryah: would be good to add a test with two hexnums [02:15] sechrist has joined the channel [02:15] ryah: oh wait, no there are tests with that? [02:15] ryah: ["foo%3Dbaz=bar", "foo%3Dbaz=bar", {"foo=baz" : "bar"}], [02:18] isaacs: no, those all hae a decimal after the % [02:18] isaacs: i just added a test [02:18] isaacs: ["foo=%EF%BF%BD", "foo=%EF%BF%BD", {"foo" : "\ufffd" }] [02:19] _announcer: Twitter: "The WSH process it took about 3m30s and let I Node.js. Ww w WSH was Kusosu 0m43s" [ja] -- 天沢(弱). http://twitter.com/amasawa/status/16273382656 [02:19] isaacs: oh, this is odd, though [02:19] isaacs: seems like \uffd is what you get from almost any invalid sequence [02:21] isaacs: anyway, whatevs. it's working now, that's cool. [02:21] isaacs: i'll send a patch to you and the list. [02:21] ryah: just update the gist [02:21] ryah: i want to check it out again [02:23] isaacs: oh, ok [02:23] isaacs: ryah: you know, it's easier to just view it at http://github.com/isaacs/node/commits/querystring-fix [02:24] isaacs: i did a few forced pushes [02:24] ryah: ok [02:28] _announcer: Twitter: "Ena Node.js dude but I was in the mood! http://bit.ly/bP9lwr" [ja] -- ishikawan. http://twitter.com/scraperonce/status/16273979931 [02:28] ryah: isaacs: cool looks good [02:28] isaacs: grat [02:28] ryah: thanks for finishing it [02:28] isaacs: you still want the email, or wanna just merge the branch? [02:28] isaacs: np [02:30] ryah: nah, i got it [02:31] CIA-76: node: 03isaacs 07master * r4ce100f 10/ (3 files in 3 dirs): [02:31] CIA-76: node: A replacement for decodeURIComponent that doesn't throw. [02:31] CIA-76: node: And add a few more tests. - http://bit.ly/borjoi [02:32] jashkenas has joined the channel [02:35] _announcer: Twitter: "@ Edvakf Node.js mention fun and I was not aware of. Many thanks." [ja] -- 天沢(弱). http://twitter.com/amasawa/status/16274449900 [02:38] jashkenas: ryah: does the UTF8Decoder chatter in the backlog mean that the writing UTF characters via fs.writeFile bug is fixed now? [02:38] ryah: jashkenas: yes, but unrelated [02:38] _announcer: Twitter: "@ Amasawa Win Node.js I think I can even compile. Cygwin?" [ja] -- edvakf. http://twitter.com/edvakf/status/16274621766 [02:38] jashkenas: thanks much. [02:38] ryah: felixge fixed it [02:39] jashkenas: v0.1.99 soonish? you're running out of room before 2.0... ;) [02:39] Tim_Smart has joined the channel [02:39] ryah: :) [02:39] ryah: yeah we'll probably hit 0.1.100 unfortunately [02:40] jxson has joined the channel [02:40] ryah: or i could just bumb the fucking version :/ [02:40] ryah: bump [02:41] justinlilly has joined the channel [02:42] Tim_Smart: nothing wrong with 0.1.100 >.> [02:47] isaacs: ryah: you know, traditionally the API doesn't freeze until 1.0.0 [02:47] isaacs: ryah: also, those numbers go up all the way [02:47] isaacs: ryah: though, 9999 is usually treated as the upper max [02:47] isaacs: 0.1.9998 is ok, though [02:48] Tim_Smart: 2 years later... "We should really really freeze the api sometime soon" [02:53] isaacs: ryah: i still would like to see module.js cleaned up before 0.2.0, though [02:54] nodegnuwb has joined the channel [02:54] isaacs: whether that's the reduction/refactor that i wrote and everyone picked at a while back, or something else, it's kind of a mess atm [02:54] nodegnuwb: is anyone aware of an xmpp/jabber node.js client? [02:54] _announcer: Twitter: "Socket.IO and Node.js: Trial use of "mechanical world: I have long wanted to try to play around with the library ... http://bit.ly/9o9Us4" [ru] -- ru_webdev. http://twitter.com/ru_webdev/status/16275727642 [02:54] _announcer: Twitter: "[Progg.ru] Socket.IO and Node.js: Trial use of "mechanical world: I have long wanted to try to play with ... http://bit.ly/9o9Us4" [ru] -- monitorium. http://twitter.com/monitorium/status/16275728492 [02:55] kersny: nodegnuwb: there are two I believe [02:55] nodegnuwb: kersny: any idea where i can find them? [02:56] kersny: nodegnuwb: http://github.com/astro/node-xmpp and http://github.com/mwild1/xmppjs [02:56] isaacs: nodegnuwb: http://wiki.github.com/ry/node/modules is a good place to find the answers to this and similar questions [02:56] nodegnuwb: isaacs, kersny: nice, thanks guys [02:56] SamuraiJack has joined the channel [02:56] jashkenas has left the channel [02:56] CIA-76: node: 03Peter Dekkers 07master * re48f0d1 10/ (lib/fs.js src/node_constants.cc): Fixed incorrect mask for determining fs.Stats types - http://bit.ly/cX2Sbj [03:04] CIA-76: node: 03Ryan Dahl 07master * rc2e2479 10/ src/node_http_parser.cc : Fix Linux build - http://bit.ly/9GhQTo [03:05] JimBastard has joined the channel [03:05] JimBastard: fuck where did TJ go [03:05] nodegnuwb: o_0 [03:06] JimBastard: hail noob [03:07] keyvan has joined the channel [03:07] _announcer: Twitter: "# Nodejs Connect 0.0.2 released http://bit.ly/9Ddjcy $ `asl` install connect to get started" [pl] -- TJ Holowaychuk. http://twitter.com/tjholowaychuk/status/16276601091 [03:10] JimBastard: document.location.href = 'data:application/pdf;base64,' + Base64.encode(buffer); how can i haz .pdf file extension? it works but file name ends in .part [03:17] stepheneb has joined the channel [03:21] mtodd has joined the channel [03:22] kersny has left the channel [03:26] gerad has joined the channel [03:26] ryan_gahl has joined the channel [03:28] charlesjolley- has joined the channel [03:28] sechrist: oh hay [03:28] sechrist: i [03:28] sechrist: installing express via npm [03:30] steadicat has joined the channel [03:31] JimBastard has joined the channel [03:31] JimBastard: http://github.com/Marak/kohai [03:31] JimBastard: lol [03:31] JimBastard: fuck it [03:31] JimBastard: i had the urge to open source something i couldnt resist [03:32] JimBastard: pdf.js coming soon [03:32] stephenjudkins has joined the channel [03:32] isaacs: sechrist: how's it working? [03:32] sechrist: it's a disease [03:32] isaacs: JimBastard: so, i got a question for you... [03:32] sechrist: I haven't tried it -- i'm looking at the fd changes to node [03:32] JimBastard: ill finish it soon [03:32] sechrist: "http://groups.google.com/group/nodejs/t/2f15c77dd5df98d2" [03:32] sechrist: erm [03:32] isaacs: JimBastard: I get "Bastard". But why'd you make your handle "Jim"? [03:32] sechrist: the "Wrap FD in closure before emitting" is that to fix my woes with binding ips? [03:32] JimBastard: Q: Where did the name Jim Bastard come from? A: Jim Bastard was first nationally recognized by his proper name in a New York Magazine article. You can find it here: http://nymag.com/news/features/27341/index5.html [03:33] JimBastard: http://jimbastard.com/ [03:33] sechrist: pgriess1: you there? [03:33] JimBastard: supdog [03:33] isaacs: JimBastard: ohhh, snap! [03:33] JimBastard: im going to add delete and unwatch and unfollow features to kohai over the next few weeks [03:33] JimBastard: i need to get a handle on my github account [03:34] JimBastard: and im doing it by brute force [03:34] JimBastard: right now you can grab repos, run some tests, reorder them, and push [03:34] sechrist: so I want to use express-redis-sessions [03:34] sechrist: but there's some hacky workaround with triggers [03:34] sechrist: that breaks the plugin [03:34] sechrist: >:( [03:35] Gruni has joined the channel [03:36] sechrist: atmos, you here? http://gist.github.com/e595676192e4f21ed4aa that's breaking your redis plugin and I'm not exactly sure how to get around it [03:44] sechrist: isaacs: so with express being in npm now [03:44] sechrist: do I have to move all of my plugins to express/plugins? [03:45] sechrist: or can I do a kiwi.seed like thing? [03:45] isaacs: i don't know what a kiwi.seed thing is [03:45] sechrist: it combines require paths I think [03:45] jbrantly has joined the channel [03:45] sechrist: so like require('express/plugins/oauth') would be searching the kiwi seeds for express, and express-oauth(if it's seeded) [03:45] isaacs: tjholowaychuk isn't in at the moment. it'd be good to have him here to ask that. [03:46] isaacs: i see [03:46] sechrist: ah [03:46] sechrist: it abstracts the require process [03:46] isaacs: so, yeah, to get require("express/plugins/oauth"), yes, you'll have to link your stuff into there. [03:46] sechrist: lol [03:46] isaacs: npm doesn't touch the require process [03:46] isaacs: it just puts stuff where node will find it [03:46] sechrist: can I arbitrarily add paths to what require uses? [03:47] isaacs: sure. just add to the NODE_PATH variable. [03:47] sechrist: nah not environment -- in the script [03:47] sechrist: blah whatever i'll stop whining and just link it [03:47] jbrantly: sechrist: require.paths [03:47] sechrist: ^ [03:47] WALoeIII has joined the channel [03:48] isaacs: yeah, you can update require.paths in your program [03:48] sechrist: so when express plugins get added as individual npm packages [03:49] sechrist: it makes it a simple require('express/plugins/blahblah') [03:49] sechrist: since the individual packages kind of "extend" the original express path in kiwi [03:49] sechrist: if that makes any sense [03:49] isaacs: sechrist: yeah, i think you should post this as an npm issue [03:49] ajpiano has joined the channel [03:49] isaacs: that's a use case that npm doesn't help you with atm, but i can see how it's a pain to do every time, if you have a lot of plugins that you want to work this way [03:49] sechrist: that would mean npm would need a lib [03:50] isaacs: well, it means that we'd have to come up with some way to express that in the package.json file, and then npm would have to create and manage those links. [03:50] isaacs: which is all totally doable, but hasn't been done [03:50] stephenjudkins has joined the channel [03:50] isaacs: sechrist: the opposite is actually possible atm, and very easy [03:50] isaacs: sechrist: like, if you wanted to link express someplace under express-oauth, you could do that [03:51] isaacs: but the idea is that packages themselves should be somewhat opaque. [03:51] sechrist: yeah [03:51] isaacs: so the idea of having a plugin or extension that injects itslef into another package, that's not been explored. [03:52] isaacs: it could also be done by letting npm have a way to permanently modify the NODE_PATH, but that's kind of a weird way to go, and fruaght with peril [03:52] sechrist: well the way kiwi does it doesn't intermingle the packages -- it just provides a method for hacking up the require path [03:52] isaacs: right [03:52] _announcer: Twitter: "Unbelievable hacknight with @creationix on #node.js #thisstuffwillblowyourmind (also checkout sencha.com - the future?)" -- Chris Christensen. http://twitter.com/minenet/status/16279517275 [03:52] isaacs: tusk works that way, too [03:53] isaacs: but it means that your package manager has to be involved at run-time. and i am 100% passionately against that, and npm will never do this if i have any say in teh matter. [03:53] bradleymeck has joined the channel [03:53] isaacs: it's a nice looking path covered in rainbows and donuts, but it leads to a very very bad place. [03:53] sechrist: well yeah [03:53] sechrist: I have to remove kiwi from code i've already written [03:53] isaacs: a place with slow code and require 'gemspec'; [03:53] sechrist: that's terrible [03:53] isaacs: yeah [03:53] isaacs: exactly [03:54] isaacs: i want it to be easy for everyone to stop using npm someday :) [03:54] bradleymeck: the package file helps that i would think [03:54] sechrist: you don't want to monopolize the node package management community? [03:54] sechrist: how uncapitalistic [03:55] sechrist: :P [03:55] isaacs: sechrist: i'm capitalistic, just with the long-game in mind. [03:55] sechrist: I imagine once apps get standardized in node -- like a node-wordpress distribution -- they'll provide their own libs [03:55] isaacs: i want to monopolize it, but i want to appear to have done so with ample competition [03:56] sechrist: in fact i'm working towards that model now [03:56] sechrist: making sure proper versions of libraries stay with working versions of my app [03:56] isaacs: yeah, that's a good way to go. appliance-style [03:56] _announcer: Twitter: "@nicklovescode any chance we can hook that thing into node.js?" -- Scott Fitchet. http://twitter.com/figital/status/16279748394 [03:56] sechrist: node.js hooks you! you don't hook node.js! [03:59] sechrist: isaacs: "var hreq = require('express/express/http');" [03:59] sechrist: that's kind of silly [03:59] sechrist: express/express/express/express [03:59] isaacs: sechrist: yeah, express should set lib/express as its lib folder [03:59] wilmoore has joined the channel [03:59] bradleymeck: and connect needs to set it's main [04:00] sechrist: what is connect? I haven't looked into it [04:00] bradleymeck: middleware [04:00] isaacs: sechrist: it's the new thing creationix and visionmedia are up to [04:00] sechrist: is it a "framework" [04:00] isaacs: sorta [04:00] stepheneb has joined the channel [04:00] isaacs: closer to jsgi than express, though [04:00] isaacs: not a big ol mvc [04:00] sechrist: i don't like mvc anyway [04:01] sechrist: code just works -- screw your flow charts [04:01] isaacs: sechrist: express is an mvc, tho.... [04:01] sechrist: I know that [04:01] sechrist: it just makes crap easier [04:01] bradleymeck: i find mvc terrible when debugging personally [04:01] sechrist: like get('/blah/blah/hihihihihihihihi',function(){this.respond(404,"have a nice day");}) [04:01] isaacs: hahaha.... oh no... [04:02] isaacs: the latest querystring update is gonna break express... [04:02] sechrist: fffff [04:02] isaacs: i should send tj a pull req, that sucks [04:02] chrischris has joined the channel [04:02] bradleymeck: i want to get state machine template working... rawr... T_T [04:02] sechrist: express is becoming pretty popular [04:02] isaacs: TypeError: Object # has no method 'parseQuery' [04:02] sechrist: it seems to have inadvertently became the "framework of choice" [04:02] isaacs: well, it's the choice of those who want a bigger framework with more baked into it [04:03] bradleymeck: is npm running test scripts on its registry? [04:03] hassox has joined the channel [04:03] sechrist: node-cake [04:03] isaacs: bradleymeck: no, but you can do npm test whatever [04:03] sechrist: cakenode [04:03] isaacs: bradleymeck: if it has a "test" script, then npm will run it [04:04] bradleymeck: knew that, just was wondering about registry [04:04] isaacs: so, once the registry is npm rather than couchdb, yeah, that'll be possible. [04:04] isaacs: in fact, that's one of the key things i'd like to enable. [04:05] isaacs: whenever you do a remote install, before activating, have it run its tests, and if the test fails, it uninstalls. [04:05] isaacs: you could do some really snazzy CI type things with that [04:05] isaacs: maybe even have a post-commit hook that installs and tests your app [04:06] bradleymeck: my once concern w/ using mustache for formatting is it cant do slices from what i see [04:06] bradleymeck: *randomly changes subject* [04:08] isaacs: hehe [04:08] isaacs: "slices"? [04:09] bradleymeck: like array indices for authors / versions etc [04:09] sechrist: if Object.merge an express invention? [04:10] isaacs: sechrist: i believe so, yes [04:10] sechrist: seems to be kind of like a mixin [04:10] isaacs: like the now long-forgotten process.mixin [04:10] bradleymeck: its in a rather large amount of libs, a shallow copy generally [04:11] isaacs: bradleymeck: you might want to ping janl about the mustache thing [04:11] bradleymeck: onto the other object* [04:11] isaacs: bradleymeck: i'm still not sure exactly what you're referring to, though [04:11] isaacs: bradleymeck: could you explain the use case a bit more? [04:11] isaacs: ohh... you want to show the first 2 authors? that kind of thing? [04:12] isaacs: but not the rest? [04:12] bradleymeck: yea, mainly for versions etc, to have ...s [04:12] isaacs: i see [04:12] isaacs: what if you just... like... didn't have that feature? is that terrible? [04:13] bradleymeck: not terrible, but concern none the less [04:13] isaacs: i see [04:13] isaacs: well, you could do something that's inspired by mustache but isn't mustache... [04:13] bradleymeck: was thinking just doing mustache w/ that and hope it gets a pull [04:13] isaacs: nah, that's dumb... [04:14] isaacs: i mean, my idea is dumb, not yours [04:14] isaacs: yours is right [04:14] bradleymeck: the more i can steal the better haha [04:14] isaacs: totally [04:15] isaacs: plus, "it uses mustache" is way easier to document than "it uses this funky format i invented and it goes a little something like this..." [04:15] isaacs: like, unless it's way simpler to invent something new, or clearly much more correc,t i'd say use something existing. [04:15] bradleymeck: well, i am making a template engine slowly XD, but yea, havent made a clean syntax yet [04:15] stepheneb has joined the channel [04:16] isaacs: bradleymeck: you know, a lot of mustache is in how you structure the data, too [04:16] bradleymeck: yep [04:17] isaacs: bradleymeck: so, in building the data model, you could have something like {name:"foo", versions:[ ... ], versionData:{...} } [04:17] isaacs: where "versions" is just a list of version numbers [04:17] isaacs: and then some templates could use versions, and just show a list, and others could use the data, and show every bit of it [04:17] bradleymeck: i did note that versions dont really have info besides the url now on the registry? [04:18] isaacs: some templates could do what ls does now, treating each package+version as a separate uniqu line, and others could just list out the top-level stuff. [04:18] mape: isaacs: Hey, http://gist.github.com/440155 any reason it worked the second time? [04:18] isaacs: bradleymeck: on the individual package pages, they do, but not on the main index [04:18] bradleymeck: ah [04:19] isaacs: mape: because it didn't do anything the second time. [04:19] isaacs: mape: the issue is that you don't have ronn installed, and connect builds the docs at activation, rather than building them ahead of time and just moving them into place on activation. [04:20] isaacs: mape: sudo gem install ronn [04:20] isaacs: ok, noders. it's time to go veg out in front of tv. have fun [04:20] bradleymeck: watch something good [04:20] mape: isaacs: Ah yeah, keep getting ERROR: Failed to build gem native extension so never got around it it [04:21] mape: later [04:21] Validatorian has joined the channel [04:21] isaacs has left the channel [04:28] siculars has joined the channel [04:28] ditesh|cassini has joined the channel [04:30] zaach has joined the channel [04:34] Clooth has joined the channel [04:36] atmos: sechrist: around ? [04:36] ph^ has joined the channel [04:36] sechrist: yeah [04:36] atmos: that plugin is about 2 or 3 express versions old [04:36] atmos: there might be some changes necessary to make it work [04:36] atmos: what version ofexpress are you on ? [04:36] sechrist: looks like it would be quick fixes -- but I don't know what the trigger crap is [04:36] sechrist: latest -- npm [04:37] sechrist: .13 last I saw the error -- but no real code changed to .14 [04:37] isaacs[not_here] has joined the channel [04:37] atmos: i think the last thing i used it in was .11 [04:37] sechrist: it looks to be due to a workaround with some kind of event trigger with plugins [04:38] sechrist: the error was that your code didn't have trigger implemented -- but I don't know much beyond that [04:38] atmos: does that make it actually work ? [04:38] atmos: i have an app i can upgrade/test with [04:38] sechrist: oh no I never got it to work [04:38] atmos: gotcha [04:38] sechrist: I don't know exactly what the trigger thing does [04:38] stephenjudkins: what's everyone's favorite simple framework? [04:38] sechrist: I'm just now digging into express [04:39] sechrist: the lack of documentation is crazy [04:39] atmos: sechrist: lemme see if i can upgrade my app [04:39] atmos: oh yeah, it's a lot of fun [04:39] atmos: :) [04:39] sechrist: also lol I had never used a express plugin before yours [04:39] sechrist: took me about 5 minutes to figure out I had to use() it [04:39] sechrist: put that in the markdown hehehe [04:40] atmos: yeah i always screw up what needs to be exported [04:40] sechrist: stephenjudkins: there really isn't -- a lot of people are favoring express [04:40] sechrist: but it has it's own problems [04:40] atmos: i ended up going back to sinatra for when i want sinatra though [04:40] atmos: sechrist: have you used connect ? [04:40] sechrist: nope [04:41] stephenjudkins: sechrist: what doesn't have its own problems? i'll give it a shot [04:42] bradleymeck: i enjoy connect as making junk for it and porting [04:43] stevendavie has joined the channel [04:44] sechrist: well I think people are using express [04:44] sechrist: I haven't looked into conenct [04:46] falconair: according t othe docs, stream.remoteAddress is only available for server-side connections, why is unavailable for client connections? [04:47] bradleymeck: well connect being middleware should be theoretically able to support other frameworks as it isnt really one [04:47] bradleymeck: falconair, i would presume due to dns? [04:47] _announcer: Twitter: "proof! (node-ogl, osx-glfw branch) node-ogl works on osx now! http://bit.ly/cv2TAa #nodejs" -- Elijah Insua. http://twitter.com/tmpvar/status/16282560407 [04:48] teemow has joined the channel [04:48] falconair: brakleymeck: on the server side it returns the ip address, not the host name...doesn't that mean the dns doesn't come into it? [04:49] bradleymeck: well dns isnt performed when you accept a socket connection [04:51] bradleymeck: when you accept its accepting an ip to ip connection, not looking up an ip to a hostname (would be odd to need 2 dns lookups) [04:52] falconair: as i understand it, for tcp connections, the IP is included in the packet, so no lookup required...then why isn't this information available through node.js api for client connections? [04:54] bradleymeck: not sure, make an issue for it / put it on the newsgroup? [04:54] falconair: good idea, thx [04:56] mattly has joined the channel [04:58] cloudhead: any idea how I could solve this: http://github.com/cloudhead/http-console/issues#issue/9 ? [04:59] wilmoore_ has joined the channel [05:00] sechrist: atmos: did you run into the same problem I had? [05:01] atmos: nope, haven't tried yet [05:01] sechrist: ah ok [05:01] zomgbie has joined the channel [05:02] sechrist: if it gets working i'm going to port the schema over to php with predis [05:02] sechrist: so I can use both node and php and keep the same session [05:02] sechrist: that's super cool [05:02] atmos: gotcha [05:02] sechrist: async html building is just not my cup of tea yet [05:03] sechrist: but node is fantastic for ajax services and stuff so ^_^ [05:05] atmos: i'll pull down some old repos and see if i can get it going [05:07] sechrist: also packaging it up for npm wouldn't be a bad idea since express just got in -- it would be the first express plugin in npm [05:08] nsm has joined the channel [05:08] sechrist: oh perhaps not -- custom-errors got put in [05:09] keyvan has joined the channel [05:15] amerine has joined the channel [05:15] bradleymeck: wait so, keeping the same login session between php and node? interesting [05:15] sechrist: well that's my goal [05:15] sechrist: with redis as a stateful independent store [05:15] sechrist: should work fine [05:15] atmos: sechrist: something like var sid = event.request.cookie('sid') blows up ? [05:16] sechrist: as would memcached or whatever [05:16] bradleymeck: as long as you can sync up the cookies shouldnt be too bad [05:16] sechrist: atmos: I never actually touched that -- I did a use(RedisSession) with get('/blah') and run [05:17] sechrist: as simple as possible [05:17] sechrist: if you're not having errors it may have been me or express-auth not using redis sessions properly [05:17] Twelve-60 has joined the channel [05:17] sechrist: I was assuming redissessions was a 1:1 replacement for the original session plugin [05:17] sechrist: hotswap and go [05:19] hassox has joined the channel [05:21] atmos: sechrist: http://github.com/atmos/heroku-express/tree/express-redis-session [05:22] atmos: it doesn't work but if you run rake setup and checkout the redis session source it'll run [05:23] sechrist: oh interesting.. use(Session, { dataStore: redisStore [05:23] sechrist: :( now I feel silly [05:23] atmos: yeah my docs sucked [05:23] atmos: i had to look at an app i use it in [05:23] sechrist: oh that's sad when the own author has to hehe [05:23] sechrist: oh okay so the code works on express current? [05:23] sechrist: awesome [05:24] atmos: not yet [05:24] atmos: but it shouldn't be that difficult [05:37] mikeal has joined the channel [05:38] jetienne_ has joined the channel [05:40] jetienne_ has joined the channel [05:40] markwubben has joined the channel [05:45] atmos: sechrist: still there ? [05:46] sechrist: ya [05:46] atmos: did you pull that code down ? [05:47] zomgbie has joined the channel [05:47] sechrist: nope -- working on something else [05:47] sechrist: ooh so it does work [05:48] sechrist: I thought you were working on it still [05:48] atmos: do you know how to use git branches ? [05:48] sechrist: checkout blah [05:49] sechrist: but not really [05:49] atmos: checkout -b express-redis-session origin/express-redis-session [05:49] atmos: cat the README.md file [05:49] atmos: there's like 2-3 commands you need [05:49] atmos: just keep hitting localhost:8000/next to increase the session counter [05:50] sechrist: Rake requires i install ruby [05:50] sechrist: bleh [05:50] atmos: you're not on a mac ? [05:51] sechrist: I am on a mac -- my node stuff is not [05:51] sechrist: my mac isn't a server [05:51] sechrist: it's a workstation [05:51] atmos: that shit is already on your machine [05:51] sechrist: not where i'm running it lol [05:51] atmos: gotcha [05:51] atmos: cat the Rakefile then [05:51] atmos: it's basically a checkout and cleanup [05:51] sechrist: got it anyway [05:51] atmos: if you don't mind a ton of libs that you don't need at runtime [05:52] sechrist: I checked out heroku expressed [05:52] sechrist: changed branches [05:52] sechrist: rake'd setup [05:52] sechrist: now I have to do more git clones? [05:52] joshbuddy has joined the channel [05:52] sechrist: what the [05:52] atmos: yeah [05:52] atmos: dude i just wrote it to show you it worked [05:53] sechrist: hehe [05:53] sechrist: i'm not complaining -- i'm admiring the complexity of checking out a project from a git repo [05:54] utgo has joined the channel [05:54] hassox has joined the channel [05:55] teemow has joined the channel [05:56] charlesjolley- has joined the channel [05:57] zaach has left the channel [05:57] sechrist: atmos: seems to be working [05:57] sechrist: Sup, you're from awesome [05:57] falconair: is there a way of making sys.log(...) print timestamps with milliseconds (or finer)? [05:58] sechrist: is there a sub-ms solution yet? I remember discussion about it [05:58] sechrist: not sure if it reached commit to node [05:58] _announcer: Twitter: "A HTTP Proxy Server in 20 Lines of node.js Code - good coders code, great reuse: http://bit.ly/cbosRy" -- zweinullweb. http://twitter.com/zweinullweb/status/16285909000 [05:58] _announcer: Twitter: "via Del.icio.us : A HTTP Proxy Server in 20 Lines of node.js Code - good coders code, great reuse: http://bit.ly/9SOkJW #social #networking" -- Karen Kinnaman. http://twitter.com/KarenKinnaman/status/16285913176 [05:58] falconair: super fast servers such as node.js need finer grained time stamps :) [05:59] atmos: falconair: did you see quirkey's logger on github ? [05:59] falconair: nope, checking it now [05:59] atmos: http://github.com/quirkey/node-logger [05:59] mikeal: that proxy is going to be 10 lines after pump lands [05:59] sechrist: hahaha [05:59] sechrist: it's just schlepping [06:00] mikeal: and it's only like 10 times faster than any proxy you could ever write in Python [06:00] sechrist: only 10? [06:00] mikeal: and i know, cause i spent 2 years on one [06:00] chilts: atmos: know if you can change the log format on that node-logger? [06:00] mikeal: well, 10 times faster than anything you could dot hat wasn't twisted or raw epoll [06:00] chilts: ACTION likes timestamps like yyyy-mm-dd hh:mm:ss.ttt [06:00] chilts: etc [06:00] _announcer: Twitter: "Node.js, despite all the strangeness, amazing! Proprogal under it all weekend. Polfreymvorka ready # nodejs" [ru] -- Alexey Gromov. http://twitter.com/phpinfo/status/16286025360 [06:00] chilts: ah cool, logger.format :) [06:01] mikeal: ok [06:01] mikeal: the twitter bot needs to go [06:01] chilts: sorry atmos, I should have read further :) [06:01] atmos: agreed [06:01] mikeal: there is just too much node buzz [06:01] atmos: chilts: a good README goes a long way [06:01] chilts: :D [06:01] sechrist: hmm -- i'm assuming express has something for doing access logs? [06:01] atmos: sechrist: yeah just look in the plugins folder [06:01] atmos: it's in vendor/express/somethin [06:01] sechrist: k cool [06:03] gerad: sechrist: use(Logger) [06:03] falconair: node-logger looks cool, thx [06:04] gerad: http://github.com/gerad/nodejs-knockout/blob/master/server.js#L12 [06:05] sechrist: wow I've been using the wrong kind of layout for my app it looks like [06:05] sechrist: I haven't seen this server.js / public layout yet [06:05] sechrist: mine's been a bit of a clusterfsck [06:07] gerad: haha, express has all sorts of odd conventions [06:07] mikeal: oh man [06:07] mikeal: so [06:07] gerad: like partials need to be in views/partials [06:07] mikeal: for pump to be awesome [06:07] zomgbie has joined the channel [06:08] gerad: the server.js thing was just to get it to play nice with heroku [06:08] gerad: and still let us use coffeescript for all the bits [06:08] mikeal: we need a "close" event on HttpServerResponse after the data is actually written to the socket [06:08] mikeal: and it's way harder than I thought it would be [06:08] sechrist: can somebody give me a short/sweet description of why you want to use coffeescript? javascript is already pretty simple syntax [06:09] gerad: it's simple, but not terse [06:09] mikeal: people love their syntax, it's kinda silly [06:09] gerad: esp with callbacks, you get function all over the place [06:09] gerad: but what did it for me was existential operators [06:09] gerad: a?.b?.c [06:10] mikeal: yeah, typeing function is such a burden I'd rather deal with a compile step and an indirection between my exceptions and my code lines [06:10] mikeal: that makes no sense at all, but whatever, people love to obsess about syntax [06:11] mikeal: just wait until we get a flood of Python people in a year or so [06:11] mikeal: then there will all kinds of hype around pyscript again [06:11] saikat has joined the channel [06:11] gerad: authorize member for member in members [06:11] gerad: and having a consistent class syntax [06:11] mikeal: except in extreme cases, I don't care about syntax [06:12] mikeal: if it's not Java or Perl, i don't really care [06:12] jetienne_: mikeal: you tried perl ? [06:12] gerad: lisp? [06:12] mikeal: lisp is fine [06:12] jetienne_: or lisp :) [06:12] jetienne_: come on [06:12] mikeal: i can totally deal with lisp [06:12] mikeal: you have to be really good about indentation [06:12] mikeal: but it's dealable [06:12] sechrist: what is a partial? also what the heck -- this haml stuff looks ridiculous [06:12] gerad: for me, it comes down to readability [06:13] mikeal: sechrist: just use mustache [06:13] jetienne_: and readability to maintainability [06:13] sechrist: I come from php-land without using frameworks [06:13] sechrist: I feel so outdated [06:13] mikeal: javascript is plenty readable and maintainable [06:13] jetienne_: sechrist: a partial is a template for only a part of the page [06:13] sechrist: include('inc/header.php'); :( [06:13] mikeal: pretty much anything that isn't perl is readable and mainatable after a few days of getting used to it [06:13] jetienne_: yep it is possible to write good js [06:14] jetienne_: just sick on "the good parts" [06:14] mikeal: this conversation is silly [06:14] mikeal: seriously [06:14] atmos: sechrist: mustache is worth learning [06:14] mikeal: syntax is the least of your problems [06:14] gerad: I've written a lot of javascript, and felt the same way about coffeescript initially [06:14] atmos: my js/php friends could follow the code [06:14] mikeal: if you think the biggest issue with your code is syntax then I guarantee you have some really bad code [06:14] gerad: but after trying it out on lazeroids [06:14] jetienne_: mikeal: man you started this discussion :) [06:14] sechrist: does mustache let me have normal html with inline javascript? or what [06:14] gerad: I definitely can't go back [06:14] sechrist: that's how my php was [06:14] atmos: sechrist: yeah [06:14] sechrist: ^_^ [06:14] sechrist: awesome [06:15] mikeal: sechrist: yes [06:15] sechrist: but inline javascript doesn't really work when everything is fucking async [06:15] sechrist: nested callbacks ftl [06:15] mikeal: mustache doesn't care what you do outside of the replacement characters [06:15] mikeal: oh no, you want inline js processing or you just want to write some js for the client? [06:16] jetienne_: mustashe has inline execution ? [06:16] sechrist: I'm not sure what I want -- I haven't broken away from my php-ness yet [06:16] mikeal: no, it doesn't [06:16] sechrist: I've been proxying certain urls to node for ajax services [06:16] sechrist: but my apps are still php [06:16] jetienne_: oh ok [06:16] sechrist: don't hit me :( [06:16] mikeal: mustache is one of the most minimal template systems ever [06:16] gerad: sechrist: a lot of the web is written in php [06:16] mikeal: it doesn't allow you do in-line logic [06:17] mikeal: which if you subscribe to that way of templating it's great, but some people want to do crazy ninja stuff in their templates [06:17] jetienne_: mikeal: it has some conditionnal compilation and arhyt;etic from memory [06:17] gerad: it's possible to do PHP well, but it certainly doesn't force you too [06:17] mikeal: and that's cool, whatever, but it wont' work in mustache [06:17] mikeal: yeah, you have an "if" style thing and an iterator [06:17] sechrist: ah -- my biggest hurdle with dumping my app into node is database query waiting [06:17] mikeal: and that's basically it [06:17] sechrist: i've has this discussion with issacs already [06:18] sechrist: currying a lot of queries -- waiting for them all to complete [06:18] sechrist: then rendering the page [06:18] mikeal: jetienne_: i don't think it has arithmentic [06:18] mikeal: at least I've never used it or seen it before [06:18] jetienne_: mikeal: let me look [06:18] mikeal: sechrist: with Mu you wouldn't do it that way [06:18] sechrist: oh? [06:18] nsm has joined the channel [06:18] mikeal: you would create your template object and tell Mu where to render the template to [06:18] mikeal: then as each query returns [06:19] mikeal: you would set those variables in the template [06:19] sechrist: from what I think you just described it's the same problem [06:19] mikeal: and Mu will send it to the response as soon as it has enough at the top to render [06:19] sechrist: you have to feed mu the list of variables in full? [06:19] sechrist: right? [06:19] mikeal: no [06:20] mikeal: you can do one at a time if you like [06:20] sechrist: oh woah [06:20] jetienne_: mikeal: true. the arhytmetic is pushed in the language calling moustache [06:20] mikeal: that's how it's advertised [06:20] mikeal: i haven't used it yet [06:20] sechrist: so it does all kinds of crazy context switching [06:20] mikeal: jetienne_: yeah, almost all logic is pushed up the stack, which I actually like [06:20] jetienne_: mikeal: it keeps it simple [06:21] mikeal: yeah, and although I don't care about this much anymore, it also makes it language independent [06:21] jsilver has joined the channel [06:21] sechrist: is there a proper thrift implementation for node yet? [06:21] jsilver: hi [06:21] jsilver: ACTION waves [06:21] sechrist: jsilver i dislike you [06:22] jsilver: sechrist: heh [06:23] jsilver: that was rude... [06:23] sechrist: wow --- mapping variables to functions in mu is neat [06:23] sechrist: but i've yet to see a query demonstrated with this [06:23] sechrist: if you get your query response in a callback [06:23] sechrist: bleh whatever [06:23] sechrist: i'm all confused [06:24] mikeal: don't worry [06:24] mikeal: you'll get it :) [06:24] nsm has joined the channel [06:24] sechrist: polling a list of variables before rending a page would work I guess [06:24] jsilver: hey Michael Chase Sechrist [06:25] jsilver: is this you http://userserve-ak.last.fm/serve/126/47709669.png [06:25] sechrist: yarly [06:25] jsilver: jw [06:25] jsilver: r u n00b [06:25] sechrist: no, colloquy just decided to leave my account name in here [06:25] sechrist: oh well [06:26] jsilver: can you get girlfriend [06:26] jsilver: jw [06:26] sechrist: i have one but ok [06:26] jsilver: do you tell her I know NodeJS [06:26] mikeal: colloquey is just a big ball of crash [06:26] jsilver: is she really impressed about how much you know about concurrency [06:26] mikeal: is jsilver a bot [06:26] jakehow has joined the channel [06:26] jsilver: no [06:26] sechrist: mikeal: that's not much better besides limecrap [06:26] zomgbie has joined the channel [06:26] mikeal: i use the latest Adium beta [06:26] mikeal: it has IRC support [06:26] mikeal: one less app i have to run [06:27] sechrist: I would feel redundant if I ran adium -- because I run meebo for all of my im [06:27] sechrist: persistent sessions / push notifications to iphone when idle / logs anywhere [06:27] sechrist: awesome stuff [06:28] mikeal: oh i know [06:28] sechrist: I actually wrote a libmeebo for purple [06:28] jsilver: ... why did you say that you dont like me [06:28] sechrist: does the longpolling [06:28] mikeal: i'm friends with a bunch of those guys, they are one of the biggest couchdb users in the world [06:28] sechrist: not finished though -- I have an event loop working though and logging in [06:28] sechrist: oh cool [06:28] sechrist: glib is pretty lulz [06:28] felixge has joined the channel [06:28] felixge has joined the channel [06:28] jsilver: you troll sechrist [06:28] mikeal: actually, the biggest known deployed couchapp is from meebo [06:29] sechrist: oh wow [06:29] mikeal: and they maintain couchdb-lounge [06:29] sechrist: do any of the live services meebo use sit directly on a couch port? [06:29] jsilver has left the channel [06:29] sechrist: yay [06:29] sechrist: he left [06:29] mikeal: that one that you stick on your website to add chat [06:29] mikeal: i think that's a couchapp [06:29] sechrist: meebo bar [06:30] mikeal: sechrist: what was with you and that guy [06:30] sechrist: oh [06:30] sechrist: he was in here yesterday [06:30] sechrist: being dumb [06:30] sechrist: praising ruby every other sentence [06:30] gerad: is there a better web interface for meebo [06:31] mikeal: gerad: I'm gonna paste that sentence to tilgovi [06:31] gerad: i like the iphone app, but the deskop metaphor in the browser is... [06:31] sechrist: when I finally get around to doing it -- i intend to write a userscript to put all of the chats in one tabbed box [06:31] sechrist: I use a SSB for meebo currently [06:31] sechrist: because my libpurple plugin is unfinished [06:31] gerad: SSB? [06:31] sechrist: site specific browser [06:31] sechrist: fluid.app [06:32] sechrist: it adds growling and stuff [06:32] gerad: yeah, I guess that helps, let me know if you ever write a new interface for it [06:32] mikeal: that's getting integrated in to Firefox soon [06:32] mikeal: "app tabs" [06:32] sechrist: my purple plugin's core is literally done -- it's just mapping the events to purple calls [06:33] sechrist: handling the long polling ajax and parsing the json is done [06:33] mikeal: did anyone write FUSE bindings for node yet? [06:33] sechrist: that would be cool [06:33] sechrist: maybe somebody would fix the s3 plugin [06:34] sechrist: transmit 4 does a swell job other than a few hiccups [06:35] TomY has joined the channel [06:36] sechrist: so people are actually running node locally on the mac where they develop the app? [06:36] sechrist: i've always used a remote vps or something for development [06:36] sechrist: :\ [06:37] mikeal: haha, seriously? [06:37] mikeal: i can't do development like that [06:37] gerad: yeah, sounds slow [06:37] mikeal: it all works fine on Mac [06:37] sechrist: coda + terminals [06:37] mikeal: iTerm + TextMate [06:37] sechrist: without a local server running [06:38] sechrist: idk -- just seems complex to move everything over from one platform to another [06:38] mikeal: i would be lost without "save on application change" [06:38] sechrist: for debugging purposes [06:38] mikeal: the code is identical [06:38] sechrist: yes but it may not run the same [06:38] gerad: meh, staging server [06:38] mikeal: yeah, i check in stuff that isn't finished [06:39] sechrist: I need to actually try to learn git [06:39] sechrist: then developing locally would appeal to me probably [06:39] mikeal: git won [06:39] mikeal: you should learn it [06:40] mikeal: and rebase is the greatest thing ever invented [06:40] gerad: git add —patch in my opinion [06:41] gerad: rebase can be dangerous [06:41] jetienne_: i dont even know what is it :) [06:41] jetienne_: add commit log clone, this is all i use :) [06:42] gerad: push / pull too, I hope! [06:42] jetienne_: that too [06:42] gerad: but if you're not branching (a lot) then you aren't really using git effectively [06:42] mikeal: the only patches i merge are from ryah :) [06:42] mikeal: everyone else pushes to remote branches [06:42] mikeal: and i just merge them [06:43] mikeal: branches are so cheap and awesome [06:43] mikeal: sometimes i just create one, even if i'm not gonna use it [06:43] mikeal: just because [06:43] mikeal: :) [06:43] gerad: just to see it's name in git branch -a ? [06:43] mikeal: but seriously, git branches are awesome [06:43] sechrist: mikeal: 'git won' [06:44] mikeal: they did [06:44] sechrist: subversion is still used in a shitload of places [06:44] mikeal: it surely is [06:44] mikeal: but it lost [06:44] sechrist: the SCM war? [06:44] mikeal: so did hg [06:44] mikeal: well, github won actually [06:44] sechrist: mercurial was lul [06:45] mikeal: mozilla still uses it, and it's super annoying [06:45] sechrist: yeah github is neat [06:45] sechrist: but I still don't have an account [06:45] sechrist: ^_^ [06:45] mikeal: when i get links to code that aren't in git, i seriously get angry [06:45] mikeal: people who link me to launchpad are in danger of getting punched [06:45] sechrist: bitbucket [06:45] sechrist: ftw [06:46] mikeal: thanks for that link, if i start cloning this repo with bazaar today I might be able to work on it by this weekend [06:46] sechrist: mikeal: you don't like bz? [06:46] mikeal: but first I'd have to find a fuckin link on this crap web interface [06:46] mikeal: bitbucket would be great if it wasn't hg :) [06:46] Judofyr has joined the channel [06:46] mikeal: and if github didn't exist [06:47] mikeal: but seeing as it does, i don't see the point in bitbucket [06:47] sechrist: does github allow you to search in a project? [06:47] sechrist: I haven't been able to see how [06:47] sechrist: that would be awesommeee [06:47] gerad: not sure about github [06:47] gerad: but you can do git grep 'foo' folder/ [06:47] gerad: which is nice [06:47] sechrist: of course and that's what I do [06:47] mikeal: that sounds cool but I can't say i would really use it [06:47] mikeal: how often do i need to search for something in a project i haven't checked out? [06:48] sechrist: but a web interface is much nicer [06:48] sechrist: with linenums and highlighting [06:48] mikeal: not while i'm developing [06:48] mikeal: using TextMate find is faster while i'm developing [06:48] sechrist: you don't have a browser opened at all times? [06:48] gerad: sechrist: makes sense, like when you want to share a link into some code [06:48] mikeal: using a browser inteface would require a mousemove [06:49] sechrist: oh you're one of those guys [06:49] gerad: instead of having to nav through it [06:49] mikeal: i can bring up text search and work it from the keyboard while i'm in textmate, that's much faster [06:49] sechrist: mikeal: I bet you would prefer to code in vim + ctags if you could [06:49] mikeal: i'm not a vim die hard [06:49] mikeal: if i edit something in the terminal i use vi [06:49] mikeal: but there are some cases where the mouse is nice in a text editor [06:50] mikeal: it's just that I have using the mouse for application navigation [06:50] sechrist: not through ssh -- but you can use a mouse in vim [06:50] brianmario has joined the channel [06:50] sechrist: with terminal.app hacks [06:50] mikeal: it's not optimized for it [06:50] sechrist: but terminal.app sucks [06:50] mikeal: i mean [06:50] mikeal: you *can* write a novel with emacs [06:50] mikeal: doesn't mean you should [06:50] mikeal: hell, you can play MAME games from emacs [06:50] mikeal: but you shouldn't [06:51] sechrist: when I worked for a web hosting company [06:51] sechrist: we had a ssh key wizard that handled all of the keys that we logged into every day [06:51] sechrist: to work from [06:51] mikeal: anyway [06:51] sechrist: if you tried to open emacs on wizard [06:51] mikeal: sleep time [06:51] sechrist: it kicked you [06:51] technoweenie has joined the channel [06:51] mikeal: gnight [06:52] sechrist: atmos: ty btw [06:52] sechrist: it's all working in my app now [06:53] charlesjolley-_ has joined the channel [06:53] _announcer: Twitter: "A HTTP Proxy Server in 20 Lines of Code node.js - good coders code, great reuse - Delicious hotlist - Bookmark this http://bit.ly/akBHqX ..." [nl] -- Hojjat M,Rezaei. http://twitter.com/hojjatmr/status/16288281091 [06:54] atmos: sechrist: right on, i'm glad to know it still works [06:54] sechrist: I guess it was just how I was using it [06:57] sixthgear has joined the channel [06:59] CIA-76: node: 03Aaron Heckmann 07master * r1d088fb 10/ (lib/fs.js test/simple/test-fs-write-file.js): fs.writeFile accepts Buffers - http://bit.ly/bjircO [07:00] _announcer: Twitter: "Node.js FTW! - "A HTTP Proxy Server in 20 Lines of node.js Code" at: http://bit.ly/d4h24A #ssjs" -- Samuli Hakoniemi. http://twitter.com/zvona/status/16288568058 [07:02] jetienne_: var proxy = http.createClient(80, request.headers['host']) <- hes got retweet but his code is bogus :) [07:03] jetienne_: host == hostname : port [07:04] cloudhead: sechrist: your first name isn't Drew is it? [07:04] sechrist: nor ryan [07:04] cloudhead: ok cool [07:05] sechrist: http://twitter.com/drewsechrist [07:05] sechrist: woah [07:05] sechrist: a fellow sechrist developer [07:05] cloudhead: yeh thought it might be you [07:06] sechrist: there's not many of us [07:07] charlesjolley- has joined the channel [07:10] _announcer: Twitter: "Strong urge to hack on stuff I shouldn't be. Specifically a mini server to handle video recording in node.js." -- Luke™. http://twitter.com/LukeInTH/status/16288962171 [07:10] sechrist: sweet -- I have the same session between php and node [07:14] stephenjudkins has joined the channel [07:19] virtuo has joined the channel [07:19] jetienne_: video recording from where ? what is the video source ? [07:20] therp has joined the channel [07:21] therp: hi folks, anyone using expressjs as their web framework? (or is there a separate channel?). I seem to be unable to find how to configure it run on another port instead of 3000. [07:22] atmos: http://github.com/atmos/heroku-express/blob/master/lib/app.js#L18 [07:24] therp: atmos: thanks! I wonder where this is documented :/ [07:24] cloudhead: express really needs its own channel [07:25] cloudhead: it's sort of tangent to node [07:26] _announcer: Twitter: "a #proxyserver with 20 lines of Javascript? http://catonmat.net/http-proxy-in-nodejs" -- bert boerland. http://twitter.com/bertboerland/status/16289573419 [07:26] visnup has joined the channel [07:26] _announcer: Twitter: "I see big oppertunities for #xss crossitescripting #proxy http://catonmat.net/http-proxy-in-nodejs #javascript :-)" -- bert boerland. http://twitter.com/bertboerland/status/16289601082 [07:27] technoweenie: the twitter crap needs its own channel [07:27] cloudhead: at least some of it is node-related [07:27] therp: cloudhead: I wasn't able to find one.. so sorry to disturb. [07:28] cloudhead: therp: no worries, it's no ones fault [07:28] technoweenie: at what point does a project graduate from its languages channel [07:28] technoweenie: thats rhetorical, i dont really care [07:28] cloudhead: except maybe tj, but I guess he doesnt have time to support it [07:28] cloudhead: technoweenie: I think it never belongs there in the first place [07:29] cloudhead: except core libraries [07:29] technoweenie: thats silly, theres tons of support given for node projects in here [07:29] technoweenie: and in every other language channel [07:29] cloudhead: I don't really see that [07:30] cloudhead: but again, some things are fundamental, like db libraries which everyone uses, or html parsing etc [07:30] cloudhead: but express is a whole different thing [07:30] technoweenie: shrug [07:31] technoweenie: people talk about fab, geddy, and connect here [07:31] sechrist has joined the channel [07:31] cloudhead: yea, they talk about it [07:31] cloudhead: that's different [07:31] cloudhead: than it being a support channel [07:31] cloudhead: for those libraries [07:32] sechrist: hmm I dropped out -- how do I switch environments in express? [07:32] cloudhead: v_v [07:32] sechrist: :( [07:32] sechrist: there's no #expressjs [07:32] technoweenie: you're sol then [07:32] sechrist: lol [07:32] technoweenie: no really, gtfo [07:32] cloudhead: lol [07:32] technoweenie: *throws rocks* [07:33] sechrist: yarly [07:33] technoweenie: *cries* [07:33] sechrist: people should watch what they release for node [07:33] sechrist: if you release something you're responsible for maintaining it -- because people will use it [07:33] technoweenie: no you're not [07:33] sechrist: gtfo github if not [07:33] sechrist: lol [07:34] sechrist: are too [07:34] cloudhead: someone who cares about express should start #expressjs [07:34] technoweenie: if you cant experiment in oss, then where can you [07:34] technoweenie: in your basement? who benefits [07:34] sechrist: rawr [07:34] cloudhead: well, depends [07:34] cloudhead: if you market it [07:34] cloudhead: with a fancy website and stuff [07:34] cloudhead: it's not an experiment [07:34] cloudhead: it's a call for trust [07:34] cloudhead: and attention [07:34] sechrist: there's a fancy website [07:34] sechrist: with absolutely 0 doc [07:35] cloudhead: I know [07:35] technoweenie: well, then he got a job and they paid him to write connect :) [07:35] sechrist: okay i've heard connect thrown around in here 10 times today [07:35] technoweenie: its still oss, you cant expect anything out of it [07:35] sechrist: I'll check it out [07:35] sechrist: technoweenie: yes you can [07:35] sechrist: if everybody stopped working on the linux kernel [07:35] sechrist: the world would blow up [07:36] cloudhead: sechrist: have you looked at geddy? [07:36] sechrist: no [07:36] technoweenie: i'm not saying it makes it a great project. if theres another one w/ better docs and support, by all means use it [07:37] sechrist: and there's nothing really tying me to express except for a few plugins [07:37] cloudhead: http://geddyjs.org/ [07:37] sechrist: fancy website [07:37] sechrist: with no documentation [07:37] technoweenie: dont expect shit unless you pay for it [07:37] cloudhead: mde is actively developing it [07:38] sechrist: hm [07:38] sechrist: actually I am kind of tied to express now [07:38] cloudhead: the framework scene is pretty crappy, sadly [07:38] sechrist: i'm using a lot of plugins I don't want to reimplement [07:38] sechrist: like oauth [07:39] cloudhead: hmm [07:39] technoweenie: its still like the wild west [07:39] cloudhead: yeh [07:39] cloudhead: it is to be expected [07:39] sechrist: yeah -- the way i've been using node so far as been just to complement a core service [07:39] sechrist: full blown website serving in node sounds iffy [07:39] technoweenie: node is a long ways from being able to power a full app imo [07:40] cloudhead: we're going to get a couple sinatra clones (express), then rails, then the real stuff hopefully [07:40] technoweenie: well its fully capable, i just dont feel like a developer would be very productive yet [07:40] cloudhead: technoweenie: yea that's the thing [07:40] sechrist: no i've spent more time getting crap to work I could have gotten to work in php in less than 5 minutes [07:40] cloudhead: it's not productive yet [07:40] cloudhead: but it's getting there [07:40] sechrist: I spend more time tinkering [07:40] sechrist: that's never good [07:41] cloudhead: hehe [07:41] sechrist: with deadlines and such [07:41] technoweenie: yea, that sounds like a yak shave [07:42] sechrist: yep it is [07:42] hellp has joined the channel [07:43] sechrist: however writing a high performance long polling system or something with websockets is just flat out easier in node [07:43] sechrist: but you have to work to make it interface with everything else [07:45] Sudar has joined the channel [07:45] _announcer: Twitter: "is stunned by the awesomeness of #nodejs and its REPL lib!" -- muhqu. http://twitter.com/muhqu/status/16290338276 [07:47] technoweenie: stunned [07:50] sechrist: don't node me bro [07:51] technoweenie: gtfo! [07:51] dabreaka has joined the channel [07:52] technoweenie: that was a crazy video, i wonder how that dude feels about that phrase now [07:52] technoweenie: almost as crazy as that naked dude at that concert that got tazed several times [07:54] kuya: what is the best way to test if a file exists or not? fs.stat? [07:54] cloudhead: kuya: path.exist [07:55] kuya: aha! thats what i wanted! thanks cloudhead [07:55] cloudhead: 'exists' actually [07:55] cloudhead: np [07:56] micheil has joined the channel [07:58] cloudhead: alright, bed time -- night night folks [07:59] hdon has joined the channel [08:19] muhqu has joined the channel [08:21] felixge has joined the channel [08:21] felixge has joined the channel [08:23] kodisha has joined the channel [08:30] visnup has joined the channel [08:31] _announcer: Twitter: "@creationix @tjholowaychuk In your package.js for connect, could you change the node version to be: ">= 0.1.98-0" so compiling on head works" -- Micheil Smith. http://twitter.com/miksago/status/16292042158 [08:31] _announcer: Twitter: "A HTTP #Proxy Server in 20 Lines of node.js Code http://j.mp/cATPCs #JS" -- Daniel Kurdoghlian. http://twitter.com/derblub/status/16292056905 [08:36] zomgbie has joined the channel [08:38] oleg has joined the channel [08:39] jjenzz has joined the channel [08:43] stephenjudkins has joined the channel [08:43] micheil: isaacs[not_here]: I ended up getting an error when updating npm. [08:44] isaacs[not_here]: micheil: go into the code folder and run "make" [08:44] isaacs[not_here]: or npm install --auto-activate always npm [08:44] micheil: heh, okay [08:44] isaacs[not_here]: if you get an error, email the ml [08:44] isaacs[not_here]: npm-@googlegroups.com [08:44] micheil: k [08:45] micheil: dammit. my net connections doing weird crap. [08:45] micheil: isaacs[not_here]: I'll send it across too, but here's the error: http://gist.github.com/440346 [08:46] isaacs[not_here]: micheil: oh, holy hell, you've got an old version [08:46] isaacs[not_here]: micheil: update to the latest code, and THEN run make [08:46] micheil: k [08:46] isaacs[not_here]: make sure to update node, too, if you haven't already [08:47] micheil: I always update node, other modules, much less regularly [08:47] jjenzz has left the channel [08:47] _announcer: Twitter: "Is there anything bad about a #nodejs, #expressjs and #mongodb combo? It seems too good to be true!!" -- Henrik Johansson. http://twitter.com/dahankzter/status/16292666708 [08:49] micheil: woot. got everything running good now. [08:51] mAritz has joined the channel [08:51] rnewson has joined the channel [08:53] nsm has joined the channel [08:58] xla has joined the channel [09:01] teemow has joined the channel [09:10] teemow has joined the channel [09:15] kjeldahl has joined the channel [09:15] mitkok has joined the channel [09:15] jedschmidt has joined the channel [09:17] jetienne_: in a http server, while im streaming the response, what can tell me if i got room to write, or if the other end closed the connection ? [09:17] jetienne_: response.write(chunk, encoding) is very sync btw [09:18] isaacs[not_here]: jetienne_: that's because it's a socket, not a file. it returns true if everything got written out, or false if it had to buffer some of it. [09:18] isaacs[not_here]: jetienne_: i think you can do response.addListener("close") or response.connection.addListener("close") [09:19] isaacs[not_here]: something like that [09:19] isaacs[not_here]: maybe request.connection.addListener("close" [09:19] jetienne_: request.connection.addListener('end', function(){ this is what i got, but it isnt always specified [09:19] jakehow has joined the channel [09:19] jetienne_: notified [09:19] isaacs[not_here]: right [09:19] isaacs[not_here]: if there's an error or a dropped connection, it might not end, i've found [09:19] isaacs[not_here]: i think there'sa bug there somewhere [09:20] isaacs[not_here]: request.addListener("error" maybe [09:20] jetienne_: error seems to work better thx [09:21] oleg has joined the channel [09:21] jetienne_: isaacs[not_here]: do you know where i can find an example of data streaming thru http response ? [09:21] isaacs[not_here]: jetienne_: are you the server or the client? [09:21] jetienne_: isaacs[not_here]: the server [09:22] jetienne_: isaacs[not_here]: this is something like chargen [09:22] isaacs[not_here]: then i dunno. maybe check express or connect or websocket-server or something? [09:22] jetienne_: ok [09:24] micheil: woot! just figured out something awesome with connect middleware. [09:25] micheil: websockets over connect, proof of concept: http://gist.github.com/440384 [09:27] slaskis has joined the channel [09:32] caolanm has joined the channel [09:33] jetienne_: setTimeout(callback, 0); <- what is the modern word for this tech ? [09:33] ewdafa has joined the channel [09:33] gerad: not sure [09:33] gerad: I think prototype calls it defer [09:34] jetienne_: ok [09:34] gerad: http://documentcloud.github.com/underscore/#defer [09:35] jetienne_: A “deferred” function will not run immediately; rather, it will run as soon as the interpreter’s call stack is empty. [09:35] jetienne_: gerad: this is it [09:36] jos3000 has joined the channel [09:37] testnick has joined the channel [09:38] testnick has joined the channel [09:39] jos3000: Hello all - I've got a little problem with my code - I assume it must be a misunderstanding of the way JavaScript works. I'd be very grateful if anyone would be interested enough to take a look: [09:39] jos3000: http://gist.github.com/440389 [09:39] jos3000: is the code [09:39] testnick has joined the channel [09:40] jos3000: http://gist.github.com/440392 [09:40] jos3000: is the output [09:41] jos3000: I don't understand why the second output is undefined, when addEventListener is clearly set in the first output [09:41] _announcer: Twitter: "Interested in #nodejs, here's a really interesting blog - How To Node http://bit.ly/9EzyDT" -- Andy Davies. http://twitter.com/andydavies/status/16294710178 [09:41] gerad: window.__proto__.addEventListener [09:41] gerad: likely it's in the prototype, not the object itself [09:42] gerad: not sure if that's the reason, but it's my first guess [09:43] testnick has joined the channel [09:43] jos3000: Thanks gerad - I'll have a look at that [09:44] visnup: gerad: whoa you're awake? [09:45] visnup: and hanging out on irc? [09:45] visnup: damn [09:45] gerad: visnup: did you drink a boot? [09:48] jos3000: is __proto__ the same and prototype? I don't recognise it from browser JavaScript [09:48] jos3000: the same *as* [09:48] gerad: it's v8 specific, you'd see it in web inspector in chrome [09:48] gerad: prototype is on the class [09:48] gerad: __proto__ is on the instance [09:49] gerad: roughly speaking [09:49] jos3000: cool - just found an article on it [09:49] jetienne_: http://github.com/jeromeetienne/node-chargen my morning toy [09:53] jos3000: Anyway - my function isn't anywhere to be found... very strange. [09:53] gerad: it could also be up the prototype chain [09:56] kjeldahl: I'm still not getting this npm stuff; "sudo npm install connect"... So where is my "connect" executable? Am I supposed to symlink the executable from .node_libraries into the path myself? [09:56] jos3000: if it's in the prototype chain should it be there when I access window.addEventListener ? [09:56] gerad: jos3000: yes, it should be there [09:57] gerad: oh, sorry, just looked at your output again [09:58] gerad: it's backwards from the way I saw it originally! [09:58] gerad: :-) [09:58] felixge has joined the channel [09:58] ceej has joined the channel [09:58] gerad: window.document.addEventListener [09:58] gerad: perhaps? (it's late) [09:59] jos3000: :-) That is defined too... [09:59] _announcer: Twitter: "Putting #nginx infront of several #nodejs (#expressjs really) makes the throughput increase significantly but not linearly it seems" -- Henrik Johansson. http://twitter.com/dahankzter/status/16295404689 [10:00] gerad: so then I don't understand your question... [10:00] gerad: addEventListener is defined on window.document in the first output [10:00] gerad: and not on window in the first output [10:00] gerad: which is consistent with the second output [10:01] jos3000: It is defined on window on the first output - line 44 [10:04] gerad: hehe, looks like it's defined on window.window on line 44 [10:04] jos3000: Yep - I just spotted it too! Thanks - silly mistake! [10:05] gerad: yeah, that kind of stuff happens to me too often!:-) [10:08] botanicus has joined the channel [10:13] b_erb has joined the channel [10:16] rnewson has joined the channel [10:16] rnewson has joined the channel [10:28] jashkenas has joined the channel [10:32] jashkenas has joined the channel [11:00] markwubben has joined the channel [11:02] slaskis has joined the channel [11:13] pandark_ has joined the channel [11:17] _announcer: Twitter: "With nodejs wrote a automatic update autoproxy2pac the pac file to a local script, write your own http client pretty painful to deal with a lot of things" [zh-CN] -- thunderbean. http://twitter.com/thunderbean/status/16298692209 [11:17] jashkenas has left the channel [11:28] hassox has joined the channel [11:29] hassox has joined the channel [11:32] _announcer: Twitter: "node.js would be a great low-level engine, if documentation was not in fact his source # helloworlddoesntwork" [bg] -- Lanzz. http://twitter.com/lannnzz/status/16299422951 [11:33] kodisha: lol, how am i seeing this tweet in russian? :D [11:34] kodisha: ah, [bg] [11:35] kodisha: so it auto translates tweets? cool [11:35] LowValueTarget has joined the channel [11:44] chrischris has joined the channel [11:45] kevm has joined the channel [11:46] dabreaka has joined the channel [11:47] jos3000 has left the channel [11:47] jos3000 has joined the channel [11:53] siculars has joined the channel [11:55] ewdafa has joined the channel [12:12] zomgbie has joined the channel [12:34] hellp has joined the channel [12:38] davidsklar has joined the channel [12:38] bradleymeck has joined the channel [12:38] rnewson has joined the channel [12:49] ben_h has left the channel [12:51] ditesh|cassini has joined the channel [12:53] _announcer: Twitter: "Awesome: Mongoose - MongoDB ORM mapping in NodeJS - http://bit.ly/bCwDZV - Giving it a go now" -- dominiek. http://twitter.com/dominiek/status/16303824141 [12:54] JAAulde has joined the channel [12:54] pgriess1 has left the channel [12:55] pandark_ has joined the channel [12:56] quirkey has joined the channel [12:59] pandark_ has joined the channel [13:02] kodisha has joined the channel [13:02] riottaba has joined the channel [13:05] sveimac has joined the channel [13:09] pgriess has joined the channel [13:16] riottaba_ has joined the channel [13:20] jherdman has joined the channel [13:22] riottaba has joined the channel [13:23] slaskis: how should i make proper exceptions? anyone know of any examples i can look at? [13:23] kriszyp has joined the channel [13:24] micheil: throw new error() [13:24] micheil: but throw'ing is generally a bad idea [13:25] slaskis: micheil: right, but for instance in as3 i usually make custom errors which extend the main one, is there anything special if i want to throw custom errors? [13:25] micheil: yeah, you can "extend" and throw your own exceptions, but like I said, it's generally not a good idea to be throwing, being that we're using async code [13:26] micheil: the common pattern is callbacks, so the arguments are: function(err, data...){} [13:27] slaskis: yeah, i like that pattern, and i use it in my lib, but sometimes throwing feels right so i just wanted to make sure i'm doing it right ;) [13:27] micheil: generally there should be no reason to throw. [13:29] _announcer: Twitter: "Well - forum ready, you are welcome:) http://forum.nodejs.ru # nodejs" [ru] -- Serge Shirokov. http://twitter.com/kurokikaze/status/16306054383 [13:29] slaskis: allright, i'll try to stay away from it [13:31] _announcer: Twitter: "@ Kurokikaze Fanfares and cake! Only going to ask if there speaking community in # nodejs ... Hooray, thank you!" [ru] -- ramainen. http://twitter.com/ramainen/status/16306174031 [13:33] _announcer: Twitter: "Because the whole point of having a node is so you can have more than one, right? http://github.com/kriszyp/multi-node #nodejs" -- kriszyp. http://twitter.com/kriszyp/status/16306341967 [13:34] riottaba_ has joined the channel [13:38] caolanm: why doesn't the callback for path.exists have an error as the first argument? that always seemed odd to me [13:38] caolanm: and is omitting the error argument considered normal with boolean operations like that? [13:38] micheil: create a patch. [13:39] micheil: I'm not sure tbh. [13:39] caolanm: it seemed odd enough that somone must have had a good reason ;) [13:39] caolanm: *seems [13:40] micheil: I guess it's really if the path does exist, then your going to have err=false, exists=true; and if it doesn't, it'll be err=true, exists=false [13:40] micheil: which would probably get very confusing. [13:41] caolanm: I think its more confusing to change the callback convention for one function ;) [13:41] _announcer: Twitter: "Screenshot of my LBi presentation on visualising Twitter using NodeJS and Processing. http://twitpic.com/1x9kgp" -- ray brooks. http://twitter.com/rayui/status/16306833625 [13:41] micheil: well, simply put, I don't think it makes sense. [13:41] caolanm: anyway, I've embraced it in my async library which allows you to do filter etc using functions like path.exists [13:41] micheil: try sending a patch to the mailing list. [13:41] dahankzter has joined the channel [13:41] micheil: see what reply you get. [13:41] riottaba has joined the channel [13:42] caolanm: yeah, think I will do [13:42] micheil: because path.exists is just a wrapper around fs.stat [13:42] caolanm: and fs.stat can throw errors [13:42] caolanm: madness I tell you! [13:42] caolanm: :) [13:43] caolanm: ACTION adds path.exists patch to todo list [13:44] micheil: well, the way that path.exists works is that it actually checks if fs.stat's err==false [13:44] micheil: it's about a 5 line function [13:45] micheil: speaking of exists, I'm going to write a patch for a sync version, because people have requested it. [13:45] lukev has joined the channel [13:46] caolanm: yeah, thats been asked for quite a few times [13:47] micheil: patch ready in about T-10mins [13:47] jetienne has joined the channel [13:48] voodootikigod has joined the channel [13:48] skampler has joined the channel [13:48] jetienne_ has joined the channel [13:52] markwubben has joined the channel [13:52] sudoer has joined the channel [13:54] micheil: patch done. [13:54] micheil: now then.. http.client & upgrade. [13:55] mikelangelo has joined the channel [13:55] _announcer: Twitter: "I, node.js of what is soon to be v0.2?" [ja] -- KOBA789. http://twitter.com/koba789/status/16307782842 [13:56] mikelangelo: has anyone connected an Adobe AIR app to Node.js? [13:56] caolanm: anyone know what we're using for the _announcer? its great :) [13:56] mikelangelo: AIR javascript preferrably [13:57] PyroPeter has joined the channel [14:00] sanderjd has joined the channel [14:00] markwubben has joined the channel [14:01] gf3 has joined the channel [14:01] ryan_gahl has joined the channel [14:01] JimBastard has joined the channel [14:02] _announcer: Twitter: ""patch ready in about T-10mins" :D #nodejs #sweet" -- Henrik Johansson. http://twitter.com/dahankzter/status/16308315560 [14:07] _announcer: Twitter: "Tteta nude.js node.js a wrong many times I googled it" [ja] -- liquidfunc. http://twitter.com/liquidfunc/status/16308592128 [14:08] caolanm: ^ charity calendar idea? ;) [14:11] Aikar: caolanm: either quick polling or tapping into the twitter streaming API mixed in with an IRC client will give you what _announcer is doing [14:11] Aikar: stream api would be the most instant [14:11] Aikar: writing an irc bot connection is really trivial too [14:11] micheil: caolanm: it's using the streaming API and a memory mapped "database" [14:12] micheil: of tweets [14:12] micheil: so if people start retweeting stuff, in generally doesn't show up [14:12] Aikar: oh heh why doesnt it just do stream api with an irc connection? [14:12] zaach has joined the channel [14:13] micheil: Aikar: um.. it is using the streaming API from twitter, and it does go to an irc connection, there's just a filter to remove retweets and stuff like that. [14:13] Aikar: or whoever made it trying to follow twitters recommendation about not doing any processing on the streaming thread? [14:13] Aikar: ah [14:13] micheil: Aikar: tip, read what I said ;P [14:13] Aikar: my coworker was trying to be all big about twitters recommendation but tried to tell him thats for people consuming ALOT of tweets. when monitoring a specific subject with low consumption its not an issue [14:13] Aikar: i was typing that at same time you was :p [14:14] micheil: heh heh [14:14] micheil: yeah, tweets @ me about my node.js'ing often come up here first, then in tweetie [14:15] Aikar: sorry if its asked alot - but im new to the nodejs scene and havent started coding anything yet since im active on another project (which i want to rewrite into nodejs but lies the next question), about how close is .2 along? [14:15] micheil: about a month, iirc. [14:16] Aikar: hmm [14:16] micheil: but, really the node API is pretty much stable now. [14:16] micheil: I'm rewriting an app atm in it. [14:16] Aikar: i guess i can continue on for a month then do some convincing to let me rewrite lol [14:16] Yuffster has joined the channel [14:16] micheil: Aikar: if you're just starting the project, convince now., [14:17] micheil: or if there's a lot more to be added then convince now, because in 1 months time, it'll be very hard to just throw away all your work and start again on top of node [14:17] Aikar: atm using PHP... and in order to achieve a faster model, it works with multiple processes with read/write pipes to each other to send 'messages' back and forth to give seperate processing threads with multiple event loops. so node could do it alot more effeciently [14:17] Aikar: nah im a few months in [14:17] Aikar: im writing a WebSocket game server, so mainly right now its getting the logic and design in [14:17] micheil: yeah, definitely try and convince now; because node would pretty much do most of your work already for you. [14:18] micheil: as for websockets, I'm an author of a websocket library [14:18] Aikar: sure rewriting will take a bit of time, but at least the complicated parts of logic will be done [14:18] jbrantly has joined the channel [14:18] micheil: so, yeah, feel free to fire questions [14:18] Aikar: have you got support for the new spec? >< cause i cant figure out how to properly do the handshake [14:18] micheil: yup [14:18] micheil: it was fairly easy to implement [14:19] Aikar: can you link to some code? [14:19] micheil: I'm doing a bit of work in a couple of the branches now to push out a probably v1.2.10 [14:19] micheil: sure. [14:19] jbrantly: I know this is a little apples to oranges, but I'm pretty sure I've seen comparisons of node vs nginx for static file serving. Anyone got a link? :) (requests/sec, for instance) [14:19] Aikar: http://codepad.org/OvDEmwDq is what i currently have [14:19] Aikar: (its php yeah but the logic is whats wrong) [14:19] micheil: http://github.com/miksago/node-websocket-server/blob/master/lib/ws/connection.js#L281-319 [14:19] Aikar: the weird thing is, it works SOMETIMES [14:20] technoweenie has joined the channel [14:20] gawker2 has joined the channel [14:20] micheil: Aikar: one thing to note is that you shouldn't be matching on strings, but doing other stuff [14:20] kjeldahl has joined the channel [14:21] micheil: Aikar: easiest way to get the two values are using regex to match numbers and regex to match spaces [14:21] micheil: that's lines 294, 295, 297, 298 [14:21] Aikar: im getting the numbers ok. i think its the 8 bytes at the end thats causing issues [14:22] micheil: yeah, you need them as a raw binary buffer [14:22] micheil: that was one of the hardest bits about the spec [14:22] Aikar: preg_match("/\r\n(........)$/", $req, $challenge) [14:22] Aikar: is where i grab those 8 bytes [14:22] micheil: preg match probably returns strings [14:22] Aikar: and it seems to grab them ok [14:22] micheil: you need it as raw binary, without any encoding [14:22] Aikar: $expected = "" . $ppart1 . "" . $ppart2 . "" . $challenge[1]; [14:23] Aikar: challenge1 will be the result from the regex [14:23] Aikar: then i do a var_dump and it shows 16 bytes [14:23] micheil: man.. php is so ugly with variable names [14:23] Aikar: lol [14:23] Aikar: so it is grabbing 8 bytes [14:23] micheil: try using: [14:23] bpot has joined the channel [14:24] micheil: /\r\n\r\n(.{8})/ [14:24] Aikar: and yeah php is a lil weird when it comes to binary vs strings [14:24] micheil: but regexp's probably will run something like utf8 decode on it [14:24] Aikar: that should be equal to what i have now but yeah that is cleaner to read [14:24] bradleymeck has joined the channel [14:24] Aikar: i wonder if i do 8 seperate captures byte by byte, then pack(1) on each of those in sequence [14:24] micheil: we actually had to patch node to enable the grabbing of that data as a [14:25] micheil: nup [14:25] wilmoore has joined the channel [14:25] admc has joined the channel [14:25] micheil: you'd probably need to just split on \r\n\r\n in php [14:26] micheil: and then get [1] from that, and then convert it to binary some how [14:26] micheil: Aikar: btw, there's a difference between 8 bytes and 8 bits [14:27] micheil: best way to test is probably to fire data at your server using telnet. [14:27] Aikar: i know that, but thats 8 bytes :P [14:28] micheil: 16bytes != 8 bytes. [14:28] Aikar: im also a C++ developer with a good bit of experience in reverse engineering and hooking into a game so i got a good bit of experience with low level data [14:28] Aikar: the "challenge" is 8 bytes, + 4 bytes from key 1 + 4 bytes from key 2 [14:28] Aikar: well, key1 + key2 + challenge [14:29] Aikar: you get 16 bytes, then take the md5 sum of that to get new 16 bytes [14:29] _announcer: Twitter: "Best tool for protocol hacking? Telnet & Openssl s_client. #protocols #nodejs" -- Micheil Smith. http://twitter.com/miksago/status/16310156347 [14:29] micheil: ah [14:29] micheil: yeah, I'm not sure if you want to do string concat on those [14:30] Aikar: php doesnt really have many binary type tools, it seems to retain the binary data if its done with pack though [14:30] Aikar: so i used the "" to make sure it doesnt try to ADD the numbers [14:30] Aikar: the resulting string was 16 bytes so it looks right [14:30] _announcer: Twitter: "@markwunsch Oh, awesome stuff! (Does that mean you'll start playing with node.js? :P)" -- Micheil Smith. http://twitter.com/miksago/status/16310250668 [14:33] micheil: Aikar: I'm not sure if there's a guarantee that key1 & key2 will actually be sizeof X [14:33] micheil: I think they actually vary in length [14:34] micheil: it's just "The value of the "Sec-WebSocket-Key1" field in the client's handshake." [14:34] Aikar: no, the spec for 76 expcitly defines key1 and key2 to be set as big endian 32bit [14:34] micheil: see http://www.whatwg.org/specs/web-apps/current-work/complete.html?slow-browser=1#network [14:35] Aikar: so even 1 will be 0x00 0x00 0x00 0x01 [14:35] Aikar: even 1 still uses 4 bytes [14:36] Aikar: you used pack in your code is what renders it as 4 bytes [14:36] micheil: hmm.. fair enough [14:36] nsm has joined the channel [14:36] micheil: all I'm saying is that the data can vary. [14:37] Aikar: yeah but your "digest input data" should always be 16 bytes (as the spec says), 4 from the #s/spaces of 1, 4 from #s/spaces of 2, + the exact 8 bytes at the end of the request "challenge" [14:37] Aikar: then digest that data to get a new 16 bytes [14:38] micheil: hmm. [14:38] micheil: okay then [14:38] stevendavie has joined the channel [14:38] jmar777 has joined the channel [14:39] micheil: do you think you could actually be adding in extra bytes there? [14:39] micheil: actually, found the issue [14:39] micheil: line 14. [14:39] micheil: I came across this when writing the node server for websockets [14:39] Aikar: fixed it i think.... [14:39] SubStack: http.Server.listen should return this so I can write this inline without intermediate state [14:39] micheil: basically the client may also attach an extra byte [14:39] Aikar: its something wit hthe regex [14:40] micheil: so by strictly match the $ end of the $req, you're not ever matching [14:40] Aikar: i did $challenge = substr($request, -8); [14:40] micheil: yeah [14:40] micheil: that's the better way to do it, I'd say. [14:40] Aikar: to get the last 8 bytes [14:40] _announcer: Twitter: "anyone know a strategy in node.js to get more then one twitter stream going at once; but then same credentials many streams could be bad" -- richard hooker. http://twitter.com/hookercookerman/status/16310956071 [14:40] Aikar: if the regex didnt match the "76 spec" wouldnt of been triggered in that code, but it always was [14:40] micheil: you could also use: /\r\n\r\n(........)/ [14:40] Aikar: just the md5 wasnt matching up properly [14:41] Aikar: like you said the regex funcs prolly do some decoding on it [14:41] micheil: yup [14:41] micheil: anyway, must get back to work.. [14:41] bradleymeck: mmm is there a way to test if a module is installed? [14:41] Aikar: im still using the regex to verify the data is valid, but this is working [14:41] Aikar: preg_match("/\r\n.{8}$/", $req) [14:41] Aikar: ) [14:41] Aikar: { [14:41] Aikar: $challenge = substr($req, -8); [14:42] Aikar: bah sorry the 2 extra lines pasted like that [14:42] Aikar: thought it was only 2 [14:42] micheil: heh [14:42] micheil: there's no real need to check if it's "valid" [14:42] Aikar: chromiums connecting every time now [14:42] Aikar: im still supporting pre 76 spec [14:42] micheil: you just need to check for an existence of anything after \r\n\r\n [14:42] Aikar: so this is inside an if statement to see if person is connecting with 76 [14:42] Aikar: chrome 4 and 5 dont use the 7 spec [14:43] micheil: and as for pre-76 support, you just check for sec1 and sec2 [14:43] Aikar: true [14:43] micheil: you don't need to check for the data. [14:43] micheil: which makes things a fair bit simplier [14:44] _announcer: Twitter: "how I miss ruby syntax when I am node.js ing; its like nesting hell sometimes; "mongose" looks good for mongodb thou; uses promises thou;" -- richard hooker. http://twitter.com/hookercookerman/status/16311248107 [14:45] steadicat has joined the channel [14:46] _announcer: Twitter: "@miksago I sure will! Love the attitude! #goodstuff #nodejs" -- Henrik Johansson. http://twitter.com/dahankzter/status/16311348306 [14:46] Aikar: heh, i love me some C style syntax ;) [14:46] Aikar: being a PHP JS and C++ dev... yeah i cant stand other syntaxes ;( [14:46] mitkok has joined the channel [14:47] micheil: nawh, nesting can be hell. [14:48] Aikar: it can be yea, but i see alot of people using closures/lampdas to hell nesting into each other, can simply define the function outside of the nest and reference it inside ;) [14:48] Aikar: lol i said lamp... [14:48] AndChat has joined the channel [14:49] micheil: Aikar: that php seriously isn't good for yo' health :P [14:49] micheil: what was it? "It's ugly, but it does get shit done" [14:49] SubStack: I miss haskell sugar [14:49] SubStack: do > fluent [14:50] AndChat: Mmm sugar [14:50] SubStack: monads are a great way to do async i/o in a sequential way [14:50] Aikar: micheil: php does have ALOT of inconsistencies, but it is a decent language. its just tainted by the fact that MOST php devs DO suck at coding and write horrible code [14:50] Aikar: but there are a few of us out there that right good PHP code :P [14:51] SubStack: Aikar: disagree [14:51] Aikar: cept those are generally programming hobbyist like myself :3 [14:51] Aikar: you disagree that theres any good php devs lol? [14:51] JimBastard has joined the channel [14:51] SubStack: no, php is not a decent language [14:52] Aikar: it suits its purposew [14:52] SubStack: poor abstractions, polluted namespaces, inconsistent calling semantics [14:52] creationix: Its about as decent as English [14:52] JimBastard: +2 SubStack [14:52] JimBastard: worst API ever [14:52] JimBastard: thankfully i've never had to build a Personal Home Page, so I've never needed to use PHP. #bastardfacts [14:53] jetienne: best docs ever tho :) [14:53] JimBastard: the comments on the PHP docs are like epic [14:54] JimBastard: blind leading the blind, worse then stackoverflow [14:54] softdrink has joined the channel [14:54] creationix: As one who did PHP for about 10 years, I can vouch for it [14:54] creationix: It will drive you insane [14:54] creationix: :) [14:55] micheil: creationix can tell you, he's seen the light.. THE LIGHT... [14:55] JimBastard: yeah i did CF, way more sane, but you get way more gruff [14:55] JimBastard: people assume all CF developers are retards [14:55] jedschmidt has joined the channel [14:55] creationix: But it does work for small stuff [14:55] JimBastard: which we are in all fairness [14:55] micheil: ACTION did javascript :F [14:55] SubStack: templating engines shouldn't be capable of i/o [14:55] JimBastard: i mean fuck, ive been doing JS for 10 years [14:55] SubStack: as php demonstrates [14:55] JimBastard: it just didnt count for the first 6 [14:56] ryan_gahl: CF!!!!! hahahahahahahahahahhahahah [14:56] SubStack: ACTION started doing javascript 10 years ago when he was 12 :/ [14:56] sveimac has joined the channel [14:56] creationix: JS as a language is almost as warty as PHP [14:57] JimBastard: CF is a great example of how to build a good API [14:57] micheil: SubStack: was that alert()ing to welcome a user to the site? :P [14:57] JimBastard: the CF tags are pretty well thought out [14:57] ryan_gahl: CF is a fucking joke [14:57] SubStack: micheil: ? [14:57] micheil: actually, no, 10 years.. that makes 2000, doesn't it. :P [14:57] creationix: But we've just been taught tim ignore the bad parts [14:57] JimBastard: ryan_gahl: ive made systems that handle hundreds of thousands of dollars of daily transactions using CF [14:57] ryan_gahl: so that makes you good at using a fucking joke to build shit [14:57] JimBastard: millions of dollars of montly revenue is not a joke [14:57] JimBastard: lol [14:57] jetienne: cf=? [14:58] JimBastard: coldfusion [14:58] Aikar: cf syntax is so horrible [14:58] JimBastard: a tag based markup language for Java [14:58] JimBastard: its a J2EE app [14:58] JimBastard: also can be standalone [14:58] SubStack: JS warts are pretty well confined to DOM manipulation thankfully [14:58] creationix: A tool is a tool [14:58] micheil: there's also wtf js [14:58] SubStack: although arguments annoys me [14:58] micheil: 3 > 2 > 1 FTW [14:58] ryan_gahl: 42 [14:58] SubStack: be a list, stupid thing! [14:59] creationix: False [14:59] creationix: Micheil ^ [14:59] micheil: creationix: yah, you were in that talk at txjs [14:59] micheil: creationix: nice phone btw. [15:00] creationix: I'm trying to type on this beast [15:00] quirkey_ has joined the channel [15:00] micheil: creationix: that was you in the front row, who he asked for the phone, yeah? [15:00] JimBastard: quirkey time [15:00] micheil: oooh.. it's a quirkey [15:00] JimBastard: ! [15:00] creationix: Yep [15:00] JimBastard: yaaaa [15:00] SubStack: oh and I hate how it's so non-trivial to do a fold over an object's elements [15:00] JimBastard: baaaaaaacon [15:00] micheil: creationix: haha [15:01] creationix: Tom and I had been hanging out all week in Sweden [15:01] micheil: ah, cool [15:02] micheil: that's the one good thing I can see could be gained from working for a larger company.. the travel costs are generally paid for. [15:02] kevwil has joined the channel [15:02] phiggins has joined the channel [15:03] micheil: oh, here we go, Mr Dojo. [15:03] micheil: phiggins: howdy' [15:03] phiggins: hola [15:04] micheil: how's you? [15:04] lukev: hey folks, are there docs on how I'd go about writing a library / module for nodejs? [15:04] phiggins: on day 4 of quitting smoking. [15:04] lukev: For e.g. say I wanted to write a twitter client library [15:04] lukev: phiggins: well done, best thing I ever did [15:04] micheil: phiggins: hopefully it's going well? [15:05] micheil: lukev: just start writing. [15:05] phiggins: much better than expected actually. I skipped putting a patch on today and haven't been craving anything really. [15:05] micheil: lukev: there is a general structure though, have a look on the modules page to see it. [15:05] lukev: micheil: hehe ok cool [15:05] micheil: lukev: generally your module code will be in /lib/ [15:05] micheil: tests, /test/ [15:05] micheil: make sure you have a package.json [15:06] micheil: and.. uh, bin / executables are generally in /bin/ [15:06] creationix: lukev: see the article on howtonode.org [15:06] lukev: micheil: thanks! [15:06] sanderjd has joined the channel [15:06] lukev: micheil: where is the modules page? [15:06] micheil: and read that article on howtonode.org [15:06] lukev: micheil: thanks! [15:06] micheil: http://wiki.github.com/ry/node/modules [15:07] lukev: super-thanks! [15:07] creationix: I wish I had internet [15:08] creationix: At least my nexus has edge [15:08] micheil: creationix: why the lack of nets? [15:08] slaskis: anyone uses the spectacular test module? [15:08] creationix: I'm at my old house in Texas cleaning up [15:09] creationix: We shut off the internet when we moved [15:09] micheil: creationix: ah, okay [15:09] micheil: creationix: what about getting a roaming connection? [15:10] creationix: Hardware costs [15:11] micheil: ah, okay [15:11] micheil: normally the roaming connections are only about 50-100$ [15:13] Aikar: wifi tethering with sprint htc evo is 30$ [15:13] dwww has joined the channel [15:14] o_o has joined the channel [15:14] stepheneb has joined the channel [15:15] micheil: anyone want to add live search to the api docs? :S [15:15] slaskis: micheil: cmd-f works great for me :P [15:15] creationix: Most browsers have it [15:15] micheil: slaskis: yeah, true.. but, eh. [15:16] mw_ has joined the channel [15:16] micheil: I'm meaning more like just search the API methods, not the descriptions [15:16] kevwil_ has joined the channel [15:16] ly- has joined the channel [15:18] pgriess: micheil: so i've got a kinda-sorta-working ws client based on a fork of node-websocket-server [15:18] pgriess: micheil: having problems getting the client to shut down. was hoping you could hlep [15:18] micheil: oh, sweet [15:18] pgriess: (code is here http://github.com/pgriess/node-websocket-server) [15:18] micheil: but you probably don't need all the stuff from my server [15:18] JimBastard: umm wtf is up with firebug [15:18] pgriess: micheil: no, i don't need all that code (mainly I just need the parser). but i figured it would make sense to roll a client impl w/ the server [15:19] micheil: pgriess: man.. I've gotta remember what the client spec is now.. spent so much time reading the server spec [15:19] JimBastard: why is it breaking when my try catch fails? [15:19] JimBastard: is that normal? [15:19] JimBastard: try{ var model = views[state].model();} catch(err){ console.log('no model for this view');} [15:19] micheil: could you link me to the spec docs? [15:19] JimBastard: that causes the page to stop and a break to happen [15:19] JimBastard: is that a new firebug setting? [15:19] micheil: JimBastard: no idea. [15:19] pgriess: micheil: JS api: http://dev.w3.org/html5/websockets/ [15:19] slaskis: JimBastard: did you turn on break on everything? [15:19] JimBastard: i updated, maybe its a default setting [15:19] micheil: JimBastard: probably ask on the firebug mailing list [15:19] JimBastard: checking [15:19] pgriess: micheil: protocol: http://www.whatwg.org/specs/web-socket-protocol/ [15:19] lukev has joined the channel [15:20] micheil: pgriess: this is only a 76+ client, yeah? [15:20] pgriess: micheil: y [15:20] Aikar: that doc is not as friendly as the other "working draft" [15:20] slaskis: JimBastard: I've noticed it even catches/fails on caught exceptions when that thing is turned on (the pause button in the console tab) [15:20] JimBastard: yeah slaskis , when i reset to default its fine [15:20] pgriess: micheil: oh. heh. i missed that whole "closing the connection" section [15:20] JimBastard: thanks [15:20] pgriess: micheil: that might be relevant [15:20] slaskis: JimBastard: np :) [15:20] micheil: pgriess: ah, yeah [15:20] JimBastard: was a little confusing, i tend to abuse try catch a lot [15:20] micheil: \u0000\uffff [15:21] Aikar: pgriess: http://www.whatwg.org/specs/web-apps/current-work/complete/network.html#client-side-requirements [15:21] JimBastard: im pretty bad at JS [15:21] micheil: Aikar: you'll kill people throwing that about! [15:21] Aikar: that ones formatted better [15:21] Aikar: lol ? [15:21] micheil: Aikar: I was looking for the light weight copies anyway [15:21] _announcer: Twitter: "Finally got to watch @ryah "Introduction to Node.JS" (http://bit.ly/cTAtll) last night. Wow. Impressive. #I'mNotSmartEnough" -- Matt Childs. http://twitter.com/MattyinAK/status/16314015281 [15:21] micheil: Aikar: those are really heavy on cpu + ram. [15:21] micheil: Aikar: so, a slight hyperbole in saying you'll kill people, but you get the point [15:22] pgriess: micheil: i was confused why closing the stream on my end wasn't terminating the TCP stream, but maybe this explains it. is your impl waiting for the closing handshake before dropping the TCP connection? [15:22] micheil: generally [15:22] pgriess: micheil: a tcpdump reveals that the server is not sending its own FIN [15:22] Aikar: the one you linked yeah did kill my browser [15:22] Aikar: but the one i linked doesnt [15:22] micheil: oh? [15:23] Aikar: when you linked me earlier my browser crashed/hung lol [15:23] Aikar: but this doc i linked hasnt ever hung me [15:23] micheil: Aikar: it was the #whatwg guys that linked me to the ?slow-browser=true variant [15:23] Aikar: you had some slow-browser=1 in your url [15:23] micheil: blame them :P [15:23] Aikar: odly that one hung me and the non url doesnt lol [15:24] slaskis: i'm using spectacular for testing, and have an assertNotRaise(function(){ async(function(err,data){ if( err ) throw err; sys.puts( data )}) }) thing in an it() method. But for some reason it fails on the throw err; without actually throwing the exception or spectacular should have caught it? instead i just get undefined:43 (where 43 is the line number) [15:25] pgriess: micheil: oh, nm. sigh. was inadvertantly using 1.1; 1.2 seems to have fixed this problem. [15:25] micheil: 1.1 vs 1.2? [15:26] micheil: as in v1.2.00 vs v1.1.00? [15:26] pgriess: yeah [15:26] micheil: k, that was when I introduce the new linked list connections manager [15:26] pgriess: cool [15:26] micheil: seriously, you seen that code? [15:26] zomgbie has joined the channel [15:26] micheil: it's so epically simple really. [15:26] pgriess: micheil: no, is that in manager.js? [15:26] micheil: yeah [15:27] pgriess: micheil: yeah, i saw that. what exactly is it trying to do? [15:27] micheil: pgriess: could you actually do a subtree split on the client code? [15:27] micheil: pgriess: it uses a linked list to better handle clients [15:28] micheil: pgriess: so, rather then explicitly "delete client;" it's just unref'ing and letting v8 GC it [15:28] pgriess: micheil: what do you mean by a subtree split? do you want the client code in a ws/client/ dir or something? [15:28] micheil: pgriess: different repo preferrably [15:28] micheil: I tried once before combining server+client, it got messy when devs wanted different things. [15:28] micheil: especially when you know more about client vs server or server vs client. [15:29] pgriess: micheil: ok so yeah, that's the next question. do you care about this client at all? if not, i'll just dump it in its own repo. i just thought it made sense to share code, since draft76 handshaking and framing, etc is all common [15:29] pgriess: micheil: i'm fine moving the client to its own repo. but we should come up w/ a way to share impl details [15:29] micheil: pgriess: well, really, like I said, I'll work on both the client and server, but I'd like to see them stay separate. [15:29] tmpvar has joined the channel [15:29] tmpvar: yo [15:29] micheil: ho' [15:30] pgriess: micheil: so ... totally separate? like, duplicated implementations of draft76 handshaking and framing? [15:30] micheil: well, it doesn't matter too much [15:30] micheil: because the handshaking is different enough to warrant it [15:30] micheil: one you need to generate, the other you're just reading [15:31] pgriess: micheil: both need to generate signatures [15:31] micheil: and the protocol isn't _that_ complicated that we _need_ to share components [15:31] pgriess: micheil: ok, fine w/ me. i'm a bit surprised, but whatever. [15:32] micheil: looking from a birds eye view, you can see that they are similar, but when it gets down to it, I think they're different enough to warrant separate repos [15:33] pgriess: thanks from licensing your code MIT ;) [15:33] pgriess: er for [15:33] micheil: pgriess: opensource is for learning. [15:33] _announcer: Twitter: "@Ben_Hall Shame on you for mentioning the html5 websockets. Now I'm knee deep in a cygwin+node.js install to give them a proper go." -- Einar Otto Stangvik. http://twitter.com/einaros/status/16314963025 [15:34] sveilin has joined the channel [15:34] zomgbie has joined the channel [15:34] micheil: pgriess: as far as I'm concerned, all the code I write is opensource, as once I have the knowledge of things, nothing stops me accidentally reusing that knowledge [15:35] sechrist has joined the channel [15:35] micheil: pgriess: also, I learnt programming through opensource, and I think other should be able to do the same. [15:37] Aikar: same/agreed ;) [15:37] micheil: pgriess: as for splitting the code, check out the subtree branching stuff in the github help.../ [15:37] micheil: http://help.github.com/splitting-a-subpath-to-a-new-repo/ [15:37] Aikar: the only programming books ive read were in college for classes i already knew more than it taught and read just enough to do the assignments [15:38] amerine has joined the channel [15:39] micheil: Aikar: I did it the other way around.. I pretty much got into uni due to my programming knowledge + having an awesome referee on my resume [15:40] micheil: Aikar: that is, university before finishing high school.. [15:40] sechrist: so I have socket.io working with ws and with the flash bridge [15:41] sechrist: does it fall back on xhr? [15:41] sechrist: I disabled flash in firefox (which doesn't have ws) and nothing is happening [15:41] micheil: only if you tell it to us XHR [15:42] sechrist: also does xhr work cross port? [15:43] zomgbie has joined the channel [15:43] sechrist: the service isn't on 80 at the moment but the chat app is [15:43] sechrist: that'd make sense [15:43] sechrist: ah xhr is same port [15:44] micheil: yeah [15:45] micheil: you'll need to use script long-polling for cross-domain [15:45] sechrist: teh jsonpz [15:46] sechrist: seems like that's the only transport method that socket.io doesn't have [15:46] sechrist: