[00:00] mbbx6spp: wonderful, thanks [00:00] mbbx6spp: not sure why I didn't see that [00:05] mbbx6spp: I will send a patch for the documentation so it can be in the docs - I knew I searched the docs, phew:) [00:13] maushu has joined the channel [00:15] inimino: ah, great :) [00:16] bpot has joined the channel [00:22] pavelz: damn where's vm when you need to ask him a question :) [00:23] mikeal has joined the channel [00:24] confounds has joined the channel [00:29] mau2 has joined the channel [00:36] Tim_Smart has joined the channel [00:53] pdelgallego has joined the channel [00:59] r11t has joined the channel [01:03] r11t has joined the channel [01:08] r11t has joined the channel [01:12] r11t has joined the channel [01:15] aguynamedben has joined the channel [01:16] statim has joined the channel [01:17] dnolen has joined the channel [01:17] r11t has joined the channel [01:19] mbbx6spp has left the channel [01:21] RayMorgan has joined the channel [01:25] statim: i see a common pattern like: var x = Something; x.addListener(...). but what i don't see is something like x.send() after the listener is added. so im trying to figure out, how is it ensured that the listener is added by the time the first line may start triggering events if the addListener is on the line following and there is no explicit send() type function? [01:28] tmpvar: in the EventEmitter.emit() method, the event handlers are called on the other side of nextTick .. so while its possible to miss the event, its very unlikely [01:30] statim: tmpvar: gotcha, that makes sense now thanks [01:30] tmpvar: actually [01:30] tmpvar: let me confirm [01:30] _ry: statim: if any i/o has occurs during "Something" then it is fine [01:30] _ry: or at least until those events fire [01:30] _ry: e.g. addListener('connect') [01:30] _ry: it cannot happen immediately [01:31] hassox has joined the channel [01:32] statim: kind of like things fire on a fresh stack, so the listeners get added on the current stack and will be in place by the time they are fired? (maybe wrong terminology on my part) [01:33] _ry: mmm - yeah kind of [01:34] statim: ok cool thanks... just wanted to make sure i wasnt missing something, but makes sense now [01:34] tmpvar: yeah, so I guess I was mistaken about the nextTick thing [01:36] admc has joined the channel [01:37] mnutt has joined the channel [01:40] bajeczka has joined the channel [01:40] mikeal has joined the channel [01:45] kriskowal has joined the channel [01:53] devinus: how would you guys writethis differently? [01:53] devinus: http://pastie.org/890392 [02:04] devinus: _ry: i think i found a bag in path module [02:08] Tim_Smart has joined the channel [02:21] statim: just trying to get my feet wet with this... expressjs looks like a good place to start for me. i think i may experiment by porting a simple rails app to node. what are people using for activerecord model type needs? [02:22] Tim_Smart: statim: Generally people use a nosql db [02:23] Tim_Smart: Currently ORM's are a little scarce [02:24] statim: Tim_Smart: ok, straight to the core then it is [02:26] eelco has joined the channel [02:26] bajeczka has joined the channel [02:34] RayMorgan has joined the channel [02:49] eelco has joined the channel [03:07] JimBastard has joined the channel [03:07] JimBastard: best github issue ever? http://github.com/Marak/hook.io/issues/issue/7 [03:15] mnutt has joined the channel [03:18] tmpvar: hah [03:18] tmpvar: stop employing hookers [03:19] JimBastard: imploying? [03:19] JimBastard: nope [03:19] JimBastard: furf just update sexy.js for hook.io [03:19] JimBastard: trying out this deferred request thing [03:20] JimBastard: the idea is that the AJAX request go out synchronously as well as calling back synchronously [03:20] JimBastard: so you control the order they go out and come back [03:21] tmpvar: good deal [03:23] aguynamedben has joined the channel [03:26] mattly has joined the channel [03:37] aaronblohowiak has joined the channel [03:38] aaronblohowiak: Would anyone be interested in reviewing a blog post re: "Why Node" for me? [03:40] JimBastard: Is the answer, "because im a developer wanted to try out a new awesome software?" [03:40] JimBastard: who wants to* [03:41] softdrink has joined the channel [03:41] aaronblohowiak: hahaha, almost. [03:41] JimBastard: hit me wit it [03:44] aaronblohowiak: https://gist.github.com/raw/99fc676048fc45467765/52600c18c73745b56495f6c59c1bdade1793b463/gistfile1.txt [03:44] sh1mmer has joined the channel [03:45] JimBastard: tl;dr; will read later maybe [03:45] aaronblohowiak: ah, ok [03:45] aaronblohowiak: I suppose i did go yegge on this topic ;) [03:45] eelco has joined the channel [03:50] devinus: i fucking love coding [03:51] aaronblohowiak: @devinus: cheers to that [03:51] devinus: i scanned the blog post [03:52] devinus: aaronblohowiak: will read it later, but i think i know where you're going with this [03:52] aaronblohowiak: devinus: cool, thanks [03:53] devinus: aaronblohowiak: i've tried everthing, and node is really the only good way to do async stuff [03:53] devinus: aaronblohowiak: everything else it's just an afterthought [03:54] devinus: aaronblohowiak: making you do clever hacks like running sqlalchemy in a thread so you can use psycopg with twisted [03:54] devinus: ugh [03:54] PyroPete1 has joined the channel [03:55] aaronblohowiak: devinus: ahhh, that is the kind of detailed pain that i'd like to add in. do you mind if i quote you? [03:55] devinus: aaronblohowiak: nope [03:58] aaronblohowiak: devinus: cool. I was trying to convey the difference that evented as a language construct makes versus the hackjobs adding it in later [03:59] mfeiri_ has joined the channel [04:04] devinus: aaronblohowiak: blog link? [04:05] aaronblohowiak: blog not up yet, will live at toylanguage.com [04:05] aaronblohowiak: devinus: which is going to be my altar to JavaScript [04:05] devinus: aaronblohowiak: nice [04:06] xla has joined the channel [04:12] mattly has joined the channel [04:17] eelco has joined the channel [04:18] Tim_Smart has joined the channel [04:39] cloudhead has joined the channel [05:07] JimBastard: ugh this is ugly as hell [05:07] JimBastard: hookIO.getAllHooks(function(data){$('#hooksDump').html(prettyPrint(data))}); [05:08] JimBastard: maybe i should change the way hookIO.getAllHooks work> this is for the hook.io client-side JS api [05:14] _ry: jfd: i think your wpilot server is crashed [05:14] _ry: ohnevermind [05:17] Wes-: _ry: Hey, I've been copying your tcp (now net) API - but I'm confused about how writes work re. blocking and the drain event [05:18] Wes-: _ry: What happens, if you do a partial write, you queue up another event that writes the rest and emits "drain" when the last piece is out the door? [05:20] statim: general js pattern question... ive run into the need to fire off multiple async operations, and execute something only once all of them are done (order they complete doesnt matter, just that they all have to complete before the final execution is called). [05:20] statim: i made a little thing i call a Sequencer. basically as my async things finish they tell the sequencer and attempt to fire it. it only fires if every expected condition has checked in. this seems like something that may be common though. is there another way people do this? [05:20] Wes-: Hm, if that's true, that means I need to another type of event to my reactor -- right now I only react based on ready-for-read fds [05:21] Wes-: statim: that sounds like a reasonable way to do that. [05:21] Wes-: (I don't know of a better one, but this is not really my bailiwick) [05:22] Wes-: Although you could probably pick a better name than 'sequencer', that implies order [05:22] statim: Wes-: true :) ya, i guess my way makes sense, just wonder if theres some common pattern for this someone already came up with [05:29] _ry: Wes-: yeah [05:32] Wes-: _ry: ...wait, I think I just figured this out - do you call write(3c) (O_NONBLOCK) immediately when write() is called from JS, or do you queue a pending write and wait for the reactor to push the data out the door and then emit "drain" when the write queue FIFO is empty? [05:33] Wes-: _ry: 1st choice there is what I thought based on previous conversations, 2nd choice is what I'm in the midst of trying out [05:34] _ry: 1st [05:35] Wes-: _ry: does 1st also emit "drain", or only when buffer has built up? [05:35] _ry: only when the buffer has built up [05:36] Wes-: _ry: Thanks -- figure if I'm going to borrow your API I should opt for behavioural compatibility where possible. :) [05:40] JimBastard: statim: [05:40] statim: JimBastard: hey [05:40] JimBastard: there is sexy.js for the front-end ? [05:41] JimBastard: not sure if thats what you were looking for [05:41] JimBastard: http://sexyjs.com/ [05:41] statim: JimBastard: cool will check it out [05:48] juvenn has joined the channel [05:50] JimBastard: hello CrockBot [05:50] CrockBot: Douglas Crockford doesn't need to throw exceptions. He *is* the exception. edwinm [05:50] cloudhead has joined the channel [05:52] eelco has joined the channel [05:52] mattly: CrockBot: [05:52] CrockBot: In Brendan's original design, the exception handler reported offending code directly to Douglas. jmshoffs0812 [05:54] micheil_mbp has joined the channel [05:54] mattly: CrockBot: [05:54] CrockBot: Douglas Crockford isn't sleeping. He's minifying his code. inlibu [05:56] JimBastard: ;-) [06:19] mikeal has joined the channel [06:33] nishith_ has joined the channel [06:45] kriskowal has joined the channel [06:53] nsm has joined the channel [06:55] JimBastard: yo Connorhd you alive? [06:55] JimBastard: im trying to update node_debug to HEAD [06:55] JimBastard: made it pretty far [06:56] JimBastard: for some reason fu.get("/console", function (req, res) { is crushing the custom property i set in req.httpParams [06:57] JimBastard: which is a url parse done in fu.js [06:58] cloudhead has joined the channel [06:58] juvenn has left the channel [07:00] juvenn has joined the channel [07:00] ditesh|cassini has joined the channel [07:06] Tim_Smart has joined the channel [07:09] JimBastard: hey Tim_Smart [07:11] Tim_Smart: ello [07:14] JimBastard: aight i see node_debug is on 1.3 already im using that now [07:14] JimBastard: almost got my fork of node_debug working on hook.io [07:15] juvenn has joined the channel [07:16] JimBastard: GREAT SUCCESS! [07:16] JimBastard: got it [07:16] kixxauth has joined the channel [07:17] JimBastard: sup kixxauth [07:39] piranha has joined the channel [07:39] JimBastard: updated node_debug to work with new node : http://github.com/Marak/node_debug [07:45] teemow has joined the channel [07:47] cloudhead has joined the channel [08:08] qFox has joined the channel [08:22] creationix has joined the channel [08:23] cedricv has joined the channel [08:27] juvenn has joined the channel [08:32] JimBastard has joined the channel [08:40] felixge has joined the channel [08:40] felixge has joined the channel [08:48] sveimac has joined the channel [08:54] admc has joined the channel [08:55] nishith_ has joined the channel [09:00] MattJ has joined the channel [09:12] dnolen has joined the channel [09:46] brettgoulder has joined the channel [09:46] brettgoulder: any cool node.js/websockets projects on github I should follow? [10:01] telendt has joined the channel [10:26] sh1mmer has joined the channel [10:27] hassox has joined the channel [10:38] teemow has joined the channel [10:38] javajunky has joined the channel [10:45] jed has joined the channel [10:46] kriskowal has joined the channel [10:50] creationix has joined the channel [10:54] tisba has joined the channel [10:59] unomi has joined the channel [10:59] unomi has joined the channel [11:01] javajunky has joined the channel [11:05] nishith_ has joined the channel [11:06] nishith_ has left the channel [11:10] kriskowal_ has joined the channel [11:19] javajunky has joined the channel [11:42] creationix has joined the channel [11:49] felixge: does anybody know a JavaScript date parser that just works? [11:49] felixge: I mainly care about datetime strings in different formats with or without timezone offset information [11:49] felixge: stuff like: 2009-11-26T16:49:53+0100 [11:50] felixge: or 2009-11-26 16:49:53 GMT+0100 [11:50] felixge: or 2009-11-26 16:49:53 CEST [11:53] sztanpet: http://www.datejs.com/ ? [11:53] felixge: sztanpet: fails '2009-11-26T16:49:53+0100' :/ [11:53] felixge: it just ignores the timezone offset [11:54] felixge: actually not quite true [11:54] felixge: it just thinks that: +0100 is the same as +0000 [11:54] felixge: *sigh* [11:58] felixge: I'm starting to question the value of keeping track of time, seems like my life would be easier without it :) [12:07] creationix has joined the channel [12:20] felixge_ has joined the channel [12:20] felixge_ has joined the channel [12:25] markwubben has joined the channel [12:29] jbrantly has joined the channel [12:33] telendt_ has joined the channel [12:37] micheil: howdy felixge_ [12:37] felixge_: micheil: heya [12:37] micheil: how's stuff? [12:39] micheil: felixge_: in date formats, T16 is just the 24hr time, yeah? [12:40] felixge_: micheil: yes [12:41] felixge_: I'm actually writing my own date.normalize() function now :( [12:41] micheil: righteo, cool, because I couldn't work out that format at first glance... now I get it, thanks :) [12:41] felixge_: I have literally no control over the shit I need to parse (the information comes from exif tags) [12:41] micheil: uh-oh :P [12:41] micheil: sounds like fun anyhow :D [12:42] micheil: felixge_: I've got my plate full enough.. between school and work, I'm working on ideocase.com, a fork of SammyJS, and a few other uber fun things [12:44] xla has joined the channel [12:56] keeto has joined the channel [13:11] jed has joined the channel [14:03] nsm has joined the channel [14:22] javajunky has joined the channel [14:28] javajunky has joined the channel [14:28] softdrink has joined the channel [14:32] CodeOfficer has joined the channel [14:35] javajunky has left the channel [14:37] unomi has joined the channel [14:58] Iveaux has joined the channel [14:58] derbumi has joined the channel [15:02] alex-desktop has joined the channel [15:03] maritz has joined the channel [15:04] micheil has joined the channel [15:16] jed has joined the channel [15:19] jed_ has joined the channel [15:19] confounds has joined the channel [15:36] Iveaux: with websocket.node.js, when i try to run "node runserver.js" i get the following error: [15:37] Iveaux: TypeError: Cannot read property 'Connection' of undefined at [object Object].connect (/var/www/exp/websocket/lib/redis.js:46:32) [15:37] Iveaux: anyone familiar with the websocket module ? [15:41] charlesjolley has joined the channel [15:47] mnutt has joined the channel [16:06] rolfb has joined the channel [16:20] xla has joined the channel [16:33] tav has joined the channel [16:37] Yuffster has joined the channel [16:40] dnolen has joined the channel [16:41] yatiohi has joined the channel [16:44] shirro has joined the channel [16:44] Ramone has joined the channel [16:45] cainus_ has joined the channel [16:45] _ry has joined the channel [16:45] Wes-_ has joined the channel [16:45] Yuffster has joined the channel [16:45] unomi has joined the channel [16:45] keeto has joined the channel [16:45] felixge_ has joined the channel [16:45] qFox has joined the channel [16:45] PyroPeter has joined the channel [16:45] bajeczka has joined the channel [16:45] drostie has joined the channel [16:45] mjr_ has joined the channel [16:45] jan____ has joined the channel [16:45] deanlandolt has joined the channel [16:45] kloeri has joined the channel [16:45] mde has joined the channel [16:45] frodenius has joined the channel [16:45] rudebwoy has joined the channel [16:45] rednul has joined the channel [16:45] adovenmuehle has joined the channel [16:45] marienz has joined the channel [16:45] inimino has joined the channel [16:45] jacobat has joined the channel [16:45] evilhackerdude has joined the channel [16:45] ec has joined the channel [16:45] Pilate has joined the channel [16:45] eyzn has joined the channel [16:45] dmpk2k has joined the channel [16:45] zimbatm has joined the channel [16:46] justinlilly has joined the channel [16:47] justinlilly has joined the channel [16:55] justinliz has joined the channel [16:55] eelco_ has joined the channel [16:55] sztanphet has joined the channel [16:55] tlockney_ has joined the channel [16:55] sveilin has joined the channel [16:55] juvenn_ has joined the channel [16:55] Wes-mac has joined the channel [16:55] ashb_ has joined the channel [16:55] WHARGARBL has joined the channel [16:55] CodeOfficer has joined the channel [16:56] bengl_ has joined the channel [16:56] jgoulah_ has joined the channel [16:56] okito has joined the channel [16:56] RJ2 has joined the channel [16:56] RJ2 has joined the channel [16:58] Ramone has joined the channel [16:58] jacobat_ has joined the channel [16:58] elbartus has joined the channel [16:58] jbrantly has joined the channel [16:59] shirro has joined the channel [16:59] mediacoder has joined the channel [17:00] 18VAAMO09 has joined the channel [17:00] gf3 has joined the channel [17:00] KungFuHamster has joined the channel [17:00] rdrake has joined the channel [17:00] magcius has joined the channel [17:00] blazzy has joined the channel [17:00] blazzy has joined the channel [17:01] stalled has joined the channel [17:01] hobson has joined the channel [17:01] magcius has joined the channel [17:01] magcius has joined the channel [17:06] trochala has joined the channel [17:07] philippbi has joined the channel [17:08] emyller_ has joined the channel [17:08] okito has joined the channel [17:09] evilhackerdude has joined the channel [17:10] tav has joined the channel [17:10] brettgoulder has joined the channel [17:10] technoweenie has joined the channel [17:10] erikvold has joined the channel [17:10] pavelz has joined the channel [17:10] atmos has joined the channel [17:10] Elfix has joined the channel [17:10] gsf has joined the channel [17:10] CraigW has joined the channel [17:10] martyn___ has joined the channel [17:10] konobi has joined the channel [17:10] callen has joined the channel [17:10] wil_ has joined the channel [17:10] jazzychad has joined the channel [17:10] mayerbacher has joined the channel [17:15] mnutt has joined the channel [17:17] Ramone has joined the channel [17:18] drostie has joined the channel [17:19] charlesjolley has joined the channel [17:19] mde has joined the channel [17:23] ivan has joined the channel [17:23] dnolen has joined the channel [17:23] alex-desktop has joined the channel [17:23] jfd has joined the channel [17:23] rockstar has joined the channel [17:23] bjartek has joined the channel [17:23] rtl has joined the channel [17:24] nsm has joined the channel [17:28] sztanpet has joined the channel [17:29] PyroPete1 has joined the channel [17:29] juvenn_ has joined the channel [17:30] piranha__ has joined the channel [17:32] Pilate has joined the channel [17:32] Yuffster has joined the channel [17:35] jashkenas has joined the channel [17:39] teemow has joined the channel [17:43] MattJ has joined the channel [17:45] PyroPeter has left the channel [17:50] webben has joined the channel [17:51] Iveaux has joined the channel [18:10] dnolen has joined the channel [18:16] derbumi has joined the channel [18:19] rtl has joined the channel [18:21] hober has joined the channel [18:21] Wes-: the node tcp example shows createServer using a callback which accepts a socket [18:22] Wes-: however, the documentation says that it emits a connection [18:22] jashkenas has left the channel [18:22] Wes-: are connections and sockets interchangeable in node? [18:40] felixge_: Wes-: yes [18:40] felixge_: afaik [18:41] felixge_: I think we need to choose one term and stick with it so [18:41] Wes-: felixge_: thanks, that explains some of my confusion :) [18:41] Wes-: felixge_: the problem is that sometimes sockets are not connected [18:41] Wes-: stupid sockets API ;) [18:43] Iveaux: i get this error with the websockets module "Error: EADDRINUSE, Address already in use" [18:43] Iveaux: what address does it mean and how can i solve it ? [18:44] Iveaux: or should i ditch websockets.node.js and go for Socket.IO ? [18:45] teemow has joined the channel [18:47] Wes-: Iveaux: is something else listening on same port? [18:48] Wes-: lveaux: If no, AND the problem fixes itself after ~5 minutes, the listener probably needs the SO_REUSEADDR socket option set (note that I do not know how to do taht with node) [18:49] Iveaux: ah! thank you [18:50] Iveaux: tomcat was on 8080 indeed [18:50] Iveaux: and the port is hardcoded in websocket.js [18:50] Iveaux: but it's working now, thanks :) [18:50] Wes-: well that's kind of silly [18:51] Wes-: glad to be of help :) [18:54] _ry: Wes-: we used to call it 'Connection' the new nomenclature will use 'Stream' [18:55] _ry: as a more general concept of connection [18:55] _ry: (but less general than a 'Socket' which could include a UDP file handle) [18:56] Wes-: _ry: Makes sense. I'm still trying to decide what, where, in the object model is a stream/connection/socket; I'm also working off your docs but see that you are moving from tcp->net as well [18:56] Wes-: _ry: FWIW in CommonJS land we are looking for a unified Stream API that can work on sockets and as a return value from fs-base.open() [18:57] maushu has joined the channel [18:57] JimBastard_ has joined the channel [18:57] Wes-: _ry: So far I haven't found much cross-over between node-style sockets and commonjs-style files, though. Maybe that quest is not as important as I thought. [18:57] _ry: Wes-: you should just take lib/net.js and make your own bindings [18:57] _ry: it's all in javascript [18:57] _ry: the bindings are direct posix functions, almost [18:58] JimBastard_: HI _ry! [18:58] JimBastard_: ;-) [18:58] _ry: JimBastard_: hey [18:58] Wes-: _ry: Actually, the tricky stuff here is that I'm also writing the reactor in JS -- darn thing exposed a couple of bugs in my FFI [18:58] Wes-: But I'm back on track now :) [18:59] _ry: like you're binding select() ? [18:59] Wes-: _ry: Yeah, exactly [18:59] Wes-: (it's fast enough for now) [19:00] JimBastard_: tmpvar any avro status today? [19:00] isaacs has joined the channel [19:01] JimBastard_: im planning a laptop party sometime next week with my friend adam who is one of the lead back-ends at collegehumor, you should join [19:01] rektide: what tech do they use at collegehumor? is avro relevant to his field ? [19:01] rolfb has joined the channel [19:02] isaacs: you know, the fact that alternate require functions get hung on the require function as methods is kind of annoying. [19:03] isaacs: makes it tricky to optimize and hang things on the module object prototype [19:03] Wes-: _ry: Something I'm missing, though, should I be able to write | socket.emit("drain") | and have the event listeners get called like | cb(socket, "drain") | automatically, or is the code which emits the event responsible for that? (e.g. | socket.emit("drain", socket) | [19:05] fizx has joined the channel [19:06] _ry: Wes-: in node you can call socket.emit('drain') to force a 'drain' event to be fired [19:07] hellp has joined the channel [19:10] rhys__ has joined the channel [19:11] Wes-: _ry: How does node know know to pass socket as the first argument to the event listener when it's called like that? Is socket.emit a specialized function? I'm trying to use the same event system for socket, server, etc -- so a generic "stick this as the first argument" doesn't work either (unless servers and sockets are interchangeable in node?) [19:12] rtl_ has joined the channel [19:14] tmpvar: JimBastard_, looking at avro stuffs now [19:15] tmpvar: just took a peek through hook.io's source [19:15] tmpvar: looks pretty good [19:15] tmpvar: will be better once hooker is renamed though [19:15] _ry: Wes-: I don't know.. emit() uses 'this', I guess [19:16] JimBastard_: lol [19:16] JimBastard_: yeah [19:16] JimBastard_: the hook.io back-end is pretty solid, there are a few things im going to have to do in regards to dynamically loading protocols and definitions, but we don't have to worry about that until we start getting a lot of protocols and definitions [19:16] JimBastard_: for now the current scheme is acceptable [19:17] tmpvar: yep, looks that way [19:17] JimBastard_: the "hooker" gotta go in favor of "listener" or "listenerer" [19:17] rhys__: _ry: Not sure where you're at with ssl / tls support in net2, but I've just added some initial support with openssl. [19:18] admc has joined the channel [19:19] Wes-: _ry: Wierd, it seems to use this for sockets, but require an extra arg for server -- http://github.com/ry/node/blob/master/lib/net.js#L786 -- can you point me to the source for process.EventEmitter? [19:24] tmpvar: Wes-, http://github.com/ry/node/blob/master/src/node.js#L172 [19:24] Wes-: tmpvar: Thanks!! [19:24] tmpvar: EventEmitter.emit is implemented in c though [19:25] tmpvar: here: http://github.com/ry/node/blob/master/src/node_events.cc [19:28] rictic has joined the channel [19:31] Wes-: tmpvar: double-thanks. Thanks C++ w/ v8 api, neither of which I know. :) .... are you familiar with v8's API? listener->Call(self, argc, argv) -- I'm guessing, that's a call to JS function listener, with JS's this == self, and the JS argumenst array populated with argv? [19:31] tmpvar: yep, looks that way [19:33] _ry: rhys__: really?! [19:33] _ry: rhys__: send it over [19:33] _ry: rhys__: yeah, i want to move to ossl for licensing reasons [19:33] Wes-: If so, I'm confused by when the TCP example in the node docs works, unless, hmm. Maybe I shouldn't be creating a new Server for that, but rather a socket or connection [19:33] Wes-: ACTION re-studies the docs [19:34] _ry: bbiab [19:34] rhys__: Will do - separated out secure credentials, and doing as much as possible in net.js [19:36] tmpvar: Wes-, I/we would be happy to help get you going (might need some code though [19:37] Wes-: tmpvar: You realize that I'm not working on node, but rather, re-implementing the sockets lib on another platform? :) [19:37] tmpvar: oh hah, no [19:37] tmpvar: helps to read im guessing [19:38] Wes-: tmpvar: I think I understand what's up, though. My Server() has a socket property, because my socket constructor requires an address immediately -- node sets the address later. This means a little bit of inheritance re-jigging so that the events will fire properly, hmm [19:38] tmpvar: ah [19:39] Wes-: tmpvar: Yeah - I'm actually out to pretty much copy the node "tcp" module API, because a) I can't use node, b) it's a great API, c) the API bugs are pretty much all worked out [19:39] Wes-: And you know what they say about imitation being the sincerest form of flattery :) [19:39] Wes--: sup? [19:39] tmpvar: haha yes. [19:42] KungFuHamster: is there a simpler example than node_chat for broadcasting messages to client? [19:42] KungFuHamster: I'm a newb, my adaptation of the tcp server from the main node.js page drops messages. [19:43] KungFuHamster: broadcasting messages to multiple clients, that is [19:43] fizx has joined the channel [19:43] tmpvar: KungFuHamster, http://toylanguage.com/ [19:43] fizx has joined the channel [19:44] tmpvar: thats a "smaller" example [19:44] KungFuHamster: cool, thanks [19:45] Wes-: ACTION wonders what JimB is up to [19:46] tmpvar: no mr avro, I want you to die [19:47] KungFuHamster: hmm that looks like the irc daemon someone linked me [19:52] kriskowal has joined the channel [20:12] Wes-: Oh, dear, now I'm confused again [20:12] Wes-: _ry: Is the tcp echo server example correct? I'm specifically looking at the 'connection' and 'data' event handlers [20:15] r11t has joined the channel [20:26] softdrink has joined the channel [20:28] maritz has joined the channel [20:37] xla has joined the channel [20:38] felixge_: rhys__: are you going to provide a low-level module for openssl bindings? [20:39] felixge_: rhys__: I think it would be great to have a generic 'openssl' module, which also exposes some of the crypto stuff lots of people need. On plattforms where openssl is not available, requiring the module would just throw an error [20:41] rhys__: felixge_: I'm trying to make the bindings pretty low-level, separating out credentials etc. [20:41] felixge_: rhys__: sweet! [20:42] felixge_: rhys__: how are you going to call the module? [20:42] felixge_: I think it should be named openssl, afaik that's what ruby does too [20:43] rhys__: felixge_: I'm currently just adding into node_net2.cc, but could separate out and combine with the bits in node_crypto. [20:43] rhys__: All the socket communication etc. is still driven within net.js [20:43] rhys__: Only the crypto bindings in the .cc [20:43] felixge_: rhys__: well, I think getting TLS working first should have highest priority [20:43] felixge_: rhys__: but once that is flying it would be neat to go for a general purpose openssl/crypto module [20:44] felixge_: IMHO it's a feature that is really hard to do in userland without addons, and if we're linking to openssl anyway when available it seems crazy to have a serpate openssl addon project [20:45] rhys__: yes - and it's widely used / trusted, and should cause less confusion during installation than gnutls [20:46] felixge_: yeah gnutls on OSX is pretty much #fail :) [20:51] isaacs has joined the channel [20:51] creationix has joined the channel [20:56] Tim_Smart has joined the channel [20:57] Wes-: Yay! I have a working echo server! [20:58] Wes-: _ry: You can ignore my earlier query, I got it sorted [21:00] fizx has joined the channel [21:17] dnolen has joined the channel [21:21] rtl has joined the channel [21:28] brettgoulder has joined the channel [21:33] aryounce has joined the channel [21:36] fizx has joined the channel [21:43] fizx has joined the channel [21:47] devinus has joined the channel [21:50] devinus: _ry: do you have some time to go over a piece of buffer.js code with me? [21:57] xer0x has joined the channel [22:02] aho has joined the channel [22:32] sp160n has joined the channel [22:34] sp160n: Hi all, I'm new to node, and I've been wondering, how do you catch an exception thrown in a callback chained further down? try/catch doesn't seem to work once callbacks are involved. [22:34] indiefan has joined the channel [22:35] sp160n: I wrote this function here: http://pastie.org/892661 and I'd like to wrap it in try / catch, but doing so doesn't seem to catch anything [22:35] atmos: sp160n: got an example ? [22:37] indiefan has left the channel [22:38] felixge_: sp160n: you can not, once your code executes beyond the try..catch block there is no coming back [22:38] felixge_: sp160n: that's why node uses 'error' as the first parameter to all callbacks - it's the counterpart to exceptions [22:38] sp160n: gotcha [22:39] sp160n: I guess I'll do the same, and use error for all my own callbacks as the first argument [22:39] felixge_: sp160n: way to go :) [22:39] sp160n: thanks felixge, that was really helpful [22:39] devinus has joined the channel [22:40] felixge_: np [22:42] MattJ has joined the channel [22:47] maushu has joined the channel [22:53] kriskowal has joined the channel [22:59] _ry: devinus: i do [23:00] _ry: ACTION is excited to see rhys's ossl stuff [23:01] devinus: _ry: this is all sort of...superficial, but i'm trying to get down coding conventions and this is a great file to ask some questions [23:01] devinus: http://pastie.org/892694 [23:01] devinus: _ry: for instance, isn't it bad to use .length in a for loop in inspect? [23:02] devinus: _ry: also, lines 25-30, shouldnt we use === or even a switch? [23:04] kixxauth has joined the channel [23:07] rictic has joined the channel [23:09] hassox has joined the channel [23:18] jed_ has joined the channel [23:23] hellp has joined the channel [23:25] aryounce has joined the channel [23:25] micheil: devinus: it depends, if you want highly optimised, you should externalise it [23:25] devinus: micheil: externalise? [23:25] micheil: eg, for(var i=0,l=this.length; i