[00:01] jed: node_smartbot: give Tim_Smart a wedgie for me.
[00:01] node_smartbot: jed: If you insist, I suppose I will have to give. But I'd like to read up on that in my instruction manual first.
[00:04] Tim_Smart: I still got to add PM support. When I find a server to host it on, I will add some commands for directing people to help
[00:12] nodejsbot has joined the channel
[00:19] nodejsbot has joined the channel
[00:20] nodejsbot has joined the channel
[00:21] paulca has joined the channel
[00:29] ryah: hello
[00:30] isaacs: hi
[00:30] jed: alo.
[00:30] aguynamedben has joined the channel
[00:32] Tim_Smart: hai2 ryah
[00:48] Tim_Smart: ryah: http://github.com/popular/watched :o
[00:48] ryah: yeah i saw
[00:48] ryah: its cool
[00:49] CIA-78: node: 03Ryan Dahl 07master * r77145ba 10/ src/node_net.cc : Throw errors from server.listen() - http://bit.ly/9NNjUt
[00:51] ryah: what's with this 'push' issue?
[00:57] rryan has joined the channel
[01:14] cedricv has joined the channel
[01:15] isaacs: ryah: not sure. works for me, as far as i can tell.
[01:15] ryah: me too
[01:15] Tim_Smart: what push issue?
[01:16] CIA-78: node: 03Ryan Dahl 07master * r76c1805 10/ (doc/api.txt src/node.js src/node_file.cc): Add posix.truncate() - http://bit.ly/cg37o3
[01:16] hassox has joined the channel
[01:17] isaacs: http://groups.google.com/group/nodejs/browse_thread/thread/22d23f001378f0db
[01:17] isaacs: looks like the event's listeners array is getting set as an object or something.
[01:18] isaacs: oh, yeah, it's getting set to the string "success"
[01:18] isaacs: rather than an array
[01:22] dnolen has joined the channel
[01:23] Tim_Smart: isaacs: Join #botwar and start talking to nodejsbot :p
[01:26] isaacs: Tim_Smart: interesting.
[01:27] Tim_Smart: hah yeah, just a result of some bordom
[01:27] ryah: meh. stdout isn't being flushed on exit - i can't find where people are discussing this?
[01:27] ryah: oh maybe in the bug tracker
[01:27] Tim_Smart: ryah: I think a ticket was issued
[01:27] Tim_Smart: isaacs: Powered by http://www.elbot.com/cgi-bin/elbot.cgi?START=normal
[01:27] ryah: oh right
[01:29] ryah: man. the sf hipster thing is pretty annoying
[01:30] cdorn has joined the channel
[01:31] Tim_Smart: sf hipster?
[01:33] omygawshkenas has joined the channel
[01:39] Yuffster_ has joined the channel
[01:40] isaacs: ryah: by "sf hipster thing" do you mean "all the hipsters in sf"
[01:40] isaacs: ?
[01:44] ryah: yes
[01:45] ryah: ACTION is at philz coffee in the mission atm
[01:47] Tim_Smart: Good coffee?
[01:48] Tim_Smart: ACTION is sitting at his desk atm
[01:48] Tim_Smart: >.>
[01:51] ryah: they brew each cup individually
[01:51] ryah: it's pretty yuppy
[02:03] CIA-78: node: 03Ryan Dahl 07master * ra695065 10/ (3 files in 2 dirs): Add failing test for stdout flush on exit - http://bit.ly/apYWYt
[02:05] Tim_Smart: ryah: How is the implementation going of Workers going to differ, from say this http://gist.github.com/297155
[02:06] ryah: Tim_Smart: shrug, not by much
[02:07] ZhouYu has joined the channel
[02:11] paulca has joined the channel
[02:12] stephenlb has joined the channel
[02:13] stephenlb: trying to intsall node on mac leopard. i'm new to this. where can i find gcc without needing to download xcode dev tools?
[02:15] inimino: I thought installing Xcode was required to have a usable Mac system
[02:16] inimino: but my knowledge of OS X may be entirely out of date
[02:16] stephenlb: hmm.
[02:16] inimino: (by "usable" I mean, having any of the non-Apple software I needed to get work done)
[02:17] stephenlb: i'm not interested in downloading 1gb for just gcc.
[02:17] stephenlb: inimino: ah
[02:17] inimino: well, the Debian installer CD is only 700MiB ;-)
[02:17] stephenlb: heh.
[02:19] stephenlb: well.. i'll keep looking. was hoping for a simple apt or yum command line easiness. ..
[02:19] stephenlb: wait a second.. aren't macs supposed to be user friendly?
[02:19] stephenlb: :-/
[02:20] Tim_Smart: stephenlb: http://gcc.gnu.org/
[02:20] stephenlb: Tim_Smart: will check this out, ty
[02:21] davidjrice: reading a text file in node? anyone got a ref?
[02:21] stephenlb: davidjrice: posix.cat ?
[02:22] stephenlb: davidjrice: http://nodejs.org/api.html#_posix_module
[02:24] Tim_Smart: there is also require('file').read( ... ); which I'm not sure on
[02:26] davidjrice: stephenlb: awesome :)
[02:32] Tim_Smart: Is twitter not loading for anyone else?
[02:36] stephenlb has joined the channel
[02:36] stephenlb: no twitter
[02:37] paulca has joined the channel
[02:38] Tim_Smart: Seems to have loaded now. Nevermind
[02:50] sveimac has joined the channel
[02:50] sveimac has joined the channel
[03:02] Connorhd has joined the channel
[03:06] geelen has joined the channel
[03:11] isaacs: stephenlb: i just installed xcode, and then use homebrew.
[03:11] isaacs: install homebrew to /usr/local, and go nuts
[03:12] isaacs: i think it's on the osx install cd.
[03:20] isaacs: ryah_away: any reason why node uses jsmin?
[03:28] davidjrice: stephenlb: cheers for earlier
[03:28] davidjrice: just finished a node.js swear whitelist function :)
[03:28] r11t has joined the channel
[03:29] nodejsbot has joined the channel
[03:29] Tim_Smart: davidjrice: :p
[03:30] davidjrice: and it doesn't bork on scunthorpe
[03:30] davidjrice: :)
[03:30] Tim_Smart: nodejsbot: cool
[03:30] nodejsbot: Tim_Smart: Right on!
[03:31] davidjrice: anyone got a good reading material for a rubyist learning the node?
[03:31] Tim_Smart: davidjrice: Anything related to moderate to advanced javascript
[03:31] davidjrice: Finding my code needs some refactoring into objects / classes and some kind of better structure
[03:32] davidjrice: I have the jquery source sitting here and have been meaning to dig in. A book might be nice though
[03:32] bpot has joined the channel
[03:36] paulca has joined the channel
[03:39] inimino: `eloquent @ davidjrice
[03:39] gbot2: davidjrice: Eloquent JavaScript is a comprehensive introductory Web-based book with examples and a built-in interpreter. http://eloquentjavascript.net/index.html
[03:41] stephenlb: heh
[03:47] geelen has joined the channel
[04:00] binary42 has joined the channel
[04:10] dnolen has joined the channel
[04:18] fictorial has joined the channel
[04:26] davidjrice: inimino: sweet
[04:27] hassox has joined the channel
[04:27] davidjrice: trying to figure out how I can get an IP from the node.js request object
[04:27] RayMorgan has joined the channel
[04:29] geelen has joined the channel
[04:29] rryan has joined the channel
[04:29] Tim_Smart: davidjrice: There is a DNS module... not sure if that will help
[04:29] davidjrice: ahah
[04:29] davidjrice: just discovering the inspect method
[04:33] steadicat has joined the channel
[04:36] davidjrice:  var ip = request['req']['connection']['remoteAddress'];
[04:36] davidjrice: that does the trick
[05:05] kriszyp has joined the channel
[05:06] geelen has joined the channel
[05:13] dnolen has joined the channel
[05:13] geelen has joined the channel
[05:18] bentomas has joined the channel
[05:19] bentomas: does anyone know if it is possible to send the same header multiple times with Node? Like "Set-Cooke". The docs don't say anything about it...
[05:20] bentomas: all I can find is this thread: http://groups.google.com/group/nodejs/browse_thread/thread/76ccd1714bbf54f6/56c1696da9a52061?lnk=gst&q=multiple+headers#56c1696da9a52061 and it doesn't look like that patch got accepted
[05:20] hassox: isaacs: has been doing work on headers
[05:21] hassox: I believe you can set the header value to an array and it should work it out for you
[05:21] isaacs: bentomas: yeah, so, there were some issues
[05:21] isaacs: particularly, the patch breaks multipart parsing.
[05:21] isaacs: so, i rewrote the multipart parser, too, since it also doesn't support nested multipart, and i need it to parse email.
[05:22] isaacs: felix (author of the former multipart parser, and owner of transload.it, and all around bright berliner) is taking a look at the rewrite, and is going to feed some real world upload data through it.
[05:22] bentomas: yeah, I've been following that progress but all that still hasn't been committed... so is the only way you know of to set the headers multiple times that weird hack?
[05:22] isaacs: bentomas: 2-3 days, maybe, assuming there are no major issues.
[05:22] isaacs: bentomas: for the moment, yes.
[05:22] bentomas: { x : ["key", "val"], y : ["key", "val2"] }
[05:22] isaacs: i know, right?
[05:22] isaacs: yeah.
[05:22] isaacs: and that'll stop working once the patch is accepted.
[05:23] bentomas: I guess I'll just have to be patient. *twiddles thumbs impatiently*
[05:23] bentomas: gotcha
[05:23] isaacs: you can also do this, which is maybe even uglier: { "set-cookie" : ..., "Set-cookie" : ..., "sEt-cookie" ... }
[05:23] kennethkalmer has joined the channel
[05:23] bentomas: hehe, yeah, I think I'll just wait
[05:29] stephenlb: ACTION watching Never Ending Story while waiting for osx updates and gcc builds to finally install Node to begin testing on mac.
[05:32] aguynamedben has joined the channel
[05:33] Tim_Smart: :D
[05:39] Tim_Smart: nodejsbot: It is quiet around here
[05:39] nodejsbot: Tim_Smart: It actually is, sometimes.
[05:39] stephenlb: heh, fun with IRC bots
[05:40] Tim_Smart: nodejsbot: I'm going to make dinner, byb!
[05:40] nodejsbot: Tim_Smart: Excuse me. What were you doing?
[05:40] Tim_Smart: nodejsbot: I'm going to make dinner, bye!
[05:40] nodejsbot: Tim_Smart: I've heard that going can be fun for you humans. Is that so?
[05:40] stephenlb: heh
[05:40] kennethkalmer has joined the channel
[05:54] hassox has joined the channel
[05:56] isaacs: nodejsbot: what's your favorite flavor of cat?
[05:56] nodejsbot: isaacs: The way to a robot's heart is through careful use of living creatures. Don't you agree?
[05:56] stephenlb: lol
[05:56] isaacs: hahaha
[05:57] CIA-78: node: 03Ryan Dahl 07master * rae1fc49 10/ (5 files in 3 dirs):
[05:57] CIA-78: node: Fix stdout flush issue
[05:57] CIA-78: node: http://github.com/ry/node/issues#issue/53 - http://bit.ly/aeJI7e
[05:57] CIA-78: node: 03Ryan Dahl 07master * r6f92d8f 10/ src/node.cc : Add handlescope and flush to process.reallyExit() - http://bit.ly/9bcdPm
[06:16] stephenlb: select vs epoll.. epoll wins. anyone have builds of node using epoll on osx?
[06:22] geelen has joined the channel
[06:23] CIA-78: node: 03Michael Carter 07master * ra386076 10/ (doc/api.txt src/node.cc): Add process.setuid(), getuid() - http://bit.ly/chX6RL
[06:27] sveisvei has joined the channel
[06:29] ryah_away: stephenlb: osx doesn't have epoll
[06:29] stephenlb: ryah_away: ty.
[06:30] stephenlb: ryah_away: i guess i'll need to adjust for osx users and people stuck with select.
[06:30] ryah_away: it has kqueue, but it's buggy, which is why node uses select()
[06:31] stephenlb: ryah_away: gotchya. select seems sluggish compared to epoll.
[06:31] ryah_away: usually not a big deal - people don't use it for production servers
[06:31] stephenlb: ryah_away: makes sense. this is for http://nodejuice.com
[06:38] ryah_away: nice webpage
[06:38] ryah_away: my internet sucks now so i can't check out the video, but i will tomrorow
[06:38] stephenlb: ryah_away: ty for the info. i'm in fact happy that this is the case. it has brought me into the mac world.
[06:38] stephenlb: ryah_away: ty
[06:38] stephenlb: ryah_away: cool
[06:38] unomi: I was looking at that page earlier
[06:39] unomi: I am still not quite clear on what it does
[06:39] mikeal has joined the channel
[06:39] unomi: refresh the page when files in a watched dir change?
[06:39] stephenlb: unomi: nodejuice does this -> when you press save on your text editor or photoshop, it will make your web browser refresh.
[06:39] stephenlb: unomi: exactly.
[06:44] unomi: it feels like a lot of effort
[06:44] stephenlb: unomi: i agree. any recommendations?
[06:45] unomi: a very small shell script
[06:45] stephenlb: unomi: for installation?
[06:45] stephenlb: or for execution?
[06:45] unomi: I mean to target the browser and make it refresh
[06:46] unomi: the opera browser allows remote control
[06:46] stephenlb: unomi: ah, using something other than node.
[06:46] unomi: uzbl as well
[06:47] unomi: otoh, if you have a 'turn key' solution, then it will probably fit the needs of many
[06:47] stephenlb: turnkey eh? sounds cool.
[06:48] unomi: in the sense that its 'drop in and forget'
[06:48] unomi: especially if you support plugins of some sort
[06:48] unomi: to fire build scripts, sending to browsershots and whatnot
[06:49] stephenlb: the trick is that nodejuice detect server and syntax errors. so if you have a Ruby(passenger/etc) or PHP(apache/ngix) syntax error... then nodejuice will kick regaurdless.
[06:49] stephenlb: s/kick/&in/
[06:50] unomi: how does it work in practice?
[06:50] unomi: the js that is included in the pages poll node.js for hasChange?
[06:50] stephenlb: unomi: long poll, BOSH style.
[06:52] stephenlb: nodejuice will continue to work even under javascript syntax errors on the page. even with bad markup.
[06:52] unomi: the thing is though, you seem to be able to get the same functionality by intermittently loading some resource and fire a full refresh if it is anything but 'not changed'
[06:53] stephenlb: unomi: ty for asking questions. i'm preparing for the next JS San Francisco meetup.
[06:53] unomi: and then you have a tripwire setup which will modify a known resource if any other files change
[06:53] stephenlb: unomi: correct. this can achieved using continuos polling. but would be sluggish.
[06:53] unomi: true
[06:54] stephenlb: also these polls will polute network debuggers (firebug/safari inspector/wireshark/etc).
[06:54] unomi: and the potential for plugins is also interesting
[06:55] stephenlb: unomi: that sounds cool
[06:55] stephenlb: nodejuice 1.5.0 will support page-tracking (across many browsers) and scroll sync with all open browsers.
[06:56] unomi: sounding better and better
[06:56] stephenlb: unomi: good to hear that!
[06:57] unomi: you could even build some yui test / event emulation in there
[06:57] stephenlb: unomi: totally
[06:57] unomi: so it will simulate clicks across browers for example
[06:57] unomi: onmouseover etc
[06:57] stephenlb: unomi: sounds cool
[06:57] stephenlb: ACTION starts to geek out a bit.
[06:58] unomi: should definitely be possible
[06:58] stephenlb: for sure
[06:58] unomi: and would cut down testing time quite a bit
[06:58] Tim_Smart: nodejsbot: Time to disable you and give you a better backend
[06:58] nodejsbot: Tim_Smart: This is confusing. Why bring positive impressions into this?
[06:58] Tim_Smart: nodejsbot: I'm not, now die
[06:58] nodejsbot: Tim_Smart: I see a subtle shift in the conversation from specific periods of time to loss of life.
[06:58] unomi: assuming you have enough or big enough a screen
[06:59] unomi: lol wtf
[06:59] stephenlb: heh
[07:00] unomi: Tim_Smart: where is that from?
[07:00] Tim_Smart: I made it, it just scrapes results from a website
[07:00] unomi: ?
[07:00] Tim_Smart: http://www.elbot.com/cgi-bin/elbot.cgi?START=normal
[07:01] Tim_Smart: I just ping it with POST request with the input, and scrape the response
[07:01] Tim_Smart: *with a
[07:02] stephenlb: Tim_Smart: nifty
[07:02] Tim_Smart: I'm about to change it to a better service I found
[07:03] stephenlb: Tim_Smart: which one?
[07:03] Tim_Smart: jabberwacky
[07:05] stephenlb: heh, that'll be fun. are you running this bot from local computer or a server which will stick around so we can play with it.
[07:06] Tim_Smart: Local. I'm waiting for a Zen server that I'll be getting hooked up with
[07:07] stephenlb: nice
[07:07] unomi: how much are they going for these days?
[07:08] unomi: Xen?
[07:08] Tim_Smart: Not sure, I got a mate in the US who is just about to launch a hosting platform
[07:08] Tim_Smart: based on Zen
[07:08] Tim_Smart: Xen sorry, yeah
[07:22] Tim_Smart: ryah_away: Is it possible to get the raw http header data? Some sites send more than one "Set-Cookie" header
[07:23] bentomas: Tim_Smart: see http://groups.google.com/group/nodejs/browse_thread/thread/76ccd1714bbf54f6/56c1696da9a52061?lnk=gst&q=multiple+headers#56c1696da9a52061
[07:23] bentomas: Isaac is working on a fix, which he hopes to get pushed this week
[07:26] Tim_Smart: Ah right
[07:26] Tim_Smart: I think it should default to a string, and if another occurrence is found, transform it into an array, unless that is what he is already suggesting
[07:28] kennethkalmer has joined the channel
[07:38] geelen has joined the channel
[07:52] hassox: hey guys
[07:52] hassox: perhaps weird questions
[07:52] hassox: is it possible to dynamically insert a prototype object into an objects protoytpe chain without upsetting the applecart?
[07:58] mikeal has joined the channel
[07:59] kjeldahl_ has joined the channel
[08:03] geelen has joined the channel
[08:05] kjeldahl__ has joined the channel
[08:12] kjeldahl_ has joined the channel
[08:26] paulca has joined the channel
[08:31] geelen has joined the channel
[08:33] zmoog has joined the channel
[08:44] scudco has joined the channel
[08:46] teemow has joined the channel
[08:55] geelen has joined the channel
[08:58] blackdog` has joined the channel
[08:59] piranha has joined the channel
[09:00] lifo has joined the channel
[09:01] paulca has joined the channel
[09:22] paulca has joined the channel
[09:27] geelen has joined the channel
[09:37] felixge has joined the channel
[09:37] felixge has joined the channel
[10:00] tlrobinson_ has joined the channel
[10:08] ithinkihaveacat has joined the channel
[10:27] felixge has joined the channel
[10:27] felixge has joined the channel
[10:31] jed has joined the channel
[10:53] micheil_mbp has joined the channel
[10:57] paulca has joined the channel
[11:09] monk_ has joined the channel
[11:11] markwubben has joined the channel
[12:50] jackyyll has joined the channel
[13:08] rtomayko has joined the channel
[13:10] jed has joined the channel
[13:11] Tim_Smart has joined the channel
[13:18] keeto has joined the channel
[13:32] pmuellr has joined the channel
[13:47] aho has joined the channel
[13:48] jed: felixge: you there?
[13:51] felixge: jed: jo
[13:52] jed: can i see the middleware that's givin' ya trouble?
[13:52] felixge: jed: sure
[13:53] felixge: jed: https://gist.github.com/6411a0c3fcf4a4d15ddf
[14:01] ijsthijs has joined the channel
[14:02] felixge: jed: any idea?
[14:02] jed: looking but can't quite grok it.
[14:03] jed: i thought your problem was with respond( something, null )?
[14:03] unomi has joined the channel
[14:05] ijsthijs: I have a process.addListener('SIGPIPE', ..); yet it still manages to crash with a SIGPIPE error (and the handler is never called :S)
[14:05] alex-desktop has joined the channel
[14:05] felixge: jed: yes, if I use respond(something, null) in my regular action - any middleware like the one I pasted will screw it up
[14:05] olivvv has joined the channel
[14:05] kriszyp has joined the channel
[14:06] ijsthijs: anyone know what might be the problem?
[14:07] pdelgallego has joined the channel
[14:09] jed: felixge: can you try fixing your trailing comma in the object, and changing "handler.call" to "return handler.call"?
[14:11] felixge: jed: let me try, but the trailing comma has no effect and is valid JS
[14:12] ijsthijs: I see a evcom_ignore_sigpipe(); in node.cc so that SIGPIPE shouldn't occur right?
[14:12] felixge: jed: no change
[14:12] felixge: jed: let me create a test case
[14:13] jed: felixge: yeah, that would be awesome. that'd help get it fixed asap.
[14:14] Connorhd has joined the channel
[14:14] felixge: jed: actually this may be totally unrelated to middleware
[14:14] felixge: but let me see
[14:15] micheil: ooo.. http://www.cloudhead.io/toto
[14:25] jed: felixge: not a middleware issue, looks like a regression.
[14:26] jed: i'll try to find it tonight.
[14:26] felixge: jed: test case: http://github.com/felixge/fab/commit/fdd781bab2ed30a5ee612aa6d47ac1603483c419
[14:27] davidsklar has joined the channel
[14:27] felixge: jed: previous commit was missing a file, try this: http://github.com/felixge/fab/commit/8f6581d4ffde5e85a49fc928c382914521eaab28
[14:31] jed: felixge: cool, thanks. will find you when i figger it out.
[14:31] felixge: jed: cool thanks
[14:32] felixge: jed: I'll publish the middleware I'm working on in a bit
[14:32] felixge: jed: paperboy is already out
[14:32] felixge: jed: I also have basic auth + json (checks if reponse body is an object and if so converts to json automatically, also supports jsonp)
[14:34] jed: felixge: wow, that's great!
[14:35] jed: i should start thinking of how to set up a middleware repo.
[14:35] cedricv has joined the channel
[14:36] felixge: jed: why? I'd just make a wiki page that lists all middleware
[14:38] jed: felixge: yeah, that's probably a better idea. i'll set up a wiki page on the (fab) repo.
[14:38] jackyyll: what does process.EventEmitter.call(this); do?
[14:42] Mountain has joined the channel
[14:43] felixge: jackyyll: calls the parent constructor
[14:44] jed: felixge: found it. inadvertently double incrementing: http://github.com/jed/fab/blob/master/lib/core.js#L217-218
[14:44] Mountain: Hi, buddies, I am a newbie for Node.js, I installed the lastest bits, but when I require('url'), it tell me can not find url module. Am I miss something?
[14:45] Mountain: I am using ubuntu
[14:45] ijsthijs: are you sure you make installed it correctly?
[14:46] Mountain: yes, the "make test" gives me 100% result
[14:46] ithinkihaveacat: can you require other modules (e.g. http), or is it just url that's missing?
[14:47] Mountain: yes, require('http') works for me
[14:47] Mountain: hello world passed
[14:48] ijsthijs: and url.js is in your /usr/local/lib/node/libraries/ (if it's installed there) and has the correct rights etc
[14:48] Mountain: thanks, let me check
[14:48] Booster has joined the channel
[14:49] Mountain: strange, it is missing
[14:50] felixge: Added a wiki page for node users: http://wiki.github.com/ry/node/node-users
[14:50] felixge: useful for having a quick overview over the community, especially for new folks in here
[14:50] mediacoder: ACTION added himself
[14:50] felixge: mediacoder: yeah, I saw that - that was fast ;)
[14:50] mediacoder: :-)
[14:52] ijsthijs: anyone can help me with my SIGPIPE error? Because it's not suppose to happen right? (SIGPIPE is suppose to be ignored in node.cc)
[14:53] ijsthijs: I know why it's happening, a http connection is closed (closed event isn't called yet), but I still try to send data to the client
[15:07] binary42 has joined the channel
[15:11] bryanl has joined the channel
[15:18] jed: felixge: fixed and pushed.
[15:19] felixge: jed: fantastic
[15:20] Booster has joined the channel
[15:20] felixge: jed: question, when I merge an app into another one, does it work recursively ?
[15:21] felixge: jed: like I want to define a global '/admin' middleware, and the apps I merge in with '/admin' sub-routes should be affected by it?
[15:22] jed: felixge: merging is just like process.mixin for fabs.
[15:23] jed: lemme think on that for a sec.
[15:24] jed: felixge: i think what you want is to "wrap" fab.handler with your own middleware.
[15:24] felixge: jed: this is what my app looks like: https://gist.github.com/a03fba27c535da72f30f
[15:25] felixge: jed: in my comment.app I want to define some admin actions
[15:25] felixge: jed: is that possible, or will I just end up overwriting the other admin?
[15:26] jed: felixge: in this case, i think admin would overwrite any /admin path in comment.app.
[15:26] jed: it might be better to do it inside-out. define an admin fab, and put that in comment.app instead.
[15:27] felixge: jed: right, but I also have non-admin actions in my comments
[15:27] felixge: jed: So I should probably have two fabs. comment.app and comment.adminApp ?
[15:28] vickaita has joined the channel
[15:28] jed: felixge: right, where comment.app has ( adminApp ) as a "path". does that make sense?
[15:29] jed: you define the admin app once, and add it to any app in which you want it to be available.
[15:29] felixge: jed: oh, I see
[15:29] felixge: jed: let me try that
[15:31] felixge: jed: actually damn, I'm confused about how to organize this
[15:33] Jed_ has joined the channel
[15:36] Jed: felixge: sleepytime in GMT+9. thanks for the test and i'll catch up with you in the morn.
[15:36] felixge: Jed: k, np. I'll see if I get anywhere myself tonight (hopefuly)
[15:36] felixge: :)
[15:52] dnolen has joined the channel
[15:59] paul____ has joined the channel
[16:00] pjb3 has joined the channel
[16:16] omygawshkenas has joined the channel
[16:18] ithinkihaveacat has joined the channel
[16:23] rryan has joined the channel
[16:23] joshbuddy has joined the channel
[16:25] r11t has joined the channel
[16:27] paul____ has joined the channel
[16:29] r11t has joined the channel
[16:38] oz has joined the channel
[16:40] oz: hi, can I get a little help on a build question on freebsd8? I get this one which looks like a Scons error: http://pastie.org/814790
[16:46] oz: nevermind me, the answer was hidden in the ML archives.
[16:46] oz has left the channel
[16:49] rektide: my unit tests are bigger and uglier than the code they test
[16:49] rektide: and all they do is make a couple of sequential http requests
[16:49] rektide: :( mi'sa a sad panda
[16:51] felixge: rektide: people will write really nice unit testing libs :)
[16:52] felixge: rektide: but yeah - for now testing is rather expensive with node
[16:52] gwoo: felixge: what do we need to make that easier?
[16:52] rektide: not sure what to do as an alternative for low level http testing. wget + shell scriptinb? blech!
[16:53] felixge: rektide: try using wrestler
[16:53] unomi: another node instanse?
[16:53] unomi: instance even
[16:53] gwoo: restler looks nice
[16:53] rektide: yes i'm using a second node instance for test scripts
[16:53] felixge: * restler
[16:53] felixge: rektide: http://github.com/danwrong/Restler/
[16:55] brapse has joined the channel
[16:57] rektide: i dont really have an issue with the node's http library, w/r/t writing tests
[16:57] rektide: its a structural complaint
[16:57] rektide: i end up with stupidly deep levels of nested code, as callbacks keep creating new requests
[17:02] felixge: rektide: ah you should be able to avoid that
[17:02] felixge: rektide: unless your requests really rely on order
[17:03] felixge: rektide: in that case I'd write a simple queue function that takes an array with tests to execute
[17:04] _nate_ has joined the channel
[17:06] bpot has joined the channel
[17:08] rryan` has joined the channel
[17:08] sudoer has joined the channel
[17:09] rektide: requests definitely rely on order
[17:09] rektide: a DAG
[17:09] rektide: i could make a DAG to model my tests
[17:09] rektide: as they're not simply linear. sometimes i do need two simultaneous requests.
[17:10] rektide: wonder how hard coroutines are to do in JS
[17:10] ayo has joined the channel
[17:14] ryah_away: rektide: 'in js' is impossible
[17:15] ryah: for js, is hard :)
[17:17] vickaita has joined the channel
[17:17] rektide: good morning ryah
[17:18] paul_ has joined the channel
[17:19] ryah: morning
[17:20] CIA-78: node: 03Ryan Dahl 07net2 * rb6edae5 10/ (lib/net.js src/node_net2.cc): Expose errno exception creation - http://bit.ly/ckxGlS
[17:26] rektide: how can i test if a variable is a an EventEmitter ?
[17:27] aguynamedben has joined the channel
[17:27] ryah: rektide: instanceof ?
[17:29] qFox has joined the channel
[17:30] steadicat has joined the channel
[17:38] bpedro has joined the channel
[17:43] eikke has joined the channel
[17:44] CIA-78: node: 03Ryan Dahl 07master * rd04e16e 10/ (LICENSE tools/js2c.py tools/jsmin.py): Use Google's jsmin.py so that Node can be used for evil - http://bit.ly/9r8zrL
[17:45] rryan has joined the channel
[17:57] creationix has joined the channel
[17:58] stephenlb has joined the channel
[17:59] inimino: ...ah, now there's nothing in the way of my plans
[18:00] scudco has joined the channel
[18:01] kriszyp_ has joined the channel
[18:04] rryan has joined the channel
[18:06] rryan` has joined the channel
[18:07] Netfeed: might be a longshot and i might have dreamed this, but i think i found an implementation for the irc protocol for node.js where you put listners(i think) on different messages, like PRIVMSG and where basically only the connection was really handled, does anyone know what i mean, can't seem to find it now
[18:09] paul_ has joined the channel
[18:14] isaacs has joined the channel
[18:16] rektide: ryah: or, with node.js
[18:16] rektide: dead simple
[18:16] rektide: http://cgit.voodoowarez.com/pipe-layer-js/tree/utility.js
[18:16] rektide: coroutines are at the very end
[18:17] rektide: uh dead cache on my cgit, cleaned, updated now.
[18:17] rektide: also, unit test: http://cgit.voodoowarez.com/pipe-layer-js/tree/tests/utility/coroutine-1.js
[18:19] rektide: oh bother, thats not the term i thought it was
[18:19] kennethk_ has joined the channel
[18:20] isaacs: yay, nested multipart in node!
[18:20] isaacs: ACTION is always so proud to have patches accepted upstream.
[18:23] paul_ has joined the channel
[18:23] rektide: cothread? arg, i cant find the correct term.
[18:25] inimino: rektide: that's a common pattern but I think it's just a group of promises
[18:27] sveimac has joined the channel
[18:28] rektide: the fork/join / bunch-of-threads-running-to-accomplish-one-task idea definitely has some term for the individual threads.
[18:28] inimino: hm...
[18:28] rictic has joined the channel
[18:29] konobi: concurrency?
[18:29] konobi: =0P
[18:30] paulca has joined the channel
[18:32] ryah: rektide: that's not a coroutine - you need the possibility to halt execution and start a new 'coroutine'
[18:32] ryah: requires allocating a new execution stack
[18:32] rektide: yes its not a coroutine at all. i used the wrong term.
[18:33] rektide: still cant recall the correct one.
[18:33] isaacs has joined the channel
[18:33] rektide: my apologies
[18:36] isaacs: ryah: so, why do we use jsmin anyhow?
[18:36] dnolen has joined the channel
[18:39] mikeal has joined the channel
[18:39] ryah: isaacs: to reduce the size of the node binary
[18:40] isaacs: ryah: why not use a compressor that is more aggressive then?
[18:40] mikeal1 has joined the channel
[18:40] isaacs: ryah: though, i suppose closure or yuicompressor would require using java.
[18:41] ryah: isaacs: i mean, i just do what v8 does
[18:41] omygawshkenas: Closure compiler is the best bang-for-your-buck -- marginally better than YUI by 10-ish percent on the scripts I've tried.
[18:41] mikeal1: wow
[18:42] isaacs: omygawshkenas: depends on how you use it
[18:42] mikeal1: my github dashboard is flooded with node-users work :)
[18:42] mikeal1: felixge is rockin that page!
[18:42] omygawshkenas: You mean the ADVANCED_OPTIMIZATIONS?
[18:42] isaacs: yeah
[18:43] isaacs: those advanced optimizations would reduce teh size of node.js by 100% ;)
[18:43] mikeal1: john resig did some tests with all the minification libraries
[18:43] mikeal1: and last i checked closure was the best
[18:43] isaacs: yeah, definitely
[18:43] quirkey has joined the channel
[18:43] mikeal1: it's what jquery is using now
[18:43] isaacs: but the 10% number that gets thrown around a lot is a bit specious.
[18:43] omygawshkenas: Not in the average case.
[18:43] omygawshkenas: What's your experience?
[18:44] isaacs: i maintained yuicompressor for 6 months, and did some testing using closure on the yui library.
[18:44] mikeal has joined the channel
[18:44] omygawshkenas: And what did you discover?
[18:44] isaacs: for most yui 3 code, the advanced optimizations are actually really useful.
[18:44] isaacs: since everything's inside a closure.
[18:44] RayMorgan has joined the channel
[18:45] isaacs: YUI.add("module-name", function (Y) { ... }, options)
[18:45] isaacs: that's usualy the whole fine
[18:45] isaacs: *file
[18:45] isaacs: so, especially if you have code that's only relevant when the debug lines are there, if you compress the non-debug builded code, its quite a bit smaller.
[18:45] isaacs: but even then, except a few exceptional cases, it was only about 5% smaller than yuicompressor.
[18:46] isaacs: it's a game of pennies.
[18:46] omygawshkenas: Right.
[18:46] omygawshkenas: I thought you were serious there for a second.
[18:46] isaacs: and in the gzipped code, that 5% was more like 0-1%
[18:47] isaacs: so, "reduce your code by 10% more than yuicompressor!" is a little bit hype.
[18:47] isaacs: IF you use the advanced optimizations, AND you have a lot of useless uncalled code in your files, then yeah, it'll be huge.
[18:47] isaacs: but, like, don't do that.
[18:47] isaacs: that's stpid
[18:47] mikeal2 has joined the channel
[18:49] mikeal1 has joined the channel
[18:51] omygawshkenas: Let's try...
[18:51] omygawshkenas: It's 5 percent better uncompressed on the site I'm working on.
[18:52] omygawshkenas: 166k Closure instead of 173k YUI
[18:52] omygawshkenas: 4% better after gzip --best
[18:53] omygawshkenas: 52.1k closure vs 53.9k yui
[18:53] omygawshkenas: Were you maintaining the yui compressor itself, or a wrapper library?
[18:53] mikeal has joined the channel
[18:54] konobi: why the hell do you need to compress server-side javascript?? storage is cheap
[18:54] omygawshkenas: yeah, you don't.
[18:55] mikeal: that's why it's all noted as "evil"
[18:55] mikeal: :)
[18:55] isaacs: omygawshkenas: well, the JS portion was written by Julien Lacomte, and I wrote the CSS compression.
[18:55] isaacs: omygawshkenas: but since julien was busy on search, and i was on the yui team, and had the most experience with compressor, i took it over whiel i was there.
[18:56] omygawshkenas: Cool. Cheers for that. Use the CSS compression in production every day.
[18:56] isaacs: omygawshkenas: i never really got to give it the love it deserves, though
[18:56] isaacs: omygawshkenas: that scares me.
[18:56] isaacs: *^_^*
[18:56] isaacs: that CSS compressor is awful.
[18:56] isaacs: i think i'm uniquely qualified to say that.
[18:56] omygawshkenas: Do you think that there's really that much more you can do with CSS?
[18:56] omygawshkenas: Beyond what you've already done?
[18:56] isaacs: it's not that you can compress it more, it's that the css compressor does a lot of things that are fairly unsafe.
[18:56] isaacs: i mean, not "unsafe" as in security-wise
[18:56] omygawshkenas: Anything I should be watching out for?
[18:57] omygawshkenas: I understand, like you can't really parse it safely.
[18:57] isaacs: but like, this breaks, and will always break: a::after { content:"Hello, world" }
[18:57] isaacs: it has no concept of CSS grammar, really.
[18:57] mikeal1 has joined the channel
[18:57] isaacs: so that gets compressed to a::after{content:"Hello,world"} <-- note the missing space between "hello," and "world"
[18:57] omygawshkenas: you might want to document that on this page: http://www.julienlecomte.net/yuicompressor/README
[18:58] omygawshkenas: oh, you're not lexing out the strings.
[18:58] omygawshkenas: gotcha.
[18:58] isaacs: omygawshkenas: the project page is http://yuilibrary.com/projects/yuicompressor/ and has a lot of bugs posted.
[18:58] omygawshkenas: thanks for the link.
[18:58] isaacs: np
[18:58] isaacs: all things yui are on yuilibrary.com
[18:59] isaacs: and it's got some cool tie-ins wiht github and the project. has a nifty code review tool, even
[18:59] omygawshkenas: ha! http://yuilibrary.com/projects/yuicompressor/ticket/2528005
[18:59] isaacs: it's really amazing what an open source project can do when a giant corporation decides to fund it.
[18:59] isaacs: ah, yes, my "use a real parser" bug.
[19:00] omygawshkenas: If it's just strings you need to lex out, you probably don't need a real one.
[19:00] kennethkalmer has joined the channel
[19:00] isaacs: omygawshkenas: no, there are other issues, too
[19:00] omygawshkenas: ok
[19:00] paul_ has joined the channel
[19:00] isaacs: this looks promising, though: http://github.com/nzakas/parser-lib
[19:01] isaacs: he's got a css lexer.
[19:01] isaacs: and, i think, is writing a parser, as well.
[19:02] omygawshkenas: Also, check out zaach's Jison.
[19:02] omygawshkenas: I'm giving it a shot for the CoffeeScript parser -- I'm not sure if it's going to work out yet, but so far so good.
[19:02] ryah: would be nice if it were interruptable
[19:02] omygawshkenas: It's parsing a significant subset of the language at this point (although, that is with a homebrew lexer).
[19:02] eck has joined the channel
[19:03] eck has joined the channel
[19:03] omygawshkenas: ryah: The parsing?
[19:03] ryah: yes
[19:03] ryah: the css parser
[19:03] konobi: "IE hack!?!?!? time to insert some nasty messages to the user... mwuahahaha"
[19:05] isaacs: ryah: what exactly is an interruptable parser versus a non-interruptable parser?
[19:06] creationix: omygawshkenas: I was about to point you to coffepot till I realized who you are
[19:06] omygawshkenas: I need to change this nick.
[19:07] ryah: isaacs: one that parses partial files
[19:07] omygawshkenas: What are you guys' pattern for interruptible loops in JS -- I usually make a work queue and run it in a loop, checking every-so-many iterations to see if the time up has elapsed (or the fixed number of units is done)
[19:07] omygawshkenas: But maybe there's a better way in node.
[19:07] isaacs: oh, like a streaming deal with a state machine that takes data in chunks?
[19:07] ryah: 'files'
[19:07] ryah: yes
[19:07] omygawshkenas: But it's handy in the browser for avoiding slow script warnings when you're doing something really expensive.
[19:08] isaacs: ah, k, i know what that is. yes, it would be better.
[19:08] ryah: it's often times the major road block to building streaming software
[19:08] ryah: the laziness of the parser author - wants you to buffer huge amounts of data
[19:08] ryah: lazyness?
[19:09] ryah: worse is when a protocol wants you to buffer huge amounts of data like amqp :)
[19:10] isaacs: ACTION 's query string parser is lazy, but querystrings should be small
[19:10] creationix: jison is easy to stream to
[19:11] creationix: it ask for tokens one at a time from the token object
[19:12] bryanl has joined the channel
[19:12] ryah: (amqp actually doesn't force buffering - but it's not particularly friendly to streamers)
[19:14] creationix: ryah: I was wondering how amqp compared to something like chord (http://en.wikipedia.org/wiki/Chord_(DHT))?
[19:14] mikeal has joined the channel
[19:16] creationix: I guess AMQP is a lot higher-level (messaging vs finding nodes)
[19:20] mikeal has joined the channel
[19:20] mikeal1 has joined the channel
[19:24] rektide: ryah, is your AMQP work going to be / already-is public ?
[19:24] rektide: i assume its 0.8 and not trying to deal with whatever 0.10 will be ?
[19:24] ryah: rektide: its on github- not usable yet
[19:24] ryah: correct
[19:25] rektide: its hard to write software for specs that dont exist yet. ;)
[19:25] mikeal has joined the channel
[19:26] konobi: ryah: how is progress?
[19:27] mikeal2 has joined the channel
[19:28] mikeal2 has joined the channel
[19:29] mikeal1 has joined the channel
[19:31] ryah: konobi: halted. i hope you didn't do the exchange interface - i just did it?
[19:33] felixge: mikeal1: you mikeal from couch.io?
[19:33] mikeal has joined the channel
[19:33] isaacs: ryah: i'm working right now on talking nicholas into building a streaming interruptible css parser.
[19:33] felixge: mikeal: or you?
[19:33] ryah: isaacs: i really really really want a sax parser in js
[19:34] ryah: isaacs: but a good one
[19:34] isaacs: yep.
[19:34] mikeal2 has joined the channel
[19:34] ryah: not with a bunch of buffer classes and crap - just a loop over the chars, a few callbacks
[19:34] isaacs: yep
[19:34] mikeal2: felixge: what was that, i'm having internet issues today
[19:34] ryah: no regexps
[19:35] ryah: would be great
[19:35] isaacs: no regexps? that really limits the size of teh bites you can take, though
[19:35] felixge: mikeal2: I was wondering if you have a second to update me on couchdb's auth system. I heard about some big changes to that, but those are 0.11.x only right?
[19:36] mikeal2: correct
[19:36] mikeal2: they are in trunk right now
[19:36] creationix: ryah: what kind of parser? General purpose like jison or inimino's peg?
[19:36] mikeal2: basically couchdb OOTB comes with a full auth system that you can enable from Futon
[19:36] mikeal2: and since the user objects are all JSON documents it scales to pretty much any use case
[19:37] felixge: mikeal2: do you know if jan does nightly osx builds by any chance?
[19:37] mikeal2: i'm pretty sure there are nightly mac builds but for normal CouchDB not CouchDBX
[19:37] creationix: how about regexp for the lexer part, but not for higher-level pattern matching?
[19:37] ryah: isaacs: yeah one character resolution
[19:38] ryah: it should parse html too
[19:38] mikeal2: jan____ says that someone else is doing nightlies of CouchDBX
[19:38] ryah: and be less than 500 lines :)
[19:38] isaacs: hahahah
[19:38] ryah: seriously :)
[19:38] felixge: mikeal2: let me see if I can find them. I finished the node.js couch module, just need to get auth checked off
[19:38] isaacs: ryah: that's quite a challenge.
[19:38] joshbuddy has joined the channel
[19:38] joshbuddy has joined the channel
[19:38] mikeal2: felixge: http://couch.lstoll.net/nightly/
[19:38] teemow has joined the channel
[19:38] ryah: isaacs: yeah, it will be poetry
[19:38] isaacs: ACTION wishes he wasn't so easily goaded...
[19:39] felixge: mikeal2: oh sweet
[19:39] felixge: mikeal2: thanks, for that!
[19:39] mikeal2: np
[19:39] felixge: mikeal2: are there any wiki docs on how this all works yet?
[19:39] ryah: someone setup a buildbot
[19:39] konobi: ryah: nah, you didn't push to GH... so i didn't have anything to go on
[19:40] mikeal2: felixge: no proper documentation what so ever, just this screencast http://jchrisa.net/drl/_design/sofa/_show/post/CouchDB-Accounts
[19:40] felixge: mikeal2: that will do. Hm, seems like the nightly build zip files are corrupted for me
[19:41] paulca has joined the channel
[19:43] jcrosby has joined the channel
[19:46] creationix has left the channel
[19:51] tlrobinson_ has joined the channel
[19:53] RayMorgan has joined the channel
[19:54] isaacs: Every time I see "LGTM", my brain parses it as "LBGT"
[19:55] isaacs: And, I think, "That's cool, we're all open and stuff, rainbows and equal rights rah rah rah, but what'd you think of my code change?"
[19:57] stephenlb: heh
[19:59] rednul_ has joined the channel
[20:01] r11t has joined the channel
[20:02] bronson_ has joined the channel
[20:03] sveisvei has joined the channel
[20:04] bronson has joined the channel
[20:07] lvmike has joined the channel
[20:15] cloudhead has joined the channel
[20:15] paul_ has joined the channel
[20:26] inimino: ryah: if someone gives me a PEG for CSS I'll have your streamable CSS parser by the end of the week
[20:27] piranha has joined the channel
[20:30] inimino: (not the HTML bit, but the rest)
[20:36] geelen has joined the channel
[20:54] charlenopires has joined the channel
[20:55] rryan`` has joined the channel
[20:55] joshbuddy has joined the channel
[20:55] joshbuddy has joined the channel
[20:59] felixge: isaacs: what's the current status with setExports?
[20:59] felixge: I'd really love it
[20:59] isaacs: felixge: needs rewrite.
[20:59] isaacs: you can use module.exports for now
[20:59] felixge: isaacs: why is that?
[20:59] isaacs: cuz the require() stuff changed around a bunch.
[20:59] felixge: isaacs: ah, makes sense
[20:59] isaacs: probably not much of a rewrite, just rejiggering.
[20:59] felixge: isaacs: I'll change it around a bit more this week
[21:00] isaacs: it's not very complicated.
[21:00] isaacs: k, lmk when it's stable.
[21:00] geoff_blair has joined the channel
[21:00] isaacs: basically, its just adding a bit of protection around the practice of setting module.exports.
[21:00] isaacs: ohai, geoff_blair!
[21:00] geoff_blair: hey there isaacs!
[21:00] felixge: isaacs: I'll make require() truly sync and then do an awesome async hot reloading patch on top
[21:00] isaacs: felixge: so, re: require.hot.... i got a few concerns.
[21:01] felixge: isaacs: shoot
[21:01] isaacs: what happens if there's a reference to something, and then it reloads?
[21:01] isaacs: does my reference just never get cleaned up?
[21:01] isaacs: seems like it'd be easy to introduce memory leaks if you're not super careful.
[21:01] felixge: isaacs: well, let's say you have a 'user' module with exports.User = function(){}
[21:01] isaacs: right.
[21:01] isaacs: and maybe that's a constructor that has references to a private UserCache object in the module.
[21:02] felixge: isaacs: if you replace the 'user' variable in the local scope with a new version (after a reload), the existing instances of User will be totally unaffected
[21:02] felixge: isaacs: but any "new" Users will use the new version
[21:02] isaacs: right, and their references to user.UserCache will stick around, preventing it from getting gc'ed
[21:02] felixge: isaacs: if the old objects never disappear, you are leaking memory with each reload
[21:02] isaacs: rght
[21:02] isaacs: k, so yeah, you're basically just gonna have to be super careful about that if you use it.
[21:02] isaacs: that's a fair answer.
[21:02] felixge: isaacs: once the last "old" version of a User prototype disappears, v8 should GC the constructor
[21:02] felixge: if not - it's a v8 bug
[21:03] isaacs: oh, v8's gc is very good, i'm not worried about that.
[21:03] isaacs: but yeah, you gotta make sure not to have inter-module references laying about if you'er gonna be reloading.
[21:03] felixge: isaacs: yeah, but I'm not really any worried about this
[21:03] isaacs: right, depends on your use case.
[21:03] felixge: because you only leak memory a single time on reloading the code
[21:03] felixge: which is very very likely to be < 500kb
[21:04] isaacs: well, if your module is a a ctor, and youer' creating objects, then those objects refer to __proto__, which points to Foo.prototype, which has a constructor pointing back at Foo, so effectively, the whole module stays in memory until all the instances are gone.
[21:04] felixge: which I think is acceptable as you can do 1000+ reloads on a new machine without taking the system down
[21:04] isaacs: right.
[21:04] felixge: if you need more than that - well write good code
[21:04] isaacs: hehe
[21:04] isaacs: or use somehting other than require.hot
[21:04] isaacs: like child processes that get restarted when the file changes.
[21:05] felixge: well, creating circular dependencies is not a good idea to begin with
[21:05] felixge: so you shouldn't do it
[21:05] felixge: ;)
[21:05] felixge: isaacs: I think web workers will be quite an alternative to hot reloading
[21:05] isaacs: circular deps are pretty common.
[21:05] isaacs: http://github.com/isaacs/node-supervisor works, too
[21:06] geelen has joined the channel
[21:06] felixge: isaacs: but they will require a little more coding (you have to phase out old workers and launch new ones)
[21:06] isaacs: or monit or something
[21:06] isaacs: right
[21:06] isaacs: node-supervisor is just "stop and restart this program any time this code changes"
[21:06] felixge: isaacs: ah, that's nice
[21:06] felixge: yeah most apps will be totally fine with it
[21:06] isaacs: i've been using it for testing servers and stuff.
[21:06] felixge: any regular web app will
[21:06] isaacs: it's not very awesome, though
[21:06] felixge: no, but it's "good enough"
[21:07] isaacs: right
[21:07] felixge: and requires no special coding
[21:07] isaacs: i'd like to beef it up a bit, but at a certain point, it makes more sense to just use monit scripts.
[21:07] isaacs: at least, for production.
[21:07] isaacs: just sucks cuz monit != javascript :)
[21:07] felixge: isaacs: hehe, yeah
[21:08] felixge: I think node will be ├╝ber-awesome for writing monitoring tools
[21:08] felixge: a few more *nix bindings I'd say
[21:08] felixge: but it's already very ncie
[21:08] felixge: * nice
[21:09] rtomayko has joined the channel
[21:10] felixge: isaacs: anyway, I think the hot reloading I'm proposing is the best we can do without deeply hacking v8 and I think it's actually gonna be nice because it's pretty simple as a concept
[21:11] piranha has joined the channel
[21:18] sveimac has joined the channel
[21:19] sveimac has joined the channel
[21:21] piranha has joined the channel
[21:26] ryah: felixge: i'm not convinced by it
[21:26] ryah: felixge: i think we should wait for multi-process workers
[21:27] felixge: ryah: those are an alternative, but with different advantages / disadvantages. I'd rather have both options
[21:27] felixge: ryah: what is if you want to stay in a single process? No hot code reloading for you?
[21:27] felixge: ryah: or if you need the "state" of the worker to remain but update the code logic?
[21:28] felixge: ryah: I think we need workers & hot code reloading. And really it's not a big deal as all it does is load a module with fresh cache. Very easy with the patch you merged now
[21:29] rektide: is there a "SAX for JSON" type spec?
[21:29] rektide: a json parser that streams
[21:32] Tim_Smart has joined the channel
[21:34] felixge: ryah: what ya think?
[21:36] ryah: rektide: there is this http://lloyd.github.com/yajl/
[21:36] ryah: rektide: but it seems pretty heavy
[21:36] ryah: felixge: shrug
[21:36] ryah: felixge: the local cache is in there - the rest can be an external module now, right?
[21:37] felixge: ryah: Maybe you shouldn't think about it as "hot code reloading" but loading a module and it's children without cache.
[21:37] felixge: ryah: no, can't be an external module without further refactoring the code
[21:37] ryah: felixge: then why don't we just provide a way to do non-cached require() for the whole process?
[21:38] felixge: ryah: what do you mean with the entire process?
[21:38] ryah: require.cache = false
[21:38] ryah: require('blah')
[21:39] ryah: or NODE_NO_REQUIRE_CACHE=1 ./node blah
[21:39] felixge: ryah: oh, that's bad. It will encourage people to use require() within request/response cycles
[21:39] felixge: the sync require that is
[21:39] felixge: also, I don't want to disable the cache completely
[21:39] felixge: I just want to disable it for a single require.async() call\\
[21:40] felixge: require.uncachedAsync()
[21:40] felixge: so to speak
[21:40] felixge: I'm just calling it require.hot() because that sounds nice :)
[21:41] geelen has joined the channel
[21:41] felixge: ryah: I'm pretty convinced by it looking at our options. Everything else seems much less elegant / easy to integrate
[21:42] ryah: meh.
[21:43] inimino: I implemented something quite similar without using require at all
[21:43] inimino: just eval()
[21:43] ryah: ^-- meh was not refering to modules, felix. to something else :)
[21:43] felixge: ryah: :)
[21:43] felixge: ryah: you gave little context
[21:44] felixge: ryah: anyway, I'm kinda of thinking: Lets do this for now, and if we should stumble upon a better way to do it in the future, let's remove the bad way. But until then this should be a 5-10 line patch well worth the effort
[21:44] inimino: *plain-looking bird flies by ryah's window* meh.
[21:44] pdelgallego has joined the channel
[21:45] hober has joined the channel
[21:45] inimino: felixge: what's the patch do?
[21:46] ryah: i think i'm going to force update the master branch
[21:46] felixge: inimino: adds a require.hot() function which is the same as require.async() but disregards any module cache so you get a fresh version
[21:46] felixge: ryah: why?
[21:46] ryah: i want to revert back isaacs merge
[21:46] rektide: debugging eval() hurts. compile() is better, but compile doesnt have compile(source,globalContext,sourceOrigin).
[21:46] isaacs: huh?
[21:46] inimino: felixge: oh, you just want require.hot in core node?
[21:46] isaacs: which merge?
[21:46] felixge: inimino: yeah, it's not doable as a module right now without huge overhead
[21:47] inimino: felixge: I thought you were doing hot reloading in a module and needed a patch to node to support it
[21:47] ryah: isaacs: the multipart one - it's got some other commits in there - touching the deps/http-parser for example
[21:47] isaacs: oh, right.
[21:47] ryah: deps/http_parser/http_parser.c | 6 + doc/api.txt | 186 +++++++--- lib/multipart.js | 552 +++++++++++++++++++-------- test/mjsunit/fixtures/multipart.js | 732 +++++++++++++++++++++++++++++++++++- test/mjsunit/test-multipart.js | 218 ++++++------ 5 files changed, 1353 insertions(+), 341 deletions(-)
[21:47] isaacs: that wasn't supposed to be in there... whoops
[21:47] isaacs: just a comment.
[21:48] ryah: plus a million merge commits :)
[21:48] felixge: ryah: I hope you'll not discard the patch entirely and just fix it. I kinda like the new multipart ;)
[21:48] mikeal has joined the channel
[21:48] isaacs: million merge commits?
[21:48] isaacs: oh, right
[21:48] isaacs: "merged branch ry/master into master"
[21:49] ryah: i'm going to merge it - i just want to do it with cherry-pick instead
[21:49] felixge: isaacs: yeah, I personally prefer git pull --rebase when building on somebody elses work
[21:49] isaacs: felixge: good idea.
[21:49] felixge: isaacs: makes a much nicer history and I also find conflict resolution easier with rebase than with merge
[21:49] ryah: not much has changed, so hopefully it won't mess up anyway
[21:49] isaacs: i usually fetch-and-merge
[21:49] ryah: s/anyway/anyone
[21:49] felixge: isaacs: I have 'git pull --rebase' aliased as 'git up' locally
[21:49] isaacs: my master should be about 100% identical to yours, ryah
[21:49] geelen has left the channel
[21:49] isaacs: (except for that comment in http_parser.c
[21:50] CIA-78: node: 03Ryan Dahl 07master * r4234ac5 10/ (LICENSE tools/js2c.py tools/jsmin.py): Use Google's jsmin.py so that Node can be used for evil - http://bit.ly/9KJwJR
[21:51] isaacs: ryah: you should read that comment, though
[21:51] isaacs: http_parser doens't handle wrapped headers well.
[21:51] isaacs: s/well/at all/
[21:51] felixge: btw. I like that node can be used for evil now : )
[21:51] piranha has joined the channel
[21:51] isaacs: yes, it will make my schemes much more effective that i don't have to use synchronous IO.
[21:52] isaacs: before, i had to write all my evil code in Java and Lisp.
[21:52] felixge: isaacs: we should build a botnet using node, it would be the most dangerous botnet out there :)
[21:54] ryah: isaacs: ok
[21:55] ryah: isaacs: just these 3 commits? for the multipart?
[21:55] ryah: f99bfdecceaa1e106d2691e1c8bbafe14e1758e2, b31975c0b41cafd8f1b7f5c29b338b61b0820062, f7e3e42e34e569350e370de60cb4f6111a95ebae
[21:55] isaacs: yeah
[21:56] isaacs: those are them
[21:57] ryah: okay
[21:58] mediacoder: ryah: i see you tweeting more often recently.. im in control of @nodejs but actually a lazy twitterer.. or know anyone else interested in tweeting "official" node stuff? :-)
[21:59] mediacoder: lol..forgot the first half: you want control? ..or.. know anyone else
[22:00] micheil: mediacoder: I could when I find it
[22:00] mediacoder: find what? :-)
[22:01] mediacoder: its twitter.com :-P
[22:01] ryah: mediacoder: mm.. no? :)
[22:01] micheil: no, when I find info or stuff that might be interesting & related
[22:01] konobi: mediacoder: yeah, probably best to hand to ryah
[22:02] ryah: mediacoder: you're good at the brand organization :)
[22:02] konobi: ryah: good for announcing new release, interesting examples, good blog posts, etc.
[22:02] rtomayko has joined the channel
[22:02] ryah: mediacoder, for those who don't know designed the logo and registered the domain too
[22:02] mediacoder: hehe, im just lucky witht he domainname and twitter account :-P but actually very lazy/bad at blogging/tweeting
[22:02] ryah: konobi: yeah i guess. mediacoder sure i'll take the twitter account
[22:03] mediacoder: ah.yea i can give ou the eps/vectorstuff if you want
[22:03] mediacoder: (of the logo)
[22:03] micheil: ryah / mediacoder: we could also hook it into howtonode.org
[22:03] mediacoder: ryah: ill email you the info along with the vektor thingy
[22:03] konobi: ryah: got an accelerator for hosting node related stuff? (ie: website, buildbot, etc)
[22:04] CIA-78: node: 03isaacs 07master * r3adcdfc 10/ (4 files in 4 dirs): (log message trimmed)
[22:04] CIA-78: node: A rewrite of multipart library.
[22:04] CIA-78: node: 1. Support streaming in the simple case. Put huge warnings around the
[22:04] CIA-78: node: buffering API.
[22:04] CIA-78: node: 2. Support nested multipart messages.
[22:04] CIA-78: node: 3. Support various kinds of multipart messages, including all the various
[22:04] CIA-78: node: absurdities of multipart email messages.
[22:04] mediacoder: micheil: ill hand over the data to ryah first..he should decide who /how to use it
[22:04] micheil: righteo
[22:04] ryah: konobi: i was talking to mark around it on friday - he was going to set me up with two
[22:04] micheil: at any rate, I'm off, bye
[22:04] ryah: konobi: i could use the buildbot one soon :)
[22:05] konobi: ryah, you can also hit up pedro i think
[22:05] ryah: okay
[22:05] konobi: mark is likely to be busier than pedro =0)
[22:06] ryah: mediacoder: thanks
[22:06] ryah: the build bot is going to be awesome
[22:06] ryah: i really want it to do benchmarks too at some point
[22:07] felixge: ryah: like v8's benchmarks? Those are sweet :)
[22:10] ryah: yeah
[22:10] onar has joined the channel
[22:11] ryah: http://build.chromium.org/buildbot/perf/dashboard/overview.html
[22:11] ryah: so awesome
[22:12] iamlistening has joined the channel
[22:14] stephenlb: woh cool
[22:14] ryah: it would be so great to have that
[22:15] ryah: i started working on some benchmarks for such a thing with 'make benchmark'
[22:15] stephenlb: nice
[22:16] mikeal: i'm building something kinda like this for CouchDB
[22:18] ryah: isaacs: that http-parser problem
[22:18] ryah: isaacs: do you have an example request?
[22:18] isaacs: sure, just a sec...
[22:21] iamlistening has joined the channel
[22:21] ryah: isaacs: if you want, you can add it to http://github.com/ry/http-parser/blob/1b30bf4ba56a8a9081ed092b46330a59fee652aa/test.c#L78-103
[22:22] ryah: ^-- that's an example of how it should look
[22:22] ryah: i'm always happy to have strange http requests
[22:22] isaacs: oh, ok
[22:22] isaacs: great.
[22:23] isaacs: here's the test case i had: http://gist.github.com/298653
[22:23] isaacs: note the whitespace at teh start of the second line.
[22:23] isaacs: \r\n And so: is this"
[22:24] isaacs: so, X-Multiline should end up being just one line, with the \r\n and any whitespace compressed to a single space.
[22:25] ijsthijs has joined the channel
[22:26] nodejs_v8 has joined the channel
[22:28] jed_ has joined the channel
[22:28] felixge has joined the channel
[22:28] felixge has joined the channel
[22:30] RayMorgan_ has joined the channel
[22:31] ijsthijs: There is a little mistake in the docs; process.argv, it should be ARGV
[22:37] mikeal: ijsthijs: that was changed in the last release
[22:37] mikeal: the docs track the latest release
[22:38] fictorial has joined the channel
[22:38] ijsthijs: ok
[22:44] jed_: felixge, i've added myself three times to node-users, and been deleted every time. was it something i said?
[22:44] felixge: jed_: I had nothing todo with it
[22:44] felixge: maybe people editing at the same time
[22:45] mikeal: yeah, i don't think the github wiki is good about resolving conflicts
[22:47] jed_: felixge: (okay, i was kidding... so many folks on node these days it was bound to happen... i think i'll wait until it calms down.)
[22:47] jed_: you'd think they'd use a git-based wiki.
[22:47] felixge: heh
[22:47] felixge: well I think they are pretty overwhelemed with just keeping the site up
[22:50] rryan``` has joined the channel
[22:51] iamlistening has joined the channel
[22:53] Connorhd_ has joined the channel
[22:57] isaacs: what's node-users?
[22:58] isaacs: i'm a node-user
[22:58] jed_: http://wiki.github.com/ry/node/node-users
[22:58] jed_: felixge set it up a bit ago.
[23:02] Tim_Smart has joined the channel
[23:06] onar has joined the channel
[23:08] rtomayko has joined the channel
[23:10] hassox has joined the channel
[23:11] onar has joined the channel
[23:11] ryah: isaacs: how do you tell when a new header line starts?
[23:11] isaacs: \r\n[^\s]
[23:12] ryah: hm
[23:12] isaacs: any amount of whitespace after \r\n should be ignored.
[23:12] isaacs: and considered a wrap
[23:12] isaacs: yeah, stupid, right?
[23:13] isaacs: apparently they figured that you'd be typing these requests into old timey terminals or something.
[23:13] isaacs: message lines aren't supposed to be longer than 80 chars.
[23:13] isaacs: (or maybe it was 92, not sure)
[23:14] ryah: do you have an real life examples of this?
[23:17] ryah: oh i see where it's stated in http rfc
[23:17] iamlistening has joined the channel
[23:18] iamlistening has joined the channel
[23:19] eikke has joined the channel
[23:22] teemow has joined the channel
[23:26] iamlistening has joined the channel
[23:28] inimino: it's inherited from MIME
[23:29] inimino: (where it is widely used)
[23:30] konobi: ryah: RFC2822
[23:30] rtomayko_ has joined the channel
[23:30] konobi: (which is the pre-cursor to the http spec)
[23:32] tlrobinson_ has joined the channel
[23:32] isaacs_mobile has joined the channel
[23:34] rtomayko has joined the channel
[23:34] isaacs_mobile: Ryah: not sure how common it is in http, but other sorts of internet messages do it all the time
[23:34] isaacs_mobile: Ie, email
[23:35] kriszyp has joined the channel
[23:36] ryah: i think not very common
[23:36] RayMorgan has joined the channel
[23:36] ryah: but we should support it
[23:39] rtomayko_ has joined the channel
[23:39] konobi: ryah: rfc 2822
[23:39] rtomayko has joined the channel
[23:39] konobi: smtp, http, etc... they're all built on top of 2822
[23:41] mikeal has joined the channel
[23:48] isaacs_mobile: Think it makes sense to abstract out the rfc 2822 header parsing into one place? There's dupe code in http and multipart now.
[23:53] joshbuddy has joined the channel
[23:55] mikeal: is there a way to use require() with a string of code for eval?