[00:13] _ry: we should do a zlib module which uses the thread pool [00:14] _ry: and build it into core [00:14] mjr_: yeah, zlib would be great [00:14] mjr_: current child process solution is a bit awkward [00:14] _ry: it'd just break the stream into chunks send each to one of 5 threads [00:15] _ry: send progress updates to the main thread [00:15] MattJ: Could that pattern be generalized into an API? So these things don't necessarily have to go in core? [00:15] _ry: it doesn't have to go into core [00:16] _ry: z-compression is pretty important [00:16] MattJ: Just thinking, today it's zlib, tomorrow it's... [00:17] _ry: toying with the diea of supporting spdy natively [00:17] _ry: would need zlib stuff [00:17] isaacs: _ry: have you considered building an external node lib? [00:18] _ry: it should probably be external, actually [00:18] _ry: but whatever - it would be cool [00:18] isaacs: oh, there's amqp, i forgot [00:18] isaacs: was just teasing :) [00:18] MattJ: Well, +1 to zlib :) [00:18] _ry: ACTION hasn't quite figured out what goes in node and what doesn't yet :) [00:18] _ry: well, i'm not going to do it :) [00:18] _ry: too busy [00:19] MattJ: Heh [00:19] _ry: but if someone wants to do it, i can tell them how [00:19] _ry: maybe [00:19] MattJ: I'd do it, but am also too busy [00:19] jedschmidt has joined the channel [00:19] maushu: Wait, thread pool? [00:19] maushu: What thread pool?! [00:19] MattJ: But the zlib API isn't hard [00:19] isaacs: _ry: did you see my patch about the xtreme comma stuff? [00:19] _ry: isaacs: nope [00:20] _ry: isaacs: same repo? [00:20] isaacs: http://gist.github.com/374321 [00:20] _ry: oh okay [00:20] isaacs: if that would make the commit more palatable, i could rebase it in there. [00:21] _ry: yeah please do - i'll look at it again on friday [00:21] _ry: maushu: yeah, you know about the thread pool? [00:21] _ry: maushu: node has one built in [00:21] kenneth_reitz has joined the channel [00:21] _ry: maushu: it's only accessable form the c++ layer though [00:22] _ry: would be hot for doing multi-core stuff [00:22] _ry: compression is an obivious example [00:23] MattJ: Hmmmm [00:25] MattJ: I guess sending Javascript functions to the thread pool to execute would be too tricky (and if solved not worth half the effort due to locking) [00:25] _ry: yeah, that's not going to happen [00:25] MattJ: but I don't know much about V8 in that respect [00:25] _ry: threads are for experts [00:25] MattJ: +1 [00:25] _ry: experts can program c++ :) [00:26] MattJ: I prefer C, but ok :) [00:35] rektide has joined the channel [00:43] isaacs: _ry: ok, it's there. rebase ftw. [00:44] isaacs_ has joined the channel [00:46] mattly has joined the channel [00:49] JimBastard has joined the channel [01:02] stepheneb has joined the channel [01:11] ncb000gt has joined the channel [01:17] joshbuddy has joined the channel [01:17] joshbuddy has joined the channel [01:22] ditesh|cassini has joined the channel [01:24] hassox has joined the channel [01:24] markwubben has joined the channel [01:41] charlesjolley has joined the channel [01:43] charlesjolley has joined the channel [01:48] bpot has joined the channel [01:54] bpot_ has joined the channel [02:01] mrjjwright has joined the channel [02:04] KungFuHamster has joined the channel [02:08] hassox has joined the channel [02:08] mikeal has joined the channel [02:21] stepheneb has joined the channel [02:24] nsm has joined the channel [02:25] sh1m has joined the channel [02:28] RayMorgan has joined the channel [02:37] nsm has joined the channel [02:40] bpot has joined the channel [02:45] pjb3 has joined the channel [02:55] ditesh|cassini has joined the channel [02:55] mikeal has joined the channel [03:02] saikat has joined the channel [03:10] sudoer has joined the channel [03:17] user9 has joined the channel [03:23] jacobat_ has joined the channel [03:25] brapse has joined the channel [03:26] noonat has joined the channel [03:29] PyroPete1 has joined the channel [03:29] softdrink has joined the channel [03:47] tlrobinson_ has joined the channel [03:48] mrjjwright has joined the channel [03:50] isaacs_mobile has joined the channel [03:53] isaacs has joined the channel [03:59] fed1 has joined the channel [03:59] bpot has joined the channel [04:03] fictorial has joined the channel [04:14] rtomayko has joined the channel [04:16] charlesjolley has joined the channel [04:23] steadicat has joined the channel [04:25] hassox has joined the channel [04:28] hassox has joined the channel [04:36] mikeal has joined the channel [04:37] JimBastard has joined the channel [04:40] bmizerany has joined the channel [04:43] tlrobinson_ has joined the channel [04:43] cruxst has joined the channel [04:56] isaacs_mobile has joined the channel [04:57] isaacs has joined the channel [05:01] Yuffster has joined the channel [05:01] hassox has joined the channel [05:03] isaacs has joined the channel [05:09] kkaefer has joined the channel [05:20] creationix: crazy question, anyone here use html image maps? [05:20] micheil: creationix: are we on the same planet? [05:20] creationix: I think I'm stuck in a time warp [05:21] creationix: but I need image maps with multiple polygons per region [05:21] creationix: is that possible? [05:21] micheil: no idea man. [05:21] micheil: why do you need an image map? [05:21] creationix: I'm tweaking this http://davidlynch.org/js/maphilight/docs/demo_usa.html# [05:21] micheil: would it be better achieved with an image and some links? [05:22] micheil: creationix: look up raphaël.js [05:22] creationix: does vector based highlighting based on data in the imagemap coords [05:22] micheil: if you have all the node points, then raphaël is what you want [05:22] creationix: yeah, I may be better off on this starting from scratch [05:22] micheil: it uses canvas + vml (supports down to something like IE6 or 5) [05:23] micheil: rather then using the deprecated image maps [05:23] creationix: but are the areas clickable and accessable [05:23] creationix: can I tab to each state them [05:23] micheil: creationix: eg: http://raphaeljs.com/australia.html [05:24] micheil: I'm pretty sure you can bind click events [05:25] saikat has joined the channel [05:25] micheil: yeah, if you look at that example's source code, it uses the .onmouseover and .onmouseout bindings, you could probably pair with jquery to use $.bind [05:26] creationix: I wonder if you can get tab-stops working [05:27] creationix: mouse events are easy [05:27] micheil: tab-stops.. possibly. [05:27] micheil: not sure about that [05:28] noonat: maybe you could have some other element that is a tab stop [05:28] noonat: and catch focus events on that [05:28] micheil: or that [05:28] creationix: I know raphael is svg in most browsers, so it might work, but not sure about the vml backend [05:28] micheil: although, the canvas/vml element would probably catch a tabstop, unless you tell it not to. [05:29] micheil: creationix: just ask on the google group about tabstops, he's an aussie, he's bound to be friendly. [05:30] noonat: hahah [05:30] creationix: micheil: and it's day over there, so he should be up [05:31] micheil: yes [05:31] micheil: plus iirc, raphael is backed by Atlassian software [05:31] micheil: (currently one of AU's biggest web development firms) [05:32] JimBastard: i got to talk to dmitri a whole bunch [05:32] JimBastard: hes a cool guy [05:32] micheil: heh, he is [05:32] micheil: ACTION met him at webdirections in sydney last year [05:33] JimBastard: mikeal: you alive? trying to get your proxy working again [05:33] mikeal: i'm here [05:33] JimBastard: am i being retarded here? you are suppose to access the proxy via a url right? [05:33] sh1mmer has joined the channel [05:34] creationix: thanks micheil [05:34] JimBastard: http://localhost:8000/?port=80 [05:35] micheil: no worries tim :) [05:35] micheil: JimBastard: maybe as a pac file? [05:38] siculars has joined the channel [05:38] cmlenz has joined the channel [05:44] JimBastard: mikeal: did you actually test this and get it working? im getting all sorts of issues [05:44] JimBastard: (libev) select: Invalid argument Abort trap [05:44] mikeal: sorry [05:44] mikeal: i was distracted [05:44] mikeal: i never got that [05:44] mikeal: you're using node.proxy.js [05:44] JimBastard: i can try and fix if thats the case [05:44] JimBastard: i just dont know if its suppose to work or not [05:44] mikeal: i tested it [05:44] mikeal: i just set it as the proxy in firefox and browsed around for a whiel [05:45] mikeal: i'm using node master [05:45] JimBastard: ill play around with it some more [05:45] JimBastard: i think i was a bit confused with the usage, but i got it working now [05:45] JimBastard: except for that crash [05:46] mikeal: you updated today right? [05:46] mikeal: cause i pushed the fix a few hours ago [05:46] JimBastard: aye, i think i might have another proxy_pass interfering [05:47] towski has joined the channel [05:47] JimBastard: ill keep playing with it [05:47] mikeal: cool [06:04] rtomayko has joined the channel [06:10] bmizerany has joined the channel [06:22] silentrob has joined the channel [06:28] nsm has joined the channel [06:39] N` has joined the channel [06:57] nsm: I'm getting a "JS2C() takes exactly 3 arguments, 2 given" after updating to latest HEAD, is this a known error? [07:13] piranha has joined the channel [07:13] creationix has joined the channel [07:13] gbot2 has joined the channel [07:13] mape has joined the channel [07:13] Elfix has joined the channel [07:13] webben has joined the channel [07:23] towski has joined the channel [07:32] cmlenz has joined the channel [07:33] teemow has joined the channel [07:40] felixge has joined the channel [07:40] felixge has joined the channel [07:41] TomY has joined the channel [07:41] tisba has joined the channel [07:49] nsm has joined the channel [08:02] cruxst has joined the channel [08:02] kixxauth has joined the channel [08:04] derbumi has joined the channel [08:08] towski has joined the channel [08:13] ditesh|cassini has joined the channel [08:18] tbassetto has joined the channel [08:31] javajunky has joined the channel [08:32] riottaba has joined the channel [08:32] kjeldahl has joined the channel [08:34] felixge has joined the channel [08:34] felixge has joined the channel [08:34] nsm has joined the channel [08:38] sveisvei has joined the channel [08:42] romainhuet has joined the channel [08:48] N` has joined the channel [08:52] xla has joined the channel [08:58] mape: So regarding client.setSecure('X509_PEM'); causing bad arguments, seems it is a check for !args[0]->IsObject() [09:01] mape: #if EVCOM_HAVE_GNUTLS [09:01] mape: Didn't node stop using gnutls? [09:03] javajunky has joined the channel [09:15] mape: Eh, that is strange [09:16] mape: _ry: In node_net.cc on line 873 is args[1] suppose to be args[0] ? (and all the following ones after that) [09:16] mape: Seems to work fine now if I added an empty string to the setSecure.. client.setSecure('','X509_PEM'); [09:17] mape: Seems of from server.setSecure(format_type, ca_certs, crl_list, private_key, certificate) [09:20] nsm has joined the channel [09:26] mape: *off [09:30] mape: Now I'm getting TypeError: Cannot call method 'flush' of undefined and TypeError: Cannot call method 'emit' of undefined [09:30] mape: But the call gets to the server and supplies the post data [09:49] ewdafa has joined the channel [10:01] hellp has joined the channel [10:04] KungFuHamster has joined the channel [10:06] 94SAAF1RH has joined the channel [10:06] cainus_ has joined the channel [10:06] shirro has joined the channel [10:06] zol has joined the channel [10:06] Tekerson has joined the channel [10:06] blazzy_ has joined the channel [10:06] mikemike86 has joined the channel [10:09] tisba has joined the channel [10:23] malkomalko has joined the channel [10:37] nsm has joined the channel [10:45] lobridge has joined the channel [10:47] lobridge: I have a pretty big app, but there's an object leak somewhere. What would be the best method to trace it down? Is there some kind of tool to help with that? [10:51] micheil: valgrind or prof tools.. there's a thread on the mailing list about finding memory leaks [10:51] herbySk has joined the channel [10:52] lobridge: ok thanks ill look it up [10:53] herbySk has joined the channel [10:55] hassox has joined the channel [10:59] jedschmidt has joined the channel [11:00] ssteinerX has joined the channel [11:12] kriszyp has joined the channel [11:23] maushu has joined the channel [11:46] maritz has joined the channel [11:48] nsm has joined the channel [11:48] brainproxy has joined the channel [11:51] TheEnd2012 has joined the channel [11:55] ncb000gt has left the channel [11:56] jaw6 has joined the channel [12:01] zol has joined the channel [12:09] captainbenis has joined the channel [12:16] tisba has joined the channel [12:23] jaw6 has joined the channel [12:25] hassox has joined the channel [12:26] mape: micheil: You poked around at https earlier right? [12:27] micheil: hmm.. nup [12:27] micheil: mikeal maybe [12:27] mape: Yeah [12:27] micheil: that was a proxy, anyway [12:28] micheil: node, afaik, can't yet handle secure sockets, so, no https. [12:28] mape: It works for me, only the api is wrong [12:28] mape: Instead of starting at 0 the args starts at 1 [12:28] mape: so you need to add an argument to the setSecure function that does nothing [12:29] mape: Was wondering if that changed as of lately or if it always had that error [12:32] piranha has joined the channel [12:32] micheil: I'm not sure, if you want, I could try and research into it, but security stuff isn't a strong point of mine [12:32] mape: Nah just figured I'd ask if you knew of the top of your head [12:33] N` has joined the channel [12:34] micheil: ACTION always refs source code [12:34] mape: node_net.cc on line 873 if you want to take a look [12:34] creationix has joined the channel [12:36] micheil: k [12:36] maushu: Okay, jquery really doesn't like my classes. [12:36] maushu: I just noticed that every problem I have is related to jquery. [12:36] mape: maushu: Doing something real wonky? [12:36] maushu: RIA. [12:36] ditesh|cassini has joined the channel [12:36] micheil: maushu: there's a few things like that within jquery. [12:36] micheil: maushu: eg, the forEach in jquery reverses the args [12:37] maushu: Basically, a single page application that uses javascript for everything based on a webservice. [12:37] maushu: micheil: Really? Duh. [12:37] mape: micheil: It does? [12:37] micheil: yeah [12:37] micheil: maushu: seen sammy.js? [12:37] captainbenis has joined the channel [12:38] micheil: maushu: also, if you want something that's often given the image of being heavier, look into Dojo Toolkit, it gets a lot of the stuff right which jquery doesn't [12:38] micheil: also has a bunch of really useful app development features built in [12:38] mape: you mean the $('div').each(function(index){console.log(index)}) ? or $.each({'te':'te','to':'to'}, function(key, value){console.log(this)}) ? [12:39] micheil: yeah [12:39] mape: which? [12:39] micheil: $(div) [12:39] micheil: first [12:39] micheil: it should be item, index; not index, item [12:39] mape: Why not use this? [12:41] micheil: because, the latter syntax there is actually what the ES5 spec is [12:41] mape: Ah [12:41] mape: Guess it is legacy, or they just figured most people use this and the index is handy so the swapped [12:42] micheil: well, afaik, the ES5 spec doesn't use this [12:42] micheil: this relates to the arr or something, I'm not sure on that one there [12:43] mape: Hmm a lot of people throwing in the facebook like stuff [12:44] maushu: micheil: Unfortunately the problem isn't routing (thanks for the sammy info though, I like it) it's the way jquery and classes just don't work. [12:44] captainbenis: whats a good multipart library for node? [12:44] captainbenis: i miss the built in one :( [12:44] maushu: I just can't keep state between what is on the screen and javascript. [12:45] captainbenis: im doing streaming upload to s3 [12:45] captainbenis: http://github.com/isaacs/multipart-js/ is a bit crufty [12:45] mape: maushu: classes as in css or as in js? [12:47] maushu: As in js. [12:47] maushu: I have this class called "Panel". [12:48] rolfb has joined the channel [12:48] maushu: Which I can use to construct forms using json (it's awesome). The problem is then I try to inherit from it to other classes like AdminPanel. [12:50] micheil: maushu: fiunction AdminPanel(args){ Panel.call(this); ... }; then use something similar to node's inherit [12:51] mape: Wouldn't mootools be a better match? Classing and all that [12:51] captainbenis: nm / using the original node.kjs one [12:52] tisba has joined the channel [12:54] micheil: captainbenis: isaac's is actually the better, iirc. [12:55] maushu: mape: It took me a while to convince the bosses to use jquery. I'm not going to tell them now that I need to change to mootools. Specially since microsoft seems to want to use jquery in asp.net. [12:55] mape: Hehe k [12:55] maushu: Now you can see why I want to find a way to make monies. [12:56] mape: Just seems jQuery takes a certain approach and might not be so handy to mix with others [12:56] micheil: iirc from my jQuery UI days, there was a form of class inheritance, but it was rather odd [12:57] maushu: Maybe I should forget about class inheritance and try something else. [12:57] mape: The entire UI thing is rather strange, fetching/altering options after creating and what not [12:57] maushu: After all, javascript is prototypal, not classical. [12:58] mape: Doesn't crockford hate the prototpal approach? [12:59] maushu: mape: Quite the reverse. [12:59] maushu: Well, he doesn't hate it. He just thinks that javascript should use prototypes. [12:59] mape: From what I recall the last video I watched he didn't like the Thingymadoo.prototype. ** deal [12:59] N` has joined the channel [13:02] technoweenie has joined the channel [13:03] micheil: ish technoweenie! [13:04] technoweenie: morning [13:04] micheil: sup? [13:05] noonat has joined the channel [13:06] technoweenie: not much yet, you [13:06] micheil: just been checking off the daily mail... maybe working some on ideocase.com [13:06] sveisvei: mape: I think i hate the pseudoclassical style, object.create is good enough isnt it :)? [13:07] sveisvei: oups... I dont i hate, the crockster [13:07] sveisvei: ACTION isnt friendly with the keyboard [13:08] mape: sveisvei: Can't say I really know enough to see the difference other then the syntax [13:09] mape: so why do this.dothings = function(){} rather then function Woot(){} Woot.prototype.dothings = function(){} ? [13:09] mape: Other for looks [13:10] joshbuddy has joined the channel [13:12] noonat: mape: setting it on the prototype allows things to be more efficient [13:12] noonat: all instances share the same function that way [13:12] mape: So why the hate? [13:16] dnolen has joined the channel [13:18] noonat: Angst? [13:19] mape: ? [13:19] mape: Towards what? [13:19] JAAulde has joined the channel [13:19] noonat: Haha, I dunno. People just don't like learning new things. [13:19] maushu: mape: After I created the methods using prototype how would I inherit from that I class? [13:19] mape: Hehe k [13:20] noonat: Prototypal inheritance probably reveals too much of the seedy underbelly of what the language is doing. [13:21] mape: maushu: Like I said I don't really know, happy to learn though :) [13:21] jherdman has joined the channel [13:23] fictorial has joined the channel [13:24] jbrantly: this.dothings = function() {} allows you to do psuedo-private members [13:24] jbrantly: that said, I prefer attaching to the prototype [13:27] micheil: I too prefer the prototype attachment [13:27] micheil: I only use this.* when setting variables [13:27] mape: Yeah [13:27] micheil: and even then sometimes will set them over the prototype. [13:28] jbrantly: you have to be careful with variables though because usually each instance should have its own set of variables [13:29] jbrantly: I guess it could be useful for defaults.... but I've never really used it that way [13:30] micheil: jbrantly: unless it's a getting type variable (in which case I'm now using Object.defineProperty) [13:31] noonat: maushu: http://gist.github.com/375217 [13:32] jbrantly: it's funny, I'm halfway through a blog post on how I do this [13:33] noonat: i love the ability to override things temporarily for a given link in the chain with prototypal stuff [13:33] noonat: i had a game where i would use that to override behavior for a specific entity while it was under the effects of something, then would delete the override once the effect wore off to make it use the default behavior again [13:44] maushu: noonat: Huh, that works anywhere? [13:44] noonat: Object.create is ECMAScript 5, so no [13:44] maushu: This is not node.js specific (but I would use it node.js too). [13:44] maushu: Drat. [13:44] noonat: But Object.create is basically just doing this: [13:45] maushu: Wait a second, Im already doing this. [13:46] maushu: Your code does show how it works though, thanks. [13:46] maushu: I blame jquery. [13:48] N` has joined the channel [13:50] noonat: maushu: http://gist.github.com/375247 [13:51] quirkey has joined the channel [13:51] gf3 has joined the channel [13:54] maushu: Thanks! [13:56] jbrantly: I usually add one more line to the "inherits" function. Something like childCtor.superclass = parentCtor [13:56] jbrantly: that way, in Bar, I can refer to Foo using Bar.superclass instead of Foo [13:56] maushu: I did that too. I call it parent. [13:57] dnolen has joined the channel [13:57] jtaby has joined the channel [13:57] maushu: So yeah, jquery is just being a pain. [14:00] ewdafa: i'm calling the super class "parent" also [14:00] maushu: I also call the super super class gramps. [14:00] ewdafa: haha [14:01] ewdafa: i approve [14:01] noonat: hahah [14:04] lobridge: I have this small piece of code http://paste2.org/p/787536 and rss keeps increasing, I'm probably doing something stupid but I don't see it :) [14:07] mape: lobridge: the output? or the mem usage? [14:07] lobridge: the mem usage, even after the 3000 requests it never decreases [14:12] maushu: Leak? [14:13] lobridge: looks like it but I don't see where [14:13] mape: Doesn't seem like a lot that could leak [14:16] lobridge: In my app I'm doing requests a lot, so memory keeps increasing really quickly [14:17] pjb3 has joined the channel [14:17] N` has joined the channel [14:18] maushu: lobridge: Makes sense, you are asking for 20 requests, each one that repeats every 800 ms and each one creates a http client. [14:18] maushu: It makes sense for the memory usage to increase. [14:19] lobridge: yeah but after 3000 requests is stops and it should decrease right? [14:20] jbrantly: I keep hearing weird things about v8 garbage collection [14:20] jbrantly: I don't know about it in detail, but the feeling that I get is that it sucks [14:20] freshtonic has joined the channel [14:21] maushu: It doesn't suck. It was made to work a web browser, not server side. [14:21] maushu: _ry would know more details about that. [14:22] lobridge: Weird thing is when I used node 1.33 it didn't increase as drastically like now with 1.91 [14:22] Yuffster has joined the channel [14:23] maushu: Ah, then its possible v8. [14:23] maushu: Since most net code went to javascript. [14:23] lobridge: ah ok [14:23] maushu: How much memory are we talking here? [14:24] lobridge: Connections: 3020 - rss: 17289216 heapUsed: 4676608 and when it starts rss: 6893568 [14:25] maushu: Hmmm. [14:25] lobridge: it's been running for about 10 minutes and the memory hasn't decreased [14:25] maushu: Is it the same site you are connecting to? [14:25] lobridge: yes [14:25] lobridge: just a small (local) php script [14:26] maushu: Well, you could move the parsing and client creation to outside the conn function. [14:26] maushu: Tell me the results after you did that. [14:29] dnolen_ has joined the channel [14:29] alex-desktop has joined the channel [14:29] joshbuddy has joined the channel [14:31] lobridge: maushu: still increasing like before (put the the var url; till the 'request = client.request()' in a function and return the request) [14:32] lobridge: again after the 3000 requests it doesn't decrease [14:32] maushu: It decreases slower I hope. [14:33] BinaryPie has joined the channel [14:33] maushu: Show me the code. [14:33] ditesh|cassini has joined the channel [14:35] lobridge: http://paste2.org/p/787867 [14:40] kriszyp: can the http client request object end up firing something besides "response"? It seems like it can timeout sometimes and never fire "response" and eventually give the event queue the ok to terminate [14:43] jedschmidt has joined the channel [14:44] lobridge: kriszyp: not that I see, but in this case every request succeeds since the length is correct (and it shouldn't terminate because of the setIntervals), but the rss should decrease after some time but it doesn't [14:45] kriszyp: oh sorry, I wasn't responding to your question [14:45] kriszyp: it was my own question :P [14:45] lobridge: ahh ok :D [14:45] kriszyp: occasionally my http requests are silently failing if the server takes too long [14:45] lobridge: it was relevant to my question :) [14:45] kriszyp: heh [14:47] lobridge: you could try error event perhaps [14:48] lobridge: since the httpclient inherits from stream? [14:50] kriszyp: I tried that [14:50] kriszyp: maybe I'll try the timeout event... [14:52] maushu: ACTION facepalms. [14:53] kriszyp: that doesn't seem to fire either :/ [14:53] maushu: Is it necessary to create a http client for each request? [14:53] kjeldahl_ has joined the channel [14:53] mape: maushu: can't you just reuse the client object? [14:54] mape: Or does that mess up the event listeners? [14:54] lobridge: regarding my question or kriszyp's? [14:54] maushu: I have no idea. [14:54] kriszyp: everyone seems to have questions about http client today :) [14:54] maushu: My programmer sense tells me I can reuse the http client. [14:55] maushu: lobridge: You aren't reusing it, btw. [14:55] mape: maushu: But on what request does the eventListeners listen to? [14:55] maushu: You are still creating a client for each connection. [14:55] mape: The last one assigned? [14:55] lobridge: With my app not, every request is to a different server (not the test app I posted here of course) [14:55] maushu: mape: the request created on that client? [14:55] mape: maushu: Yeah but if you create multiple ones [14:56] maushu: You have multiple requests with multiple listeners... what is the problem? [14:56] mape: Not sure, that is why I'm asking [14:56] maushu: ... [14:56] noonat: lobridge: i'm wondering if it has something to do with your setInterval [14:56] noonat: lobridge: i see the heap size increasing every tick that runs, even after processing has stopped [14:56] maushu: mape: You create a http client, you then client any amount of requests you want and for each one they have a listener. [14:57] maushu: *create any amount [14:57] noonat: and when i decreased the interval to every 30 seconds the rss drops DRAMATICALLY after it stops connecting [14:57] softdrink has joined the channel [14:57] noonat: (12mb to 6mb) [14:57] mape: maushu: So a new client.request and append the listeners to that? I thought you meant reusing the client.request obejct [14:57] mape: *object [14:58] lobridge: noonat: that is weird, I looked at this which does the same: http://gist.github.com/243632 [14:58] maushu: You can't reuse the request. [14:58] maushu: At least in a sane way. [14:58] mape: maushu: Well that was what I figured, but thought you meant. Sorry if I caused you harm [14:59] maushu: Yes, I'm currently on fire because of you. [14:59] noonat: lobridge: hmm... i have no idea how v8's internals work, but maybe it's not freeing up things because it still sees memory increasing, thinks it's going to be used anyway? [15:00] sudoer has joined the channel [15:00] mape: maushu: Well, how about I buy you a beer and let you cool down? ;) [15:01] lobridge: noonat: could be, I did read somewhere on the mailinglist that there is code that if there are no evenlisteners it then execute the gc(). [15:02] N` has joined the channel [15:03] lobridge: I've got to run some errands, ill check back later tonight [15:06] jbrantly: what happened to crockbot? [15:07] fictorial: mwahaha *evil laugh* [15:08] sveisvei: ACTION points at fictorial  [15:09] fictorial: hey there's still no way to *force* GC correct? It just runs when the process is idle? [15:14] jtaby has joined the channel [15:15] derbumi_ has joined the channel [15:15] jtaby has joined the channel [15:15] mape: think I read somewhere you can do it manually [15:15] mape: but that had side effects as well [15:29] fizx has joined the channel [15:30] devinus has joined the channel [15:30] inimino: fictorial: you can't from JavaScript, no [15:30] kriszyp: so reading a file seems to trigger the watchFile event (assume because it updates the last access timestamp). Is there anyway to do watchFile (or the read) so it is only triggered when the file contents is modified? [15:30] fictorial: inimino: ok [15:33] jaw6 has joined the channel [15:35] jaw6 has joined the channel [15:35] JimBastard has joined the channel [15:36] hellp has joined the channel [15:41] isaacs has joined the channel [15:44] isaacs: kriszyp: no, but you get the two stat objects. you can just return early if oldstat.mtime.getTime() === newstat.mtime.getTime() [15:44] kriszyp: oh, cool [15:44] kriszyp: that sounds great [15:45] isaacs: kriszyp: function watchFileChanges (file, fn) { fs.watchFile(file, function (o, n) { if (o.mtime.getTime() !== n.mtime.getTime()) fn(o, n) }) } [15:45] kriszyp: great, thank you [15:46] kriszyp: perfect [15:48] whoahbot has joined the channel [15:48] kriskowal has joined the channel [15:50] deanlandolt has joined the channel [15:50] alex-desktop_ has joined the channel [15:54] fizx has joined the channel [15:55] zackattack has joined the channel [15:56] zackattack: Do you guys think node.js would be an appropriate solution for a chat server powering one on one communication? [15:56] cmlenz has joined the channel [15:56] nefD: zackattack: For sure [15:56] nsm has joined the channel [15:57] zackattack: nefD: Cool, cool. Do you know of any cool code I can use as a starting point? [15:58] zackattack: http://dhotson.tumblr.com/post/271733389/a-simple-chat-server-in-node-js [15:59] nefD: zackattack: I'd actually just started with the chat room example on the nodejs home page, and hack in a kind of two way has get/set routine [15:59] zackattack: cool [15:59] nefD: so that way messages submitted from one user only get sent to a corresponding user, and vice versa [16:01] zackattack: right right of course :) [16:01] zackattack: ja, the node.js website is beauiitiful [16:04] voodootikigod_ has joined the channel [16:04] sh1mmer has joined the channel [16:04] jaw6 has joined the channel [16:05] nefD: indeed! [16:05] nefD: the docs are pretty damn helpful [16:06] brainproxy has joined the channel [16:06] nefD: also make sure to check out the module & article lists on the github pages [16:07] mape: The only issue I have with the wiki approach is that it is hard to follow it [16:07] nefD: the modules, while being useful in their own right, are also extremely great for studying and learning more about using node for your own ends [16:07] nefD: mape: AMEN! [16:07] mape: ACTION gives nefD some wine [16:07] mape: Blessed be your sins [16:07] nefD: mape: Hence my obsession with some kind of automated rss feed or somesuch which tracks updates to those pages :P [16:08] mape: Hehe yeah, or a separate page which is more formal and "offical" [16:08] mrjjwright has joined the channel [16:08] nefD: im not so concerned about who does it, so long as its chronologically based [16:08] mape: Where dates of updates/inits as well as ratings are given some weight [16:09] nefD: right now, if I wanted to know what has been released (or updated, fot that matter) since april 2nd, i'd have no way of doing so [16:09] BinaryPie has joined the channel [16:09] mape: Yeah, I think we talked about the notifications, I have an early build of the prowl notifier for node out, http://github.com/mape/node-prowl [16:09] nefD: oooh nice.. checking it out now [16:10] mape: Allows you to get iPhone push notifications though node. There are some issues though, it throws exceptions on request (don't really know the reason) but it works fine [16:10] mape: Seems the issue is getting the info back for the server rather then sending it [16:10] zackattack: nefD: Is there a tutorial manual or should I just read the API doc? [16:11] nefD: im thinking even more base level right now.. ie: a simple (automated) blog style site which simply lists a daily digest [16:11] mape: Also there was a quirk using https with node so that might break when node "fixes" it [16:11] mape: nefD: Or an rss :) Hell even an twitter account [16:11] mape: would do wonders [16:11] mape: tawtt.com/node-news [16:11] nefD: nefd: Theres not really a tutorial per se, although reading through the node_chat example project is a great start, as well as any information on the site (aside from, and also in addition to the api) [16:12] nefD: mape: Yes, an rss would be ideal, I think [16:13] mape: But it can't be that hard to check for new stuff? Would be easier if there was a parser that was more handy but yeah. Just keep the stuff in there in a db, if it doesn't matches it is new == add, and archive [16:13] nefD: I have that JS based diff project downloaded and working on a basic level that someone had posted yesterday.. just need to tweak it so that it works more uniformly with the github wiki pages and ONLY displays new changes in the 'pretty html output', rather than also showing the old/removed changes.. shouldnt be tough [16:13] mape: I would love for something like phpQuery to be working in node [16:14] nefD: indeed [16:14] mape: or well, jQuery [16:14] mape: But just have a css selector, fetch the text of that and archive [16:14] mape: But seems the wheel gets a lot of nice reinventions ;) [16:14] nefD: hehe, yes [16:21] N` has joined the channel [16:21] bpot has joined the channel [16:22] silentrob has joined the channel [16:23] steadicat has joined the channel [16:25] mape: nefD: so have you looked at formalicing your idea or is it just a fun project? [16:25] JimBastard: sizzle works in node [16:25] JimBastard: using JSDOM [16:26] noonat has joined the channel [16:26] JimBastard: tmpvar and i will be doing a blog post / tutorial on it soon. im waiting for him to get back from AZ [16:26] JimBastard: YUI already works [16:26] JimBastard: as well [16:26] mape: JimBastard: Has there been an implementation? The only implementation is the html parser that gives you a 3k object that is a pita to work with [16:27] softdrink has joined the channel [16:27] JimBastard: what do you mean implementation? [16:27] JimBastard: of what? [16:27] mape: Something that works that I can use [16:27] mape: In node that is [16:27] JimBastard: YUI + JSDOM apparently does [16:28] mape: I only got that you can generate html using that [16:28] mape: Not traverse it and get info [16:28] JimBastard: not sure you'll have to talk to tmpvar [16:28] mape: Not sure though, but it seems I would have heard about it if it worked [16:28] mape: Seems it is something a lot of people want [16:29] javajunky: pretty sure it does. [16:29] nefD: mape: Havne't formalized anything yet at all.. at this point its all conceptual, (that would be nice) stuff [16:30] javajunky: http://www.yuiblog.com/blog/2010/04/09/node-js-yui-3-dom-manipulation-oh-my/ [16:30] mape: nefD: Feels like something to chew on :) A good thing for the community (at least those that are really interested) [16:30] nefD: I guess my major hangup for now is developing around the notion of parsing from those wiki pages on github, simply because they are subject to change, whether in location o structure [16:30] nefD: mape: For sure! I've been looking for wards to contribute to the node group, maybe this would be a good way to do so [16:31] javajunky: mape: brings those two projects together I guess. [16:31] mape: nefD: I would love to be of help, my day job is doing front end stuff so if that is of need make sure to give me a shout [16:31] softdrink has left the channel [16:32] admc has joined the channel [16:32] mape: javajunky: Yeah, that article is more about generating html though? Rather then traversing and extracting info [16:32] javajunky: but part of the example is Y.one('body') … Y.one('#foo') .. isn't that DOM traversal/querying ? [16:34] mape: Indeed [16:34] mape: Seems strange they wouldn't mention it though, not that that makes any difference [16:34] javajunky: I guess its kinda assumed ? [16:35] mape: I didn't [16:36] mape: And if most did, I'm amazed noone did something that allowed people to fetch info [16:36] mape: It might just be that, but seems like a golden oppertunity to do something nice :) [16:38] softdrink has joined the channel [16:38] almay has joined the channel [16:39] almay has joined the channel [16:42] jtaby has joined the channel [16:45] jamesduncan has joined the channel [16:51] charlesjolley has joined the channel [16:56] derferman has joined the channel [16:57] okito has joined the channel [16:58] pjb3 has joined the channel [17:03] tlrobinson_ has joined the channel [17:05] joshbuddy has joined the channel [17:09] kriskowal: _ry i talked to herbySk about his minimal branch. [17:10] kriskowal: it's my impression that it could do less and be better, but i need to check it out and try my use case with it. [17:10] _ry: kriskowal: cool [17:10] _ry: kriskowal: would be great if you try it out [17:11] kriskowal: it would be good to know your preconceptions of what node-core would be [17:11] kriskowal: alternate executable, alterate execution path with particular arguments? [17:11] RayMorgan has joined the channel [17:11] _ry: not sure [17:11] _ry: i think either could work [17:11] mape: _ry: Did you have time to chech the ssl "bug" i talked about earlier? [17:11] kriskowal: the big question for me is how much would be done before the script executes. [17:11] _ry: mape: no [17:12] _ry: mape: what bug? [17:12] _ry: mape: oh, the arguments thing [17:12] mape: _ry: setSecture has args[0 instead of 1] [17:12] mape: yeah [17:12] mape: *secure [17:12] mape: So the api is offset with 1 [17:12] _ry: mape: i need more information - did you run it with debug mode? [17:12] kriskowal: in my ideal world, the script would execute with an unmolested global scope, and receive the native module loader as an argument [17:12] mape: No standard, but the c code is offset so don't se how the debug mode would change anything? [17:13] _ry: kriskowal: i mean, you're the use case - so i think you should determine that :) [17:13] jtaby has left the channel [17:13] kriskowal: k thanks. i'll let you know. [17:13] mape: Also having issues with Cannot call method 'flush' of undefined and Cannot call method 'emit' of undefined [17:14] mape: Even though the request goes to the server correctly [17:14] mape: using https [17:15] mape: Code at http://github.com/mape/node-prowl/blob/master/lib/prowl.js [17:15] mape: If you want an api-key I'll pass mine for easy testing [17:16] mape: Using latest version for git (node) [17:16] mape: Pretty basic code so should be easy enough to find the issue [17:17] mape: _ry: But more or less it is a matter of client.setSecure('','X509_PEM'); working but client.setSecure('X509_PEM'); doesn't [17:18] ewdafa has joined the channel [17:18] mape: and restler uses the latter and the docs do as well (from what I can gather) [17:18] mape: And just seems like using 1 rather then 0 as the origin is the cause [17:20] mape: Looks to be added in http://github.com/ry/node/commit/b6dda612495d7edb73250649ae53bdf3e7fc223e [17:22] _ry: mape: that's really old [17:22] herbySk: _ry: kriskowal said interesting thing (which I wanted long ago): that process shoult be global (possibly not any other things). Would you be interested in changing the node core system changed so that process is not global but could be acquired by require("process").process? [17:22] _ry: mape: what docs are you using? [17:22] herbySk: _ry: s/shoult/shouldn't/ [17:23] _ry: mape: http://github.com/ry/node/blob/master/test/simple/test-http-tls.js [17:23] _ry: herbySk: no [17:23] _ry: herbySk: i like process being global [17:24] piranha has joined the channel [17:24] herbySk: _ry: ok [17:24] mape: _ry: Hmm worked of restler which I figured was up to date, the docs didn't mention it (from what I found) But why the offset of 1 in the args? Since this works [17:25] pg has joined the channel [17:25] mape: The ofsetting the args by one that is [17:25] mape: With no deprication message [17:26] pg has joined the channel [17:27] _ry: mape: i'm not sure why that works - but supposedly you need a 'credential' object [17:27] N` has joined the channel [17:27] mape: _ry: Yeah, but the one you pasted is a server no? [17:27] mape: What I'm doing is a client [17:28] mape: And I assumed the c backend returned an object when I passed the string 'X509_PEM' [17:28] _ry: mape: http://github.com/ry/node/blob/master/test/disabled/tls_client.js [17:29] mape: So with the new way of doing it I need to assign a file that has read/write permission to even do a client https? [17:30] mape: And fixturesDir === ? [17:30] _ry: http://github.com/ry/node/tree/master/test/fixtures/ [17:30] mape: Just /tmp/ ready for write? [17:30] mape: Ah k [17:30] mape: So my implementation works but just in a broken "should not work" kinda way? [17:30] _ry: i don't think you need ot give a certificate in order to connect via https [17:31] _ry: but i haven't used this code - it's being developed by rhys [17:31] mape: So the createCredentials could be passed with empty args? [17:31] mape: or an empty object? [17:32] _ry: mape: i think you can do client.setSecure() [17:33] mape: _ry: Hmm k, but createConnection doesn't seem to support requet so I can't set the path within the host.. [17:34] mape: *request [17:36] mape: Owell guess I'll stick to the broken kinda works code as of now till I figure out the proper way [17:42] JimBastard has joined the channel [17:43] ewdafa has joined the channel [17:43] jedschmidt has joined the channel [17:43] mattly has joined the channel [17:50] CrabDude has joined the channel [17:51] ssteinerX has joined the channel [17:52] brainproxy has joined the channel [17:52] stepheneb has joined the channel [17:53] CodeOfficer has joined the channel [17:56] quirkey_ has joined the channel [17:58] quirkey_ has joined the channel [18:02] ahc has joined the channel [18:06] towski has joined the channel [18:06] nsm has joined the channel [18:08] nikhil_ has joined the channel [18:08] derbumi has joined the channel [18:08] xla has joined the channel [18:08] adamholt has joined the channel [18:08] yatiohi has joined the channel [18:08] bajeczka has joined the channel [18:08] nodejs_v8 has joined the channel [18:08] wereHamster has joined the channel [18:08] mayerbacher has joined the channel [18:08] gsf has joined the channel [18:08] martyn___ has joined the channel [18:08] wil_ has joined the channel [18:11] ssteinerX has left the channel [18:17] saikat_ has joined the channel [18:19] mikeal has joined the channel [18:22] towski has joined the channel [18:25] indiefan has joined the channel [18:32] mikeal: _ry: are you going to this sfjs thing tonight? [18:33] nrstott has joined the channel [18:34] tekky has joined the channel [18:35] nrstott: I'm trying to use the eclipse debugger and i'm getting "Failed to connect to the remote browser" and on the script I'm getting a message... [18:35] nrstott: ChromeDevToolsHandshake: (no value) [18:35] nrstott: Error 0 [18:35] nrstott: sorry for the multiple lines, didn't realize i had linebreaks in that, was pasting it from Skype. [18:35] nrstott: Any ideas about that error? [18:39] _ry: mikeal: unfortunately not [18:39] _ry: nrstott: are you using this http://wiki.github.com/ry/node/using-eclipse-as-node-applications-debugger [18:40] nrstott: yes [18:41] _ry: hmm - i don't know [18:41] binary42 has joined the channel [18:41] dnolen has joined the channel [18:41] jedschmidt: hey, can anyone point me to any docs that explain what happens in the case of a recursive 'require'? [18:42] jedschmidt: where module a requires module b and vice versa. [18:43] konobi: jedschmidt: 2 secs [18:43] isaacs: jedschmidt: it's not clear from http://wiki.commonjs.org/wiki/Modules/1.1? [18:44] tlrobinson: it's not a problem [18:44] isaacs: jedschmidt: basically, one of them gets an "unfinished" object. a - > b, b -> a. b gets a's exports object, but it's not finished yet, maybe. [18:44] jedschmidt: isaacs: so node follows this spec? [18:44] isaacs: jedschmidt: mostly, yes. [18:44] isaacs: jedschmidt: more soon, hopefully [18:45] jedschmidt: so they get an unfinished object, but there's only one canonical result from a require, right? [18:45] isaacs: jedschmidt: well, it's the same object, yes [18:45] isaacs: it's just maybe not finished yet [18:45] isaacs: so it might not have all the things that a hangs on exports [18:45] nrstott: _ry, does this give you any insight? http://www.whiteboard-it.com/Capture.JPG [18:45] konobi: jedschmidt: there's a visual diagram somewhere [18:45] jedschmidt: so if they don't need the result of the module immediately, they'll have access to all its eventual properties? [18:46] isaacs: but it's the same exports object, ie, === [18:46] jedschmidt: konobi: ah, that would help. [18:46] konobi: jedschmidt: still trying to find it [18:46] isaacs: jedschmidt: yes, you've got it. [18:46] fictorial: anyone have node code that will get the memory usage of another process (node or otherwise) handy? I can certainly go parse /proc/pid/blah on linux, etc. just do that? [18:46] maushu has joined the channel [18:46] jedschmidt: isaacs: great, that's what i needed to know. [18:47] jedschmidt: isaacs: my mind was about to asplode there. [18:49] stephenlb has joined the channel [18:49] pjb3_ has joined the channel [18:50] konobi: jedschmidt: can't seem to find it =0/ [18:50] jedschmidt: konobi: thanks for looking! i think i'll be okay. [18:59] konobi: hhhmmm... surprised V8 hasn't implemented Function.prototype.bind() yet [19:00] joshholt_ has joined the channel [19:02] quirkey has joined the channel [19:04] rtomayko has joined the channel [19:04] dnolen has joined the channel [19:06] charlesjolley has joined the channel [19:07] rtomayko has joined the channel [19:23] cmlenz has joined the channel [19:23] konobi: jedschmidt: http://codespeaks.com/modulr/spec_dependency_graph.html [19:24] javajunky has joined the channel [19:25] jedschmidt: konobi: wow, never would have occurred to me there'd be so many cases. [19:36] binary42 has joined the channel [19:38] towski has joined the channel [19:40] WALoeIII has joined the channel [19:45] pedro__ has joined the channel [19:50] binary42 has joined the channel [19:51] pedro__ has joined the channel [19:57] dnolen_ has joined the channel [19:57] rtomayko has joined the channel [20:00] gwoo has joined the channel [20:03] RayMorgan_ has joined the channel [20:04] fictorial: ACTION wishes there was a way to read "heapUsed" of a child process while the child is busy churning away on something in a tight loop [20:06] mjr_: spawn another child with ps? [20:07] RayMorgan_ has joined the channel [20:08] fictorial: I'm looking for v8's heapUsed [20:12] fictorial: I'm basically trying to assert that a child does not use too much memory. The problem is, what do I exactly measure? RSS? VM? Private pages? Well I just really care about what's going on in v8. But I cannot have the child notify the parent since the child is running untrusted code (I'm working on a sandbox) and I cannot force it to yield, etc. [20:12] fictorial: so I can look at the child from the outside... but I'd prefer to look at it from what v8 is doing. [20:13] fictorial: I think I'm just going to have to assert that VmHWM does grow over some configurable limit. Thoughts? [20:13] kjeldahl has joined the channel [20:16] mjr_: wouldn't you just want to enforce all of that kind of stuff with ulimits? [20:20] zackattack has joined the channel [20:25] fictorial: how would that work on just the child process? do you mean setrlimit? [20:27] fictorial: I suppose if setrlimit is not exposed in node that I could launch /bin/sh on a shell script that sets ulimit -m and then does an exec but meh [20:28] bmizerany has joined the channel [20:29] mattly has joined the channel [20:30] RayMorgan has joined the channel [20:31] teemow has joined the channel [20:43] mjr_: yeah, I meant ulimit because those syscalls aren't exposed in node... yet. [20:44] mjr_: The ulimits give you a lot of good stuff that you'll want to set for running untrusted code. [20:45] fictorial: I suppose. The problem I have with that is how does v8 react to ENOMEM for instance? I'd prefer to monitor it myself and kill the child so that I can explain to a user that the child was killed because it was using too much memory, etc. [20:45] saikat_ has joined the channel [20:47] mjr_: Yeah, it is a bit of a crude instrument. But ti's also enforced at a very low level, so it's likely to always work. [20:50] mjr_: mikeal: you are really lashing out against your old codefriend Python. [20:50] mjr_: Is she out running other people's code already? [20:50] mikeal: she just never really loved me [20:50] mikeal: and i'm bitter :) [20:51] blackdog` has joined the channel [20:55] _ry: does python trap sigint? [20:56] dnolen has joined the channel [20:56] saikat_: _ry i think it can [20:56] saikat_: if you listen for it [20:56] _ry: mikeal was complaining that he can't ^C from python immediately [20:57] mikeal: it's not just that [20:57] mikeal: if a thread is going, it won't exit [20:57] mikeal: if you make all the threads daemon threads [20:57] mikeal: it'll try to stop them [20:57] mikeal: if something bad happens, it'll just hang indefinitely [20:57] _ry: ah [20:57] WALoeIII has joined the channel [20:57] mikeal: you can trap it, and call sys.exit(), but it never really exist [20:57] mikeal: er exits [20:58] _ry: somehow node, by not doing anything sometimes feels snappy [20:58] mikeal: not reliably anyway [20:58] mikeal: from calling sys.exit() in Python to actually exiting can take seconds [20:58] mikeal: it depends on what you're doing [20:58] mikeal: but it's ludicrous [20:59] mape: taking care of hair is expensive [21:00] _ry: what really bothers me about node, like, on a fundemntal level is that [21:00] _ry: node script.js | head -1 [21:00] _ry: doesn't work by default [21:00] mape: but ludacris never cared much about open source [21:00] _ry: maybe i should just add a listener to stdout's 'error' event [21:00] _ry: and exit(1) if it occurs [21:01] mikeal: i don't know about that [21:01] mikeal: it seems like too much [21:03] blackdog` has left the channel [21:10] maushu: Don't take away my ^C! [21:10] maushu: my *fast* ^C [21:11] herbySk: kriskowal: perhaps this is nearer to the thing you wanted? http://github.com/herby/node/commit/13b176cdd5165bc5afcc825e03a5a83b6fb13c5f [21:12] kriskowal: what's the gist? [21:13] kriskowal: i mean gist in the dictionary sense [21:14] mjr_: I've fought that sigint issue with threaded python programs for days. I eventually gave up. [21:15] jedschmidt has joined the channel [21:17] kriskowal: herbySk building ry/master on mac os 10.6 fails for me; it's not caused by your changes. [21:18] kriskowal: i'll do a patch on the last stable; it works fine [21:18] softdrink has joined the channel [21:19] herbySk: _ry: thanx, good to know... if you can configure parameter in narhwal engine, mayeb the commit I sent you earlier is one that makes you happy - it tries toas little as possible if it has --boot argument, just load script with function and call that function with process as parameter [21:19] herbySk: s/toas/to do as/ [21:20] herbySk: _ry: sorry, it was not to you [21:21] herbySk: kriskowal: thanx, good to know... if you can configure parameter in narhwal engine, mayeb the commit I sent you earlier is one that makes you happy - it tries toas little as possible if it has --boot argument, just load script with function and call that function with process as parameter [21:21] kriskowal: herbySk ok. i have to merge conflicts, but i'll try it [21:23] softdrink has joined the channel [21:23] charlesjolley has joined the channel [21:25] CIA-77: node: 03Ryan Dahl 07master * rd70474d 10/ (3 files in 3 dirs): SIGPIPE on stdout should kill the process by default - http://bit.ly/domZac [21:25] brianmario has joined the channel [21:25] noonat: You don't need a certificate [21:26] noonat: WHOOPS [21:26] noonat: way scrolled up :P [21:29] herbySk: kriskowal: you do not need to bother with module system stuff if you want to plug in your own, so instead of trying to solve conflict simply do not include any lib/module.js and take src/node.js as-is [21:30] herbySk: kriskowal: or take src/ and lib/ into working build as-is and you're basically done [21:30] kriskowal: m. my stab at it didn't work out. would you mind preparing a branch based on last stable? [21:31] kriskowal: herbySk^ [21:32] herbySk: would the last thing not help (get any build that works, and git checkout into it src/node.js, src/node.cc. lib/preamble.js)? [21:33] herbySk: and lib.fundamentals.js if you use the last commit I sent you [21:33] herbySk: (last stable is very old, isn't it?) [21:33] demolithion has joined the channel [21:38] _ry: kriskowal: node isn't compiling for you? [21:39] _ry: kriskowal: is it node_g that's broke? [21:40] fizx_ has joined the channel [21:43] CIA-77: node: 03Ryan Dahl 07master * r76d525b 10/ src/node.cc : Remove assert for no-such-module - http://bit.ly/dz7art [21:45] kriskowal: _ry no, node doesn't link. [21:46] kriskowal: libssl, libcrypto, and libz seem to be missing [21:49] greencoder has joined the channel [21:51] _ry: kriskowal: does it fail for that reason? [21:52] _ry: i think i just solved one problem [21:52] kriskowal: that's what the ld spam says; warns about those being missing, followed by a lot of undefined symbols ostensibly from those libs [21:52] _ry: in that commit just now [21:52] _ry: hm [21:53] darkf has joined the channel [21:57] kriskowal: _ry here's the log http://gist.github.com/375878 [21:58] sudoer has joined the channel [22:06] lifo has joined the channel [22:06] herbySk: _ry: After I mere last ciommits a plethora of tests failed with EPIPE and one times with ENOTSOCK... [22:06] herbySk: s/mere/merged/ [22:08] herbySk: _ry: http://gist.github.com/375886 [22:16] felixge has joined the channel [22:16] felixge has joined the channel [22:17] felixge: _ry: I just saw: http://github.com/ry/node/commit/76d525b03467ac342e83b3781e7efcee47739320 [22:18] felixge: seems like that fixes my local fails [22:18] felixge: which is weird considering that this code path should now throw an exception [22:18] felixge: why did you remove the assert? [22:20] maushu: Logic? In my node.js?! [22:31] greencoder has left the channel [22:35] whoahbot has joined the channel [22:36] micheil has joined the channel [22:37] felixge: maushu: ? [22:37] maushu: ACTION pokes felixge with a stick. [22:37] maushu: Get of my lawn, damn kids. [22:42] felixge: maushu: you're IP is 78.130.68.46, right? [22:42] maushu: Probably, why? [22:42] felixge: maushu: I'm about to unleash my army of nodes on your lawn [22:42] felixge: :) [22:43] maushu: Go ahead, MAKE MY DAY. [22:43] felixge: damn, missed the button [22:43] felixge: too much beer tonight :) [22:43] micheil_mbp has joined the channel [22:43] maushu: Hmm, a node.js library to generate flash. [22:44] felixge: maushu: link? [22:45] maushu: No link, just an idea. [22:45] maushu: The swf format is open source. [22:46] maushu: I will think about it later on. [22:46] felixge: maushu: not sure I want flash to stay around longer than it has to :) [22:46] gwoo: maushu: when did swf go open source? [22:46] maushu: ...ages ago? [22:46] gwoo: maushu: http://osflash.org/flash9 seems to imply the opposite [22:46] maushu: There is a pdf with the whole specification somewhere. [22:47] gwoo: http://en.wikipedia.org/wiki/SWF#Licensing [22:47] _ry: felixge: the place where that was catching is here: http://github.com/ry/node/blob/3934cb54853ca23cee7ef3c6206a5b1264f8ba6d/lib/crypto.js#L3 [22:47] _ry: that's why it's not throwing [22:48] felixge: _ry: that makes a lot of sense considering I did not have this lib available [22:48] felixge: _ry: I guess that means I can continue on that stdio patch :) [22:48] inimino: Flash is documented, but that's not the same as open source [22:48] maushu: The swf format is open source. [22:48] maushu: ... [22:49] CIA-77: node: 03Ryan Dahl 07master * r11f673e 10/ test/simple/test-http-304.js : curl after server is listening - http://bit.ly/cTFZiP [22:49] felixge: a format cannot be open source [22:49] felixge: It can be patent-free [22:49] maushu: It's not patent-free, it's open source. Anyone can read the documentation. [22:49] felixge: but all (worthwhile) flash implementations of flash are propietary [22:49] _ry: felixge: great [22:49] _ry: felixge: i added a change to stdio which is to listen to 'error' [22:49] inimino: maushu: that's not what "open source" means... there's no source code for a file format, just documentation [22:49] felixge: _ry: which commit? [22:50] rauchg has joined the channel [22:50] _ry: felixge: http://github.com/ry/node/commit/d70474dc102639a355445af821fa2bd582acd703#diff-0 [22:50] maushu: Source doesn't always means code, you know. :p [22:50] _ry: rebasing past that might be slightly painful [22:50] maushu: Besides, the source code would be for the flash player, not the swf file format. [22:50] _ry: but i think you can just add "stdin.addListener('error', function (err) { throw err; });" [22:51] maushu: Source code for a file format doesn't even make sense. [22:51] felixge: I wouldn't even hate flash if adobe was able to provide a fast implementation for osx : ) [22:51] _ry: or just work on your normal branch [22:51] _ry: i can merge it [22:51] gf3 has joined the channel [22:51] _ry: s/normal/existing/ [22:51] felixge: _ry: doesn't look that difficult to rebase for my patch? [22:51] maushu: felixge, haven't heard? Apple hates Adobe, they sabotaged Flash. [22:52] felixge: maushu: I think adobe is incapable to support osx, I'm not sure apple is to fully blame for that [22:52] maushu: According to something I've read apple doesn't give access to some stuff. [22:52] maushu: I don't care either way, I like html 5 too. [22:53] felixge: maushu: not a valid argument, VLC actually performs better than Quicktime X on Snow leopard [22:53] felixge: so I think adobe is just looking for sympathy [22:53] maushu: VLC was created by aliens. [22:54] felixge: loo [22:54] felixge: lol [22:54] felixge: :) [22:55] felixge: maushu: that's even worse for adobe, civilizations that are pretty much new to our world can do better than them :) [22:55] jtoy has joined the channel [22:56] maushu: True. [22:56] felixge: imho adobe should stick to making tools, they got some serious skills there [22:58] captainbenis has joined the channel [22:58] _ry: felixge: im glad you're doing the stdio patch [23:00] felixge: _ry: np, if I can contribute 600 LoC to be removed that's probably better than adding 600 LoC :) [23:02] Ned__ has joined the channel [23:02] Ned__: what's the easiest way to persist state between runs of a script ? [23:02] Ned__: serialize as JSON and write to a file ? [23:03] felixge: Ned__: you mean if your node process goes down? [23:04] Ned__: felixge: yes [23:04] Ned__: felixge: i.e. when it shuts down, it saves state, when it starts again, it loads state and carries on [23:04] felixge: Ned__: yeah, any kind of data store. The file system being the most simplisitci [23:04] felixge: * simplistic [23:05] Ned__: felixge: yeah, seralizing JSON seems easy [23:05] Ned__: given that's how it is in the process already [23:05] felixge: Ned__: well, you shouldn't assume a clean shutdown if possible [23:05] Ned__: :-) [23:05] jaw6 has joined the channel [23:05] Ned__: felixge: sure, but I can catch the exit signal [23:05] Ned__: and if someone SIGKILLs, well I'm screwed eitherway :p [23:06] felixge: Ned__: I'm working on a very minimal json / file system based lib called dirty which I'm hoping to release soon (volcano canceled my plane trip / time allocated to finish it up) [23:06] Ned__: felixge: right, sounds interesting :-) [23:06] felixge: Ned__: well, you shouldn't be screwed on sigkill is what I'm saying [23:06] JimBastard has joined the channel [23:06] felixge: Ned__: don't give your clients a response until you made sure you persisted state [23:06] Ned__: felixge: well, I guess the only way to avoid that is save state periodically [23:06] Ned__: felixge: right, fair enough [23:06] felixge: (unless you don't care, and loosing some state is ok) [23:07] Ned__: yeah, I'm okay with losing a little state ;-0 [23:07] JimBastard: towski! get in the choppa [23:07] Ned__: anyway, thanks ... [23:07] felixge: Ned__: np [23:09] towski: heh [23:12] sh1m has joined the channel [23:12] JimBastard: secret towski bat call [23:12] JimBastard: ;-) [23:14] jedschmidt: hey folks. [23:15] jedschmidt: can someone tell me whether it's possible to create a progress counter for tests the way node's "make test" does it? [23:16] jedschmidt: ie, some way to update a single line instead of writing a new line for each completed test? [23:16] hassox has joined the channel [23:16] jedschmidt: (the end result looks like this: [00:11|% 100|+ 68|- 0]: Done ) [23:17] felixge: jedschmidt: yeah, you just need the right control character [23:17] felixge: I think it's \011 [23:17] felixge: let me double check [23:18] jedschmidt: felixge: felix to the rescue. thanks! [23:20] felixge: jedschmidt: I think 15 it is [23:20] felixge: https://gist.github.com/fc67a914b0e7d3af1811 [23:23] jedschmidt: ah, nice! [23:23] jedschmidt: felixge: thanks a bunch. btw, any ETA on dirty? [23:23] felixge: jedschmidt: JSConf.eu? Just kidding, maybe the weekend will have some time for hacking [23:23] felixge: :) [23:24] malkomalko has joined the channel [23:24] JimBastard: felixge :-( lol [23:24] jedschmidt: felixge: it would take one heck of a volcano to keep you from jsconf.eu. [23:26] felixge: JimBastard: it would have to be in the center of berlin, but hey [23:26] felixge: who knows? [23:26] felixge: :D [23:28] mikeal: _ry: I'm writing to a ClientResponse.socket stream directly [23:28] mikeal: and I'm getting this error [23:28] mikeal: Error: EPIPE, Broken pipe [23:29] mikeal: why would I be getting that? [23:29] mikeal: ah ha! [23:29] mikeal: i see [23:29] mikeal: nevermind [23:29] mikeal: the last write returned false [23:31] deanlandolt: JimBastard: what registrar did you use for your .io domain? [23:32] darkf has joined the channel [23:33] jtoy has joined the channel [23:36] JimBastard: deanlandolt: io.io [23:36] JimBastard: its the only one [23:36] JimBastard: i think, why you wanna jump on the io train? :-D [23:39] mikeal: nope, that wasn't it [23:40] mikeal: has anyone else gotten this error using streams? EPIPE, Broken pipe [23:41] _ry: mikeal: writing to a socket which is closed [23:41] mikeal: i have an error listener [23:42] mikeal: on the socket, and the error happens after the write [23:42] mikeal: there isn't an error emitted before that [23:42] _ry: it's thrown? [23:42] mikeal: no, it's emitted [23:42] _ry: are you on head? [23:42] mikeal: yup [23:43] _ry: revert d70474dc102639a355445af821fa2bd582acd703 [23:43] _ry: see if that changes [23:43] sh1mmer has joined the channel [23:44] mikeal: nope [23:44] _ry: em, i mean - it's not really an error [23:44] _ry: it just means the connection is closed [23:45] mikeal: ok, there is an end event before that last write [23:45] mikeal: hrm.... [23:45] mikeal: maybe not [23:45] _ry: what's the stack trace? [23:46] mikeal: there isn't a stack trace because this error is emitted [23:46] _ry: but you're throwing it or? [23:46] mikeal: the stack trace i get is for trying to write to this after this error [23:46] _ry: ah [23:46] _ry: well it's closed th socket [23:46] mikeal: so, ClientResponse.socket is emitting and end event [23:46] mikeal: that i'm not responsible for [23:47] mikeal: and it does that prematurely [23:47] _ry: i donno [23:47] mikeal: ok, I think i can try to figure this out [23:48] mikeal: thanks [23:54] _ry: its sad when people URL shorten URLs to something that is longer than the actual url [23:54] _ry: http://nodejs.org [23:54] _ry: http://tinyurl.com/y8bb6sj [23:54] JimBastard: lulz [23:54] mikeal: haha [23:54] JimBastard: url shorteners are a big step in the wrong direction [23:54] creationix has joined the channel [23:55] JimBastard: its like heh semantic web, FU [23:58] BinaryPie has joined the channel