[00:02] maqr: what's the recommended way to install modules? i see there's like 4 different package management things... but i'm fine just pulling from git, if i knew where to put them [00:02] mape: maqr: npm [00:02] satori: ~/.node_libraries [00:02] maqr: mape: can i use that to get masters from github? [00:02] mape: no [00:02] mape: only the ones added [00:03] maqr: ah... if i want stuff from github, i just pull it into ~/.node_libraries/ then? [00:03] mape: yeah [00:09] sechrist has joined the channel [00:10] maqr: does it have to be told to look in ~/.node_libraries somehow? [00:10] mape: not it does that automaticly [00:10] mape: *no [00:10] mape: but you might have to do var thing = require('node-thing/lib/thing') [00:11] sechrist has joined the channel [00:11] tmedema: Hi folks. How does one set the timeout for a httpClient? Eg. when it fails to connect for x seconds [00:11] maqr: mape: oh, yeah, that's what it is [00:11] satori: you can also set your own module paths to look in with require.path.push(PATH); [00:11] aliem has joined the channel [00:12] mscdex: micheil: ping [00:13] maqr: heh, now it whines about dependencies that it can't find (which it came with in vendor/)... i suspect i've installed it wrong somehow [00:13] mape: maqr: what are you installing? [00:13] satori: Do you have to init subsmodules in git or something first? [00:14] jesusabdullah: ACTION is also curious [00:14] maqr: mape: http://github.com/kyleslattery/node-xml2object [00:14] maqr: satori: i'm not sure, this directory structure looks a bit different from other modules i've looked at [00:14] mape: how does the require look? [00:14] jesusabdullah: did you do the git submodules action? [00:14] satori: That proj does have submodules..... does git automatically pull them too when u pull the main proj? [00:14] maqr: mape: var xml2object = require('node-xml2object/lib/xml2object'); [00:15] mape: think you can do -r or something to do, otherwise you have to do it manually [00:15] maqr: i'm not sure on the submodules thing... they're in the directory, if that counts? [00:15] jesusabdullah: I don't think so, satori. In the past, I've had to git submodule init or some such [00:15] mape: yeah [00:15] maqr: that is, .node_libraries/node-xml2object/vendor/ does exist [00:15] satori: ahh. it does then [00:15] jesusabdullah: What's IN it? [00:15] mape: but its empty? [00:15] jesusabdullah: aha! [00:15] jesusabdullah: Yes, you have to get the submodules [00:15] maqr: mape: oh wow, so it does [00:15] maqr: mape: err, so it is :) [00:16] maqr: mape: the two subdirecetories (node-xml and ntest) are there, but they're empty [00:16] jesusabdullah: maqr: try "git submodule init" [00:16] mape: yeah so initiate the submodules [00:16] satori: then git submodule update [00:16] maqr: jesusabdullah: from ~/.node_libraries/node-xml2object? [00:16] jesusabdullah: Yeah [00:17] maqr: well, that was some black magick [00:17] jesusabdullah: Indeed, crazy stuff [00:17] maqr: it sure works now though... what did i do, exactly? [00:17] satori: ACTION is a novice in the black arts of git [00:17] jesusabdullah: Submodules are, well [00:17] maqr: jesusabdullah: it seemed like git knew about these submodules that were required, and it made a spot for them, and apparently new their git-address or whatever... and it didn't pull them in on the clone? [00:18] jesusabdullah: submodules :P Basically, the idea is that if you have a big project split into a lot of small repos, an umbrella repo can have these links to the other smaller repos [00:18] JimBastard: maqr: [00:18] JimBastard: git submodule update --init [00:18] jesusabdullah: so when you mash "git submodule init" it looks at the file named .gitmodules [00:18] JimBastard: did you run that? [00:18] jesusabdullah: or whatever it's called [00:18] maqr: JimBastard: yeah, it worked just fine, but my mind is a little bit blown :) [00:19] jesusabdullah: which has a list of all the other git repos and where they need to go [00:19] jesusabdullah: and grabs them all [00:19] maqr: jesusabdullah: that makes sense enough on the server side, but clone doesn't automatically pull in the modules? [00:19] JimBastard: maqr: not submodules [00:19] jesusabdullah: Apparently not [00:19] maqr: i wonder why [00:20] maqr: oh, the docs say you can clone '--recursive' [00:20] jesusabdullah: Probably so you don't have to grab every submodule if you don't want to [00:20] Wandrewvious has joined the channel [00:20] mape: yeah [00:20] jesusabdullah: Choice and all that [00:20] maqr: i guess that does it, not sure why it's not the default though [00:20] jesusabdullah: I mean, some projects can be huge [00:20] jesusabdullah: and have optional submodules [00:20] maqr: yeah, that makes sense, actually [00:20] JimBastard: maqr: because they are submodules, ask #git if you want [00:20] jesusabdullah: The weird thing to me is how I've seen it being used as some sort of fake package mangement [00:20] JimBastard: git submodules actually suck ass, really hard [00:20] jesusabdullah: It's sub-ideal [00:21] maqr: jesusabdullah: that's what i just saw, i think, but it works now that i know about it... from now on i'll just "--recursive" on my clones [00:21] JimBastard: i usually do something like http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb [00:21] jesusabdullah: maqr: Most repos don't use submodules [00:21] JimBastard: ive only had issues with submodules, they've never really helped [00:22] jesusabdullah: Huh, that's not a bad idea! [00:22] jesusabdullah: I've actually done that, not meaning to [00:22] jesusabdullah: sort of [00:22] JimBastard: jesusabdullah: felix's blog post? [00:22] jesusabdullah: well, kind of [00:22] jesusabdullah: but yeah, the blog post [00:22] JimBastard: yeah, it works pretty well [00:22] zapnap has joined the channel [00:23] CIA-76: node: 03Сергей Крыжановский 07master * r078a48a 10/ (2 files in 2 dirs): added env to child_process.exec - http://bit.ly/cHzuBY [00:23] jesusabdullah: I didn't track the folder, but organizationally I did something similar [00:23] jesusabdullah: so, really, I didn't do it at all, but [00:23] jesusabdullah: I totally could've ;) [00:23] Gruni has joined the channel [00:24] pkrumins: does anyone know how important is the 'drain' event? [00:24] pkrumins: one of my networking components is failing constantly [00:24] pkrumins: and i can't see what is going on, i can only think of 'drain' since i don't implement it. [00:25] TommyM has left the channel [00:25] dnolen has joined the channel [00:26] satori: pkrumins: Drain is causing your app to fail?? [00:26] pkrumins: *something* is going on. [00:27] satori: What does you module do? Have an error stack? [00:27] pkrumins: i don't know what drain is, so i am asking if it by any chance could be the problem [00:27] satori: drain is just an event to let you know when the write buffers have been sent on the wire and it's ok to fill them again [00:27] maqr: do i need to worry about 'chunk' size in http.ClientResponse's data event? should i ever expect more than one 'chunk' as a response? [00:27] pkrumins: it connects to vnc server, then sends the vnc server some data, such as the screen region it wants to receive updates from, and then sits in a forever() loop getting those updates [00:28] pkrumins: what happens is it fails with `Error: ECONNRESET, Connection reset by peer` [00:28] pkrumins: or [00:29] pkrumins: Error: Stream is not writable [00:29] satori: That indicates that your host has disconnected you [00:29] pkrumins: I can't see why it would do that! [00:29] pkrumins: Cause it works with other software that implement the same protocol! [00:29] satori: maqr: you need to buffer responses. Can't be sure that a response will be a single chunk [00:29] tilgovi has joined the channel [00:30] pkrumins: and what about the 2nd error, about stream not writable [00:30] pkrumins: could it be drain related? [00:30] satori: ECONNRESET and stream not writeable both indicate your host has closed the tcp connection [00:30] pkrumins: that is just crazy! [00:30] pkrumins: ACTION trying to figure out why it would do that. [00:30] satori: do you control the server? have access to logs? [00:31] pkrumins: i do control! [00:31] pkrumins: ACTION into access logs [00:31] pkrumins: forgot about those [00:31] pkrumins: (if there are such) [00:31] pkrumins: using tightvnc's server for the server. [00:31] maqr: satori: how's that go, exactly? i'm trying to make a request for an xml file... it should either send it or not? do you mean it could somehow send it in multiple pieces? or it might fill up some buffer that makes it too large for node.js to process in one 'chunk'? [00:32] pkrumins: here it is [00:32] pkrumins: 'enable logging' [00:32] satori: maqr: That's the way packets work. [00:33] softdrink has joined the channel [00:33] maqr: satori: so i'm supposed to concat all the chunks together until i get an 'end' event? then process? [00:34] satori: yup. or process it as it arrives. [00:34] satori: I believe the sax parsing can do that (s it arrives) [00:34] Kiba` has joined the channel [00:34] maqr: satori: oh, that makes sense [00:34] maqr: satori: yeah, one of the parsers does that... but i don't understand either of them well enough to use them, so i'm just going to wait for it all to come in and convert it to a javascript object [00:35] satori: It's worth learning about, as that is one of node strengths. if you are always processing streams and not buffering you can handle a massive amount of concurrent connections with minimal mem usage [00:36] maqr: satori: yeah, you're right, i'll do that [00:38] maqr: btw, are there any plans for type-checking? or is that inherently against nodejs philosophy? [00:38] satori: What do you mean by type checking? javascript doesn't have explicitly types vars [00:39] satori: *typed [00:39] maqr: satori: not yet, but i've been looking at google's closure project, and apparently they came up with some javadoc based system for doing it [00:39] jherdman has joined the channel [00:39] maqr: satori: the google i/o lecture on the topic suggested that people are trying to add type-checking, so i thought maybe there was something happening with that [00:40] satori: actionscript (flash) is basically javascript with types [00:40] JimBastard has joined the channel [00:40] maqr: yeah, something like that seems like it would translate really well to node [00:40] SubStack: type inference <3 [00:42] agnat has joined the channel [00:51] mikeal has joined the channel [00:52] tmedema: Q: how does one listen to a httpClient request timeout? [00:54] mikeal: tmedema: it's not on the request [00:54] mikeal: it's on the client [00:54] mikeal: client.addListener('error', function () {.... [00:54] tmedema: is there a timeout event for the client then? [00:54] mikeal: it's just 'error' [00:54] tmedema: that event is not mentioned here http://nodejs.org/api.html#http-client-179 [00:55] mikeal: all errors trigger the error event [00:55] mikeal: the error passed is the thing that differs [00:55] mikeal: it's because if you don't have a handler on error events they will throw [00:55] tmedema: ah ok [00:57] benburkert has joined the channel [00:57] aheckmann has joined the channel [00:57] lachlanhardy has joined the channel [01:00] tmedema: mikeal: you sure its httpclient that fires that event? because it doesnt have an addListener method [01:00] mikeal: var client = http.createClient(); [01:00] mikeal: client.addListener [01:01] ryah: mape: what's up [01:01] tmedema: yea not mentioned in the docs but I guess its there anyway [01:01] mape: ryah: Just wanted to ping you on the compile error on linux but you fixed it :) [01:02] mape: Or well mjr_ [01:02] cpojer has joined the channel [01:03] cpojer has left the channel [01:03] ryah: konobi: socket io is not in a thread pool. [01:04] ryah: mape: oh okay [01:07] sh1mmer: anyone know why pcap wouldn't find pcap.h during install [01:07] mape: it isn't there/path is wrong? [01:07] sh1mmer: I definitely have lib pcap installed [01:08] jxson has joined the channel [01:10] franksalim: sh1mmer, do you have libpcap-dev? [01:11] sh1mmer: franksalim: I assume so, I can find the header files in the system [01:11] sh1mmer: it's a mac [01:11] satori: If the header exists then it has to be an include path problem [01:11] sh1mmer: that's what I figured but I know mjr_ runs a mac [01:13] sh1mmer: where do node-waf install files live? [01:15] satori: on my system it's /usr/local/bin/ [01:16] sh1mmer: I mean where do build/make files live [01:16] sh1mmer: I'm trying to find the definition [01:16] sh1mmer: so I can figure out the paths [01:17] satori: wscript os the file that should contain that infp [01:17] satori: *is [01:17] satori: *info [01:17] satori: ACTION can't type today [01:17] sh1mmer: thanks [01:21] micheil: mscdex: pong [01:21] micheil: ... talk about latency. [01:27] statim has joined the channel [01:27] derferman has joined the channel [01:27] Dmitry2 has joined the channel [01:29] bmizerany has joined the channel [01:33] steadicat has joined the channel [01:33] victorstan has joined the channel [01:35] victorstan: What do you guys use to edit your js apps? [01:36] Gruni has joined the channel [01:37] camilo_ has joined the channel [01:37] aliem_ has joined the channel [01:38] mape: textmate [01:45] Validatorian has joined the channel [01:49] Yuffster has joined the channel [01:49] victorstan: me too... [01:50] victorstan: is there such a thing as breakpoints and refactoring in js app dev? [01:50] victorstan: or are most people making really small apps? [01:54] SamuraiJack has joined the channel [01:56] hober: what's the node equiv. of the python "if __NAME__ == '__MAIN__':" idiom? [02:00] mscdex: micheil: in the draft 76 handshaking section, 'res' should be 'data' when appending if a protocol header was found [02:00] CIA-76: node: 03Ryan Dahl 07master * rdcd41ca 10/ (36 files in 10 dirs): Upgrade V8 to 2.3.0 - http://bit.ly/c3e0Mj [02:00] Kiba`: my networked tetris game is almost complete! [02:01] hober: if (__filename == process.argv[1]) {...} seems ugly [02:01] ryah: ^--- Object.seal [02:01] ryah: yey [02:01] mscdex: awesome! [02:02] micheil: ryah: I'm still not sure why I'd want to use object.seal [02:02] Kiba`: and the client is in canvas and stuff [02:02] Kiba`: however! It is only single player right now. [02:02] ryah: me either [02:02] ryah: but it sounds cool [02:02] Kiba`: ACTION merely port the game logic to a server [02:02] micheil: mscdex: good catch [02:02] micheil: mscdex: It'll be fixed in next version [02:02] micheil: mscdex: do you wish to create the patch for that small change? [02:07] isaacs has joined the channel [02:07] pquerna: iits too bad thre isn't a gstreamer binding for nodejs :) [02:07] isaacs has left the channel [02:11] stream has joined the channel [02:13] maqr: this talk that ryan dahl gave is really good [02:16] jashkenas has joined the channel [02:16] victorstan: assert:80 [02:16] victorstan: throw new assert.AssertionError({ [02:16] victorstan: just updated nodejs [02:16] victorstan: and ran the tests [02:17] victorstan: ive seen this error in one of my previous app yesterday [02:17] victorstan: what does it mean? that im not declarin a function before i call it? [02:17] hober has joined the channel [02:18] JimBastard: !translate English:Spanish I want tacos please. [02:18] _utility: Quiero tacos por favor. [02:19] maqr: does the bot run node? :P [02:19] aheckmann has joined the channel [02:21] jashkenas: !translate Spanish:English interferencia destructiva se hace referencia a una superposición de dos o más http://es.wikipedia.org/wiki/Onda_(f%C3%ADsica) de http://es.wikipedia.org/wiki/Frecuencia idéntica o similar que, al interferirse crean un nuevo patrón de ondas de menor http://es.wikipedia.org/wiki/Intensidad_de_sonido (http://es.wikipedia.org/wiki/Amplitud_(sonido)) en un punto llamado nodo. [02:21] _utility: destructive interference refers to a superposition of two or more http://es.wikipedia.org/wiki/Onda_ (f% C3% ADsica) of identical or similar http://es.wikipedia.org/wiki/Frecuencia , to interfere create a new pattern of smaller waves http://es.wikipedia.org/wiki/Intensidad_de_sonido (http://es.wikipedia.org/wiki/Amplitud_ (sound)) at a point called node. [02:21] JimBastard: yeah maqr it runs utility and translate.js and some other stuff [02:21] JimBastard: its all on github [02:22] JimBastard: http://github.com/bmeck/_utility [02:22] maqr: neat! [02:22] JimBastard: http://github.com/marak/translate.js [02:22] JimBastard: it also does twitter crap [02:24] maqr: i thnk ryan just called me an 'every day user', because i don't know how to use twisted on python :/ [02:24] mikeal: JimBastard: you wrote that jquery.couch.js post forever ago didn't you? [02:26] Kiba`: date [02:26] Kiba`: whoops [02:26] Kiba`: wrong emacs frame [02:26] mikeal: stop soliciting for tricks :) [02:26] mikeal: #node.js is a no prostitution zone [02:26] Kiba`: who? [02:27] mikeal: it was a joke [02:27] mikeal: date [02:27] mikeal: "want a date" [02:27] mikeal: get it [02:27] mikeal: ok….. bad joke :P [02:27] JimBastard: mikeal: hi [02:27] JimBastard: mikeal: fisher price my first blog post [02:27] JimBastard: i fucking hate my blog, im working on killing it [02:28] mikeal: i've been saying that for 2 years [02:28] mikeal: i happened upon it [02:28] mikeal: i remember reading it forever ago [02:29] mikeal: and then today i was like "what! marak wrote this!" [02:29] callen: JimBastard: /etc/rc.d/httpd stop; rm -rf /var/www/ [02:30] JimBastard: hax [02:30] callen: JimBastard: use the new blog as an excuse to fiddle with something new. [02:30] JimBastard: http://github.com/creationix/wheat [02:31] charlenopires has joined the channel [02:31] steadicat has joined the channel [02:31] mscdex: micheil: nah, it's such a small change [02:31] micheil: mscdex: okay [02:31] micheil: mscdex: in which case, next version shall have the patch applied. [02:32] mscdex: cool [02:32] callen: there are tons of git repo/text file hierarchy -> blog generators, hahaha. :) [02:32] micheil: (my local repo is at a half-way state, as I'm implementing a simple per client data store) [02:32] callen: JimBastard: hadn't heard of that one yet. I guess when I think 'new thing' I think more like new database backend // language. [02:32] mscdex: websockets work in grappler now \o/ [02:32] micheil: mscdex: grappler? [02:32] derferman has joined the channel [02:34] mscdex: micheil: http://github.com/mscdex/grappler [02:34] mscdex: :-D [02:34] micheil: express 1.X also looks hot [02:35] voodootikigod_ has joined the channel [02:35] micheil: mscdex: hanging http connections? [02:35] mscdex: aka "comet" connections [02:35] micheil: ah [02:35] mscdex: but i don't like using that term much [02:35] jashkenas has left the channel [02:36] micheil: mscdex: hmm.. well, any rate: next versions of node-websocket-server will feature: [02:36] micheil: - better origin and subprotocol checking [02:37] micheil: - new api for storing simple data per client [02:37] micheil: - new api for exposing other events in servers, so that we can get a form of plugin api going [02:38] voodootikigod_: any of the sencha crew up in here [02:38] micheil: that plugin api will allow you to write something like: wsServer.use(comet) [02:38] voodootikigod_: trying to find out where you shoved connect repo [02:38] voodootikigod_: it appears to have disappeared [02:38] micheil: senchalabs/connect [02:38] micheil: tim had a tweet about it earlier today [02:38] voodootikigod_: ok [02:39] micheil: mscdex: sound good to you? [02:39] JimBastard: voodootikigod_: sencha relicensed as Microsoft Share and Share-Alive Lic [02:39] JimBastard: >.< [02:39] mscdex: sounds good to me [02:40] JimBastard: javascript-fail [02:40] mscdex: that should be a js project name "javascript-fail" heh [02:41] victorstan: yeah how do i know which version of express i have installed with npm? [02:41] kiba: hmm [02:41] kiba: my identify not working [02:41] kiba: is nickserv not working? [02:41] kiba: nvm [02:42] mape: 1-800-LOVE-GOD hmm not quite the advertisment I anticipated before watching a video from the Makers fair [02:44] maqr: in ryan's talk, he says "For security set it behind a stable web server", is that still the case today? or do you guys run node.js as a public http service? [02:44] tmpvar has joined the channel [02:44] micheil: maqr: depends, I do all my websocket testing with node being the public http service [02:44] JimBastard: maqr: nodejitsu.com is all node, i think [02:44] Hayate has joined the channel [02:45] mikeal: crap [02:45] micheil: maqr: if I were to deploy node as a client app, I'd probably front it with a http cache like varnish, and then have a process monitor watching it [02:45] mikeal: i need a blocking readline call on stdin [02:45] micheil: maqr: I mean, there's some really clever deployment options available at the moment, it's just a matter of using what you're comfortable with [02:46] maqr: micheil: hmm, yeah, he recommends nginx in the talk; but if i can just run node directly with some kind of process monitor... that'd be even thinner, i think [02:46] maqr: micheil: the only thing i can think might be an issue is if the node server has exploitable code in it, but if it's javascript, i'm not even sure how that would work... i guess there can be holes in anything though [02:46] micheil: maqr: the pure reason I probably wouldn't front with nginx, is because last I knew nginx had problems with websockets, cometd and long-polling [02:47] maqr: micheil: yeah, i'd want those... varnish is ok with all that? [02:47] micheil: maqr: well, I guess it's just a matter of telling varnish to ignore those connections [02:47] micheil: I'm not totally sure [02:49] micheil: mscdex: also, I think node-websocket-server has some latency problems. The reason is because the send() is single threaded in a way. [02:50] mscdex: ? [02:50] micheil: because it's doing a foreach() [02:50] micheil: it can only be pushed as fast as foreach()'s callback completes [02:50] mscdex: oh [02:50] micheil: but I can't benchmark this properly [02:51] mscdex: where is it doing that? [02:51] mape: wasen't there a websocket client for node now? [02:51] mscdex: broadcast? [02:51] micheil: lib/ws/manager.js#94 [02:51] mscdex: mape: yeah, pgriess wrote one [02:51] mape: should be able to use that one to benchmark some things? [02:51] micheil: do you think I could push line 98 into a nextTick or something? [02:52] micheil: mape: not really. [02:52] mape: why not? [02:52] micheil: because, I need to be opening up thousands of connections [02:53] mape: then start thousands of clientsP [02:53] mape: *? [02:53] pavan_ has joined the channel [02:53] micheil: doesn't work like that. [02:53] micheil: if I had 5 peers each with 1000 clients, it'd work. [02:53] mscdex: micheil: the calls would still be synchronous though, it's just a matter of when you do them [02:53] micheil: but because it's on lo / 127.0.0.1, you don't see it to the same sense [02:53] mscdex: micheil: whether it's then or nextTick [02:54] mape: micheil: write the code and I'll run it? [02:54] micheil: mscdex: yeah, the point is that on forEach it's invoking that callback in the same loop [02:54] khug has joined the channel [02:55] mape: using a for loop would be faster then forEach as well? [02:55] mape: if that part is an issue [02:56] mscdex: i guess i'm not understand the problem :S [02:56] mscdex: *undestanding [02:56] mscdex: *understanding hah [02:56] mscdex: typing fail [02:58] siculars has joined the channel [03:00] aho has joined the channel [03:00] pavan_ has joined the channel [03:00] pavan_ has joined the channel [03:01] markwubben has joined the channel [03:02] micheil: mscdex, mape: currently I use a while(current && current.client){ loop [03:03] micheil: and inside that, I do, callback(current.client); [03:03] micheil: then set current to current._next [03:04] micheil: but the time that it takes to get from manager.start to manager.end is say 40ms^connections [03:04] mscdex: i think i see what you mean now [03:04] mscdex: but how else would you implement that then? [03:05] mscdex: since you have a linked list? [03:06] micheil: well, I can't do much else, other then tell it to use either a tree (which would get very messy) or to use nextTick [03:06] mscdex: also, what's the performance difference between using a js linked list and a hash? [03:06] micheil: the latency between an array, object and linked list was quite big [03:07] mscdex: that seems rather surprising [03:08] mscdex: i'd think the array/object implementations would be optimized pretty well [03:08] micheil: this is latency as in.. less then 100ms [03:08] mscdex: unless items aren't sorted [03:08] micheil: also, I stand the problem of removing items [03:08] mscdex: er nvm i guess that's right, they're stored in the order they were assigned [03:09] micheil: with my linked list, it should be just de-referencing it, and then meaning that the gc can do it's job [03:09] mscdex: yeah [03:09] micheil: with an array or object, I'd either have to delete the obj[key] which I've been told sends v8 into a slow-case [03:09] micheil: or I'd have to array.slice / array.splice [03:10] mscdex: hmm [03:10] micheil: which, when you have 10,000 clients, that's not a small task [03:10] micheil: and it means that the array gets somewhat frozen, because if you're currently slicing this array / changing it's length, you can't push on another item [03:11] pavan_ has joined the channel [03:11] micheil: also.. I think I'm seeing an odd timeout bug in safari [03:13] mape: micheil: think the slow-case part was specific case, but yeah, ryah stated in his current colonge talk that delete shouldn't be used in node programs, didn't state why but yeah [03:13] mape: *-current+recent [03:14] micheil: wtf safari. [03:14] micheil: safari time's out websocket connections. [03:14] mscdex: mape: how else would you remove a property from an object? [03:14] mape: mscdex: no idea [03:14] micheil: it just closes them if no activity has happened in N seconds [03:15] mscdex: :S [03:15] mape: http://code.google.com/p/v8/issues/detail?id=524 [03:15] mape: micheil: so you have to ping them? [03:15] micheil: yeah [03:15] mape: That sounds wasteful [03:16] micheil: it is [03:16] micheil: and it's against spec. [03:16] mape: how long is n? Any idea? [03:17] micheil: about 5000ms [03:18] mape: really? I haven't noticed that [03:18] micheil: the worst part is that my server get's no notification of this closure [03:18] mape: 5sec seems very low [03:19] micheil: testing. [03:19] mscdex: what version of safari is this? [03:19] mscdex: and draft? [03:19] micheil: latest [03:19] micheil: 75 [03:19] pavan_ has joined the channel [03:19] pavan_ has joined the channel [03:20] micheil: hm.. not seeing it now, and all I did was not send a packet on connect [03:20] jakehow has joined the channel [03:21] micheil: actually, just got it. [03:21] creationix has joined the channel [03:22] micheil: the difference between: 16 Jul 13:19:08:8524 and 16 Jul 13:21:08:8526 [03:22] micheil: 2 minutes, 2ms [03:23] mape: can't find any info on what "fast case" and "slow case" means and what triggers them.. [03:23] micheil: and that isn't a proper close either. [03:25] pavan_ has joined the channel [03:26] mscdex: 2 minutes makes it sound like the default net.Stream timeout [03:26] mscdex: heh [03:28] micheil: hmm.. [03:28] micheil: I'm telling the socket to have no timeout. [03:28] micheil: req.socket.timeout(0) [03:29] micheil: also, safari's readyState = 2 [03:29] micheil: or Closing [03:32] mscdex: what about changing the keepalive interval? [03:32] mscdex: from 0 to like 5000 or something? [03:32] pavan_ has joined the channel [03:33] devongovett: what is the best solution to the async code problem? I need something that fixes the scope problem, and generally makes callback infested code look nicer. Suggestions? [03:34] wilmoore has joined the channel [03:35] micheil: mscdex: req.socket.setTimeout(0); [03:35] micheil: req.socket.setKeepAlive(true, 0); [03:35] mscdex: ? [03:35] micheil: that should be keeping alive, no? [03:36] mscdex: yeah, and the second argument is the interval to send the keepalive packet [03:36] mscdex: not sure what 0 does [03:36] micheil: I read it in the docs somewhere [03:36] polotek has joined the channel [03:41] tmpvar_ has joined the channel [03:41] mape: mscdex: seems intead of doing delete you should just set it to null [03:41] mape: seems kinda wonky to me but yeah.. [03:41] mscdex: mape: that's what socket.io does :-\ [03:42] mscdex: leads to a huge object [03:42] pavan_ has joined the channel [03:42] mape: yeah, but not in slow case I guess [03:42] mape: not sure if adding does that as well though [03:42] mape: bah stack overflow should move DOM related js into a separate tag [03:43] mape: same with framework stuff [03:44] mape: http://perfectionkills.com/understanding-delete/ [03:44] victorstan: oh yeah [03:44] JimBastard: mape: kangax owns [03:44] victorstan: if you're upgrading your express app [03:45] victorstan: dont do $express in your current app folder [03:45] victorstan: it will overwrite your previous apps without prompting! [03:45] victorstan: learned the hard way [03:45] victorstan: ah well [03:45] victorstan: at least this way i get to practice :) [03:46] programble has joined the channel [03:48] softdrink has joined the channel [03:49] mscdex: ouch [03:50] mape: but so yeah, I can't really see how you would remove things another way, if you have an object that keeps track of things with a key, if you just keep setting the value to null/undefined you still have to loop through them when you do Object.keys [03:51] liucougar has joined the channel [03:51] mape: but doing delete obj[key] supposetly makes it slow [03:52] mscdex: hmm [03:52] pavan_ has joined the channel [03:52] wilmoore has joined the channel [03:53] mape: And at a Palm talk slide, under v8 optimizations they state "avoid altering objects after creating them" [03:53] mape: that isn't very helpful [03:53] mscdex: mape: well, i guess one way to do it is to set the property to be non-enumerable once you set the value to null/undefined, that way when you do a for loop or something it won't show up [03:53] creationix: mape: I don't think it makes it slower if you're constantly adding new keys anyway [03:53] mscdex: ACTION shrugs [03:54] creationix: basically it disables v8's creation of static structures [03:54] mape: so if I alter the object any way it slows down? Doesn't matter if it is adding or delete? [03:54] creationix: mape: yep, it can't create a static struct and treat it as static [03:55] creationix: but v8 optimizes in other ways too [03:55] creationix: so you don't loose everything [03:55] creationix: I'm not an expert though, eric correy would know more [03:56] mape: Just seems there is no good info on the performance aspects of it [03:56] mape: the stack overflow answers are just "sure use delete" [03:56] creationix: yeah, I guess just don't modify any more than you have to if you want it really fast [03:57] creationix: or if you're going to modify it a little, more changes don't hurt [03:57] mape: and arrays would be faster then objects if one accesses the content seldom? [03:58] creationix: mape: http://www.youtube.com/watch?v=hWhMKalEicY [03:58] mape: Since if I want to remove something from an array I first have to search through it and then slice it out [03:58] mscdex: micheil: safari 5 on windows isn't disconnecting after 2 mins [03:58] mscdex: micheil: fwiw [03:58] victorstan: anyone using express the new one? [03:58] creationix: mape: not sure about that one [03:58] mape: creationix: thanks [03:58] creationix: I do know that arrays are sparse [03:58] victorstan: how do i enable jade support? [03:58] victorstan: I'm getting this error [03:58] victorstan: 500 Error: Cannot find module 'jade' [03:59] creationix: mape: "hidden class" is what they call the struct optimization [03:59] mape: victorstan: that is a template engine [03:59] mscdex: micheil: scratch that, i wasn't looking in the right place, it did disconnect. [03:59] mape: perhaps some code referencing it? [03:59] victorstan: yep [03:59] victorstan: but in the old express it was automatically included [03:59] victorstan: now it breaks... [04:00] victorstan: even with a brand new app [04:00] mape: optics.. hehe [04:00] victorstan: wait... [04:01] victorstan: why is it using jade? [04:01] benburkert has joined the channel [04:01] victorstan: and not haml? [04:01] victorstan: is that TJ [04:01] victorstan: s idea? [04:01] victorstan: lol [04:01] creationix: victorstan: jade is tj's new haml [04:01] victorstan: yeah haha, so how do i get it to work in express? [04:01] victorstan: do i have to install it with npm first? [04:02] pavan_ has joined the channel [04:02] mape: creationix: but so if I only have 1 object that gets altered it won't matter much? Ie it doesn't share the hidden class with anything [04:02] creationix: mape: yep [04:02] SamuraiJack has joined the channel [04:02] creationix: well, not exactely [04:02] creationix: it depends on the threshold for hidden classes [04:02] creationix: they are useful a little for even single instances [04:03] creationix: but v8 is less likely to use them for single instances [04:03] micheil: victorstan: that's why we have that thing called version control. [04:04] micheil: mape: null != undefined [04:04] mape: micheil: I know, but it is less then a large object [04:04] victorstan: yeah, we also have manners [04:04] mscdex: hrmm odd... [04:04] victorstan: like if its there, ask if it shold be overwritten [04:05] maqr: xml must have a root node by definition, right? [04:05] eisd_: no, null == undefined && null !== undefined [04:05] mscdex: micheil: i'm testing safari 5 with grappler and it hasn't disconnected after 2 minutes, but it does with node-websocket-server [04:05] mape: npm overwrote my code, swapped the entire dir, so git wouldn't have helped :P [04:06] mscdex: micheil: and i'm pretty sure i'm not doing anything different timeout/keepalive-wise [04:06] micheil: victorstan: no, I was meaning, we have version control incase that bad thing happens where it doesn't ask [04:07] micheil: mscdex: checkin' [04:07] jashkenas has joined the channel [04:07] victorstan: haha yeah tell me more! [04:07] mscdex: micheil: it had also passed the 5 minute mark [04:07] victorstan: now i certainly do have it under git ;) [04:08] mape: can't find any info on safari getting timeout after such a short time period [04:08] jashkenas has left the channel [04:08] mscdex: mape: yeah i couldn't either, so i reluctantly installed safari :S [04:09] mape: but so it doesn't state that it disconnects either? [04:09] mape: just drops the connection? [04:09] victorstan: word [04:09] victorstan: ok so i do have to install jade with npm [04:09] victorstan: which is funny [04:10] victorstan: since the express app scaffolding assumes it is installed or will be [04:10] victorstan: :) all is good now, i guess... [04:10] victorstan: so i have a general question [04:10] victorstan: what are people's views of MVC for node apps? [04:10] mape: victorstan: http://github.com/visionmedia/express/tree/master/support/ [04:11] mape: have you initiated the submodules? [04:11] mscdex: micheil: i think it may not be sending the FIN packet, which is why the end event never fires. maybe try listening for the close event on the stream and that should always fire no matter what [04:11] victorstan: for example expresses generator does not organize things in mvc pattern [04:11] micheil: mscdex: you do: onConnection => socket.setTimeout(0) [04:11] pavan_ has joined the channel [04:11] away01 has joined the channel [04:11] victorstan: no [04:12] victorstan: how do i do that? [04:12] Hayate has joined the channel [04:12] micheil: git submodule init [04:12] micheil: git submodule update [04:13] victorstan: thanks [04:13] mscdex: micheil: hrmm.. i do put my connection listener first also, maybe that makes a difference too? i dunno [04:13] victorstan: where is this documented btw? [04:13] mape: victorstan: did you use npm to install express? [04:13] victorstan: yes [04:13] mscdex: brb [04:13] micheil: mscdex: *waits for the bug to happen* [04:13] mape: victorstan: the readme under ## Installation [04:13] lachlanhardy has joined the channel [04:13] mape: Guess you should tell tk about it though, something off with his npm submission [04:14] mape: victorstan: should give him a note on http://github.com/visionmedia/express/issues [04:16] micheil: wtf? Is coffeescript a product of DocumentCloud? [04:17] micheil: why did I not know this before >_> [04:17] creationix: micheil: no, just the same guy [04:17] micheil: yeah [04:17] creationix: but yeah, Jeremy does cool stuff [04:17] micheil: that's possibly why I didn't know [04:18] micheil: yeah, like ruby-processing, docco, etc. [04:18] micheil: various data apis & open gov style things [04:19] micheil: mscdex: looks like on connection you have to set the timeout [04:20] polotek: does console.warn go out on stderr? [04:20] polotek: and is it sync? [04:20] micheil: there is no console. [04:20] micheil: (last I knew) [04:21] polotek: then you my friend are in for a surprise [04:21] polotek: comes as a global in node now [04:22] micheil: mscdex: hoorah! close instead of end fixes the non-closing bug [04:22] polotek: micheil: wasn't following your earlier convo [04:22] polotek: but there is a subtle difference between close and end [04:22] polotek: I think close actually destroys the fd [04:23] micheil: mscdex: and onConnection is when I need to fire the setTimoeut() [04:23] micheil: yeah, end is after the FIN packet [04:23] micheil: close is when the socket gets closed or something [04:23] micheil: tcp level stuff [04:25] polotek: right now console.warn and console.error are the same [04:25] polotek: go out on stderr [04:25] polotek: fyi [04:25] pavan_ has joined the channel [04:25] victorstan has joined the channel [04:26] victorstan: node went crazy [04:26] victorstan: started using 100% cpu and 1+ gig mem [04:27] micheil: victorstan: sounds like a mem leak :P [04:27] micheil: victorstan: is this use Jade? [04:27] victorstan: yeah [04:27] micheil: I have a fear that Jade may infact cause a memleak, but I don't have any solid data yet [04:28] micheil: it uses while(1){ .. } [04:28] micheil: in it. [04:28] micheil: which could very well cause a problem [04:28] micheil: and I know in my browser port that one line could cause the browser to crash [04:28] victorstan: i still dont know how to enable sumodules if i installed express with npm [04:28] victorstan: where does npm keep its sources? [04:29] micheil: umm.. you possibly can't [04:29] micheil: ~/.node iirc. [04:29] polotek: ~/node_libraries [04:29] polotek: ~/.node_libraries [04:29] polotek: but last time I checked those were just symlinks into [04:29] polotek: ~/.node_libraries/.npm/ [04:29] victorstan: and they are just js files... [04:30] polotek: victorstan: ^^ [04:30] benburkert has joined the channel [04:30] victorstan: k will try that [04:30] mjr_ has joined the channel [04:30] maqr: if i'm making a module, how am i supposed to mix in the eventemitter, so that users can have 'myobj.addListener'? [04:31] polotek: maqr you can inherit from EventEmitter [04:31] polotek: which whatever js inheritance technique you refer [04:31] victorstan: ok thats good [04:31] polotek: there is sys.inherits [04:31] maqr: polotek: what's the most 'correct' approach? i'm just starting with node.js today [04:32] pavan_ has joined the channel [04:32] polotek: maqr: the correct way is prototypal inheritance [04:32] polotek: sys.inherits uses this [04:32] micheil: mscdex: woah. http.request.socket != server.connection.socket [04:32] polotek: sys.inherits(YourConstructor, EventEmitter) [04:33] maqr: polotek: hrm, shouldn't that be in the api somewhere? [04:33] micheil: ryah: can you lend a hand here? [04:33] polotek: Then you can do [04:33] polotek: YourConstructor.prototype.doStuff = function() {...} [04:34] polotek: maqr: nah, there's no "blessed" way of doing inheritance. [04:34] micheil: ryah: I'm seeing that setTimeout can only be set on connection with a httpServer, no when using the onRequest or onUpgrade [04:34] polotek: sys.inherits doesn't do anything special [04:34] polotek: it's just a convenience method [04:34] polotek: it's used by node internally [04:34] polotek: and it could possibly go away or be moved at some point [04:34] polotek: but it'll get you going [04:36] maqr: polotek: ok, that sounds good, seems to work fine [04:37] polotek: aw man [04:37] polotek: I expect console.log and friends to take multiple args to print [04:37] polotek: console.log('me', 'and me', 'me too!'); [04:38] polotek: but instead it takes a format string and fill parameters [04:38] maqr: ok, i just made my first module and semi-useful thing [04:38] maqr: this is awesome :) [04:38] polotek: console.log('%s %s %s', me, andme, me2) [04:38] polotek: maqr: woot [04:39] maqr: i'm going to clean it up, then pastebin it for you guys, so you can tear me apart and i can not develop bad habits :P [04:40] pavan_ has joined the channel [04:42] micheil: mscdex: woah. the setTimeout code looks crazy.. but sane. [04:43] mjr_: maqr: what does your module do? [04:43] benburkert has joined the channel [04:43] mscdex: back [04:43] mscdex: micheil: what's that [04:43] micheil: mscdex: it looks like setTimeout(0) doesn't always unenroll the setTimeout [04:43] micheil: http.js [04:44] mscdex: ah [04:44] micheil: which makes that a bug then [04:44] micheil: I'm sure. [04:44] polotek: micheil: what's going on with setTimeout? [04:45] mscdex: net.Stream.setTimeout [04:45] micheil: basically you have to call setTimeout in the connection event [04:45] mscdex: not the global [04:45] mscdex: :-) [04:45] micheil: oh, yeah [04:45] micheil: just going to try something.. [04:46] maqr: mjr_: converts xml to a javascript object.. because i couldn't make json-xml2object work, and i didn't really understand what he did [04:47] micheil: mscdex: y'know the worst part about this bug? [04:47] micheil: it takes 2 minutes to happen. [04:48] mscdex: heh [04:48] mscdex: yeah [04:48] micheil: this could be why mr doob had to restart that sketchpad server every five hours [04:48] pavan_ has joined the channel [04:48] mscdex: maqr: which xml2object module did you use? [04:48] micheil: the manager got full of still referenced but dead connections [04:48] mscdex: micheil: ah [04:49] micheil: which is what would cause a write error [04:49] mscdex: micheil: yeah, IE has a similar issue too. it never sends a FIN packet on disconnection of comet connections [04:49] micheil: >_> [04:49] micheil: okay. so, net.Stream.setTimeout in HEAD is still broken. trying a fix. [04:49] mscdex: 'end' only fires on receipt of FIN [04:50] mscdex: ACTION shakes a fist at IE [04:50] eisd_: mscdex: there's still no hack discovered to fix that? [04:50] maqr: mscdex: i tried the node-xml2object one on github, and it threw errors at me that i didn't understand... so i'm rewriting it so that i do understand it and so it works for me [04:50] mscdex: eisd_: short of fixing IE? no. but the workaround is to listen on the 'close' event instead [04:51] mscdex: maqr: just curious because i had written an xml2object function that used libxmljs [04:51] mscdex: maqr: both a sync and async version [04:51] maqr: mscdex: ah, got a link? yours is probably far better than mine, but i can compare and learn :) [04:52] mscdex: maqr: they were written for a slightly older version of libxmljs, but worth giving a try anyway. sync version here: http://mscdex.net/code-snippets/#xml2js [04:52] mscdex: let me find the gist of the async one [04:54] maqr: mscdex: yeah, i did it with sax, if you can find that one, that'd be easier for me :) [04:54] mscdex: maqr: async: http://gist.github.com/416021 [04:54] maqr: oh, you totally win [04:55] jsilver has joined the channel [04:55] maqr: mscdex: what do '#' and '@' do there? [04:55] jsilver: hey guys [04:55] jsilver: question [04:56] jsilver: say I have "\n" in node.value and it's getting transformed to an actual newline in the out somehow [04:56] mscdex: maqr: the @ key holds attributes and the # key holds the element text (if applicable/available) [04:56] jsilver: how do i stop that and say that I want literally \n [04:56] mscdex: jsilver: escape the slash [04:56] eisd_: \\n? [04:56] jsilver: it has to know [04:56] jsilver: when it sees \n [04:56] jsilver: it's for my compiler [04:56] jsilver: basically [04:56] jsilver: addToOut "\n" becomes [04:57] jsilver: addToOut ' [04:57] jsilver: ' [04:57] pavan_ has joined the channel [04:57] jsilver: its like one of the last wrong things... [04:57] jsilver: that i know of... [04:58] wilmoore has joined the channel [04:58] polotek: mscdex maqr libxmljs hasn't changed much in terms of api [04:58] polotek: it should work fine [04:58] jsilver: i could search for \ and replace it with \\ [04:58] polotek: and if it doesn't let me know [04:59] maqr: mscdex: how do you know when 'data' is done parsing? [04:59] mscdex: maqr: the stack is empty [05:00] maqr: mscdex: i mean for the fstream... i was having this problem where my stream would fire 'end' before my 'data' parser was done [05:00] mscdex: maqr: hmm... it shouldn't... [05:01] polotek: maqr: or the stream will emit "end" [05:01] polotek: oh, sorry, didn't read [05:01] mscdex: fs.createReadStream emits 'end' when the end of the file has been read [05:01] maqr: mscdex: yeah, but not necessarily after parsing is complete? [05:02] polotek: maqr: no, if your parser function does more async calls [05:02] mscdex: maqr: right, it's async [05:02] polotek: it could still be running when end is fired [05:02] mscdex: yeah [05:02] maqr: so i could emit my own 'end' from the parser, right? [05:02] mscdex: yes [05:02] maqr: ok, good, then this is making sense :) [05:02] mscdex: as long as you inherit the function from EventEmitter [05:02] mscdex: then just do this.emit('end'); [05:03] mscdex: do that instead of sys.puts('Done') in my script [05:03] maqr: awesome, makes sense [05:04] mscdex: i think there is a callback for reaching the end of the xml document, but i don't think it ever worked for me? [05:04] jsilver: mscdex: you could be right [05:04] maqr: mscdex: mine works with the node-xml parser [05:04] jsilver: do u think search for \ and replace with \\ is a good idea tho [05:04] mscdex: jsilver: depends on what you're doing exactly i guess [05:05] jsilver: do you not know [05:05] jsilver: http://www.github.com/jsilver/js2cs [05:05] mscdex: i know that much, that's why i said 'exactly' ;-) [05:05] jsilver: "string literals with \n get messed up" [05:05] jsilver: oh [05:05] jsilver: "are strings with \ in them common?" [05:05] mscdex: if you're just concerned about newlines, then just escape \n [05:05] jsilver: ya [05:05] jsilver: yr right [05:06] jsilver: nothiin else is used [05:06] mscdex: and \t and \r if you want [05:07] jsilver: yeah [05:07] jsilver: what's \r [05:07] jsilver: lol [05:07] jsilver: return? [05:07] jsilver: idk [05:07] polotek: carriage return [05:07] pavan_ has joined the channel [05:07] jsilver: js2cs compiles itself now btw [05:07] jsilver: albeight still incorrectly [05:08] jsilver: gonna search out \n and replace with \\n [05:08] jsilver: and the other ones too [05:08] jsilver: yeah [05:08] jsilver: gonna .replace [05:09] hassox has joined the channel [05:10] mostlygeek has joined the channel [05:17] micheil has joined the channel [05:18] maqr: mscdex: hmm, your code definitely works... but any idea how to remove the extra '#' keys for cleaner json? [05:18] mscdex: extra? [05:20] maqr: mscdex: well, when you move it to json, you have a '#' key for every string of data... so bar comes out as { foo: { '#' : 'bar' } } instead of { foo : 'bar' } [05:21] mscdex: yeah [05:21] maqr: am i missing something about json? it would seem like you'd not want that there [05:21] mscdex: because you can have child nodes that need to be represented somehow [05:21] mscdex: so that script uses properties [05:21] mscdex: the child node names as properties [05:22] mscdex: so for "", you could access bar by: foo.bar [05:22] mscdex: and since @ and # are not valid xml names, you know they'll be guaranteed to be used to store attributes and node text repsectively [05:24] maqr: mscdex: that makes sense, but if something has no attributes or children and only a string for data, shouldn't it just omit the '#'? [05:24] mscdex: mape: it seems you can just set an object's property to be non-enumerable and it won't even show up when doing Object.keys(obj), so that helps some when setting them to undefined [05:24] mape: oh so just ob[key] = null? [05:25] mscdex: maqr: that wouldn't be good for iterating, because then you'd have to check to see if the property exists first [05:25] maqr: mscdex: oh, i guess that makes sense [05:25] mscdex: maqr: that way you can just have loops that won't break, even if there's no attributes [05:26] mscdex: mape: yeah. then do: Object.defineProperty(obj, 'key', { enumerable: false }); [05:26] mape: ah k [05:27] mscdex: mape: then, the next time a for loop is done on the object or you call Object.keys(obj), 'key' won't show up in the results [05:27] mape: neat [05:27] mscdex: so that makes checking much easier [05:27] mape: sure that doesn't throw it into slow mode? [05:27] mscdex: mape: it's not deleting it explicitly, so the garbage collector should hopefully pick it up? [05:28] mscdex: i dunno, i'm assuming using 'delete' is only what triggers the 'slow mode' [05:29] maqr: mscdex: the wikipedia examples look a lot prettier with the '#' and '@', though... i'd kind of rather have that and then check in javascript for types if i need to loop, i think [05:29] maqr: err, without the '#' and '@' [05:31] mscdex: well, feel free to rewrite it to output the json however you want, i just prefer the parent.child.childchild type of access [05:32] maqr: mscdex: your way of parsing with the stack makes so much more sense than the method i tried before, btw [05:32] maqr: http://github.com/kyleslattery/node-xml2object/blob/master/lib/xml2object.js <-- this was the example i was following [05:34] maqr: i guess that other way is more async, since it doesn't keep a stack at all? but it's so much more confusing [05:35] mscdex: maqr: having a stack doesn't make it synchronous [05:35] mscdex: they're both async since they use callbacks from the xml parser [05:35] maqr: err, yeah, i guess so [05:36] maqr: mscdex: i'm just getting into all this async stuff, it's still a little mind bendy to me :) [05:36] mscdex: it would be sync if you had to wait for the entire tree to be parsed and then iterate over it manually [05:36] mscdex: which you can see in my sync version of the xml2js function [05:37] maqr: yeah, that makes sense [05:38] mscdex: although you should always strive to use async anything when you're dealing with situations where you need to do a bunch of stuff at once, like a server that accepts connections. in those cases you can't really afford to wait around for an xml parser to finish [05:38] mscdex: or reading from or writing to disk [05:38] mscdex: anything that can take awhile really [05:39] maqr: mscdex: no matter what, i kind of have to wait for the parsing to finish before i can return my page... but i guess sax is better here because it's parsing it in as close to real-time as possible while the app can be doing other things? [05:39] mscdex: maqr: exactly. [05:39] mscdex: maqr: have you watched any of ryah's videos? [05:40] maqr: mscdex: i watched the yahoo video lecture and was super impressed [05:40] mscdex: ah ok [05:40] maqr: ryah: btw, you're way cooler than dhh :p [05:41] maqr: mscdex: yeah, i'm totally sold on the async approach, i kind of feel stupid for not realizing this is how code should be written a long time ago [05:41] mscdex: hehe [05:41] polotek: maqr: heh [05:42] polotek: oooookay. that's not working. so time for sleep [05:43] polotek: later folks [05:43] maqr: mscdex: btw, any idea what the difference between 'cdata' and 'chars' should be for the xml parsing? [05:43] maqr: cya polotek :) [05:43] polotek: maqr: just so you can distinquish the two [05:43] polotek: cdata may not be xml escaped [05:43] maqr: are they different in xml? i've never run into that before [05:44] maqr: weird, i wonder what makes it return one or the other [05:44] maqr: ohh, wait, nevermind, i get it [05:44] maqr: ![CDATA[bar]] vs bar [05:44] polotek: and if you were to "rebuild" the xml you should wrap cdata in the Get(arrayHandle, "splice") [06:35] beelzabub: that returns a function [06:35] mscdex: creationix: how long? [06:35] creationix: well, it depends on the length of another unrelated variable [06:35] teemow has joined the channel [06:36] creationix: the time to come back seems to scale exponetially with the size of this other array [06:36] V1 has joined the channel [06:36] creationix: when I have 1000000 items in the array, the fs.write never calls back [06:36] creationix: http://gist.github.com/478023 line 52 [06:37] CIA-76: node: 03Marco Rogers 07master * r1662c37 10/ src/node.js : Fix console formatter to recognize json properly - http://bit.ly/d6Yycv [06:38] creationix: somehow the length of writeQueue on line 70 makes the fs.write on line 52 take forever [06:38] mjr_: sh1mmer: try this wscript: http://gist.github.com/478024 [06:39] mjr_: creationix: is this the super slow write thing that pquerna was talking about on the list? [06:39] creationix: I don't think so [06:40] creationix: mjr_: any clue what's related? [06:41] sh1mmer: mjr_: cool [06:41] sh1mmer: thanks [06:43] peutetre has joined the channel [06:43] mjr_: creationix: not sure. I've had a similar-sounding issue before when dealing with large buffers. [06:43] mjr_: Are you combining a bunch of stuff together into a single large buffer? [06:43] creationix: well, but buffer is only 10000 bytes [06:43] benburkert has joined the channel [06:43] mjr_: hmm, that's not very large [06:43] creationix: and I can control the size of the buffer, it doesn't seem to affect anything [06:44] mjr_: oh, so how does the write queue come into play? [06:44] jesusabdullah: Have any of you guys used twisted (python)? I'm not really sure what to think of it. [06:44] micheil: mscdex: that res -> data variable name has been fixed. 1.3.02 [06:44] jesusabdullah: Weird place to ask, I know [06:44] mscdex: micheil: cool [06:44] jesusabdullah: but my only other experience with events is node, so [06:44] jesusabdullah: *shrug* [06:44] micheil: I didn't like it much jesusabdullah [06:44] creationix: mjr_: no clue, but with a buffer size of 108 bytes and a writeQueue of 1,000,000 it never comes back [06:45] creationix: but if I make writeQueue small (1000), it comes back instantly [06:45] jesusabdullah: micheil: What is it, exactly? For some reason reading about it doesn't help me :S [06:45] jesusabdullah: I mean, I get the whole "events" thing, but [06:45] jesusabdullah: ...idk [06:45] creationix: mjr_: I'm hoping it's a bug in my code, but I'm afraid it's a nasty node bug [06:45] alexpercsi has joined the channel [06:45] alexpercsi has left the channel [06:46] mjr_: creationix: are you sure it isn't accidentally recursing on you? [06:46] creationix: I've the got debug statements in there [06:46] creationix: I never see the one in the fs.write callback [06:46] mjr_: hit it with dtrace / strace [06:47] javajunky has joined the channel [06:47] alexpercsi has joined the channel [06:47] creationix: mjr_: oh, and node crashes without a word when the callback does finish (if I reduce the queue size) [06:48] mjr_: sounds like something is getting stepped on then. [06:48] creationix: how do I use dtrace? [06:48] alexpercsi: hi all. I'm just about to get my hands dirty with my first node.js build. I am trying to build a mock REST server. Is there anything already done that I could look at? Or do any of you know some good reading materials? [06:48] mjr_: I've not gone and learned about dtrace, but those who have tell me it is amazing. [06:48] sh1mmer: dtrace is the shit [06:49] sh1mmer: best thing sun ever did for operating systems [06:49] mjr_: But on linux, strace will show you the system calls that your program is doing, including the arguments and fds. I'll bet you'll see some kind of pattern in there if you turn that on. [06:50] jesusabdullah: alexpercsi: I never really got what RESTful meant <_< but nodejs.org/api might have some helpful stuff, and maybe search github for nodejs, see what's hot. I [06:50] pdelgallego has joined the channel [06:50] jesusabdullah: blegh [06:50] jesusabdullah: anyways [06:51] jesusabdullah: alexpercsi: I don't know much, but I'm pretty new myself [06:51] alexpercsi: thanks jesusabdullah [06:51] sh1mmer: alexpercsi: that's a fairly generic statement [06:51] sh1mmer: alexpercsi: what specifically are you trying to do? [06:51] alexpercsi: sh1mmer: well, we're building our UI using Sproutcore for a new project [06:52] alexpercsi: and the backend won't be available for a while as it has not yet been built [06:52] mjr_: sh1mmer: I'm about to head out. Did you get pcap to compile? [06:52] alexpercsi: so we want to build a mock node.js server to serve up some JSON in REST fashion to interact with [06:52] sh1mmer: mjr_: yup. [06:52] mjr_: cool [06:52] sh1mmer: mjr_: going to send you some stuff this weekend [06:52] sh1mmer: :) [06:52] alexpercsi: the JSON can come from files on the disk for now, no DB interaction [06:53] dgathright has joined the channel [06:53] sh1mmer: alexpercsi: there are some static node servers on http://wiki.github.com/ry/node/modules [06:53] WALoeIII has joined the channel [06:53] mjr_: sh1mmer: great. I'm just working on decoding websocket tonight. I thought I'd get it done, but lack of sleep is making me dumb. [06:53] alexpercsi: thanks sh1mmer [06:54] felixge has joined the channel [06:54] felixge has joined the channel [06:54] ako has joined the channel [06:54] sh1mmer: mjr_: I'll work on the DNS compression [06:57] stepheneb has joined the channel [07:02] micheil: mjr_: ? what's this about decoding websocket? [07:02] WALoeIII has joined the channel [07:05] creationix: mjr_: ok, figured it out [07:05] creationix: I had this strange cycle in my references with callbacks [07:05] creationix: not sure how it broke fs.write, but maybe it just broke the gc [07:06] mape: micheil: sure the update was pushed to npm? [07:06] mape: npm version 0.1.19 [07:06] micheil: yeah, it's there [07:06] micheil: npm list websocket-server [07:06] micheil: shows @1.3.02 [07:07] mape: ah k it doesn't get the latest when just doing npm install websocket-server [07:07] creationix: mjr_: nevermind, that just fixes the crash, fs.write still takes ages with a large queue [07:08] mape: or hmm, seems to work if I uninstalled and installed again [07:08] mape: but before that it said Nothing to install [07:08] micheil: mape: hmm.. okay [07:09] micheil: worked fine for me on 0.1.16 [07:10] micheil: looks like an issue in npm@0.1.19 [07:10] sooli has joined the channel [07:10] sooli: Hi all, I need your help on this multi rooms chat demo ... I need to test it [07:11] sooli: http://chat.solisoft.net [07:11] jsilver has joined the channel [07:12] mape: sooli: breaks if you press return [07:12] mape: also what does it use the flash for? [07:12] sooli: I use socket.io [07:13] mape: yeah you can't type anything in the input [07:13] creationix: pquerna: would calling fs.write after pushing 1,000,000 items to an array cause the gc to lock up? [07:13] sooli: So flash is for browsers who don't support websockets [07:13] mape: sends you to http://chat.solisoft.net/send [07:13] mape: sooli: mine does, chrome dev [07:13] sooli: you need to set your nickname before adding any content [07:13] sooli: /nick your nickname [07:14] isaacs has joined the channel [07:14] sooli: look at the usage on the top [07:14] micheil: sooli: doesn't work for me. safari 5. [07:14] sooli: micheil: did you do a /nick your_nickame ? [07:15] micheil: yes, and I get noting [07:15] micheil: nothing* [07:15] mape: sooli: doesnt make any difference [07:15] sooli: weird [07:15] isaacs: micheil: wha'ts a "minor version"? [07:15] micheil: ugh. wtf added a TESTING-please-ignore-this package to npm? [07:15] isaacs: micheil: that would be me :) [07:16] micheil: isaacs: as in the difference between 1.3.00 and 1.3.02 [07:16] micheil: isaacs: k. [07:16] pkrumins: isaacs: oh hey [07:16] sooli: mmm... the server done [07:16] pkrumins: isaacs: got an issue that i am troubled about [07:16] creationix: mjr_: you still there? [07:16] mape: isaacs: ever noticed you can't uninstall older versions? they are stated as @installed but when I try to remove them I get npm uninstall Not installed [07:16] k23z has joined the channel [07:17] isaacs: micheil: that's odd... [07:17] micheil: try it. [07:17] mape: all are removed if I do npm uinstall packagename but not if I add a version [07:17] micheil: npm install websocket-server@1.3.00 [07:17] micheil: npm install websocket-server [07:17] isaacs: mape: that's a bug. [07:17] micheil: / => nothing to do [07:17] mape: k, works fine to just uninstall and install again, harder to do that with npm itself though :) [07:18] micheil: isaacs: also, when do we get npm update? [07:18] pkrumins: isaacs: using npm it's possible to require('moo/foo') even if it's not in 'moo/' (typically lib/moo) directory! the trouble is that if people clone your git repo and don't use npm, then they can't require('moo/foo') (cause 'moo/' directory doesn't exist!!!) [07:18] pkrumins: so it only works for npm installed packaged, and not those git cloned [07:18] isaacs: pkrumins: i'm campaigning against the "expose the libs dir as moo/foo" feature [07:19] pkrumins: why against? [07:19] isaacs: pkrumins: soon it'll just be "use the main script" as your only entry point. [07:19] isaacs: pkrumins: i emailed the nodejs group about that soliciting objections. [07:19] pkrumins: can you link me? [07:19] isaacs: pkrumins: also, a Looooonnnnggg thread on commonjs [07:19] pkrumins: also what do i do when i want my modules to work with both npm and just git clone/download? [07:20] micheil: isaacs: btw, an npm slap would be a good command, y'know, slap the developers who don't give their projects a description [07:20] pkrumins: i can't just put 'foo.js' in lib/ dir [07:20] pkrumins: cause there could be many other 'foo.js' in other ppls lib/ dirs. [07:20] isaacs: pkrumins: http://groups.google.com/group/nodejs/browse_thread/thread/384dae2611504465# [07:20] pkrumins: click! [07:20] micheil: pkrumins:require.paths.unshift(__dirname) may help [07:20] isaacs: pkrumins: it's not a clearcut solution. [07:20] creationix: anyone here know about V8 and __memcpy? [07:21] pkrumins: creationix: sup? [07:21] creationix: pkrumins: hey [07:21] isaacs: pkrumins: but generally, the path seems to be, "to use my program, require module" and then do things via relative links. [07:21] pkrumins: creationix: i have used it in my modules iirc, with no problems [07:21] pkrumins: creationix: since it's your pointers, your memory, you can do to it whatever you want! [07:22] pkrumins: creationix: just free it later. [07:22] isaacs: micheil: update is planned, but i don't know when, exactly. probably months, not weeks. [07:22] pkrumins: (or delete/delete [] if you used new/new [] [07:22] micheil: isaacs: oh, okay [07:22] creationix: pkrumins: any idea why calling fs.write would cause my cpu to get stuck doing __memcpy for 30 seconds while writing 108 bytes [07:22] isaacs: micheil: npm slap still needs architectural planning. [07:22] micheil: isaacs: why months? [07:22] pkrumins: creationix: what os? [07:22] creationix: pkrumins: this is right after pushing 1,000,000 items to an unrelated array [07:22] creationix: osx [07:22] isaacs: micheil: because there are other things to do, and i don't have as much time as i'd like \o/ [07:22] isaacs: er... /o\ [07:23] micheil: k [07:23] creationix: only the first call to fs.write does it [07:23] creationix: pkrumins: after that they are super fast [07:23] pkrumins: creationix: sounds like laziness problems [07:23] pkrumins: meaning the previous calls were lazy somehow, now you triggered an action that make them all execute [07:23] creationix: pkrumins: yeah, like it doesn't actually set up the array till something in fs.write triggers it [07:23] pkrumins: yeah. [07:24] isaacs: micheil: ahh.. oops. [07:24] creationix: it does do the 1,000,000 pushes pretty fast [07:24] isaacs: just saw your npm install websocket-server@1.3.00 issue [07:24] micheil: isaacs: ? [07:24] micheil: heh [07:24] pkrumins: creationix: also perhaps swapping hits in? [07:24] creationix: pkrumins: though memory doesn't increase while it's eating my cpu doing the __memcpy calls [07:24] isaacs: micheil: it's not a semver issue. i see the bug. [07:24] pkrumins: creationix: perhaps it's reallocating existing pointers! [07:24] pkrumins: (movint them around) [07:24] pkrumins: moving [07:25] creationix: possibly [07:25] pkrumins: really hard to tell much more at this moment [07:25] micheil: also, is it possible to show a packages information without downloading it? [07:26] creationix: pkrumins: also the process sampler says the __memcpy calls come from v8::internal::Buildin_ArrayShift(v8::internal::(anonymous ... [07:26] creationix: which would explain the exponential growth in cost relative to the array length [07:26] creationix: shift sucks on large arrays [07:26] pkrumins: pesky :( [07:27] micheil: mape: npm.mape.me is giving back an error [07:27] mscdex: creationix: it shouldn't really though. i would think it would be as simple as moving the head pointer? [07:27] micheil: mape: "Failed to load resource: Could not connect to the server." [07:27] isaacs: pkrumins: the other links i mentioned: http://groups.google.com/group/commonjs/browse_thread/thread/77a5e47b58125376 and http://groups.google.com/group/commonjs/browse_thread/thread/2cbfa43499fd89e9 [07:27] creationix: pkrumins: maybe I should use push instead of array[array.length] = foo [07:27] isaacs: pkrumins: there's some crossover there.. [07:27] mape: micheil: which part? [07:27] micheil: mape: on load, in safari 5 [07:27] mape: the entire page? [07:27] micheil: yeah [07:28] micheil: also, is it possible to link to the github pages? [07:28] mape: works for me, and I'm here, and we are on the same connection [07:28] mape: micheil: http://mape.me:1337/ is better [07:28] mape: does that one work? [07:28] micheil: oh, sweet [07:28] micheil: yes [07:28] creationix: nope, push doesn't seem to make a difference [07:29] micheil: isaacs: what's your websocket package? [07:29] sooli: please can you try again ? it should be fixed : http://chat.solisoft.net [07:29] mape: micheil: doesn't seem like you have the author info in place [07:29] mscdex: micheil: what doesn't work on load? [07:29] isaacs: micheil: it's a sort of testing thing at a meta-package [07:29] micheil: mape: I'll add it. [07:29] micheil: isaacs: okay [07:29] pkrumins: isaacs: reading [07:29] isaacs: micheil: it just depends on websocket-server and websocket-client [07:29] micheil: k [07:30] isaacs: micheil: if you'd like the name for something more useful, though, then i'm not attached to it [07:30] pkrumins: creationix: it's quite possible they don't work exactly the same [07:30] micheil: isaacs: no, I was just wondering [07:30] pkrumins: creationix: try it [07:30] creationix: pkrumins: I did, it was still stuck on something [07:30] jan____: hm, I have a highlight here, but it scrolled off, anyone know what it was? [07:31] mscdex: jan____: search the debuggable logs [07:31] pkrumins: creationix: got a sample? i can try to run it on my computer too. [07:31] creationix: pkrumins: sure, just a sec [07:31] pkrumins: kk! [07:31] micheil: mape: what format should my author info be in? [07:31] mscdex: jan____: [23:06] sh1mmer: maybe jan____ knows he had those awesome stickers at jsconf.us [07:31] micheil: my package.json has it [07:32] creationix: pkrumins: http://github.com/creationix/nstore [07:32] creationix: cd into the test folder and run stressTest.js [07:32] mape: micheil: micheil ? [07:32] micheil: mape: , "author" : "Isaac Z. Schlueter " [07:32] micheil: erm [07:32] micheil: , "author": "Micheil Smith " [07:32] pkrumins: creationix: doing it [07:32] mape: strange [07:32] micheil: very. [07:33] creationix: pkrumins: notice the pause after the first "length" log [07:33] creationix: it never comes back when I try to insert 1,000,000 [07:33] mape: micheil: oh your is maintainer [07:33] mape: all other have maintainers [07:33] pkrumins: wowcrthere is no stresstest! i only see streamTest! [07:34] pkrumins: s/wowcr// [07:34] christkv has joined the channel [07:34] pkrumins: creationix: ^ [07:34] isaacs: micheil: fixed http://github.com/isaacs/npm/commit/b4aa6e4612557dc7a7dbad0336d68abd83458ce0 [07:34] pkrumins: creationix: or saveTest [07:34] micheil: isaacs: kewl. [07:35] micheil: mape: maintainers? [07:35] creationix: pkrumins: sorry, it didn't take my last push [07:35] mape: micheil: just change the key and it should work [07:35] virtuo has joined the channel [07:35] creationix: try again [07:35] mape: yes [07:35] pkrumins: creationix: pulling! [07:35] pkrumins: creationix: crashes! [07:35] micheil: mape: sorry? http://github.com/isaacs/npm/blob/master/package.json#L4 [07:35] pkrumins: lemme create a past [07:35] pkrumins: lemme create a paste [07:35] creationix: pkrumins: really, works for me on osx and linux [07:36] pkrumins: crashes with no 'on' event [07:36] mscdex: works for me too [07:36] creationix: node v0.1.100-dev [07:36] mscdex: the delay isn't that long [07:36] mape: "maintainer":[{"name":"miksago" [07:36] mape: "maintainers":[{"name":"mape" [07:36] pkrumins: wait sorry [07:36] pkrumins: no 'on' method on 'process' [07:36] mape: micheil: see the difference? [07:36] creationix: pkrumins: ohh, your node is too old [07:36] pkrumins: creationix: http://pastebin.com/1ZqVdHAh [07:36] creationix: change it to addListener [07:36] pkrumins: i thought i had 0.1.100! [07:36] creationix: yeah, "on" was added after 0.1.100 [07:36] mape: micheil: oh em something npm generates? [07:36] pkrumins: oh. [07:36] pkrumins: what does on do btw? [07:36] mscdex: 'on' came after 0.1.100 [07:36] creationix: same thing, just shorter [07:37] mape: isaacs: Any idea why micheils project get singular on the "maintainers" key? [07:37] isaacs: mape: yeah, the registry generates a "maintainers" list which is the users who have access to modify the document [07:37] micheil: isaacs: is npm setting a maintainer / maintainers variable? [07:37] pkrumins: 0.1.100 is the latest on nodejs website (unless a new one was released today) [07:37] micheil: k [07:37] isaacs: whoa, that's odd. [07:37] mape: isaacs: But only micheils is singular, everyone else is plural [07:37] pkrumins: creationix: got it [07:37] creationix: pkrumins: no, I'm using the ivy version which is HEAD from yesterday [07:37] creationix: pkrumins: ok, so you saw the pause [07:37] pkrumins: not yet, just changed it, now running [07:38] mscdex: creationix: fwiw i ran the stress test, it only pauses for me a second or two at the most, and then the rest of the "length: xxxx" statements are displayed quickly afterwards [07:38] pkrumins: creationix: TypeError: Object # has no method 'addEventListener' [07:38] pkrumins: creationix: object was 'process' [07:38] creationix: mscdex: correct because it's only 100,000 [07:38] creationix: mscdex: change the NUM to 1,000,000 in the test [07:38] pkrumins: oh [07:38] mscdex: ah [07:38] pkrumins: just addListener [07:38] pkrumins: not EventListener [07:38] isaacs: mape: oh, weird... yeah, just for that one record, apparently. [07:38] creationix: pkrumins: right [07:39] mape: hehe yeah [07:39] isaacs: must've been a typo when i went through and set the first 10 or so packages by hand. [07:39] pkrumins: creationix: yes, a huge pause. [07:39] pkrumins: wow, impossible pause. [07:39] creationix: ohh, I can strace on linux [07:39] pkrumins: it doesn't even finish running here [07:39] pkrumins: takes forever [07:40] pkrumins: real 0m44.958s [07:40] creationix: hmm, strace doesn't seem to have anything [07:40] creationix: it's all user-space [07:40] isaacs: good night folks [07:40] mape: nn [07:40] pkrumins: strace won't show anything.. yeah. [07:41] mape: micheil: there you go, works like it should [07:41] micheil: k [07:41] gawker2 has joined the channel [07:41] creationix: but the sampler is osx (part of activity monitor) said it was all __memcpy under some v8 shift [07:43] creationix: heh, I like testing on my remote server better, it doesn't burn my lap [07:43] pkrumins: creationix: memcpy is userspace, it's libc. [07:43] creationix: yeah, though so [07:43] creationix: it's got to be some lazy initialization getting forced by something in fs.write [07:43] locks has left the channel [07:43] jan____: mscdex: now that would have been smart :) — Thanks! [07:43] creationix: there has got to be a workaround [07:44] creationix: maybe I'll make a simplified test case and send it to the mailing list [07:44] creationix: some of the v8 guys read there [07:45] augustl has joined the channel [07:45] creationix: pkrumins: mscdex: if either one of you have any ideas let me know [07:45] creationix: otherwise I think I'll call it a night and send the test case to the mailing list [07:45] augustl: so, my node project has a few dependencies. What's a nice step forwards from my current git submodules and symlinks setup? [07:46] jblanche has joined the channel [07:48] creationix: augustl: ivy or npm [07:48] augustl: tnx :) [07:48] creationix: ivy is a customizable node distro, npm is a package manager [07:48] creationix: creationix/ivy and isaacs/npm on github [07:49] mscdex: that's weird.. [07:49] creationix: mscdex: what's that? [07:49] sooli: I have this pb [07:49] sooli: http://github.com/visionmedia/express/issues/issue/330 [07:49] mscdex: when i run the loop in stresstest twice, there's a line that's displayed that says "length: 9" in between "length: 102972" and "length: 99992" [07:49] sooli: how can I handle it ? [07:50] mscdex: heh [07:50] creationix: mscdex: how strange [07:51] mscdex: yeah, i just copied and pasted the for loop right after the first one [07:51] mscdex: i also noticed it pauses right before it displays that too [07:51] mscdex: that 9 [07:51] Oski has joined the channel [07:51] creationix: that should just do double the inserts [07:51] mscdex: it's reproducible too [07:51] creationix: yeah, the pause is caused by the pushes to the queue for sure [07:53] sveisvei: ACTION ..just forcefully removed a wisdom tooth, need som sympathy [07:53] creationix: sveisvei: ouch [07:53] mscdex: that wasn't very wise ;-) [07:53] sveisvei: hehe [07:54] creationix: mscdex: oh wait, maybe it's not the push [07:54] creationix: I'm calling process.nextTick on every insert [07:54] creationix: I'll bet those are fairly heavy [07:54] mscdex: hmm [07:55] creationix: yeah, all the 1,000,000 process.nextTick events were fireing at the same time after the fs.write call [07:55] creationix: and since they are priority, they jumped in front of fs.write's event [07:56] mscdex: ah [07:56] creationix: I got 28k inserts/sec [07:56] creationix: but the million finishes now! [07:56] mscdex: cool [07:57] creationix: mscdex: thanks for helping [07:57] mscdex: no problem [07:59] teemow has joined the channel [08:08] bpot has joined the channel [08:09] hellp has joined the channel [08:10] V1 has joined the channel [08:10] Tim_Smart1 has joined the channel [08:14] aliem has joined the channel [08:15] Tim_Smart1 has joined the channel [08:16] Oski has left the channel [08:16] k23z: where do I get npm ? [08:16] k23z: how do I get it installed [08:16] k23z: ? [08:21] qFox has joined the channel [08:23] V1: k23z: read http://github.com/isaacs/npm [08:25] V1: Oh V8 now also supports Object.seal / isSealed. sweet :) [08:26] felixge has joined the channel [08:26] felixge has joined the channel [08:26] yatiohi has joined the channel [08:27] mscdex: V1: yup, and it's in the head version of node :-) [08:27] mscdex: seal and freeze [08:28] V1: Yeah i noticed, kinda cool how fast these features get implemented in to V8 & node as well [08:35] mscdex: bah, i can't have an inheritance chain with sys.inherits [08:35] mscdex: :\ [08:35] mscdex: not cool [08:38] TomY has joined the channel [08:43] wilmoore has joined the channel [08:44] markwubben has joined the channel [08:46] xla has joined the channel [08:57] bpot has joined the channel [08:57] javajunky has joined the channel [08:57] creationix has left the channel [08:59] MrTopf has joined the channel [09:27] bvleur has joined the channel [09:28] bvleur: Hi. Does anyone know of any gettext like i18n for node? (I googled) [09:38] dgathright_ has joined the channel [09:42] mikeal has joined the channel [09:46] maushu has joined the channel [09:48] sooli: My server always crash with this error [09:48] sooli: "This type of response MUST NOT have a body." [09:48] sooli: any idea ? [09:49] maushu: You are probably sending a response that must not have a body. [09:49] maushu: :3 [09:49] aubergine has joined the channel [09:49] Tim_Smart: Probably a HEAD request [09:49] maushu: ^ [09:50] sooli: a curl --head http://myapp can reproduce it [09:50] agnat has joined the channel [09:50] sooli: how can I fix it ? [09:51] maushu: Just send an empty body when you see a request.method == "HEAD" [09:51] sooli: server script side ? [09:51] maushu: Yes. [09:55] V1: It's a bit harsh that node crashes than [09:55] sooli: if(req.method == "HEAD") { req.body = null; } [09:55] sooli: don't work ... [09:56] sooli: do you have any working code ? [09:57] markwubben_ has joined the channel [09:59] sooli: noone ? [10:00] sooli: how can I set an empty body ? [10:04] sooli: maushu: ? [10:04] maushu: sooli: response.end(); [10:05] maushu: Without any response.write(); before. [10:07] sooli: maushu: you just saved my day :) [10:10] maushu: I'm batman. [10:19] jetienne has joined the channel [10:19] shimondoodkin has joined the channel [10:21] fermion has joined the channel [10:23] mklappstuhl has joined the channel [10:25] hojberg has joined the channel [10:35] towski has joined the channel [10:42] proppy has joined the channel [10:45] proppy: Hi, does someone would have a 2+ lines description suitable for npm debian package, http://www.debian.org/doc/debian-policy/ch-binary.html#s-descriptions ? [10:45] proppy: the ITP suggests: "npm provides management of Node.js JavaScript applications similar in spirit to Python's eggs and Ruby gems." http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=587525 [10:45] alexpercsi has joined the channel [10:45] proppy: is it correct "english" ? [10:49] proppy: is it a suitable description of npm ? [10:52] proppy: maybe: "npm provides management of node.js javascript libraries and applications: it allows to publish, tag, and install and handle dependencies of node.js modules" [11:00] dji has joined the channel [11:05] c4milo has joined the channel [11:06] Ori_P has joined the channel [11:07] fdmanana has joined the channel [11:10] V1: proppy: No mention that it uses the common js spec for packaging? [11:17] towski has joined the channel [11:17] alexpercsi has joined the channel [11:20] mklappstuhl has joined the channel [11:31] proppy: V1: sure, "npm provides management of node.js javascript libraries and applications: it allows to publish, tag, and install and handle dependencies of node.js modules using common.js packaging spec" [11:31] proppy: what do you think ? [11:34] V1: Looks fine to me, except its JavaScript not javascript ;) [11:34] V1: npm provides management of node.js javascript libraries and applications: it allows to publish, tag, and install and handle dependencies of node.js modules using common.js packaging spec [11:34] V1: o [11:35] V1: didn't mean to paste -_- [11:36] proppy: ok :) will mail the future package maintainer then [11:36] proppy: thanks a lot V1 [11:41] eee_c has joined the channel [11:42] aliem_ has joined the channel [11:51] tmedema has joined the channel [11:57] aheckmann has joined the channel [12:03] jetienne has joined the channel [12:05] chrischris has joined the channel [12:16] Astro has joined the channel [12:17] bvleur has joined the channel [12:23] olegp has joined the channel [12:24] aliem has joined the channel [12:25] victorstan has joined the channel [12:26] locks has joined the channel [12:27] bvleur has joined the channel [12:27] c4milo has joined the channel [12:29] jherdman has joined the channel [12:34] kriszyp has joined the channel [12:43] blackdog has joined the channel [12:44] rolfb has joined the channel [12:52] bigfleet has joined the channel [12:54] siculars has joined the channel [12:55] markwubben has joined the channel [12:56] V1: Hmz... [12:58] V1: I got the feeling that the net.Stream doesn't emit the "data" callback as much as it should.. I did 3 writes to the stream but only recieved 2 "data" callbacks [13:02] devongovett has joined the channel [13:08] romainhuet has joined the channel [13:13] rolfb has joined the channel [13:15] V1: Is there any reason why the would only be 3 "data" callbacks when I write to the net.Stream 10x? http://gist.github.com/478345 [13:15] pgriess has joined the channel [13:17] davidwalsh has joined the channel [13:19] kriszyp: V1: I don't think a stream implies framing, it just implies ordering, so there is no reason that the number of callbacks should equal the number of writes [13:21] locks has left the channel [13:22] CrabDude has joined the channel [13:24] V1: kriszyp: Would there be a way to overcome that limitation? [13:25] kriszyp: what limitation? are you wanting the data framed? [13:26] ben_alman has joined the channel [13:27] V1: In an ideal situation I would like to be notified of every response the Stream receives, it seems that node is buffering up the response before it emits the data callback: http://gist.github.com/478345#gistcomment-5734 [13:29] khug has joined the channel [13:30] kriszyp: right, streams are free to buffer. If you want to separate each individual message that is called framing. There are a number of strategies: msgpack, LF separated JSON messages, null-terminated strings, netstrings, web-sockets (00-msg-FF) [13:32] kriszyp: V1: here is a simple web-socket style framing I am using: http://github.com/kriszyp/multi-node/blob/master/lib/multi-node.js#L99-144 you could use [13:33] V1: kriszyp: Thanks, will look in to it. [13:37] robrighter has joined the channel [13:38] charlenopires has joined the channel [13:41] tswicegood has joined the channel [13:46] tbassetto has joined the channel [13:47] olegp has joined the channel [13:52] agnat has joined the channel [14:00] sveisvei has joined the channel [14:01] yatiohi has joined the channel [14:01] maushu: You know, I feel like making a honesty experiment. [14:01] satori has joined the channel [14:02] maushu: Make a domain seller that actually *helps* the users to transfer their domains to other hosts if they want. No hidden fees nor anything. [14:02] maushu: It would be fun to just watch the users explode because of the honesty overload. [14:03] hpoydar has joined the channel [14:05] tswicegood: maushu: it'd never work. Everyone would assume you were collecting emails and selling them to spammers or something... [14:05] teemow has joined the channel [14:07] SubStack: hooray, found a place to run my dnode chat example [14:08] SubStack: http://modzer0.cs.uaf.edu:8008/ [14:09] aliem_ has joined the channel [14:11] maushu: tswicegood: Well, I wouldn't advertise that much about honesty. Just the bases. [14:20] ceej has joined the channel [14:23] gf3 has joined the channel [14:24] eee_c has joined the channel [14:25] zaach has joined the channel [14:26] jakehow has joined the channel [14:28] JimBastard has joined the channel [14:30] JimBastard: ACTION says, 'Don't forget to bring a towel" [14:30] romainhuet has joined the channel [14:32] stepheneb has joined the channel [14:34] qschzt has joined the channel [14:35] figital has joined the channel [14:36] _figital has joined the channel [14:46] ajpiano has joined the channel [14:47] tmedema: Folks if I request a csv from a url (yahoo) it works fine in my browser, but if I do it in a node httpclient request I get a 404 [14:47] tmedema: any idea what could cause that? [14:47] shimondoodkin: host missing [14:47] shimondoodkin: in hhtp [14:47] shimondoodkin: http [14:47] tmedema: No the host is yahoo.com [14:47] tmedema: www.yahoo.com [14:47] shimondoodkin: is ther a redirect? [14:47] ph^ has joined the channel [14:48] JimBastard: tmedema: paste the direct link [14:49] herbySk has joined the channel [14:49] tmedema: yes when I changed the host to the subdomain.domain it gives me a 301 redirect.. the link is http://quote.yahoo.com/d/quotes.csv?s=INGA.NX&f=sxl1 JimBastard [14:49] shimondoodkin: the host is quote.yahoo.com [14:49] tmedema: yea just changed that [14:49] JimBastard: its just an http request [14:49] JimBastard: it should work [14:50] JimBastard: you must be making an error [14:50] tmedema: it does not JimBastard, returns me a 301 [14:50] JimBastard: try curling the address [14:50] shimondoodkin: no there is a blank redirect [14:50] tmedema: what does that mean shimondoodkin ? [14:50] JimBastard: http://download.finance.yahoo.com/d/quotes.csv?s=INGA.NX&f=sxl [14:51] JimBastard: use that [14:51] JimBastard: tmedema: [14:51] JimBastard: shimondoodkin: is right, there are two redirects [14:51] shimondoodkin: i ment that after you call your url it redirects [14:52] tmedema: alright [14:52] tmedema: how did you figure out the redirects? [14:52] tmedema: firebug or something? [14:52] meder_ has joined the channel [14:52] agnat has joined the channel [14:53] stride: http://ichart.finance.yahoo.com/table.csv + query string works, too [14:53] JimBastard: tmedema: yeah firebug net console [14:54] kevwil has joined the channel [14:54] JimBastard: load up the console first, then load the page [14:54] JimBastard: works like a charm [14:54] tmedema: which one is better to use stride ? [14:54] shimondoodkin: the http://download.fina [14:54] shimondoodkin: http://ichart.f might change [14:54] stride: hmkay, worked.. meh, that just made my java class for that thing deprecated.. [14:54] JimBastard: whats java [14:55] JimBastard: did you mean javascript? i dont think JS has classes [14:55] stride: no, I meant regular java.. [14:55] JimBastard: java.....script? [14:56] shimondoodkin: what did you doen with yahoo finance an d java? [14:56] shimondoodkin: s/doen/done/ [14:57] JimBastard: s/java/javascript [14:57] stride: just downloaded stock values within date ranges over that csv API [14:57] stride: JimBastard: no? [14:57] shimondoodkin: jim i am serious you hilarious ,LOL [14:58] JimBastard: i'll have to look into this whole "java" thing, is it like a subset of javascript? [14:58] shimondoodkin: oh you dont want to [14:58] shimondoodkin: it is a mess [14:59] stride: JimBastard: yeah, but it has more acronyms and even more consultants [14:59] JimBastard: but what if i need to very much enjoy building j2ee applications for enterprise business solutions [14:59] JimBastard: will my outsource team under generics?!?!? you see in java we have these things called generics. have you ever heard of them? [15:00] JimBastard: what do you mean javascript doesnt even support generics? that is not enterprise class i would enjoy using [15:00] JimBastard: how will we building solutions for our android mobile device [15:00] JimBastard: ACTION fucking hates the majority of java developers [15:01] stride: no kidding :) [15:02] shimondoodkin: i liked java it was fun at time of netscape 3.5 [15:02] SubStack: java makes me -_- [15:02] JimBastard: i liked java when i got to script it using coldfusion [15:02] JimBastard: that way i never had to look under the covers [15:02] shimondoodkin: lol [15:02] JimBastard: it was magic [15:03] shimondoodkin: it is like dot net winforms probably it was kind of ok [15:04] SubStack: it's amazing how much technology is absolute shit [15:06] quirkey has joined the channel [15:07] statim has joined the channel [15:08] bradleymeck_ has joined the channel [15:09] khug has joined the channel [15:10] creationix has joined the channel [15:10] statim has joined the channel [15:11] steadicat has joined the channel [15:11] brianmario has joined the channel [15:11] tswicegood has joined the channel [15:13] khug has joined the channel [15:13] olegp has joined the channel [15:15] tjholowaychuk has joined the channel [15:16] ceej: tjholowaychuk: morning, the Sencha labs banner you've added to expressjs.com is killing the form me banner in chrome (you can;t click on it) [15:17] tjholowaychuk: ceej: really? I can [15:17] tjholowaychuk: hmm [15:18] ceej: http://screencast.com/t/ZDllODIxM2Yt [15:19] tjholowaychuk: haha niiice man. ah, I clicked the bottom corner :( [15:19] tjholowaychuk: maybe i should remove it [15:19] tjholowaychuk: i think the z-index is above the banner so thats weird [15:19] ceej: give me a sec I'll give you a css fix :) [15:20] zapnap has joined the channel [15:21] khug has joined the channel [15:21] tjholowaychuk: my github example is dope lol [15:21] tjholowaychuk: not really, but handy [15:22] romainhuet has joined the channel [15:22] markwubben_ has joined the channel [15:23] augustl: http://github.com/ry/node/blob/master/lib/http.js#L180 - this is how you add event support to an object, right? [15:23] tmpvar has joined the channel [15:24] augustl: I'm doing this to create a stub socket http://gist.github.com/478490 [15:24] proppy: tjholowaychuk: about sensha 'view app' is 404 on http://touchsolitaire.mobi/ [15:24] augustl: that object doesn't get an addEvent method, though, for example [15:24] augustl: err, addListener [15:24] tjholowaychuk: proppy: works for me [15:25] proppy: tjholowaychuk: it is 404 if you view it with firefox 3.6.6 it goes to http://touchsolutaire.mobi/ [15:25] sudoer has joined the channel [15:25] tjholowaychuk: ah i tried chrome [15:25] tjholowaychuk: I dont have anything to do with the mobile lib tho :) [15:26] proppy: tjholowaychuk: just grepped you + sensha :) [15:26] tjholowaychuk: :D [15:26] proppy: feel free to told me where I could shoot a mail, if you don't want to do it [15:26] proppy: :) [15:27] augustl: anyone on adding event support to objects? Is this the right way to do it? http://gist.github.com/478490 [15:27] marshall_law has joined the channel [15:27] proppy: btw this is due to a bad redirect http://dpaste.com/218860/ [15:28] stepheneb has joined the channel [15:28] ceej: sweet just got my ssd :) http://www.amazon.com/gp/product/B003DS7IGK/ref=oss_product [15:28] augustl: it's not documented as far as I can tell :S [15:29] Rick__ has joined the channel [15:29] augustl: ceej: look forward to your next IO heavy git operation :) [15:29] augustl: or git in general, it's super-fast on SSDs. [15:30] ceej: augustl: :D it all adds to my beast of a machine http://screencast.com/t/NDc3M2U4 [15:30] augustl: ceej: that's a desktop right? [15:30] augustl: 2 CPUs, gotta be =P [15:31] ceej: mac pro 8 cpus [15:31] augustl: 8 cores at least :) [15:31] ceej: ye [15:32] augustl: so what are you gonna do to put 8 cores to good use? [15:32] tmpvar: yikes, I would _never_ spend that much on a mac [15:32] ceej: I have 4-6 vms running [15:32] augustl: ceej: what are they doing? [15:33] ceej: tmpvar: one of my companies got it for me... i would never spend that much either :) [15:33] tjholowaychuk: is the express guide menu way to long for anyone? trying to decide what to do with that [15:33] ceej: augustl: running all the flavors of IE and linux [15:33] javajunky: yeah it is a tad long … felt sluggish on my mbp [15:33] javajunky: ;) not saying I've got a solution min [15:33] javajunky: d [15:34] tjholowaychuk: hmmm [15:34] tjholowaychuk: oddly it feels sluggish on chrome but not safari [15:34] augustl: ceej: my 4gb ram dual core laptop handles 3 virtualboxes with IE pretty well [15:34] augustl: so I'd say that's aiming a bit high :) [15:35] javajunky: tjholowaychuk: yeah, fair comment I was in chrome [15:35] ceej: augustl: ye but free you can;t complain about :P [15:35] tjholowaychuk: javajunky: its probably due to the text stroke [15:35] augustl: ceej: indeed :) [15:35] tjholowaychuk: since there is soooo much text on one giant page lol [15:35] tjholowaychuk: stupid browsers [15:35] augustl: ceej: you should donate one core to protein foldings :) http://folding.stanford.edu/ [15:36] augustl: seti @ home, only something we can actually make use of [15:36] augustl: ACTION ducks [15:36] ceej: lol [15:38] augustl: one last time: what am I doing wrong? http://gist.github.com/478499 Trying to use the event module. [15:38] bradleymeck_: you didnt require events? [15:39] augustl: I did [15:39] augustl: if I didn't it'd error on events.EventEmitter.call(obj); [15:39] augustl: it's just a little higher in the original file ;) [15:40] ceej: man will heroku ever update lol [15:40] JimBastard: all hail king tjholowaychuk and his water breathers [15:40] ceej: wish should place bets [15:40] paulwe has joined the channel [15:40] tjholowaychuk: JimBastard: haha :p [15:40] augustl: ACTION was joking about "one last time" eariler [15:40] dmcquay has joined the channel [15:40] JimBastard: tjholowaychuk: you listen to superfast jellyfish at all? [15:40] tjholowaychuk: no lol [15:41] JimBastard: gorillaz? [15:41] JimBastard: http://www.youtube.com/watch?v=C4UtbrbsrjY [15:41] JimBastard: listen until you hit the line, you'll recognize it [15:41] aheckmann has joined the channel [15:42] micheil: tjholowaychuk: it's alive! http://github.com/miksago/jade-tmbundle [15:42] tjholowaychuk: haha sweet [15:42] tjholowaychuk: micheil: yay! ill check it out [15:42] tjholowaychuk: stoked [15:43] shimondoodkin: ACTION dont likes templates that you need to learn a new language for them [15:44] JimBastard: shimondoodkin: ive been using this really killer templating engine called html [15:44] JimBastard: its pretty easy [15:44] shimondoodkin: :) [15:44] tjholowaychuk: oOo [15:44] JimBastard: tjholowaychuk: does jade work client side at all? [15:44] tjholowaychuk: where do i learn about this "html" [15:44] tjholowaychuk: JimBastard: micheil has a port working on the client side [15:45] micheil: partial port [15:45] tjholowaychuk: I havent tried it yet but I want to put it on the site [15:45] micheil: the one in the repo is broken. [15:45] JimBastard: yeah, ive i was gonna welcome a new template overlord, it would at least have to be dual-sided [15:45] JimBastard: if i* [15:45] augustl: so, here's a full isolated example of my event fail. http://gist.github.com/478499 [15:46] tjholowaychuk: JimBastard: sorry :p I just have little interest in the client side lately [15:46] pavan_ has joined the channel [15:46] JimBastard: tjholowaychuk: :-\ [15:46] shimondoodkin: i am so exited i started to build a new website and got node js , a page response with database in 53 ms wow thats not php [15:46] tjholowaychuk: :) [15:47] augustl: shimondoodkin: did you use an app framework of some kind? [15:47] shimondoodkin: mine [15:47] augustl: cool :) [15:47] shimondoodkin: http://github.com/shimondoodkin/nodejs-mongodb-app/ [15:48] JimBastard: augustl: wtf you trying to do [15:48] joshbuddy has joined the channel [15:48] joshbuddy has joined the channel [15:48] tjholowaychuk: micheil: looks good man! my github theme does not do anything with the tags really but im sure I can tweak that [15:48] JimBastard: your code doesnt make sense to me [15:48] augustl: JimBastard: create an object that supports event listening and triggering [15:48] tjholowaychuk: ill add it to the repo as a link [15:48] JimBastard: augustl: new EventEmitter() [15:48] micheil: tjholowaychuk: github theme? [15:48] JimBastard: var foo = new EventEmitter() [15:49] augustl: JimBastard: what if I want to add events to an existing object? [15:49] tjholowaychuk: micheil: I have a github TM theme that looks pretty much just like their gists [15:49] tjholowaychuk: got so used to it now that anything else looks weird to me [15:49] micheil: ah [15:49] astrolin has joined the channel [15:49] micheil: yeah, looks sweet in my twilight theme: http://drp.ly/1nrs1j [15:49] JimBastard: augustl: you can like prototype it or something i think [15:49] augustl: JimBastard: http://github.com/ry/node/blob/master/lib/http.js#L180 [15:49] augustl: :S [15:50] augustl: isn't that exactly what I'm doing? [15:50] tjholowaychuk: micheil: ya that is sweet, ive been tempted to switch to twilight [15:51] micheil: tjholowaychuk: it works really well for me, looks pretty awesome for javascript as well. [15:51] tjholowaychuk: ill check it out [15:51] pdelgallego has joined the channel [15:54] JimBastard: augustl: that line you sent isnt the same at all [15:54] JimBastard: so, no it isnt exactly what you are doing [15:54] JimBastard: let me see if i can find a decent example [15:55] JimBastard: augustl: here is something, but its a bit advanced http://github.com/Marak/hook.io/blob/master/hookio/index.js#L66 [15:55] augustl: JimBastard: what's different? :O [15:55] JimBastard: im sure someone else can help you with easier example [15:55] pavan_ has joined the channel [15:55] augustl: JimBastard: events.EventEmitter.call(someObject); [15:56] augustl: exactly the same in both places [15:56] dshaw has joined the channel [15:56] JimBastard: augustl: you cant see the difference between a brand new empty object and "this" inside of a closure? [15:56] JimBastard: events.EventEmitter.call(this); [15:56] JimBastard: this !=== {} [15:56] augustl: JimBastard: of course I can [15:56] shimondoodkin: this !== {} [15:56] augustl: this is a pointer to something, though [15:57] augustl: and object :) [15:57] JimBastard: augustl: lol [15:57] JimBastard: good luck with that [15:57] augustl: then again, it's being done in an initializer function thinger. [15:57] augustl: JimBastart: what exactly is the difference technically speaking? [15:57] augustl: meh [15:58] augustl: anyone care to shed some light on that? [15:58] augustl: 'this' points to an object, no? Is events.EventEmitter somehow aware of the context it's being called in? [16:00] pavan_ has joined the channel [16:00] augustl: I guess the "magic" is in that 'this' points to whatever-it-is that 'this' is when you're doing new Something(); [16:00] Gruni has joined the channel [16:01] javajunky: augustl: http://howtonode.org/what-is-this ? [16:02] augustl: nope - updated the gist http://gist.github.com/478499 [16:03] augustl: javajunky: that article says nothing about what 'this' points to inside a constructor :S [16:04] javajunky: strange, I thought it did, but it was a while ago I grok'd it [16:04] mscdex: augustl: doesn't 'this' point to the instance? [16:04] augustl: yeah, that's what I assume [16:04] mscdex: that's what it's been from my experience [16:04] augustl: so we're no closer to explaining why http://github.com/ry/node/blob/master/lib/http.js#L180 works and http://gist.github.com/478499 doesn't :) [16:04] bradleymeck_ has joined the channel [16:05] mscdex: oh [16:05] mscdex: that's easy [16:05] podman has joined the channel [16:05] mscdex: you didn't inherit it [16:05] augustl: yay :) [16:05] podman: morning [16:05] augustl: doh, the line below [16:05] dshaw: When you use call(), you are defining the value of "this". In that context, it could potentially be undefined. [16:05] paulwe: augustl: sys.inherits(IncomingMessage, events.EventEmitter); [16:05] podman: i was wondering what the benifit of fronting node.js with nginx would be [16:05] mscdex: yep, what paulwe said [16:06] mscdex: er [16:06] mscdex: augustl: in your case it would be sys.inherits(Something, events.EventEmitter); [16:06] agnat has joined the channel [16:06] micheil: podman: simple: nginx is more secure due to age, so, less likely to have security issues [16:06] mscdex: augustl: put that line after the constructor definition [16:06] podman: micheil, ah, so it's just a security thing [16:07] micheil: podman: that's my understanding of it. [16:07] tjholowaychuk: javajunky: http://dl.dropbox.com/u/6396913/hello-world.express.png :) [16:07] podman: micheil, is there any performance hit? [16:07] mscdex: augustl: sys.inherits copies the prototype of the object in the second argument onto the object in the first argument [16:07] javajunky: that is what it is, sorta by definition the 'new' binds 'this' to the function's scope … as I understand it [16:07] micheil: hmm.. both are fairly similar in performance, but you do get some issues with non-http stuff [16:08] podman: micheil, that should be fine then, i'm only really worried about http for now [16:09] javajunky: tjholowaychuk: one thing I keep meaning to ask about these graphs, do they come back down again ?, they always get truncated when they spike upwards ? [16:09] bpot has joined the channel [16:09] tjholowaychuk: javajunky: thats the end of the 8000 requests, just shows the trend [16:09] tjholowaychuk: javajunky: ill try running a really long one [16:10] podman: also, i love nodejs + mongodb [16:10] podman: just saying [16:10] mscdex: node.js rules! [16:11] joshbuddy_ has joined the channel [16:11] podman: now i just have to figure out how to do upsets with the mongodb driver and i'll be all set [16:12] podman: upserts* [16:13] shimondoodkin: podman me too [16:13] tjholowaychuk: javajunky: same thing pretty much http://dl.dropbox.com/u/6396913/hello-world.express.png [16:13] podman: shimondoodkin, i haven't really looked into it, but i can't see it being that difficult [16:14] shimondoodkin: i have just got it working in http://github.com/shimondoodkin/nodejs-mongodb-app/ [16:14] shimondoodkin: i have lerned from exemples of humming bird [16:14] podman: ah [16:14] podman: good idea [16:15] kriszyp_ has joined the channel [16:15] javajunky: tjholowaychuk: does it not strike you as 'strange' that the two graphs are basically identical over twice the distance ? [16:15] javajunky: (I note you changed the con-currency level) [16:15] tjholowaychuk: yeah kinda funky [16:16] tjholowaychuk: wonder wtf ab is doing [16:17] shimondoodkin: is there a way to make pause during a function and resume to ther on callback ? [16:17] tjholowaychuk: javajunky: oh well they are just for pointless fun anyways :D [16:18] javajunky: tjholowaychuk: ;) I bet people cite them though [16:18] tjholowaychuk: probably [16:18] javajunky: remind me how do I generate the benches [16:18] tmpvar: shimondoodkin, i think you are talking about coroutines, which is a no for the time being [16:19] tjholowaychuk: javajunky: I dont have the scripts bundled anymore its just stuff on my laptop [16:19] tjholowaychuk: used to be make benchmarks or something [16:21] javajunky: yeah I tried that ;) [16:23] podman: so i'm not sure if this is really on-topic at all [16:23] KungFuHamster_: no nick changes sucks because I have to leave this channel to fix a disconnect [16:23] KungFuHamster_ has left the channel [16:23] aconbere has joined the channel [16:23] podman: but i'm looking at the hummingbird example and i dont' see where it's sepcifiying the document to update.... http://github.com/mnutt/hummingbird/blob/master/lib/metric.js#L70 [16:24] devongovett: is it possible to shorten 'var obj = {}; obj[prop] = value' into a single line? 'var obj = ({})[prop] = value' does not work - returns true [16:24] javajunky: http://www.yes-no-cancel.co.uk/2008/10/27/load-performance-testing-a-rails-application-with-apachebench/ [16:24] javajunky: tjholowaychuk: this chart looks remarkably 'similar' [16:24] javajunky: tjholowaychuk: is your bottom axis definitely what you think it is ? [16:25] amerine has joined the channel [16:25] SubStack: devongovett: var obj = { prop : value } [16:26] tjholowaychuk: javajunky: thats a lot to read haha [16:26] tjholowaychuk: one sec [16:26] SubStack: oh, unless prop is a variable hmmm [16:26] devongovett: SubStack: no, because prop is a variable [16:26] javajunky: tjholowaychuk: just look at the graphs, they all offer a similar shape to yours … [16:26] tjholowaychuk: very true [16:27] javajunky: so I wonder if the bottom axis is representing %age returned within time.. [16:29] tjholowaychuk: javajunky: hmm im using the "wait" col, I remember checking out the ab source to figure out what they were doing [16:29] devongovett: SubStack: looks like Object.defineProperty is the answer. it is supported by v8. https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/defineProperty [16:30] tjholowaychuk: javajunky: all three trailing columns look pretty much the same in the output [16:31] podman: ah, i guess if i do something like metric.collection.update({id: documentID, thingToIncrement: field, "$inc": 1}); that would be the same thing [16:34] aconbere: devongovett: why not just make a small helper method [16:34] aconbere: var newObject = function (keyValues) { var o = {}; keyValues.forEach(function (kv) { o[kv[0]] = kv[1] }); return o }; [16:34] aconbere: you could even add it to Object if you felt so inclined [16:35] javajunky: tjholowaychuk: can you throw up the out.dat somewhere? [16:35] tjholowaychuk: javajunky: yup one sec [16:35] devongovett: aconbere: it is already there - Object.defineProperty({}, prop, { value: val }) https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/defineProperty [16:36] devongovett: aconbere: supported by node/v8 so that is all I need! [16:36] devongovett: aconbere: thanks, though! [16:37] eee_c has joined the channel [16:37] tjholowaychuk: javajunky: hah i was getting a 413, so here is the first 1000 https://gist.github.com/84ced5782337f22c8482 [16:37] creationix has joined the channel [16:38] tjholowaychuk: javajunky: last 1000 https://gist.github.com/84ced5782337f22c8482 [16:38] figital has joined the channel [16:40] javajunky: yeah I think that the data needs re-org'ing before charting by the startime or something, meh, I'll drag out your old benchmark scripts later maybe and see if I can make sense of it ;) . …. still looks to me like the chart's doing a %age completed within time lark ;) [16:40] creationix: bradleymeck: you were the one having issues with nStore right? [16:40] javajunky: g2g [16:43] mape: creationix: nstore isn't in npm? [16:43] creationix: mape: it is, but not the latest version [16:43] creationix: I couldn't get nstore working last night [16:43] mape: I can't list it? [16:43] creationix: mape: "nStore" [16:43] mape: oh, that is.. annoying? :P [16:43] softdrink has joined the channel [16:43] creationix: rather, I couldn't get npm working last night [16:44] creationix: I finally got nStore working [16:45] b_erb has joined the channel [16:45] jakehow has joined the channel [16:47] robotarm_ has joined the channel [16:48] bradleymeck_: anyone ever use a regexp w/ "^" to check for start of input without it being multiline? [16:48] creationix: bradleymeck: yeah, why? [16:49] bradleymeck_: wondering what for since it always will check start of string, noticed my regexp normalization cant really emulate that [16:50] bradleymeck_: can manually check index i guess [16:50] tjholowaychuk: i use that all the time too [16:51] bradleymeck_: i virtually never do withou /m [16:51] bradleymeck_: without* [16:52] bradleymeck_: anyidea how to emulate a ^ in /mg coming from a /g? [16:54] rauchg_ has joined the channel [16:54] steadicat has joined the channel [16:57] mjr_ has joined the channel [16:58] khug has joined the channel [16:59] ryah: hello [16:59] bradleymeck_: yello ryah [16:59] mscdex: man, it's hard to get used to PHP after using js for so long [16:59] mscdex: i kept using + instead of . [16:59] mscdex: heh [17:00] mscdex: for strings [17:00] mscdex: which kept giving me numeric output :-> [17:00] tjholowaychuk: mscdex: blah->that->sucks->php->is->brutal(); [17:01] ako: $i $always $forget $to $add $those $completely $pointless $dollar $characters $all $over $the $place [17:01] mscdex: i don't mind PHP [17:01] mscdex: it has nice features that js doesn't have [17:01] podman: gah i hate php [17:01] meder_: php is horrible [17:01] tswicegood: PHP is good at what its meant to be... [17:01] mjr_: I like that PHP lets you do this: $foo = "Hi $first, thanks for spending $value on $item."; [17:01] mklappstuhl has joined the channel [17:01] ako: being a template engine? [17:01] ako: <: [17:01] meder_: a primitive language for simple personal home pages [17:01] tswicegood: a solid glue language for getting things to the web just about anywhere [17:02] mscdex: meder_: uh, what? [17:02] meder_: ? [17:02] mscdex: explain your rationale [17:02] meder_: another time [17:02] mscdex: heh.... [17:03] mape: meder_: like facebook? :) [17:03] meder_: eh? that's c++. [17:03] ako: like facebook's scalability issues? ;> [17:03] mape: ako: any language that wouldn't have scalability issues at that size? [17:04] mjr_: what with Facebook being the most visited site on the internet and all. [17:04] tswicegood: languages don't present scalability issues - bad code does [17:04] bradleymeck_: that is rather annoying that you cant check for start of string in a multiline regex, what if i dont wants any start of lines [17:04] ako: java performs quite a bit better for example [17:04] ako: (also better than that hiphop compiler thing) [17:04] mscdex: ew java [17:04] mscdex: ;-) [17:04] qschzt: yay scala [17:05] tswicegood: bradleymeck_: eh? anything you can do with perl regex are available in preg_* [17:05] bradleymeck_: in JS? [17:05] mscdex: the only thing java is good for is applets, and that's only because they're well-supported in browsers and can do advanced stuff [17:05] tswicegood: bradleymeck_: yup [17:06] ako: yay scala <- also, javascript (rhino) [17:06] aconbere: all those new fangled jvm languages are just so geared towards people already writing java [17:07] qschzt: yeah, I am using scala + akka + rhino ;) [17:07] aconbere: what about all of us who have managed to /avoid/ writing java [17:07] mjr_: Why is there so much hate for Rhino? [17:07] mjr_: Other than slow startup times, isn't it a reasonable way to run JavaScript? [17:07] tjholowaychuk: so slow [17:07] qschzt: pretty slow yeah [17:07] ako: still faster than cpython, i guess :> [17:07] mjr_: yeah? Even with modern JIT JVMs, etc? [17:08] lucas-: aconbere: you get a huge amount of horribly overengineered libraries for free though [17:08] astrolin_ has joined the channel [17:08] ako: iirc rhino got two modes: interpretion and compilation [17:08] aconbere: lucas-: and so many great ways of finding and installing them! :) [17:08] ako: the latter should be somewhat ok-ish [17:09] bradleymeck_: rhino is fine i just personally didnt like the community [17:10] ako: mmh... the shootout lacks rhino benchmarks :l [17:10] V1 has joined the channel [17:10] lucas-: aconbere: somehow you don't sound like you've managed to avoid java very well :P [17:12] dgathright_ has joined the channel [17:12] bradleymeck_: only thing i wish i had in JS that java has is a good shared closure system where i can access other objects of the same Types constructor closures /drool [17:13] benburkert has joined the channel [17:14] WALoeIII has joined the channel [17:14] javajunky has joined the channel [17:16] aconbere: lucas-: I've tried to pick up clojure and scala during the last couple years, and failed a few times because I get mired in the fact that Java is just a horendous beast of an architecture :) [17:16] jmar777 has joined the channel [17:16] aconbere: that's the full extent of my java experience [17:17] bradleymeck_: the jni ruined it for me whenever i need something off a system [17:17] liucougar has joined the channel [17:18] bradleymeck_: java is very good at what it does, being a closed system, but that strength can hurt soo painfully if you need to put something in it [17:19] javajunky: bradleymeck_: intrigued, what do you mean by closed ? [17:21] ryah: wasn't there some description of node involving an octopus? [17:21] bradleymeck_: means that, barring you producing a leak through exposing to the outside something inside the system (jni/java's native lib/etc), the internal state of the system is clearly defined, and the native lib is rather brutal in checking what you are throwing at it [17:22] javajunky: bradleymeck: (not intending to troll here, btw just interested).. how does that differ from say node.js where one has to compile in C/Python to extend the native libs (and as you say introduce risk of leaks etc.) [17:23] bradleymeck_: doesnt really, but closed systems can be nested and have interesting properties, once the std lib for node is more thoroughly tested it will serve basically the same [17:23] mjr_: ryah: In case you can't find it, let me supply one: Node is a lot like an octopus, especially as relates to non-blocking World Cup predictions. [17:24] bradleymeck_: cause it puts its your arms in 8 places at once w/ callbacks? [17:24] javajunky: bradleymeck: fair [17:24] tjholowaychuk: javajunky: its so nice having that cruft out of express (ext / class / other dependencies) [17:24] ryah: mjr_: :) [17:24] javajunky: tjholowaychuk: yeah I tweeted earlier about enjoying the lack of global pollution ;) [17:24] tjholowaychuk: thats my beef with geddy right now too it chucks so much in one little repo that is not even related really [17:24] tjholowaychuk: javajunky: yay :D haha [17:24] javajunky: tjholowaychuk: long time coming [17:24] bradleymeck_: well that would also require node to have more code injection blocking which i dont think v8 has [17:24] tjholowaychuk: I knew there would be a rewrite sooner or later so I didnt want to bother [17:24] javajunky: tjholowaychuk: I think geddy's embrace of the model is nice, and the different files for controllers etc. familiar :) [17:25] tjholowaychuk: javajunky: ya for sure, i dont want to impose directory structure on people though [17:25] tjholowaychuk: thats for them to decide [17:25] javajunky: tjholowaychuk: indeed, there are advantages (as I'm sure you know) to conventions though [17:25] jtoy has joined the channel [17:25] bradleymeck_: advantages until you have to move o n [17:25] javajunky: but we know from the mailing list the one convention in there (public) is often mis-understood/hated ;) [17:26] tjholowaychuk: what do you mean [17:26] tjholowaychuk: i barely watch the mailing list.. haha.. ill try and start [17:26] javajunky: everyone's always wanting different default routes for the static plugin [17:27] javajunky: tjholowaychuk: well ok, 2 people might have once asked ;) [17:27] saikat has joined the channel [17:27] tjholowaychuk: oh well that problem does not exist anymore [17:27] javajunky: tjholowaychuk: fighting with siege to try and get correlating data [17:28] benburkert has joined the channel [17:30] creationix has joined the channel [17:31] javajunky: tjholowaychuk: hmmm perhaps I should sack off this benchmarking and get on with porting ;) .. but those graphs bother me, there's something wrong there. [17:31] tjholowaychuk: javajunky: its nice too because without this clutter Express could potentially be a framework-framework as well [17:31] tjholowaychuk: javajunky: ya i know what you mean, I would not mind looking into it more eventually too [17:32] javajunky: tjholowaychuk: well I think I'll start with the session plugins [17:32] creationix has joined the channel [17:32] tjholowaychuk: javajunky: we have session stuff for Connect [17:32] javajunky: tjholowaychuk: but the auth stuff is uber-hnday *sigh* too much to do not enough time [17:32] javajunky: tjholowaychuk: yeah, I was going to port the mongo session and the the session-in-cookie-session [17:32] javajunky: I saw you had a redis one. [17:32] tjholowaychuk: javajunky: ah :) yup [17:33] tjholowaychuk: I have another project that will help normalize that stuff a bit [17:33] javajunky: tjholowaychuk: oh good another re-write ;) [17:33] tjholowaychuk: no lol [17:33] tjholowaychuk: no rewrite [17:34] javajunky: what's connect's git location, I'll take a look at the session stuff. [17:34] tjholowaychuk: javajunky: should be at http://github.com/senchalabs/Connect [17:34] javajunky: cheers I always forget the spelling of 'sencha [17:34] javajunky: ;) [17:36] sh1mmer has joined the channel [17:36] javajunky: tjholowaychuk: is there a reference middleware anywhere for connect ? [17:36] javajunky: tjholowaychuk: (I can look at the contrib stuff obviously) [17:37] tjholowaychuk: javajunky: I think we need to push the gh-pages branch back up [17:37] tjholowaychuk: for the docs [17:37] tjholowaychuk: but ./docs should have that stuff [17:37] javajunky: k [17:39] mtodd has joined the channel [17:42] TS_ has joined the channel [17:43] tjholowaychuk: creationix: although use(foo(), '/bar'); is kinda ugly but people are getting confused with use('/', foo()) at least we could then have use(foo()) for implicit '/' [17:43] tjholowaychuk: or simple type check to support both [17:44] creationix: I guess so [17:44] creationix: don't want it too confusing [17:44] mikeal has joined the channel [17:44] creationix: I want the mount point first if there at all [17:44] creationix: but defaulting to "/" is fine [17:44] tjholowaychuk: ya im cool with that [17:45] tjholowaychuk: express people are just relating it to express routing so they are like wtf why would you route middleware [17:47] JimBastard has joined the channel [17:48] aheckmann: what is the "/" for anyway? [17:49] tjholowaychuk: its just the default [17:49] tjholowaychuk: im going to change that cuz its dumb [17:49] tjholowaychuk: and confusing [17:50] aheckmann: but what does it do? [17:50] tjholowaychuk: basically you can have middleware that ignore a base path [17:50] tjholowaychuk: and potentially you could have an app "mounted" to a path [17:50] aheckmann: gotcha [17:51] tjholowaychuk: so if I wrote an Express blog you could do something like app.use('/blog', require('some-blog')) [17:51] tjholowaychuk: without hard-coding /blog/foo in the app itself [17:51] tjholowaychuk: but i kinda doubt most people will catch on to that sorta thing [17:51] aheckmann: ah, so in the middleware it wouldn't see /blog ata all [17:51] creationix: yeah, it's a lot like unix mount [17:52] tjholowaychuk: i should add an express example for that actually [17:52] aheckmann: that's nice [17:52] creationix: tjholowaychuk: pgriess would like it if we were able to accept http.Server instances as middleware too [17:52] creationix: we'd just have to pull the request handler out of it [17:52] pgriess: amen [17:52] tjholowaychuk: creationix: you can, or do we just have connect.Servers right now? [17:52] tjholowaychuk: if not then ya that would be nice [17:53] creationix: tjholowaychuk: not sure, haven't tested [17:53] tjholowaychuk: we have one or the other [17:53] tjholowaychuk: I know you can with connect Server's [17:53] creationix: tjholowaychuk: and we can even go as far as look for 404 responses and fall through [17:53] creationix: not sure I want that though [17:54] tjholowaychuk: ill write an example for express and see how it feels currently [17:54] creationix: ok [17:54] figital has joined the channel [17:54] Ori_P has joined the channel [17:54] creationix: so express is a subclass of connect? [17:55] creationix: tjholowaychuk: btw, I've pulled spark into it's own repo, they are both bundled with Ivy [17:55] tjholowaychuk: creationix: cool cool just saw that [17:55] tjholowaychuk: yup express.Server is a connect.Server [17:55] creationix: and I just updated the node binaries to be latest head [17:55] creationix: with the new V8 version [17:58] creationix: hey anybody have recent monit experience [17:58] creationix: ? [17:59] creationix: I'm willing to try it again using spark [18:00] creationix: no, not monit, I want just upstart [18:00] creationix: monit is overkill [18:00] tjholowaychuk: i like monit just not its weird config [18:00] tjholowaychuk: *annoying* config [18:00] creationix: this seems like a good tutorial http://geeknme.wordpress.com/2009/10/15/getting-started-with-upstart-in-ubuntu/ [18:01] creationix: I seem to remember some little things didn't work with the tut on howtonode [18:02] mattly has joined the channel [18:03] tswicegood has joined the channel [18:03] shimondoodkin: maybe anybody wants to help with creative exampeles for extend/mixin/merge , http://piratepad.net/QvDRXoLQ0L [18:04] astrolin has joined the channel [18:06] maqr: ok, i'm pretty new at proper OO javascript coding, but this just doesn't make sense to me: https://gist.github.com/e944b5439ea08dd408ca <-- xml2js.js works (but seems like the wrong way to code), xml2js-broken.js doesn't work and error is in the comment (but i have no idea what's causing it) [18:07] tjholowaychuk: creationix: I think we need to update the examples then too so that we dont export the server [18:07] tjholowaychuk: since we dont have connect(1) there anymore [18:07] creationix: tjholowaychuk: no, we still want to export the apps, just use spark instead of "connect" [18:08] tjholowaychuk: creationix: but we dont ship spark with connect so it would be confusing to people trying to check out the examples [18:08] tmpvar has joined the channel [18:08] creationix: spark is a dependency [18:08] creationix: and I ship them together with ivy [18:08] bradleymeck_: maqr call inherits before you mess w/ a prototype [18:08] creationix: but yeah, the examples like config can move to the spark repo [18:09] tjholowaychuk: creationix: im jus talking about the connect examples [18:09] tjholowaychuk: it shouldnt be required to use spark [18:09] creationix: tjholowaychuk: I guess it's not technically required, but it's the recommended way [18:09] creationix: I want everyone using spark for connect [18:10] maqr: bradleymeck_: you're right... but why did that change anything? (i'm on to a new error now) [18:10] rictic has joined the channel [18:10] bradleymeck_: sys.inherits overrides the prototype of a function [18:10] creationix: tjholowaychuk: up to you, I'm fine if the examples work standalone [18:10] creationix: as long as we move the other examples to the spark repo [18:11] maqr: bradleymeck_: oh, is there any concept of 'extends' that i should be using instead? [18:11] bradleymeck_: no multiple inheritance or interfaces in js, just type chains (i wish i had those...) [18:11] bradleymeck_: nope it is prototypal [18:12] creationix: "proper OO javascript coding" does that exist? [18:12] paulwe: is there any way to instantiate an object from a string name? like var foo = new "Bar"(...); [18:12] bradleymeck_: yes but it is prototypal OO not inheritence [18:12] bradleymeck_: which Bar are you hoping to get? [18:13] maqr: creationix: i hope so :) [18:13] paulwe: bradleymeck: random user functions, nothing in particular [18:13] creationix: maqr: what I mean is that there is no single right way, there are many ways to do it [18:13] bradleymeck_: if its in a var and not global you can use eval... if its global (function(){return this})()["Bar"] [18:13] maqr: creationix: i'll be happy if i can get what you call 'Classical OOP' on your blog to work [18:14] bradleymeck_: cant maqr, just close [18:14] bradleymeck_: oh dont know how he stated it on his blog *goes to read* [18:14] maqr: http://howtonode.org/prototypical-inheritance [18:14] creationix: maqr: just create a constructor function and then make a prototype for instances [18:15] mscdex: yay, handling static file servering works in grappler now! \o/ [18:15] paulwe: bradleymeck_: i was hoping to avoid that... :( i'm trying to expose object references to an rpc interface so the class names can't be trusted... i guess with some sanitizing... [18:15] maqr: creationix: i'm working on that :) [18:15] paulwe: bradleymeck_: ty [18:15] mscdex: s/servering/serving [18:15] maqr: https://gist.github.com/e944b5439ea08dd408ca <-- any thoughts on why 'this.sax' wouldn't be defined for me, when i've defined it in the 'constructor'? [18:16] eisd_ has joined the channel [18:17] mscdex: maqr: in streamTest.js, line 15 should probably be: var x2js = new xml2js.Parser(); [18:18] mklappstuhl has joined the channel [18:18] maqr: mscdex: err yeah, it is, sec, i need to update the paste :) [18:19] maqr: mscdex: but just in xml2js-broken.js, in Parser.prototype.parseString, somehow "this.sax" isn't defined... even though the constructor shows "this.sax = ..." [18:19] mscdex: i don't see anything else wrong with it then [18:19] solidsnack has joined the channel [18:19] maqr: me either, that's what i'm so confused [18:20] programble has joined the channel [18:20] bradleymeck_: where is parseString called [18:21] bradleymeck_: also "this" can be rebound at runtime so be wary of where it could go boom [18:21] maqr: bradleymeck_: i think it's rebinding, but it's getting called as response.addListener('data', x2js.parseString); [18:22] maqr: i just don't understand how or why it would be rebinding, i see tons of examples where "this" is used in a prototype function [18:22] bradleymeck_: then yub, its being rebound by EventEmitter [18:22] bradleymeck_: just wrap it in a function [18:23] solidsnack has joined the channel [18:23] maqr: bradleymeck_: eh? wrap which part? the addListener 2nd argument? [18:23] bradleymeck_: yup [18:24] maqr: well that worked too... but i'm not sure i understand why [18:24] javajunky has joined the channel [18:24] maqr: i thought you could pass around functions as references like that? [18:24] maqr: also, it worked when it wasn't a prototype definition, but just in the constructor [18:24] bradleymeck_: you can, but "this" can still be rebound [18:24] javajunky: which is in fact the beauty of js ;) [18:24] maqr: actually, nevermind, i guess i set that up differently before [18:24] mostlygeek has joined the channel [18:25] bradleymeck_: yes due to scope it had a reference [18:25] maqr: bradleymeck_: how do i know when that will happen? and why does it do that? and what do i use that for? [18:25] bradleymeck_: it happens when a library uses .call or .apply on functions [18:25] bradleymeck_: documentation will / should tell you when it happens, wrapping functions is appropriate [18:26] bradleymeck_: many callback based functions will use .call or .apply on your callback [18:26] maushu has joined the channel [18:26] maqr: so wrapping the function makes it 'this' for the things emitter needs, but has a different 'this' once it's inside my function? [18:27] bradleymeck_: no, wrapping it in a function means when you use obj.function(...) it will automatically treat it as obj.function.call(obj,...) [18:28] maqr: ohh [18:29] bradleymeck_: js lets 'this' be a very liberal variable, and with that, lunch time [18:29] maqr: thanks :) [18:30] isaacs has joined the channel [18:31] javajunky: there's tim's article on howtonode if that hasn't already been pointed at again ;) [18:31] jxson has joined the channel [18:31] maqr: javajunky: yeah, it seems to mostly make sense, until i try to do it :) [18:32] javajunky: maqr: I'd like to say don't worry about it, but do, deeply, and repeatedly, until you do get it ;) [18:32] rtomayko has joined the channel [18:33] rauchg_ has joined the channel [18:34] maqr: javajunky: the stuff in the article makes a ton of sense, but when i try it... https://gist.github.com/e944b5439ea08dd408ca#file_xml2js_broken.js [18:34] maqr: here i *know* my 'this' inside of onEndDocument is wrong, but i don't know how to apply the right 'this' to it [18:34] maqr: i know i could say 'var that = this', and use 'that' instead... but that seems like poor form [18:34] jetienne has joined the channel [18:35] figital has joined the channel [18:35] mscdex: maqr: it's not really poor form. [18:35] javajunky: maqr: seems ok in that case ? [18:35] javajunky: maqr: *I'd* keep a reference to that myself, fwiw ;) [18:35] mscdex: maqr: if you need access to something outside the callback, you have to get access at it somehow [18:36] maqr: hrm, i feel like i keep seeing people "apply"ing or "bind"ing their way into that access [18:36] mscdex: i usually "self" instead of "that", but it's up to you [18:36] V1: argfgfh, there must be some easier way to stop node from buffering up responses to the to the net.Stream. >_ express-on-connect is swapping from 'classes' to 'normal' javascript ;) [20:05] javajunky: man am I bored of stripping out that stuff. [20:06] tjholowaychuk: javajunky: mwahahaha [20:06] JimBastard: yeah Niels Bohr said that apparently. quantum mechanics in 1922 was probably just as hard as getting IE6 to render right. >>><<< [20:06] tjholowaychuk: Class is nice organizationally but yeah nice to get that shit out of there [20:06] ceej has joined the channel [20:06] JimBastard: you took class out of express? [20:06] tjholowaychuk: ya [20:06] JimBastard: fuck man [20:06] tjholowaychuk: express is really light weight now, for the better though I dont want it to bloated [20:06] aheckmann: uh oh [20:06] mscdex: physics ftw [20:06] JimBastard: thats one less reason for me to be a hater now [20:06] javajunky: express is a pretty good citizen now, no global pollution, yay [20:07] tjholowaychuk: and "ext" that extension lib of mine is out now too [20:07] aheckmann: :tjholowaychuk you still Class laying around in github right? [20:07] tjholowaychuk: aheckmann: yup sure do [20:07] aheckmann: +1 for removing ext [20:08] tjholowaychuk: node and all of the libraries are maturing more now so its nice to have some choice back in express [20:08] creationix: JimBastard: from #linux guys "member:creationix: you don't imagine i'm actually gonna member:click that nonsense do you ?" [20:08] maqr: if there's a package.json file, it means it should work in npm, right? [20:09] mscdex: creationix: what nonsense? [20:09] JimBastard: sup creationix ? [20:09] javajunky: oh arse, just realised I'm acutally using 'inheritance here' :( doh [20:09] creationix: JimBastard: now they are accusing me of not knowing what upstart it [20:09] creationix: *is [20:09] JimBastard: tjholowaychuk: have you started any ORM work yet? [20:10] tjholowaychuk: JimBastard: kinda yeah [20:10] tjholowaychuk: prototyping [20:10] JimBastard: lol creationix, #linux is hardcore. i cant even troll in there [20:10] tmpvar: and that is saying a lot [20:10] creationix: http://72.14.187.119:8080/ is with upstart http://72.14.187.119:5050/ is direct [20:10] JimBastard: tjholowaychuk: i know you love building your own stuff, but i think maybe there is something to be said about cloudhead's resourcer [20:10] tilgovi has joined the channel [20:10] creationix: which link loads for you JimBastard [20:10] creationix: it's the same connect app [20:11] tmpvar: second [20:11] creationix: now try both with curl [20:11] JimBastard: only second one creationix [20:11] JimBastard: sup tmpvar [20:11] creationix: exact response [20:11] creationix: not sure what's different [20:11] tmpvar: lol [20:11] tmpvar: wow [20:12] tjholowaychuk: JimBastard: its quite different from the direction I was heading, but who knows [20:12] tmpvar: yo JimBastard, creationix [20:12] creationix: tmpvar: you see my insanity now? [20:12] tmpvar: creationix, i do.. that is quite odd [20:12] JimBastard: creationix: not sure, checked both in firebug too [20:12] creationix: the only thing different is that one is run on upstart [20:12] jmar777 has joined the channel [20:12] JimBastard: creationix: maybe its a rights issue? [20:13] JimBastard: i dunno [20:13] JimBastard: is upstart running as the same user? [20:13] creationix: but it can't be a firewall thing because curl can see both just fine [20:14] tmpvar: right [20:14] maqr: oh no, github is offline :( [20:14] tmpvar: the browser doesnt like it, or its filtering the user agent [20:14] mscdex: oh cool.... github implemented cross-repo compares? [20:15] tmpvar: creationix: firebug says its "aborted" [20:15] creationix: how strange [20:15] mscdex: maqr: it's back! [20:15] JimBastard: creationix: yeah thats really strange man. i would suggest maybe backing up a few steps and start checking things you assume are working? [20:16] JimBastard: try to isolate the issue, etc [20:16] creationix: JimBastard: that's what I've been doing [20:16] creationix: that's how I ended up with upstart hating me ;) [20:16] JimBastard: yeah i figured, sorry i cant give more specific help [20:16] JimBastard: :-\ [20:17] JimBastard: i havent seen that issue with upstart at all [20:17] tmpvar: creationix: in httpfox: (Status Line) : HTTP/0.9 200 OK [20:18] tmpvar: is the response [20:18] maqr: tjholowaychuk: so connect for http, expresso for testing, and jade for templating? am i missing anything? :P [20:18] jmar777 has left the channel [20:18] JimBastard: maqr: diversity? :-) [20:18] bradleymeck_: a db? [20:18] JimBastard: bradleymeck_: real men did it in memory [20:19] JimBastard: 100% uptime, if the app goes down you lose your whole business and all your data [20:19] tjholowaychuk: maqr: sounds about right. Express is higher level (and uses Connect) [20:19] bradleymeck_: with a real keyboard, 0s and 1s only [20:19] JimBastard: :-D [20:19] mscdex: here's what's missing: a method for handling "comet" or websocket connections :-D [20:19] maqr: JimBastard: haha, i'm open to suggestions :P [20:19] JimBastard: i heard when tjholowaychuk and creationix pair program they use http://www.geeks3d.com/public/jegx/200808/keyboard-for-real-coder-big.jpg , each one gets one key [20:20] JimBastard: maqr: maybe you should be open to research :-) [20:20] bean0r1___ has joined the channel [20:20] tjholowaychuk: hahaha [20:20] maqr: JimBastard: i'm doing a lot of that too, but every promising thing i click on comes back to 'visionmedia'... apparently that's also what i'll connect to redis with [20:20] bean0r1___: i want to create the sha1 of a file, what iam doing wrong? it the sha1 is not correct :/ http://gist.github.com/478729 [20:21] mscdex: bean0r1___: your .digest() is being returned to nobody [20:21] maqr: tjholowaychuk: higher level is good, express it is :) [20:21] tjholowaychuk: maqr: iam visionmedia :p [20:21] ryah: mikeal: latex+beamer [20:21] maqr: tjholowaychuk: i know :P [20:21] tjholowaychuk: oh :p [20:22] bradleymeck_: just wrap a Node-websocket-server around connect and viola ez peazy [20:22] JimBastard: maqr: i mean, ive been doing node stuff for a bit under a year and i dont think we are currently using any of visionmedia's stuff. if you find a solution that works for you, you should use it for certain. just be aware there are other options. [20:22] bean0r1___: mscdex: ah wrong code i have a sys.puts around it shows me the sha1sum but its not correct, sha1sum on my terminal says something different [20:22] mde: maqr: Depends on the kind of app you're building, but you might want to check out Geddy: http://geddyjs.org/ [20:22] maqr: JimBastard: totally... what do you use for web framework and templating? just out of curiosity [20:22] bradleymeck_: though i wish i could get at those http headers to check some cookies for websockets :/ [20:23] mscdex: bean0r1___: maybe an encoding problem? [20:23] JimBastard: maqr: i refuse to template server-side [20:23] JimBastard: maqr: im using this really cool framework called http.client [20:23] mde: maqr: ORM is still a big question mark, but routing, content negotiation, templating are all pretty solid. [20:23] JimBastard: the ORM front has been moving mde [20:23] mscdex: bean0r1___: er, scratch that. nevermind [20:23] maqr: JimBastard: eh? how can you refuse to template server-side? [20:23] JimBastard: http://github.com/cloudhead/resourcer [20:24] mde: JimBastard: Anything specific I should be looking at? [20:24] JimBastard: maqr: i template on the client [20:24] mde: Ah, nice. [20:24] maqr: JimBastard: interesting [20:24] bradleymeck_: sorry but i have to use extends on templates in server land cause multiple http requests for a single template could take a bit of time [20:24] mscdex: bean0r1___: out of curiousity, is this a binary or text file? [20:24] JimBastard: mde: yeah ^^. we are working with cloudhead on that, there are a few of us on it [20:24] bean0r1___: did nobody a sha1sum from a file? :/ [20:24] bean0r1___: mscdex: images /jpeg [20:24] joshbuddy has joined the channel [20:24] mscdex: bean0r1___: checking now... [20:24] mde: Nice. The persistence stuff is a pretty deep rabbit hole, nice to see people on it. [20:25] JimBastard: mde: trying to use resourcer as the ORM for nodejitsu. [20:25] maqr: geddy looks pretty good too [20:25] bean0r1___: just wondering nobody is verfifying up and downloads to Amazon S3... :) [20:25] tjholowaychuk: ACTION wishes my ORM stuff was OSS [20:25] JimBastard: tjholowaychuk: ill steal it for you [20:25] tjholowaychuk: haha [20:26] JimBastard: you can just sue me [20:26] JimBastard: i already owe that chick 550k [20:26] maqr: :o [20:26] mde: JimBastard: Very nice. Ultimately Geddy will be pluggable, so I'll take a close look at this and see about how this might fit. [20:26] JimBastard: mde: for sure, you are the geddy author right? [20:26] JimBastard: ive been pretty adamant about ignoring and hating on all the node js web frameworks. im hoping this fall i can start to not hate [20:27] mde: JimBastard: Yeah, that's right. khug has also worked on it. He rewrote the router. [20:27] JimBastard: are you using it in production for anything? [20:27] bean0r1___: JimBastard: yes [20:27] kriszyp: what's the tool for examining v8.log's (from node profiling)? [20:27] mscdex: bean0r1___: i was able to reproduce it... very interesting [20:27] tjholowaychuk: JimBastard: express is soooo much cleaner now, no baggage to hate on finally [20:27] mde: We're using the geddy-model stuff here at Yammer, on the client side, and with TheRubyRacer. [20:27] mde: But not in Node proper yet. And not the entire framework. [20:28] bradleymeck_: whats the most popular parser grammer language that doesnt involve flex you guys think? [20:28] JimBastard: mde: do you know the rubyracer guy? [20:28] eisd_ has joined the channel [20:28] javajunky: antlr [20:28] mde: JimBastard: No, but he's contacted us to say "let me know if you need help." [20:28] tjholowaychuk: bradleymeck_: peg/leg are ok [20:28] tjholowaychuk: sorta [20:28] nefD has joined the channel [20:28] mde: Oh, wait, one of my co-workers knows him. [20:28] JimBastard: cool cool, yeah seems like a nice guy. he ported one of my node projects to rubyracer [20:28] tjholowaychuk: re2c / ragel [20:28] bradleymeck_: antlr really isnt a grammar language [20:29] bean0r1___: mscdex: well... :D ok... but thats strange, this must work [20:29] bradleymeck_: it build em but it does more than i care to reimpl [20:29] bean0r1___: its not rocket science [20:29] mde: It seems pretty solid. I'm working on a test runner that can use Node's assert in all three environments -- browser, node, racer. [20:29] mscdex: bean0r1___: same thing happens with md5 also [20:29] javajunky: bradleymeck: sorry I had assumed thats what you wanted , my bad [20:29] mde: It's still pretty small, but cool to see tests running in all three places: http://github.com/mde/logan [20:29] JimBastard: yeah tjholowaychuk, i ought to actually install and try express one day. i'm suffering pretty hard from decouple-itis lately though. once we have to start doing auth stuff i might finally break down [20:30] bean0r1___: mscdex: i use sha1 also to calculate the sha1sum of a string and it works, maybe something wrong with streaming? [20:31] bradleymeck_: javajunky s'fine i would just die trying to reimpl antlr [20:31] bradleymeck_: specially since it uses java syntax inside itself [20:31] mscdex: bean0r1___: i think there is something odd with using Buffers with crypto... because i tried instead using Buffer's legacy binary encoding for toString() and that worked just fine [20:32] romanoff has joined the channel [20:32] mscdex: this is quite the bug :S [20:32] CrabDude has joined the channel [20:32] jansc has joined the channel [20:33] bean0r1___: mscdex: shitty shit :/ [20:33] creationix: ryah: I suddenly get cookie values like this occasionally [20:33] kevm_ has joined the channel [20:33] creationix: a4ce286900219c8dc91e288adc75\r\nConnection: keep-alive\r\n\r\n\ufffdH\ufffd$C\ufffd4\u0013H&\u0006 [20:33] mscdex: bean0r1___: until it gets fixed, you can do instead: sha1_for_file.update(data.toString('binary')); [20:33] creationix: that's got to be a bug in the http parser? or the browser? [20:34] bean0r1___: mscdex: ok [20:34] bean0r1___: mscdex: merci! [20:34] bradleymeck_: "\r\n" or "\\r\\n"? [20:34] mjr_: creationix: can you capture the raw data off the wire and see what it looks like? [20:34] bradleymeck_: \r\n would mean parser [20:34] bean0r1___: mscdex: file a bug? or maybe it is intend to use "to binary" [20:34] creationix: mjr_: I would if I could reproduce it [20:35] creationix: it's a tricky one to find [20:35] creationix: it was on an iPad as the client [20:35] mscdex: bean0r1___: toString('binary') uses a legacy encoding that shouldn't be used anymore because it used a special method to pack binary data into javascript strings [20:35] creationix: bradleymeck: the first [20:35] mscdex: bean0r1___: but it still works for now, not sure when/if it'll ever be removed though [20:36] creationix: real control characters [20:36] mscdex: bean0r1___: i'd say file a bug report [20:36] bradleymeck_: parser then, those should guarantee a new header in http [20:36] romanoff: Hello, I am using Ubuntu 10.04 and wanted to try node.js framework. But have an error while running 'make'. Here is what I got while executing './configure' - http://pastie.org/1047865 , here is 'make' error - http://pastie.org/1047863. Please, help. I really want to try node.js ;) [20:36] tjholowaychuk: aheckmann: you here? [20:36] aheckmann: yo [20:37] tjholowaychuk: http://github.com/visionmedia/express/blob/master/examples/blog/app.js [20:37] tjholowaychuk: blog mounting example [20:37] bean0r1___: mscdex: ok [20:38] aheckmann: thx, i saw you push that exp a little while ago - thanks [20:38] aheckmann: me likey [20:38] tjholowaychuk: trying to think of more examples to write that people will be confused about [20:38] tjholowaychuk: some sess based stuff [20:39] tjholowaychuk: whats a practical example that uses sessions but is not .. huge [20:39] tjholowaychuk: no auth crap [20:39] mape: tjholowaychuk: have you thought about adding template support for something like resigs template thingy? [20:39] aheckmann: your early chat example [20:39] creationix: tjholowaychuk: just a visit counter [20:39] creationix: mape: grain! [20:39] tjholowaychuk: creationix: ah, yes lol [20:39] tjholowaychuk: mape: http://github.com/visionmedia/ejs [20:39] aheckmann: user based sessions [20:40] aheckmann: i'm logged in etc, [20:40] mape: tjholowaychuk: oh, creationix: hmm [20:40] mape: tjholowaychuk: might want to add an example that shows some actual html+vars to the readme [20:41] tjholowaychuk: mape: im personally not a huge fan of ejs but had quite a feq requests before so figure i misewell make a repo people can fix shit in [20:41] tjholowaychuk: mape: for ejs? [20:41] tjholowaychuk: yea probably [20:41] mape: Yeah, but I can't stand haml :S [20:41] creationix: tjholowaychuk: Corn (in grain) is like ejs - loops and conditionals [20:41] javajunky: tjholowaychuk: hey don't diss the auth crap, this stuff is killing me ;) [20:41] tjholowaychuk: mape: ill add some examples :) [20:41] bradleymeck_: are you making a grain connector for express? [20:41] zmbmartin: tjholowaychuk: I am trying to mess with express and jade but the output is in plain text in the browser? [20:41] mape: creationix: so grain is built to hook with connect? [20:42] tjholowaychuk: javajunky: haha no, just for the examples i want something that uses sessions but no auth [20:42] aheckmann: tjholowaychuck: do you have an upload example? [20:42] creationix: mape: no hooks at all [20:42] bradleymeck_: mape its to allow generic template api that can be swappable [20:42] tjholowaychuk: zmbmartin: send a gist of your code, shouldnt be [20:42] mape: hmm k [20:42] javajunky: fibonnaci calculator. [20:42] tjholowaychuk: aheckmann: yup [20:42] javajunky: dull but you could use a session if you really ahd to ;) [20:42] MattJ has joined the channel [20:42] bradleymeck_: so if you have a template engine that holds to the grain api you could swap it in if w/e you are using has a grain connector [20:44] mape: Hmm k [20:44] zmbmartin: tjholowaychuk: http://gist.github.com/478890 [20:44] mape: Guess I'm better of using express then and try to hook grain into that? [20:45] tjholowaychuk: mape: i have lots of ejs examples [20:45] tjholowaychuk: in express ./examples [20:45] mape: But doesn't use grain? [20:45] maqr: there's so many template engines linked in the modules... what would you guys recommend that isn't as crazy as haml/jade? i want to write my own html, but i need to be able to loop over a context and such [20:45] mape: Or why should I use grain? [20:46] tjholowaychuk: i didnt say you shoud [20:46] tjholowaychuk: should* [20:46] zmbmartin: tjholowaychuk: I just got it [20:46] mape: I'm asking :) [20:46] zmbmartin: tjholowaychuk: I was missing ! in front of body in layout. [20:46] tjholowaychuk: maqr: http://github.com/visionmedia/ejs [20:46] mape: creationix: What is better with grain then the stuff/ejs that tjholowaychuk has in express? [20:46] tjholowaychuk: zmbmartin: ah :) security feature [20:46] creationix: mape: that would be cook [20:46] creationix: *cool [20:48] nefD has joined the channel [20:48] maqr: tjholowaychuk: oh, that looks like exactly what i need [20:49] tjholowaychuk: maqr: some people prefer the dead simple stuff like that, its still really fresh and new but hey [20:49] tjholowaychuk: maqr: patches are certainly welcome [20:49] rgl has joined the channel [20:49] aconbere has joined the channel [20:49] zmbmartin: tjholowaychuk: When I view page source everything in on one line. It doesn't read very well. Did I miss something else? [20:49] javajunky: fuck yes - express-auth now roughly works directly with connect. [20:50] aheckmann: i like that its in one line [20:50] eisd__ has joined the channel [20:50] aheckmann: html compression :) [20:50] tjholowaychuk: zmbmartin: jade does not have a pretty print option yet [20:50] tjholowaychuk: javajunky nice! [20:50] tjholowaychuk: haha ya there you go, forced compression [20:50] JimBastard: zmbmartin: use firebug [20:50] JimBastard: the inspector will pretty your html up [20:51] JimBastard: (if you can) [20:51] aheckmann: JimBastard: sometimes firebug isn't what you want [20:51] aheckmann: if you want to see the pre js version [20:51] zmbmartin: JimBastard: Yeah thanks. I was just curious [20:51] JimBastard: ehhh, real men do JSON-RPC up and down, anyone sending html fragments should get shot [20:51] aheckmann: tjholowaychuk: is it easy to add a pretty print version for dev? [20:51] maqr: tjholowaychuk: btw, is this stuff considered 'synchronous' because you fill up the whole context first before you send it to the template? and is that a sign that i'm trying to solve the wrong problem? [20:51] tjholowaychuk: aheckmann: should not be to hard no [20:52] dnolen has joined the channel [20:52] tjholowaychuk: maqr: "the whole context" ? [20:52] tjholowaychuk: what do you mean [20:52] JimBastard: hey whats up dnolen [20:52] mape: tjholowaychuk: Oh btw, think someone mentioned last night that the npm install for express doesn't initiate the submodules [20:52] tjholowaychuk: mape: there are no submodules, only for the test suites [20:52] maqr: tjholowaychuk: send it every variable for the template in 'options', right? [20:52] tjholowaychuk: mape: they have to install connect on their own [20:53] maqr: *you send [20:53] mape: Ah yeah, but something broke.. [20:53] tjholowaychuk: mape: hmm ill check it out [20:53] tjholowaychuk: maqr: that is no different than having your view wait around for async stuff to finish and substitute placeholders etc [20:54] JimBastard: if only there was a way we could do templating without buffers or streams that wouldnt block [20:54] JimBastard: hrmmm [20:54] tlrobinson has joined the channel [20:54] JimBastard: if only we could like, template somewhere other then the server [20:54] JimBastard: like maybe on the....... [20:55] JimBastard: damn i lost it [20:55] JimBastard: ill think over this some more [20:55] tjholowaychuk: lol [20:55] aheckmann: JimBastard: templating on the server is often necessary tho [20:55] javajunky: the cloud, you mean the cloud right ? Everyone's talking about the cloud? .. its gotta be the cloud ? [20:55] mape: tjholowaychuk: doesn't express work with the connect command? [20:55] tjholowaychuk: id rather make my server work than make clients grind [20:55] mattly has joined the channel [20:55] maqr: tjholowaychuk: hmm, as it fills the template, shouldn't it also be streaming right out to the http stream? i'm still a bit confused on the async designs [20:56] JimBastard: aheckmann: i think the use cases have shrunk to < 20%. i base that number on nothing [20:56] tjholowaychuk: mape: it can yea, if it module.exports is an app [20:56] aheckmann: JimBastard: hahah [20:56] mape: tjholowaychuk: k [20:56] JimBastard: aheckmann: i'd love to hear what you consider has to be done server side. there are uses [20:56] tjholowaychuk: mape: or you can just listen(port) like normal [20:56] aheckmann: JimBastard: for crappy sites that have to work non-js [20:57] maqr: tjholowaychuk: not that it would make any real performance difference, i'm just trying to get my head straight about what should be async and streaming, and what should be sync [20:57] JimBastard: aheckmann: yeah, i mean it is 2010. i think enforcing JS is acceptable for all forward moving sites [20:57] JimBastard: the only thing i can think of really is accessibility [20:57] aheckmann: JimBastard: IMO yes. But for the bank i'm leaving : no [20:57] maqr: JimBastard: mobiles still render slowly :( [20:57] JimBastard: aheckmann: < 20% :-) [20:57] aheckmann: JimBastard: they can get sued for that kind of crap [20:58] JimBastard: maqr: i think voodootikigod might have something to say about that [20:58] aheckmann: JimBastard: accessibilty stuff [20:58] tjholowaychuk: maqr: ideally yes so that the is available to the browser [20:58] bradleymeck_: sync for data Processing, async for data output and input (events that occur for things generally too) [20:58] JimBastard: yeah aheckmann , i think thats the biggest problem, but im sure there are solutions. im just not too familiar with accessibility [20:58] voodootikigod: JimBastard: what [20:58] JimBastard: but i would think screen readers / etc woudl be the problem [20:58] tjholowaychuk: maqr: but its kind of a big meh in many cases. a) because views should not have (much) logic, b) because 99% of views will need all data available to it anyways [20:58] JimBastard: voodootikigod: client-side templating on mobile devices [20:59] aheckmann: JimBastard: it's getting a lot better [20:59] mjr_: I'm just watching that GoRuCo video right now while eating a sandwich. [20:59] JimBastard: hee hee [20:59] bradleymeck_: dl speed vs render on mobile is a tough cookie to pick a side on [20:59] agnat has joined the channel [20:59] voodootikigod: push that shit to the client [20:59] JimBastard: bradleymeck_: +10 [20:59] maqr: tjholowaychuk: hmm, i guess the render could be non-linear... but i guess ideally, it should be streaming out as it completes as much as it can linearly? [20:59] voodootikigod: fuck wasting your memory cycles [20:59] voodootikigod: hell sencha touch does that [21:00] JimBastard: voodootikigod: +20, although adding 20 more to infinity is moot [21:00] mjr_: mobile users are used to slow slow networks anyway. [21:00] voodootikigod: EVEN ext.js is on teh boat [21:00] voodootikigod: mjr_: but the ability to cache the bulk [21:00] voodootikigod: a [21:00] voodootikigod: nd [21:00] voodootikigod: reload the diff [21:00] voodootikigod: is key for taking advantage of smaller pipes [21:00] JimBastard: +50, fuck [21:00] mjr_: yeah, for reloads it's a gigantic win [21:00] voodootikigod: and ladies [21:00] maqr: i watched that google i/o talk about gmaps, and they said that the javascript latency was the biggest bottleneck [21:00] bradleymeck_: just be sure to push states somehow [21:01] tjholowaychuk: maqr: ideally yeah, ive never personally ever needed that. feeds or something maybe but you dont really need a view for that [21:01] voodootikigod: maqr: in contrast to.... [21:01] maqr: voodootikigod: download time [21:01] maqr: tjholowaychuk: gotcha, i don't think i need that either, but i just wanted to make sure i was thinking about the pattern correctly, thanks :) [21:01] JimBastard: i think rendering a gmap is a slightly different then rendering some basic html layouts [21:02] ryah: creationix: ? [21:02] tjholowaychuk: maqr: yup, I just have not been convinced yet to add it in [21:02] ryah: creationix: that's strange [21:02] maqr: tjholowaychuk: are there any libraries that do that? [21:02] voodootikigod: umm yea [21:02] creationix: ryah: isn't it? [21:02] voodootikigod: and what js latency are you talking about [21:02] voodootikigod: w [21:02] voodootikigod: h [21:02] ryah: creationix: it's probably your code, i'd think [21:02] voodootikigod: fucking colloquy [21:02] voodootikigod: vm load time [21:02] voodootikigod: when they did that talk it was way back in the day [21:02] creationix: ryah: how so? I don't parse headers [21:02] locks has joined the channel [21:02] voodootikigod: and gmaps sucks balls in terms of perf anyhooter [21:02] creationix: and the client is a mobile browser [21:03] mikeal: ryah: what do you use for your slides? [21:03] maqr: voodootikigod: http://code.google.com/events/io/2010/sessions/maps-api-v3-api.html , i'm not pretending to understand it all, but i thought it was an interesting talk [21:03] voodootikigod: btw ryah that is a far better reponse that "works on my machine" [21:03] tjholowaychuk: creationix: is it our cookie code? or are you dumping that out at a higher level [21:03] creationix: tjholowaychuk: it's connect cookies, but they should never get all the \r\n stuff in them [21:04] voodootikigod: she is really convincing [21:04] ryah: mikeal: latex+beamer [21:04] pgriess: micheil: you around? [21:04] ryah: mikeal: want my template? [21:04] mikeal: sure [21:04] mikeal: just email it to me [21:04] tjholowaychuk: mape: seems fine from npm for me :( [21:04] mjr_: voodootikigod: I like that in this talk you make sure that every other sentence references how bad rails is. [21:04] mape: tjholowaychuk: hmm k, guess pebkac then [21:04] voodootikigod: mjr_: they edited out when the Engine Yard rep stood up and started yelling at me [21:04] voodootikigod: ACTION was dissappointed [21:04] mjr_: aw, man. [21:04] JimBastard: AHAHAHAHA [21:05] JimBastard: i'll never forget the first time i saw the SQL that ActiveRecord makes. i cried [21:05] ryah: mikeal: emailed to you [21:05] bradleymeck_: what talk is this? [21:05] mikeal: thanks [21:05] mjr_: bradleymeck: http://vimeo.com/12779633 [21:05] JimBastard: then my boss told me it just because i didnt understand how awesome it was. didn't last very long at that job. :-( [21:06] voodootikigod: YOU DONT GET IT [21:06] voodootikigod: SLOW IS THE NEW FAST [21:06] JimBastard: YOU SEE DHH MADE THIS BOX [21:06] voodootikigod: GET ON FUCKING BOARD [21:06] JimBastard: GET IN THE BOX [21:06] tjholowaychuk: wtf lol [21:06] JimBastard: rails rage [21:06] JimBastard: its contagious [21:07] bradleymeck_: give me my ^ back you damn multiline regexp [21:07] creationix: ryah: just wait till I can reproduce the bug, then I'll attach a tcpdump ;) [21:07] creationix: then we'll see who's code is wrong [21:08] ryah: creationix: okay [21:08] romanoff: Hello, I am using Ubuntu 10.04 and wanted to try node.js framework. But have an error while running 'make'. Here is what I got while executing './configure' - http://pastie.org/1047865 , here is 'make' error - http://pastie.org/1047863. Please, help. I really want to try node.js ;) [21:08] maqr: haha [21:08] creationix: I'd love for it to be my code, but I don't see how that's possible [21:08] ryah: creationix: it's probably yours though :) [21:08] voodootikigod: REALLY SHARP TALONS [21:08] podman: i like rails :( [21:09] JimBastard: hey romanoff [21:09] maqr: romanoff: i had something like that and i had to install libevent-dev, i think? might help to also pastie the error [21:09] podman: but i'm more of a right tool for the job kind of guy [21:09] maqr: romanoff: err, i misread, there's the error :) [21:09] meder has joined the channel [21:09] maqr: romanoff: yeah, i think it was libevent-dev for that, i just made a fresh ubuntu install and saw the same exact error [21:09] aheckmann: tjholowaychuk: creationix: minor, but why do connect/express use 4 space indents? [21:09] aheckmann: node uses 2 [21:09] JimBastard: romanoff: dumb question, sudo make ? [21:09] tjholowaychuk: aheckmann: sencha rules [21:09] tjholowaychuk: lol [21:10] creationix: aheckmann: sencha style [21:10] aheckmann: do they know what node uses? [21:10] aheckmann: i understand in the browser 4 was the norm [21:10] aheckmann: but node??? [21:10] aheckmann: not a big deal [21:10] Ori_P has joined the channel [21:10] aheckmann: consistency is a good thing tho [21:11] mjr_: aheckmann: ryah has decreed that indent level shall be 2. [21:11] creationix: ryah: so how could my code get raw http header mixed into the cookie? [21:11] romanoff: JimBastard: sudo make doesn't work. (make actually makes everything locally) [21:11] creationix: aheckmann: we might be able to change it for connect since it's open source, not sure [21:11] mscdex: romanoff: what version of node is this? [21:11] charlesjolley- has joined the channel [21:11] tjholowaychuk: aheckmann: I mostly just forgot to use 2 haha [21:12] romanoff: mscdex: latest one (from github) [21:12] aheckmann: tjholowaychuk: all your code is crap! hahahahaha [21:12] JimBastard: yeah, lets tar and feather tjholowaychuk [21:12] ryah: creationix: show me what you are getting agian [21:12] mscdex: romanoff: i have a server running 10.04 with node fine, but i haven't tried the latest head yet... 1 sec [21:12] JimBastard: and then we'll send him to a cold remote wasteland, like canada [21:13] aheckmann: haha [21:13] tjholowaychuk: pretty sunny out right now :) [21:13] romanoff: maqr: I checked and libevent-dev package wasn't even installed. But after installation nothing changed [21:13] JimBastard: :p [21:13] tjholowaychuk: im staring at the ocean as we speak [21:13] creationix: ryah: my "Cookie" header has connect.sid=a4ce286900219c8dc91e288adc75\r\nConnection: keep-alive\r\n\r\n\ufffdH\ufffd$C\ufffd4\u0013H&\u0006 [21:13] creationix: with real \r\n characters [21:13] javajunky: tjholowaychuk: oooo we're slating tj …. nice one … errr dude you use far too many semi-colons for my liking [21:13] JimBastard: woah [21:13] ryah: creationix: oh [21:13] ryah: creationix: yeah, maybe that's my bug [21:13] maqr: romanoff: make clean, reconfigure, make? [21:14] JimBastard: javajunky: when Crockford kicks your ass, the only thing you are left with is a semi-colon [21:14] creationix: ryah: but if I can reproduce it, I'll send you a tcpdump [21:14] mscdex: romanoff: you dont need libevent-dev [21:14] tjholowaychuk: javajunky: im actually considering adopting the comma-first thing, ive had a few globals because of the "regular" way [21:14] ryah: creationix: yeah [21:14] mscdex: romanoff: i just compiled node head on my 10.04 box and it configured and compiled just fine [21:14] romanoff: mscdex: Well, I don't really need latest version, actually. I only want to try node.js. It should be funny. Can you tell me what version is running fine on 10.04? [21:14] mscdex: romanoff: what does your ./configure say? gist it [21:15] JimBastard: *rimshot* [21:15] mjr_: tjholowaychuk: sure it is easier to use jslint and catch those and many other errors, rather than changing your style. [21:15] aheckmann: tjholowaychuk: I'm all on board with semicolon first now [21:15] aheckmann: seems natural [21:15] mscdex: The Crockford Files! [21:15] creationix: ryah: so I take it it's not a known bug then? [21:15] tjholowaychuk: woah.. my stuff actually (mostly) is fine with jslint now [21:15] ryah: creationix: no [21:16] tjholowaychuk: ACTION cringes  [21:16] creationix: ryah: the client was an iPad if that helps [21:16] ryah: creationix: i find it hard to imagine how the parse could mess up on that.. [21:16] romanoff: maqr: I made make clean and ran make again. But this didn't work [21:16] creationix: I know, it's such simple code [21:16] creationix: that part at least [21:16] mscdex: romanoff: gist your output of ./configure please :-) [21:16] creationix: I'd blame apple, but I can't imagine what they could possible send that would give me that result [21:17] creationix: afaik, it's impossible to encode \r\n into header values [21:17] hober: Not sure if this is a bug in tmpvar/jsdom or aredridel/html5: http://gist.github.com/478925 [21:17] romanoff: mscdex: Sorry that it took so long. Here it is - http://gist.github.com/478926 [21:17] maqr: romanoff: i'm not sure how i fixed it then :( [21:17] mscdex: romanoff: ok that looks fine [21:18] romanoff: maqr: Thanks anyway :) [21:18] mscdex: romanoff: give v0.1.100 a try for comparison purposes: http://github.com/ry/node/tarball/v0.1.100 [21:19] romanoff: mscdex: downloading now... will write back the results [21:22] creationix has joined the channel [21:25] romanoff: mscdex: Waf: Leaving directory `/home/ras/Programming/node/node-stable/build' [21:25] romanoff: 'build' finished successfully (2m25.879s) [21:25] romanoff: . Great! Thanks a lot :) [21:26] mscdex: romanoff: ah ok cool. guess something broke linux x86 in head then... [21:26] mscdex: :S [21:26] hone02 has left the channel [21:26] bradleymeck_: hober its in jsdom, it doesnt force meta to singletag [21:26] romanoff: mscdex: Seems like that [21:26] mscdex: romanoff: fwiw i'm running the 64-bit version of 10.04 with no problems [21:27] romanoff: mscdex: I see. It's time to move to 64-bit version then :) [21:30] paulwe has joined the channel [21:30] mscdex: designing cool logos is hard :S [21:30] creationix: JimBastard: I think I found a workaround with the upstart thing [21:30] creationix: not sure though [21:31] creationix: it seems that browsers don't get a response from the server if the scripts real uid is root [21:31] creationix: no clue how or why [21:31] creationix: but running it as sudo -u tim spark helps [21:31] JimBastard: hey, called it! :-) [21:31] creationix: problem is I need to bind to port 80 [21:31] JimBastard: thanks for the headup, good to know [21:32] creationix: and then dropdown to the user after the fact [21:32] creationix: so I can't use sudo -u [21:32] mscdex: creationix: i think you can specify what user to run the process as in the upstart config? [21:32] JimBastard: hrmmm [21:32] creationix: mscdex: not that I can find [21:32] JimBastard: yeah for sure creationix [21:32] creationix: but sudo works [21:32] JimBastard: something you are saying dont make sense to me [21:33] JimBastard: you should be able to do what you are trying to do [21:33] creationix: I know [21:33] creationix: I'm not even sure how it knows when a browser is hitting it and when it's curl [21:33] creationix: I copied the headers from the browser and curl can still request it just fine [21:33] creationix: but browsers don't get a response [21:33] creationix: I traced the raw traffic [21:34] tjholowaychuk: creationix: weird didnt know you could detach with sudo -b [21:34] tjholowaychuk: cool [21:34] JimBastard: creationix: what if you use something else besides the browser and curl [21:35] JimBastard: like http-console or wget [21:35] JimBastard: does that matter at all? [21:35] hober: bradleymeck_: but it drops the charset attribute completely [21:35] mjr_: What if you use curl to replay the same headers that a browser sends? [21:35] hober: bradleymeck_: it should at least be [21:35] mscdex: creationix: how were you starting your upstart service? [21:36] ajpiano has joined the channel [21:36] creationix: mscdex: sudo start myapp [21:36] creationix: it's running for sure, I can see it on netstat and some clients can get responses [21:37] creationix: alright, now it's rejecting my curl client [21:37] mscdex: :o [21:39] JimBastard: creationix: break time perhaps? [21:39] satori_ has joined the channel [21:39] JimBastard: cold drink and relaxation for a bit? :-) [21:39] bradleymeck_: jsdom has the attr in it after a couple tests hober, so idk from there [21:40] JimBastard: tmpvar: you feel like coding tonight? [21:40] creationix: JimBastard: I've got to get this and other stuff done today, between this and the headers parsing bug, it's been a rough day [21:40] JimBastard: i think i gotta do some jsdom stuff for that charlie thing [21:40] JimBastard: sorry man, :-\ [21:40] beelzabub: hey - i'm having an issue with wscript - is there a way to debug why the check_cxx is failing? [21:41] hober: bradleymeck_: thanks [21:41] satori_: check the build/config.log [21:41] beelzabub: ah - yup [21:41] Jesus: be gone beelzabub ! [21:41] beelzabub: just found it [21:41] Jesus: nice, it worked [21:41] creationix: JimBastard: now we're talking, I can get the same client to either work or not work depending on the headers [21:41] creationix: http://gist.github.com/478952 [21:41] beelzabub: that was pretty funny [21:41] satori_: heh [21:42] beelzabub: except i'm not the one who got schooled by a bunch of romans [21:42] beelzabub: awww snap [21:42] satori_: What have the Romans ever done for us? [21:42] mjr_: zing [21:42] mjr_: creationix: Could it be your server trying and failing to child process for something, like gzip? [21:42] JimBastard: creationix: process of elimination time. just start removing / adding headers until it breaks / doesnt break [21:42] bradleymeck_: the romans gave us lasagna! [21:42] JimBastard: you should be able to isolate now that your conditions are trapped? [21:43] satori_: ok, apart from the aqueducts, and lasagna....what have they everdone... [21:43] creationix: mjr_: interesting [21:43] creationix: but I don't have gzip enabled [21:43] JimBastard: Accept-Encoding: gzip,deflate,sdch [21:43] mjr_: creationix: If things work differently under sudo than they do from the command line, it is likely something in your environment. [21:43] mjr_: Another thing to try is: [21:43] mjr_: sudo strace -p pid [21:44] mjr_: the while strace is attached, hit the server with a working client, then a failing client. [21:44] tjholowaychuk: creationix: one thing i noticed, is that hitting "spark" with a bunch of requests via ab, it became sometimes non operational, where as directly with node it was fine :s [21:44] mjr_: I'll bet you'll see what's going on then. [21:44] creationix: mjr_: well, I can rule out upstart, if I run it as my user it works, but if I run it as root, it fails [21:44] creationix: same code same upstart config [21:44] mjr_: oh, if you run as root from the command line with sudo node file.js, it fails? [21:44] mjr_: but not under sudo it works? [21:45] creationix: mjr_: I think so, let me check [21:45] creationix: mjr_: I do have gzip enabled! [21:45] creationix: ok, I think I know what's wrong [21:45] mjr_: the tension builds [21:46] mjr_: what will it turn out to be! [21:46] creationix: gzip isn't in the path with upstart unless you say so [21:46] creationix: but sudo in upstart loads my user's env [21:46] creationix: including the path [21:46] creationix: and node just closes the connection without a complaint when it tried to execute a non-existent child process [21:46] mjr_: uhh, what? [21:46] mjr_: I don't think it does. [21:47] mjr_: At least, it doesn't always do that. [21:47] creationix: if I do "sudo -u tim spark" in upstart, it works [21:47] creationix: but just "spark" doesn't [21:47] blaines has joined the channel [21:47] robrighter has joined the channel [21:47] creationix: I know sudo wasn't in the path in upstart [21:48] creationix: and I manually added spark to the path [21:48] creationix: yeah, that fixed it [21:49] creationix: added /bin:/usr/bin to path in the upstart script [21:50] buzzedword has joined the channel [21:51] buzzedword: Hey everyone. Good to meet all of you! Just started Node'ing very recently, and I'm trying to wrap my head around Jade. Can someone look at this simple script here: http://pastie.org/1047962 and let me know what I'm doing wrong? [21:52] buzzedword: I get a proper HTML structure from the .JADE file, I just can't write it to the client. [21:52] tjholowaychuk: buzzedword: ill check it out [21:53] mape: Man I love javascrt [21:53] tjholowaychuk: buzzedword: renderFile() is async [21:53] jesusabdullah: I like javaskirts too! [21:53] Blackguard has joined the channel [21:53] javajunky: the problem with losing Class is I'm now torn between a bazillion different ways of doing what I want ;) it was so easy before ..had to use Class ;) [21:54] tjholowaychuk: buzzedword: so you cant assign it to that html var [21:54] tjholowaychuk: haha javajunky ya ya :p [21:54] mjr_: Now that summer is here, the javaskirts are getting shorter and shorter. [21:54] voxpelli-laptop has joined the channel [21:54] buzzedword: tjholowaychuk: i see, what would be the better implementation for that then? JADE isn't particularly well documented [21:54] tjholowaychuk: its basically nothing more than splitting the constructor out, bit more ugly but performance benefit and dependency gone so im down [21:54] satori_: it's definately not summer where I am [21:55] satori_: ACTION is f*cking cold atm [21:55] tjholowaychuk: buzzedword: my bad, ill try and write better docs soonish, here ill get an example going for you [21:56] buzzedword: tjholowaychuk: thank you very much! I'm pretty eager to try it out and get it up and running. [21:56] murz has joined the channel [21:56] tjholowaychuk: buzzedword: something like this http://gist.github.com/478976 [21:57] maqr: tjholowaychuk: btw, i had to edit the expresso makefile to install to my own prefix, so i couldn't use npm for it (just fyi) [21:57] buzzedword: tjholowaychuk: oh, that makes sense. I'll try it out right now. [21:58] tjholowaychuk: maqr: really? it should install the bin for you [21:58] tjholowaychuk: maqr: ah, its the make install-jscov issue [21:58] tjholowaychuk: maqr: not sure what would be the best way to handle that with npm [21:59] maqr: tjholowaychuk: nope, it wanted to put it in /usr/local and i needed it in $HOME/local [21:59] tswicegood has left the channel [21:59] maqr: tjholowaychuk: the first thing i thought of was to do "PREFIX=$HOME/local npm install expresso", but that didn't work either... not sure if that could be made to work [21:59] tjholowaychuk: maqr: sucks you cant do that, i tried too [22:00] maqr: well, no big deal, most packages don't have binaries [22:00] buzzedword: tjholowaychuk: thank you very much, that worked a charm. time to get my hands dirty! [22:00] tjholowaychuk: buzzedword: good luck! [22:00] creationix: mjr_: it works! https://gist.github.com/a653175cb48f76cf088a [22:00] mape: http://mape.me:1340/ <3 Really handy, if you ever been to sites where you want to fetch a ton of content without wading through a the junk [22:00] creationix: how to convert howtonode.org over to upstart so it quits dying on me [22:01] mjr_: creationix: great [22:01] creationix: s/how/now/ [22:02] mjr_: creationix: and of course more importantly, figure out why it is dying. [22:03] buzzedword: tjholowaychuk: one last thing to bug you with, my HTML output (using the snippet on your homepage) looks like this: http://pastie.org/1047980 [22:03] buzzedword: tjholowaychuk: will the template always output a straight line? [22:03] tjholowaychuk: buzzedword: right now yeah, i dont have any prettyPrint or whatever option [22:03] ceej has joined the channel [22:03] creationix: mjr_: bugs [22:04] creationix: It logs the errors too, but I don't want the site to go down every time it finds a bug [22:04] buzzedword: tjholowaychuk: that's fine, i just wanted to make sure that I wasn't messing it up or anything. Definitely a very useful engine. I'll be digging into it hard. Great work! [22:04] murz: what folder do you put modules in so that they are on the require() path? do you just throw them all in /node/lib ? [22:05] tjholowaychuk: buzzedword: thanks! [22:05] creationix: how is dropping down to a non-root user less secure than staying root? [22:06] mjr_: murz: this is what npm handles for you. [22:06] satori_: dropping priveledges is the standard nix way of starting svrs on ports < 1024 isn't it?? [22:06] mjr_: creationix: who said it was? [22:06] satori_: apache does it [22:06] zmbmartin: tjholowaychuk: do you know if mongoose works with express? [22:06] creationix: mjr_: someone on mailing list [22:06] murz: npm? sorry i'm new to node I don't know what that is [22:06] tjholowaychuk: zmbmartin: no clue havent touched it [22:07] mjr_: I guess it'd be more secure to open the server fd as root in one process, and then feed that to the app in another process. [22:07] mjr_: Somebody should do that I guess, now that we have sendfd. [22:07] mjr_: murz: npm is the node package manager: http://github.com/isaacs/npm [22:07] creationix: mjr_: yeah, that's what connect/spark does in multi-process mode [22:08] creationix: but it also drops the uid of the master process just in case [22:08] mjr_: Since this is such a common thing, binding a priv port, someone should make a simple "port binder" thing. [22:08] mjr_: And that'd be the only parts that need root. [22:08] pgriess: mjr_: i'm not sure it could get much simpler: 1 line to bind, 1 line to setuid [22:08] pgriess: mjr_: not much to abstract away [22:09] mjr_: pgriess: just that people might mess it up in their apps. [22:09] mjr_: Then the server only ever is run as the non-root. [22:09] pgriess: mjr_: that's why people should use connect ;) [22:09] mjr_: Yeah, I guess so. [22:09] satori_: Yeah, you just have to know about *nix to do it properly though. [22:10] mjr_: The people that I'm worried about probably shouldn't be using node's low level interface anymore as more frameworks emerge. [22:10] pgriess: yeah, actually i was considering this myself a few weeks back, but ultimately decided against it as the part that was actually generic enough to have a wide use case was so small to begin with [22:10] pgriess: a lot of "what to bind and what to do next" stuff is very app-specific [22:11] pgriess: mjr_: yeah i think connect (and multi-node?) handling this and doing so correctly is a good level of abstraction for your average app author [22:11] creationix: mjr_: well, the point of spark is to take all this logic out of the app [22:11] creationix: and handle it externally [22:11] javajunky: tjholowaychuk: if I call res.end…and something in the connect chain later does res.writeHead/res.end etc. will that be ok ? (i.e. I expect the latter calls to be discarded) ? [22:11] tjholowaychuk: javajunky: they wont unless you next() [22:12] creationix: pgriess: did you see my config gist? [22:12] tjholowaychuk: javajunky: that was the lame part about how Express was set up previously it just kept going [22:12] tjholowaychuk: javajunky: now you can next() or next(err) [22:12] javajunky: is there a mechanism to set it up so that any future call to 'nexts' is ignored. [22:13] pgriess: creationix: no, looking [22:13] tjholowaychuk: javajunky: not sure what you mean, the next middleware layer wont even get called if you dont next() [22:13] javajunky: okey.. I'll take a looksi... [22:13] pgriess: creationix: url? your most recent few gists don't look likely [22:13] markwubben has joined the channel [22:13] creationix: pgriess: sorry, it's a private one https://gist.github.com/a653175cb48f76cf088a [22:14] ThePub has joined the channel [22:14] javajunky: okey, might be glitchy.. but looks like thats how my auth code already works, bonus. [22:15] tjholowaychuk: whoop [22:15] pgriess: creationix: so this is just an alternate syntax for the -p / -U commandline options? [22:15] tjholowaychuk: where is the repo for that again [22:15] marshall_law has joined the channel [22:15] javajunky: oh arse, no i've done it wrong for this stuff :( [22:15] mtodd_ has joined the channel [22:16] creationix: pgriess: yeah, the config.js file [22:16] zmbmartin: tjholowaychuk: so this may be a stupid questions but since express is based on sinatra do you have seperate folder for models or do you so something similar to --> http://howtonode.org/express-mongodb and have seperate providers for data? [22:16] ThePub has joined the channel [22:16] pgriess: creationix: seems fine to me. no reason to make it more complicated, i suppose ;) [22:16] creationix: pgriess: and I added --comment which is a flag that's just ignored [22:16] creationix: makes the processes in htop labeled [22:16] tjholowaychuk: zmbmartin: you can do whatever you want :p express does not force any directory structure on you [22:16] pgriess: creationix: actually, why not a simple json file? to allow users executing code in their config? [22:17] creationix: yep [22:17] blaines has joined the channel [22:17] creationix: and js is easier to write than json [22:17] pgriess: creationix: hm. that's a clever trick. i may co-opt that ;) [22:17] creationix: :) [22:17] satori_: json is terrible for config files [22:17] creationix: json is a data format [22:17] creationix: people should never write it by hand [22:17] pgriess: satori_: care to elaborate? [22:17] creationix: unless they are writing fixtured [22:17] zmbmartin: tjholowaychuk: so there is not a default that will ever be enforced I can set my own default? [22:17] creationix: *fixtures [22:17] satori_: no ability to put comments in [22:17] satori_: I have seen many people use it for that [22:18] pgriess: ick, really? that's a killer [22:18] tmedema has joined the channel [22:18] creationix: or JSON is good for a config format when you really want to lock down what's possible [22:18] creationix: but application configs are usually for the people writing the apps [22:18] tjholowaychuk: zmbmartin: yup, "./views" is a default but that is it, you can use app.set('views', __dirname + '/templates') or something [22:19] zmbmartin: tjholowaychuk: cool :) [22:19] satori_: I have used it for 'static' config data too. I am just saying it;s not ideal for config that are user edited. [22:19] pgriess: hah just catching up on the mailing list re: privilege reducation [22:20] pgriess: creationix: know of anyone running node-websocket-server inside of connect [22:20] pgriess: creationix: its not working out of the box; wondering if i'm forging new territory here or there are known issues [22:20] tjholowaychuk: zmbmartin: just be careful some of those articles are old, dont forget to reference http://expressjs.com [22:21] blaines has joined the channel [22:21] piratepenguin has joined the channel [22:21] javajunky: tjholowaychuk: oh goddamn no base64 no more ;) .. is that built into node yet? [22:21] tjholowaychuk: javajunky: nope :( [22:21] creationix: pgriess: micheil says it works, I haven't tried yet [22:21] tjholowaychuk: it just gets copy/pasted alllll over [22:21] javajunky: *sob* [22:22] pgriess: creationix: ok. i guess i'll try harder ;) [22:22] pgriess: creationix: def works w/ an instance of http.Server. so far no dice w/ connect.Server [22:22] ceej has joined the channel [22:22] javajunky: I assume its not native because ry doesn't want it :9 [22:22] creationix: he had a gist of it working with connect somewhere [22:22] javajunky: hmm actually, looks like crrypto might do it now [22:25] javajunky: no, never mind cmd-c,cmd-z :( [22:25] maqr: tjholowaychuk: tests are run in order, right? so you can build up objects at the top and tear down at the bottom? [22:26] tjholowaychuk: maqr: sync ones yup, but async stuff just goes and does its thing [22:26] tjholowaychuk: makes writing the tests a bit harder, but pays off with crazy speed [22:26] ceej has joined the channel [22:26] maqr: tjholowaychuk: how do i flag one as sync? or is it just sync unless i start adding listeners? [22:27] jakehow has joined the channel [22:27] tjholowaychuk: maqr: its just sync if it does not do anything async :) those will all run serially [22:27] blaines has joined the channel [22:27] tjholowaychuk: but setup / teardown is completely ad-hoc [22:28] maqr: tjholowaychuk: gotcha, ty [22:29] ceej has joined the channel [22:30] javajunky: tjholowaychuk: fuck-yeah basic auth now working again [22:30] tjholowaychuk: javajunky: sweet man [22:30] javajunky: tjholowaychuk: still quite concerned about my approach not fitting in though .. but it works... [22:30] tjholowaychuk: its nice having it at the connect level too we can share all this shit [22:30] javajunky: indeed [22:30] softdrink has joined the channel [22:30] tjholowaychuk: and by shit i mean awesome code [22:31] javajunky: nahh I think you were pretty close to the mark ;) [22:31] tjholowaychuk: jade 0.2.2 is out http://github.com/visionmedia/jade/blob/ae20212f10bb4158f6bb5165c0bda64bf3468ae9/History.md [22:32] Waansin has joined the channel [22:33] aurynn has left the channel [22:33] javajunky: oh make it end tjholowaychuk … no md5 either :9 [22:33] aurynn has joined the channel [22:33] aurynn: I keep forgetting that OSX doesn't do sloppy focus. [22:33] javajunky: cmd-c, cmd-v again [22:33] creationix: md5 is in crypto [22:33] tjholowaychuk: javajunky: you can do md5 with crypto [22:33] javajunky: tf for that [22:33] tjholowaychuk: javajunky: i think connect/utils.js has that, or did at least [22:33] tjholowaychuk: quick little helper [22:35] tjholowaychuk: damn session gotcha keeps getting me [22:36] murz: So this Node Package Manager looks great and it definitely solves my problem - but just out of curiosity... where would I put my modules so that they end up on the require path if I didn't have NPM? [22:38] mape: murz: .node_libraries [22:39] tjholowaychuk: booo... session middleware cuts rps in half [22:39] tjholowaychuk: I blame on md5 [22:40] kersny has joined the channel [22:40] aurynn: I blame communists. [22:41] javajunky has joined the channel [22:41] javajunky: tjholowaychuk: I imagine my auth middleware impacts a little too ;) [22:43] dnolen has joined the channel [22:44] podman: hmm, if i set up nginx to front nodejs, is connection.remoteAddress going to be 0.0.0.0 ? [22:45] podman: if so, i'll be a sad panda [22:45] mjr_: good news: it'll be the IP of nginx. [22:45] mjr_: Which is still not what you want. [22:45] podman: no [22:46] podman: i know i can set nginx to set x-forwarded-for [22:46] podman: so, what would that end up being in node? [22:46] mjr_: req.headers['x-forwarded-for'] [22:46] podman: ah [22:46] podman: that's simple enough [22:46] podman: thanks [22:48] podman: holy crap... when did this happen [22:48] podman: http://expressjs.com/guide.html [22:49] tjholowaychuk: podman: yesterday [22:49] maqr: tjholowaychuk: this is good, i wrote tests, found errors, and now as i try to correct them, i can see if the code passes the tests [22:49] podman: well, that makes me happy [22:49] tjholowaychuk: maqr: great :) [22:49] tjholowaychuk: podman: oh me too lol been iching for a rewrite for a long time [22:49] tjholowaychuk: and the docs are generated now so pepole can contribute easy [22:50] tmpvar: out [22:50] podman: i'm busy building a playback and analytics platform for a start-up i'm launcing in a week... node kind of saved my ass [22:50] mjr_: awesome [22:51] podman: playback of video that is [22:51] mjr_: do a blog post [22:51] podman: when i launch [22:51] satori_: yeah. pls do [22:51] satori_: It's cool when node does hero rescure work. [22:51] podman: my old company, motionbox.com sold to SnapFish and for some reason snapfish didn't want any of the commerical video users [22:51] satori_: rescue [22:52] locks has left the channel [22:52] podman: so i ran some numbers, figrued it would be profitable and offered to buy them [22:52] podman: but i really only have two weeks to get this off the ground [22:53] Waansin: thanks whoever wrote http://expressjs.com/guide.html [22:53] mtodd has joined the channel [22:53] podman: so it was between nodejs and eventmachine [22:53] podman: nodejs won just because i felt like learning something new, but it also happens to be awesome [22:53] satori_: +1 for awesome. [22:54] javajunky: http digest sorted. [22:54] charlenopires has joined the channel [22:54] tjholowaychuk: Waansin: that would be me :) [22:54] satori_: node has made programming significantly more 'fun' for me. [22:55] Waansin: tjholowaychuk well thanks :-) It should make learning nodejs a lot more fun. It's hard enough compiling and running it on Windows [22:55] podman: starting a business in two weeks is still a bitch though [22:55] podman: :\ [22:55] mape: mikeal: why not use disqus? [22:55] tjholowaychuk: Waansin: np [22:55] mikeal: i've never liked the interface [22:55] javajunky: Waansin: you could use one of the binary packages that we've dropped on dropbox etc. [22:56] mikeal: and the conversation is already happenign right [22:56] mape: k [22:56] mikeal: people are commenting on twitter and HN and digg [22:56] mikeal: i'd rather pull in that data for display [22:56] mape: true [22:56] mikeal: rather than having people post on my blog [22:56] podman: anyway, i'm out of here. lots of work to do [22:56] mikeal: the discussion tends to be more civil, except maybe on HN :) [22:56] teemow has joined the channel [22:57] podman: HN is mostly civil :) [22:57] Waansin: javajunky: I could've, but felt that I would get more out of it by compiling from scratch. I want to be able to play with the source as well [22:57] javajunky: Waansin: then I guess you don't get to complain too much about it being hard to compile [22:57] Waansin: :-) [22:58] satori_: Waansin: Why was it difficult? cygwin probs? [22:58] Waansin: setting up cygwin was a bitch though. Missing components untilI got that right. [22:58] mikeal: mostly [22:58] javajunky: did you follow the wiki page that should list all you need ? [22:59] Waansin: I'm also a little loathe to run nodejs within the cygwin shell. So I am still figuring out the correct paths to use for things [22:59] javajunky: um, ok. [23:00] Waansin: I know I'm making my life difficult [23:00] javajunky: indeed :)\ [23:00] creationix: ok, who build windows binaries and if it hard? [23:00] creationix: I would love to include them in Ivy somehow [23:00] creationix: s/if it hard/is it hard/ [23:01] javajunky: building the binaries is trivial, we had someone offer server space, but ryah wasn't available to help with the ci integration :( hopefully that person is still around + interested [23:03] creationix: javajunky: I guess the problem is how I integrate the binaries with Ivy [23:03] creationix: it's based on git and bash [23:04] Waansin: what's the general timezone here? [23:04] creationix: Waansin: Earth [23:04] creationix: this time of day I'd say western hemisphere [23:04] wao: :) [23:04] javajunky: yeah I'm close to signing off in GMT [23:04] Waansin: 1am for me and, oh great, my dog is barking [23:05] satori_: I am close to going for a walk to get coffee. [23:05] satori_: 9am [23:05] creationix: javajunky: I find that lots of people adjust to US time zones [23:05] creationix: crazy internet [23:05] creationix: satori_: near sydney? [23:05] Waansin: I was just asking to know when the channel is most active [23:05] satori_: indeed. in Sydney [23:06] creationix: ACTION loves the clock widgets in osx [23:06] javajunky: not sure, the logs are available, you could write a node.js program to scan em and tell us ;) [23:06] creationix: it varies, but overall it's most active daytime and evening in the western hemisphere [23:06] Waansin: thanks [23:06] creationix: node is really quite the global community though [23:07] Waansin: javajunky: that is a cool idea. If I get time I'll scan the times [23:07] satori_: for sure. [23:07] malkomalko has joined the channel [23:08] kriszyp has joined the channel [23:08] emehrkay has joined the channel [23:12] mscdex: node.js rules! [23:14] tjholowaychuk: expresso 0.5.0 http://bit.ly/bnnnKK [23:15] mscdex: i thought expresso was at 1.0 or something? [23:16] tjholowaychuk: mscdex: thats http://expressjs.com [23:16] tjholowaychuk: poor naming i know :) [23:16] mscdex: oh [23:16] mscdex: hehe [23:16] mscdex: must be the heat getting to me [23:18] maqr has joined the channel [23:19] aconbere: speaking of testing [23:19] aconbere: I've spent the last week hacking on minitest [23:20] aconbere: which I have finding and running tests [23:20] javajunky: tjholowaychuk: if you get a check cold you take a look at http://github.com/ciaranj/connect-auth/blob/master/examples/connect-testing.js for me and tell me if you think the express-auth approach makes sense… esp. around what happens when you're 'not' authenticated… currently you get the option to do something in your middleware..which seems right, but that does mean people might try and write out to the response..after it is closed. [23:20] aconbere: and for the most part dual sided [23:20] malkomalko: howdy [23:21] piratepenguin has joined the channel [23:21] tjholowaychuk: javajunky: im heading out pretty soon but ill try and check it out [23:21] javajunky: tjholowaychuk: its a bit verbose atm, a hangover from express, I'll slim it all down once I get the twitter, facebook, yahoo, google etc auth working again [23:22] aconbere: http://github.com/aconbere/minitest.js [23:22] buzzedword has joined the channel [23:23] javajunky has left the channel [23:23] jakehow has joined the channel [23:25] CrabDude has joined the channel [23:28] PyroPeter has joined the channel [23:31] hpoydar has joined the channel [23:34] [[zzz]] has joined the channel [23:34] creationix has left the channel [23:34] creationix has joined the channel [23:34] creationix has left the channel [23:41] beelzabub: is anyone else running node on arm? [23:48] steadicat has joined the channel [23:51] Tim_Smart has joined the channel [23:51] y has joined the channel [23:53] khug has joined the channel [23:56] rauchg_: pwned [23:57] aheckmann has left the channel [23:58] zapnap has joined the channel [23:58] webr3 has joined the channel [23:59] khug has joined the channel [23:59] steadicat has joined the channel [23:59] kriszyp has joined the channel [23:59] teemow has joined the channel [23:59] dnolen has joined the channel [23:59] kersny has joined the channel [23:59] murz has joined the channel [23:59] paulwe has joined the channel [23:59] bean0r1___ has joined the channel [23:59] melgray has joined the channel [23:59] programble has joined the channel [23:59] mjr_ has joined the channel [23:59] bjartek has joined the channel [23:59] adinardi has joined the channel [23:59] phiggins has joined the channel [23:59] Clooth has joined the channel [23:59] hdon has joined the channel [23:59] SubStack has joined the channel [23:59] jesusabdullah has joined the channel [23:59] kuya has joined the channel [23:59] jaywalk has joined the channel [23:59] voodootikigod has joined the channel [23:59] dnyy has joined the channel [23:59] zz_foca has joined the channel [23:59] pkrumins has joined the channel [23:59] rudebwoy has joined the channel