[00:06] aho has joined the channel [00:11] JoePeck has joined the channel [00:22] mattly has joined the channel [00:23] markwubben has joined the channel [00:35] gwoo has joined the channel [00:56] dnolen has joined the channel [01:02] mahemoff_ has joined the channel [01:12] bpot has joined the channel [01:17] unomi has joined the channel [01:26] binary42 has joined the channel [02:14] brandon_beacher has joined the channel [02:16] keeto has joined the channel [02:16] aguynamedben has joined the channel [02:28] rtomayko has joined the channel [02:37] gwoo has joined the channel [02:50] maritz has left the channel [02:52] voodootikigod has joined the channel [02:55] cds_ has joined the channel [02:59] cdorn has joined the channel [03:08] masuidrive has joined the channel [03:18] masuidrive has joined the channel [03:21] davidjrice: hey guys, ping! [03:22] davidjrice: how would I convert ascii to hex in js ? [03:22] davidjrice: looking atm for some library, finding some old, quite procedural ones so far [03:26] joshbuddy has joined the channel [03:31] JimBastard has joined the channel [03:32] joshbuddy has joined the channel [03:32] joshbuddy has joined the channel [03:33] brainproxy has joined the channel [03:33] eelco has joined the channel [03:36] eelco: hi, what's a good point to start debugging if emitting events from my object (which inherits from EventEmitter) does not work (except the 'newListener' event)? [03:45] eelco: nevermind, got it [04:06] cloudhead has joined the channel [04:13] dnolen has joined the channel [04:18] JoePeck has joined the channel [04:23] joshbuddy has joined the channel [04:23] joshbuddy has joined the channel [04:33] emyller has joined the channel [04:41] edspencer has joined the channel [04:42] siong1987_ has joined the channel [04:50] brainproxy has joined the channel [04:51] brainproxy has joined the channel [04:51] brainproxy has joined the channel [04:52] brainproxy has joined the channel [05:01] brainproxy has joined the channel [05:02] brainproxy has joined the channel [05:07] brainproxy has joined the channel [05:13] joshbuddy has joined the channel [05:13] joshbuddy has joined the channel [05:25] masuidrive has joined the channel [05:34] brainproxy has joined the channel [05:43] gwoo has joined the channel [05:51] siong1987_ has joined the channel [06:06] ryah_away: davidjrice: (15).toString(16) //=> "F" [06:07] ryah_away: er [06:07] ryah_away: :) [06:07] ryah_away: something like that [06:08] JimBastard: whats up ryah_away , how is the ampq coming along? [06:12] jed has joined the channel [06:27] kennethkalmer has joined the channel [06:36] ryah_away: JimBastard: its starting to take shape [06:37] ryah_away: still got some bugs [06:53] dnolen has joined the channel [07:01] mahemoff_ has joined the channel [07:02] mindware has joined the channel [07:03] mindware has joined the channel [07:04] mindware has joined the channel [07:05] mindware has joined the channel [07:06] kennethkalmer has joined the channel [07:06] mindware has joined the channel [07:07] mindware has joined the channel [07:08] mindware has joined the channel [07:09] mindware has joined the channel [07:11] mindware has joined the channel [07:12] mindware has joined the channel [07:13] mindware has joined the channel [07:13] felixge has joined the channel [07:13] felixge has joined the channel [07:14] mindware has joined the channel [07:14] binary42 has joined the channel [07:15] mindware has joined the channel [07:16] mindware has joined the channel [07:18] frodenius has joined the channel [07:57] piranha has joined the channel [08:14] rolfb has joined the channel [08:16] jed has joined the channel [08:18] zmoog has joined the channel [08:57] kjeldahl has joined the channel [09:01] mAritz has joined the channel [09:02] mAritz: good morning :) [09:12] rolfb has joined the channel [10:11] markwubben has joined the channel [10:13] teemow has joined the channel [10:20] olivvv has joined the channel [10:41] emyller: mAritz: hey. [10:55] mAritz: :) [11:11] ithinkihaveacat has joined the channel [11:22] markwubben_ has joined the channel [11:23] nefD has joined the channel [11:32] ithinkihaveacat has joined the channel [11:35] piranha has joined the channel [11:41] caolanm has joined the channel [11:42] caolanm: what's the situation with hot code loading in node.js? I've seen some discussion on how it could be implemented, but is it something that will be supported in the future? [11:59] Connorhd has joined the channel [12:07] mAritz: caolanm: asked the same question a couple of days ago. no answer. :( [12:34] alex-desktop has joined the channel [12:37] zmoog has joined the channel [13:01] zmoog has left the channel [13:06] voodootikigod has joined the channel [13:09] pmuellr has joined the channel [13:22] voodootikigod has joined the channel [13:26] rolfb has joined the channel [13:49] spoob has joined the channel [14:18] eikke has joined the channel [14:28] voodootikigod has joined the channel [14:53] davidjrice: ping [14:55] jed has joined the channel [14:57] mAritz: pong [15:03] davidjrice: heh [15:03] davidjrice: anyone got any hmac-sha1 fu? [15:03] atcrabtree has joined the channel [15:04] davidjrice: I'm trying to verify the output of a new function in hashlib. [15:04] atcrabtree has joined the channel [15:04] davidjrice: Only, the official test vectors don't appear to be working. I'm not sure if there's another step required. [15:14] cloudhead has joined the channel [15:18] tmpvar has joined the channel [15:21] piranha has joined the channel [15:33] keeto has joined the channel [15:33] jed_ has joined the channel [15:39] alexiskander has joined the channel [16:08] ithinkihaveacat has joined the channel [16:16] r11t has joined the channel [16:17] steadicat has joined the channel [16:19] creationix has joined the channel [16:20] creationix: Finally got around to writing another article for howtonode.org http://howtonode.org/control-flow-part-iii [16:29] binary42 has joined the channel [16:30] creationix has left the channel [16:38] bpot has joined the channel [16:45] dnolen has joined the channel [16:47] bentomas has joined the channel [16:50] kennethkalmer has joined the channel [16:53] dnolen has joined the channel [16:53] shfx has joined the channel [16:53] Harrison has joined the channel [16:53] shfx: hi guys [16:53] shfx: I have a lil problem compiling nodejs on my server [16:54] shfx: # Fatal error in v8::Context::New() [16:54] shfx: # Error initializing V8 [16:54] shfx: can anyone give me a hint whats that ? [16:57] shfx: this is scons output - http://www.copypastecode.com/22256/ [16:58] shfx: I just can't get it working [17:01] shfx: radious ? wroc/pl ? [17:01] davidjrice: shfx: what server os ? [17:02] shfx: debian [17:02] davidjrice: I've heard ubuntu / debian are the best for not [17:02] davidjrice: oh, doh [17:02] shfx: ;) [17:02] davidjrice: I've yet to actually take it to production. [17:02] atcrabtree_ has joined the channel [17:02] shfx: is there any stable version of node ? [17:03] davidjrice: http://nodejs.org/#download ? [17:03] shfx: or maybe a .deb [17:03] davidjrice: I've been building from the latest HEAD regularly enough [17:03] shfx: yup... this is what i tried [17:04] davidjrice: you tried building from head? [17:04] shfx: nope, gonna try this [17:04] shfx: thx [17:04] shfx: ;) [17:04] davidjrice: if you're on slicehost maybe try spinning up a new ubuntu vm... [17:04] davidjrice: I believe that's what ryah uses [17:04] davidjrice: I might be wrong tho [17:05] shfx: davidjrice: hmm ubuntu vm ? just for node ? [17:05] davidjrice: I like to have a different server per-project anyway... ymmv [17:10] shfx: davidjrice: compiling from head [17:10] shfx: cross your fingers [17:10] shfx: ;) [17:12] shfx: damn, same error [17:14] shfx: davidjrice: I added a prefix to ./configure ... maybe this is a problem [17:14] shfx: $HOME/usr/local [17:16] tlrobinson_ has joined the channel [17:16] JimBastard_ has joined the channel [17:17] JimBastard_: i always forget, whats the easiest way to make a serious of jQuery animations perform in parellel? [17:18] JimBastard_: make a series* [17:19] atcrabtree has joined the channel [17:19] creationix has joined the channel [17:19] rtomayko has joined the channel [17:23] Harrison has joined the channel [17:23] felixge has joined the channel [17:23] felixge has joined the channel [17:25] felixge: ryah_away: how are we gonna celebrate tomorrow? [17:25] JimBastard_: errr [17:25] JimBastard_: this isnt the jQuery room [17:25] JimBastard_: LOL [17:26] joshbuddy has joined the channel [17:29] bentomas: felixge: what are you celebrating? [17:29] bentomas: 1 year? [17:29] felixge: bentomas: yes [17:30] bentomas: Exciting! [17:34] qFox has joined the channel [17:43] mAritz has left the channel [17:47] steadicat has joined the channel [17:59] dnolen has joined the channel [18:03] rolfb has joined the channel [18:08] stephenlb has joined the channel [18:15] bronson has joined the channel [18:20] stephenlb has joined the channel [18:29] binary42_ has joined the channel [18:30] cds has joined the channel [18:30] binary42 has joined the channel [18:39] maritz has joined the channel [18:54] ryah_away: felixge: did you see the extra tickets announcement [18:55] CIA-77 has joined the channel [18:57] richtaur has joined the channel [19:08] nolan_d has joined the channel [19:09] nolan_d: Very new to node.js here. Any thoughts on why http://dl.dropbox.com/u/147071/weatherspy.js might not be echoing back data when I test it via telnet? [19:10] nolan_d: Yet it works for someone else. Just not for me. [19:11] ryah_away: nolan_d: donno - it looks okay [19:12] nolan_d: Yeah, it's practically copied from the website. [19:12] nolan_d: How do I debug it? [19:15] nolan_d: I'm on AMD64, does that matter at all? I see that V8 only supports IA32, wasn't sure if it'd still run, just in 32-bit mode. [19:15] nolan_d: I get the "Hello.", so something works at least. [19:16] binary42 has joined the channel [19:18] creationix: V8 runs fine on AMD64 [19:19] ollie has joined the channel [19:28] edspencer has joined the channel [19:29] felixge: ryah: damn, looks like I won't be at jsconf :( [19:29] nolan_d: Can't even get it receiving with nc. Wow. [19:31] felixge: nolan_d: hm I can reproduce, seems very odd [19:31] felixge: nolan_d: looking into it [19:31] nolan_d: Cool, thanks. Whew, thought I was going insane. :) [19:32] nolan_d: Seems like a very cool concept, I really want to play with it. [19:32] creationix: felixge: me too, we can commiserate [19:32] felixge: creationix: yeah, lets do that [19:32] atcrabtree: felixge: why not? they didn't release the tickets yet? [19:32] felixge: creationix: timing is just not working out for me in addition to the whole thing being very expensive when not speaking and flying over the ocean [19:34] felixge: atcrabtree: I could have gotten a ticket, but my partner doesn't want to come and since we split 50:50 I'd have to pay out of my own pocket, not our company. We are launching a new project for a client, we're already taking another trip right before and after. bla bla - just not working out :| [19:34] creationix: felixge: though I did just get a patch into sammy.js minutes before it was released, so part of me will be there [19:34] felixge: creationix: nice :) [19:34] felixge: I really wish I could go [19:34] felixge: jed is going, would love to meet him [19:34] felixge: and a lot of other people [19:34] mikeal has joined the channel [19:34] creationix: me too, I want to meet all these people. atcrabtree is the only one I've met in person [19:35] atcrabtree: and that was underwhelming =) [19:36] creationix: felixge: at least you made it to jsconf.eu last year right? [19:36] felixge: creationix: yeah [19:36] felixge: it was awesome [19:37] felixge: hopefully it will happen again [19:37] creationix: If we have one this year, I'll try to make it. I should be more stable by then [19:37] felixge: creationix: stable? [19:37] creationix: financially [19:37] felixge: creationix: ah, yeah [19:38] felixge: the disadvantage of not working for a big corp, gotta pay all your trips yourself :| [19:38] creationix: yep [19:38] nolan_d: "make test" seems to run fine here. [19:38] felixge: damn, it really seems 'receive' is broken [19:39] felixge: OK [19:39] felixge: the docs are wrong [19:39] felixge: nolan_d: 'receive' should be 'data' [19:40] nolan_d: Ah. Does that make sense? [19:40] felixge: nolan_d: you are using git HEAD, right? [19:40] nolan_d: I mean, I'd expect it to be "receive", but I'm just a noob. [19:40] felixge: not a released version [19:40] felixge: ? [19:40] nolan_d: Yeah. [19:40] felixge: nolan_d: the API has changed [19:40] felixge: nolan_d: the api.txt in HEAD is already updated [19:40] nolan_d: Aha. [19:40] felixge: but the website refers to the latest release [19:41] felixge: nolan_d: I believe it was changed to make all apis more similar [19:41] nolan_d: I'll check the included docs, then. Thanks, had no idea things moved that quickly. :) [19:42] felixge: nolan_d: most stuff is stable usually, sorry for the troulbe [19:42] felixge: * trouble [19:42] felixge: :) [19:43] nolan_d: OK, good. I was a bit worried that I'd found a bug so quickly. :) [19:46] felixge: nolan_d: not impossible, but you'll have to try harder usually :) [19:46] nolan_d: Good. :) [19:52] ryah: i have to find a way to give deprication errors [19:53] ryah: for that stuff.. everyone will have problems when the new version is released. [19:54] ryah: (maybe putting an addlistener on sockets?) [20:01] mikeal: for APIs you remove you could customize the .get on GLOBAL and process [20:08] hesslow has joined the channel [20:08] aguynamedben has joined the channel [20:11] pmuellr_ has joined the channel [20:18] sztanphet has joined the channel [20:21] lifo has joined the channel [20:33] atcrabtree: how can I implement a function to return a promise? [20:37] gf3 has joined the channel [20:38] isaacs has joined the channel [20:38] atcrabtree: nm found it in the group [20:38] isaacs: ryah: do you have any docs on node_buffer.cc other than what's in the code? [20:52] cadorn has joined the channel [20:54] stephenlb has joined the channel [20:54] atcrabtree has joined the channel [21:00] aguynamedben has joined the channel [21:06] ryah: isaacs: no [21:06] ryah: isaacs: check the test [21:06] ryah: isaacs: node-amqp uses it too [21:06] isaacs: ok, cool [21:07] isaacs: i think i'm seeing how i could use this to write a non-crashing decodeURIComponent that does utf 8 properly [21:07] isaacs: or even perhaps a binary/b implementation [21:07] isaacs: but it might be better to just learn from it, and write a node_binary.cc instead. [21:08] isaacs: it'd be nice if there was an easy way to shove an array of numbers into it [21:10] zimbatm: ryah: I heard you have performance regressions on the net2 branch ? [21:10] zimbatm: what kind of benchmark did you use ? [21:11] zimbatm: I tried "ab -n 100 -c 100" on the "http_simple.js" but got no big differences [21:22] kriszyp has joined the channel [21:26] joshbuddy has joined the channel [21:26] joshbuddy has joined the channel [21:28] alexiskander has joined the channel [21:29] cloudhead has joined the channel [21:35] ithinkihaveacat_ has joined the channel [21:55] malkomalko has joined the channel [22:11] eikke has joined the channel [22:13] ryah: zimbatm: try -n 50000 [22:17] zimbatm: ryah: what numbers do you get on master ? I get a timeout at about 16443 requests [22:20] creationix_ has joined the channel [22:20] zimbatm: (with -c 100) [22:25] felixge: ryah: can you merge: http://groups.google.com/group/nodejs/browse_thread/thread/0059d3fd0b6c6c21 ? [22:25] zimbatm: ok, I see :-/ factor of 10 at least [22:39] joshbuddy has joined the channel [22:39] joshbuddy has joined the channel [22:40] zimbatm: felixge: got more work for you :) http://gist.github.com/305064 [22:41] zimbatm: I added wait() after emitXX test cases [22:43] felixge: zimbatm: hm, I take no blame for wait() *g* [22:43] felixge: but let me look [22:43] zimbatm: hehe [22:44] zimbatm: I believe it can be patched by adding a gotFired test before the rest of the code [22:44] zimbatm: but it seems ugly [22:44] zimbatm: the whole "coro" stuff is ugly :-p [22:44] felixge: zimbatm: probably necessary so [22:45] felixge: zimbatm: right, but lets limit it to being ugly - not broken, for the time being [22:45] felixge: zimbatm: corrupt patch at line 33 [22:46] felixge: zimbatm: could you make this with git format-patch ? [22:46] felixge: would also help to have it as a commit by you for crediting the test case to you [22:47] zimbatm: felixge: gist updated [22:48] kriskowal has joined the channel [22:51] atcrabtree_ has joined the channel [22:57] felixge: zimbatm: http://github.com/felixge/node/commits/promise-wait [22:57] felixge: zimbatm: http://github.com/felixge/node/commit/a123eab041696da10c0eea93ef574b40e138a6b9 [22:57] felixge: what ya think? [23:00] kriskowal: felixge lgtm [23:00] felixge: kriskowal: cool : ) [23:00] felixge: Hopefully we'll get rid of promise.wait [23:00] kriskowal: ACTION shrugs [23:01] felixge: but it's gonna be hard to wean of that addiction [23:01] kriskowal: probably unnecessary; we know the consequences [23:01] felixge: ryah: one more promise patch for you to merge when you have a minute: http://github.com/felixge/node/commits/promise-wait (2 commits in that branch) [23:01] felixge: kriskowal: ? [23:01] tmpvar: my opinion is do it now before its too late (promises) [23:02] felixge: tmpvar: bentomas has a very interesting promise implementation of a promise alternative we discussed [23:02] tmpvar: oh? where? [23:02] kriskowal: is sync fs code in master? [23:03] zimbatm: felixge: looks good to me, did it pass the tests ? [23:04] felixge: zimbatm: Is there a geeky way to say "duh" ? [23:05] zimbatm: :) [23:05] felixge: zimbatm: but that sometimes isn't enough, anything that could your eye? [23:05] zimbatm: regarding require(), why not just use readSync() ? [23:06] felixge: zimbatm: that's the plan: http://github.com/felixge/node/commit/fd19d4587e6b15b3dc86dcebfed7b91ce552e1a4 [23:06] felixge: unfortunately this test makes test-timers.js produce some weird output right now [23:06] felixge: it seems to mess with the timers of the including file [23:06] felixge: * this patch [23:07] felixge: I don't have the time to figure it out, but I think if that's fixed ryan will probably merge [23:07] zimbatm: ok, great [23:09] tmpvar: felixge, is bentomas' promise implementation "out there" on the web somewhere? [23:10] zimbatm: felixge: what do you think of the parent/children module design ? it seems weird to me [23:11] zimbatm: because module a and b can require('./c'), the first one to load will be the 'c's parent [23:11] felixge: tmpvar: http://github.com/bentomas/node-continuables [23:11] tmpvar: thanks [23:11] felixge: zimbatm: I guess that is weird [23:11] felixge: zimbatm: I don't know why we track the parent [23:12] felixge: I don't think it's in CommonJS [23:12] felixge: and I don't think I ever needed it [23:12] felixge: zimbatm: would not keeping parent references make more sense? [23:12] zimbatm: felixge: I believe for two reasons: a) resolve the relative id, b) ppl. pushing for hot-reload [23:13] felixge: zimbatm: hot reloading does not need to know anything about the parent [23:13] felixge: zimbatm: but I'll take all the blame for that pushing :) [23:13] felixge: zimbatm: resolving the relative id would be possible without exposing 'module.parent' [23:13] felixge: zimbatm: internally we may still call it parent, but that's implementation details I'm not so worried about [23:14] zimbatm: in my view, each module belong to a library instead of a parent [23:14] felixge: zimbatm: unless they cause certain problems? [23:14] felixge: zimbatm: hm, define library :) [23:14] zimbatm: a path [23:14] felixge: zimbatm: fair enough. Yes that is how we could handle it internally [23:15] zimbatm: the, require has two resolving mechanism: absolute and relative [23:15] zimbatm: absolute: look for module id in each "library" until it finds it [23:15] zimbatm: relative: resolve full id and look in current library [23:16] felixge: zimbatm: actually there is a 3rd [23:16] felixge: what you call absolute, I'd call global [23:16] felixge: absolute inclusion can also be done by starting the id with a '/' [23:16] felixge: or least it used to [23:16] felixge: hm, maybe that is gone [23:16] felixge: seems like it [23:17] felixge: oh well, I'd still not call the searching in libraries absolute [23:17] zimbatm: actually, we also have the http:// way [23:17] zimbatm: what about "full" vs "relative" id ? :) [23:18] felixge: relative = './' ? [23:18] felixge: or '..' ? [23:18] zimbatm: both [23:19] tmpvar: i like continuables [23:19] felixge: bentomas: you in? [23:19] felixge: tmpvar: me too [23:19] bentomas: yup [23:19] felixge: bentomas: looking at continuable right now [23:20] felixge: I think var continuable = function continuable(success, failure) { is the same as just function continuable(success, failure) { [23:20] bentomas: hmmm, yes, you are right [23:20] zimbatm: felixge: I'll come back on the modules subject when I have something ready to show :) [23:21] felixge: zimbatm: what ya thinking about, a patch for the module system? [23:21] bentomas: felixge: I originally had them all anonymous functions but then I gave them all names, I'll have them just be named [23:21] zimbatm: felixge: yup, it's going to be huge ! [23:22] felixge: zimbatm: oh boy, there goes my hope of landing the sync require patch without modifications :D [23:22] felixge: zimbatm: but yeah - I'd love to see the whole thing written a little nicer :) [23:22] felixge: bentomas: what about keeping emitSuccess and emitError instead of fullfil ? [23:22] zimbatm: felixge: it's going to include something similar [23:23] felixge: zimbatm: now I'm curious, let me know when ya got something [23:23] felixge: :) [23:24] zimbatm: next days :) [23:24] bentomas: felixge: well, that would certainly be doable, it would mean having an extra function declared (I've been trying to keep the number of closures to a minimum) [23:24] zimbatm: now it's time for sleep [23:24] zimbatm: gn [23:24] felixge: bentomas: for performance reason? [23:24] bentomas: yeah [23:24] tmpvar: night [23:25] felixge: bentomas: I think it would be nice if we could support Promise compatibility, at least to some degree [23:25] felixge: bentomas: that would probably make the decision of merging this much easier [23:26] bentomas: felixge: do you think the latest commit (which allows you to either pass one function as a callback OR a success and error function) is useful? [23:27] bentomas: felixge: I was thinking of taking it back out and adding an "either" function like in inimino's fileIO module (http://boshi.inimino.org/3box/asof/1263250371783/fileIO/README.html) [23:27] bentomas: but honestly, the either function is a little cumbersome [23:28] felixge: bentomas: no, I think we should have a single callback. Everything else is gonna have the same problems promises do [23:28] felixge: I don't think we need this [23:28] felixge: Single value, single callback [23:28] bentomas: agreed [23:28] bentomas: perfect [23:28] felixge: those 2 things make this simpler [23:31] felixge: bentomas: what happens if I return a continuable from within a continuable callback? [23:32] bentomas: it will wait for that continuable to finish before calling the next callback [23:32] alex-desktop has joined the channel [23:32] bentomas: "wait" not being the right word [23:32] felixge: ok [23:32] randomekek has joined the channel [23:33] felixge: bentomas: but I cannot propagate an error that way, right? [23:33] felixge: or in general, errors don't propagate? [23:33] bentomas: you can [23:33] bentomas: sorry, I'm not sure I am understanding [23:33] bentomas: if you return a continuable that eventually returns an error it is the same as returning an error [23:34] sztanpet has joined the channel [23:34] felixge: right [23:34] felixge: I guess late error handling is not working yet [23:34] bentomas: and the errors will get propagated down the chain. if the last callback returns an error (or doesn't stop an error from propagating) it will get thrown [23:34] bentomas: really? do you have an example I can look at? [23:34] felixge: bentomas: let me make one [23:35] mattly has joined the channel [23:37] bentomas: (or what do you mean by "late error handling"?) [23:37] felixge: bentomas: https://gist.github.com/3a7845d96a9aad0744c2 [23:37] felixge: that should work [23:38] bentomas: Ahhh, right, sorry. Yeah, I don't have late binding in there right now [23:38] bentomas: Do you think it should? [23:38] felixge: I'm still undecided wether it is a good idea to treat instanceof Error special [23:38] felixge: but right now that's the only way to turn a 'success' continuable into an Error one [23:38] felixge: along the way [23:38] felixge: right? [23:39] dnolen_ has joined the channel [23:39] bentomas: right [23:39] felixge: bentomas: that sucks if you want to emit something else as the error in the end [23:40] dekz has joined the channel [23:40] dekz: /server irc.annonnet.org [23:40] dekz: fuck [23:40] bentomas: yeah, it does. I made that assumption up front that errors should be instanceof Error [23:41] felixge: bentomas: well, error objects can be augmented with any properties - so I'm not sure it is an issue [23:41] felixge: bentomas: and since we only support a single argument, object will be very likely what everybody uses [23:42] bentomas: though, right now if you "fulfill" twice it throws an error. it would be possible to change that, and then you could (from a later callback) this.emitError(4) [23:42] felixge: bentomas: this is just not quite in sync with the function metaphor, since a function can return an instanceof Error without throwing an exception [23:43] felixge: bentomas: maybe this is a good compromise [23:43] felixge: hm [23:43] bentomas: true. do Node Promises currently throw an error if you don't catch it? [23:45] jed has joined the channel [23:45] felixge: bentomas: yes [23:45] felixge: if a promise fires an error and there is no error handler attached between that moment and the next tick, you got an exception [23:45] kriskowal: in principle, they should not; they should forward the rejection value to any dependencies [23:46] felixge: kriskowal: node's promises? [23:46] kriskowal: promises in the broad sense [23:46] kriskowal: which is to say, if they don't, node's promises should be called something else. [23:46] felixge: kriskowal: what if there are no more dependencies [23:47] felixge: ? [23:47] kriskowal: ah. yeah. they should throw and halt [23:47] felixge: bentomas: looking at your implementation, one could fulfill with an instanceof Error but explicitly ask for it to be treated as a regular value, right? [23:47] bentomas: right [23:47] felixge: kriskowal: right, that's how it works right now [23:48] kriskowal: in their own tick, mind. [23:48] felixge: kriskowal: in the next one, to allow for late binding [23:48] kriskowal: aye, cool [23:48] kriskowal: there only remains one reason that they should be called deferreds instead of promises [23:48] felixge: bentomas: but as soon as you start chaining, the next item in the change will think it's an actual error, [23:48] felixge: bentomas: which is not intuitive I guess [23:49] kriskowal: promise objects aren't supposed to have the capability to resolve themselves [23:49] felixge: kriskowal: who defines what a deferred / promise is? Are you just refering to prior art? [23:49] kriskowal: yes [23:50] bentomas: hmmm, depends on if the next item in the chain looks at the success argument or not [23:51] kriskowal: but there are good reasons for that behavior apart from tradition [23:51] bentomas: I guess it all comes down to what should dictate a success or failure, should it be the return value or should it be what the programmer says. So, if the programmer says an error is a success, then who are we to argue? [23:51] bentomas: (though it does seem unintuitive) [23:51] omygawshkenas has joined the channel [23:51] guan has joined the channel [23:52] kriskowal: promises come out of E where the language was designed for async event loops, promises, and object capabilities, so programs would be safely composable, non-interferring, and secure in the sense that mutually suspicious programs can run in the same event loop and share references in a controlled way [23:52] omygawshkenas: 'evening #node. There's been a bit of extra CoffeeScript chatter here recently, and I'm pleased to announce that we'll get out of the way now. :) A #coffeescript channel is now on tap. [23:52] felixge: kriskowal: cool, didn't know that [23:52] kriskowal: the name promise was created to describe a thing that solve those problems in contrast to futures and deferreds [23:53] felixge: omygawshkenas: what's your involvement with coffee script? [23:53] guan: bentomas: i'm reading through the log now [23:53] omygawshkenas: I'm jashkenas -- haven't gotten around to changing this nick. [23:53] kriskowal: promises are subtly different in E; any value can be a promise and touching that value before it is resolved throws an error [23:53] kriskowal: so, conceptually they are a superset of references [23:54] felixge: omygawshkenas: I didn't know :). Awesome, I need to spend more time with coffee script, but it looks like fantastic work man [23:54] guan: what would typical error handling look like with one value, one callback? [23:54] kriskowal: to guarantee that they resolve before a particular block gets executed you put them in a when block: outputPromise = when(inputPromise, function (inputValue) {return outputValue}) [23:54] guan: if (value instanceof Error) ? or something else? [23:55] kriskowal: so the distinction in javascript is that a promise is a subset of values instead of a superset [23:55] nolan_d has left the channel [23:55] felixge: bentomas: would i maybe make more sense for functions to return an array? [val, success] ? [23:56] felixge: bentomas: and by default, use the [val, success] from the previous callback? [23:56] felixge: bentomas: might take a little getting used to, but its just so much clearer [23:56] felixge: bentomas: and not full of those "I wonder what would happen if I do X" [23:56] bentomas: oh, so you can return an array [23:57] bentomas: ? [23:57] felixge: kriskowal: well, what happened to E? [23:57] kriskowal: check it out in #erights [23:57] felixge: bentomas: ? [23:57] bentomas: (sorry, took me a second to see what you were saying) [23:57] kriskowal: the people who made E, who included doug crockford and mark miller, are now focusing on bringing the lessons learned there to javascript [23:57] bentomas: guan and I were just discussing that, I guess if there was overwhelming support for it, it would make sense. It just seems so cumbersome [23:58] isaacs has joined the channel [23:58] bentomas: (to do the array route) [23:58] kriskowal: which is why Object.freeze exists in ES5 [23:58] kriszyp: crock made E? [23:58] kriskowal: he named it [23:58] felixge: kriskowal: well, while I respect prior art - I think the decision on what things should be named should be based on what makes a good metaphor unless the prior art has huge adoption - doesn't seem to be the case here [23:59] kriskowal: the issue has less to do with the mataphor than the guarantees you can expect [23:59] felixge: bentomas: so what do you think with the array? [23:59] kriskowal: it's a subtle but important distinction [23:59] kriskowal: deferreds adequately describe what node's doing [23:59] kriskowal: promises are a small upgrade to that. [23:59] dnolen has joined the channel