[00:02] admc has joined the channel [00:06] tisba_ has joined the channel [00:12] micha_f has joined the channel [00:14] tav has joined the channel [00:20] mikeal has joined the channel [00:26] kenneth_reitz has joined the channel [00:26] rtl has joined the channel [00:41] erikvold has joined the channel [00:42] erikvold: hey, what do I need to do in order to see the GM_log messages that are scattered across the GM code? [00:46] tilgovi has joined the channel [00:50] tmpvar: GM? [00:50] jashkenas has left the channel [00:55] ssteinerX has left the channel [01:04] sudoer has joined the channel [01:04] unomi has joined the channel [01:15] isaacs has joined the channel [01:28] fizx has joined the channel [01:31] arnaudsj has joined the channel [01:33] arnaudsj has left the channel [01:33] arnaudsj has joined the channel [01:38] softdrink has joined the channel [01:45] jbowman has joined the channel [01:49] devinus has joined the channel [02:03] mau has joined the channel [02:08] mau2 has joined the channel [02:16] somnium has joined the channel [02:21] rictic has joined the channel [02:30] mrjjwright has joined the channel [02:32] Tim_Smart has joined the channel [02:37] xer0x has joined the channel [02:43] binary42 has joined the channel [02:44] silentrob has joined the channel [02:51] maushu has joined the channel [02:58] RayMorgan has joined the channel [03:03] erikvold: got it [03:06] mau has joined the channel [03:07] broofa has left the channel [03:15] silentrob has joined the channel [03:15] maushu has joined the channel [03:18] tilgovi has joined the channel [03:33] charlesjolley: hi everybody! [03:33] charlesjolley: can anyone tell me how to do stdio on the latest master [03:33] charlesjolley: looks like process.stdio is gone? [03:35] erikvold has left the channel [03:37] fictorial has joined the channel [03:40] isaacs: charlesjolley: check doc/api.txt [03:40] isaacs: charlesjolley: er, doc/api.markdown [03:41] _ry: charlesjolley: process.stdout process.openStdin() [03:41] _ry: charlesjolley: it's not documented yet [03:41] tmpvar: so i made myself a little dashboard for my projects :: http://tmpvar.com/project/ [03:42] tmpvar: commits are automatically pulled, and it uses a status.json to present a task list [03:42] charlesjolley: yes [03:42] tmpvar: s/commits/pushes [03:42] charlesjolley: it wasn't in the docs [03:42] charlesjolley: and then I just pulled from master [03:42] charlesjolley: just figured it out. thx [03:44] _ry: tmpvar: cool [03:45] _ry: tmpvar: what do the colors mean? [03:47] PyroPete1 has joined the channel [03:47] tmpvar: red: todo, green: done [03:47] mrjjwright: tmpvar: really cool [03:50] tmpvar: i think it will work well, I _really_ hate ticketing/pm sites because its yet another tab i have to keep in my work queue [03:50] tmpvar: this i can just mod the status.json when i push and it's automagic ^_^ [03:55] tmpvar: I probably could go all out with this if I could read from the git repo and automatically run/cache unit tests [03:56] tmpvar: burndowns and CI (of sorts) [03:56] tmpvar: sparklines is pretty awesome, i have yet to use it though [04:00] RayMorgan has joined the channel [04:00] technoweenie has joined the channel [04:03] mrjjwright: peeking at conductor, damn this looks sweet. I swear I was vaguely dreaming of something similar a few days ago. Do & flow.js are good attempts at solving this problem but this looks much more flexible. [04:05] fictorial: hey guys - should I care about "kiwi"? is it going to be the way to package node.js modules? [04:06] tmpvar: mrjjwright, yep, its pretty hot! creationix and I are still looking into improving implicit error handling though [04:06] tmpvar: which *should* be on the list if its not! [04:07] mrjjwright: tmpvar what does _0 and using numbers such as "D1" indicate? I am guessing, execute up until D, one time. Perhaps _0 fire off in parallel from the beginning [04:08] tmpvar: nope [04:08] tmpvar: all of those are input values [04:08] tmpvar: so you name the method A [04:08] tmpvar: sorry, confused myself [04:09] tmpvar: _0 is the first arg coming in when you call Conduct(..)() [04:09] derferman has joined the channel [04:10] tmpvar: http://github.com/tmpvar/conductor/blob/master/test/test.js#L32 [04:10] mrjjwright: yes, I was looking at this example [04:10] tmpvar: cool [04:10] tmpvar: watch/fork it :) [04:10] tmpvar: and also run the examples heh [04:10] mrjjwright: ok..probably should step through it in eclipse [04:10] tmpvar: we need to do some docs, but creationix is working on a howtonode tutorial [04:11] mrjjwright: oh ok [04:13] tmpvar: anyhow in the example i just linked to, A on the B: line references the A: readFile function which calls back to 2 methods, err and callback [04:13] tmpvar: A1 points to readFile's callback [04:13] tmpvar: while A0 points to readFile's err [04:13] tmpvar: im probably not explaining the very well haha [04:14] mrjjwright: no this is fun, let me see here [04:16] tmpvar: the numbers basically link a callback' [04:16] mrjjwright: ahh, I see. So for the def of B: _0 is the first arg to loadArticle and A1 refers to the first "result" of the callback [04:16] tmpvar: a callback's result into a method [04:17] tmpvar: yes [04:17] tmpvar: im not going to lie, creationix took this and ran [04:17] mrjjwright: haha [04:17] mrjjwright: those texans [04:17] tmpvar: its his code, but i put in the hard work, damn it! [04:17] tmpvar: haha.. [04:18] tmpvar: its not even worth showing what i had before because it didnt work.. this adaptation is extremely helpful for me [04:18] tmpvar: adaptation? iteration. eh whatever [04:19] mrjjwright: the final arg to loadArticle is passed as the first arg to the continuation? [04:20] mrjjwright: i mean what the finalArg points, in this case the 1st "result" of callback of D. [04:23] mrjjwright: no, there is no continuation, I see [04:27] tmpvar: there can be though [04:27] tmpvar: hehe [04:28] mrjjwright: yeah I just saw one in these commented out examples [04:29] mrjjwright: in the e.g starting on line 49, I see that B0, the first "result' of B, will be passed to the continuation sys.puts. Is that right? [04:30] tmpvar: mrjjwright, something like https://gist.github.com/efc8d2e97f8c2f9d3922 [04:30] tmpvar: yeah [04:30] tmpvar: exactly [04:30] tmpvar: so you can compose these things [04:31] tmpvar: er.. [04:31] tmpvar: make composites [04:31] mrjjwright: wow [04:31] tmpvar: compositions inside of compositions .. some loaded terms there heh [04:33] tmpvar: composer is going to be a visual editor :) [04:33] mrjjwright: what! [04:33] mrjjwright: why, how? [04:33] tmpvar: using canvas and fun stuff :) [04:33] fizx has joined the channel [04:33] tmpvar: how? you have a library of async functions [04:34] tmpvar: drop them onto a grid and connect them up [04:34] tmpvar: why? why the hell not! [04:34] mrjjwright: oh man, u crazy. No I like it. Hey, every thought of making a viz of how node works, with stuff flowing through and no-blocking [04:34] mrjjwright: and then show the effect of a blocking call [04:34] mrjjwright: everything starts jamming up [04:35] fizx has joined the channel [04:35] mrjjwright: or something like that, I saw a cool bittorrent viz some time back. [04:35] tmpvar: that would be fairly complicated to present correctly / simply [04:35] mrjjwright: yeah, I was just thinking of that this morning [04:36] tmpvar: yeah, im not much of a designer so maybe its not really as hard as I'm imagining it to be [04:37] mrjjwright: here is the BitTorrent viz: http://mg8.org/processing/bt.html [04:42] tmpvar: thats pretty cool [04:49] sudoer has joined the channel [04:51] charlesjolley: hi - I'm running the latest master for node right now [04:51] charlesjolley: and seeing some really odd behavior [04:51] charlesjolley: I'm using the HTTP client [04:51] charlesjolley: when I GET data everything is just fine [04:51] charlesjolley: but when I DELETE the request doesn't come through to the server [04:52] charlesjolley: or - even more weirdly sometimes it will show up in the server logs several seconds after I've killed my node.js process [04:52] charlesjolley: I'm guessing this means that probably the HTTP client is not sending the final bits to close the request [04:52] charlesjolley: The delete and get are the exact same code except that delete does not send a body [04:52] charlesjolley: any ideas if this might be a buggy part of the latest code? [04:53] charlesjolley: this was working before I updated btw [04:54] charlesjolley: and sure enough [04:56] charlesjolley: it turns out that I have to set the Content-Length header to 0 or else HTTP client will not finalize sending a request in the latest master of Node. [04:56] charlesjolley: is this intentional? [04:56] charlesjolley: or a bug? [04:56] charlesjolley: _ry ^ [05:01] silentrob has joined the channel [05:06] tk: charlesjolley: I would check the RFC on HTTP to see if thats not part of the standard... [05:10] tmpvar: charlesjolley, im 80% sure you have to set a content length in order to close the connection [05:10] tmpvar: close is a bad word.. finalize the response is better [05:13] Aria: ACTION starts porting the HTML5 parser to JS [05:15] charlesjolley: ok thanks for the clarification. though it does seem that filling in some reasonable defaults might be more helpful [05:15] charlesjolley: but ok as long as its intended behavior [05:18] tk: charlesjolley: a lot of times, (not saying it applys to node) frameworks dont spend extra filesize trying to make API's work with improper arguments (or lack of arguments) [05:19] wasabist has joined the channel [05:20] fizx has joined the channel [05:21] RayMorgan has joined the channel [05:21] silentrob has joined the channel [05:22] fizx has left the channel [05:55] maritz has joined the channel [06:06] charlesjolley: hey - anyone where who is hacking on node itself by any chance? [06:15] isaacs: tmpvar: (medium switch) [06:15] isaacs: tmpvar: note the version number: 0.0.0 [06:15] isaacs: charlesjolley: yo. [06:15] tmpvar: oh [06:15] tmpvar: how long have you been working on it? [06:16] isaacs: tmpvar: from about 3 to 5 this afternoon. [06:16] tmpvar: yeah, thats pretty quick heh [06:16] isaacs: tmpvar: mrjjwright is going to port his multipart-aware client for sending mp messages, too. [06:17] isaacs: ironically, _ry removing stuff from nodejs is often the best way to stimulate us all to get stuff done. [06:17] tmpvar: haha, seems like it [06:17] mrjjwright: working on it now [06:17] tmpvar: awesome [06:17] mrjjwright: this is really clean isaacs [06:17] tmpvar: i love how _ry wants to keep this small [06:18] mrjjwright: i mean your sax strict style [06:18] isaacs: mrjjwright: oh, glad you approve. [06:18] isaacs: mrjjwright: it's just a no-frills approach [06:19] isaacs: mrjjwright: i kinda figured that i'd eventually use some kind of event emitter thingie for sax-js, and it just never became necessary, and then i realized how much i liked it this way. [06:19] charlesjolley: hey isaacs I found a bug in child_process.js [06:19] charlesjolley: exec() [06:19] charlesjolley: when the process exits, it needs to close stdin [06:20] charlesjolley: if you don't eventually the process runs out of fd's [06:20] isaacs: charlesjolley: send to list with test case and/or link to patch, plz [06:20] tk: heya tmpvar :P, fancy seeing you here [06:20] tmpvar: hey tk [06:21] tmpvar: what is good? :) [06:21] tk: dont suppose there is a module in Node that can list all processes? (it seems process.kill() can kill other processes, but I'm not seeing anything that lists others) [06:21] tk: tmpvar: just surprised :P [06:21] tmpvar: I'm here quite often, heh heh [06:22] tk: tmpvar: I just started idling here, poking at Node to see where I can use it :P [06:22] tmpvar: ah, well welcome! [06:23] tk: tmpvar: and I havent really seen you for sometime [06:23] Aria: tk: That's a pretty operating system specific thing -- however, you could troll /proc on linux or solaris to find the list. [06:23] tk: Aria: true, didnt think of it like that (OS specific) [06:24] Aria: (posix systems would let you shell out to 'ps', too, though it leaves out Windows) [06:25] teemow has joined the channel [06:25] tk: Aria: only worried about OS X really -- was curious to see how easy a monitor script would be to watch some procs for me [06:25] tmpvar: tk, it has been a while, you been doing more js lately? [06:26] tk: tmpvar: JS is about all I do (even when I'm unemployed :P) [06:27] tmpvar: awesome [06:27] tmpvar: sometimes I wish I were unemployed so I could write more JS hehe [06:27] tmpvar: isaacs, will multipart-js include the client? [06:27] tk: I Wish I wasnt... or atleast being unemployed I wish I made more money being unemployed :P [06:28] isaacs: tmpvar: it'll include a writer and a parser. [06:28] mrjjwright: issacs: sticking strict, I am assuming that I don't write a default boundary but error out if not supplied by caller [06:28] mrjjwright: isaacs* [06:28] tmpvar: isaacs, perfect [06:28] isaacs: mrjjwright: that's up to you. [06:28] mrjjwright: ok [06:29] isaacs: mrjjwright: you could just emit an error in that case. [06:30] isaacs: tmpvar: the parser does parser.write(chunk); parser.write(chunk); parser.close(); and fires whatever you attach to parser.onpartbegin, parser.onpartend, etc. [06:30] tmpvar: nice [06:30] isaacs: tmpvar: the writer is the same, but in the other direction. you call partBegin() and partEnd() and it calls whatever you put at parser.ondata() [06:31] tmpvar: sounds like exactly what _ry was thinking about when he removed it from node [06:31] isaacs: tmpvar: up to you to hook it up to your http session or your email server or whatever the heck you're doing with it [06:31] isaacs: tmpvar: yeah, i'd meant to do this for a long time now. [06:31] tmpvar: yeah, that makes sense [06:31] tmpvar: i dont think you are allowed to get a new job [06:31] tmpvar: we need you here :) [06:31] isaacs: hahaha [06:31] isaacs: why you think i'm MIT licensing all this stuff!? [06:32] isaacs: hopefully at least some of it will be useful [06:32] tmpvar: pft, earthly possessions.. like a home and food.. [06:33] tmpvar: isaacs, i think it will be [06:33] tmpvar: it seems like its much lighter [06:33] tmpvar: oh god, it is absolutely much lighter. [06:33] tmpvar: i hadnt looked at the source until now [06:34] drostie: My experimentation with node.js + node-tyrant has me wanting to build a light json abstraction atop tokyo. [06:34] drostie: but I should probably just work on my site as it is in django. :< [06:35] tmpvar: heh [06:35] isaacs: tmpvar: what's lighter than whatnow? [06:35] tmpvar: the old multipart impl [06:35] tmpvar: vs yours [06:36] tmpvar: cleaner [06:36] isaacs: yes. my implementation is much cleaner than my implementation. [06:36] isaacs: heheh [06:36] tmpvar: you did the original? [06:36] isaacs: that's actually the second draft. [06:36] tmpvar: ah, I wasnt around for that.. [06:36] isaacs: the first came from felixge [06:36] tmpvar: im but a newb i guess :) [06:36] isaacs: i enhanced it to support nested messages and a few other things. [06:37] tmpvar: well, non-the-less, i like the approach of your current lib [06:37] isaacs: i suspect that the code for the parser will come in around 300 LOC or so. [06:37] isaacs: when it's done. [06:37] tmpvar: not bad [06:37] mrjjwright: isaacs: to write the client calls write, should the writer also listen for ondata events? [06:37] mrjjwright: just trying to understand your explanation up there [06:39] isaacs: mrjjwright: so, if you're using the writer, you'd do: var w = multipart.writer(); w.boundary = "foo"; w.partBegin({"content-type":"text/plain"}); w.write("hello, "); w.write("world."); w.partEnd(); w.close(); [06:39] isaacs: however, in this case, because i didn't actually attach a w.ondata function or w.onend function, it won't actually do anything. [06:40] mrjjwright: oh ha, of course [06:40] isaacs: if i did w.ondata = function (chunk) { sys.print(chunk) }, then it'd echo out the message with the headers and the boundaries and whatnot. [06:40] mrjjwright: coding a bit too late [06:40] isaacs: mrjjwright: it happens ;) [06:41] mrjjwright: the data listeners [06:41] isaacs: mrjjwright: i was hitting diminishing returns. just got back from visiting family in LA, which always means driving back and forth across the san fernando valley for a week, so i'm pretty retarded right now. [06:41] Aria: Ew. Driving across the valley even once will make you a bit dumb for a while. [06:42] isaacs: Aria: right!? not to mention driving from silicon valley down there and back... ugh. [06:42] mrjjwright: oh interesting, i am sinking from the pub crawl last night here in Boulder [06:43] isaacs: it seems that everything i ever hear about Boulder involves pubs and crawling [06:43] Aria: Hehe. [06:43] Aria: Pubs, crawling, or buddhists and birkenstocks. [06:43] isaacs: sounds like a drunk and stumbly place. [06:44] tmpvar: lol [06:44] tmpvar: aka fun [06:44] Aria: Imagine Berkeley, CA. [06:44] Aria: Only in the mountains. [06:44] isaacs: net [06:44] isaacs: neat [06:44] derferman has joined the channel [06:44] isaacs: it's hard to crawl in birkenstocks. they fall off easy. [06:45] mrjjwright: ha, my friends and I trail run and climb all day, program all evening, and drink every other night. [06:45] Aria: Hehe. Sounds about right. [06:45] tmpvar: lol [06:45] Aria: (I live on the other end of the state. If I had more geek friends, I'd be doing about the same.) [06:45] tmpvar: the mental images are overwhelming [06:46] mrjjwright: Aria: that is one nice thing about Boulder, where do you live? [06:46] Aria: Ridgway. Near Telluride. [06:46] mrjjwright: wow, awesome [06:47] Aria: Hehe, yeah. I love it here. [06:47] isaacs: mrjjwright: i don't know if you're going to do this as part of the writer, but i'd like to pull in a base64 (en|de)coder and automagically convert to and from binary based on the Content-Transfer-Encoding [06:47] tmpvar: oh damn [06:47] mrjjwright: aye, aye, sounds good [06:47] isaacs: kewl [06:47] isaacs: the parser that node had didn't do that. you were on your own to decode it [06:48] mrjjwright: oh, yeah I think poster (a python streaming multipart client) does it for you... [06:48] ZhouYu has joined the channel [06:49] tmpvar: where does the base64 lib live? [06:58] tmpvar: isaacs ^^ [06:58] isaacs: tmpvar: there are a few floating about [06:58] isaacs: i think node-couch has one, or maybe mikeal/node.couchapp.js or something [06:59] tmpvar: just pulls them out of the air or they are included in the distro? [06:59] isaacs: they're included [06:59] isaacs: pulling out of the air is a good idea, though. npm makes that easier, but it's not quite stable enough to actually depend on [07:00] isaacs: actually, wait a second, npm has one. [07:00] isaacs: derp [07:00] isaacs: see what happens when someone else contributes to your project? you forget what's inside it. [07:01] tmpvar: yeah [07:01] tmpvar: haha [07:01] isaacs: mrjjwright: lift it from here: http://github.com/isaacs/npm/blob/master/lib/utils/base64.js [07:02] isaacs: hm, that uses strings. BinaryBuffer would be better. meh. v2 features. [07:02] mrjjwright: then I will withdraw my "base64 1999 Japanese style, you roll classy Isaacs" comment [07:03] tmpvar: lmao [07:04] isaacs: hahahh [07:07] mrjjwright: i can find a binary impl. when I get to it [07:07] felixge has joined the channel [07:07] felixge has joined the channel [07:07] isaacs: mrjjwright: well, node has the buffers now, and i think that'll be a commonjs standard (or is already?) so that might be the way to go [07:08] mrjjwright: oh yes [07:08] isaacs: mrjjwright: but until then, what's there now is the equivalent to node's "binary" encoding style, i believe, so it should Just Work. [07:08] isaacs: or maybe "ascii", not sure [07:08] isaacs: basically, "string of single-byte chars" [07:09] isaacs: which means that you can stream files through trivially from http or fs.read, which is all that matters. [07:10] mrjjwright: oh right, the data will stream through our lib encoded [07:10] mrjjwright: not encoded but as binary [07:12] isaacs: um, sure. [07:12] isaacs: javascript kinda sucks at binary strings natively. [07:12] qFox has joined the channel [07:12] isaacs: require("buffer") has some good kit for that. buffers are like c arrays of bytes, which you can choose to interpret as strings if you care to [07:13] isaacs: not "like" c arrays. they are exactly c arrays, with a light javascript wrapper. also, slice() is byref, not copied [07:13] isaacs: iirc [07:14] tmpvar: isaacs, yeah looking at the source, it looks like are right [07:15] tmpvar: like you are right [07:18] tav has joined the channel [07:19] mrjjwright: thinking of adding a convenience function the multipart writer that takes an array of part objects (same as the ones you pass to partBegin) and calculates a size based on the current boundary, to aid clients in setting the content-length header. Say when uploading to flickr you could pass in all your parts besides the file, get a length, and then add the photo size (obtained from a stat) and be able to set the content-length prope [07:20] mrjjwright: hmm, I guess I would need all the parts actually, even the photo, with a size [07:20] mrjjwright: but not the actual photo obviously [07:25] cruxst has joined the channel [07:31] isaacs: mrjjwright: do that afterwards. [07:32] isaacs: mrjjwright: you can layer that on top of a simple util, but layering a simple API on top of the convenience function is tricky (found that out with lib/multipart.js) [07:33] mrjjwright: oh yeah, I will do it last, that is the way I did with the old lib. just thinking out loud when I shouldn't. It will need to calculate nested parts sizes as well which the current one doesn't do. [07:34] isaacs: mrjjwright: it'd have to recurse down through each part's children array [07:36] mrjjwright: isaacs: right, great point about simple utils/convenience functions [07:40] jazgot has joined the channel [07:44] tmpvar: _ry, would you be interested in a port from http://github.com/antirez/linenoise/blob/master/linenoise.c to js? [07:44] tmpvar: or anyone for that matter [08:04] mrjjwright has joined the channel [08:12] admc has joined the channel [08:26] javajunky has joined the channel [08:28] javajunky has joined the channel [08:47] charlesjolley has joined the channel [09:01] felixge has joined the channel [09:01] felixge has joined the channel [09:12] micha_f has joined the channel [09:23] JimBastard: zzzzzzzzzz [09:30] ssteinerX has joined the channel [09:32] drostie: I just realized that my idea of building a JSON interface to node-tyrant is actually just the same idea as rewriting couchdb in javascript. :x [09:33] drostie: crumpling up my scratchpaper and changing tools... now. [09:41] _ry: tmpvar: you need termios bindings [09:44] malkomalko has joined the channel [09:44] _ry: charlesjolley: yeah - there are some problems with HEAD atm [09:45] _ry: everything is sitting on net.Stream, and i think there is some problem with it. that has the effect of strange behavior in many places [10:02] botanicus has joined the channel [10:13] felixge has joined the channel [10:13] felixge has joined the channel [10:31] derferman has joined the channel [10:35] javajunky has joined the channel [10:36] markwubben has joined the channel [10:42] micha_f has joined the channel [11:02] PyroPeter has joined the channel [11:21] tk: anyone familiar with Node.js on OS X? [11:24] tk: require seems to not work [11:43] Iveaux: i just found a bug with require on linux as well [11:44] Iveaux: "require('subfolder/script')" doesn't work but "require('../currentfolder/subfolder/script')" does [11:44] tk: hmm [11:44] Iveaux: not sure what causes it [11:46] tk: doest appaer to work for me on OS X [11:47] tk: i get TypeError: Cannot call method 'lastIndexOf' of null [11:49] jazgot has joined the channel [11:51] tk: ahh [11:51] tk: apparently node.js doesnt assume CWD as part of the require path [11:56] Iveaux: hmm [11:57] pjb3 has joined the channel [11:59] micha_f has joined the channel [12:11] tk: hmm [12:29] javajunky has joined the channel [12:31] arnaudsj has left the channel [12:59] mfeiri_ has joined the channel [13:06] tav has joined the channel [13:07] felixge has joined the channel [13:13] Iveaux: with Socket.IO; what's the best way to send a message to a single client if you know the sessionId ? [13:31] joshbuddy has joined the channel [13:31] joshbuddy has joined the channel [13:45] derferman has joined the channel [13:53] chakrit has joined the channel [14:02] rolfb has joined the channel [14:15] tk: is there an easy way of loading existing JS files w/o modifying them in order create global vars w/o using exports? [14:18] chakrit: tk: you mean you want to access the global vars defined in an external file? [14:20] tk: chakrit: yes [14:22] chakrit: tk: not in the way of require() ... but you can always fs.open() the file and eval() it [14:22] chakrit: tk: be careful though, there's a reason why we have exports in the first place [14:23] MattJ has joined the channel [14:23] chakrit: tk: there's also a safer `process.compile` which is like eval() but it can't access your local variables [14:23] chakrit: so it's a bit safer [14:25] tk: chakrit: just looking for an easy way to load a framework but just found out someone beat me to it [14:27] ditesh|cassini has joined the channel [14:38] xla has joined the channel [14:39] xla has joined the channel [14:54] r11t has joined the channel [14:55] sveisvei has joined the channel [14:55] r11t has joined the channel [15:00] r11t_ has joined the channel [15:06] kjeldahl has joined the channel [15:06] drostie: are there any comparisons of the various node.js couchdb implementations, or are they all relatively at the same level? [15:06] drostie: because I might be making my decision based solely on quantity of documentation at this rate. :D [15:08] kjeldahl: Struggling with removeListener generating "Error: removeListener only takes instances of Function" errors when called with a string and function. Any pointers or examples showing how it's used now, assuming it has changed? [15:12] felixge has joined the channel [15:12] felixge has joined the channel [15:15] cadorn has joined the channel [15:22] kjeldahl: Nevermind, figured it out I believe. Guess there's quite a few tutorials out there that needs to be updated to move the second parameter in calls to addListener into a separate var and use that instead of the return value from addListener when calling removeListener. [15:24] jazgot: drostie, not much to choose from: node-couch is a very, very basic implementation. node-couchdb has more high level methods. [15:25] jazgot: first one has basic authentication [15:25] drostie: there's also node-couchdb-min and cradle. :D [15:26] drostie: too much to read, too much to read --_--;; [15:26] jazgot: haven't seen those [15:26] drostie: node-couchdb seems to be the most pretty. [15:28] alex-desktop has joined the channel [15:36] malte has joined the channel [15:38] binary42 has joined the channel [15:39] ashiso has joined the channel [15:55] tbassetto has joined the channel [15:59] felixge has joined the channel [15:59] sudoer has joined the channel [16:04] malkomalko has joined the channel [16:05] maushu has joined the channel [16:09] silentrob has joined the channel [16:11] erikvold has joined the channel [16:25] chakrit: js>uneval("function() { return { x: '1' }; }"); [16:26] chakrit: js> 1+1 [16:26] gbot2: chakrit: 2 [16:26] chakrit: hmmm [16:31] chakrit has joined the channel [16:32] mrjjwright has joined the channel [16:34] tbassetto1 has joined the channel [16:35] chakrit: What's a good way to do uneval in node? [16:35] chakrit: js> sys.inspect({ x: 'y' }) [16:35] gbot2: chakrit: Error: ReferenceError: sys is not defined [16:35] chakrit: js> require('sys').inspect({ x: 'y' }) [16:35] gbot2: chakrit: Error: ReferenceError: require is not defined [16:35] chakrit: js> inspect({ x: 'y' }) [16:35] gbot2: chakrit: Error: ReferenceError: inspect is not defined [16:36] micheil: chakrit: hey there [16:36] chakrit: ... [16:36] chakrit: micheil: hi [16:38] chakrit: oh you're miksago right? [16:38] micheil: yeah [16:38] micheil: :P [16:38] chakrit: oh haha [16:38] atmos: chakrit: sys.p [16:38] chakrit: following too many people now starting to forget who's who =.=" [16:39] chakrit: atmos: sys.p(function() {}) == "[Function]" [16:40] atmos: what do you expect it to do ? [16:40] chakrit: like Mozilla's uneval thing [16:40] chakrit: uneval(function() {}) == "function() {}" [16:40] atmos: got a link to it ? [16:40] chakrit: well... basically it converts whatever object back into sources [16:40] micheil: js> uneval(function(){}) [16:40] gbot2: micheil: "(function () {})" [16:40] micheil: :P [16:40] chakrit: woah! [16:40] micheil: >_> [16:41] chakrit: micheil: lol [16:41] micheil: that was slightly fail chakrit :P [16:41] chakrit: damn the missing spacebar hahaha [16:41] fizx has joined the channel [16:42] chakrit: Hmmmmm uneval is undefined in node-repl [16:42] fizx has joined the channel [16:43] chakrit: gbot2: help [16:43] chakrit: lol [16:44] atmos: chakrit: var foo = function() { } [16:44] atmos: foo.toString() [16:44] atmos: i guess that's still not perfect though [16:44] chakrit: atmos: Yeah... kind of. maybe I'll need to combine a few things :) [16:45] chakrit: js> sys.p(eval('eval(function() { return { 'x': 'y' }; }').toString()()) [16:45] gbot2: chakrit: Error: SyntaxError: missing ) after argument list: sys.p(eval('eval(function() { return { 'x': 'y' }; }').toString()()) ........................................^ [16:46] chakrit: js> sys.p(eval("eval(function() { return { 'x': 'y' }; }").toString()()) [16:46] gbot2: chakrit: Error: ReferenceError: sys is not defined [16:46] chakrit: js> uneval(eval("eval(function() { return { 'x': 'y' }; }").toString()()) [16:46] gbot2: chakrit: Error: SyntaxError: missing ) after argument list: eval(function() { return { 'x': 'y' }; } .......................................^ [16:46] chakrit: doh... [16:46] chakrit: ok brb [16:46] atmos: you know about node-repl right ? :) [16:46] chakrit: yeah... sry folks haha [16:57] inimino: chakrit: gbot2 is spidermonkey [16:57] chakrit: inimino: oh. I see. [16:57] inimino: (and V8 doesn't have uneval) [16:58] inimino: if JSON.stringify or sys.inspect isn't enough you'll have to write your own [17:00] nsm has joined the channel [17:01] isaacs_mobile has joined the channel [17:10] isaacs has joined the channel [17:14] cruxst has joined the channel [17:15] javajunky has joined the channel [17:17] erikvold has joined the channel [17:21] Yuffster has joined the channel [17:21] technoweenie has joined the channel [17:27] silentrob has joined the channel [17:31] felixge has joined the channel [17:31] felixge has joined the channel [17:32] Yuffster has joined the channel [17:35] tmpvar: js>typeof a [17:35] tmpvar: js> typeof a [17:35] gbot2: tmpvar: "undefined" [17:36] tmpvar: js> typeof a[ [17:36] gbot2: tmpvar: Error: SyntaxError: syntax error: typeof a[ ........^ [17:36] tmpvar: js> var a = {}; typeof a['test'] [17:36] gbot2: tmpvar: "undefined" [17:36] ashiso: js> var a = 'test'; [17:36] gbot2: ashiso: undefined [17:36] ashiso: js> typeof a [17:36] gbot2: ashiso: "undefined" [17:37] ashiso: js > typeof "test" [17:37] ashiso: js > "ya read me?" [17:37] ashiso: :( [17:37] tmpvar: js> typeof "a" [17:37] gbot2: tmpvar: "string" [17:38] ashiso: js> typeof "b" [17:38] gbot2: ashiso: "string" [17:38] ashiso: :) [17:38] ashiso: js> typeof Object.prototype [17:38] gbot2: ashiso: "object" [17:39] tmpvar: js> var undefined = 0; typeof a [17:39] gbot2: tmpvar: ... [17:39] tmpvar: js> var undefined = 0; typeof a; [17:39] gbot2: tmpvar: ... [17:39] tmpvar: js> undefined = 0; typeof a; [17:39] gbot2: tmpvar: ... [17:40] tmpvar: oh shit! [17:45] erikvold has left the channel [17:45] technoweenie has joined the channel [17:48] micha_f has joined the channel [17:49] inimino has joined the channel [17:50] silentrob has joined the channel [17:57] malkomalko has joined the channel [18:01] chakrit: just commit to github.com/chakrit/node-uneval if anyone's interested [18:03] tmpvar: interesting [18:03] tmpvar: ACTION trys [18:04] chakrit: needs lots more tests though [18:04] tmpvar: this is really cool [18:04] javajunky has joined the channel [18:05] tmpvar: ive been thinking about something like this for conductor [18:05] chakrit: conductor? [18:05] tmpvar: i'd really need to introspect the comments of functions as well though [18:05] tmpvar: http://github.com/tmpvar/conductor [18:05] chakrit: i see [18:06] chakrit: yeah, the thing about uneval() in ... say.. firefox is that it prints everything [18:06] tmpvar: or maybe not, I'd have to think about it [18:06] chakrit: vanilla as it's parsed [18:06] tmpvar: yeah [18:06] mfeiri_ has joined the channel [18:06] tmpvar: i think in node there is a clever way to do this [18:06] javajunky has joined the channel [18:07] tmpvar: oh damn, yeah [18:07] tmpvar: it does work [18:08] tmpvar: 31 : (function () { /* this is a comment */}) [18:08] tmpvar: i node atleast, im guessing this would not work the same in the browser though [18:09] chakrit: woah haha [18:09] chakrit: so toString() does work for comments :) [18:09] tmpvar: in the browser? [18:09] chakrit: not sure.. [18:09] ashiso has left the channel [18:10] tmpvar: nope [18:10] tmpvar: not in the browser [18:10] chakrit: doh! [18:12] tmpvar: ah well [18:12] tmpvar: thats still cool heh [18:12] chakrit: Hmmm... typing this in the address bar works: [18:12] chakrit: javascript:alert(function() { /*comment*/ }.toString()) [18:13] inimino` has joined the channel [18:13] chakrit: it doesn't preserves whitespaces though... so maybe needs to couple it with a pretty printer [18:14] tmpvar: oh wow [18:14] malte has joined the channel [18:14] tmpvar: that does work [18:14] tmpvar: in chrome atleast [18:14] demolithion has joined the channel [18:14] tmpvar: ff doesnt like it [18:15] tmpvar: doesnt do it rather [18:15] inimino`: tmpvar: you got me K-lined :P [18:15] tmpvar: yes. sorry [18:16] inimino`: np [18:16] tmpvar: how long are you banned? [18:16] inimino`: it is resolved now [18:16] tmpvar: k [18:16] tmpvar: my bad! [18:16] tmpvar: fix your bot [18:16] inimino`: just took some asking in #freenode [18:16] inimino`: it is their bot that needs fixing :) [18:16] tmpvar: haha [18:17] inimino has left the channel [18:19] xer0x has joined the channel [18:23] sudoer has joined the channel [18:25] hellp has joined the channel [18:29] softdrink has joined the channel [18:31] chakrit: ok, now I'm a bit stuck... what's a good way to properly uneval `new MyClass()` ? [18:31] chakrit: is it even possible? [18:32] aho has joined the channel [18:32] sh1mmer: does anyone have an example of using http client with POST [18:33] sh1mmer: I'm sure I'm doing something wrong because I seem to get 2 responses each time I think I should be doing a single post [18:34] chakrit: Have you seen the docs? http://nodejs.org/api.html#_tt_http_client_tt [18:34] blazzy: chakrit: you are implementing an uneval function? [18:34] inimino: chakrit: I'm not sure I understand the question, wouldn't that be "new myConstructor()"? [18:34] blazzy: sh1mmer: do you have a code sample demonstrating your problem? [18:34] chakrit: blazzy: yep [18:35] chakrit: inimino, blazzy: I'm working on an uneval function [18:36] technoweenie has joined the channel [18:36] mikeal has joined the channel [18:36] sh1mmer: blazzy: http://gist.github.com/355592 [18:36] chakrit: see github.com/chakrit/node-uneval [18:36] sh1mmer: mostly hacked up out of Ry's sample code in the docs [18:39] sh1mmer: blazzy: hah! I figured it out. Something really silly [18:40] sh1mmer: I don't have any routing code in, and the favicon request also triggers node to run this code [18:40] sh1mmer: tshark ftw [18:41] teemow has joined the channel [18:41] inimino: chakrit: ah, even uneval doesn't restore the prototype chain [18:41] technoweenie has joined the channel [18:43] rtl has joined the channel [18:43] chakrit: inimino: well... yeah.. it kind of stop making sense when you think about it [18:44] chakrit: var x = new SomeRandomCtor(); x.value = 7; puts(uneval(x)) <== what now? [18:51] javajunky1 has joined the channel [18:53] javajunky has joined the channel [18:56] inimino: if you're going for Mozilla compatibilite, {value:7} [18:56] inimino: s/ite/ity/ [18:57] chakrit: inimino: ok :) [18:59] qFox has joined the channel [18:59] gbot2 has joined the channel [18:59] inimino: js> 0 [18:59] gbot2: inimino: 0 [19:00] inimino: js> undefined = 32; undefined [19:00] gbot2: inimino: 32 [19:00] inimino: tmpvar: ↑ [19:00] inimino: ACTION afk [19:01] tmpvar: yay, fixed [19:01] technoweenie has joined the channel [19:03] cloudhead has joined the channel [19:06] ayo has joined the channel [19:09] xla has joined the channel [19:10] xla has joined the channel [19:15] devinus has joined the channel [19:17] xla has joined the channel [19:18] fizx has joined the channel [19:18] emyller_ has joined the channel [19:21] ashiso has joined the channel [19:22] technoweenie has joined the channel [19:22] maushu has joined the channel [19:25] fizx has joined the channel [19:28] ssteinerX has left the channel [19:30] rtomayko has joined the channel [19:32] isaacs has joined the channel [19:42] micha_f has joined the channel [19:54] technoweenie: hey is anyone in here presenting at jsconf and planning on using showoff for the slides? [20:01] jashkenas has joined the channel [20:05] keeto has joined the channel [20:05] deanlandolt: technoweenie: i'm doing a track b...but what's showoff? [20:06] technoweenie: a dynamic markdown presentation server: http://github.com/schacon/showoff [20:06] deanlandolt: yeah, just found that...nice [20:06] deanlandolt: no, i haven't given any thought to it...i'm putting slides together now but i just had them in google docs [20:07] deanlandolt: i'd like to have something a little sexier, of course [20:07] technoweenie: well check it out, scott has a great example presentation [20:07] technoweenie: i have one here: http://pdxjs-twitter-node.heroku.com/ [20:07] technoweenie: anyways the reason i ask: "wrote a node.js web socket server that lets a showoff presenter control browsers watching the same presentation: http://screenr.com/Y4M" [20:07] technoweenie: from my twitter ^ [20:09] deanlandolt: what do you mean by control browsers watching the same presentation? [20:09] chakrit: technoweenie: that's awesome! [20:09] deanlandolt: you mean as in advancing slides and things? [20:09] technoweenie: yea [20:09] deanlandolt: slick [20:09] micha_f has joined the channel [20:09] technoweenie: eventually i want to do some sort of chat/backchannel, or maybe audience questions [20:10] technoweenie: or one thing scott mentions in the showoff UI is having synced notes on something else [20:10] technoweenie: so what if you used your iphone or ipad w/ synced notes to control the projector and the people at the talk [20:11] deanlandolt: that's a really interesting idea...though i wouldn't want slides to be available before i incrementally advance through them... [20:12] atmos: ACTION wants to go to jsconf [20:12] deanlandolt: i know how i am...if i get someone's slide deck while i'm watching their presentation i'm no longer paying any attention, just tearing through the future slides [20:12] atmos: if i have a json object that i've parsed and i need to add a method to it in order to use it in a library, what's the easiest way ? [20:12] jashkenas has left the channel [20:12] deanlandolt: atmos: a parsed json object's just a javascript object [20:13] deanlandolt: add your methods like normal [20:13] atmos: k, i've gotta be doing something silly [20:13] atmos: thanks [20:13] deanlandolt: obj = JSON.parse(...); obj.getMetadata = function(){}... [20:13] javajunky1 has joined the channel [20:15] atmos: deanlandolt: k, i was definitely jus tbeing retarded [20:16] javajunky1: deanlandolt: did you get anywhere with mochaui yesterday btw? [20:21] deanlandolt: javajunky1: just dicked around with it...it's really solid [20:22] deanlandolt: though it's pretty chrome-heavy...at least, that's where most of the features are...having a big virtual desktop [20:23] deanlandolt: but i'm gonna need that for an upcoming project and i had no idea how i was gonna do all that [20:24] javajunky1: I just need something to throw together a quick windowed 'app'with floating toolboxes and so [20:24] javajunky1: sounds like it can do that if it can do a virtual desktop ;) [20:24] softdrink has joined the channel [20:24] deanlandolt: yeah, that's what i meant by chrome-heavy...it's all windows and toolbars and taskbars and such [20:25] mattly has joined the channel [20:26] technoweenie: http://github.com/technoweenie/showoff-server [20:27] javajunky1: deanlandolt: seems up my street then ;) [20:29] deanlandolt: technoweenie: i'm hoping to get my slides done way ahead of time (for a change) -- if i do this'll be a sweet little toy to throw in :) [20:29] technoweenie: well even if you dont do the server stuff, i'd recommend using showoff [20:29] deanlandolt: considering the audience it'd be awesome [20:29] technoweenie: i'll be there too if there are problems :) [20:30] ashiso has left the channel [20:30] technoweenie: well so will other really smart javascript programmers, heh [20:30] blazzy: heh, adding c-ares to node makes the `configure` step much much longer [20:30] deanlandolt: yeah, thanks for the showoff tip -- that's pretty timely :) [20:30] technoweenie: i should try and do a b track talk about it actually [20:30] deanlandolt: hurry up -- i think one or two might be open [20:30] deanlandolt: last i checked at least [20:31] deanlandolt: nope...looks like they're all filled up [20:31] technoweenie: oh ok scratch that idea :) [20:32] technoweenie: man i'd be cool do this with bonjour [20:32] technoweenie: advertise showoff servers [20:32] technoweenie: etc [20:33] technoweenie: in case the LAN is up but the outbound internet connection is clogged [20:33] felixge has joined the channel [20:33] felixge has joined the channel [20:34] blazzy: damn. it uses libtool. I never understood how that thing worked. [20:36] tmpvar: hehe [20:36] tmpvar: yeah, libtool is fun [20:36] tmpvar: does it use automake? [20:38] blazzy: yup [20:39] erikvold has joined the channel [20:41] blazzy: with udns the node build process just does a ./configure && make, and the static .a library shows up. nice and simple. [20:41] tmpvar: i had to wrestle with this in node-avro [20:41] tmpvar: might be a decent place to look [20:42] tmpvar: http://github.com/tmpvar/node-avro/blob/master/wscript [20:44] blazzy: ah, you follow through with a make install. maybe that gets the lib to actually reveal itself? [20:44] tmpvar: yep, if you setup the prefix [20:44] tmpvar: it took a bit of effort, but it works now heh [20:45] tk: why would a node blah.js -s repl.js and a node-repl blah.js not yield the same resuls? (repl.js just calls repl.start [20:45] blazzy: tmpvar: thank you. [20:46] tmpvar: absolutely [20:46] tmpvar: tk, what is the different (in results) [20:46] tmpvar: difference even [20:46] tk: tmpvar: global obj not accessible via node-repl method [20:47] tmpvar: strange, i dunno [20:47] deanlandolt: v8, jsc, spidermonkey, rhino, jscript...that's all the js engines really in use today, right? [20:49] tk: deanlandolt: ff_ext as well if you count that seperately from spidermonkey [20:49] tk: not an official name, just spidermonkey for firefox extensions [20:49] deanlandolt: oh, yeah, i'd count that as spidermonkey i guess [20:50] deanlandolt: just wondering if i missed a big one...i know there's some work on ironjs -- js on .net -- that looks really promising but i don't think it's even close to ready yet [20:54] sveisvei has joined the channel [20:57] tk: not that I can think of [20:57] tk: tmpvar: is it possible that repl-node doesnt actually take a script argument? [20:58] tmpvar: that is a possibility hehe [20:59] tk: but requiring it after starting repl still fails [20:59] tk: ohh think i see why [21:07] tk: tmpvar: file is checking argv for path information and with node-repl the path points to /usr/local/bin/node-repl instead of the blah.js file [21:07] tmpvar: interesting [21:13] tav has joined the channel [21:14] tk: tmpvar: and fixed [21:14] tmpvar: nice [21:14] tmpvar: you fixed repl? [21:14] rtl has joined the channel [21:14] tk: no its a false assumption on the js file [21:15] tk: the js file was checking argv[1] to get path ifno when it should have relied on __filename [21:18] tmpvar: got ya [21:19] erikvold has joined the channel [21:21] isaacs has joined the channel [21:23] tk: tmpvar: also, was pointed to this after spending all that time last night digging around trying to find out what I needed to do myself :P http://github.com/novemberborn/dojo [21:26] tmpvar: hehe [21:26] tmpvar: good old github [21:28] Aria has joined the channel [21:28] fholm has joined the channel [21:29] tk: well the guy is a Dojo person too :P just not as active on the community side [21:31] isaacs: felixge: hey, qq [21:31] isaacs: felixge: about multipart [21:31] felixge: isaacs: yeah [21:31] felixge: sup? [21:32] isaacs: felixge: would it make more sense to do parser.headers = {...}, or write the header lines through the parser, and have it emit a new part for the whole message? [21:32] isaacs: felixge: i'm assuming that you'll usually already have the headers parsed into an object or something, so you will be able to set whatever is relevant. [21:33] isaacs: and you'll just want to write through the body. but it affects which state the parser starts out in. [21:34] felixge: isaacs: what headers? the request headers? or part headers? [21:35] isaacs: felixge: the request headers. [21:35] isaacs: felixge: i'm assuming the flow is: get a request between headers and body, inspect the headers, figure out that it's mp, parse the body for parts. [21:35] _ry: hello world [21:36] isaacs: felixge: so this thing i'm writing should be geared towards parsing the body, not teh whole message. [21:36] isaacs: _ry: hello, ryan [21:36] felixge: _ry: hi [21:36] _ry: i guess you guys noticed i removed the multipart parser [21:36] felixge: isaacs: makes sense, but it would also be nice if you could feed a http request into it I guess [21:36] isaacs: _ry: yeah, we saw [21:37] felixge: isaacs: otherwise you'll have to do your own glue and buffering and stuff [21:37] felixge: _ry: you damaged the death star, but the empire will be striking back! [21:37] isaacs: felixge: well.... but that actually makes it *less* useful for node servers, ironically enough. [21:37] isaacs: felixge: though it is more clean to write a generic "internet message parser", which starts out at the top of the message. [21:37] felixge: isaacs: hm. I guess as long as I can write the incoming file parts into files without buffering much data I'm happy [21:39] felixge: isaacs: anyway, I think I like explicit set methods for headers [21:43] _ry: the parts should implement the stream interface [21:44] _ry: so we can eventually just pipe them to file [21:44] CodeOfficer has joined the channel [21:44] wasabist has joined the channel [21:52] unomi has joined the channel [21:53] mrjjwright has joined the channel [22:03] mjr_ has joined the channel [22:05] erikvold has joined the channel [22:08] fictorial has joined the channel [22:09] fictorial: Why does Kiwi use YAML instead of JSON for its seed files? Seems like an odd choice for a Javascript packaging system. [22:11] binary42 has joined the channel [22:12] darkf has joined the channel [22:15] micha_f has joined the channel [22:18] baconbits has joined the channel [22:19] mjr__ has joined the channel [22:20] atmos: fictorial: just replied to your comment [22:20] atmos: i'm not sure, visionmedia is the dude who wrote it [22:20] atmos: thusfar it's just be easier than submoduling stuff and works quite well here [22:21] atmos: it's just a posix shell script, you can use it to bootstrap node as well [22:21] fictorial: ok - looks good. I'll merge your patch later tonight. [22:21] fictorial: thanks [22:22] fictorial: wasn't there some other package manager in the works around here? npm perhaps? [22:22] atmos: yeah npm also exists but takes git repos i think [22:22] fictorial: is kiwi centrally hosted then I guess? [22:23] atmos: yeah, slicehost dedicated some resources for it [22:23] fictorial: ok [22:23] atmos: btw thanks for the code! [22:24] fictorial: I'm off to dinner, then I'l be back to finish merging my new parser based on node's Buffers (thanks _ry for the idea), and I'll package this up for Kiwi too. The file layout is cleaner if nothing else :) [22:24] isaacs: _ry: they're going to be stream-ish [22:24] isaacs: _ry: except, using foo.onsomething instead of foo.addListener("something") [22:24] atmos: fictorial: much appreciated [22:24] fictorial: atmos: thanks for the kiwi tip [22:25] isaacs: fictorial: yo [22:25] atmos: fictorial: there's a bugfix i pushed today too so if you can look at all 4 changesets that'd be nice to have the bug fix applied too [22:25] isaacs: ACTION is the npm dude [22:25] fictorial: isaacs: howdy [22:25] isaacs: atmos: it takes tarballs [22:25] atmos: isaacs: ahh ok [22:25] isaacs: atmos: and uses the package.json file therein [22:25] fictorial: atmos: I saw that - the "error" vs "reply.value" thing? is that in an error case? [22:25] fictorial: I'll fix that - [22:25] atmos: fictorial: perhaps, the tests didn't work earlier [22:26] atmos: i ran into that problem actually using the lib [22:26] fictorial: what was wrong with the tests? [22:26] atmos: they blow up [22:26] fictorial: ACTION needs more data [22:26] fictorial: I haven't had any problems with the tests - what version of node / redis? [22:27] atmos: AssertionError: "testBLPOP 2" "ERR unknown command 'BLPOP'" [22:27] fictorial: upgrade redis [22:27] atmos: k, i think i installed it outta homebrew [22:27] fictorial: you need at least 1.3.8 [22:27] atmos: 1.2.6 isn't good ? [22:27] atmos: lol [22:27] atmos: k [22:27] fictorial: brew is stable [22:29] atmos: isaacs: fictorial i guess the only advantage something like kiwi has is you can use it to install node if needed [22:29] fictorial: isaacs: I have no idea what the roadmap is for node.js w.r.t. packages like gems. All I know is that there is NPM and Kiwi. I have a couple of pull requests for Kiwi support. Anyone want to chime in on this? What is the general direction being taken between these too or others? [22:29] atmos: they seem pretty similar otherwise, i hadn't looked too closely at npm [22:29] isaacs: atmos: sure, but you'd have to install kiwi first. [22:29] fictorial: yeah :) [22:29] atmos: it sounds like they should be able to work with both [22:30] isaacs: atmos: they're very different, in fact. [22:30] fictorial: isn't that like chef too? you setup the box to install chef then use chef to install the rest ... uh... [22:30] isaacs: but there's no reason why you can't use both [22:30] isaacs: you can install npm with npm [22:30] isaacs: just unpack the tarball, and run "node install-npm.js" [22:31] atmos: isaacs: maybe you should hit up visionmedia about it ? [22:31] isaacs: atmos: i already sent tj a pull req with a package.json in kiwi [22:31] mrjjwright has joined the channel [22:31] isaacs: atmos: he seemed amused, and uninterested. [22:31] fictorial: I have to run. I honestly haven't thought about packaging this client at all. Seems a little weird to me. I think people would just include it in their apps and upgrade the one file as needed. *shrug* [22:31] atmos: fictorial: peace [22:31] _ry: isaacs: you should benchmark addListener('event') vs. .onevent [22:32] isaacs: _ry: adding a method is faster than any other way to run a function in v8 [22:32] _ry: there have been recent optimizations that i suspect make it much more similar [22:32] isaacs: _ry: and you get scope resolution for free [22:32] isaacs: er, context resolution, not scope resolution [22:32] isaacs: "this" [22:32] micha_f has joined the channel [22:32] _ry: it's definitely going to be faster - but for on listener there isn't much overhead [22:33] _ry: s/on/one [22:33] isaacs: the addListener isn't the slow bit. those two things are equivalent. [22:33] isaacs: it's the emit() that's slower. [22:33] isaacs: maybe not "equivalent", but faster than you can reasonably expect to measure, so even 100% diff wouldn't matter. [22:33] _ry: emit('event') = this._events['event'].apply(this) [22:34] isaacs: _ry: yes. [22:34] _ry: for one listener [22:34] isaacs: function.apply > function.call > function > obj.method [22:35] sudoer has joined the channel [22:37] isaacs: obj.method() is about twice as fast as fn.apply(obj) [22:38] isaacs: and about 5% faster than fn() or fn.call(obj) [22:38] isaacs: the latest round of optimizations in v8 made fn() and fn.call(obj) about equivalent, though, whereas fn.call() used to be much slower. [22:38] isaacs: so that's cool :) [22:38] isaacs: _ry: ^ [22:40] micha_f_ has joined the channel [22:40] isaacs: _ry: fn.call(obj) is around 24700Hz and fn() is around 24200Hz, so the diff is not much more than the rounding error of having a garbage-collected language. but I *am* seeing the same results over and over again, no matter how many times i run the bench or who happens to go first. [22:42] isaacs: ACTION feels a little like _ry's personal benchmark robot. [22:42] _ry: ok [22:42] _ry: :) [22:43] _ry: i wonder what fn.apply() is slower [22:43] isaacs: _ry: maybe because the list of arguments isn't guaranteed at compile time? [22:44] _ry: yeah, i guess [22:46] CodeOfficer has joined the channel [22:46] _ry: we should have the bot do benchmarking [22:47] _ry: that'd be cool [22:47] isaacs: hm. it might be possible to botify node-bench [22:47] isaacs: it's not a very complicated program [22:47] javajunky1: fictorial: to answer your original question, because parsing javascript in bash is hard, and the original kiwi client is written in bash (my port is js) .. tbh though last time I spoke to tj he was *adding* support for handling the package.json by calling into node? [22:51] isaacs: shameless plug: npm might not be sponsored by slicehost, but it is sponsored by couch.io, after a fashion, and the hosting for npm's registry is generously provided by half of sisterTrain. The npm publish command lets you send stuff to the registry, to create stuff like this: https://registry.npmjs.org/bench [22:51] isaacs: and by "half of sisterTrain", i mean, "me" [22:52] javajunky1: atmos: cool I notice you've just added redis session support, sweet, that takes the pressure of my mongodb one that I had to temporarily shelve after re-writing the session store architecture, did I make enough chnages for your stuff to work ? [22:57] micha_f has joined the channel [22:57] isaacs: mikeal: (the above plug was for your benefit) [23:01] atmos: javajunky1: yeah man, all working here [23:03] javajunky1: atmos: your stuff + my stuff (mongodb) is very similar, and the cache stuff in express is also very similar we're hoping to unify it all (the key-value stores that is) .. not sure where thats going at the minute, still dealing with the absent multipart-parser stuff atm :) [23:04] atmos: hehe, i haven't run into that yet [23:05] atmos: so you're just storing json in the db basically? [23:05] isaacs: javajunky1: you can just grab this one if you want: http://github.com/isaacs/multipart-js/blob/v0.0.0/lib/old.js [23:05] chakrit has joined the channel [23:06] isaacs: javajunky1: if you drop that in the $NODE_PATH somewhere, then require("multipart") will work just as before. [23:06] javajunky1: atmos: near enough at the mo yeah [23:07] javajunky1: isaacs, yeah thanks dude, I also watched the sha1 as it disappeared ;) so know what i was like also [23:09] tlrobinson_ has joined the channel [23:09] fictorial: isaacs: atmos: javajunky1: Yeah I have no interest in being involved in package manager wars or choosing sides. I'm going to steer clear for now as I personally don't see a huge need for redis-node-client to be a package. I'll keep an eye on this mini-space though. [23:10] fictorial: But, if I'm missing something or being dense, by all means, tell me :) [23:10] isaacs: fictorial: i think if you just create a package.json, and a seed.yml (or whatever kiwi uses) and not have to take any sides. [23:10] fictorial: hehe - I did just think of that too. [23:10] isaacs: fictorial: or just wait until I want to use your stuff, and i'll send you a pull req with the package.json in it ;) [23:10] fictorial: ding! [23:11] fictorial: by choosing nothing I choose everything - your moment of zen [23:11] isaacs: i don't really think of it as sides or a war, though [23:11] javajunky1: fictorial/isaacs: yeah thats the best plan, they both utilise the same (commonjs ish) package structures, [23:11] isaacs: and, if kiwi gets on board with using package.json, then all will be well with the word. [23:11] isaacs: *world [23:12] javajunky1: its more of a 'vacuum' at the minute, combined with a weird (as in one I've not experienced before) view in the community that package management is a 'bad thing' ™. [23:12] tmpvar: yep [23:12] fictorial: isaacs: editorialization on my part. maybe I was trying to create a HackerNews headline (zing!) [23:12] javajunky1: isaacs: I'm sure tj is on board with that, he's added package.json to his stuff last Ilooked [23:12] isaacs: kewl [23:12] fictorial: ah good - ok. thanks guys. [23:13] isaacs: i'm more of the opinion that package management systems are great, when they're simple and work. and it's a fun problem to work on [23:13] isaacs: people take things too seriously [23:14] fictorial: ACTION loves some APT [23:14] isaacs: ACTION misses yinst with a sad and heavy heart. [23:14] isaacs: if you've never worked for yahoo, you should at some point, if only so that you'll get to use yinst. [23:14] fictorial: Yeah it was pretty nice actually. [23:15] isaacs: fictorial: you a yahoo? [23:15] isaacs: (or, alum?) [23:15] fictorial: Alumnus. [23:15] isaacs: woot! /highfives [23:15] fictorial: I left in November to work full time on Fictorial LLC, my tiny 1-guy (hi there!) startup. [23:15] fictorial: I worked on integrating Right Media. [23:15] fictorial: Big backend ad server stuff in C++. [23:16] fictorial: It was sooooooo boring. [23:16] isaacs: ACTION is having deja vu.... we've had this conversation, yes? [23:16] fictorial: Yes, back in November or so. [23:16] isaacs: ah, nice [23:16] fictorial: Is Y! still letting you work full time on JS stuff? Fun! [23:16] isaacs: i left in january for a gig that didn't work out. been retired since then. [23:16] fictorial: Ahhh OK. [23:16] isaacs: this is my last week of funemployment, though ToT [23:17] fictorial: Wasn't yinst a 10K line single-file Perl script? heh. [23:17] rtl has joined the channel [23:17] isaacs: fictorial: yep, it sure was. [23:18] isaacs: fictorial: the actual yinst-dev package had the components, though. it was maintained as separate files. [23:18] fictorial: Y! had wrappers for *everything* it seemed. [23:18] isaacs: the build script put it together [23:18] javajunky1: *sob* enough git merge ends badly :( [23:18] fictorial: ysubversion, etc [23:18] javajunky1: s/enough/another/ .. I'm off cu. [23:18] isaacs: fictorial: it's because yahoo values having its employees question everything. [23:19] isaacs: why php? why apache? why subversion? [23:19] fictorial: haha [23:19] fictorial: indeed [23:19] isaacs: ok, i gotta go back to writing this parser. [23:19] fictorial: Heh, me too. [23:19] fictorial: (binary-safe redis client in a couple of hours) [23:32] chakrit has joined the channel [23:39] erikvold has joined the channel [23:41] ssteinerX has joined the channel [23:41] chakrit1 has joined the channel [23:54] tmpvar: http://tmpvar.com/project/ -- updated to automatically run tests on git push, also displays the result :)