[00:10] _Ray_: ACTION prods gf3
[00:10] gf3: yo
[00:11] _Ray_: Hey :) Did you ever manage to fix/work around the bug where some stdout never gets raised in a child process?
[00:11] gf3: _Ray_: I haven't found a work around yet, even setting a short setTimeout doesn't seem to work
[00:12] gf3: _Ray_: ry said that he would address the issue soon in net2, though
[00:12] _Ray_: Hrm. I read that a few times today - what is it?
[00:13] gf3: _Ray_: he mentioned that he might add a drain event to process.stdio so one could exit after the buffer has been flushed
[00:13] _Ray_: ah, good :)
[00:13] Yuffster has joined the channel
[00:21] Tim_Smart: does node.js support canvas etc in anyway?
[00:21] Tim_Smart: even though it is DOM spec...
[00:21] Tim_Smart: would be awesome to manipulate images
[00:24] Tim_Smart: DOM functions would be good for manipulating XML data also ^^
[00:25] charlenopires_ has joined the channel
[00:30] Yuffster has joined the channel
[00:31] gf3: Tim_Smart: there are a couple XML libs out there already
[00:31] Tim_Smart: OK I will have a Google session
[00:32] gf3: Tim_Smart: as for canvas, it wouldn't make much sense to implement it
[00:32] Tim_Smart: yeah well something similar
[00:32] gf3: Tim_Smart: a more likely solution would be some sort of ImageMagik bindings, etc...
[00:32] Tim_Smart: mmm
[00:35] Tim_Smart: Well my first project with node.js is to make a irc daemon
[00:35] gf3: heh
[00:36] gf3: I've written a set of IRC libs
[00:36] Tim_Smart: awesome
[00:36] gf3: almost ready for release
[00:36] Tim_Smart: github?
[00:36] gf3: just need some specs
[00:36] gf3: soon
[00:36] gf3: I wrote a grammar/parser for IRC messages, and that's the foundation of the library
[00:36] Tim_Smart: http://irchelp.org/irchelp/rfc/rfc.html
[00:37] Tim_Smart: those are the IRC specs
[00:40] Tim_Smart: or one set of them anyway
[00:42] gf3: Tim_Smart: yea, I've prettymuch implemented the entire RFC
[00:42] Tim_Smart: nice
[00:43] Tim_Smart: How do most IRC daemons work these days?
[00:43] gf3: I should really get on it though, I've been meaning to release this for a while
[00:43] Tim_Smart: The use blocking threads or something
[00:43] gf3: I've only been using my lib as a client so far
[00:43] Tim_Smart: ok, using it now?
[00:44] gf3: yea, I have a bot using it
[00:44] _Ray_: gf3, what a coincidence, it's what I was doing as well :)
[00:44] gf3: I wrote a sexy little bot DSL as well
[00:44] gf3: http://gist.github.com/156663
[00:45] Tim_Smart: ah nice. I wonder what node would be like with UI bindings like gtk
[00:49] Tim_Smart: Once a few more modules come out, and node.js is a bit more mature, I might start using it for production web development
[00:50] Tim_Smart: oooo so many possibilities....
[00:50] gf3: Tim_Smart: yea, it looks promising. Express looks like fun, too.
[00:50] Tim_Smart: yeah I took a quick look at that
[00:51] Tim_Smart: all nodes database bindings are a bit young atm
[00:52] Tim_Smart: gf3, well when you gets your IRC libs polish, I would be happy to contribute to a full-blown IRD daemon
[00:52] Tim_Smart: lol spelling fail
[00:52] gf3: Tim_Smart: that would be awesome, I'll ping you when I do
[00:52] gf3: Tim_Smart: are you on GH/Twitter?
[00:53] Tim_Smart: tim@fostle.com @Tim_Smart github.com/Tim_Smart
[00:54] jed has joined the channel
[00:54] Tim_Smart: It will be interesting to see how it will preform against the mainstream IRCd's
[00:54] gf3: Tim-Smart on GH?
[00:55] Tim_Smart: yeah sorry
[00:55] gf3: np
[00:55] Tim_Smart: I tried implementing a socket server in PHP -> it scaled horribly
[00:56] inimino: node owns PHP :D
[00:56] Tim_Smart: yup, well at the basics, PHP still has better bindings at present
[00:57] gf3: node owns a lot of things, eventd programming is the future
[00:58] Tim_Smart: coding GUI applications with async languages would be pretty nice too
[00:59] Tim_Smart: instead of messing with lots of threads and such, get that abstracted away and just use callbacks on everything
[01:02] Tim_Smart: wow http://groups.google.com/group/nodejs/browse_thread/thread/af3014b45fc1d53d
[01:10] isaacs has joined the channel
[01:15] jed: isaacs: how was SSJSSF?
[01:15] isaacs: it was awessjssfome
[01:16] jed: kickassjssf!
[01:16] jed: did you guys solve middleware, promises, and everything else?
[01:16] jed: is EJSGI ratified?
[01:17] jed: (but seriously, would be cool to hear what y'all talked about)
[01:17] inimino: yeah
[01:19] isaacs: i'm pretty sure the video was captured.
[01:19] isaacs: there were a few cameras rolling
[01:19] isaacs: i made my case for jsgi+streams
[01:19] isaacs: ryan talked about what node is
[01:20] isaacs: kriskowal and mark miller talked about some cool future ecmascript stuff
[01:20] inimino: neat
[01:20] isaacs: there were a few other talks, too
[01:22] jed: how did folks respond to your stream ideas?
[01:26] jan____: isaacs: what's your twitter nic?
[01:26] isaacs: jed: mostly positive.
[01:26] isaacs: ACTION is @izs
[01:26] jan____: damn
[01:26] jan____: I tagged you @isaacs and that failed
[01:26] isaacs: hehe
[01:26] jed: he gets that all the time.
[01:26] isaacs: yeah, some musician in LA gets credit for a lot of my good ideas.
[01:27] jan____: oh hey, german last name! :)
[01:27] isaacs: yep.
[01:27] jed: meh, we all have those.
[01:28] isaacs: ACTION is not actually jewish. german + sicilian = jew
[01:28] jan____: jed: well, I *am* german :)
[01:28] FoxFurry has joined the channel
[01:28] jed: jan____: i am too! well, 12.5% worth.
[01:29] jed: but enough to get a name with 1 vowel and 6 consonants.
[01:29] isaacs: jed: if you go anywhere else, you're not german any more, just american
[01:29] jan____: that's polish tho
[01:29] jed: isaacs: ah well, the jig is up.
[01:30] jan____: hmm, 2 vowels out of 8 gets me close tho
[01:31] jed: jan____: not to mention all those underscores.
[01:34] isaacs: jan____: anyway, i have @isaacs as a saved search in tweetie, so i usually catch those mentions.
[01:34] isaacs: i could use izs as my handle in irc, but then people wouldn't know where to find my code.
[01:35] isaacs: and i simply *must* be isaacs in github, because that's code/shell related.
[01:35] jed: isaacs: by the way, great work on the no country for old men soundtrack.
[01:35] isaacs: hehe
[01:36] jan____: hehe
[01:36] jan____: one of my php friends has the same name as the second guitarist of the foo fighters
[01:37] jan____: huge running gag that hardly gets tired
[01:38] jed: jan____: he should start a band called the bar fighters.
[01:38] jan____: haha
[01:38] mikeal has joined the channel
[01:38] jan____: that's surprisingly a new one
[01:38] jan____: *takes note*
[01:39] jed: jan____: have fun milking it. and when it gets old....... baz fighers!
[01:39] inimino: hehe
[01:39] isaacs: baz quuxers?
[01:40] mikeal: i don't know about you guys
[01:40] mikeal: but I'm definitely implementing and EphemeralTable no
[01:40] mikeal: er now
[01:43] isaacs: mikeal: you have fun with that.
[01:43] jed: mikeal: what is that?
[01:47] inimino: mikeal: as in es-discuss ephemerons?
[01:49] mikeal: it was a joke
[01:49] omygawshkenas has joined the channel
[01:49] inimino: mikeal: oh
[01:50] jed: Your search - "EphemeralTable" - did not match any documents.
[01:50] mikeal: it's interesting technology but it has incredibly limited use
[01:50] jed: i figured something was up.
[02:16] richtaur has joined the channel
[02:27] mattly has joined the channel
[02:33] cloudhead has joined the channel
[03:08] unomi has joined the channel
[03:21] mattly has joined the channel
[03:36] fictorial has joined the channel
[03:38] _Ray_: If I did sys.exec and it timeouted, how can I kill the process?
[03:39] steadicat has joined the channel
[03:49] ryah_away: what if we just threw out promises and eventemitters altogether?
[03:49] ryah: allow people to build thier own on top ...
[03:50] jed: so stuff like this?
[03:50] jed: request.onBody = function(){}
[03:50] ryah: yeah :)
[03:50] jed: that's the way you had it originally, right?
[03:50] ryah: yeah
[03:50] jed: why did you change it?
[03:51] ryah: i don't know. people convinced me it was necessary
[03:52] jed: promises i'm not enamored of, but i can see value in event emitters.
[03:52] ryah: yeah - that's kind of my take as well
[03:52] jed: otherwise, you can't bind more than one handler, right?
[03:52] inimino: ryah: I think that'd be awesome
[03:52] jed: there's a reason DOM scripting moved away from that model.
[03:52] inimino: jed: I think it was a mistake in DOM too, actually...
[03:52] jed: inimino: what do you mean?
[03:52] ryah: i just feel like we're wasting so much time on "promise" discussions and bugs
[03:53] inimino: jed: but the justification is that you have mutually non-cooperating scripts running on the same page
[03:53] ryah: let's just throw them out. maybe provide sync fs i/o
[03:53] inimino: jed: in the case of the DOM
[03:53] omygawshkenas: ryah: quick question -- what usually happens when you blow the stack in node/v8? Does it freeze or blow up?
[03:53] ryah: then people can build their own ideas on top and maybe it'll be okay
[03:53] inimino: jed: in the case of node, you don't have that situation so I think plain callbacks onevent-style is fine
[03:53] ryah: omygawshkenas: what does 'blow the stack' mean?
[03:53] inimino: ryah: yeah
[03:54] omygawshkenas: ryah: I'm trying to build a large Jison-generated parser for the first time.
[03:54] jed: ryah: the low-level approach is what made v8 so attractive, maybe it'd work.
[03:54] omygawshkenas: It's going down deep into building out the productions.
[03:54] inimino: omygawshkenas: you'll get an exception
[03:54] omygawshkenas: And then it freezes up.
[03:54] inimino: that's more likely to be a bug in the parser (or some edge case in V8)
[03:55] omygawshkenas: I don't get a segfault or anything though -- it just stops in the middle of printing a debug line. Have you seen it behave like that before?
[03:55] inimino: I haven't
[03:55] omygawshkenas: thanks.
[03:55] inimino: is it using CPU?
[03:55] omygawshkenas: good question.
[03:56] _Ray_: If I did sys.exec and it timeouted, how can I kill the process?
[03:56] omygawshkenas: It's 100% cpu until it freezes, and then, yes, it's still 100% -- it's probably fallen into an infinite loop. Perhaps that's whats stopping the print in the middle.
[03:56] omygawshkenas: If printing is evented.
[03:58] inimino: that sounds likely
[03:58] omygawshkenas: Yep. If I use "debug" instead of "puts", it keeps printing and doesn't freeze.
[03:58] omygawshkenas: Perhaps things get backed up if you call "puts" too much.
[03:59] inimino: puts is stdout and debug is stderr, so it could be a difference in how they are buffered or something
[03:59] inimino: omygawshkenas: what language are you parsing, btw?
[04:00] omygawshkenas: it's cranking away at 100% CPU -- we'll see if it finishes.
[04:00] inimino: ACTION is writing a JavaScript parser generator as well
[04:00] omygawshkenas: This is the experimental CoffeeScript-in-CoffeeScript parser
[04:00] omygawshkenas: oh yeah?
[04:00] inimino: ah
[04:00] inimino: yeah
[04:00] omygawshkenas: What flavor?
[04:01] inimino: PEG → JavaScript
[04:01] omygawshkenas: ah
[04:01] inimino: http://inimino.org/~inimino/blog/peg_first_release
[04:01] omygawshkenas: Here's the grammar file for anyone who's interested:
[04:01] omygawshkenas: http://gist.github.com/290889
[04:01] inimino: I'm writing the next version now, with any luck I'll have it done and some benchmarks early next week
[04:01] inimino: should be very fast (for JavaScript)
[04:01] omygawshkenas: The paren-less method calls and optional commas make for a kind of interesting DSL.
[04:01] omygawshkenas: Sweet
[04:02] omygawshkenas: Unfortunately, the CoffeeScript grammar is LALR(1) at the moment, and it probably wouldn't be very easy to port it to PEG.
[04:03] inimino: probably wouldn't be too hard
[04:03] omygawshkenas: unicode arrows? holy shit man.
[04:03] omygawshkenas: that's daring.
[04:03] _Ray_: inimino, you made a full parser for ES-5?
[04:04] inimino: _Ray_: yes
[04:04] omygawshkenas: http://boshi.inimino.org/3box/PEG/ECMAScript_unified.peg
[04:04] _Ray_: congrats :)
[04:04] inimino: yeah, that's the one
[04:04] inimino: it's pretty much a direct transcription of the grammar in the spec
[04:05] inimino: bbiab
[04:33] steadicat has joined the channel
[04:38] mikeal has joined the channel
[04:52] rednul has joined the channel
[04:53] BryanWB has joined the channel
[04:53] BryanWB: how about this name for the node.js stack ==> n^3 node.js, no-sql, no-problem
[04:57] unomi: nginx, node, no-sql
[05:25] richtaur has left the channel
[05:39] micheil has joined the channel
[05:41] mattly has joined the channel
[05:52] brosner has joined the channel
[06:03] scudco has joined the channel
[06:05] rektide: process.compile(script,scriptName) doesnt support require() in the containing script
[06:05] rektide: and it doesnt expose any of the existing global context
[06:18] Caseus has joined the channel
[06:22] rektide: i feel trapped; i cant figure out how to spread my source code amongst multiple files
[06:24] ryah: rektide: hm ... not sure i understand
[06:24] ryah: process.compile() is just eval() but with better error messages
[06:27] rektide: process.compile(), and perhaps eval(), dont appear to keep the current globals around
[06:27] rektide: eval("return require('sys');")
[06:28] rektide: hrm let me dig into my use case a little more
[06:28] ryah: require is not global
[06:33] rektide: my use case has clearly gotten out of hand
[06:33] rektide: i wanted to load external scripts into the current process, so i wrote a Module for load external files.
[06:34] rektide: but, being as how its a Module, when it runs eval() or process.compile(), i dont think the eval happens in the global/root namespace
[06:35] micheil: moin ryah & rektide
[06:37] ryah: rektide: why do that?
[06:42] rektide: http://cgit.voodoowarez.com/pipe-layer-js/tree/runtime.js is kind of how i envision piecing together my runtime from separate components
[06:43] rektide: aesthetically and w/r/t maintainability, one big file is untennable
[06:43] rektide: so i broke the code up into multiple files
[06:46] rektide: perhaps the eval_file Module is the wrong step, that runtime.js should just hold the code for loading the other files
[06:56] rektide: no still no good;
[07:04] micheil: rektide: do you want to include multiple files and have them available in the current modules' scope?
[07:04] rektide: micheil, i do
[07:04] rektide: process.mixin gets me the last half
[07:04] rektide: but the first half i cant fahtom
[07:04] micheil: process.mixin(true, this, require(file));
[07:05] rektide: i also want the included files to have access to the main global scope as well
[07:05] micheil: okay, change `this` to `GLOBAL`
[07:09] micheil: if the first argument to process.mixin is true, it will perform a deep mixin, rather then a shallow mixin
[07:11] rektide: i'm still a bit hazy on what that means
[07:12] rektide: i dont think i require a deep copy, but i'm not sure what circumstances deep copying is important in
[07:16] nsm has joined the channel
[07:17] nsm: hi, i'm writing some bindings and getting segfaults when I try EventEmitter::Emit
[07:18] nsm: I've narrowed the problem down to the v8 Execution::Call at deps/v8/src/api.cc ~ line 2427
[07:18] rektide: micheil: that solution....
[07:18] nsm: i::Handle returned = i::Execution::Call(fun, recv_obj, argc, args, &has_pending_exception);
[07:18] nsm: would anyone have any idea why this could be happening?
[07:18] rektide: require() will be a fresh virginal context... it wont have the existing GLOBAL context, which is what i'd like
[07:19] rektide: i'm trying to build one context from a number of different files
[07:20] rektide: so, eval(fileData,GLOBAL)....
[07:21] rektide: that works
[07:21] rektide: there's no parallel for process.compile() though
[07:26] CIA-78: node: 03Jonas Pfenniger 07master * r7a755e0 10/ src/node_child_process.cc : Was using the old node object to get the int from the constant. - http://bit.ly/9EKvf5
[07:26] CIA-78: node: 03Ryan Dahl 07master * r9f5643f 10/ (src/node.cc src/node.js):
[07:26] CIA-78: node: Reorganize the start-up process
[07:26] CIA-78: node: - assign 'GLOBAL' (and now 'global') inside src/node.js
[07:26] CIA-78: node: - position for eventually allowing replacements to src/node.js for people
[07:26] CIA-78: node: like Kris Kowal who want the nice libev and libeio bindings but not
[07:26] CIA-78: node: necessarily node's choices of modules or promises. - http://bit.ly/cQzbrl
[07:29] mikeal has joined the channel
[07:29] _Ray_: Question. I have a C++ function that may hang. Can I use a promise callback for this, passing a function when it succeeds, but setting a timeout so if after n seconds it isn't done, it stops? (Is there a way to "stop" it?)
[07:47] mikeal has joined the channel
[07:51] keeto_ has joined the channel
[07:52] scudco has joined the channel
[07:53] andy_l has joined the channel
[07:57] Tim_Smart: _Ray_: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#code_ev_timer_code_relative_and_opti
[07:57] Tim_Smart: I was looking at that before
[08:32] qFox has joined the channel
[08:40] keeto_ has joined the channel
[08:56] JoePeck_ has joined the channel
[09:00] jubos has joined the channel
[10:03] tlrobinson has joined the channel
[10:56] felixge has joined the channel
[10:56] felixge has joined the channel
[11:26] tlrobinson_ has joined the channel
[11:32] eikke has joined the channel
[11:38] hassox has joined the channel
[11:43] markwubben has joined the channel
[11:53] blackdog` has joined the channel
[12:07] micheil: hmm.. Node doesn't yet have a wikipedia page, I'm surprised..
[12:13] hassox: hey micheil
[12:13] micheil: moin
[12:13] hassox: hows things?
[12:14] micheil: not too bad
[12:16] micheil: yourself?
[12:19] micheil: was node getting an internal streaming api, or was that just a community development?
[12:27] hassox: not too bad
[12:27] hassox: I think node is getting one
[12:27] hassox: ryah was saying something about i the other day
[12:28] webben has joined the channel
[12:29] micheil: yeah, I know we were talking about streaming apis and things, I just wasn't sure where it was at
[12:29] hassox: he said it's going into the net2 branch
[12:30] blackdog`: micheil: does your branch have fixes for the childProcess problem?
[12:30] micheil: blackdog`: my branch?
[12:30] micheil: oh, right, my branch of node, no.
[12:31] blackdog`: ah ok, just the tests
[12:31] blackdog`: ok
[12:31] micheil: my branch of node is pretty defunct
[12:31] micheil: blackdog`: it's purely for things like documentation patches and stuff, I generally just edit directly in my node clone and then email / send ryan patches
[12:32] blackdog`: yep ok,
[12:39] micheil: (I should probably remove it from github but, oh well.)
[12:57] hassox: I think js is starting to make sense to me
[12:57] Tim_Smart: hassox: That's good, because js is awesome
[12:57] hassox: :)
[12:58] hassox: it does seem to be
[12:58] hassox: it's taking a bit of getting used to thoguh
[12:58] Tim_Smart: It was one of the first language I learnt, after PHP
[12:59] hassox: it was the first lang I did after playing with assembly for uni
[12:59] hassox: but I never really learnt it
[12:59] blackdog`: if you want to retain classes and strong typing and generate js have a look at haxe
[12:59] micheil: It was the first language I learnt (after jquery)
[12:59] hassox: blackdog`: I don't think i do
[12:59] hassox: I want to understand js first, then add that stuff if I want it
[12:59] Tim_Smart: It made PHP look bad in my opinion, I started to develop a dislike towards blocking calls
[13:00] hassox: kinda like... you have to know the rules before you break them
[13:00] blackdog`: true
[13:00] hassox: Tim_Smart: I'm getting a dislike of blocking too ;)
[13:00] hassox: blackdog`: how does this look
[13:01] hassox: http://gist.github.com/291054
[13:01] hassox: ACTION is wondering about js style wise
[13:02] Tim_Smart: I would personally just create your own prototype for that
[13:02] Tim_Smart: instead of extending the Object prototype
[13:02] hassox: Tim_Smart: how can I make it available to multiple things?
[13:03] Tim_Smart: My reusing the prototype
[13:03] Tim_Smart: __proto__ can be used to inherit properties from memory
[13:04] hassox: Tim_Smart: pls explain
[13:04] Tim_Smart: well first I probably aren't understanding your goal
[13:05] blackdog`: hassox, i do recommend use of jslint, or google closure compiler, i got a lot of my js style from jslints recommendations
[13:05] hassox: k so I don't like to overload memory by fully loading all objects in a namespace
[13:05] hassox: blackdog`: do you have a link on how to use?
[13:05] hassox: Tim_Smart: I just want to load the objects in my namespace if they're actually used...
[13:05] hassox: so a lazy loading of the object from it's file is what this does
[13:05] blackdog`: jslint.org, basically you just put a comment at top of your file telling it which rules you want to enforce
[13:06] hassox: it will load the object defined in the file into the property with the same name
[13:06] blackdog`: google closure is probaly better but i haven't used it yet
[13:06] hassox: blackdog`: hrm
[13:06] blackdog`: these keep you in javascript and make recommendations, tell you about unused variables etc which is super useful
[13:06] jfd has joined the channel
[13:07] hassox: nice
[13:07] blackdog`: personally i need a compiler to keep me on track, many don't, but i make too many stupid mistakes without
[13:07] hassox: using jslint now
[13:08] blackdog`: also, someone posted the other day a node based jslint server
[13:08] blackdog`: which makes it really quick
[13:08] blackdog`: otherwise firing up rhino on each compile is a bit heavy
[13:09] mediacoder: coffeescript on node ftw :-) ..im so in love with coffee (and script)
[13:09] blackdog`: why don't people know about haxe?
[13:09] blackdog`: www.haxe.org rocks, and generates javascript
[13:09] blackdog`: and i have node wrappers for it
[13:09] mediacoder: blackdog`: think it ahs a too flashy image
[13:10] blackdog`: mmm, yea, i want to change that it's not just flash, it can generate js, cpp, and php too
[13:10] Tim_Smart: hassox: The think is, that will now affect all Objects, which you don't really want to do
[13:10] Tim_Smart: thing*
[13:11] hassox: Tim_Smart: actually that was the idea
[13:11] hassox: to provide Object with a way to autoload
[13:11] hassox: any object
[13:12] micheil: I don't understand most of these people that want to use another language from within javascript
[13:12] hassox: micheil: ?
[13:12] micheil: javascript doesn't really need any enhancements (syntax wise)
[13:12] keeto has joined the channel
[13:12] hassox: I want autoloading... I know not everyone will want it...
[13:13] Tim_Smart: hassox: Why not something like this: http://gist.github.com/291063
[13:13] hassox: why is that a bad / not js thing to want?
[13:13] mediacoder: micheil: i like writing coffeescript..just feels nice.. plus it compiles to "best practices" eliminating too different coding-styles
[13:13] micheil: like, HaXe looks java esque, Coffeescript looks ruby-ish
[13:13] blackdog`: micheil: i like compilation, i find it difficult to write large programs without
[13:13] blackdog`: even with js i need rhino
[13:13] blackdog`: i mean
[13:13] blackdog`: jslint
[13:13] micheil: but then again, I'm also against using libraries that abstract too far from what javascript is, or changing the way javascript works, ala, prototype and jquery
[13:13] hassox: Tim_Smart: and then when I access it via foo.MyObj
[13:14] hassox: how does that acutally hit the autoloader?
[13:14] micheil: I must say, I should learn up on __defineGetter__
[13:14] micheil: it could be useful for some ORM related things
[13:14] keeto has joined the channel
[13:15] hassox: micheil: it's pretty hawt
[13:15] hassox: micheil: is you use __defineGetter__ you have to use __defineSetter__
[13:15] hassox: so it becomes like a non-overwritable thing (I believe)
[13:15] Tim_Smart: hassox: That will return a new object with __defineGetter__ as a property
[13:16] Tim_Smart: ACTION opens node.js console
[13:17] hassox: Tim_Smart: __defineGetter__ isn't for defining an object with a property of _defineGettter__
[13:17] micheil: hassox: I think __defineGetter__ and __defineSetter__ are equal to noSuchMethod
[13:17] hassox: {}.__defineGetter__("foo", function(){ return "bar" } )
[13:17] micheil: actually, no similar
[13:17] hassox: thatObject.foo === "bar"
[13:17] hassox: micheil: noSuchMethod?
[13:18] micheil: yeah
[13:18] hassox: I didn't think there was such a thing
[13:18] Tim_Smart: hassox: That all your prototype code was doing, I just rearranged it slightly
[13:18] micheil: it's a mozilla extension
[13:18] hassox: Tim_Smart: foo isn't an autloader
[13:18] hassox: it's just an object that can autoload objects
[13:18] hassox: you use them, and if they're not loaded yet, they're loaded
[13:19] hassox: maybe I'm missing something... it's quite late ;)
[13:19] blackdog`: are there any do's and don't idioms for v8 performance optimizations, e.g. string concat which was discussed yesterday, or e.g. adding few properties dynamically due to the hidden classes v8 creates - any others ?
[13:19] hassox: blackdog`: what was the results of the string concat?
[13:19] blackdog`: it seems that s += "" is fine in v8
[13:20] blackdog`: apparently it's buffered anyeway
[13:20] blackdog`: i think i'll post on the v8 list about this question,
[13:22] Tim_Smart: Sorry, now I know what you mean hassox, let me make an adjustment to my code
[13:24] micheil: wtf, this makes not a lot of sense: http://code.google.com/p/v8/issues/detail?id=264#c6
[13:25] felixge has joined the channel
[13:25] felixge has joined the channel
[13:27] micheil: v8 won't implement the patch for the really useful __noSuchMethod__ until JSC has it.
[13:27] Tim_Smart: hassox: http://gist.github.com/291063
[13:27] hassox: JSC?
[13:27] hassox: Tim_Smart: looking
[13:28] hassox: Tim_Smart: that still puts foo as an instanceof AutoLoader ;)
[13:28] hassox: it's not a huge deal
[13:28] hassox: autoload can just be a util function that's attached when needed
[13:29] BBB has joined the channel
[13:30] micheil: hassox: JavaScript Core
[13:31] hassox: oh there's a body?
[13:31] micheil: a webkit thing.
[13:31] hassox: right
[13:31] hassox: any association with commonjs
[13:31] micheil: no
[13:31] keeto has joined the channel
[13:31] micheil: ryah: Any chance of patching v8 in node to support __noSuchMethod__ ?
[13:32] micheil: ryah: there's even a fork of v8 on github to implement it, and the patch has been approved by the v8 team, but won't be included until JSC implements it
[13:33] Tim_Smart: for the lols, we should run this irc channel on a node.js server
[13:33] hassox: haha
[13:33] hassox: well it's been great chatting lads
[13:33] lifo has joined the channel
[13:33] hassox: but it's late enough for me to go to sleep :D
[13:33] hassox: gniht
[13:33] Tim_Smart: night
[13:39] hassox: oh felixge just before I fly...
[13:39] hassox: I think I've reconciled all but one thing with ejsgi ;)
[13:39] hassox: looks like chain is not required :)
[13:40] spoob_ has joined the channel
[13:40] felixge: ejsgi?
[13:40] hassox: http://github.com/isaacs/ejsgi
[13:42] spoob_: My brain is broken. How can (fab) do a [] in the middle of ()'s?
[13:43] felixge: hassox: I
[13:43] felixge: * I'm not involved in the EJSGI discussion much
[13:43] felixge: fab can return a function that has properties
[13:43] felixge: I mean a function is just an object
[13:44] spoob_: fab seems to initiate with []'s rather than selecting from a range. Is it intercepting what is put into the []'s?
[13:47] spoob_: eg, (blah blah)(blah blah) then [blah](blah)
[13:47] spoob_: if the blah in []'s was a known value, I get it.. but the blah in the []'s seems to be new information
[13:51] spoob_: i'm still a bit torn on whether (fab) is a good idea or a bad one.
[13:53] spoob_: I am thinking that the idea of (fab) might be better for the nested addCallback's that looks recursive but is actually sequential in Node
[13:54] jfd has joined the channel
[13:57] keeto has joined the channel
[14:04] felixge: after seeing the new hot reload thread on the ML I retested my old EIO race against HEAD
[14:04] felixge: and it seems to be gone now
[14:04] felixge: : )
[14:04] felixge: testing it in my actual project, if that works we might have hot reloading very soon
[14:05] felixge: spoob_: I think ['val'] is always a known value, not a dynamic one
[14:05] felixge: if it was dynamic I had no idea how it could work
[14:05] felixge: :)
[14:05] spoob_: felix; I understand it then. :)
[14:05] spoob_: what do you think of using (fab) style function chaining instead of the nested addCallback()'s?
[14:06] felixge: spoob_: example?
[14:07] spoob_: instead of whoop.addCallback(function(plurp) { plurp.addCallback(blah) { blah.addCallBack(... do whoop.chain(function(){})(function(){})...
[14:08] felixge: well, it all depends on error handling
[14:08] felixge: in your example you couldn't handle errors explicitely
[14:08] spoob_: whoop.chain(function(){}, function(){})(function(){}, function(){})... :)
[14:09] felixge: now that's just the definition of spagetthi code
[14:09] felixge: :)
[14:09] felixge: I am considering the named function style that is being discussed on the ML
[14:10] felixge: but I think if we go for callbacks like this we should have an explicit error parameter
[14:10] felixge: as the first param
[14:11] spoob_: or the function could handle errors as well, with an error flag in the parameters?
[14:12] spoob_: oh, that is what you said
[14:12] spoob_: yes, one function that can handle errors as well would result in cleaner chaining than two functions per item in the chain
[14:13] spoob_: Is there any real benefit to talking about promises instead of just having callbacks?
[14:13] felixge: one idea we had is that a function that had an error needs to return the error
[14:13] felixge: otherwise an exception will be thrown
[14:13] felixge: this would be an awesome safeguard against silent failures
[14:14] spoob_: I've tried that technique in C and it doesn't work well for single value returns, so you'd need to return an object of which one parameter is the error value
[14:14] felixge: spoob_: what technique?
[14:15] spoob_: returning errors when there's a failure. In C, that means devoting the return parameter to error values, or using errNo as an outside channel
[14:15] spoob_: in JS, you could return normal objects but have a "error" value as well.
[14:16] felixge: YESSS
[14:16] felixge: :)
[14:16] spoob_: you just got something working?
[14:16] felixge: (to explain: I probably wasted 30+ hours hunting libeio bugs and issues with it, so I'm slightly excited to see it work)
[14:16] felixge: yes, you know transload.it?
[14:17] spoob_: hot code reloading sounds really useful. Yes, I've had a look at transload.it
[14:17] felixge: We need hot code reloading because video uploads can take up to an hour and it kind of sucks to ever take your server down
[14:17] felixge: so right now I was hot reloading code while video files were uploaded
[14:17] felixge: and it works perfectly
[14:17] frodenius: w00t nice felix
[14:18] felixge: this is a project with ~70 node.js modules
[14:18] felixge: that get reloaded
[14:18] felixge: so its a pretty good test case
[14:18] felixge: :)
[14:18] felixge: so far it would always stop doing the reload when heavy I/O (a file upload) started
[14:18] felixge: but now it just works
[14:18] felixge: spoob_: anyway
[14:18] spoob_: I also want a server backend based on node, so I'm happy for me that you're happy :)
[14:18] felixge: back to promises/callbacks
[14:19] felixge: (very happy!)
[14:19] felixge: the return value would not be dedicated to errors
[14:19] felixge: you could return anything
[14:19] spoob_: is the return value a primitive or an object that can have multiple values?
[14:19] felixge: but if you have an error and you return nothing, it would throw an exception
[14:19] felixge: that's all
[14:19] spoob_: that sounds like it would work
[14:20] felixge: I'm thinking we should limit callbacks to 1 parameter
[14:20] felixge: it would make a lot of things much much easier
[14:20] felixge: like aggregating results from multiple promises
[14:20] spoob_: so if you did that, had one function handling both calbacks and errbacks, then you could do (fab) style chaining instead of nested addCallbacks
[14:20] felixge: yes
[14:20] felixge: exactly
[14:20] felixge: everything would be easier
[14:20] felixge: because its a simpler API
[14:21] spoob_: it would eliminate a lot of confusion as the nested addCallbacks look like something else when you see it for the first time in code
[14:21] spoob_: it looks like it should run from the inside out, rather than the outside in
[14:30] alex-desktop has joined the channel
[14:32] chakrit has joined the channel
[14:40] jed has joined the channel
[14:48] ithinkihaveacat has joined the channel
[14:55] bronson has joined the channel
[15:01] ithinkihaveacat: hi, are there any problems with node 0.1.26 on os x, where requests sometimes stall?
[15:02] ithinkihaveacat: running ab against a "hello world" nodejs webserver with 10000 requests, i sometimes get a stall on one request, it seems
[15:02] ithinkihaveacat: as in, nodejs will take 10 secs or more to respond
[15:02] ithinkihaveacat: it doesn't happen every time
[15:02] ithinkihaveacat: i don't get this on my linux vm, just os x
[15:07] joshthecoder: ithinkihaveacat, might want to open an issue on github
[15:08] spoob_: jed; just in case anyone hasn't reminded you lately, you're still completely insane for being able to think of (fab) :)
[15:09] ithinkihaveacat: inimino: regarding callbacks/promises, how would you add timeouts to callbacks? another argument? or use promises if you want timeouts?
[15:10] ithinkihaveacat: joshthecoder: okay, will do.
[15:10] spoob_: ithinkihaveacat: http://nodejs.org/
[15:10] spoob_: it's the main example :)
[15:10] jed: spoob_: naw, it's just the chaining we all know and love, evolved from this: http://news.ycombinator.com/item?id=1085326
[15:10] ithinkihaveacat: spoob_: yes, that's what i'm using--? (well, without the timeout)
[15:11] spoob_: ithinkihaveacat; isn't the timeout what you want?
[15:12] spoob_: jed; yes, that's the usual method chaining. It's the insanity of taking it to the next level of chaining functions. :)
[15:13] ithinkihaveacat: spoob_: um, do i want setTimeout? it should still work without it, right?
[15:13] spoob_: jed; I was talking with felix earlier about how fab style chaining would be nicer than the nested addCallback()'s for sequences of code, as the current method looks like it should run from the inside-out, but actually runs from the outside in. With function chaining, it would read left to right as usual
[15:14] jed: spoob_: ah, lemme check that out.
[15:16] spoob_: ithinkihaveacat; it's the same technique as far as I can tell, you just do a setTimeout on the callback
[15:16] jed: i understand felixge's concern that it can look like spaghetti code, but i think it's worth it.
[15:16] jed: if you're going to inline functions, you really should name them.
[15:16] jed: once you do that, the concerns melt away.
[15:16] jed: (imho)
[15:17] spoob_: if the callback handled errors too, then it wouldn't need two per function and would be more like the first example
[15:18] spoob_: i think it's worth it too, for the left-to-right readability instead of mentally reversing to outside-in while reading nested functions
[15:20] ithinkihaveacat: jed: what to do about timeouts? just pass those in to the curried function as a number?
[15:21] jed: a timeout is an error, right?
[15:21] ithinkihaveacat: so the argument to the curried/partial function are (success, error, timeout) or something?
[15:21] jed: i don't think you need a separate timeout handler.
[15:21] ithinkihaveacat: but how do you specify how long the timeout actually is?
[15:22] jed: i think it'd be up to the implementation to call the error handler in the case of a timeout.
[15:22] jed: well, i think the API for setting timeout durations belongs elsewhere.
[15:23] jed: or you could just do the timeout in your own code.
[15:24] jed: i'm not sure it's something else we need to codify; that kind of functional creep is what makes promises confusing.
[15:24] ithinkihaveacat: okay, so the timeout goes into the curried bit? i.e. you have a function in continuation passing style function(arg1, arg2, timeout, successfn, errorfn)
[15:25] jed: ithinkihaveacat: hrm, i think async should really only add one argument: the callback.
[15:25] jed: if you want to separate success and failure, you leave the callback arg out and do it in the returned "promise".
[15:25] ithinkihaveacat: okay, i was wondering if the timeout should go into the curried bit
[15:26] ithinkihaveacat: (that's effectively where it goes with promises, i guess)
[15:26] ithinkihaveacat: (promise holds callbacks and timeout)
[15:27] jed: the way the current promise API works seems fine to me.
[15:28] micheil: does anyone know of a node fileserver?
[15:28] jed: so you would have: promise = fn( arg1, arg2 ); promise.timeout = 5; promise( callback );
[15:29] drslump has joined the channel
[15:30] spoob_: you wouldn't set the timeout in the function, like for the nodejs.org main example?
[15:30] ithinkihaveacat: sorry, i don't follow ... so you wouldn't want to mix callbacks and timeouts? if you want timeouts, you have to use a promise?
[15:31] ithinkihaveacat: i thought you could either move the timeout argument into the first function call, or the second
[15:31] DrSlump1 has joined the channel
[15:31] ithinkihaveacat: i.e. either posix.cat( "config.json", 10)(success, error) or posix.cat("config.json")(success, error, 10)
[15:32] DrSlump has joined the channel
[15:33] spoob_: timeout isn't singular enough for its own parameter, there's other error conditions too
[15:34] spoob_: if you want something called after 10, just go ahead and call it.
[15:34] inimino: ithinkihaveacat: I would add timeouts as a layer above
[15:34] inimino: ithinkihaveacat: it doesn't require promises though
[15:36] inimino: ithinkihaveacat: you can just write something like: var continuable=read("path/to/file"); var with_timeout=first_of(continuable, timeout(1000))
[15:37] inimino: ithinkihaveacat: first_of() would be a convenience function that runs a bunch of continuables in parallel and returns the result of the one which finishes first
[15:37] guan has joined the channel
[15:38] inimino: ithinkihaveacat: then you'd pass your handler for either the timeout case or the case of reading the file in >1s
[15:38] inimino: to the with_timeout continuable:
[15:39] inimino: with_timeout(function(x){ /* x is either the timeout or the file contents */ })
[15:41] inimino: ithinkihaveacat: of course that implies some way to cancel I/O, but we don't have any APIs is node that have timeouts currently as far as I know
[15:41] ithinkihaveacat: hrm, i'm having trouble thinking that through ... i thought continuable itself was going to take parameters (success, error)
[15:43] mies has joined the channel
[15:43] ithinkihaveacat: i don't see how you can even run continuable() without giving it the success and error callbacks, which you don't seem to have at the time of the first_of() call (because the callback is with_timout()
[15:43] ithinkihaveacat: am i reading that right?
[15:44] inimino: ithinkihaveacat: that's right
[15:45] inimino: ithinkihaveacat: first_of() returns a continuable
[15:45] inimino: ithinkihaveacat: it doesn't actually do any I/O until you pass a continuation to it
[15:45] paulca has joined the channel
[15:45] inimino: an implementation of first_of() would look something like...
[15:46] ithinkihaveacat: oh, so to start stuff happening, you do with_timeout(success, error)?
[15:46] inimino: ithinkihaveacat: yes
[15:46] inimino: ithinkihaveacat: though in my nomenclature, a continuable only takes one argument
[15:46] ithinkihaveacat: and "success" will either get the result of the continuable, or the timeout(1000)
[15:46] ithinkihaveacat: (so, "success" actually is actually the wrong name)
[15:47] inimino: it would just be with_timeout(result)
[15:47] inimino: and result gets the result, with some way of tagging whether it is error or success
[15:47] inimino: in fileIO I'd use the Either type for that
[15:47] ithinkihaveacat: okay, but your result callback needs to be able to figure out whether the result came from read's continuable, or timeout()?
[15:48] inimino: (which is just a concept that could be implemented any number of ways... you could return an object which has either a 'data' or 'error' property but not both)
[15:49] inimino: ithinkihaveacat: yeah, what you'd get in fileIO style would be a nested Either type
[15:49] inimino: so Either a timeout or the result of the read() call which would be Either file contents or an error
[15:49] inimino: ithinkihaveacat: but you could write a nicer implementation of timeout() on top of first_of which folds the timeout case into just another error condition
[15:50] ithinkihaveacat: thanks, i think i understand.
[15:50] _Ray_ has joined the channel
[15:50] ithinkihaveacat: yeah, i think you'd want some helper functions ... in this "raw" case there's three layers of curried functions, which seems like a lot
[15:52] inimino: it's a lot, but usually you're only dealing with the top level and you can forget about the rest of them
[15:58] [k2] has joined the channel
[16:00] gleicon has joined the channel
[16:00] gleicon: hello
[16:00] gleicon: is there any keep-alive / timeout method for http server ?
[16:00] gleicon: I can only manage 60 secs connection while trying to do comet
[16:00] gleicon: (total node.js newbie)
[16:01] spoob_: nodejs.org has a timeout as its main example
[16:01] spoob_: look on the front pag
[16:02] gleicon: I would like to eliminate the timeout
[16:03] gleicon: as I'm not using res.finish()
[16:04] gleicon: may I paste a gist url ?
[16:04] gleicon: I'ma a bit clueless if I'm using the proper js idiom...
[16:05] jed: gleicon: a gist would help.
[16:05] gleicon: http://gist.github.com/291126
[16:05] spoob_: http://wiki.github.com/ry/node/modules have a look at the WebSocket's section, as that has Comet as a fallback
[16:06] gleicon: cool, I will that up
[16:06] gleicon: basically I'm porting stuff I did with twisted and python to node, so I can understand it better
[16:08] jed: gleicon: here's one issue: "for (var c in connections)" is the wrong way to iterate on an array.
[16:08] jed: try connections.forEach( function(){ ... } ) instead.
[16:09] gleicon: ok
[16:09] jed: (var x in y is for object iteration, not array iteration)
[16:10] gleicon: Can I pass c as function() parameter ?
[16:11] jed: yes: connections.forEach( function( connection ){ ... } )
[16:11] gleicon: as in connections.forEach(function (c) { c.sendBody('oi'); });
[16:11] gleicon: cool
[16:11] jed: is there any reason you're not using long polling?
[16:11] jed: that's usually how i've seen folks do comet.
[16:11] gleicon: jed: you mean by the client site always requesting the same url ?
[16:11] gleicon: I've been trying to do as I do in python/erlang
[16:12] gleicon: like this post I did last year:
[16:12] gleicon: http://zenmachine.wordpress.com/2009/09/19/twisted-and-comet-comet-in-60-seconds/
[16:12] jed: ry's node server might be instructive: http://github.com/ry/node_chat/blob/master/server.js
[16:12] gleicon: basically I would keep the connection in a local pool that can be extended to a presence pool
[16:12] gleicon: cool, checking it
[16:12] gleicon: one of the reason is that I use comet as a kind of websocket consumer too
[16:13] gleicon: so I may not have javascript in client side to keep polling
[16:14] felixge has joined the channel
[16:14] felixge has joined the channel
[16:14] spoob_: i think the pool thing isn't needed in node as you would use variables in closures instead
[16:14] jed: for web clients that don't support websockets, i think long polling is safer. but there are folks here who know more about this that i do.
[16:15] ithinkihaveacat: is there a way to get to realpath() from nodejs? i.e. to prevent http://foo/../../etc/passwd working
[16:15] jed: gleicon: also, i think you need req.url.pathname instead of req.url.
[16:16] jed: ithinkihaveacat: have you seen the path module?
[16:16] ithinkihaveacat: or is a dodgy regexp the way to go?
[16:16] jed: ithinkihaveacat: http://nodejs.org/api.html#_path_module
[16:17] ithinkihaveacat: jed: oh! perfect, thanks. (i was looking in posix, which has file stuff, but not that.)
[16:24] gwoo has joined the channel
[16:34] brosner has joined the channel
[16:35] pjb3 has joined the channel
[16:39] _Ray_: Question. I have a C++ function that may hang. Can I use a promise callback for this, passing a function when it succeeds, but setting a timeout so if after n seconds it isn't done, it stops? (Is there a way to "stop" it?)
[16:42] spoob_: It's Groundhog Day in here
[16:43] spoob_: _Ray; go to http://nodejs.debuggable.com/ and read the logs just before you came in
[16:45] _Ray_: ah, thanks :)
[16:46] spoob_: No problem! :)
[16:48] gleicon: well, I really think I didnt sendBody() and http server heh
[16:49] gleicon: ops
[16:49] gleicon: I didnt get
[16:49] gleicon: it seems that sendbody accumulates what is sent to the browser
[16:50] gleicon: also, it stills finishing the connection after 60 secs
[16:50] gleicon: bummer.
[16:50] raggi has left the channel
[16:51] ithinkihaveacat: i'm writing a simple little http request router as part of something a bit larger
[16:51] felixge: gleicon: what's the problem?
[16:51] ithinkihaveacat: i know there's a bunch of these, but i'm wondering what people think of the api
[16:51] ithinkihaveacat: http://github.com/ithinkihaveacat/node-hydra/blob/master/router-demo.js
[16:51] _Ray_: spoob_, well, this C++ module exports a function, which may hang (i.e. never return). I get that I can set a timeout, but what will happen to that function that hanged?
[16:51] spoob_: it'll be sitting in a process, which you can blow away
[16:51] gleicon: felixge: I'm new to node.js and to get it gist, I'm implement some comet stuff I usually do in erlang and python
[16:52] _Ray_: Oh, will I be given some kind of PID?
[16:52] gleicon: but for each individual connection, seems like node.js http server finishes the request after 60 seconds
[16:52] gleicon: even having data piped non stop
[16:52] felixge: gleicon: I know node will close an idle connection after 60 secv
[16:52] felixge: * sec
[16:52] gleicon: I read over here http://github.com/zimbatm/nodejs-http-websocket that the original http server will do that after a successful requests
[16:52] felixge: anyway, try: req.connection.setTimeout(0)
[16:52] spoob_: depends how you invoke it :) if you added the C++ function to nodejs itself, then you've hung the whole thing so that no javascript code is going to be able to fix it
[16:52] gleicon: but my connection is idle only from client side
[16:53] gleicon: the typical comet, client issues a GET and server keeps sending data
[16:53] gleicon: just like here: http://zenmachine.wordpress.com/2009/09/19/twisted-and-comet-comet-in-60-seconds/
[16:53] felixge: gleicon: right, try the setTimeout()
[16:53] gleicon: I will create a gist of my current code
[16:53] gleicon: felixge: there can I get the setTimeout method ? server or req. ?
[16:53] felixge: gleicon: its per request
[16:53] gleicon: hm
[16:53] felixge: gleicon: so: request.connection.setTimeout()
[16:54] gleicon: http://gist.github.com/291145
[16:54] gleicon: ok, gonna try it now
[16:55] xantus has joined the channel
[16:56] felixge: gleicon: let me know if you hit issues
[16:56] gleicon: well
[16:57] gleicon: seems like it worked
[16:57] gleicon: I'm testing using chrome and curl
[16:57] gleicon: the 60 secs mark is gone. setTimeout(0) might be the no timeout value
[16:58] gleicon: thanks lot, I might have misread it in the docs...
[16:58] gleicon: coud you tell if the way I structured this code is a valid js idiom ?
[16:58] felixge: gleicon: 0 is the no timeout value
[16:58] gleicon: I'm having difficulties about the right mindset to write stuff using node.js
[16:59] _Ray_: Hrm. When a promise times out, what happens to the code it was running?
[16:59] felixge: gleicon: you need a the res.finish(); in your else case
[16:59] gleicon: ok
[16:59] felixge: gleicon: otherwise your code seems fine
[17:00] gleicon: felixge: how do I couple a client with a server, in a proxy style ?
[17:00] felixge: gleicon: yeah its a little difficult in the beginning, there is no 100% agreement on style with node.js yet
[17:00] gleicon: like, I have another example here, which queries twitter from time to time and send the result for connected users
[17:02] felixge: well, the rule of thumb is that anything that works is good. If you feel you can still read & understand it in a bunch of days - even better
[17:02] felixge: :)
[17:02] gleicon: I will gist it.
[17:02] gleicon: cool
[17:02] gleicon: I was going about as I would do in python/twisted
[17:02] felixge: there isn't really a lot you can do wrong
[17:03] felixge: make sure you don't have arrays that grow infinitely large
[17:03] gleicon: but tried to benefit of some cool ideas I saw
[17:03] felixge: well, node is not really different from twisted (its a bit more awesome so)
[17:03] felixge: :)
[17:03] felixge: so in general just default to common sense
[17:04] felixge: there is really no magic "right way" for most stuff
[17:04] gleicon: http://gist.github.com/291148
[17:04] gleicon: I just like to check if there is a right idiom... today is the first time I tried node.js
[17:05] gleicon: started to see if it would be hard to embed it inside a browser... a friend of mine had a nice idea about http p2p and I thought it would made sense to have some server primitives on js
[17:05] gleicon: thats to show you how misled I was hehe
[17:05] _Ray_: spoob_, well, the func is part of a module, but yeah, it's a synchronous func exported by the module.
[17:05] _Ray_: I'm looking at promises and don't think they can do what I want.
[17:06] felixge: gleicon: line 24, you are declaring that body variable in the GLOBAL scope
[17:06] felixge: probably not what you want
[17:06] felixge: but the overall appraoch is good
[17:07] gleicon: I thought the body had to be global to accumulate it
[17:09] gleicon: I mean, the request comes in chunks so it made sense for me...
[17:09] gleicon: also, I'm doing a little recursion there, in the timer... is it ok ? can it break stack or something like that ?
[17:09] gleicon: I'm lagging heh
[17:11] felixge: gleicon: its good enough if body is defined within the finish function
[17:12] gleicon: thats what I did, inside the request.finish callback, right ?
[17:12] gleicon: this way I can use it inside the other listeners...
[17:12] gleicon: or does the listener returns in a non closure way ?
[17:13] gleicon: (updated the gist with current code)
[17:16] jfd has joined the channel
[17:16] spoob_: gleicon; most of my problems have been from trying to ignore Javascript and play with the cool ideas. There's no getting away from having to learn Javascript, so if you're coming from Python and trying to do Twisted in Node without Javascript, that will be a problem for you :)
[17:17] spoob_: eg, you thought you needed a global to accumulate, whereas you actually use local variables in a function scope, as a closure
[17:19] gleicon: spoob: I've been trying to learn javascript for a while, but not as my main language
[17:19] gleicon: your're right, I can tell scopes well
[17:19] gleicon: that's why I keep looking for a idiom, to make sense for me
[17:20] spoob_: i'm from C, Objective C and Ruby, and I'm also learning Javascript now and I'm finding it needs a lot more attention and respect than I'd thought. It's more Ruby with more Scheme, and it has traps and problems from the bad bits
[17:20] gleicon: all in all, most of the resource about javascript I saw in the past were more web oriented, not to say that their quality was bad...
[17:20] inimino: `eloquent
[17:20] gbot2: Eloquent JavaScript is a comprehensive introductory Web-based book with examples and a built-in interpreter. http://eloquentjavascript.net/index.html
[17:20] gleicon: but their meaning was different, scope was barely discussed
[17:21] inimino: (recommended)
[17:21] gleicon: cool, didn't that
[17:21] spoob_: yes, the vast majority of Javascript attention has been on irrelevant web stuff. Node's very very different
[17:21] gleicon: I read javascript the good parts and really liked it
[17:22] spoob_: the javascript in Node is much more Scheme-like than the web focussed stuff, and I'm having to dust off my SICP just to follow what's going on
[17:22] gleicon: node.js is very interesting... I started to think about how cool it would be inside a browser, but it goes far from that
[17:22] inimino: Eloquent JavaScript might be a little too introductory for you, but it's got some good bits anyway
[17:22] inimino: `ninja
[17:22] gbot2: http://ejohn.org/apps/learn/
[17:22] inimino: that's a good test to see where you are at :-)
[17:23] gleicon: cool, thanks
[17:23] gleicon: I will give both of them a try today
[17:23] gleicon: its js day :)
[17:23] inimino: :-)
[17:23] inimino: I recommend SICP too :-)
[17:23] gleicon: thanks for all the help, I'm going to post it in my blog to fix and see if I can find ppl to study it overhere
[17:24] gleicon: sicp ?
[17:24] gleicon: ahh
[17:24] gleicon: the mit press book right ?
[17:24] spoob_: when you see inimino implement Haskell in Node, you'll know the Singularity has been achieved :)
[17:24] spoob_: gleicon; yes, the infamous MIT "introductory" material that actually takes about 10 years to understand.
[17:24] gleicon: hahah
[17:25] gleicon: just like the prolog in lisp
[17:25] spoob_: it has that too
[17:25] spoob_: SICP shows you how to implement Prolog in Scheme
[17:25] inimino: yeah, that's in Chapter 4 :-)
[17:25] gleicon: I fear to get redundant when I read sicp
[17:25] gleicon: hahaha
[17:25] spoob_: anyway, that's the level of Javascript when it's not in the browser.
[17:25] chakrit has joined the channel
[17:26] spoob_: It's very surprising, but it's very good too. Javascript is a very respectable and capable language, with some problems
[17:26] chewbranca has joined the channel
[17:27] gleicon: this friend of mine proposed a p2p approach to content distribution, using the browser itself
[17:27] gleicon: it was when I decided to read more about javascript and node.js
[17:27] gleicon: its the only way I see to implement it without shipping a full webserver and dht stuff along with each browser
[17:27] inimino: gleicon: you know about the Opera stuff?
[17:27] spoob_: browsers can't connect to other browsers, however the p2p could be mediated by the web servers.
[17:27] gleicon: he proposed it at what-wg
[17:28] gleicon: inimino: I saw it
[17:28] inimino: k
[17:28] spoob_: and yes, that's why I'm here too. I'm also using node as a server level platform for p2p communication
[17:28] spoob_: look at the nodejs chat demo
[17:29] mikeal has joined the channel
[17:29] gleicon: spoob_: the idea was to provide a tracker or dht, and embed something like a minimal node.js with pre-defined behaviours and server styles
[17:29] gleicon: not a free server
[17:29] gleicon: like websockets in the other way
[17:29] gleicon: spoob_: cool, what kind of p2p, can you tell ?
[17:29] gleicon: it should be easy, as chrome uses v8 as js engine... but it was not until today that I really understood how differente they are
[17:30] gleicon: not so trivial heh
[17:30] spoob_: gleicon; the same as the chat demo, just passing chat type messages from browser to browser. that will be used to move stuff around in a 3d world
[17:31] gleicon: cool, but you had the browser to start the conn against a server, right ?
[17:31] spoob_: yes, and there isn't any other way to do it
[17:31] gleicon: browser to browser using geoip and local stuff should be out of context for current browsers..
[17:31] gleicon: that's the proposal this friend of mine was writing
[17:31] spoob_: even if you get the client to initiate the connection with websocket, how is the client going to have code to run without loading it from a server?
[17:32] gleicon: he is involved with what-wg comitee to tailor it better
[17:32] gleicon: I just chimed in to tell that it would need extensive changes to browsers
[17:32] gleicon: I thought about a dht/tracker style
[17:32] spoob_: in theory, the client could load up a program, then initiate connections with websocket when it wants
[17:32] gleicon: a browser would check with the tracker who is near and with newest version of the objects it needs
[17:32] gleicon: as images and css
[17:33] gleicon: and would start a direct connection to that browser to ask for it
[17:33] spoob_: the browser can't open a socket to listen like a server
[17:33] gleicon: I know
[17:33] spoob_: firewalls would kill off initiated connections too
[17:33] spoob_: you need to change the internet, not just the browser
[17:34] gleicon: that's why I set up to research node.js (wrongly) thinking it could be embedded in a browser to provide a basic server
[17:34] gleicon: spoob_: not that impossible, not a standard that would work for everyone
[17:34] gleicon: but SIP is a kinda like that, and there is uPNP that solves part of the firewall issue
[17:34] gleicon: anyway
[17:34] spoob_: yeh, you're looking at something like what Opera did, so you win your point and the browser needs a lot of changing :)
[17:35] gleicon: I dont think its trivial nor I have the tech brains to put it working...
[17:35] gleicon: I'm just happy this idea made me try node.js heheh
[17:35] gleicon: I can use it for other projects too, which is a nice midway between python and erlang
[17:36] gleicon: I mean, after I learn proper js
[17:36] gleicon: gotta go folks, thanks for the help !
[17:36] gleicon: see ya later
[17:36] sudoer has joined the channel
[17:37] mattly has joined the channel
[17:37] paulca has joined the channel
[17:38] BBB has joined the channel
[17:41] stevestmartin has joined the channel
[17:50] tmpvar has joined the channel
[18:22] mikeal has joined the channel
[18:33] tlrobinson_ has joined the channel
[18:36] scudco has joined the channel
[18:48] icebox has joined the channel
[18:52] cloudhead has joined the channel
[19:06] Yuffster has joined the channel
[19:11] CIA-78: node: 03Ryan Dahl 07master * rfc025f8 10/ src/node.js : Remove __wrap__s - http://bit.ly/a4dp7O
[19:16] felixge: ryah: nice to see wrap go :)
[19:16] felixge: I'm really excited we might have hot code reloading soon :)
[19:16] felixge: seems like all libeio issues are gone!
[19:24] ryah: yeah that's going to be awesome
[19:24] ryah: do you like how i don't bind to the global scope anymore from c++?
[19:25] ryah: ACTION thinks it's pretty hot
[19:25] ryah: kriskowal told me about that trick
[19:26] ryah: so hopefully i can build a node-core executable whose first arg will be src/node.js
[19:26] ryah: that is a file containing a function which receives an object with all the c++ bindings
[19:26] ryah: then that function decides where they go
[19:33] jspiros has joined the channel
[19:34] eck has joined the channel
[19:43] tmpvar: nice
[19:49] paulca has joined the channel
[19:49] felixge: ryah: wait 'process' is no longer a global object by default?
[19:50] felixge: I thought you just moved the definition of GLOBAL itself
[19:50] ryah: it is, but if you replace src/node.js it doesn't have to be
[19:51] felixge: ryah: ohhh
[19:51] felixge: I didn't catch that part
[19:51] felixge: that's fantastic
[19:52] felixge: not that I have any sympathy with people who just want to rip out node's heart without its soul - but this is still nice :)
[20:09] omygawshkenas has joined the channel
[20:19] felixge: ryah: you want to get rid of wait()? :(
[20:20] paulca has joined the channel
[20:22] ryah: felixge: and expose the sync fs ops
[20:22] felixge: ryah: you'll have to add sync networking as well
[20:23] felixge: I'd rather support wait() :)
[20:23] ryah: you mean for http.cat.wait() ?
[20:23] felixge: yeah, for remote module loading
[20:23] ryah: yeah
[20:23] ryah: meh
[20:24] hassox: I"ve found wait to be useful when used carefully too
[20:24] felixge: ryah: we could drop it, but I kind of like having it
[20:24] felixge: me too
[20:24] felixge: well but 90% of that has been I/O
[20:24] felixge: * file i/o
[20:25] felixge: some sys.exec() stuff too
[20:25] hassox: my most visible use case was the changes to spectacular that allows async tests written in a sync fashion
[20:26] hassox: IMHO it's useful to write specs in a sync style
[20:30] jed_ has joined the channel
[20:30] jed_ has left the channel
[20:36] jed has joined the channel
[20:37] svei has joined the channel
[20:41] gianni has joined the channel
[20:48] bpot has joined the channel
[20:56] JoePeck has joined the channel
[20:59] DrSlump has left the channel
[21:04] r11t has joined the channel
[21:05] inimino: ryah_away: that new global approach sounds excellent
[21:05] isaacs has joined the channel
[21:09] hassox has joined the channel
[21:10] mattly has joined the channel
[21:28] mikeal has joined the channel
[21:37] technoweenie has joined the channel
[21:39] nrstott has joined the channel
[21:41] kriszyp has joined the channel
[21:45] paulca has joined the channel
[21:52] mikeal: isaacs: comment on the eJSGI stuff
[21:53] mikeal: the response headers specify how to handle array values in the object for mulitple headers of the same name
[21:53] isaacs: yes
[21:53] mikeal: but the request headers part of the spec doesn't include the same
[21:53] isaacs: oic. i thot jsgi says that the same thing'll happen
[21:53] isaacs: ie, any header value will be either a string, or an array of 1 or more members, or missing from the obj
[21:54] mikeal: i was only reading your ejsgi spec
[21:54] isaacs: right
[21:54] isaacs: lemme see what the other jsgi's do, though, that's a good question
[21:54] isaacs: i have a patch for node which does this for incoming headers as well.
[21:54] mikeal: very nice
[21:55] isaacs: but it breaks multipart atm. fixing it.
[21:55] mikeal: also, you may want to add to the spec that the order of that array needs to be preserved
[21:55] isaacs: preserved by the server?
[21:55] isaacs: yeah, that's important.
[21:56] mikeal: yeah, when sending the HTTP response
[21:56] isaacs: yep
[21:56] isaacs: some headers are treated as many values, some are treated as first-wins, and some are treated as last-wins
[21:56] mikeal: same thing for parsing in to the array if you do the same thing for the request headers
[21:56] isaacs: yep
[21:56] mikeal: yeah, browsers have insane behavior
[21:57] mikeal: i have this terrible bug in Windmill right now related to merging multiple headers
[21:57] isaacs: what's windmill?
[21:57] mikeal: the HTTP spec actually says that a client should treat merged cookie headers a certain way
[21:57] mikeal: and the browser doesn't consistently treat a merged cookie header the same way it treats multiple headers
[21:58] mikeal: http://www.getwindmill.com/
[21:58] mikeal: cross-browser test automation
[21:58] kriszyp_ has joined the channel
[21:58] mikeal: kind of like selenium on crack
[21:59] mikeal: we support cross-domain and flash and have this crazy recorder that actually works
[21:59] mikeal: and we have a full javascript API, so you can write all your tests in pure javascript and get access to your entire test page
[21:59] isaacs: nice
[22:00] jed_ has joined the channel
[22:00] tmpvar: i like it, but im concerned with adding a crack addled app to my workflow
[22:01] mikeal: hahahaha
[22:01] mikeal: the kind of craziness we have to do to support cross domain is crazy
[22:01] mikeal: basically, the proxy makes the browser think it never left the same domain
[22:02] mikeal: which is even harder than it sounds
[22:05] Yuffster has joined the channel
[22:11] jed_ has joined the channel
[22:14] bpot has joined the channel
[22:18] isaacs: character encoding is obnoxious.
[22:19] isaacs: doing everything as utf8 always works SO well without any headaches, but it's so much slower.
[22:19] hassox has joined the channel
[22:25] gf3 has joined the channel
[22:26] mattly has joined the channel
[22:38] felixge has joined the channel
[22:38] felixge has joined the channel
[22:38] Tim_Smart has joined the channel
[22:46] achew22 has joined the channel
[22:49] isaacs: what character encoding does v8 use for strings internally? anyone know?
[22:52] isaacs: i thot it was utf16, but when i send it with encoding "binary", it's definitely *not* a utf16-encoding the characters, afaict
[22:55] tlrobinson: isaacs: V8 uses UCS-2, i think
[22:55] tlrobinson: (basically UTF-16 but limited to 2 bytes per character)
[22:56] isaacs: hmm.... this is weird, then
[22:56] tlrobinson: i don't know how node deals with the "binary" encoding though
[22:57] isaacs: tlrobinson: well, it works that way when you pipe a file through, or a proxied request.
[22:57] isaacs: and then, with binary, you're basically just reading it in and spitting it out
[22:58] technoweenie: http://www.youtube.com/watch?v=e_0ZP6Hf1Q8 hooked up my twitter-node node.js lib with the mac text-to-speech to blurt out every tweet with 'node' or 'fab'
[22:58] jed has joined the channel
[22:59] tlrobinson: lol
[22:59] isaacs: technoweenie: haha
[22:59] hassox: nice one
[23:00] tlrobinson: i did the same thing for nextmuni.com http://gist.github.com/284371
[23:00] achew22: You should do that to your friends and try to convince them they are loosing their minds
[23:00] tlrobinson: (but on narwhal of course ;)
[23:01] jed: technoweenie: +fab seems to be equivalent to +location:UK
[23:02] tmpvar: technoweenie, lol..
[23:10] technoweenie: hey jed, have you given any thoughts to how you might setup multiple apps in one fab
[23:10] jed: technoweenie: you mean in one chain?
[23:11] hassox: oh btw if anyone casres, I'm depricating chain in favour of ejsgi
[23:11] technoweenie: yea, so i have an app called where's waldo with /track and /location
[23:12] jed: technoweenie: and you want to run them on different servers?
[23:12] technoweenie: no, i want to make it so you can mount it anywhere, let me make a gist
[23:13] jed: technoweenie: okay, cool.
[23:14] technoweenie: https://gist.github.com/808401ee91d56c139993
[23:15] jed: technoweenie: so, you want to define apps in two different places, and include one in the other?
[23:15] technoweenie: yea, so i can run multiple apps side by side
[23:16] technoweenie: hmm its probably not hard at all
[23:17] technoweenie: reload the gist
[23:17] isaacs: hm... looks like i can snatch the binary_engine stuff from narwhal-v8 and use it with node, perhaps...
[23:17] jed: technoweenie: what path do you expect to access the INSERT APP HERE app at?
[23:17] technoweenie: foobar/track
[23:17] kriszyp has joined the channel
[23:18] technoweenie: i modified the example... i think i can just pass a started fab object to some mount function
[23:18] tlrobinson: isaacs: binary-engine uses a bunch of narwhal macros, but it could easily be converted to raw V8 API calls
[23:19] isaacs: yeah, i see taht
[23:19] tlrobinson: binary.js is where most of the binary object is implemented
[23:19] tlrobinson: or rather ByteString and ByteArray objects
[23:19] isaacs: um.. not seeing that in narwhal-v8
[23:19] jed: technoweenie: okay, now you're blowing MY mind. lemme sort this out in my head.
[23:19] isaacs: is that in narwhal itself?
[23:19] tlrobinson: yea
[23:21] technoweenie: jed: heh i posted some other ideas
[23:21] tlrobinson: binary-engine just provides a simple wrapper for a byte buffer (which is an array of bytes in v8/javascripcore, a java byte array in rhino, and even a javascript array in browsers)
[23:21] isaacs: tlrobinson: hm... not finiding it
[23:21] tlrobinson: isaacs:
[23:21] tlrobinson: http://github.com/280north/narwhal/blob/master/engines/default/lib/binary.js
[23:21] jed: technoweenie: well, i could always sniff handlers to see if they're (fab) apps, so you wouldn't even need the .mount method.
[23:22] isaacs: ah, thanks
[23:22] tlrobinson: isaacs: some of these methods should be implemented more efficiently. but my idea was to implement as much as possible in js (so it will work in browsers) then optimize parts that need to be on an engine by engine basis
[23:22] technoweenie: yea i dont know, i wonder if is hould just do this as middleware
[23:22] technoweenie: well i just wanted to see what you thought about that, its time for food now :)
[23:23] hassox: jed: can you get middleware to fork?
[23:23] hassox: as in
[23:23] isaacs: tlrobinson: so, afaict, this is sort of the last hurdle to getting something jsgi-like that works really well in node.
[23:23] hassox: can a piece of middleware kit decide to go down the left or right branch?
[23:23] jed: technoweenie: i'm gonna fork your gist and show you how i'd do it.
[23:23] isaacs: that, and deciding on whether to stick with forEach or use streams, or something else. but the wheels are turning on that.
[23:23] isaacs: for this bit, though, it's kind of sticky.
[23:24] tlrobinson: isaacs: it would be helpful if you could provide some examples of how middleware would look in EJSGI
[23:24] isaacs: tlrobinson: i've got some in the reference implementation
[23:24] isaacs: http://github.com/isaacs/ejsgi/blob/master/examples/rot13.js
[23:25] jed: hassox, what do you mean by branch in this context?
[23:25] isaacs: tlrobinson: a more complex example here: http://github.com/isaacs/ejsgi/blob/master/examples/login.js
[23:25] hassox: jed so if you had "hello world" or "goodbye world" apps
[23:25] hassox: can a piece of middleware decide which one it should go to?
[23:25] isaacs: the "login" middleware, when wrapped around an app, makes it require a valid login.
[23:27] jed: hassox: well, each (fab) context has the list of subpath, method, and status handlers public. so as long as the middleware knows what context it's on, i suppose it could figure it out. does that make sense?
[23:27] hassox: hehe.. not really ;)
[23:31] jed: hassox: each (fab) context is just a function with objects on it. these objects contain the internal state of the context (its subpaths, etc). so as long as the middleware has some way of being aware of its context, it could do it's own logic. i'm not sure i like this usage, tho.
[23:33] hassox: yeah it doesn't sound like it fits with the design
[23:34] jed: i mean, middleware shouldn't be privy to stuff downstream, right? doesn't that defeat the purpose?
[23:34] hassox: kinda
[23:34] hassox: there are valid cases
[23:34] hassox: but I think in fab, fab is the router and decider of where to go right?
[23:34] paulca has joined the channel
[23:35] jed: hassox: right, but every fab handler is overwriteable. so technically you could do anything.
[23:35] hassox: ACTION is going to have to spend some time with it..
[23:35] hassox: do you have a nice intro?
[23:36] jed: hassox: all i've got is at http://fabjs.org
[23:36] technoweenie has joined the channel
[23:36] hassox: nice one
[23:36] jed: hassox: but it's only a few hundred lines, so it should be okay to grok.
[23:37] hassox: thanx mate
[23:37] jed: technoweenie: i forked your gist. lemme know what you think.
[23:38] jed: hassox: np. really psyched for folks to coalesce around some flavor of jsgi so that you can write middleware in either and have it work with an adapter.
[23:38] hassox: jed: utopia :D
[23:39] jed: hassox: for real. then we get to the real work of a middleware ecosystem.
[23:39] hassox: indeed
[23:40] isaacs: that's why we need to either have a proper Byte type in v8/node, or rejigger jsgi to not depend on that.
[23:40] technoweenie: yea at that point it looks like middleware
[23:40] technoweenie: jed ^
[23:41] jed: technoweenie: basically it is. i would just sniff for the special case where the function passed is a (fab) context.
[23:41] hassox: jed: could fab be layered on top of jsgi?
[23:41] tlrobinson: isaacs: IMO node really does need a binary type
[23:41] tmpvar: jed, thats pretty cool
[23:41] jed: technoweenie: but i took some pains to make sure that no (fab) context thought of itself as the "root", as tempting as that was, in anticipation of cases just like this.
[23:41] isaacs: tlrobinson: yeah, for plenty of reasons
[23:42] technoweenie: cool, i like it
[23:42] tlrobinson: i think ryan was talking to kris about it yesterday
[23:42] tlrobinson: not sure what, if anything, they concluded
[23:42] jed: hassox: of course. all you need to do is set fab.end to the JSGI adapter.
[23:42] jed: hassox: right now it's set to a node adapter. and i'd like to add a browser adapter at some point too.
[23:43] isaacs: well, they're both way smarter than me when it comes to stuff like that. hopefully they'll work it out
[23:43] tlrobinson: hehe yeah
[23:43] isaacs: cuz if they can't, then i'm screwed.
[23:43] hassox: jed: awesome
[23:43] hassox: isaacs: you and me both :\
[23:44] jed: hassox: the adapter is just another kind of middleware.
[23:44] hassox: jed: saweet
[23:47] mattly has joined the channel
[23:47] jed: i'm tempted to register "middlehere.com" as a central directory for JSGI-ready middleware, a la the jQuery plugin directory.
[23:50] alexiskander has joined the channel
[23:50] tlrobinson: jed: go for it
[23:51] jed: tlrobinson: will you help me build it?
[23:51] tlrobinson: ok
[23:52] jed: aight, i'm gonna register it.
[23:52] hassox: saweet
[23:52] tlrobinson: though the system should be generic enough that it can be reused for non-jsgi packages
[23:52] tlrobinson: i forget who but someone got packag.es
[23:52] isaacs: tlrobinson: ashb
[23:52] hassox: oh sweet
[23:52] tlrobinson: ah yea
[23:52] isaacs: he and i have been talking about a package repo for commonjs packages.
[23:53] hassox: that'd be hawt
[23:53] isaacs: at least, a registry of what and where.
[23:53] tlrobinson: right. something other than me manually adding it to catalog.json in narwhal's repo :)
[23:53] isaacs: so, it seems like, if you have non-ascii characters, the only safe way to send them is with the utf8 encoding.
[23:53] isaacs: tlrobinson: yeah
[23:53] isaacs: tlrobinson: centralization ftl
[23:54] tlrobinson: i mean, it can't be completely decentralized
[23:54] isaacs: tlrobinson: not necessarily the hosting of it, but the management of it must be.
[23:55] tlrobinson: isaacs: git is distributed ;)
[23:55] isaacs: ideally, you'd have maybe an owner/admin of the server, but let developers create and maintain their own packages without any oversight.
[23:55] tlrobinson: yeah
[23:55] tlrobinson: something like gemcutter
[23:55] isaacs: ACTION is more inspired by yinst
[23:55] isaacs: but yeah
[23:56] hassox: isaacs: please explain
[23:56] tlrobinson: i don't know what that is
[23:56] isaacs: if you'd worked at yahoo, you'd know. and if you haven't you'll have to take my word for it. yinst is powerful and awesome.
[23:56] Yuffster has joined the channel
[23:56] hassox: isaacs: sure... but what's it do
[23:57] jed: something like gemcutter would be awesome, but i'd settle for a simple list of urls, tagged with metadata.
[23:57] isaacs: it's got a distributed hosted location where devs can push packages. every package has an owner, dependencies, etc.
[23:57] isaacs: then you can install and it'll talk to the registry to figure out what to install.
[23:57] isaacs: but my plan for npm
[23:58] isaacs: but my plan for npm's registry is not as closed, for obvious reasons.
[23:58] isaacs: yinst can also install pacakges locally, make "link packages", supports any shebang-able language for package files, meta packages, you name it.
[23:58] isaacs: it's like apt-get's richer, smarter, cousin.
[23:58] tlrobinson: isaacs: will npm use the commonjs packages format?
[23:58] isaacs: apt-get + dpkg
[23:59] isaacs: tlrobinson: yeah, already does, actually
[23:59] hassox: :)
[23:59] tlrobinson: good :)
[23:59] isaacs: the only diff being that with npm, you install a tarball, not a json
[23:59] isaacs: it fetches the tarball, looks inside, grabs the json, and then installs it