[00:00] mikeal: davidjrice: jan is in the City right now [00:00] davidjrice: in the city? [00:00] mikeal: i would stick something in Issues [00:00] ryah: randomekek: n and m being the length of the two stirngs [00:00] mikeal: San Francisco [00:01] randomekek: i'll use split and hope substring arrays are fast (like how substr is constant time in java) [00:01] randomekek: thx [00:01] davidjrice: mikeal: ah, willdo [00:01] davidjrice: ACTION aborts join #City [00:01] mikeal: haha [00:07] kriszyp_ has joined the channel [00:07] inimino: randomekek: indexOf maybe marginally faster, since it doesn't have to support regexes, but both will be O(n) in the length of the string (since it has to scan the string) [00:08] inimino: (in other words it doesn't really matter which you use) [00:09] randomekek: im worried that the string.split will allocate a new array each time [00:09] randomekek: although who am i kidding, this is personal use.... [00:09] randomekek: and pread gives in chunks of 16*1024 chars [00:09] ryah: randomekek: string ops are highly optimized [00:10] inimino: randomekek: well, if you're using string.split, you're only going to call it once per chunk [00:10] randomekek: if they were c strings i know the operation efficiency of stuff [00:10] ryah: oh you mean the result - yeah [00:10] ryah: you'll get th array object [00:10] ryah: i bet its slower [00:10] randomekek: but if it were a java substring, the string takes no extra space, they refer out of the original big string [00:10] inimino: I bet it's not significant, though [00:11] randomekek: probably not, especially with the 50kb file im handling :D [00:11] ryah: probably not [00:12] felixge: ryah: in test-module-loading.js, where is the 'debug()' function defined? [00:13] ryah: sys [00:13] ryah: sys is mixed in to all test scripts [00:13] tmpvar has joined the channel [00:13] ryah: see common.js:12 [00:14] felixge: ryah: ah ok, thanks [00:15] felixge: didn't catch that [00:20] unomi has joined the channel [00:23] steadicat has joined the channel [00:30] vickaita has joined the channel [00:35] hassox: hey guys [00:35] hassox: how goes the search for streams? [00:35] hassox: do we have something we can implement yet? [00:36] sztanphet has joined the channel [00:39] ryah: hassox: no [00:39] hassox: damn [00:41] hassox: ryah: do you think we're far away from having something workable? [00:42] ryah: well, i know what i'm going to do - i just haven't done it [00:43] hassox: kk [00:45] ryah: i can't find hte pastie wher i layout the api [00:48] ryah: hassox: http://pastie.org/794198 [00:49] ryah: something like that - but maybe the names will change [00:50] hassox: ryah: what about the discussion on the list? [00:51] ryah: i'm pretty set on this api [00:51] hassox: :) [00:53] ryah: i think 'eof' will be 'end' [00:54] ryah: that's what i've been using recently [00:54] hassox: that's in the net2 branch? [00:54] ryah: yes [00:54] hassox: cool [00:54] ryah: i'll post a roadmap email soon [00:55] hassox: cool [01:04] bentomas has joined the channel [01:05] bentomas: Does anyone know if process.fs is just supposed to be used internally to Node? Or can other external libraries depend on it? [01:05] felixge: ryah_away: you around? [01:06] voodootikigod_ has joined the channel [01:07] inimino: bentomas: it's undocumented, so if it changes out from under you you should be prepared to rewrite your stuff [01:07] isaacs: bentomas: what inimino said. [01:07] felixge: anyway, got my initial sync require done: http://github.com/felixge/node/commit/fd19d4587e6b15b3dc86dcebfed7b91ce552e1a4 [01:07] bentomas: gotcha [01:08] felixge: needs a few more commits leading up to it: http://github.com/felixge/node/commits/require-sync2 [01:08] felixge: in case anybody wants to check it out [01:08] felixge: emailing ryan now [01:08] bentomas: felixge: looks good! so, now you have a sync require and a require.hot. What happens if you require.hot and module that uses the sync require? [01:09] felixge: bentomas: require.hot is not in there yet [01:09] isaacs: ACTION has funny feelings about require.hot [01:09] bentomas: felixge: sorry, right. you've written one though... I'm just wondering how they'll work together [01:09] felixge: but require.hot would block the server [01:10] felixge: I mean the sync require's would [01:10] bentomas: got it, so if you want to have a module that can be require.hot'ed (and not block the server) then you have to use require.hot all along. that's what I thought [01:10] felixge: but I will probably expose a way so you can control how require() behaves inside of 'hot' [01:11] felixge: bentomas: no, you wouldn't have to use hot all along [01:11] felixge: bentomas: you'd have to use require.async() [01:11] felixge: but we can work around this [01:11] bentomas: felixge: sorry, not hot, async [01:11] bentomas: right [01:11] felixge: for those who need it [01:11] felixge: by letting you decide how require works [01:11] bentomas: ahh, that'd be sweet [01:12] felixge: yeah [01:12] felixge: but I don't think its a huge issue [01:13] felixge: I mean your service being unresponsive for ~1s is ok in most cases [01:13] felixge: it's not like any connections would be killed by it [01:13] felixge: or anything [01:13] bentomas: right, right. Just curious! [01:13] bentomas: well, you are doing some good work there! [01:16] felixge: alright [01:16] felixge: late here, signing off [01:16] felixge: cya guys [01:25] dgouldin has joined the channel [01:34] jan____: davidjrice: thanks! I'll look at it [01:39] elliottcable: lol @ “16:25:10 < ryah> elliottcable was, perhaps, right.” [01:39] elliottcable: of course elliottcable was right! he always is. d-; [01:39] elliottcable: so ’sup all? [01:46] jan____: davidjrice: fixed and fixed [01:50] davidjrice: jan____: awesome that was quick :) [01:51] fictorial has joined the channel [01:55] jan____: it was an easy fix [02:06] davidjrice: cool! [02:06] davidjrice: just figured out you can play html5 audio elements simultaneously using a map function [02:07] davidjrice: let the javascript sequencers commence! [02:22] bentomas has left the channel [02:23] stephenlb has joined the channel [02:26] ZhouYu has joined the channel [02:30] bpot has joined the channel [02:31] ZhouYu_ has joined the channel [02:44] jan____ has joined the channel [02:46] jan____ has joined the channel [02:55] cedricv has joined the channel [02:56] cloudhead has joined the channel [02:59] sudoer has joined the channel [03:03] okito has joined the channel [03:05] rictic has joined the channel [03:07] scudco has joined the channel [03:09] vickaita has joined the channel [03:25] rictic1 has joined the channel [03:40] omygawshkenas has joined the channel [03:45] omygawshkenas: Evening' #node. I could use a little help with the posix module. I'm trying to write to a file like so: [03:45] omygawshkenas: http://gist.github.com/301185 [03:45] omygawshkenas: And get back: [03:45] omygawshkenas: Error: Bad file descriptor [03:45] omygawshkenas: at node.js:985:1 [03:45] omygawshkenas: at node.js:989:1 [03:46] omygawshkenas: Is there something obvious that I'm doing wrong? [03:52] dnolen has joined the channel [04:13] steadicat has joined the channel [04:14] pavelz: am trying get a grip on how awsome node.js is... just wondering with all message handing semantics. how does event invocation translates into OS code execution metrics? [04:14] pavelz: does message gets processesed in one of the threads? [04:15] pavelz: or does every message handing invokes a new a thread? [04:23] dnolen has joined the channel [04:31] omygawshkenas: Is it poor Node style to mixin 'sys' to the top level? [04:32] siong1987 has joined the channel [04:34] omygawshkenas: One more question -- what are y'all doing for command-line option parsing? [04:38] rictic has joined the channel [04:43] isaacs has joined the channel [04:44] ZhouYu has joined the channel [04:45] ZhouYu has joined the channel [04:45] ZhouYu has joined the channel [04:49] mattly has joined the channel [04:51] rictic has joined the channel [04:58] rictic has joined the channel [04:59] binary42 has joined the channel [05:04] kennethkalmer has joined the channel [05:14] creationix has joined the channel [05:15] Tyllyn has joined the channel [05:15] mattly has joined the channel [05:16] creationix: omygawshkenas: still there? [05:16] omygawshkenas: yep [05:17] Tyllyn has joined the channel [05:17] creationix: did you figure out the posix issue yet? [05:17] omygawshkenas: I think it was the close() [05:17] omygawshkenas: It ended up getting written to the file alright. [05:18] creationix: I don't think it's documented, but there is a file write helper http://github.com/ry/node/blob/master/lib/file.js#L22 [05:18] creationix: basically it's the inverse to posix.cat [05:19] Tyllyn has joined the channel [05:19] omygawshkenas: ah [05:19] omygawshkenas: thanks. [05:20] creationix: as far as mixin for sys, I personally do that for all testing, but then remove it from any library code since library code doesn't usually need to output anything to the terminal [05:21] creationix: I think we're going to have competing high-level apis for fileIO and async programming in general pretty soon [05:22] creationix: I haven't done command line argument parsing, but I seem to remember there was a library or two that helped with that [05:23] elliottcable: creationix: Hey, I never got to you in ##Paws [05:23] elliottcable: creationix: though I forget what I wanted to ask you o_O [05:24] creationix: if you remember, omygawshkenas can probably help, he's almost done porting coffeescript to coffeescript/javascript [05:25] kennethkalmer has joined the channel [05:43] rictic has joined the channel [05:44] rictic has joined the channel [05:46] randomekek has joined the channel [05:50] Pilate: v8> "a" [05:55] cagdas has joined the channel [06:08] creationix has joined the channel [06:09] sudoer has joined the channel [06:14] jdee has joined the channel [06:24] scudco has joined the channel [06:26] creationix has left the channel [06:28] nsm has joined the channel [06:36] kennethkalmer has joined the channel [06:44] bpot has joined the channel [07:04] RayMorgan has joined the channel [07:07] stephenlb: nodejuice supports browser scroll sync for all connected clients 4 minutes ago. works with iPhone/gPhone. [07:33] mikeal has joined the channel [07:38] unomi: no password recovery on joyent smart? [07:41] jimfear has joined the channel [07:41] unomi: webben: [07:52] chakrit has joined the channel [07:54] jimfear has joined the channel [07:55] sztanpet has joined the channel [07:57] RJ2 has joined the channel [07:57] RJ2 has joined the channel [07:59] orlandov has joined the channel [07:59] rektide has joined the channel [07:59] Netfeed has joined the channel [07:59] jspiros has joined the channel [07:59] teemow has joined the channel [07:59] piranha has joined the channel [08:00] chakrit has joined the channel [08:02] mikeal has joined the channel [08:02] rednul_ has joined the channel [08:02] rockstar has joined the channel [08:03] rockstar has joined the channel [08:03] gwoo has joined the channel [08:03] keeto has joined the channel [08:06] _Pilate has joined the channel [08:10] mikeal has joined the channel [08:12] creationix has joined the channel [08:15] micheil_mbp has joined the channel [08:24] micheil has joined the channel [08:30] micheil has joined the channel [08:33] sveisvei has joined the channel [08:33] micheil has joined the channel [08:46] jspiros has joined the channel [08:52] zmoog has joined the channel [08:54] chakrit has joined the channel [08:56] kennethkalmer has joined the channel [09:01] felixge has joined the channel [09:01] felixge has joined the channel [09:10] johan-s has joined the channel [09:11] johan-s has joined the channel [09:28] mahemoff has joined the channel [09:29] brosner_ has joined the channel [09:29] brosner has left the channel [09:44] markwubben has joined the channel [10:01] mahemoff has joined the channel [10:07] ithinkihaveacat has joined the channel [11:00] christiankvalhei has joined the channel [11:00] christiankvalhei has left the channel [11:00] christiankvalhei has joined the channel [11:00] christiankvalhei has left the channel [11:00] christiankvalhei has joined the channel [11:30] kennethkalmer has joined the channel [11:37] sztanphet has joined the channel [11:56] blackdog` has joined the channel [12:06] sztanpet has joined the channel [12:08] lifo has joined the channel [12:17] vickaita has joined the channel [12:39] dgouldin has joined the channel [12:50] alex-desktop has joined the channel [12:57] keeto has joined the channel [13:18] pmuellr has joined the channel [13:27] binary42 has joined the channel [13:46] kriszyp_afk has joined the channel [13:48] kjeldahl_ has joined the channel [13:48] kjeldahl_ has joined the channel [13:49] spoob_ has joined the channel [14:06] dgouldin has joined the channel [14:14] rtomayko has joined the channel [14:16] FoxFurry has joined the channel [14:18] davidsklar has joined the channel [14:55] giggsey has joined the channel [14:56] cloudhead has joined the channel [14:56] giggsey: Does anyone know of an IRC client based in nodejs? [14:59] inimino: giggsey: someone here is writing one [14:59] inimino: check the wiki [15:00] giggsey: k [15:04] davidsklar has joined the channel [15:04] micheil_mbp has joined the channel [15:08] micheil has joined the channel [15:09] Booster has joined the channel [15:14] kriszyp_afk has joined the channel [15:16] ithinkihaveacat has joined the channel [15:23] micheil: ACTION could write one, but couldn't really be bothered to right now [15:24] giggsey: I want to create a web based socket (ideally HTML5, but Flash :( ) that connects to node.js and from there an IRC server. One connection per socket created [15:27] binary42 has joined the channel [15:27] micheil_mbp has joined the channel [15:36] mAritz has joined the channel [15:36] mAritz: hi. what's the current status of hot-code-loading? [15:37] voodootikigod has joined the channel [15:41] dnolen has joined the channel [15:43] qFox has joined the channel [15:46] bronson has joined the channel [16:08] nsm has joined the channel [16:13] isaacs has joined the channel [16:14] dnolen_ has joined the channel [16:16] nsm has joined the channel [16:19] nsm_ has joined the channel [16:21] zmoog has left the channel [16:28] lifo has joined the channel [16:42] cagdas has joined the channel [16:42] dnolen has joined the channel [16:43] mAritz has left the channel [16:47] sudoer has joined the channel [16:54] rtomayko has joined the channel [16:54] scudco has joined the channel [16:59] RayMorgan has joined the channel [17:03] creationix has joined the channel [17:05] pavelz: here is the question, been reading the source... haven't gotten to the truth yet. but if a callback blocks for longer then it should whole node.js would halt until a callback is done processing? [17:06] deanlandolt: pavelz: that's the idea, yeah [17:06] deanlandolt: (far as i understand it, of course) [17:06] creationix: pavelz: that's why blocking IO is bad [17:07] pavelz: so then I have to make sure all these callbacks are pretty short and its all good. [17:07] deanlandolt: yeah, or push them into another process [17:07] creationix: but yeah, if you have some expensive cpu calculation then you may want to break it up or use web workers [17:07] deanlandolt: (or worker) [17:07] pavelz: creationix: event based cooperative multitasking is so different from threaded model. [17:08] creationix: yep, but I find it works much better for environments that are mostly io bound (like web servers) [17:08] deanlandolt: well, pushing things into processes or workers isn't all that different -- just no shared mem [17:08] pavelz: but its cool, it just not linear from standpoint of coder. funny how we wrote systems just to get in line with old-school thinking : sequential programming [17:10] pavelz: suppose in the future there can be some sort of pre-emption implemented for severe cases, just so that entire hosting websites don't have to be brought down. [17:11] deanlandolt: pavelz: that's kinda what wait does, but that's going away IIRC [17:11] creationix: I imagine hosting systems will have at least one node process per app, so at worst case that one app get's stuck [17:12] steadicat has joined the channel [17:12] bryanl has joined the channel [17:13] Booster has joined the channel [17:15] davidjrice: hey guys, is anyone working on a node.js twitter library? [17:16] davidjrice: I need oauth posting of messages... I guess someting I can contribute to the community. [17:20] gwoo: davidjrice: http://oauth.googlecode.com/svn/code/javascript/oauth.js [17:20] gwoo: something like that might help ^^ [17:20] davidjrice: gwoo: just found that! [17:20] gwoo: nice [17:20] davidjrice: also found http://github.com/mediacoder/node-oauth/blob/master/node-oauth.js [17:20] gwoo: oh nice [17:20] pavelz: nice [17:21] gwoo: hmm [17:21] gwoo: interesting license [17:21] pavelz: Apache licences are fairly common [17:21] gwoo: ok [17:22] gwoo: looks like the code is very similar [17:23] kennethkalmer has joined the channel [17:30] joshbuddy_ has joined the channel [17:31] tmpvar has joined the channel [17:43] voxpelli-laptop has joined the channel [17:48] rictic has joined the channel [17:52] bpot has joined the channel [17:52] scudco has joined the channel [17:54] stephenlb has joined the channel [17:58] RayMorgan_ has joined the channel [17:59] nsm has joined the channel [18:00] eikke has joined the channel [18:04] bronson has joined the channel [18:04] creationix has joined the channel [18:18] ericflo has joined the channel [18:20] aguynamedben has joined the channel [18:20] brapse has joined the channel [18:22] creationix_ has joined the channel [18:33] ericflo has joined the channel [18:33] ryah: felixge: ping [18:34] felixge: ryah: sup? [18:34] ryah: felixge: I want to back out of your simplification instead of the fix patch [18:34] ryah: when we decide which direction we go on hot-reloading we can put them both back in [18:34] ryah: but since i don't want to do that right now, i don't suppose the simplification is much use [18:34] ryah: or? [18:35] felixge: ryah: it's the basis for my new sync patch [18:35] felixge: d [18:35] felixge: did you get that? [18:35] ryah: oh okay. [18:36] ryah: yeah, i just haven't got that far into my inbox yet [18:36] felixge: ryah: regardless of the hot reloading and sync, I think the simplification made the code better [18:36] felixge: so I'd like to keep it [18:36] felixge: but it's your call [18:36] ryah: you don't think the per-module cache is unnecesarry? [18:37] ryah: but - sure. let's keep it if the sync patch is on it [18:38] felixge: ryah: actually, if you include the fix - there is no per module cache anymore. All cache is shared between all modules, but you have the option to create a new module with independent cache (which would be hot code reloading if we were to add that) [18:38] felixge: ryah: But I'm pretty sure the hot code reloading approach is good. In the lack of alternative, I see it as a clean, to-the-point solution. [18:39] felixge: we can label it experimental in the docs so people will know we might change it later [18:39] felixge: but I don't even think we would [18:39] richtaur has joined the channel [18:41] ryah: felixge: yeah - i mean - i'm not against it necessarally. i just want to spend some time playing with it, which i won't do for a few days [18:42] dgouldin has joined the channel [18:42] felixge: ryah: no problem [18:42] felixge: ryah: actually let me edit the fix patch a tiny bit [18:44] ollie has joined the channel [18:45] ryah: felixge: is there a test for the bug that popped up? [18:46] ryah: (the commit isn't on github anymore) [18:47] felixge: ryah: http://github.com/felixge/node/commit/f30239af5a11525f39247ea96bb1388be5e8faa6 [18:48] felixge: yes, it's actually a test that got removed [18:48] ryah: felixge: oh yeah, i remember that test getting removed [18:48] felixge: I took the process.mixin() from blaine's patch as I thought it was a good idea to not propagate cache back up, but its not. After this patch the behavior should be perfect [18:48] ryah: wondered what it was about, but then pushed it anyway :) [18:49] felixge: sorry, my bad. I didn't think through it carefully enough [18:49] ryah: felixge: could you do an instanceof test like they did on the list? [18:49] felixge: ryah: I could, but the removed test is pretty much identical since it checks for object references to be identical [18:50] ryah: yeah - but it's a nice test anyway [18:50] felixge: ok, let me add it [18:50] ryah: (just since you have the code open and stuff:), thanks) [18:51] ryah: felixge: you coming to jsconf? [18:51] felixge: ryah: well, I have no ticket yet because I submitted a talk. But tomorrow is the deadline so I guess it didn't get accepted. [18:52] felixge: so I guess I'll just try to buy 2 regular tickets for me and tim [18:52] felixge: we figured out the 5k EUR bill, and another client is paying 10k they owe us [18:52] felixge: so we should be able to come :) [18:53] ryah: good - maybe your talk will get accepted. did you talk to voodootikigod ? [18:53] deanlandolt: felixge: they haven't gotten around to announcing a lot of the speakers because of the blizzard here in dc [18:53] creationix: I wish I could go too [18:53] konobi: jsconf? [18:53] pavelz: ditto [18:53] felixge: ryah: I asked him if the submission was received, he said it was and that it looked interesting. But there are probably as many submissions as there are attendees :) [18:53] ryah: konobi: we're all going right? [18:54] felixge: the problem with JS is that everybody knows it :) [18:54] ryah: konobi: http://jsconf.us/2010 [18:54] felixge: deanlandolt: ok, do you know if the Feb 12th deadline for finishing the announcements has been extended? [18:54] konobi: ryah: As far as I'm aware there'll probably be you and one other going [18:54] konobi: probably rob [18:54] pavelz: site looks badass, pirate kind of way. [18:54] deanlandolt: not sure but i imagine... [18:55] ryah: konobi: you should come! [18:55] ryah: james too [18:55] deanlandolt: felixge: "We are digging out, but will have more speakers posted soon!" [18:55] deanlandolt: via twitter [18:56] felixge: deanlandolt: thx [18:56] deanlandolt: i'll ping voodootikigod and ask [19:03] dnolen has joined the channel [19:05] deanlandolt: felixge: via voodootikigod: no 2/12 is still the target deadline barring anything "crazy"...i guess there'll be a flurry of anouncements comin' soon [19:06] felixge: deanlandolt: ok, I'll stay tuned :) [19:07] creationix: hey, I just remembered I submitted a proposal a while back, I guess I'll be getting on of those notices [19:09] rolfb has joined the channel [19:09] voodootikigod: hey [19:09] voodootikigod: what bad things have you all been saying [19:10] voodootikigod: the damn irc keeps jumping up and down [19:11] deanlandolt: voodootikigod: just speculating on some jsconf action [19:11] voodootikigod: oh great... [19:11] voodootikigod: ACTION reading backlog [19:12] ollie has joined the channel [19:12] voodootikigod: felixge: your assessment is correct [19:12] voodootikigod: we had over 100 applications [19:12] felixge: voodootikigod: wow :) [19:12] voodootikigod: spreading everything from SSJS to how to draw ponies with javascript [19:13] ryah: from bluebie? [19:13] voodootikigod: bluebie? [19:13] voodootikigod: a lot of ascii penises too [19:14] ryah: github.com/Bluebie <-- early node adopter [19:14] voodootikigod: hahaha [19:14] ryah: strange horse fetish [19:15] voodootikigod: never heard of him [19:15] voodootikigod: haha [19:15] voodootikigod: very strange [19:15] voodootikigod: i mean serously [19:15] ryah: i think it's a her [19:15] voodootikigod: horses [19:15] RayMorgan has joined the channel [19:15] voodootikigod: thus proving never heard of her [19:19] felixge: ryah: http://github.com/felixge/node/commit/b1143efdee9068aaf4d93b798a24b58abe16e034 [19:20] ryah: felixge: thanks [19:27] CIA-78: node: 03Felix Geisendörfer 07master * rb02b54e 10/ (4 files in 4 dirs): [19:27] CIA-78: node: Fix: Module cache did not propagate [19:27] CIA-78: node: This patch makes sure nested modules are available in their parents [19:27] CIA-78: node: cache. The module simplification broke this behavior. [19:27] CIA-78: node: See: [19:27] CIA-78: node: http://groups.google.com/group/nodejs/browse_thread/thread/e875132469547d2 [19:27] CIA-78: node: http://github.com/ry/node/commit/b73f61a137841cebac8459203b6be3baa1756980 - http://bit.ly/dAzpS1 [19:30] inimino: ACTION didn't know of Bluebie's fetish, makes a note [19:31] sveisvei has joined the channel [19:31] kriszyp has joined the channel [19:37] sztanphet has joined the channel [19:42] mikeal has joined the channel [19:47] Harrison has joined the channel [19:52] pixelcort has joined the channel [19:52] isaacs: ryah: so, replacing the trampoline with a switch and not buffering the chunks amounts to about a 5% speed-up. [19:52] ryah: good [19:52] isaacs: i like it. [19:53] isaacs: and programming with regular expressions just feels cool. [19:54] isaacs: s/\}\nT.([A-Z_0-9]+) = function \(parser, c\) \{\n/continue;\ncase S.$1:\n/g [19:54] piranha has joined the channel [19:55] orlandov: hey so if, say, i want to initiate 3 actions in "parallel" that return promises and i want a callback to be fired once all three return success, is there canonical way of doing this? or should i just ++ a counter on every success [19:56] ryah: orlandov: no there isn't [19:56] orlandov: right now if i want to avoid a race condition i need to nest the callbacks, but in reality i don't care about the order [19:56] mikeal: i totally saw something in a thread about this [19:56] mikeal: group promises or something [19:56] orlandov: i was thinking about making a simple event emitter that would just take promises and fire an event when they've all fired... or something [19:56] ryah: yeah there are some snippits around but nothing in core [19:56] orlandov: ya [19:57] orlandov: kk, that gives me hope :) ill do some more digging [19:57] deanlandolt: orlandov: couldn't you return a promise, initiate all three actions and when all three finish resolve it? [19:57] ryah: i mean, it's something that is needed but we've been debating the promise thing for a while [19:57] orlandov: ryah: sure, i'd let that stuff settle down a bit probably [19:58] deanlandolt: yeah, but in this case the promise is created from user-land code -- totally outside of node core [19:58] deanlandolt: shouldn't matter what happens with node's promise [19:58] ryah: Promise.group() Promise.sequence() [19:58] orlandov: yeah i'm not so much concerned about the node core, so long as i can avoid reinventing it (if it alrady exists) [19:59] creationix: I'm working on a small library for just that [19:59] ryah: maybe i'll just add them right now [19:59] orlandov: anyways, no rush, just something i've been curious about :) [20:00] creationix: two I've found useful are map and filter functions that take async callbacks as the filter [20:00] orlandov: creationix: got a url handy? :) [20:00] orlandov: i'd love to take a look [20:00] creationix: http://gist.github.com/300639 [20:00] orlandov: cheers! [20:00] creationix: it's based on the continuable style, but works with promises too [20:02] creationix: orlandov: also see http://howtonode.org/control-flow-part-ii for one of the implementations of parallel [20:02] ryah: creationix: you know about posix.*Sync ? [20:02] creationix: no, where is it? [20:02] ryah: e.g. posix.readdirSync [20:02] ryah: its there [20:03] orlandov: wow, ++ to whomever created howtonode.org [20:03] ryah: creationix made it [20:03] creationix: ryah: nice, does it use wait under the hood? [20:03] creationix: orlandov: thanks [20:03] ryah: creationix: no, it's real sync [20:03] creationix: awesome, I'll update my code before publishing the next article [20:04] ryah: i mean it's undocumented for a reason - i'm problaby going to move it into another module [20:04] ryah: we've been talking about 'fs' 'fs-sync' and 'fs-basic [20:04] creationix: yeah, I like the idea [20:04] ryah: maybe fs-sync should be in fs-basic though [20:05] ryah: jusing the *Sync naming [20:05] creationix: what's the difference between sync and basic? [20:05] ryah: basic uses callbacks instead of promises [20:05] ryah: fsBasic.readdir("/usr", function (err, files) {}) [20:06] ryah: files = fsBasic.readdirSync("/usr") [20:06] ryah: fs.readdir("/usr").addCallback(function (files) {}) [20:06] creationix: ohh, I like basic [20:07] creationix: could we make basic the default fs and then have fsPromise and fsSync? [20:07] ryah: maybe.. [20:07] ryah: promises are kind of nice though [20:08] creationix: I guess make fs be the one that the most people will end up using [20:09] ryah: i'd be okay with having fs be without promises [20:09] creationix: I for one will use the basic version more [20:09] charlenopires has joined the channel [20:13] inimino: ACTION would also vote for 'fs' with callbacks, and fsPromise and fsSync [20:14] bentomas has joined the channel [20:15] creationix: inimino: I'm thinking of releasing a small library that has parallel, map, filter, and filter_map. And writing an article to go with it. [20:16] creationix: just not sure which style to use (promise, callback, continuable) [20:16] creationix: promise is still the main in current node [20:17] inimino: creationix: sure, sounds great... write whatever style you prefer [20:18] inimino: creationix: I'll probably adapt it to my continuable-flavor and have a little utility library of them eventually [20:18] inimino: whenever I get back to that [20:18] creationix: the problem with promises is that "addCallback" and "addErrback" aren't bound to the instance, they're functions on the prototype [20:18] creationix: so they can't be used directly [20:18] creationix: var fn = promise.addCallback; [20:18] inimino: well, there are lots of problems with promises :-) [20:18] creationix: fn is now meaningless [20:19] inimino: especially if you like a functional style and like to use a lot of HOFs and closures [20:19] creationix: it could be fixed in node at the expense of making promises a little slower to create [20:19] inimino: anyway, client work calls, bbl [20:19] inimino: let me know if you write something :) [20:19] creationix: ok sounds good [20:26] JimBastard has joined the channel [20:27] brosner_ has joined the channel [20:27] JimBastard: does anyone feel like checking out this site i just launched? presenting tonight to 300+ people ...a bit nervous! [20:27] JimBastard: http://www.productwars.com/ [20:27] gwoo: JimBastard: nice! [20:28] JimBastard: im responible for all the UX (clicky click, fadey fade, hovers, etc) [20:29] JimBastard: binary42 ? :p [20:29] gwoo: JimBastard: its nicest UX for battles i have seen [20:29] JimBastard: thank you [20:29] binary42: JimBastard: you bastard. :P [20:29] cadorn has joined the channel [20:29] JimBastard: i setup the UI so you can fingerfuck your mouse / keyboard and the UI will never break [20:50] rictic has joined the channel [20:55] pixelcort: Hey. I'm new to Node.js and was wondering if someone could take a look at an async dependency manager for task dependency I'm working on for it. [20:55] pixelcort: github.com/pixelcort/AsyncDependencyManager [20:56] pixelcort: I'm trying to create a tool that would make it easy for people to write out a graph of tasks that depend on each other, with a simple callback system to trigger that a task is complete. [20:56] JimBastard: pixelcort have you been reading the mailing list? [20:56] pixelcort: No, not lately; I'll take a look now. [20:57] JimBastard: i think there has been a lot of talk about this stuff [20:57] piranha has joined the channel [21:01] Harrison has joined the channel [21:17] sztanpet has joined the channel [21:22] bentomas: pixelcort: shameless plug, you might want to look at my library for doing this: http://github.com/bentomas/node-continuables [21:23] pixelcort: bentomas: Cool, thanks for the link. [21:23] Connorhd has joined the channel [21:24] pixelcort: I'm excited about tools like this that will help manage task dependencies. The most common of which will be sequences of tasks and sets of non-dependant tasks with a final callback. [21:24] bentomas: yeah, that's the goal! [21:31] Netfeed: is there a xml parser somewhere in node? [21:32] bentomas: Netfeed: isaacs is working on one: http://github.com/isaacs/sax-js [21:32] bentomas: Netfeed: or there is a more thorough list on the wiki: http://wiki.github.com/ry/node/modules#parsers [21:32] itistoday has joined the channel [21:33] Netfeed: thank you [21:37] felixge: ACTION us back [21:41] micheil_mbp has joined the channel [21:42] jcrosby has joined the channel [21:45] mcarter has joined the channel [21:46] hassox has joined the channel [21:48] charlenopires has joined the channel [21:49] mattly has joined the channel [22:00] mikeal has joined the channel [22:01] jed has joined the channel [22:04] ithinkihaveacat has joined the channel [22:06] mahemoff has joined the channel [22:06] geoff_blair has joined the channel [22:31] isaacs has joined the channel [22:33] cadorn has joined the channel [22:37] okito has joined the channel [22:39] geoff_blair has joined the channel [22:48] _ry has joined the channel [22:50] jcrosby has joined the channel [22:57] geoff_blair has joined the channel [22:57] ryah_away: isaacs: the parser is looking good [22:58] isaacs: thanks [22:58] felixge has joined the channel [22:58] felixge has joined the channel [22:58] isaacs: still need more tests, though [22:58] ryah_away: newTag could be inlined [22:59] isaacs: yeah, probably a few other things like that [23:00] ryah_away: yeah, it's looking really nice [23:01] felixge: ryah_away: let me know when you have some time to look at the sync patch [23:03] brandon_beacher has joined the channel [23:05] davidjrice: anyone done any oauth with node yet? [23:05] davidjrice: trouble getting those libraries I found working so far. [23:06] olivvv has joined the channel [23:07] drostie has joined the channel [23:07] jcrosby has joined the channel [23:07] skampler has joined the channel [23:09] ryah_away: felixge: somehow catSync isn't working for me [23:09] ryah_away: not sure why yet [23:10] jimfear has joined the channel [23:12] felixge: ryah_away: did you apply all patches? [23:12] ryah_away: no just the first [23:12] felixge: ryah_away: catSync needs a patch you did for me on posix.syncRead [23:12] felixge: ryah_away: but its only in my branch [23:13] felixge: http://github.com/felixge/node/commits/require-sync [23:13] felixge: http://github.com/felixge/node/commit/6dcb7f75ae65ac2ec1526ba57271b1b84bbc7e4f [23:13] ryah_away: oh okay [23:16] jackyyll: for anyone who is interested: http://github.com/jackyyll/nodejs-websockets [23:16] jackyyll: just put that up [23:18] Connorhd: yet another websockets implementation? :P [23:19] jackyyll: yup lol [23:20] jackyyll: i just rewrote Guille's to be evented instead of modular [23:21] drostie: okay, so. you guys are absolutely amazing. I /never/ thought I'd see a javascript-based server. [23:22] drostie: Are there any sorts of benchmarks against lighttpd and apache? memory consumption and request handling and such? [23:22] drostie: oh, wait. they're on the site. nevermind. :x [23:22] Connorhd: I don't think theres any benchmarks for serving static files and such [23:23] inimino: there's a hello world benchmark [23:23] cds has joined the channel [23:23] inimino: which basically measures HTTP request parsing speed and per-request overhead [23:23] ryah_away: what's the best jsdoc? [23:24] orlandov: drostie: ryah's jsconf had some graphs/numbers [23:24] Connorhd: ryah, a few were suggested in the mailinglist I think? [23:25] ithinkihaveacat: jackyyll: you have some .AppleDouble and .DS_Store files in there! [23:25] jackyyll: whoops [23:26] jackyyll: blast ye, OSX [23:26] jspiros has joined the channel [23:26] felixge: drostie: you shouldn't compare with lighttpd or apache. You should compare lighttpd/apache + dynamic scripting language [23:27] felixge: Node may have a chance at competing for serving large static files, but I think for tons of small file downloads nginx will win [23:27] isaacs: nginx is quite a bit faster than node at almost everything i've seen so fare. [23:27] isaacs: but php and ruby are slower than v8 [23:27] Connorhd: is node really trying to compete with nginx? [23:27] felixge: Connorhd: no [23:27] felixge: I'd still like to see benchmarks for large static files so :) [23:28] Connorhd: yeah, graphs are pretty �_� [23:28] isaacs: apache wins if you compare serving a static file, at least, on my system, but it also cheats by caching it in memory. [23:28] isaacs: (or, so i'm told) [23:28] drostie: Well, what I'd really be comparing it with is lighttpd+django. (We use apache+php at work, but they kind of have an attitude of "we'll optimize for speed later. Just get something that works, and is secure, and that does the job the client wants." [23:28] drostie: ) [23:28] felixge: isaacs: try high concurrency, apache looses [23:28] felixge: :) [23:28] isaacs: loses on memory, but not requests/sec [23:29] isaacs: (until you hit The Wall, that is) [23:29] ithinkihaveacat: jackyyll: also, re isArray in tools.js, you can use Array.isArray(), see http://wiki.github.com/ry/node/ecma-5mozilla-features-implemented-in-v8 [23:29] felixge: drostie: My over the thumbs calculations says node will be an order of magnitude faster than most other scripting languages for serving hello world [23:29] felixge: but that's just because node can directly share memory between the server and the language [23:30] jackyyll: oh cool [23:30] jackyyll: thanks ithinkihaveacat [23:30] nefD has joined the channel [23:31] ryah_away: felixge: that's not true [23:31] felixge: ryah_away: explain [23:31] ryah_away: it's very much on par with eventmachine and twisted [23:32] drostie: felixge: yes, but I'm more interested in knowing how it scales with database-driven applications or so. In other words, if I write a templating language in V8+Node rather than PHP, and serve it up with Node, can I expect reasonable performance from it? Et cetera. I dunno -- maybe Node has its own templating language already. :x [23:32] orlandov: but without twisted's horrible api :) [23:32] felixge: ryah_away: right, I was talking about conventional fastcgi setups [23:32] drostie: I'm just seeing it all, and it's past midnight here. ^_^ [23:32] felixge: ryah: or mod_php, and friends [23:32] felixge: that badly phrased by me [23:32] ryah: shrug [23:32] mikeal: Twisted is pretty slow actually [23:33] orlandov: drostie: fwiw V8 is one of the fastest "scripting" engines [23:33] mikeal: because callbacks in Python are pretty expensive compared to JavaScript [23:33] jimfear has joined the channel [23:33] felixge: drostie: well, there are not a lot of db adapters yet [23:33] felixge: drostie: templating engine speed will just depend on how well the templating engine is written - there are a few good ones out there [23:33] mikeal: http://code.google.com/apis/v8/design.html [23:34] mikeal: Dynamic Machine Code Generation [23:34] pixelcort has left the channel [23:35] ryah: felixge: so - i don't really undersatnd this but several tests are failing [23:35] felixge: ryah: you merged the entire branch? [23:35] ryah: yeah [23:35] felixge: let me try with clean cache [23:35] kriszyp_ has joined the channel [23:38] tmpvar has joined the channel [23:38] tmpvar: who here is going to nyc.js tonight? [23:38] ryah: felixge: http://pastie.org/821060 [23:38] ryah: ACTION <-- slow computer [23:39] ryah: (slow computers = very good for developing fast softwrae) [23:39] inimino: :) [23:39] davidjrice: amen :) [23:39] ryah: somethin gis making timer slow in your commits... [23:40] ryah: sorry -i guess those commit numbers arnt global [23:41] felixge: commit numbers? [23:41] ryah: but the frist is on your branch, the second is the current ry/master [23:41] okito has joined the channel [23:42] ryah: i don't get it though.. why would it be slower? [23:42] ryah: it has nothing to do with module loading [23:43] drostie: okay, well. thanks to the node team for bringing some joy into my evening. :D [23:43] felixge: ryah: I'm not sure how to read the ouput in your pastie [23:44] felixge: what's the expected ouput? [23:44] ryah: felixge: i'm just running test/mjsunit/test-timers.js on both branches [23:44] ryah: the second [23:44] felixge: ryah: so the diff should be closer to full seconds? [23:45] felixge: for what its worth I'm seeing the same thing here [23:45] felixge: identical numbers [23:46] felixge: alomst identical [23:47] mikeal: hrm…. isaacs sn't here [23:47] mikeal: do we have one of those bots that I can message to tell him something when he shows up [23:49] CIA-78: node: 03Ryan Dahl 07master * rcd41e30 10/ src/node_file.cc : Return chunk & bytes read for posix.readSync() - http://bit.ly/cVMCVP [23:49] CIA-78: node: 03Ryan Dahl 07master * r1b42276 10/ test/mjsunit/test-timers.js : Small clean up to test-timers.js - http://bit.ly/bhM9fC [23:51] felixge: ryah: so did you figure anything out yet? [23:51] ryah: no [23:53] mattly has joined the channel [23:54] felixge: really strange [23:55] felixge: ryah: if I wrap the whole test in a setTimeout(..., 500) - the problem goes away [23:55] felixge: so something is messing with the timers right round the sync require finishing [23:55] felixge: looks harmless as it only effects startup, but its very odd [23:55] felixge: :( [23:59] RayMorgan_ has joined the channel