[00:02] herbySk: is there object/array that holds its properties weakly by default in v8? [00:02] herbySk: (as a construct, not specific instance) [00:06] tmpvar has joined the channel [00:07] mjr_: Now is the time for the drinking of beer. [00:08] atmos has joined the channel [00:10] JimBastard has joined the channel [00:17] creationix has joined the channel [00:18] creationix_ has joined the channel [00:21] ditesh|cassini has joined the channel [00:21] confounds has joined the channel [00:22] tmpvar has joined the channel [00:36] KungFuHamster: I wrote a simple tcp socket server script that worked fine under 0.1.33 but now under 0.1.92 I'm getting "Error: idle timeout" @ Timer.callback (net:150:27) and a crash when I get a normal, expected timeout from an idle client... any ideas? [00:38] rtomayko has joined the channel [00:41] _ry: KungFuHamster: try listening for 'error [00:41] _ry: 'error' [00:42] joshr: rad [00:42] joshr: http://github.com/joshrotenberg/node-gearman [00:42] joshr: my really rough first crack at an addon [00:44] KungFuHamster: I do have an addListener set up for 'error' [00:44] derbumi has joined the channel [00:53] sh1mmer has joined the channel [00:54] JimBastard has joined the channel [00:54] JimBastard: does anyone know of any good services that will rent you IP addresses through an API? [00:55] inimino: JimBastard: how would they get routed? [00:55] JimBastard: that would have to be part of the API i would [00:55] KungFuHamster: basically a VPN [00:55] atmos: JimBastard: like aws elastic ips ? [00:56] JimBastard: yeah [00:56] JimBastard: except EC2 limits one per instance [00:56] JimBastard: ? [00:56] atmos: yup :\ [00:56] JimBastard: yeah, inimino routing is the easy part im on that [00:56] inimino: isaacs: Dan Ingalls actually commented on my whitespace post, apparently he uses a similar style in Smalltalk: http://inimino.org/~inimino/blog/javascript_whitespace [00:56] JimBastard: its getting the actual IP [00:57] inimino: JimBastard: I'm not following... [00:57] JimBastard: sorry its a small piece in a fairly complex problem [00:57] inimino: oh [00:57] tmpvar has joined the channel [00:57] softdrink has joined the channel [00:57] JimBastard: tmpvar and i are trying to figure it out [00:58] inimino: so you already have IP addresses and you're just trying to allocated them? [00:58] atmos: JimBastard: we did something like that where i work, but we managed our ownboxes [00:58] inimino: s/ed/e [00:58] JimBastard: no, i may need IP addresses [00:58] JimBastard: and when i need a new one, i gotta request it in real-time [00:58] isaacs: inimino: nice [00:59] sh1mmer has joined the channel [01:00] inimino: isaacs: yeah, I was happy :) [01:00] JimBastard: i think the only solution here is for me to buy a huge block of IPs [01:00] JimBastard: fuck [01:00] JimBastard: its either that or re-write tcpip [01:00] inimino: JimBastard: so it'd have to be something your upstream provider offers? [01:00] inimino: heh [01:00] JimBastard: yeah i think so [01:00] isaacs: inimino: if we had a cli tool to reformat javascript, it woudln't matter there, either. [01:01] inimino: yeah, you either need a block of IPs or a provider that can allocated them to you in real time, which I've never heard of but maybe exists [01:01] atmos: we used to do that in C, it sucked [01:01] isaacs: you could even have one type of formatting that's optimized for diffs, another that's optimized for editing, and another that's compressed for delivery to web browsers. [01:01] inimino: isaacs: yeah [01:01] atmos: i really like how rubyists generally agree and you don't need tools like that [01:01] isaacs: atmos: rubyists agree? [01:01] atmos: it's kinda tough to parse ruby though [01:02] JimBastard: i found a solution that does that inimino but its max'd out at 13 minutes [01:02] JimBastard: atmos you are at the yard right? [01:02] JimBastard: you guys must have bulk purchases a block of IPs? [01:02] JimBastard: purchased* [01:03] inimino: leased :P [01:03] JimBastard: aye [01:04] inimino: isaacs: btw I simplified the API a bit and updated that page [01:04] isaacs: nat [01:04] Yuffster has joined the channel [01:04] isaacs: neat [01:05] inimino: and I also made a CommonJS module for the ES5 parser but not the other dependency yet [01:05] isaacs: still too much recursion in ffx [01:05] inimino: that is really weird [01:05] inimino: I wish I could reproduce that [01:05] JimBastard: TOO MUCH RECURSION [01:05] JimBastard: whats the link [01:05] JimBastard: im good at finding those [01:05] inimino: heh [01:05] inimino: good luck ;) [01:05] inimino: JimBastard: http://boshi.inimino.org/3box/PanPG/js_pp/js_pp.3box [01:06] inimino: I think it's coming from the parser since it was from an eval() call [01:06] noonat: maximum call stack error in chrome too [01:06] inimino: but I can't reproduce it here so who knows [01:06] inimino: whoah, really? [01:06] isaacs: inimino: also, i have absolutely zero idea how to actually do anything whatsoever with this thing. [01:06] atmos: JimBastard: yeah we bought a bunch of ips at once [01:06] JimBastard: woah thats a lot of code inimino [01:06] inimino: ACTION fires up chrome [01:06] isaacs: i see code on green, code on blue, a few dropdowns, and some numbers [01:07] inimino: isaacs: you just edit the code in the green [01:07] isaacs: inimino: yeah. nothing happens when i do that [01:07] inimino: the dropdown on the left is a file selector [01:07] inimino: everything else you can ignore [01:07] inimino: the output on the blue should change, if it's not changing then something's wrong [01:08] inimino: hm... it works for me in Chrome too [01:08] inimino: :( [01:08] isaacs: it only changes when i press enter, and then only if i do something that makes an error or deletes the entire thing. [01:08] JimBastard: inimino: maybe a slower computer? [01:08] inimino: why does this only work here? [01:08] JimBastard: do you have a beefy machine? [01:09] isaacs: inimino: not knowing how it works, i'm not sure. [01:09] inimino: JimBastard: not really beefy, it's pretty old I think [01:09] JimBastard: hrmm [01:09] inimino: I guess I just need to find a computer on which it doesn't work [01:10] isaacs: ok, i've got it changing when i change stuff now... [01:10] inimino: I see 'foo' [01:10] inimino: cool [01:13] inimino: isaacs: there's nothing in the children because you haven't added the rules to return anything from the child nodes yet [01:13] isaacs: i see [01:13] JimBastard: ugh i hate impossible CS problems [01:13] inimino: JimBastard: I love those :) [01:14] JimBastard: that can only be solved with money or rebuilding tcpip [01:14] JimBastard: fuuuuuck [01:14] inimino: ok, not that kind [01:14] isaacs: inimino: i don't mean to be too critical. i can see enough of what it's doing to know that it's probably cool and close to being jstidy, and i'm very grateful that you're deciding to be interested in this problem. but i'm a bit frustrated because it is clearly still not digestible by me in its current state. [01:14] ssteinerX has joined the channel [01:14] inimino: isaacs: alright, I thought the comments would be sufficient but I wasn't sure... [01:15] isaacs: inimino: i think the fact that the web-based thingie isn't working for me is kind of adding some friction. [01:15] isaacs: a commonjs module is easier to wrap my brain around. [01:15] inimino: isaacs: yeah, no doubt, sorry about the issues with that [01:15] isaacs: don't sweat it [01:15] isaacs: the web is made of fail. i'm used to it, i've lived herer for a while :) [01:16] inimino: hehe [01:16] isaacs: it's proof that if you have open and you ahve distributed, you don't need anything else to be very good. [01:16] inimino: I haven't done a lot of testing of this, and it doesn't really have a UI yet, so ... [01:16] inimino: thanks for trying it, anyway [01:17] inimino: I will probably have a commonjs version working tomorrow or so and I'll make sure the parser works in V8 too [01:19] brapse has joined the channel [01:19] ncb000gt has left the channel [01:21] CIA-75: node: 03Ryan Dahl 07master * rf618551 10/ (3 files in 3 dirs): Remove callback argument to FileWriteStream.prototype.write - http://bit.ly/8X7707 [01:21] CIA-75: node: 03Felix Geisendörfer 07master * r76f98c2 10/ (6 files in 4 dirs): Get rid of coupling for stdout - http://bit.ly/dmbXgA [01:21] CIA-75: node: 03Felix Geisendörfer 07master * rf2212fa 10/ lib/fs.js : Support for FileReadStream.setEncoding - http://bit.ly/9u0CLG [01:21] CIA-75: node: 03Felix Geisendörfer 07master * rc143cba 10/ (4 files in 3 dirs): Get rid of coupling for stdin - http://bit.ly/b2ISbH [01:21] CIA-75: node: 03Felix Geisendörfer 07master * r2035612 10/ (5 files in 2 dirs): Remove coupling dep - http://bit.ly/9pQlyf [01:22] _ry: 14 files changed, 127 insertions(+), 638 deletions(-) [01:25] JimBastard: so does anyone know whats up with leasing blocks of IP addresses? is this something i should be discussing with my potential hosting provider? [01:25] inimino: JimBastard: yes [01:26] JimBastard: was that yes to the first or second question :p [01:26] inimino: both :P [01:26] JimBastard: ugh i gotta start making phone calls [01:26] CodeOfficer has joined the channel [01:28] RayMorgan has joined the channel [01:29] RayMorgan has joined the channel [01:32] wycc has joined the channel [01:39] lifo_ has joined the channel [01:42] JimBastard: so does anyone know any hosting companies that offer bulk ip leasing? :-( [01:42] JimBastard: ACTION on the phone with rackspace now [01:43] inimino: JimBastard: any host or colo provider will give you as many IPs as you need as long as you can justify why you need them and pay for them [01:44] JimBastard: word up [01:44] inimino: JimBastard: but you have to have a good reason because ARIN will want to see it when your provider get the IPs [01:44] JimBastard: aye [01:44] JimBastard: thats what im being told [01:44] JimBastard: so the question is, who is the best and cheapest >.< [01:44] inimino: since we are running out of them and all [01:44] inimino: rackspace probably isn't the cheapest [01:44] JimBastard: i would think not [01:45] JimBastard: but they have the best support [01:45] JimBastard: so im milking that for info atm [01:45] JimBastard: it helps when they bring up my name in the computer and im listed as the tech contact on like 6 seperate accounts >.< [01:45] inimino: heh [01:49] _ry: what would it mean to do ip leasing? [01:52] JimBastard: ARIN! [01:55] CIA-75: node: 03Ryan Dahl 07master * r5aea12b 10/ src/node.js : stdout should be writable only - http://bit.ly/b425AC [01:55] CIA-75: node: 03Ryan Dahl 07master * re7a1fa1 10/ (doc/api.markdown lib/fs.js src/node.js): fs.FileWriteStream -> fs.WriteStream, fs.FileReadStream -> fs.ReadStream - http://bit.ly/bdXb4h [01:56] mikeal has joined the channel [02:03] _ry: mape: http://wiki.github.com/ry/node/library-compatibility your link isn't to a specific version [02:06] JimBastard has joined the channel [02:06] charlesjolley has joined the channel [02:07] _ry: mape: nevermind, i updated it [02:08] creationix has joined the channel [02:08] uberjar has joined the channel [02:13] keeto has joined the channel [02:14] herbySk: _ry: EPIPES are away! How you did it? Great! [02:15] WALoeIII has joined the channel [02:21] brianmario has joined the channel [02:21] RayMorgan_ has joined the channel [02:30] sh1mmer has joined the channel [02:31] mjijackson has joined the channel [02:36] micheil has joined the channel [02:39] JimBastard: can i not dump sys.puts(JSON.stringify(req)); ? [02:39] JimBastard: the request [02:39] JimBastard: its giving me circular refs, maybe this was patched? [02:41] jherdman has joined the channel [02:53] charlesjolley has joined the channel [02:54] JimBastard_ has joined the channel [02:55] noonat: JimBastard_: Yeah, there are a bunch of circular refs in the socket on the request [02:56] noonat: the watchers point back to their sockets [02:56] inimino: JimBastard: use sys.inspect instead [02:56] inimino: (if it's for debugging) [03:03] JimBastard_: 10-4 [03:03] JimBastard_: thanks [03:03] JimBastard_: im a bit spoiled on debug.log [03:03] JimBastard_: i should probaly add that to this project [03:07] colin__ has joined the channel [03:08] colin__ has left the channel [03:09] colin__ has joined the channel [03:09] colin__ has left the channel [03:09] colin__ has joined the channel [03:11] markwubben has joined the channel [03:11] mikeal has joined the channel [03:11] herbySk: kriskowal: I made some changes in herby/node/minimal, hope you will like them. Also rebase to the newest ry/node/master. --boot works nicely for me. [03:11] herbySk: _ry: If you feel as adopting micro/full separation of which we talked appx week ago and you said 'ok if it will be identical', the set of 5 patches rebased to latest master are ready at http://github.com/herby/node/commits/minimal. This effectively removes need for (full) module system from node core and leaves possibility to plug one. isaacs' new proposal is also rebased in another branch of mine, so minmal won't create more work for him. [03:14] Aria has joined the channel [03:17] keeto has joined the channel [03:20] eyzn has left the channel [03:21] gwoo has joined the channel [03:21] PyroPete1 has joined the channel [03:23] colin__: Hello, I've just begun working with node and have got the examples running locally, however I am having a problem with concurrent connections. I'm hoping someone would be kind enough to point me in the right direction [03:25] colin__: When i'm doing long polling and add an additional connection, i get: Error: EADDRINUSE, Address already in use and server dies [03:27] JimBastard_: sup colin__ [03:27] colin__: Hey JIm [03:27] JimBastard_: are you trying to create the http server multiple times? can you show us your code? [03:27] hassox has joined the channel [03:28] colin__: yeah [03:29] JimBastard_: node can defintely handle what you are talking about, probaly just got the code wrong [03:31] eyzn has joined the channel [03:31] colin__: Jim, do you mind if i paste the code here - its about 20 lines? [03:31] KungFuHamster: use a pastebin [03:31] micheil: colin__: pastie.org or gist.github.com it [03:32] colin__: ok, will do thanks [03:32] deanlandolt: colin__: since we're talking about irc ettiquette you should probably know to not just say Jim but call him out by his full bastardly name so that it pings him in his irc client :) [03:33] KungFuHamster: most IRC clients will let you use tab-completion for names, too, so it ends up being easier most of the time [03:33] colin__: ok haha, thank you deanlandolt [03:35] colin__: http://pastie.org/938541 [03:35] Yuffster has joined the channel [03:37] colin__: JimBastard_: So, i'm making an long-poll to a url which calls that get function, which is setting up a tcp server and client [03:37] deanlandolt: colin__: what's w/ the setTimeout on setupTCP? once should be enough -- any more would explain EADDRINUSE [03:38] JimBastard_: o.O [03:38] tmpvar has joined the channel [03:38] JimBastard_: i mean [03:38] JimBastard_: everytime you run get its going to create a new http server? [03:38] JimBastard_: http://pastie.org/938541 [03:39] saikat has joined the channel [03:39] colin__: deanlandolt: I was getting an error, sometimes, while trying to set up the tcp server, before my http server response closed [03:39] deanlandolt: you should probably establish /one/ server if you can help it [03:39] deanlandolt: and if you need more than one, you need to use different ports [03:39] colin__: i thought maybe race conditions [03:39] JimBastard_: i think we might have major fail here [03:40] JimBastard_: ACTION puts on the fail helmet [03:40] JimBastard_: okay [03:40] JimBastard_: lets fix this [03:40] colin__: haha [03:40] colin__: thanks JIm [03:40] JimBastard_: 1. state what you are trying to do [03:40] JimBastard_: ? [03:40] tmpvar: JimBastard_, really.. you might need a helmet [03:40] colin__: Maybe I should show you the other part as well [03:40] deanlandolt: 1a. state what exports.get does [03:40] ryan[WIN]: ok i am having an issue with querystring.parse() [03:40] colin__: i wouldn't doubt that [03:40] JimBastard_: nono, lets start har [03:41] colin__: ok - let me try to explain - keep in mind this is my first venture into ssjs [03:41] ryan[WIN]: http://pastebin.com/J5Rae0CJ [03:41] ryan[WIN]: ^^ error message i'm getting when i put a valid query string into querystring.parse() [03:42] noonat: ryan[WIN]: pastie the code that's calling it [03:42] ryan[WIN]: http://pastebin.com/B5gL1XA1 [03:42] ryan[WIN]: ^^ there [03:42] JimBastard_: colin__ why are you trying to create multiple tcp servers on port 8001 [03:42] colin__: JimBastard_: I'm not intentionally [03:43] ryan[WIN]: line 9 is where it f's up noonat [03:43] JimBastard_: how many times are you calling get? [03:43] deanlandolt: colin__: what does your get function do? [03:43] JimBastard_: indexController.get [03:43] deanlandolt: as in: is it called on every request? [03:43] colin__: my get function is called via ajax and creates a tcp server and client [03:43] JimBastard_: why? [03:43] colin__: and the client starts writing to the server [03:44] JimBastard_: are you trying to do some ajax longpolling? [03:44] deanlandolt: colin__: well what you're doing is /creating/ a server on every request -- a server that you've already created [03:44] deanlandolt: hence the address-in-use error [03:44] colin__: yes I'm trying to do ajax longpolling [03:44] JimBastard_: yeah dude [03:44] JimBastard_: you making this way too hard [03:44] JimBastard_: like seriously [03:44] noonat: ryan[WIN]: data is a buffer in the new node stuff [03:45] colin__: how can i simplify [03:45] ryan[WIN]: ok [03:45] noonat: ryan[WIN]: POSTDATA = POST.toString(); [03:45] JimBastard_: just create the httpServer once, give it a request handler [03:45] deanlandolt: colin__: listen to JimBastard_ -- he makes everything look easy :) [03:45] ryan[WIN]: noonat, OHHHHHHHHHHHHHHHHHHHHHHHHHHHh ok [03:45] ryan[WIN]: that makes more sense [03:45] JimBastard_: then you long poll to that request [03:45] JimBastard_: bam [03:45] JimBastard_: open up 10,000 of them [03:45] JimBastard_: keep them open all day [03:45] JimBastard_: don't close the connection [03:45] deanlandolt: JimBastard_: keep them open all day? won't that take some work on the client? [03:46] colin__: I'm only creating 1 http server from what i can tell [03:46] deanlandolt: colin__: 1 http server per request [03:46] noonat: colin__: each time .get() is called it's creating a new server [03:46] ryan[WIN]: noonat, thank you that solved my issue :D :D :D :D [03:46] noonat: ryan[WIN]: woo [03:47] JimBastard_: colin__: most of what you are trying to do is built into the way node works [03:47] ryan[WIN]: the only difficulty i'm having now is decoding utf8 chars [03:47] ryan[WIN]: and sending them [03:47] JimBastard_: long polling isnt really anything special in node, its just keeping the request open [03:47] colin__: I'm not explicitly creating the http server - will calling tcp.createServer and http.createServer cause the error? [03:47] JimBastard_: i think [03:47] colin__: right [03:47] JimBastard_: is there a guide for this [03:48] deanlandolt: a guide? [03:48] colin__: I've seen that without manually calling response.end() [03:48] JimBastard_: you call http.createServer ONCE [03:48] colin__: it'll just stay open [03:48] JimBastard_: yep [03:48] colin__: so maybe i should show you the first part of my code [03:49] JimBastard_: i think maybe you need to read the docs a little bit more [03:49] JimBastard_: perhaps throw out some assumptions you are making about the code [03:49] JimBastard_: probaly based on your previous experience doing non-evented server side stuff [03:50] fizx has joined the channel [03:51] fizx has joined the channel [03:51] colin__: i've read the api's and worked through the examples , but maybe i've tried to do too much at once [03:52] JimBastard_: i have a feeling you are making this too complicated [03:52] colin__: http://pastie.org/938560 [03:53] colin__: that is the code that i run initially, which loads a template file, index.tpl, which calls index/get which we've been looking at [03:54] mjr_ has joined the channel [03:54] colin__: it all works, until i load the page in a second browser window while the long poll is running [03:54] JimBastard_: sigh [03:54] JimBastard_: where does index/get get called? [03:54] JimBastard_: you are creating a server twice, where you shouldnt be [03:55] JimBastard_: you are getting a bind error because you are trying to start the same exact service twice, which isnt possible [03:55] JimBastard_: you should have one server running, that listens [03:56] tmpvar: collin_, I may have missed it, but what exactly are you trying to do? [03:56] colin__: http://pastie.org/938568 [03:56] mjijackson has joined the channel [03:56] mjr___ has joined the channel [03:57] mjr___: Curse you, neighbors with wifi. [03:57] colin__: tmpvar: I've created a simple router, with templates [03:58] colin__: in the template i make an ajax request to a url which sets up a tcp client and server, the client starts writing to the server [03:59] noonat: colin__: i... don't understand... why? [03:59] colin__: if i open the original url in a second browser tab, while the long poll is running, i get: Error: EADDRINUSE, Address already in use and server dies [03:59] noonat: right [03:59] noonat: because your response handler is starting two servers [03:59] noonat: on 8001 [03:59] noonat: i don't understand why you're calling tcp.createServer in the handler [04:00] JimBastard_: like i said, re-read the docs a bit [04:00] noonat: oh. i see. [04:00] colin__: noonat: the idea is to eventually create a way to view real time analytics data using long poll or websockets [04:00] noonat: you want all the clients to get any events emitted to hub [04:01] colin__: right [04:01] noonat: and you want to push those events up to hub via a socket [04:01] noonat: okay, so move hub outside of the response handler [04:01] colin__: right [04:01] noonat: and its tcp server + handler [04:02] colin__: so its not created in the get function [04:02] noonat: right. [04:02] noonat: just like you create one http server for the whole program, you should be creating one hub server. [04:02] colin__: i see [04:02] noonat: the way it's setup right now, each time a new client hits that handler, it tries to create a new hub [04:03] colin__: yes [04:03] mikeal has joined the channel [04:04] uberjar has joined the channel [04:04] colin__: what happens then when there are no clients [04:04] noonat: the hub is idle [04:04] noonat: anything that is written to it will just go nowhere [04:04] colin__: got it [04:05] noonat: you'll want to clean up your event listener when you end the response too [04:05] noonat: you could make this whole thing a lot simpler if you just did the hub through the same http server too [04:05] colin__: then idea is that I could track page views, unique visits, etc by firing off a request to a script that would write to the hub as well as store in db [04:06] colin__: so with that, am i even using the right approach? [04:07] colin__: noonat: what do you mean? [04:10] noonat: colin__: I mean, instead of starting a separate TCP server, you could just have your analytics stuff POST to /stream on the HTTP one [04:10] noonat: and then have clients that want to consume that do a GET to /stream [04:11] colin__: So, no need for tcp in this case [04:11] noonat: Instead of spinning up a new TCP client for each long poll, just have it observe an event directly [04:11] noonat: (on hub or whatever) [04:11] noonat: Right. The only reason you would want to spin up a separate server for the hub is if you wanted to firewall it off or something. [04:12] colin__: that makes sense [04:12] colin__: I need to read up more on the eventEmitters [04:16] colin__: noonat: are you referring to the "stream" event? [04:16] noonat: Yep [04:18] colin__: I was under the impression,that i had to actively write to that "stream" using something like: [04:19] colin__: var stream = tcp.createConnection(8001); [04:19] colin__: stream.write((new Date()).getMilliseconds().toString()); [04:19] noonat: Oh, no, I was referring to the "stream" event you were firing from the emitter [04:20] noonat: Not the stream object [04:20] colin__: let me see [04:20] noonat: If you eliminated the tcp server, and did everything through the http server, everything would be using the emitter directly [04:20] mkovacs has joined the channel [04:21] colin__: So i'm basically doing a bunch of unnecessary work there [04:21] colin__: thanks a lot for the advice [04:22] colin__: so here, hub.emit("stream", data); [04:23] noonat: Yeah [04:23] bpot has joined the channel [04:24] colin__: so just to clarify, you're saying that when my analytics stuff posts to /stream i'd call hub.emit("stream", data); [04:26] colin__: and then the client would have: [04:26] colin__: hub.addListener("stream", function (data) { [04:26] colin__: res.writeHead(200, {'Content-Type': 'text/plain'}); [04:26] colin__: res.write(data); [04:26] colin__: res.end(); [04:26] colin__: }); [04:27] noonat: yeah [04:27] noonat: something like this: https://gist.github.com/b9881bea097c0ae7ff20 [04:28] noonat: it's only really useful to have the hub emitter if you are planning on firing stream events from other places [04:28] noonat: if you'll only ever push data out to the clients via the post, you could just keep a list of pending clients yourself [04:28] colin__: thanks for putting that together for me, much more clear [04:29] colin__: what do you mean by a list of pending clients? [04:30] mape: _ry: Ah thanks for the update [04:30] mape: creationix: Great I'll check it out :) [04:32] noonat: colin__: https://gist.github.com/319d3f57c7845ad04081 [04:34] colin__: noonat: give me a sec to understand what you're doing here [04:35] micheil: colin__: btw, please use a pastebin for code. [04:36] colin__: sorry about that, i'm also new to irc [04:36] colin__: is it proper etiquette to use a pastebin for single lines of code? [04:36] mape: If its more then one line pastebin is the way to go [04:37] JimBastard has joined the channel [04:37] colin__: got it, thanks [04:37] JimBastard: did you have any luck colin__ ? [04:37] micheil: moin jim [04:37] JimBastard: whats a moin [04:38] micheil: morning (sorta) [04:38] colin__: noonat: i see, so on every post you write to each polling client [04:38] colin__: JimBastard: Yes, noonat has been helping me. You were right, I had greatly overcomplicated things [04:39] JimBastard: can anyone help out a noob with an unshift question? lets say i want to override the http module for every single require() on a page (and all its potentially required children). can this be done with unshift? [04:39] JimBastard: cool cool, im glad its working out [04:40] noonat: colin__: Yeah. You would want to add some additional error handling on that. [04:41] noonat: colin__: Probably want to watch for errors/timeouts from the pending clients and remove them from the list. [04:41] colin__: noonat: I understand, so there is no need to use an event emitter here if i only want real-time data [04:44] colin__: are most people still using long polling with node rather than streaming? what is recommended? [04:44] JimBastard: depends on the client colin__ [04:45] JimBastard: XHR ? websocket? [04:45] colin__: right - from what ive read websockets are only supported in chrome [04:46] JimBastard: so there you go [04:46] JimBastard: you can have websockets work cross browser with a SWF call back [04:46] JimBastard: fall back [04:46] JimBastard: but for most cases long poll is the better solution [04:47] JimBastard: tcp isn't udp afterall [04:48] colin__: i was reading something about socket.io, which supposedly handles the fall back to flash and iframes, if no websocket [04:48] JimBastard: for those of us who actually write web applications in the real world [04:49] JimBastard: long polling works [04:49] JimBastard: :p [04:49] colin__: but i think i'll stick to the long poll, i've already confused myself enough [04:49] colin__: yes [04:49] Yuffster has joined the channel [04:49] JimBastard: how much data are you trying to push? [04:49] brainproxy has joined the channel [04:50] colin__: well, i work for a company that runs fairly high volume advertising [04:51] colin__: around a million imps/day for some ad deals [04:51] colin__: some clients want funnel analysis and other tracking on their landing pages [04:52] colin__: so i've been looking into node for real time pushes [04:53] micheil: colin__: you could probably use a single http server, and then just include a js file that's empty that does the tracking [04:53] micheil: or have node.js serve the ads (there's a company already doing that btw) [04:53] Jimbastard_ has joined the channel [04:53] Jimbastard_: hrmmm [04:55] colin__: micheil: how does the empty js file do the tracking? [04:55] colin__: is each request an impression? [04:55] micheil: simple, it's the request, yes [04:55] colin__: thats essentially what i'm thinking [04:56] colin__: i'd like to be able to post relevant data to the file, like a/s/l for example or ad campaign title [04:56] colin__: and store that data in couchdb or some non-relational db [04:57] colin__: but at the same time show real-time stats [04:58] colin__: noonat and Jimbastard_, thanks again for the help [04:59] noonat: np [05:00] charlesjolley has joined the channel [05:11] mikeal has joined the channel [05:12] piranha has joined the channel [05:12] stepheneb has joined the channel [05:18] RayMorgan_ has joined the channel [05:23] hassox has joined the channel [05:23] kriskowal has joined the channel [05:23] whoahbot has joined the channel [05:27] whoahbot has joined the channel [05:28] whoahbot has joined the channel [05:33] dgathright has joined the channel [05:42] sudoer has joined the channel [05:42] devinus has joined the channel [05:45] mikeal has joined the channel [05:46] micheil has joined the channel [05:53] dgathright has joined the channel [06:08] RayMorgan has joined the channel [06:14] dgathright has joined the channel [06:15] rtomayko has joined the channel [06:16] dgathright has joined the channel [06:17] dgathright_ has joined the channel [06:20] creationix has joined the channel [06:21] ahc has joined the channel [06:23] jansc has joined the channel [06:23] sveimac has joined the channel [06:26] cruxst has joined the channel [06:32] WALoeIII has joined the channel [06:32] fizx has joined the channel [06:36] bolson has joined the channel [06:36] bolson has left the channel [06:36] bolson has joined the channel [06:38] towski has joined the channel [06:40] mikeal has joined the channel [06:40] botanicus has joined the channel [06:46] jbrantly has joined the channel [06:48] hassox has joined the channel [06:50] SamuraiJack has joined the channel [06:56] uberjar has joined the channel [06:56] martoche has joined the channel [07:07] uberjar: is javascript the new C ? [07:07] uberjar: I hope so. [07:11] mikeal has joined the channel [07:15] darkf: no [07:15] darkf: and I will eat my hat if it becomes more popular than C :( [07:17] piranha has joined the channel [07:17] uberjar: I don't think that'll happen until an OS or two is implimented in it.. so don't worry [07:18] pkrumins: what's the difference between f(args) and f.apply(args)? [07:19] darkf: apply takes in a list [07:19] darkf: or something like that [07:22] SamuraiJack: pkrumins: f.apply(scope, [ arg1, arg2, ... ]) [07:23] SamuraiJack: in the 2nd variant, inside of `f`, `this` == scope [07:23] uberjar: an interesting advantage node apps have over C apps which noone is talking about: if you write it in node you don't have to worry about memory management related security bugs. Buffer overflows, integer overflows, format string bugs, etc.. [07:23] SamuraiJack: and `arg1`, `arg2` goes into function's parameters [07:24] darkf: well, C has plenty of string libraries that more or less prevent overflows etc [07:24] SamuraiJack: pkrumins: in the 1st variant `f` will receive a single parameter - `args` [07:26] uberjar: darkf, if it were so easy then the major browsers would not suffer from so many vulnerabilties. Firefox is a modern app using those string libraries you mention.. yet it is still riddled with these memory management bugs [07:26] darkf: :) it's a huge project, however, with tons of commiters, it's not very easy to hunt these bugs down [07:26] uberjar: tons of important C projects are huge projects [07:27] uberjar: thats my point I guess [07:27] pkrumins: SamuraiJack: oh i see. [07:27] pkrumins: thanks for explaining. [07:27] SamuraiJack: no prob [07:28] uberjar: C doesn't scale well for large security sensitive projects ;) [07:28] darkf: uberjar: well, some of firefox is written in javascript - node is the same way, C with some javascript [07:29] uberjar: I suspect if someone implimented an entire browser in Javascript we might have the world's first secure browser on our hands. It could be a game changer. [07:29] uberjar: I wonder how much slower it would be though... [07:30] darkf: well [07:30] darkf: Mozilla wants exactly that [07:30] darkf: they want Mozilla 2 to be mostly js [07:31] uberjar: that sounds really smart to me [07:31] pdelgallego has joined the channel [07:31] uberjar: security is what makes or breaks a browser [07:31] uberjar: or rather it's what broke IE.. and IE had a lot going for it.. it was the default [07:32] darkf: IE didn't keep up with standards and was rather broken anyway [07:32] darkf: ActiveX did not help [07:34] creationix has joined the channel [07:34] uberjar: if mozilla did go 100% JS then I bet in a year they could say something like: we had 80% fewer security vulnerablities than webkit & friends. [07:34] darkf: but interpreted languages are also slower [07:34] darkf: I hope at least they compile it to bytecode or something [07:35] uberjar: from what I understand.. v8 does some interesting machine code compilation stuff under the hood [07:35] uberjar: I want to learn more about it [07:35] darkf: yep [07:35] darkf: v8 is very fast [07:35] darkf: it does assembly voodoo to translate js into machine code iirc [07:36] uberjar: well hopefully mozilla doesn't do something ridiculous like try to write their own js engine lol [07:36] darkf: well they have their own js and actionscript engine [07:36] uberjar: oh jeeze [07:36] darkf: spidermonkey, tracemonkey (3.5+), tamarin (actionscript) [07:37] felixge has joined the channel [07:37] bolson has joined the channel [07:37] sveimac has joined the channel [07:37] gwoo has joined the channel [07:37] sh1mmer has joined the channel [07:37] ssteinerX has joined the channel [07:37] rektide has joined the channel [07:37] ivan has joined the channel [07:37] dantalizing has joined the channel [07:37] bjartek has joined the channel [07:38] felixge has joined the channel [07:38] darkf: I'm not sure how I feel about javascript though, I like actionscript better, it has the option of being statically typed [07:38] uberjar: all that dynamacism makes you uneasy ? [07:39] uberjar: it would be cool if you could optionally specificy types in JS [07:39] darkf: yep [07:40] darkf: otherwise you might have "0" + 5 somewhere and wonder why you're getting a string ;) [07:41] derbumi has joined the channel [07:42] keeto: static typing was canned. [07:42] uberjar: ACTION tries to remember a time when he ran into a bug like that and fails [07:42] keeto: ES4 featured static typing, but we all know what happened to that spec.. [07:42] kjeldahl has joined the channel [07:42] darkf: yep [07:43] darkf: actionscript uses it though [07:43] darkf: it's based on es4 [07:47] uberjar: I could care less about typing but I could do with some less verbose syntax [07:48] keeto: like what? [07:48] colin__ has joined the channel [07:48] colin__ has left the channel [07:48] uberjar: like some sort of lisp -> js compiler :) [07:49] uberjar: something alone the lines of parenscript [07:49] uberjar: or scriptjure [07:49] uberjar: that way I can write macros.. and ultimately less code [07:49] uberjar: in theory [07:50] uberjar: and it would have much much less syntax [07:51] teemow has joined the channel [07:51] uberjar: there are other non-lispy attempts to make a better syntax for JS.. I think coffeescript is one of them [07:52] keeto: I dunno--I tend to have a dislike towards projects with only a superficial goal in mind. [07:52] ditesh|cassini has joined the channel [07:52] darkf: I love coffeescript [07:52] darkf: I use it when coding in node ;) [07:53] mape: darkf: Doesn't coffeescript produce cruft code? [07:53] darkf: yep [07:53] darkf: but it works [07:53] darkf: :) [07:53] keeto: it's kinda like building a whole new machine to press keys because you don't like the layout of your keyboard. [07:54] darkf: but it's some of the best syntax I've seen. I wish they would've implemented it as a standalone language, without the translator, though. [07:55] uberjar: less code = easier to read = easier to maintain [07:55] uberjar: in a lot of cases at least [07:55] keeto: I dunno, maybe I just really love javascript. :) [07:56] darkf: it's not bad, I personally feel it hard to work with [07:56] darkf: especially when using anonymous functions [07:56] darkf: blocks everywhere [07:56] keeto: nothing a good editor and proper style doesn't solve. [07:57] uberjar: now you're back into the java mindset [07:57] uberjar: just made eclipse more powerful [07:57] uberjar: don't fix the language [07:57] uberjar: haha [07:57] darkf: lol [07:57] keeto: not really--I'm a textmate user who's now using vim and I haven't had any problems with the syntax. :) [07:59] javajunky has joined the channel [08:00] keeto: then again, I might be bluffing and my code might actually look horrible. ;) [08:00] uberjar: I think JS syntax is one of the most pleasant of all the curley bracket languages. [08:01] mape: Its like kids with ugly children [08:01] mape: They still look cute to the parents [08:01] mape: Or parents with .. [08:01] darkf: :D [08:01] N` has joined the channel [08:01] mape: Kids shouldn't have kids [08:01] mape: :P [08:02] keeto: hahaha [08:04] polo has joined the channel [08:09] uberjar: I think there should be a hotornot.com site that decides who gets to have kids. That way it's all democratic and whatnot [08:10] uberjar: backend written in node [08:10] mape: And make it really hard to login so only the smart ones get in? [08:10] uberjar: lol [08:10] darkf: they wouldn't be the hot ones :P [08:10] mape: just make a capcha in strange letters that say write this backwards [08:10] mape: Should filter out the dumbest ones [08:11] freshtonic has joined the channel [08:11] uberjar: IE6 users would get special treatment [08:11] darkf: IE anything users ;) [08:11] mape: uberjar: For the IE users you just do isolate them and feed dummy data [08:11] mape: S� they think they are submiting but no one else sees it [08:12] uberjar: you're so kind to them! [08:12] mape: For the pain and suffery they have caused me they are getting of easy [08:12] darkf: :D [08:13] uberjar: this is how I get my sweet revenge currently http://plugins.jquery.com/project/crash [08:13] javajunky1 has joined the channel [08:14] uberjar: I want one that works up to IE9 [08:14] darkf: good ol' jquery [08:14] Nohryb has joined the channel [08:16] martoche has joined the channel [08:23] hellp has joined the channel [08:25] pkrumins: i wonder how to avoid recursion if I want to poll from within nodejs. [08:26] mape: listen to another port? [08:27] pkrumins: for example, function poller() { var poller = http.createClient(...); req = poller.request(...); req.addListener('response', function(res) { .. res.addListener('end') { ### poll again here ### } ... } [08:27] pkrumins: the only way I see to poll again is to call poller() recursively in ### poll again here ### [08:28] pkrumins: but that will quickly lead to stack overflow. [08:28] pkrumins: mape, does it make sense what I am asking? [08:28] mape: Well, you just want to chain pulls? [08:30] pkrumins: Not really, I have only one poll, and I wish to renew it when it's done. [08:30] pkrumins: But the only way I see to do it is by recursively calling poller() function that creates a new poll each time the previous one 'end's [08:30] pkrumins: But that leads to recursion which will bring the nodejs application down after a while [08:31] mape: I don't see how it would bring it down if you just call it recur in the callback? [08:32] pkrumins: oh! [08:33] pkrumins: snap. [08:33] pkrumins: sequential programming thinking. [08:33] pkrumins: mape. :) [08:33] pkrumins: thank you! [08:39] _ry: pkrumins: yeah those callbacks come off the event loop [08:39] _ry: the stack is nearly empty [08:39] _ry: just some http stuff below it [08:39] pkrumins: right [08:42] tbassetto has joined the channel [08:42] ewdafa has joined the channel [08:44] TomY has joined the channel [08:54] kjeldahl has joined the channel [08:54] xla has joined the channel [08:58] javajunky has joined the channel [08:58] gwoo has joined the channel [09:06] SamuraiJack has joined the channel [09:07] bpot has joined the channel [09:09] botanicus has joined the channel [09:17] jspiros has joined the channel [09:27] screen-x: just read mark's post about UNE 10.10, osxification complete ;-) [09:27] screen-x: ↑sorry wrong window :( [09:30] polo has joined the channel [09:39] uberjar: screen-x has forgotten how to use screen :) [09:43] screen-x: or irssi ;-) [09:44] towski has joined the channel [09:44] uberjar: irssi would be a great canidate for a port to node.js [09:45] uberjar: someone hop to it.. :) [09:50] stalled has joined the channel [09:52] derbumi has joined the channel [10:09] pkrumins: hmm, how do you find the ip of the http.serverRequest? [10:09] pkrumins: i mean the ip who originated the request. [10:12] pkrumins: found it [10:12] pkrumins: req.connection.remoteAddress [10:14] darkf_ has joined the channel [10:15] KungFuHamster_ has joined the channel [10:16] javajunky1 has joined the channel [10:19] NickP_ has joined the channel [10:19] krishna__ has joined the channel [10:19] jwm_ has joined the channel [10:19] xla_ has joined the channel [10:19] javajunky1 has joined the channel [10:21] xla_ has joined the channel [10:22] ddollar` has joined the channel [10:23] cruxst_ has joined the channel [10:24] xla has joined the channel [10:25] jspiros has joined the channel [10:27] chewbranca has joined the channel [10:28] pilif has joined the channel [10:30] Nohryb has joined the channel [10:56] MattJ has joined the channel [11:07] lifo has joined the channel [11:10] polo has joined the channel [11:14] jspiros has joined the channel [11:20] jspiros has joined the channel [11:24] ncb000gt has joined the channel [11:24] javajunky has joined the channel [11:28] hassox has joined the channel [11:31] polo has joined the channel [11:37] keeto has joined the channel [11:43] bolson_ has joined the channel [11:44] bolson_ has joined the channel [12:01] confounds has joined the channel [12:05] tav has joined the channel [12:07] tbassetto has joined the channel [12:12] carsonm has joined the channel [12:21] pkrumins: hey guys, just published an article "A HTTP Proxy Server in 20 Lines of node.js Code" [12:21] pkrumins: http://catonmat.net/http-proxy-in-nodejs [12:21] pkrumins: let me know what you think! [12:22] digitalspaghetti: nice [12:22] creationix: good job pkrumins [12:22] digitalspaghetti: i just saw it on hacker news [12:22] pkrumins: thanks :) [12:23] MattJ: :) [12:23] MattJ: Anyone else would just post the 20 lines [12:24] MattJ: pkrumins posts that, and bells and whistles too [12:24] pkrumins: that's how i roll. [12:24] pkrumins: :) [12:35] martoche has joined the channel [12:35] kriszyp has joined the channel [12:36] creationix: _ry: I sent you a patch for when you get up (I hope you're still asleep at 5:30 am there) [12:39] mape: creationix: You're in the UK? [12:40] micheil has joined the channel [12:40] creationix: no, Texas [12:41] creationix: but it's 2 hours ahead of California [12:41] mape: Oh k [12:41] ncb000gt: pkrumins: nice prototype. it's a great starting point. :) [12:42] MattJ: mape: You're in the UK? [12:42] mape: MattJ: Nah, Sweden [12:43] MattJ: ACTION feels lonely [12:43] creationix: mape: did you see the group function I added to step? [12:43] mape: creationix: Sorry haven't had time to check it out, will do when I get home from work [12:43] creationix: no problem [12:44] mape: http://twitter.com/mape/nodejs is building up :) Slowly [12:45] ahc has joined the channel [12:45] creationix: nice [12:45] Krowbar has joined the channel [12:47] Nohryb has joined the channel [12:50] tbassetto has joined the channel [12:54] herbySk has joined the channel [12:55] JAAulde has joined the channel [12:55] _ry has joined the channel [12:56] JAAulde has joined the channel [13:00] davidsklar has joined the channel [13:10] jspiros has joined the channel [13:14] pgriess has joined the channel [13:17] nicky has joined the channel [13:23] pjb3 has joined the channel [13:39] demolithion has joined the channel [13:40] softdrink has joined the channel [13:47] quirkey has joined the channel [13:47] tjweir has joined the channel [13:49] gf3 has joined the channel [13:51] demolithion has joined the channel [13:51] qFox has joined the channel [13:51] qFox: whats the interface of a promise? [13:51] qFox: i dont see it in the api... :/ [13:52] micheil: there are no promises [13:52] micheil: (I don't think there are, any way) [13:54] qFox: hm [13:54] qFox: is it a higher level concept kind of thing? [13:54] micheil: not sure [13:54] micheil: I think it was deprecated [13:54] qFox: okay. i thought everything returned "a promise" [13:54] qFox: or at least, anything asynchonus [13:54] qFox: ah. with what was it replaced? [13:55] qFox: I just want to write a module that behaves like a promise when something is asked to it [13:55] micheil: qFox: no idea there, sorry [13:56] qFox: kk. anyone? [13:56] micheil: I just don't think promises exist any more, in any form [13:56] qFox: is there no general interface for how callbacks are processed? [13:56] qFox: or is that just it. a raw function [13:57] qFox: maybe ti is. i was just expecting a general interface to which you could attach listeners and listen for certain "promise" events like "got it" or "couldnt get it" or "fail!" or whatever [13:58] qFox: just like "data" and "end" for http requests and such [13:59] herbySk: qFox: async calls now must be supplied with a callback [13:59] herbySk: no promise any more [14:00] qFox: okay, so just like foo("data", callbackData, callbackFinished); or something and callback gets called, i guess [14:00] herbySk: qFox: a callbaxk is such an interface - it should process an error as well as successful result [14:00] qFox: do you know why promises were depricated? i found it a good way of explaining how the async system works [14:01] qFox: well yeah it could [14:01] herbySk: callback must have form function (err, result) { if (err) { /* probl;em */ else {doThingWith(result); } [14:01] qFox: ah [14:02] qFox: so streams are a different matter altogether? [14:02] qFox: (in this light) [14:03] pjb3_ has joined the channel [14:03] herbySk: yes and no, it is also a function called when an event happens, though error and data are separated... do what you see fit (either read the whole context by readFile, or process it sequentially with "data" listener) [14:04] qFox: good point [14:05] qFox: the listeners themselves are callbacks using the interface you said [14:05] pjb3_ has joined the channel [14:05] qFox: yeah okay. thanks [14:05] herbySk: more or less. ok, np. [14:05] rtomayko has joined the channel [14:07] rtomayko has joined the channel [14:08] nefD: (late response) Although promises were depricated, theres a great module on the modules wiki page that provides them [14:09] nefD: I could be totally wrong here, but I believe the reason for depricating them was that there were tons of (correct) opinions on how they should work, so it was decided to simply let the user define what they are, what they do, and how they work [14:11] zeugma has joined the channel [14:12] zeugma: does node's http client reuse sockets between requests? [14:12] micheil: zeugma: yes in an odd way [14:12] zeugma: micheil: do tell [14:13] micheil: there's a pool of parsers, which get reused, as for the sockets, there's just one socket for the server sending out, but each client connects on a new net.Stream [14:13] micheil: (which is a read/write stream) [14:14] micheil: _ry or someone else may correct me though on this, this is just my understanding [14:14] zeugma: where to tcp sockets actually come into play? are they beneath net.Stream or are they one-to-one with Stream instances? [14:15] zeugma: micheil: I'm interested to know b/c I'd like to do some load testing with node, but I want to make sure that it takes advantage of socket reuse. [14:15] micheil: I'm not sure, you could build almost any network application using net.Server and net.Stream, as to the handling of the sockets, that's done by one of the c libraries [14:16] qFox: nefD> ok, thanks [14:16] alex-desktop has joined the channel [14:16] nefD: qFox: http://github.com/kriszyp/node-promise [14:17] zeugma: hah, I spent about two months last year writing a lightwight http thingy for serving dynamic (cometish, and now websocketish) applications, and then I discovered node.js, and am a little pissed at how easy it is to use :) [14:17] jherdman has joined the channel [14:17] micheil: websocketetish? [14:17] micheil: where? [14:17] qFox: okay yeah, that's too much code for a simple mechanism. [14:17] micheil: what? [14:18] Yuffster has joined the channel [14:18] micheil: oh, right, zeugma as for websockets, there's currently no spec compliant (or hixie-draft-75 compliant) implementations [14:18] zeugma: micheil: I wrote it in erlang and I wrote a javascript library to interact with it [14:19] micheil: there are a few, but I doubt how stable / powerufl they are [14:19] zeugma: yeah - I only recently added websocket support [14:19] zeugma: and theres the whole proxy issue to consider [14:19] micheil: ACTION is working on a spec compliant websocket server at the moment [14:19] micheil: (in between school and exams) [14:19] zeugma: I just wanted to get it working - I'm still using long-polling for real stuff. [14:20] zeugma: micheil: what in? [14:20] micheil: zeugma: if you don't want to worry about websocket implementations, something to look at is pusherapp [14:20] ahc has joined the channel [14:20] micheil: I'm writing this server in node [14:20] zeugma: micheil: *bonks own head* of course [14:20] micheil: it'll be built on top of the http library, so, yeah [14:21] micheil: while I disagree with websockets requiring a http server, it's the spec. [14:21] mape: creationix: Nice with group! :) [14:21] zeugma: micheil: what do you mean you disagree with websockets requireing an http server? [14:21] zeugma: requiring* [14:21] micheil: zeugma: currently the spec says that a websocket server should be able to act like a http server [14:22] micheil: hence allowing you to run a http website on the same server instance as a websocket server [14:23] zeugma: oh I see - well - I mean - whats wrong with that? You certainly don't have to do it that way - so long as there is support for it. [14:24] micheil: zeugma: well, It does add a little complexity [14:24] micheil: if you're interested, check out.. http://github.com/miksago/node-websocket-server [14:24] micheil: I think [14:24] pkrumins: hey are you talking about node.js websocket implementations? [14:24] micheil: yes [14:24] pkrumins: that's what i am hacking on today. [14:25] micheil: pkrumins: feel free to join me [14:25] mape: Node needs somekinda "what everyone is doing right now" kinda deal :P [14:25] pkrumins: mape :) [14:25] micheil: mape: fo'sho'. [14:25] pkrumins: micheil, sure, but i don't know much. [14:25] zeugma: mape: not I, after reading about it for nearly a year, I just started with it yesterday. [14:25] pkrumins: checking out node-websocket-server [14:25] micheil: pkrumins: well, what are you aiming for? [14:25] pkrumins: i know IO.Socket-node patches node.js [14:26] pkrumins: but i never got it working, neither MattJ did. [14:26] mape: zeugma: huh? [14:26] micheil: pkrumins / zeugma: that implementation isn't ready yet, it's still got a long long way to go [14:26] pkrumins: micheil: what are the main obsticles? [14:26] zeugma: mape: sorry, heh, I misread you. [14:27] micheil: pkrumins: currently I've been working on implementing to the current spec, and then I've had exams and assessments come up, so I haven't gotten much done in the past week [14:27] micheil: (or two) [14:27] pkrumins: micheil: but you have it at least partially working? [14:27] pkrumins: micheil: is miksago your profile? it says 90% complete. [14:28] micheil: pkrumins: It's a proof of concept [14:28] micheil: pkrumins: yeah @miksago on twitter / github / * [14:28] pkrumins: got it [14:28] pkrumins: so how well is it working? can you describe? [14:28] zeugma: micheil: hey - proof of concepts can go a long way. Mochiweb started out as a prototype and it just stuck. [14:30] micheil: there's still major issues.. um.. I think it'll startup, and accept clients [14:31] micheil: I've really gotta clean up the old code in the repo. [14:32] zeugma: lately I've been looking at node.js as a kind of netcat 2.0, and I've been thinking of using it similarly. For fast, dirty, (but infinitely more robust) applications. [14:32] micheil: I think the usage is currently going with: server = new ws.Server(http_handler, options) [14:33] polo has joined the channel [14:33] zeugma has left the channel [14:33] micheil: although, due to the way that http currently works, it's got a difficulty of the http_handler callbacks [14:34] micheil: eg, if the request contains a upgrade header, it's assumed that the dev will handle it, so the default http handler is unhitched [14:34] micheil: and there's no way to re-hitch it [14:35] micheil: so, it's very rough on the edges there [14:37] ditesh|cassini has joined the channel [14:38] jedschmidt has joined the channel [14:38] TomY: anyone know why when I set a property on global it doesn't get set? [14:38] TomY: is that a bug or expected behaviour? [14:38] micheil: uhh.. the global isn't necessarily the global [14:38] TomY: (0.1.92) [14:39] micheil: all variables inside a require()'d file will be scoped to that require, and not leak out [14:39] micheil: the only way to get out is to use GLOBAL [14:39] micheil: (or was, it may have changed) [14:39] tjweir has joined the channel [14:40] TomY: the code i am running is: sys.debug(sys.inspect(global)); global.asdf = 1; sys.debug(sys.inspect(global)); [14:40] TomY: which outputs: [14:40] TomY: DEBUG: {} [14:40] TomY: DEBUG: {} [14:40] micheil: try GLOBAL [14:40] micheil: not global [14:41] TomY: yeah, tried that and get the same [14:41] N` has joined the channel [14:41] micheil: hmm.. process.global? [14:41] polo has joined the channel [14:41] TomY: think it changed to global in 0.1.27 [14:41] TomY: ..i'll try that [14:42] micheil: although, it looks that GLOBAL should work [14:43] creationix: pkrumins: while you wait on micheil's version, here is a quick and dirty one that works now http://github.com/creationix/websocket [14:45] Nohryb: pkrumins: I'm playing with your proxy, trying to make it cache the responses... [14:48] nwhite: I've been using http://github.com/guille/node.websocket.js/ along with socket.io http://github.com/LearnBoost/Socket.IO-node [14:48] stepheneb has joined the channel [14:51] colin__ has joined the channel [14:53] Nohryb: pkrumins: I've got 2 versions, and none works... :-( would you mind to have a look at it ? http://gist.github.com/382238 and http://gist.github.com/382228 [14:57] creationix_ has joined the channel [15:00] stepheneb has joined the channel [15:01] pkrumins: Nohryb: should be easy, looking [15:02] Nohryb: I'm saving the data chunks in a string cached+= chunk... [15:02] Nohryb: pkrumins: cool, thanks [15:03] inimino: mape: did you get that algorithm working? [15:03] mape: inimino: More or less, but from my tests it wasen't that much faster [15:04] pkrumins: Nohryb: I can't see what is wrong, is it completely not working? [15:04] Nohryb: pkrumins: in the other I just push the chunks into an array [15:05] pkrumins: creationix: hey thanks, gonna try it! [15:06] pkrumins: Nohryb: trying it myself! [15:06] tjweir has joined the channel [15:06] Nohryb: the browser "could not decode the response" or something like that. note that I forgot to uncomment line 39 ! [15:08] Nohryb: pkrumins: cool, thanks :-) [15:09] pkrumins: ok i know what the problem is [15:09] pkrumins: the server sends gzipped content, and you're concatenating it via += [15:09] pkrumins: try using Buffer! [15:11] pkrumins: or - strip the Accept header from original request [15:11] creationix: yeah, in the proxy you're using buffers if you don't specify the encoding [15:11] creationix: you can build an array of buffers and push to it to cache the response [15:11] pkrumins: still a missing feature of buffers is auto-expansion [15:12] Nohryb: Buffer is something "new", yes ? [15:12] creationix: auto-expansion? [15:12] pkrumins: yes, new in latest node. [15:12] pkrumins: creationix: yep [15:12] creationix: they convert to strings pretty easilly [15:12] creationix: usually concating the buffers "just works" [15:12] pkrumins: creationix: well the thing that they auto-grow as necessary, not have fixed size. [15:12] Nohryb: so i save the chunk in a buffer ? and the buffer into an array of buffers ? [15:12] creationix: ahh, no, they are fixed size on purpose [15:13] pkrumins: oh? [15:13] pkrumins: tell me [15:13] creationix: just to keep the implementation simple and effecient I'm sure [15:13] creationix: it's low level on purpose [15:13] creationix: it's not hard to implement growing buffers on top of it [15:13] dekroning has joined the channel [15:14] creationix: I'd build an array of buffers and then when done and you know the total size, copy them all into a single buffer [15:14] pkrumins: too much copying! [15:14] pkrumins: well works for prototyping [15:14] indexzero has joined the channel [15:16] botanicu_ has joined the channel [15:16] Nohryb: why does it fail too the one in which i push the chunks into an array ? any ideas ? [15:16] qFox has left the channel [15:17] creationix: it's not that much copying, you're not going to get much better even at the c level [15:17] Nohryb: (learning to use Buffers) [15:18] pkrumins: someone asks - "does the order in which proxy_response 'data' and 'end' events are received guarantee the order in which the respective callbacks are processed?" [15:18] pkrumins: so the question is, can 'end' callback be called before 'data' callback. [15:18] pkrumins: intuitively yes, the other side closes the connection [15:18] pkrumins: without having send any data [15:18] pkrumins: but then, what happens if the other side has sent 50 bytes out of 100 and it closes. [15:19] creationix: well node is single threaded, so events get processed in the order they get into the event queue [15:19] Nohryb: I think end ought to come after the last data (if any) [15:19] MattJ: You get "data" with 50 bytes then "end"? [15:20] pkrumins: oic. [15:20] pkrumins: and if no 'data', then just 'end' [15:20] MattJ: Sure [15:20] pkrumins: cool. [15:20] MattJ: If it doesn't work that way I think it's a bug :) [15:21] ipnone has joined the channel [15:22] ipnone: hi! i'm starting a "regular" process that accepts tcp connections and writes to mongodb (100k writes in approx 4s). i create a childprocess that accepts data from stdin; said process writes the same amount of data in a little over double the time. any obvious things to consider? [15:23] ipnone: i was under the impression that ndoes vfork+execvp was very similar to how bash (or other shells) start processes [15:24] micheil: no idea, but what mongo implementation are you using? [15:24] dgathright has joined the channel [15:25] ipnone: micheil: node-mongodb-native [15:25] micheil: node version? [15:25] ipnone: micheil: 0.1.91 [15:25] micheil: neat. [15:25] micheil: I'll have to look at that. [15:26] ipnone: a child process might run on a different core from it's parent, right? [15:27] Nohryb: Is it possible to response.write() directly from a buffer ? [15:27] micheil: no idea, I haven't worked with child processes and stuff [15:27] micheil: Nohryb: possibly, not sure for sure [15:31] devinus has joined the channel [15:34] RayMorgan has joined the channel [15:37] Nohryb: thanks michell [15:38] polo has joined the channel [15:40] CodeOfficer has joined the channel [15:42] digitalspaghetti: hmm, interesting: http://cappuccino.org/discuss/2010/04/28/introducing-jake-a-build-tool-for-javascript/ [15:42] digitalspaghetti: i really hate Ant [15:42] WALoeIII has joined the channel [15:47] melgray_ has joined the channel [15:48] creationix: Nohryb: yes, write works great with buffers [15:49] creationix: response objects are writeable streams as documented on the api page [15:50] creationix: look for stream.write(buffer) and stream.end(buffer) [15:50] creationix: http://nodejs.org/api.html [15:51] keeto_ has joined the channel [15:51] mattly has joined the channel [15:51] Nohryb: creationix:cool, thanks [15:52] creationix: and if ipnone comes back, node child processes are entirely new os level processes [15:52] creationix: so yes, they can be on different cores [15:53] xavi_ has joined the channel [15:53] steadicat has joined the channel [15:53] herbySk: how to get '<' or '>' into the docs? [15:54] inimino: the docs are in Markdown now, right? [15:54] herbySk: yes [15:54] inimino: you can just use '<' and '>' directly then [15:55] devinus: inimino: i thought Markdown allowed inline html ? [15:55] Nohryb: creationix: but I don't understand why response.write(chunk) works from inside the data event handler, but when I save the chunks in a chunks array, response.write(chunks[n]) fails. ? [15:55] herbySk: it doesn't work. In the docs of Script class, I wanted to use [15:55] herbySk: filename='evalmachine.' [15:56] herbySk: but the result is different... [15:56] kjeldahl_ has joined the channel [15:56] herbySk: probably should llok up markdown somewhere on the net [15:58] Nohryb: creationix: i mean, the code in http://gist.github.com/382228 do the chunks mutate inside the array ? [15:58] creationix: it's fine in cdode blocks [15:59] creationix: herbySk: ^ [15:59] whoahbot has joined the channel [15:59] creationix: but yes, markdown allows inline html, so you can use < to have a < in prose [15:59] herbySk: creationix: thanx [16:00] creationix: herbySk: though, I'm not sure what the ronn parser (that generates the roff file for man) will do with it [16:00] creationix: Nohryb: which line? [16:02] Nohryb: i save the cunks in line 33, and line 18 serves then from the cached response (a chunks array) [16:02] mjr_ has joined the channel [16:02] creationix: I assume the crazy inline i++ works as expected? [16:02] creationix: (ie not starting at 1 instead of 0) [16:03] Nohryb: it should, unless v8 is borken :-) let me remove it... [16:03] creationix: no, I think it's good just tested it [16:03] creationix: you should probably return after response.end though [16:04] creationix: otherwise you'll run the other logic after serving the cache [16:04] creationix: well, no, it's all in the else [16:04] creationix: hmm... [16:05] Nohryb: you need to reload to get the broken responses (the cached ones) [16:05] Nohryb: :-) [16:05] creationix: Nohryb: how are you testing this, with ab or something [16:05] creationix: you've got a race condition in there [16:06] Nohryb: with safari, and command-R to reload [16:06] creationix: if you hit it twice in a row with an empty cache it will bork [16:06] Nohryb: any page. The 1st time it's ok, after reload not anymore [16:07] Nohryb: i don't think so, i don't push it into the cache until the end event... [16:08] Nohryb: have uncommented line 39 ? [16:08] Nohryb: if not the cache is disabled... (sorry) [16:09] creationix: ahh, I see, nevermind [16:09] creationix: are you getting encoding problems then? [16:10] kriskowal has joined the channel [16:12] Nohryb: yes [16:12] Nohryb: is it working for you ? [16:14] creationix: Nohryb: how do you use it? [16:15] creationix: ahh, I need to send a host header right? [16:15] tjweir has joined the channel [16:16] Nohryb: i launch it, i load a page in safari (OK) the hit reload (command-R) and plufff [16:16] Nohryb: as soon as I see "fromCache" in the terminal... plufff [16:17] creationix: yes, but how do you use the cache, do you configure your browser to use it? [16:17] Nohryb: fromCache --> a broken page [16:18] creationix: I mean, how do you use the proxy? [16:19] Nohryb: i launch it locally, and have set the http proxy to 127.0.0.1:8080 in sys/preferences (I'm on a Mac) [16:19] WALoeIII has joined the channel [16:19] Nohryb: sys/network/preferences/advanced/proxy.... [16:20] creationix: ahh, I see [16:21] creationix: hmm, working for me, what url is giving you trouble [16:21] Nohryb: any, all, after reload. It's mostly the images that are broken (a question mark) [16:22] creationix: i tested this one http://static.creationix.com/piaggio_mp3.jpg [16:23] Nohryb: have you tried any normal page, eg github [16:24] Nohryb: ? [16:26] creationix: no, I can't change my system wide settings, I'm manually hitting the site using HTTPClient [16:26] creationix: ok, I set the http proxy setting in firefox, now I see the broken images [16:28] indiefan has joined the channel [16:28] Nohryb: ok [16:29] creationix: hmm, suddenly it's working for everything [16:29] creationix: this is strange [16:30] Nohryb: fromCache ? [16:31] bpot has joined the channel [16:31] creationix: yep [16:31] joshbuddy has joined the channel [16:32] mkovacs has joined the channel [16:32] isaacs has joined the channel [16:32] isaacs has joined the channel [16:34] james has joined the channel [16:34] botanicus has joined the channel [16:34] kjeldahl_: creationix: You've got a bug in haml-js. forceXml => forceXML.. :-) [16:34] creationix: Nohryb: you're not caching the status code, you're assuming 200 [16:35] creationix: kjeldahl_: I see, it's leaking a global [16:35] creationix: I hate it when two wrongs look like a right in testing [16:36] kjeldahl_: creationix: It crashes. ReferenceError: forceXML is not defined [16:36] mape: creationix: need to make sure there are a lot of wrongs ;) [16:36] kjeldahl_: Pretty simple fix though.. :-) [16:36] creationix: kjeldahl_: you're right, I wonder what happened [16:37] creationix: I always run the test suite before pushing [16:37] creationix: it catches that for sure [16:38] creationix: kjeldahl_: ok, it's fixed and the tag is moved [16:41] stepheneb_ has joined the channel [16:41] kjeldahl_: creationix: Not quite I think. [16:41] creationix: what's that [16:42] kjeldahl_: You just removed the "var ... forceXml" instead of changing it to "var ... forceXML". [16:42] kjeldahl_: Still undefined. [16:42] kjeldahl_: I thought it was a simple typo on your part, and when I change it locally it just works. Haven't looked at the details though. [16:42] creationix: no, I renamed it, http://github.com/creationix/haml-js/commit/d1c8e8c9ddc5a0ce3e1964215827a81b45526037 [16:43] jan____ has joined the channel [16:43] kjeldahl_: Ah, my git "undo local changes" didn't quite get that last commit. Thanks, looks better now. [16:44] TobiasFar has joined the channel [16:45] mape: So me as being totally new to open source (all hail steve jobs) [16:45] mape: Is node more github heavy then others? [16:45] mape: Or is it just that it is new and others aren't around to it "yet" ? [16:45] creationix: Nohryb: I have no clue, but I do know that if you want to implement a caching proxy you need to honor all the cache headers or it won't be very useful to anyone [16:45] creationix: good luck [16:46] sudoer has joined the channel [16:46] colin__ has joined the channel [16:47] Nohryb: creationix: THANKS [16:48] CIA-75: node: 03Tim Caswell 07master * r8f79169 10/ src/node.js : Remove node.* deprecation messages. - http://bit.ly/dAruVv [16:48] creationix: _ry: thanks [16:48] _ry: creationix: thanks [16:49] Nohryb: Ona last q: just pushing the chunks into an array is ok, yes ? I mean, there no need to use Buffers for that, right ? [16:49] creationix: Nohryb: the chunks are buffers already [16:49] creationix: you can optimize a little by merging them all into one big buffer when done though [16:49] Nohryb: ahh [16:49] teemow has joined the channel [16:50] creationix: but if you specify the encoding on the read stream, then the chunks will be strings in that encoding [16:54] martoche has joined the channel [16:54] mjijackson has joined the channel [16:56] martoche has left the channel [16:57] RayMorgan_ has joined the channel [16:57] Nohryb: I'm still learning this new latest api... :-) [17:03] mjijackson has joined the channel [17:04] inimino: devinus: oh, yeah, you're right [17:04] Nohryb has joined the channel [17:05] devinus: Yes! [17:05] devinus: what do i win? [17:07] piranha has joined the channel [17:07] inimino: deep and enduring satisfaction [17:08] brianmario has joined the channel [17:09] isaacs: devinus, inimino: what was the question? [17:10] devinus: isaacs: we were just wondering how to use < and > in markdown [17:10] isaacs: interesting [17:10] devinus: isaacs: markdown allows inline html [17:10] isaacs: right [17:10] isaacs: i'm familiar with that [17:10] isaacs: does < work? [17:10] isaacs: or does it turn that into &lt;? [17:11] devinus: < works [17:11] devinus: ya [17:14] isaacs: devinus: is it smart enough to know the difference between < foo and [18:48] JimBastard: its soo annonying i have to restart FF [18:48] JimBastard: ive seen this happen soo many times across multiple platforms and versions [18:48] devinus: mjr_: yes. [18:48] devinus: mape: what other ways are there ? [18:49] mape: devinus: new Date().getTime() ? [18:49] devinus: mape, oh, it's less ambiguous [18:49] mape: spending bytes like it was commodity :/ [18:49] devinus: mape: to me, new Date().getTime() is saying new (Date().getTime()) [18:49] mikeal has joined the channel [18:50] mape: Hmm k, owell, off to hunt pizza [18:51] devinus: mape: function foo() { return Date; }; new foo() [18:51] felixge has joined the channel [18:55] saikat has joined the channel [18:55] felixge: _ry: had a chance to look at my exit code patch yet? [18:56] _ry: felixge: only briefly [18:57] _ry: i don't understand it actually [18:57] _ry: rstatus is not the exit code? [18:57] inimino: js> +new Date // devinus [18:57] gbot2: inimino: 1272481034509 [18:57] felixge: _ry: looks generally good, or do you think we need another interface? [18:57] felixge: _ry: no, it is not [18:57] felixge: (it may be on your platform, but that'd be coincidence) [18:57] noonat: JimBastard: Yeah, I've had that issue [18:57] felixge: if the exit code is '1', then rstatus is 256 [18:58] noonat: JimBastard: If you're seeing it happening when refreshing via cmd-r or whatever, try pressing enter in the location bar instead [18:58] _ry: felixge: where can i read about this? [18:58] noonat: I'm not what that does different, but that often cleans up Firebug for me [18:58] devinus: inimino: snow as balls compared to (new Date()).getTime() [18:58] JimBastard: thanks noonat [18:58] devinus: inimino: (i tested that too) [18:58] JimBastard: i was going crazy on that shit [18:58] devinus: slow* [18:59] noonat: Haha :D [18:59] JimBastard: espically stacked with jquery 1.4.2 and live binding and unbind and die() [18:59] JimBastard: shits broken to begin with in jQuery [18:59] felixge: _ry: a process that was killed due to a term signal actually has no exit code [18:59] JimBastard: die() is just fail [18:59] felixge: (at least according to the wait(2) man) [18:59] JimBastard: gotta use namespaced events and stay away from live at all costs [18:59] JimBastard: live() is not fun on complex apps [18:59] pedro has joined the channel [19:00] _ry: felixge: okay - reading about it [19:00] felixge: _ry: _ry http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-5 [19:00] _ry: sorry for my ignorance [19:00] felixge: _ry: I had no idea either, I just noticed all my exit codes being >> 256 :) [19:01] rolfb has joined the channel [19:01] inimino: devinus: hm, good to know [19:01] _ry: felixge: yeah i notice that too [19:01] pedrobelo: guys, I'm having trouble trying to spawn another process: execvp(): No such file or directory [19:01] _ry: i was planning on looking into it [19:01] pedrobelo: is that coming from node? v8? os? [19:01] _ry: pedrobelo: ? [19:01] mjr_: pedrobelo: that's probably a bad filename [19:01] _ry: oh right [19:01] _ry: what mjr_ said [19:02] mjr_: pedrobelo: in the docs I put an example of checking for that to detect failed exec [19:02] _ry: pedrobelo: do you have /bin/sh ? [19:02] pedrobelo: I double checked :{ it's all absolute paths, I can run it from my terminal or from Ruby's popen [19:02] pedrobelo: _ry: I do [19:02] pedrobelo: it's certainly something about the command I'm trying to run, ls works [19:02] mjr_: can you change the thing you are trying to spawn to some other command to make sure you can at least spawn other stuff? [19:06] charlesjolley has joined the channel [19:06] mjr_: pedrobelo: to strictly answer your question, that error is probably from node, node_child_process.cc:217. [19:06] charlesjolley_ has joined the channel [19:06] rictic has joined the channel [19:06] mjr_: But I dunno why it is broken. [19:07] nwhite has joined the channel [19:09] _ry: felixge: maybe we should reutnr the signal as a string? [19:10] pedrobelo: mjr_: thanks! checking int [19:10] pedrobelo: *it [19:10] felixge: _ry: is there a function to translate a signal num to string? [19:10] _ry: no, but one could be made [19:10] _ry: what do you think though? [19:11] devinus: anybody know if/where the JSConf videos were put up ? [19:11] devinus: i still only have a slight idea of what happened there [19:11] mape: seems they are milking things [19:11] felixge: _ry: hm, I think the actual signal names are historic and crappy [19:11] felixge: _ry: I'd rather have numbers everywhere [19:11] _ry: that's certainly more efficent [19:12] felixge: just look at: http://en.wikipedia.org/wiki/SIGHUP [19:12] _ry: and probably more inline with w3 javascript apis [19:12] felixge: it's used for something totally different than it was meant to be [19:12] pedrobelo: in fact, how would you guys feel about a little patch to net.js so listen() will consider the first arg a port if it matches /^\d+$/ ? [19:13] pedrobelo: I used to set my ports with env vars [19:13] pedrobelo: so now I need to run parseInt heh [19:13] felixge: pedrobelo: I don't think we should recognize strings as numbers, type juggling is bad enough in JS as it is, no need to make it worse [19:14] felixge: _ry: I think I'd also like to replace the strings in the events we emit right now [19:14] felixge: for signal handlers [19:14] TobiasFar has joined the channel [19:14] _ry: shrug - maybe [19:15] _ry: they accept numbers too iirc [19:15] _ry: it'd be nice to put the whole signal handler stuff into its own module [19:15] pedrobelo: makes sense. well I guess it's a decision on type consistency vs api convenience heh [19:15] _ry: oh right - you listen on process [19:16] _ry: hm [19:16] _ry: that's why it's not in its own module [19:16] _ry: process.addListener('SIGHUP') [19:16] _ry: kind of cute, or ? [19:17] _ry: var signalHandlers = require('singal_handlers'); [19:17] _ry: signalHandlers.trap(signalHandlers.SIGHUP, fn) [19:17] _ry: ugly [19:17] felixge: yeah [19:17] _ry: namespacing is for losers [19:18] _ry: ;) [19:18] felixge: process.addListener(9, ...) will certainly look shitty [19:18] felixge: :/ [19:18] snsr has joined the channel [19:18] _ry: anyway - yeah i think your patch is good [19:19] felixge: _ry: I guess if we keep the strings elsewhere, I might as well update my patch [19:19] felixge: _ry: consistency is always better [19:20] uberjar has joined the channel [19:22] felixge: _ry: where do you define the signal names right now? [19:22] felixge: can't find it [19:22] isaacs has joined the channel [19:22] _ry: felixge: node_constatnts.cc [19:22] _ry: i think [19:23] felixge: _ry: yeah, got it [19:23] _ry: felixge: i reverse look up errno [19:23] felixge: _ry: let me change my patch [19:23] robrighter has joined the channel [19:23] _ry: you can do it the same way [19:24] jansc has joined the channel [19:25] felixge: _ry: where do you do reverse lookup, can only find the NAME -> INT lookup [19:25] _ry: felixge: http://github.com/ry/node/blob/8f79169aef6cd447ff193616e49335473eeb15ba/src/node.cc#L282 [19:25] felixge: _ry: sweet [19:27] _ry: felixge: you can put that reverse look up in node.cc too [19:27] _ry: and add it to node.h [19:27] _ry: i may want that again [19:30] felixge: _ry: hmmm, my lacking C skills give me trouble :) [19:30] felixge: the function is already defined in node.cc, right? [19:31] felixge: so I'd have to add it to the header file in order to use it in node_child_process? [19:31] _ry: right [19:32] felixge: _ry: I added 'static inline const char *errno_string(int errorno);' to node.h, but I still get: Undefined symbols: [19:32] felixge: "node::errno_string(int)", referenced from: [19:32] felixge: node::ChildProcess::OnExit(int) in node_child_process_7.o [19:35] _ry: don't make it inline [19:35] _ry: also no static [19:35] felixge: ah, makes sense [19:35] felixge: let me try [19:35] _ry: it should also be signo_string [19:35] felixge: seems to work : ) [19:36] felixge: _ry: signo_string ? [19:36] felixge: that would mean splitting it up in 2 functions, right? [19:36] _ry: yeah separate functions for sigs and errno [19:36] _ry: those values might overlap [19:36] _ry: you can't have one function [19:37] _ry: (in math speak signos U errnos -> strings is not well defined) [19:37] felixge: _ry: should errno_string() be made available in node.h as well? [19:38] _ry: nah [19:39] felixge: _ry: k [19:44] felixge: _ry: in node_constants.cc SIGNO_CASE(SIGTERM); SIGNO_CASE(SIGCHLD); are defined without the #ifdef SIGTERM wrapper [19:44] felixge: (would love to link to github, but that's down) [19:44] felixge: is that for a particular reason? [19:44] felixge: or a mistake? [19:44] brainproxy: zomg github is offline [19:45] saikat has joined the channel [19:48] felixge: _ry: it also seems that SIGABRT === SIGIOT ??? [19:48] _ry: shrug [19:48] _ry: felixge: because they're always defined [19:49] isaacs: it'd be pretty awesome if i could get npm to 0.1.0 in time for 5/5 [19:49] _ry: if SIGTERM is missing the system is fixed [19:49] _ry: s/fixed/fucked/ [19:49] felixge: _ry: ok [19:49] mjr_: same thing if you are on OSX, right? [19:49] mjr_: zing [19:49] felixge: seems like SIGIOT is an alias for SIGABRT [19:49] felixge: so I'll resolve SIGIOT to SIGABRT, ok? [19:49] _ry: sure [19:50] _ry: felixge: you're using a switch so whichever comes first should win [19:50] _ry: right? [19:51] felixge: _ry: no, C doesn't let me have the same case twice [19:51] felixge: at least gcc won't [19:51] felixge: not sure [19:52] _ry: felixge: do a #if defined(SIGABRT) ... #elif defined(SIGIOT) [19:52] felixge: ok [19:52] _ry: er this: [19:52] _ry: #ifdef EAGAIN ERRNO_CASE(EAGAIN); [19:52] _ry: #else [19:52] _ry: # ifdef EWOULDBLOCK ERRNO_CASE(EWOULDBLOCK); [19:52] _ry: # endif [19:52] felixge: _ry: #elifdefined does not exist, I'll use #ifndef [19:52] _ry: #endif [19:52] maushu has joined the channel [19:52] felixge: hm ok [19:53] felixge: let me try [19:53] _ry: somehow pasting doesn't work very well in irssi [19:53] _ry: http://gist.github.com/382620 [19:54] felixge: _ry: that works [19:55] binary42 has joined the channel [19:56] _ry: or maybe it should be #if SIGABRT != SIGIOT [19:56] _ry: SIGNO_CASE(SIGIOT) [19:56] _ry: #endif [19:58] CIA-75: node: 03Felix Geisendörfer 07master * r6a5a09b 10/ (6 files in 5 dirs): (log message trimmed) [19:58] CIA-75: node: Properly handle child process exit codes [19:58] CIA-75: node: The child process 'exit' was returning the status of the process, rather than [19:58] CIA-75: node: the exit code. This patch properly deconstructs the status into the exit code [19:58] CIA-75: node: and the term signal a process may have received. [19:58] CIA-75: node: See: [19:58] CIA-75: node: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-5 [19:58] CIA-75: node: 03Ryan Dahl 07master * raf3ced7 10/ src/node.cc : Resolve EWOULDBLOCK to string if different thatn EAGAIN - http://bit.ly/cPaP5K [19:58] _ry: fuck [19:58] maushu: Language! [19:59] CIA-75: node: 03Ryan Dahl 07master * r9b2aac6 10/ src/node.cc : Resolve EWOULDBLOCK to string if different thatn EAGAIN - http://bit.ly/9TX3R1 [19:59] _ry: forced push - sorry [19:59] _ry: felixge: http://github.com/ry/node/blob/9b2aac61b28056418ee3a8fdb2c7226acc65d37c/src/node.cc#L302-310 [19:59] felixge: _ry: ? [20:00] _ry: that's how you should do it [20:00] felixge: ah, accidental push [20:00] _ry: EAGAIN and EWOULDBLOCK are also the same (usually) [20:03] felixge: _ry: _ry http://github.com/felixge/node/commit/21c1b8029971c60aa9400c927bf70e5efe999b3f [20:03] felixge: (damn, bad whitespace, let me fix) [20:04] felixge: _ry: http://github.com/felixge/node/commit/0169944696dfe3e396689464eb8251e87247aaf8 [20:12] felixge_ has joined the channel [20:15] felixge__ has joined the channel [20:20] tlrobinson: digitalspaghetti: jake doesn't work on node yet but it would be cool if it did [20:21] tlrobinson: digitalspaghetti: once again it comes down to sync vs async :) [20:22] tlrobinson: i'm not sure what the best way to solve that is. perhaps provide a callback to each task which can signal completion [20:25] derbumi has joined the channel [20:26] felixge has joined the channel [20:26] felixge has joined the channel [20:27] _ry: felixge: ping [20:28] _ry: felixge: simple/test-child-process-kill.js broke [20:28] felixge: _ry: pong [20:28] felixge: ok, checking [20:28] mattly has joined the channel [20:28] _ry: felixge: i'm guess you should assert exitStatus null [20:28] _ry: check signal is "SIGTERM" [20:30] ncb000gt has left the channel [20:30] isaacs: tlrobinson: you could check out the way that npm handles async stuff. i was going to rewrite some of its stuff to use sync fs io, since it's not a run-time thing anyway, but found that it would actually make the code *more* complicated, since the current way works so nicely with http fetches (which can't be sync in node) [20:35] felixge: _ry: seems like people don't get the fact that HttpClient only uses a single socket: http://news.ycombinator.com/item?id=1302007 [20:36] felixge: _ry: anyway, fixed the patch: http://github.com/felixge/node/commit/0def5e3177489c6ba902d9c10f8db898dc6bb2cf [20:41] tmpvar has joined the channel [20:42] tmpvar: yo [20:43] softdrink has joined the channel [20:43] bmizerany has joined the channel [20:43] bmizerany has joined the channel [20:44] sudoer has joined the channel [20:49] romy has joined the channel [20:51] nwhite has joined the channel [20:53] _ry: felixge: yeah - we need ot fix that [20:53] _ry: i think it's not good ot have http client tied to a socket [20:53] _ry: http just doesn't work that way - each client needs a pool of connections [20:54] felixge: _ry: We might not want to bind the client to one port / host [20:54] felixge: maybe the client metaphor itself is flawed [20:54] CIA-75: node: 03Felix Geisendörfer 07master * rf8a3cf9 10/ (9 files in 5 dirs): (log message trimmed) [20:55] CIA-75: node: Properly handle child process exit codes [20:55] CIA-75: node: The child process 'exit' was returning the status of the process, rather than [20:55] CIA-75: node: the exit code. This patch properly deconstructs the status into the exit code [20:55] CIA-75: node: and the term signal a process may have received. [20:55] CIA-75: node: See: [20:55] CIA-75: node: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-5 [20:55] _ry: the client should be like a browser [20:55] isaacs: _ry: really? [20:55] isaacs: _ry: why not make the client like a request, and then build something like a browser on top of that? [20:55] isaacs: though, i guess there's already a ClientRequest object... [20:55] mjr_: I dunno, the browser's view of what goes on with its outgoing HTTPs, at least the view from JavaScript, is a pretty limiting one. [20:56] _ry: well i mean at some level we have to deal with connections [20:56] isaacs: right [20:56] _ry: the user facing level should not [20:56] _ry: you should just do [20:56] isaacs: i guess the client could have 8 ClientRequest objects under the hood [20:56] isaacs: or something like that [20:56] _ry: client.get('http://blah.com/index.html', function (res) { }) [20:56] _ry: if you've just done a similar get, then it will pipeline [20:56] _ry: if not it will open a new connection [20:57] _ry: if it's an http 1.0 server it will do a new connection [20:57] _ry: etc [20:57] felixge: _ry: yeah, that'd be awesome [20:58] felixge: the fact that I can't directly talk to URL is *really* annoying [20:58] felixge: :) [20:58] felixge: * to a [20:58] _ry: basically i've build the low level interface [20:58] _ry: we need a high level abstraction on it [20:58] _ry: http.cat is just a hack [20:58] _ry: http clients are hard. [21:01] felixge: _ry: +1^10 [21:01] felixge: s/1^10/10^1/ [21:01] felixge: s/10^1/10^10/ [21:01] tmpvar: heh [21:02] felixge: ACTION will learn to type one day [21:03] jedschmidt has joined the channel [21:04] _ry: i'm not sure someone has attempted to write an http server and client and share code between them before [21:07] rektide: dual sided templating is a trivial case o that [21:10] kriszyp has joined the channel [21:10] darkf has joined the channel [21:11] tmpvar: rektide, huh? [21:12] isaacs: felixge: +1E10 [21:12] rektide: dont know why i cant find linkage, but dual sided templating used to be a term for a template that was designed to run client or server side [21:12] tmpvar: interesting [21:12] tmpvar: like jaxer stuffs? [21:13] rektide: http://ajaxpatterns.org/Dual-Side_Templating [21:13] tmpvar: this is one of the reasons I wrote jsdom.. so I could do templating with pure [21:13] rektide: jaxer/jsdom is definitely the smarter way to do it [21:13] rektide: c [21:13] felixge: _ry: I'm sure people have tried it, but their death didn't make the news ;) [21:14] rektide: i think ry was talking about lower level code *shrug* but this is one example of shared server / client code [21:14] duke_ has joined the channel [21:15] duke_: hi - just installed the latest master from git and got the following error after make && make install (Debian Lenny VM): [21:15] rektide: heres one of the first posts mentioning Dual sdied templating-- http://softwareas.com/dual-side-templating [21:15] tmpvar: rektide, you don't need to convince me, heh [21:16] rektide: indeed! [21:16] duke_: https://gist.github.com/130e2655ef308a4a8937 [21:16] duke_: any idea what went wrong? [21:18] tmpvar: duke_ did you git pull? [21:18] tmpvar: as apposed to a fresh clone? [21:18] duke_: tmpvar yes [21:18] tmpvar: run a make distclean [21:18] tmpvar: first [21:20] duke_: but it was a complete new pull ... I rm the previous folder ... do I have to do it anyway? [21:20] herby_sk: _ry, felixge: Fix for FreeBSD build failure on child_process.cc: http://github.com/herby/node/commit/b0a0ddbfa578da670116ed6d449ac2a86cd557ba [21:20] tmpvar: duke_, in that case, probably not [21:20] JimBastard_ has joined the channel [21:20] JimBastard_: hey, is anyone from Heroku lurking in here? [21:21] duke_: hm ... [21:21] tmpvar: lol [21:21] JimBastard_: hi tmpvar [21:21] tmpvar: duke_ you might want to paste your config output somewhere [21:21] JimBastard_: i just emailed them i want in on that beta [21:21] felixge: herby_sk: hm, weird that I don't have to do that for linux/osx [21:22] CIA-75: node: 03Herbert Vojčík 07master * r5d9753f 10/ src/node_child_process.cc : Fix child_process.cc build failure for FreeBSD. - http://bit.ly/cWXNut [21:22] felixge: but sys/wait.h was mentioned in the libev docs, so this looks right [21:22] _ry: herby_sk: thanks [21:23] herby_sk: felixge: WIFEXITED and co. macros were missing [21:24] duke_: tmpvar where to find them? [21:25] tmpvar: duke_, ./configure output -- my bad [21:25] ddollar has joined the channel [21:25] duke_: ok wait [21:26] herby_sk: _ry: if you can consider these two mini-patches: [21:26] herby_sk: http://github.com/herby/node/commit/612257be338f3bc811c58d4c7f52b9ade2fff74e [21:26] herby_sk: http://github.com/herby/node/commit/55bafae1d6d39b449fdfc108418b873fbae8283a [21:26] felixge: _ry: could you have a quick look at the "Who is it?" section of this blog post I'm working on: https://gist.github.com/d37ad11e0fe340bfe372 ? [21:26] felixge: _ry: I want to make sure I get Joyent's relationship to node right [21:27] sveisvei has joined the channel [21:27] mjr_: _ry: I've got a python-based HTTP server and client that share a lot of code. [21:27] mjr_: But they sure don't support all of HTTP 1.1 [21:27] _ry: felixge: that's correct - we're also using it [21:27] dgathright has joined the channel [21:27] felixge: _ry: can you say for what? [21:28] felixge: _ry: or is not indicating it as I've done ok? [21:28] _ry: communication systems :) [21:28] felixge: _ry: ok, that says nothing :D [21:29] felixge: _ry: if you could look at the 'Get to the point!' / 'Huh' section as well, I'd love to hear if you think the king / servants metaphor makes sense [21:29] duke_: tmpvar http://gist.github.com/382750 [21:29] herby_sk: felixge: nice metaphor [21:30] felixge: I guess a servant would be a thread [21:31] felixge: herby_sk: yeah, well I guess the metaphor isn't perfect, but I think it helps to reason about how to write programs in node [21:31] _ry: i don't like the metaphor [21:31] _ry: sounds too much like threads [21:31] felixge: _ry: well it is [21:31] felixge: node is 1 main thread that gets callbacks from other threads [21:31] _ry: not its not ;) [21:31] felixge: no? [21:31] _ry: except for a few file system functions - evertyhing is done synchronously [21:32] _ry: and those are only done asyncly because the kernel does not provide a way to do them non-blocking [21:32] felixge: _ry: s/sync/async ? [21:32] mjijackson: felixge: yes ;) [21:33] _ry: no [21:33] _ry: everything is synchronous :) [21:34] _ry: only one thing is done at a time [21:34] noonat: it's just that things aren't done immediately when you ask them to [21:34] jedschmidt has joined the channel [21:34] _ry: you just nver wait [21:34] felixge: _ry: it becomes really difficult to reason about async programming when you call it sync P) [21:34] felixge: :) [21:35] felixge: the underlaying sys calls are performed synchronously, right? But the callbacks are async [21:35] _ry: there is a difference between asyn and nonblocking [21:35] felixge: ah [21:35] mjijackson: _ry: ah. that's what i was looking for [21:35] felixge: that's a better way to put it [21:35] felixge: :) [21:35] _ry: we're nonblocking (largely) [21:35] mjijackson: i've always considered them the same thing [21:36] _ry: but basically you get the same interface in node [21:36] _ry: the async stuff is marhalled back into the main thread [21:36] _ry: it might as well be non-blocking [21:36] felixge: _ry: Can you come up with a natural metaphor for this? [21:37] _ry: under the hood though, you actually do read from a file at the same time as you do network i/o [21:37] _ry: (if you have two cpus) [21:37] _ry: but if you have 100 sockets open [21:37] _ry: you only ever deal with one at a time [21:37] felixge: I think the king/servant one is a pretty good simplification of things. I mean it's like the physical model of atoms - it's not accurate - but useful [21:37] noonat: http://en.wikipedia.org/wiki/Reactor_pattern [21:37] _ry: its just that you jump between them very very quickly [21:38] _ry: i think the best is not to explain it :) [21:38] herby_sk: felixge: maybe "don't call us, we'll call you" ... something bureacratical or the like? [21:38] _ry: "it's like browser javascript" [21:38] _ry: "click a button get a callback" [21:38] _ry: "connect to a server, get a callback" [21:38] awenkhh: tmpvar may I ask if you see something what could cause the compile error in the ./configure output? [21:38] noonat: are you quoting yourself?! :D [21:38] JimBastard_: IoC [21:38] felixge: _ry: people don't understand browser JS either :) [21:39] JimBastard_: the hollywood principle [21:39] felixge: _ry: this is not for people who get it, but for those who "dont" [21:39] JimBastard_: don't call us, we'll call you [21:39] felixge: :) [21:39] tobeytailor has joined the channel [21:39] JimBastard_: i had been doing JS for 6 years before i realized JS was synchronous. i just assumed everything was aysnc and coded accordingly [21:39] felixge: it's actually the opposite. "Call us, we'll wait for your call" [21:39] felixge: :) [21:39] JimBastard_: tobeytailor! [21:40] tobeytailor: hey! [21:40] tobeytailor: back in germany! [21:40] noonat: Yeah. A lot of people think JS is async. [21:40] mjr_: I think the best way to explain the uniqueness of node is that event-based programming makes it possible to deal with big numbers of connections, and javascript is a great environment in which to write event-based programs. [21:40] CIA-75: node: 03Herbert Vojčík 07master * r7e4c128 10/ src/node.js : Minor stylistic changes. - http://bit.ly/c47LUC [21:40] felixge: JimBastard: yeah I think it's a common misconception [21:40] mjr_: I like event better than blocking or async [21:40] CIA-75: node: 03Herbert Vojčík 07master * r7a72885 10/ src/node.js : process.evalcx has a deprecation message. - http://bit.ly/cZLqBe [21:40] JimBastard_: welcome tobeytailor ! its marak [21:40] tobeytailor: i know [21:40] tobeytailor: :) [21:40] tmpvar: lol [21:40] _ry: herby_sk: thanks [21:40] JimBastard_: 99 luftballoons! [21:40] tobeytailor: :D [21:41] noonat: felixge: I've found it easiest to explain as a giant queue of things to do [21:41] JimBastard_: good to see you are back. someone has to take down adobe [21:41] tmpvar: JimBastard_, you hackin tonight? [21:41] tobeytailor: def [21:41] _ry: felixge: we have an order of magnatude performance gain over threaded concurrency - maybe that's a good way of putting it [21:41] herby_sk: _ry: np [21:41] noonat: felixge: Where some of those things to do might be checking whether you have any new data available from places [21:41] felixge: _ry: now you're the one who makes wrong comparisons (without context) :) [21:42] felixge: _ry: threading is up-to-par for c < 10 [21:42] felixge: :) [21:42] JimBastard_: hell yeah tmpvar [21:42] _ry: felixge: doubtful [21:42] JimBastard_: its top secret + hook.io again [21:42] _ry: but maybe [21:42] tmpvar: JimBastard_, I should be getting out of here soon, I may stop on by [21:42] _ry: i guess it depends on what it is [21:42] isaacs: _ry: re r7a72885 i thought that comma-first was accepted standard in nodejs, is this changing? [21:42] JimBastard_: im gonna be here until 8 or so. let me see if charlie is around [21:43] felixge: well, I obviously made that number up as well, but there are scenarios where our model will not perform much better than threads [21:43] devinus: _ry: can you proof read this suggestion im going to make to the commonjs mailing list, i dont want to sound stupid: http://pastie.org/939985 [21:43] felixge: that's all I'm saying [21:43] tmpvar: JimBastard_, ah [21:43] JimBastard_: hit me on gchat i gotta sign out of IRC getting too distracted [21:43] _ry: devinus: sounds good. and i share the opinion [21:43] _ry: isaacs: not for var stuff. kind of undecided. [21:44] _ry: i like it for objects [21:44] towski has joined the channel [21:44] isaacs: _ry: that's where it's the most effective, though [21:44] isaacs: in terms of spotting and preventing errors, that is [21:44] _ry: but unless the semicolon is also on the last line it doesn't make sense [21:44] isaacs: _ry: if you drop the semicolon, it makes perfect sense. [21:44] tobeytailor has left the channel [21:44] isaacs: it's unnecessary [21:44] _ry: e.g. [21:44] _ry: var a = 1 [21:44] _ry: , b = 2 [21:44] _ry: ; [21:44] tmpvar: that is pretty odd looking [21:44] _ry: yeah [21:44] isaacs: tmpvar: but it makes errors jump out more readily. [21:45] _ry: we don't want to get too far away from normal js style , i think [21:45] isaacs: _ry: we make normal js style. [21:45] _ry: there is a social aspect of it [21:45] isaacs: _ry: you underestimate the mindshare and leverage that nodejs has. [21:46] devinus: isaacs: no, i think the commonjs folks od [21:46] devinus: do* [21:47] herby_sk: Away with the source code! Long live AST (and editors for editing in form of "source code")! :-) [21:47] isaacs: herby_sk: that's actually not such a bad idea. [21:48] isaacs: but until we have a good js tidy program, it's not really all that realistic. [21:48] mjr_: That's why I just do what jslint strict whitespace says, because at least it is a consistent, fast tool that's available everywhere. [21:48] _ry: basically i don't want style to distract from writing software [21:48] _ry: but i do like comma-first objects :) [21:49] _ry: so cute, esp in the repl [21:49] devinus: ew [21:49] mjr_: I find that I don't mind them at all anymore on sys.inspect. [21:49] isaacs: mjr_: see, that's just it. [21:49] isaacs: your brain rejects any attempt to change it, but the fact is, it is highly plastic. [21:50] felixge: ACTION wishes he we would live in "Node Standard Time", but gotta head to bed now [21:50] _ry: jquery determines js style :) [21:50] herby_sk: Well, Lars Bak told something about "intermediate is not needed, js source is the new 'bytecode'" in his talk with Eric Idontknowthesurname. So the intermediate would be the editor (or git plugin or ...) that changes code to coder's formatting upon load and to repository's upon save... [21:50] mjr_: yeah, so somebody just needs to build a different validator, syntax checker, reformatter, and then we can work out potentially better ways to format things. [21:50] jedschmidt: g'night, felixge. [21:50] isaacs: _ry: then why aren't we mixing tabs and spaces like crazy? [21:50] isaacs: _ry: jquery HAS no style. [21:50] awenkhh: hm - nobody got an idea whats going wrong here with make: http://gist.github.com/382772 ? [21:50] _ry: :) [21:51] isaacs: also 200-character lines [21:51] isaacs: i think that's like, required in jquery [21:51] _ry: awenkhh: what os? [21:51] awenkhh: _ry: Debian Linux VM [21:52] mjr_: I have large monitors with lots of pixels, but 200 characters wide is pretty crazy. [21:52] devinus: isaacs: jQuery stile: if ( foo ) [21:52] devinus: style* [21:52] _ry: awenkhh: just a sec [21:52] awenkhh: _ry: no problem ;-) [21:53] _ry: i guess it also broke the build bots [21:53] _ry: http://buildbot.nodejs.org:8010/builders/Ubuntu%20Karmic/builds/229/steps/shell_1/logs/stdio [21:53] mjr_: isaacs: I really do like the idea of trying to improve human comprehension of code by finding the best way to format it. [21:53] isaacs: mjr_: seems kinda like an obvious win, right? ;) [21:54] mjr_: isaacs: yeah. Reading code can be really fun when it's readable. [21:54] mjr_: isaacs: but we need better tools, otherwise people go off and get all crazy and/or sloppy. [21:54] isaacs: mjr_: the tricky bit is getting a heuristic other than "this looks weird!" [21:55] isaacs: mjr_: because, while that's somewhat helpful, it's like trying to climb a mountain by the rule of always going up. [21:55] mjr_: Yeah, I have this "climbing problem" argument pretty much every week at my job. [21:56] awenkhh: _ry: same problem [21:56] admc has joined the channel [21:56] devinus: mjr_: you have no idea.... [22:02] Yuffster has joined the channel [22:02] brapse has joined the channel [22:03] awenkhh: _ry: installing it now on my Mac to see what make returns [22:05] _ry: awenkhh: im fixing it at the moment [22:05] _ry: no need [22:06] awenkhh: _ry: ok cool ... [22:07] CIA-75: node: 03Ryan Dahl 07master * r3bb21b5 10/ src/node.cc : Fix signo_string for linux and solaris - http://bit.ly/brQHgl [22:07] _ry: awenkhh: that should fix it [22:08] awenkhh: _ry: ok - thank's! [22:08] kriszyp_ has joined the channel [22:10] Dethe has joined the channel [22:10] davidsklar has joined the channel [22:11] bajeczka has joined the channel [22:12] robrighter_ has joined the channel [22:14] awenkhh: _ry: the fix did it ! [22:15] awenkhh: _ry: thanks :-) [22:15] rictic has joined the channel [22:15] rednul has joined the channel [22:20] tilgovi has joined the channel [22:23] teemow has joined the channel [22:27] _ry: herby_sk: that style change broke the tests :/ [22:27] _ry: i didn't look at it carfeully but in the 'var' statement you changed the function calls [22:27] brainproxy has joined the channel [22:28] CIA-75: node: 03Ryan Dahl 07master * r6d85802 10/ src/node.js : basicRequest -> module.requireNative - http://bit.ly/c49X1Q [22:29] herby_sk: yes, I discoivered this also in this very moment... I did some rebasing to switch the order of commits, so it permeated from future work... I"m sorry. I ru nthe test always, but not after rebase-style-of-reordering [22:29] herby_sk: :-/ [22:29] awenkhh: when I try the process.openStdin() example I get the following error http://gist.github.com/382826 [22:29] _ry: yeah, me too- oh well [22:30] awenkhh: shall I open a bug somewhere? [22:32] awenkhh: _ry: oh I think the fix is in r6d85802 [22:33] awenkhh: oversight ... [22:34] awenkhh: yeah working [22:36] jedschmidt_ has joined the channel [22:41] herbySk has joined the channel [22:43] romy has joined the channel [22:47] joshbuddy has joined the channel [22:48] charlesjolley has joined the channel [22:50] pedrobelo: whoo it's out: Heroku is now hosting Node.js apps (experimental) http://blog.heroku.com/archives/2010/4/28/node_js_support_experimental/ [22:50] romy: well shit, wish I knew sys.puts/print parses \r literally so I wouldn't have to wonder where my output went [22:50] mattly has joined the channel [22:52] hone has joined the channel [22:55] heycarsten has joined the channel [22:56] gf3 has joined the channel [22:57] tlrobinson_ has joined the channel [22:57] hassox has joined the channel [23:00] noonat: romy: hahaha [23:00] noonat: that must have been fun [23:02] quirkey_ has joined the channel [23:02] romy: yeah, it was even more fun given that this was the 1st time I played with v8/node.js [23:02] charlesjolley has joined the channel [23:03] shrughes has joined the channel [23:04] kriskowal: _ry, commonjs site seems to be back up [23:05] Aria has joined the channel [23:07] _ry: kriskowal: who runs that anyway [23:07] kriskowal: Dantman [23:08] kriskowal: daniel friesen [23:09] hone has left the channel [23:10] rednul has joined the channel [23:14] jfernandez has joined the channel [23:15] _ry: kriskowal: can we discuss binary/f here or should we do it on the mailing list [23:16] _ry: ACTION mails the list [23:16] kriskowal: #commonjs or the list, yeah [23:16] kriskowal: ry^ [23:16] kriskowal: _ry^ [23:17] freshtonic has joined the channel [23:21] CIA-75: node: 03Herbert Vojčík 07master * r039d13b 10/ src/node.js : DRY binding('stdio') - http://bit.ly/aafInr [23:21] CIA-75: node: 03Thomas Lee 07master * ra63ce5c 10/ (3 files in 3 dirs): Allow callers to disable PHP/Rails style parameter mungeing in querystring.stringify - http://bit.ly/d4hftP [23:22] romy has left the channel [23:25] isaacs: _ry: any word on the module refactor stuff yet? [23:26] jwm has joined the channel [23:28] steadicat has joined the channel [23:31] _ry: isaacs: soon [23:32] isaacs: _ry: ok. it's one of a shrinking list of things blocking npm from being beta ready. [23:33] tlrobinson_ has joined the channel [23:34] binary42 has joined the channel [23:42] tlrobinson_: neat http://blog.heroku.com/archives/2010/4/28/node_js_support_experimental/ [23:44] binary42: tlrobinson_: Yeah. I recall bugging their team last Nov. I wasn't expecting to actually get what I asked for... so now I've been told. Heroku rocks. [23:45] pdelgallego has joined the channel [23:48] rednul has joined the channel [23:48] tmpvar has joined the channel [23:49] bpot has joined the channel [23:51] gwoo: i just saw fanout.node.js [23:52] herbySk: isaacs: haven't you included two unnecessary commit in your rebase? [23:52] mikeal: _ry: I'm a little confused by your phrasing "If not, then it would also be a blocker." [23:52] gwoo: this is the second way of referring to a node module [23:52] mikeal: this is the same issue as the test that's checked in [23:52] gwoo: most people use node- [23:52] mikeal: are you saying that this means it is, or is not a blocker? [23:52] isaacs: herbySk: which unnecessary commit? [23:53] herbySk: commits, the two before your actual changes... mmt [23:53] herbySk: http://github.com/isaacs/node/commit/88cfac7566c9d4b3a48d88bd628ab4592e8d6838 [23:53] herbySk: http://github.com/isaacs/node/commit/3f265f36529e244dffcf2c1d737ff6932ee32142 [23:54] mjr_: mikeal: I think _ry is wondering if issue 77 is the same as the failing proxy-large-response test, and the answer is: yes. [23:54] mikeal: yes, it is the same [23:55] isaacs: herbySk: yeah, that is odd... i just did a pull --rebase from ry master [23:55] charlesjolley has joined the channel [23:55] isaacs: and then i accepted his version of any conflicts in code that i hadn't touched [23:55] devinus has joined the channel [23:56] _ry: mikeal: issue 77 is a blocker [23:56] charlesjolley_ has joined the channel [23:57] mikeal: cool, that clarifies everything [23:57] mikeal: thanks [23:57] mjr_: mikeal: I'm hopeful for a fix for that one as well. My node-based proxy has posted 1.1M docs into couchdb so far. [23:57] isaacs: [23:57] mikeal: if you proxy replication of a large database this bug makes it fail [23:57] mikeal: we just had to kill our load balancer and go with something in erlang because of it [23:58] mjr_: Yeah, I buffer the whole post up so I don't do chunked, which works around it. [23:58] mikeal: we can't be buffering all chunked responses in our load balancer [23:58] _ry: i'm going to curl up with that problem right now - it'd be good to have it fixed sooner than later [23:59] _ry: i think it was unapproachable before due to another bug in net.js