[00:00] cedricv has joined the channel [00:03] cedric_ has joined the channel [00:04] devinus has left the channel [00:07] dnolen has joined the channel [00:08] creationix has joined the channel [00:09] cedric_ has joined the channel [00:11] creationix: I was interviewed for a podcast to talk about some node stuff yesterday, they just released the episode [00:11] creationix: http://thechangelog.com/post/441967194/episode-0-1-7-open-source-publishing-with-geoffrey [00:11] gwoo: sweeet [00:11] gwoo: why do all podcasts have this terrible intro music [00:11] gwoo: :) [00:12] creationix: I came here to tell felixge I mentioned his node-dirty, but I guess it's night over there [00:12] gwoo: yeah [00:12] gwoo: he is probably out having beer [00:12] cedric__ has joined the channel [00:13] creationix: this late? Isn't it like 1am [00:13] steadicat has joined the channel [00:14] gwoo: yeah he is definitely drinking beer then [00:14] gwoo: haha [00:15] creationix: hey, is anybody here going to txjs this summer? [00:15] creationix: it's like jsconf, only smaller, cheaper, and hotter [00:15] gwoo: ha [00:15] cedric_ has joined the channel [00:15] gwoo: in austin [00:15] gwoo: fun town [00:15] creationix: yep [00:16] creationix: nights are still cool in June, by August it's unbearable round the clock [00:16] gwoo: TXJS = JS + BBQ + you! [00:17] ashb: creationix: ddi you try our markdown module? or should i fork it and do it for you? [00:17] creationix: ashb: I'm still swamped, you're welcome to replace showdown with it [00:17] ashb: will try on the weekend [00:18] creationix: I'm in class right now learning about Koo and Toueg's Recovery Algorithm for distributed systems [00:18] ashb: sounds thrilling [00:18] cedric_ has joined the channel [00:21] cedric__ has joined the channel [00:24] creationix: ashb: actually this lecture is boring, I'll take a stab at it right now. Should be a quick drop in replacement [00:24] cedric_ has joined the channel [00:29] cedricv has joined the channel [00:29] mikeal has joined the channel [00:31] cedricv has joined the channel [00:34] cedric_ has joined the channel [00:36] cedric__ has joined the channel [00:40] cedricv has joined the channel [00:42] cedric_ has joined the channel [00:45] cedric__ has joined the channel [00:50] cedricv has joined the channel [00:52] cedric_ has joined the channel [01:01] mikeal has joined the channel [01:03] somnium has joined the channel [01:05] somnium: how to grab a native js objects by name, like this['Array'], in node? [01:06] somnium: 'require' also, can it be grabbed by name? [01:08] bpot has joined the channel [01:11] Tim_Smart: somnium: global['require'] [01:12] Tim_Smart: Native stuff, should be attached to 'this' [01:13] Connorhd has joined the channel [01:16] somnium: hmm, I tried a small.js script with sys.puts(global['require']) and sys.puts(this['Array']) and both came out undefined. Am I missing something? [01:18] Tim_Smart: Uh, yeah, when your script is compiled, it is wrapped in a function, and the API's are passed in as arguments [01:18] Tim_Smart: so require will be in the arguments variable >.< [01:21] somnium: ah, interesting, this too? [01:22] stepheneb has joined the channel [01:26] Tim_Smart: somnium: I think 'this' is a reference to 'exports' [01:26] Tim_Smart: which I think it probably shouldn't be, unless the commonjs specs say so [01:27] tlrobinson: commonjs doesn't define what "this" is in a module, so you shouldn't rely on it being anything in particular [01:27] QuietKnight: can "this" even be redefined in the arguments list? [01:28] somnium: ok, I found require in arguments[1] :), still havent found the native objects [01:29] creationix has joined the channel [01:30] creationix_ has joined the channel [01:32] QuietKnight: I seem to recall reading that http.Client doesn't support Keep-Alive. Is that true, and are there any plans on adding it? [01:33] Tim_Smart: tlrobinson: Most people expect 'this' to be the global context [01:33] Tim_Smart: so maybe we should leave it as that? [01:33] mikeal: quietnight, yes it does [01:33] mikeal: that's why all the http session is scoped to the request object [01:33] Tim_Smart: nodejs_v8: Object.getOwnPropertyNames(this) [01:34] nodejs_v8: Tim_Smart: ["TypeError", "decodeURI", "String", "Function", "Number", "undefined", "parseFloat", "encodeURI", "encodeURIComponent", "ReferenceError", "RegExp", "escape", "Array", "isNaN", "URIError", "unescape", "RangeError", "Date", "Infinity", "decodeURIComponent", "EvalError", "Math", "Boolean", "Error", "SyntaxError", "Object", "NaN", "eval", "parseInt", "execScript", "JSON", "isFinite"] [01:34] QuietKnight: lol mikeal. You're just full of useful info for me :) [01:34] mikeal: hehe [01:34] mikeal: it supports keep-alive [01:34] mikeal: it doesn't support pipelining [01:34] Tim_Smart: ^---- that is what a clean sandbox references this as, I modules should also [01:35] Tim_Smart: *I think [01:35] mikeal: QuietKnight: http://github.com/mikeal/node.proxy.js/blob/master/main.js#L5 [01:35] mikeal: elastic http connection pool [01:35] QuietKnight: I was planning on adding a connection pooling mechanism on top of http://github.com/felixge/node-couchdb (which uses http.Client) [01:35] QuietKnight: I'll check that out [01:36] mikeal: i should get felix to steal my code ;) [01:36] mikeal: i use his library all the time [01:36] QuietKnight: I made the first issue for it! (I'm so proud) [01:36] somnium: Tim_Smart: great! thanks [01:37] Tim_Smart: somnium: It doesn't though, that is the problem [01:38] somnium: hmm [01:38] QuietKnight: actually, this is a great time to verify something. Node.js *is* single-threaded, yes? So globally referenced objects are thread-safe and all. [01:38] somnium: I guess I could just stuff them into an object and pass that to the code that does the calling by name [01:39] mikeal: yes and no [01:39] mikeal: all of the javascript you write will be in the main "thead" [01:39] mikeal: er thread [01:39] mikeal: but a bunch of the IO uses a thread pool for non-blocking writes [01:39] QuietKnight: sure, but thats "behind the scenes" [01:40] QuietKnight: mostly I was interested in things like globally updated arrays and such [01:40] mikeal: but node.js doesn't work like traditional non-blocking systems [01:40] mikeal: where the program will exit when the script finishes so you have to block it [01:40] QuietKnight: or for instance, in your code, if (clients[i].busy === false) { [01:40] mikeal: node only exits when there is nothing left in the event system [01:41] mikeal: yeah, that all works as expected [01:41] QuietKnight: Node really is so nice, btw. Great job everybody. [01:42] QuietKnight: I few months ago I tried getting Jaxer to do more or less what Node does. Not fun. [01:49] rictic has joined the channel [01:51] BBB has joined the channel [01:54] _ry: Tim_Smart: will you email me your patch when you're done? (i also want to do your evalctx patch tonight) i'm going to sign off irc for the rest of the day [01:55] cedricv has joined the channel [01:57] mikeal has joined the channel [01:58] QuietKnight: mikeal- didn't get a chance to say "Thanks" for all your help. [01:58] mikeal: np [02:01] indiefan has left the channel [02:14] ditesh|cassini has joined the channel [02:24] gf3 has joined the channel [02:25] dnolen has joined the channel [02:27] jed has joined the channel [02:49] tmpvar has joined the channel [02:52] tmpvar: JimBastard, yo, not sure I want to give my twitter creds ;) [02:52] dnolen has joined the channel [02:53] tmpvar: Tim_Smart, whats up [02:53] Tim_Smart: tmpvar: Yo, just settle the registerExtension patch for node [02:53] Tim_Smart: *settled [02:53] tmpvar: nice [02:54] Tim_Smart: tmpvar: http://github.com/Tim-Smart/node/compare/registerExtension [02:54] Tim_Smart: oops, mistake in internal docs >.> [02:56] tmpvar: looks pretty solid from a quick glance [02:56] tmpvar: not sure about the extension = ".something" [02:56] tmpvar: er..... [02:56] tmpvar: the . specifically [02:56] tmpvar: [02:57] tmpvar: Tim_Smart, you mind if i PM? [02:58] Tim_Smart: go for it [03:19] BryanWB has joined the channel [03:25] mattly has joined the channel [03:34] pjb3 has joined the channel [03:34] keeto has joined the channel [03:48] joshbuddy has joined the channel [03:49] dnolen has joined the channel [03:51] mikeal has joined the channel [03:52] JoePeck has joined the channel [03:53] ivan has joined the channel [03:58] JimBastard: sup tmpvar just got back in [03:58] JimBastard: left the after party real early [03:58] schell has joined the channel [03:58] tmpvar: what up [03:58] schell: wow, lots of people here - anyone up? [03:58] JimBastard: drunk and wearing a suit, probaly gonna hack on hook.io after the weed man gets here [03:58] JimBastard: hell yeah schell [03:59] JimBastard: its a javascript party [03:59] schell: sweet [03:59] JimBastard: #node.js is pretty active room [03:59] schell: i was in #nodejs for about an hour before someone said something [03:59] JimBastard: yeah thats the wrong room [04:02] tmpvar: lol [04:02] tmpvar: nice suit btw [04:02] tmpvar: love the shoes [04:03] tmpvar: HA [04:03] schell: you guys in the same room IRL or am i missing something here? [04:04] JimBastard: sorry, bit off topic [04:04] JimBastard: nyc.js meetup tonight [04:04] JimBastard: we both attended [04:04] schell: ah, cool [04:04] joshbuddy has joined the channel [04:04] joshbuddy has joined the channel [04:04] mikeal: #node.js [04:05] mikeal: not #nodejs [04:05] JimBastard: yeah we should register #nodejs [04:05] JimBastard: and redirecty [04:05] JimBastard: it looks bad, there are a few people in there [04:05] JimBastard: including JohnResig [04:05] frodenius has joined the channel [04:05] frodenius has joined the channel [04:05] schell: and it's very quiet [04:05] mikeal: haha! [04:05] mikeal: he's also in here [04:06] whoahbot has joined the channel [04:12] BryanWB has joined the channel [04:16] tmpvar: just ported the html-minifier to node [04:16] tmpvar: http://github.com/tmpvar/html-minifier [04:16] tmpvar: and now i need more beer [04:17] mikeal: i'm having rum and ginger beer [04:17] mikeal: it's delicious! [04:17] tmpvar: wow [04:17] tmpvar: ginger beer [04:17] JimBastard: damn you tmpvar [04:17] tmpvar: is that like ginger ale? [04:17] JimBastard: i wanted to do all the easy work [04:17] tmpvar: lol [04:17] mikeal: it's like ginger ale with very little sugar and 5x more ginger [04:17] gwoo: mikeal dark and stormy? [04:17] tmpvar: nice, sounds like it would go well with rum [04:17] Tim_Smart: creationix on thechangelog :D [04:18] gwoo: yup [04:18] joshholt has joined the channel [04:18] mikeal: gwoo: nope [04:18] Tim_Smart: Just listened to 0.1.7 [04:18] tmpvar: woah, what just happened? [04:18] mikeal: just some good demerara rum and fever pitch ginger beer [04:18] gwoo: mikeal: ah [04:19] gwoo: ACTION loves run [04:19] gwoo: rum [04:19] gwoo: tmpvar: nothing. are you having rum too? [04:20] tmpvar: na [04:20] tmpvar: beer [04:20] tmpvar: working on my gut [04:20] gwoo: haha [04:20] mikeal: there is this navy proof demerara jamacian rum that all the good bars in the bay have been getting [04:20] mikeal: called Smith and Cross [04:20] mikeal: and i got a bottle of it [04:20] mikeal: it's amazing, and incredibly cheap [04:20] Tim_Smart: http://tmpvar.com/ ^^ It works! [04:21] gwoo: mikeal: im googling [04:21] mikeal: do you live in the bay? [04:22] gwoo: LA [04:22] gwoo: head to SF next week [04:27] mikeal: so [04:27] mikeal: if you want a bottle [04:27] mikeal: you can probably get one at Cask in SF [04:27] mikeal: or if you're in Berkeley [04:27] mikeal: Ledgers Liquors [04:27] derferman has joined the channel [04:32] tmpvar: Tim_Smart, yeah.. good ol apache [04:33] tmpvar: its almost friday! [04:36] PyroPeter has joined the channel [04:37] onar has joined the channel [04:37] tmpvar: feeding, ill be back [04:38] creationix has joined the channel [04:54] binary42 has joined the channel [04:54] mjr_: "navy proof" [04:55] mikeal has joined the channel [05:03] tilgovi has joined the channel [05:13] schell: what exactly, is navy proof? [05:20] Tim_Smart: Protected against dark blue hues? [05:24] micheil has joined the channel [05:25] schell: includes trace amounts of lemon juice? [05:25] gwoo: schell: i think it's a different scale [05:26] schell: ah, so the general % = 1/2 * proof doesn't apply? [05:27] schell: probably something like % = 2/3 * proof [05:29] mattly has joined the channel [05:30] joshholt has joined the channel [05:46] softdrink has joined the channel [06:00] kennethkalmer has joined the channel [06:05] CIA-77: node: 03Tim-Smart 07master * r0c17067 10/ (4 files in 3 dirs): Add require.registerExtension - http://bit.ly/cihNZM [06:05] CIA-77: node: 03Ryan Dahl 07master * rdd857f9 10/ src/node.js : [06:05] CIA-77: node: .addon -> .node [06:05] CIA-77: node: How'd that get in there? - http://bit.ly/c2mfOz [06:05] CIA-77: node: 03Ryan Dahl 07master * rc96b7e5 10/ src/node.js : Missing EOL semicolons - http://bit.ly/9phKTW [06:09] CIA-77: node: 03Vanilla Hsu 07master * r116dfb8 10/ deps/libeio/wscript : 1: sync wscript with libeio.m4 2: try to enable macosx's sendfile. - http://bit.ly/bTQSi3 [06:18] dnolen has joined the channel [06:18] Tim_Smart: registerExtension ftw [06:18] Tim_Smart: auto-compile template on require() [06:18] Tim_Smart: :D [06:19] sveisvei has joined the channel [06:24] bronson has joined the channel [06:37] brainss has joined the channel [06:42] mikeal has joined the channel [06:48] cedric_ has joined the channel [07:00] mde has joined the channel [07:05] drostie has joined the channel [07:14] kjeldahl has joined the channel [07:17] qFox has joined the channel [07:20] _ry has joined the channel [07:21] _ry: 'lo [07:27] Tim_Smart: _ry: Morning / Afternoon / Evening. That should have it covered :p [07:28] Tim_Smart: _ry: Have you got the evalCX patch covered? I mean it isn't hard >.> [07:28] binary42 has joined the channel [07:28] _ry: Tim_Smart: oh where is it? [07:29] Tim_Smart: _ry: Oh, well, I haven't actually patched it yet :D [07:29] _ry: ah, okay [07:29] Tim_Smart: But I can, if you don't get around to it [07:29] _ry: I thought you had done a patch already [07:29] Tim_Smart: I have implemented it, but I haven't got in node core yet [07:30] _ry: oh right. yeah - please patch me. [07:30] _ry: w/ tests :) [07:30] Tim_Smart: Right, so somewhere in node.cc ? [07:30] _ry: sure [07:31] Tim_Smart: ACTION hasn't looked at node's C++ side in detail yet [07:33] CIA-77: node: 03Vanilla Hsu 07master * rb130816 10/ src/node.cc : use getpagesize() to get PAGE_SIZE on FreeBSD. - http://bit.ly/bfUnWb [07:33] javajunky has joined the channel [07:37] _ry: Tim_Smart: good - this is my way of pulling you in :) [07:37] _ry: Tim_Smart: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml [07:43] sveimac has joined the channel [07:43] sveimac has joined the channel [07:44] Joshua__Holt has joined the channel [07:45] Joshua__Holt: since process.unloop() is being Depreciated what's the alternative? [07:45] sveimac has joined the channel [07:46] sveimac has joined the channel [07:46] ditesh|cassini has joined the channel [07:47] JoePeck has joined the channel [07:47] _ry: JoePeck: nothing [07:47] _ry: oops [07:47] JoePeck: heh [07:47] _ry: Joshua__Holt: nothing [07:47] sveimac has joined the channel [07:47] Joshua__Holt: _ry: nice [07:47] BryanWB has joined the channel [07:48] sveimac has joined the channel [07:50] sveimac has joined the channel [07:50] mikeal has joined the channel [07:51] CIA-77: node: 03Ryan Dahl 07master * r6ec2f87 10/ src/node.cc : Depreciation -> Deprecation - http://bit.ly/aPWI0g [07:51] sveimac has joined the channel [07:52] Joshua__Holt has joined the channel [07:52] kjeldahl has joined the channel [07:54] michaelk^ has joined the channel [07:58] Joshua__Holt has left the channel [08:01] sveimac has joined the channel [08:01] sveimac has joined the channel [08:15] Joshua__Holt has joined the channel [08:16] _Ray_ has joined the channel [08:16] _Ray_: Node uses a threadpool for the blockign I/O routines, right? [08:27] cedricv has joined the channel [08:28] cedricv has joined the channel [08:29] piranha has joined the channel [08:42] Tim_Smart: _Ray_: More specifically, libeio [08:42] Tim_Smart: but yes, a thread pool [08:43] pdelgallego has joined the channel [08:43] _Ray_: Thanks :) [08:44] christkv has joined the channel [08:44] michaelk^ has joined the channel [08:45] felixge has joined the channel [08:45] felixge has joined the channel [08:59] erikvold has joined the channel [09:05] markwubben has joined the channel [09:06] keeto has joined the channel [09:12] javajunky has joined the channel [09:12] chandru_in has joined the channel [09:13] chandru_in: I've built a small MVC system for node.js and would love to get your feedback on it. Does this channel allow posting links to one's own projects? [09:19] kjeldahl has joined the channel [09:22] Tim_Smart: chandru_in: Um I think it is banned [09:22] Tim_Smart: Just kidding, go ahead [09:26] chandru_in: :) http://github.com/tuxychandru/mvc.js#readme It is purely experimental as of now and would love you get your feedback on how it could be designed to make a highly expressive and powerful MVC framework for node. [09:29] javajunky: chandru_in : looks cool, but why would I use this over say 'express' which offers a very similar mechanism but has more functionality currently ? (thats not a criticism, I'm interested to know what your vision is ;) ) [09:35] chandru_in: javajunky: From whatever little I saw abt express, it doesn't make implementation of RESTful URLs easy. For example, /people/{id}. I might be wrong though. [09:35] chandru_in: Also while express behaves more like rails, MVC.js tries to be more general purpose and flexible [09:36] javajunky1 has joined the channel [09:38] chandru_in: Also, MVC.js uses smart resolution of views. For example, people/5.html would pick your HTML template while people.5.xml would automatically pick the XML template [10:07] chandru_in: javajunky1: Just out of curiosity, does express support RESTful URLs? Also it seems that express needs you to add routes for static files too! [10:10] felixge has joined the channel [10:10] felixge has joined the channel [10:13] paul_ has joined the channel [10:13] cedricv has joined the channel [10:14] cedric_ has joined the channel [10:15] cedricv has joined the channel [10:22] Tim_Smart has joined the channel [10:25] bronson has joined the channel [10:36] javajunky has joined the channel [10:37] BryanWB has joined the channel [10:37] xueyu has joined the channel [11:04] Atmoz has joined the channel [11:04] maushu has joined the channel [11:04] maushu: Anyone knows why multipart would suddenly stop working? [11:05] sveimac has joined the channel [11:06] sveimac has joined the channel [11:07] xueyu_ has joined the channel [11:11] maushu: What the freaking hell. [11:11] maushu: Multipart stopped working after I added node-redis-client? [11:11] maushu: It works again when I remove it. [11:13] xueyu has joined the channel [11:15] maushu: I don't know how to fix this. [11:15] maushu: I have no idea on how two unrelated modules aren't working. [11:17] maushu: Funny, it works this way... damn it. I bet it's javascript contexts. [11:18] javajunky: chandru_in: I don't see why it wouldn't support RESTful routes , as to the static file support, you need to provide a route in so much as a route that answers /images/* or /public/* yup [11:19] javajunky: it would I think be easy enough to automatically choose the view template to render based on the extension requested as well [11:43] chandru_in: javajunky: As far as I see, it still needs manual parsing of the URL path to determine the actual paramters [11:44] chandru_in: for example, /country/100/city/1 would be mapped as /country/{country_id}/city/{city_id} in mvc.js [11:44] chandru_in: in express it'd be mapped as /country/* from which the controller must parse the values [11:46] chandru_in: But yes there are glaring features missing in mvc.js too. For example there is no direct support for sessions as such. However, I'm working on an implementation which should allow pluggable session store. [11:57] attadaved has joined the channel [11:57] javajunky: This could be functionally improved to auto generate, but a trivial example of the above would be http://pastebin.com/2pH1NyZW [11:57] stevebiscuit has joined the channel [12:00] attadaved has left the channel [12:09] chandru_in: javajunky: Interesting. What did u mean by auto-generate? [12:23] javajunky: detect and create strings like '/{xx}/' and generate '/(.+)/' (where .+ is a valid url segment thing...) [12:23] ashb: w/ 21 [12:40] javajunky: chandru_in: Actually I'm a fool, this is already implemented see : http://pastebin.com/at2q5ktp [12:40] javajunky: for your case your `route` would be `/country/:country/city/:city` [12:41] alex-desktop has joined the channel [12:43] MattJ has joined the channel [12:47] Tim_Smart has joined the channel [12:51] emyller has joined the channel [13:05] kriszyp has joined the channel [13:18] JAAulde has joined the channel [13:19] JAAulde: g'morning [13:20] maritz has joined the channel [13:38] christkv: hi guys, if you are using node-mongodb-native you should upgrade to V0.6.5 as there's a nasty unicode bug that got fixed [13:38] ashb: christkv: what was the casuse? [13:38] christkv: I discovered trying to encode felix's name [13:39] ashb: ended up with the two bytes as two separate chars after round tripping? [13:39] christkv: ashb: the length was being calculated wrong in the BSON serializer [13:39] ashb: oh, ouch [13:39] christkv: he he [13:39] christkv: thank good we europeans like to decorate our names with non-standard ascii characters [13:40] christkv: gof [13:40] christkv: god [13:40] ashb: ;) i'm used to testing with two classes of chars [13:40] ashb: 'é' and '☃' [13:40] ashb: the first because it fits in latin-1 and some thing deal with it badly [13:41] ashb: the other cos it doesn't and its a cool glyph [13:41] christkv: he he, unicode the bane of all developers [13:41] christkv: they should have made it 3 or 4 bytes so we did not have to deal with codepages [13:42] christkv: kind of hoping I can start up a nodejs user group here in Barcelona [13:44] christkv: google group members passed 1000 [13:46] softdrink has joined the channel [13:50] xueyu has joined the channel [13:53] ditesh|cassini has joined the channel [13:54] maushu: This always makes me laugh: http://i.imgur.com/e3GxE.jpg [13:54] christkv: lol [14:04] dnolen has joined the channel [14:07] pmuellr has joined the channel [14:11] paul_ has joined the channel [14:19] jherdman has joined the channel [14:21] davidsklar has joined the channel [14:24] xueyu has joined the channel [14:25] xueyu has joined the channel [14:25] dnolen has joined the channel [14:27] michaelk^ has joined the channel [14:32] xueyu has joined the channel [14:39] Cainus has joined the channel [14:41] maushu: Dammit, why can't nginx stream the request. [14:42] maushu: Oh the heck am I supposed to tell the browser that the file already exists and should stop sending the file. [14:42] maushu: *How [14:46] ashb: masuidrive: thats what 100 Continue is designed for i think [14:46] ashb: maushu: ^^ [14:46] ashb: masuidrive: sorry - wrong person [14:46] maushu: ashb: huh, wat. [14:47] ashb: http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html §8.2.3 [14:47] maushu: How am I supposed to send 100 if nginx completely steals me the connection till it completes? [14:47] ashb: The purpose of the 100 (Continue) status (see section 10.1.1) is to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body. [14:47] ashb: oh nginx - dont know [14:47] maushu: Ah. [14:47] maushu: nginx doesn't respect that. At least not the way I want. [14:47] maushu: *sigh* Well, I will use ajax to ask the server first then. [14:48] ashb: dont use it then :) [14:48] emyller has joined the channel [14:48] maushu: It already uses ajax for everything else so... [14:49] maushu: Shame we can't upload files using javascript. [14:49] ashb: websockets [14:49] ashb: :) [14:49] maushu: I don't have access to file data. [14:49] ashb: i think FF3.6 lets you get at the file content of a file input [14:49] maushu: Yes, but that is the only browser. [14:50] maushu: Implementing that feature only for a single browser is a waste of time. [14:50] ashb: never said it wasn't :) [14:50] maushu: If chrome and safari (or opera) had it too then I would implement it. [14:51] JAAulde: Anyone know if http://twitter.com/nodejs is the official Node twitter presence (or lack thereof based on 0 activity) [14:52] softdrink has joined the channel [14:52] JAAulde: or is it someone sitting on the username? [14:52] pdelgallego has joined the channel [14:52] ashb: maushu: http://www.w3.org/TR/file-upload/ fwiw [14:52] gf3 has joined the channel [14:55] gwoo: JAAulde: follow ry [14:55] gwoo: ryah [14:56] gwoo: JAAulde: i think it's parked for now [14:57] JAAulde: gwoo: cool..as long as it's parked by Node people and not some random person I'll follow it :) [14:57] gwoo: JAAulde: hehe, yeah i think so [14:57] gwoo: it's safe [14:58] JAAulde: gwoo: and ry is http://twitter.com/ryah ? [14:58] gwoo: yup [14:58] JAAulde: cool, thanks [14:58] JAAulde: how about you? [14:58] gwoo: gwoo :) [15:00] JAAulde: but of course [15:02] maushu: Till now I was able to do this: http://bb.graphnode.com/ [15:04] maushu: Btw, I need a 80x15 node.js button. :3 [15:04] tmpvar_ has joined the channel [15:05] Munter has joined the channel [15:05] dnolen_ has joined the channel [15:08] Booster has joined the channel [15:12] softdrink has joined the channel [15:21] unomi has joined the channel [15:28] okito has joined the channel [15:28] okito: hi everyone. can anyone tell me what will replace node.unloop()? [15:28] okito: it is deprecated [15:31] maushu: We have an node.unloop()?! [15:32] okito: process.unloop [15:32] okito: :) [15:33] maushu: Oh. [15:36] maushu: All this async insanity is tempting me to change to postgres instead of redis. [15:36] cloudhead has joined the channel [15:37] alexiskander has joined the channel [15:38] softdrink: i'm toying with using lots of little per-user sqlite dbs, and one main one for auth [15:39] ashb: be careful of the locking that sqlite does [15:39] aryounce has joined the channel [15:39] ashb: softdrink: but mainly that seems needless complex [15:39] softdrink: *nod* that's why the per-user thing [15:39] softdrink: lots of reading, not much writing [15:41] softdrink1 has joined the channel [15:41] softdrink1: damned hospital wireless [15:42] softdrink1: it's bad enough i have to proxy just to get anywhee [15:42] softdrink1: *anywhere [15:42] ashb: i suggest you use irssi or quassel then :) [15:43] maushu: I have a problem. [15:43] ashb: i have many [15:44] maushu: Oh good. [15:44] maushu: Misery loves company. [15:44] joshbuddy has joined the channel [15:45] maushu: I need to check if a file exists before it write the upload to the disk.. unfortunately thanks to async it starts writting first before checking. *sigh* [15:46] ashb: start the write inside the callback for the exists check [15:46] maushu: I did that. Now it gives a error because of the lack of file handle on the write. [15:46] maushu: I will try using pause and resume. [15:47] javajunky: path.exists blocks doesn't it ? [15:47] ashb: nothing much blocks [15:47] javajunky: err scratch that [15:47] ashb: eixstsSync if it is there would be the blocking version [15:48] javajunky: tbh I preferred it when nothing blocked, now its a mix I get confused much more easily :( [15:48] maushu: I check if a file exists in the database. [15:49] softdrink1: your site -> help -> LRN 2 RSYNC [15:49] softdrink1: that's less funny typed out than it was in my head. [15:52] javajunky: I guess for me at least its things like 'fs.createWriteStream' … sync, fs.open … not sync (but with sync option available) … s'fine as its on the docs, but little things like that confuse my tiny mind :( [15:53] ashb: fs.createWriteStream doesn't actually *do* anything - why would it block? [15:54] maushu: I wonder if it would be better to completely forget about using nginx as a reverse proxy. [15:55] javajunky: as a 'consumer' of that method call how can I know what it does or doesn't do ? :) .. (devil's advocate I'm capable enough to hit the code) [15:55] maushu: Does anyone actually use node.js without any kind of reverse proxy? [15:59] maushu: Is node.js decently fast at serving static files? [15:59] maushu: *Large* static files? [16:00] ashb: should be [16:00] maushu: Maybe I should just forsaken nginx. It gives me tons of work to work around. [16:00] Munter: You might want to set up Varnish instead though [16:00] nsm has joined the channel [16:00] ashb: varnish FTFW [16:01] ashb: (or any cache that does ESIs, but varnish is cool too) [16:05] maushu: Munter: Does varnish cache requests instead of streaming them? [16:06] Munter: maushu: I don't know [16:06] maushu: Hmmm. Well, a cache would be I guess. [16:07] stepheneb has joined the channel [16:11] kriszyp_ has joined the channel [16:11] bjartek has joined the channel [16:13] JAAulde: how often is Node built? [16:20] kennethkalmer has joined the channel [16:22] bpot has joined the channel [16:23] maushu: JAAulde: You can see the dates here: http://github.com/ry/node/downloads [16:24] CIA-77: node: 03Tim-Smart 07master * rae10a48 10/ (src/node.cc test/simple/test-eval-cx.js): Initial implementation of process.evalcx - http://bit.ly/dlK0pA [16:24] _ry has joined the channel [16:25] keeto has joined the channel [16:28] creationix has joined the channel [16:29] christkv: hey guys I put up http://www.nodeblogs.com/ [16:29] christkv: its BASIC lol [16:29] christkv: suggestions are welcome [16:29] christkv: for users to track as well [16:30] christkv: code is on http://github.com/christkv/node-blogs [16:30] creationix: christkv: how do you add projects to the list [16:30] creationix: for example, it's missing creationix/do [16:30] _ry: christkv: nice [16:31] christkv: probably because I'm filtering out projects that does not contain nodejs [16:31] christkv: so just add nodejs to the description and it should pick it up [16:31] creationix: ahh, fair enough [16:31] creationix: looks very cool btw [16:32] christkv: add people you think should be aggregated by giving me a push request on the conf/content.json file [16:32] christkv: http://github.com/christkv/node-blogs/blob/master/conf/content.json [16:32] christkv: thanks guys :D. It helped me iron out some bugs in the mongodb driver [16:34] JAAulde: thanks maushu [16:34] JAAulde: I assume, then from the date ranges that there is not automated nightly or anything. [16:35] christkv: It pulls every about once an hour [16:35] christkv: sorry about once an hour [16:35] aryounce has joined the channel [16:37] christkv: creationix id did pick up do it seems [16:37] christkv: it [16:37] creationix: sweet, I love to see code that workd [16:37] creationix: *works [16:38] christkv: the sweetest thing was grabbing the json object adding an id and slamming them into mongo without transformations [16:38] ashb: _id, no? [16:39] christkv: ashb: jupp but using the 'provided' ids from github f.ex [16:40] bronson has joined the channel [16:40] creationix: christkv: so for the articles, you're using the rss feeds right? [16:40] christkv: creationix: jupp [16:41] creationix: I'd recommend pulling the channel/title and channel/description tags and showing them somewhere so people know which site you pulled each article from [16:41] maushu: felixge! Your face is the size of europe?! [16:42] felixge: maushu: ? [16:42] creationix: felixge: nodeblogs.com [16:42] creationix: look on the map [16:43] creationix: I wonder why I have two different gravitars? the one in the map is a lot older [16:43] felixge: k, makes sense :) [16:43] christkv: creationix: my laziness that's why [16:43] christkv: creationix: the map one is your twitter [16:43] christkv: creationix: pulling location of twitter [16:44] creationix: you're right, I never changed my twitter pic, that's fine, I was worried it was some strange caching issue [16:44] pdelgallego has joined the channel [16:44] christkv: creationix: i'll note down your suggestion [16:44] ashb: i've had an idea to write a service to update profile pics for all the 100s of services that need one [16:44] ashb: never got round to doing it tho [16:45] ashb: also most services dont provide an API to do that operation - so you have to screen-scrape to do it :( [16:46] christkv: what really sucks is github. 60 calls pr minute max to their api [16:46] christkv: at least give me 120 [16:47] creationix: per minute? [16:47] christkv: yeah [16:47] maushu: Does node-mongodb work with the latest node version? [16:47] creationix: I would think once a second is enough [16:48] christkv: maushu: with 0.1.31 yes [16:48] maushu: Thanks. [16:48] creationix: christkv: also while you're at it pull the author tag of the individual articles [16:48] creationix: mainly I'm worried about copyright issues [16:49] whoahbot has joined the channel [16:49] creationix: if you republish content without giving proper credit you can get into trouble with some people [16:49] christkv: creationix: fair enough I'll see what I can do about it but not all feeds have it. I guess I can use the info set up [16:49] creationix: well, if the feed doesn't have it, there isn't much you can do other than manually add it in [16:50] creationix: or just bug the maintainer of the blog [16:50] creationix: if I'm missing any tags I'll gladly add them in for you [16:50] christkv: well I can add the originating site that's for sure [16:51] christkv: howtonode is a bit special I guess :) [16:55] creationix: christkv: I wonder if there is a way to not show the whole article inline, it kinda drowns out other content. I have to scroll down quite a bit to see the next entry [16:55] creationix: I included the whole content so people can read the article in full on their rss readers [16:55] creationix: is there an rss tag for just summary [16:55] dandean has joined the channel [16:57] christkv: creationix: not really [16:58] christkv: I guess the next step would be to add a "read-more" [16:58] christkv: and cut the story down [16:58] maushu: I think I will try mongodb instead of redis. [16:58] creationix: all of my articles have a requirement that the summary be the text between the h1 and the first h2 [16:58] creationix: or I could make a second feed on just summaries if you want [16:59] christkv: creationix: that sounds easier [16:59] christkv: creationix: for me anyway [17:00] creationix: ok, I've got a work meeting in a minute, but I'll have a new feed after that [17:00] christkv: creationix: awsome. I might be off but I'll find it in the source code on git [17:00] christkv: github [17:01] creationix: thanks for the site, I think it will help bring the community together some [17:01] christkv: creationix: my pleasure [17:01] bpot has joined the channel [17:04] JimBastard_ has joined the channel [17:04] RayMorgan has joined the channel [17:04] JimBastard_: yo _ry you should probaly register #nodejs and setup a redirect to this room [17:05] _ry: i did [17:05] _ry: well i registered [17:05] JimBastard_: like if you try to join #javascript [17:06] JimBastard_: you'll see it makes you join ##javascript [17:06] tlynn has joined the channel [17:06] JimBastard_: im not sure how to actually set that up though...sorry [17:06] ashb: joining #javascript sounds about as useful as joining #php [17:06] JimBastard_: its worse, because you expect things would go well [17:07] ashb: i wouldn't [17:07] JimBastard_: 90% of the conversations in #javascript could be ended with someone saying, use jQuery [17:07] maushu: JimBastard_: what is wrong with jquery? [17:08] confounds has joined the channel [17:08] maushu: Hmm, mongdb seems more helpful for me for handling uploads. [17:09] JimBastard_: maushu: are you ESL? [17:09] maushu: Yes. [17:09] JimBastard_: i see [17:09] maushu: See what? [17:09] JimBastard_: that makes a lot of sense [17:09] maushu: What makes sense?! [17:09] JimBastard_: you being ESL [17:09] maushu: Why. [17:10] JimBastard_: well for one you misunderstood my sentence, but ive seen you do this in the past as well [17:10] JimBastard_: didnt know if you had shitty reading comprehension, or if you were ESL [17:11] maushu: I just read your last sentence. [17:11] maushu: So, no "shitty reading comprehesion" or the fact that english is my second language. [17:11] okito has left the channel [17:11] maushu: Only laziness. :3 [17:12] michaelk^ has joined the channel [17:13] maushu: Anyone used node-mongodb? [17:13] cloudhead has joined the channel [17:15] aguynamedben has joined the channel [17:15] JimBastard_: maushu were you the guy who thought new Date().getTime() was appropiate for unique IDs? [17:17] maushu: JimBastard_: Huh, no? [17:18] dnolen has joined the channel [17:18] maushu: Error: Version mismatch: waf 1.5.14 <> wafadmin 1.5.10 (wafdir /usr/local/bin/../lib/node) [17:18] maushu: *sigh* [17:18] ashb: get rid of .waf* ? [17:18] unomi has joined the channel [17:19] felixge has joined the channel [17:19] felixge has joined the channel [17:21] _ry: maushu: node-waf configure [17:21] _ry: maushu: er rather, rm -rf build [17:23] maushu: _ry: Ah, thanks. [17:23] CIA-77: node: 03Ryan Dahl 07master * rc1613e6 10/ (doc/api.txt src/node.js): Deprecate process.mixin - http://bit.ly/cIJnA9 [17:24] maushu: node-mongodb still uses promises. ;_; [17:24] _ry: maushu: http://github.com/ry/node-amqp/blob/3c2fd893ca082acfcd4cd27e2a058ba14eb963f0/promise.js [17:25] maushu: _ry: Huh, would be better to just update node-mongod? [17:26] _ry: probably [17:26] _ry: but that's an easy fix [17:28] cloudhead has joined the channel [17:30] _ry: felixge: http://github.com/efnx/node/commit/f79a170c36d666ce5ccef9185000ebe535602be1 [17:30] felixge: _ry: not good, doesn't uncache child modules [17:31] ashb: also seems odd to look in the cache anyway [17:37] steadicat has joined the channel [17:39] pdelgallego has joined the channel [17:42] felixge: ashb: ? [17:42] ashb: that it always does 'internalModuleCache[id] || parent.moduleCache[id];' [17:43] ashb: even when its ignored [17:43] ashb: doesn't matter, just seems odd is all [17:50] unomi has joined the channel [17:53] kriszyp has joined the channel [17:54] n8o_ has joined the channel [17:54] aryounce has joined the channel [17:58] RayMorgan_ has joined the channel [17:59] RayMorgan_ has joined the channel [17:59] _ry: felixge: do you have a gsoc account? [18:00] codeswing has joined the channel [18:05] Cainus has joined the channel [18:13] javajunky has joined the channel [18:14] atmos has joined the channel [18:16] atmos has joined the channel [18:21] stepheneb has joined the channel [18:26] rictic has joined the channel [18:26] ollie has joined the channel [18:31] RayMorgan has joined the channel [18:35] brainss has joined the channel [18:40] mattly has joined the channel [18:47] javajunky: _ry: there's a mkdirs patch hanging around on the ML, are you planning on pulling this in at some point, or should I keep writing my async, recursive removes :) ? [18:48] RayMorgan has joined the channel [18:48] brainss has joined the channel [18:51] _ry: javajunky: um. i haven't decided yet [18:55] javajunky: ;) okey doke (I just keep ballsing up my implementations :P ) [18:57] _Ray_ has joined the channel [18:57] creationix: why is it that paid work is so boring and fun work in unpaid, just doesn't seem right to me [18:58] _ry: creationix: my work is fun [18:58] cpojer has joined the channel [18:58] _ry: :) [18:58] creationix: maybe it's just because I'm on Java based web app right now [18:59] creationix: once node becomes more widespread in commercial use I'll probably switch to that [18:59] jherdman: creationix: maybe you should spearhead that effort ;) [19:00] cpojer: is there going to be a simple "extend" function in node? [19:00] cpojer: following the deprecation of mixin [19:00] cpojer: like extend(target, source) [19:00] creationix: cpojer: what's your use case [19:01] cpojer: just simple for (var i in source) target[key] = source[key]; [19:01] cpojer: eh [19:01] cpojer: var key [19:01] cpojer: like options = extend({defaults}, options) [19:01] cpojer: or extend(MyObject.prototype, { }) [19:02] creationix: well, for the second one, Object.create works great [19:02] creationix: and I think we have __proto__ as well for the first case [19:02] creationix: options.__proto__ = defaults [19:03] creationix: or something like that [19:03] cpojer: those were examples :) [19:03] QuietKnight: I just wrote/stole my own [19:04] QuietKnight: made a simple 15 line "oop" module that includes extend and mixin [19:04] cpojer: you are the man! [19:04] QuietKnight: I didn't mean it like that. I just meant its easy enough to do on your won without specific support from Node [19:05] cpojer: I am asking because I am about to replace process.mixin in two libraries and wanted to know if there is going to be one native method [19:05] _ry: cpojer: no, just use your own [19:05] okito has joined the channel [19:05] _ry: cpojer: copy jquery's into your project [19:05] cpojer: _ry: thank you [19:05] cpojer: _ry: I refuse to ever use jquery code [19:06] creationix: I think mixin is a high-level utility that doesn't belong in node's core [19:06] creationix: though I'll miss being able to mixin the sys module as a one-liner [19:06] _ry: creationix: it's being removed [19:06] creationix: _ry: I know, thanks [19:06] charles_ has joined the channel [19:07] ashb: creationix: get on v8's case to implemnt some of the harmony proposals [19:07] ashb: var {export1, export2} = require('module') [19:07] ashb: :) [19:07] cpojer: I'm using mootools 1.3 in my apps, but the modules in question are standalone [19:07] charles_: hi - I'm trying to implement loop()/unloop() as an addon [19:08] cpojer: _ry: is there any specific reason why "inherits" is now in sys? [19:08] cpojer: in my opinion it belongs in neither sys or process but maybe a separate module [19:08] okito: anyone know if there is a way I can access/modify the eio_poller static in node.js from an addon (defined in node.cc) [19:08] okito: ? [19:09] _ry: cpojer: if you mentally rename 'sys' to 'utils' is that okay? [19:09] creationix: charles_: why? that seems like a crazy thing to do [19:09] cpojer: _ry: haha, I will mentally do that [19:09] _ry: cpojer: okay - that's what i do [19:10] _ry: :) [19:10] cpojer: _ry: are you virtually going to rename sys to utils? [19:10] _ry: i'll be renaming sys to utils [19:10] _ry: in fact [19:10] _ry: it's already done [19:10] cpojer: I am very happy about that [19:10] _ry: just no one knows about it [19:10] _ry: require('utils') [19:10] cpojer: I appreciate the work being done on the core API [19:11] creationix: _ry: so is avro a light-weight c library, it looks really promising [19:11] isaacs has joined the channel [19:11] _ry: cpojer: it's slow and painful to fix those warts. [19:11] ashb: avro? [19:11] creationix: I'm used to every apache project requiring the jvm or some other massive runtime to use [19:12] _ry: cpojer: they were spur of the moment decisions at one point, but then never got changed, and now lots of code depends on it [19:12] cpojer: _ry: yeah, that is how it is always [19:12] _ry: i'm really trying to have 0.2 be a stable release [19:12] _ry: we'll see how that goes [19:12] cpojer: sorry, I'm very tired so my english gets even worse :D [19:13] cpojer: _ry: please break the API as long as it is necessary before 1.x [19:13] ashb: _ry: you have funny ideas about version numbers [19:13] creationix: _ry: and we can write up a migration article to help everyone to the new stable, but different api [19:13] creationix: ashb: should we call it 1.0.0? [19:13] ashb: s'what i'd do. but if i was on versions node would be about 0.8 or so by now [19:14] _ry: ashb: well i said at one point very publically that i'd freeze up APIs in 0.2 [19:14] _ry: so i'm trying to stick to that - even though it's months later [19:14] okito: creatonix: I am implementing an overlay on require() and I need to be able to make async calls look like sync calls [19:14] cpojer: well, if you rename a module or function you can always provide compatibility if necessary [19:14] okito: and _ry is removing loop()/unloop() from node so I need to put it into an addon [19:15] creationix: okito: if it's for stuff that only happens at server startup I think it's fine to just use real blocking apis. The reason ryan removed wait was because of the complexity it added to the programming model [19:16] ollie has left the channel [19:16] ashb: okito: you don't need loop()/unloop() for that do you [19:16] ashb: isn't just run_one()/poll() enough? [19:16] ashb: (or are those going to?) [19:16] _ry: ashb: we dont have that [19:16] ashb: ah [19:16] ashb: thought you did for some reason [19:16] okito: (okito was charles_) :) [19:17] ashb: _ry: must be just thinking of hte base libev [19:17] cpleppert has joined the channel [19:17] ashb: and now time for noew starcraft2 [19:19] okito has joined the channel [19:19] felixge: Unit testing in JS is pure JOY [19:19] felixge: especially with node [19:20] okito: creationix sorry i had to reboot [19:20] okito: so first of all - I'm using node for a set of command line tools - not just a server. [19:20] creationix: okito: would Tim_Smart's recent patch creating a require hook be enough for your needs? [19:20] okito: no. I want to maintain CommonJS compatibility [19:21] okito: actually can you send me the link? [19:21] okito: make sure I've seen it [19:21] okito: the issue is that I want to be able to build both sync and async code on top of node [19:21] okito: which works great with loop/unloop [19:21] okito: because I can make the foundational code async [19:21] okito: and then build sync on top as needed [19:21] creationix: I think it's this one http://github.com/ry/node/commit/0c17067d873f807b1280d5e922f44da3abc4c328 [19:22] okito: right [19:22] okito: yeah that's not what I'm wanting [19:22] ashb: okito: i've thought about that sort of thing too [19:22] creationix: so basically you want to bring back wait as an external module? [19:22] ashb: never heard a good reason against it [19:22] brainss has joined the channel [19:22] creationix: except without promises [19:22] okito: basically yes [19:22] okito: you could build promises on top of it then too [19:23] okito: (with promise.wait()) [19:23] r11t has joined the channel [19:23] okito: but anyway - if _ry doesn't want it in node.js code that's OK with me. I don't mind creating an external module for it [19:23] okito: I have it working actually except for this one line: [19:24] okito: http://gist.github.com/330664 [19:24] okito: I need the eio_poller static defined in node.cc to do this [19:24] okito: but based on the comment maybe I can just nix this bit. I'm not sure --- so I ask. :) [19:25] creationix: heh, good luck with that one, I've only spent a couple of days with libev myself [19:25] okito: eh thanks. [19:25] creationix: also I'm biased, I don't think we need such a library, but I could see how others would want it [19:26] okito: ashb and yeah I agree - I haven't heard a good reason against it either. One of the things I like node is that it is simple and focused. I think building a bunch of different simple packages on top would make for a great environment. you could mix and match styles. async, sync, etc. [19:26] okito: I'd only do async for server-based stuff but a lot of command line tools don't need async to work [19:26] cpojer: creationix: whats your name on github? [19:26] ashb: yeah. [19:26] creationix: cpojer: creationix [19:26] okito: and it would be nice to share code... [19:26] ashb: okito: async for cli is harder than it needs to be. [19:26] cpojer: ah [19:26] cpojer: I mistyped [19:27] cpojer: I should really get some sleep [19:27] ashb: right SC2 time [19:27] okito: yeah I agree. though I just wrote a cli client for an HTTP server with node.js. The async part was nice because I could do a lot of stuff in parallel pretty easily [19:27] okito: actually made my tool faster [19:27] okito: but it still used loop() in some places so here i am. :) [19:28] tilgovi has joined the channel [19:28] brainss has joined the channel [19:28] creationix: okite: the whole reason I chose node over the other SSJS projects was because it was 100% non-blocking and had a simple event loop based model. Yes it does make tasks that bash is good at very hard, but that's the tradeoff you make [19:28] kriszyp: btw, is Tim_Smart's registerExtension extension in node yet, or going to make it into node? [19:28] kjeldahl has joined the channel [19:28] okito: yeah I'm in the same boat for server stuff [19:29] JAAulde: PHEW...got my build slave starting at boot! [19:29] cpojer: btw. I saw some guys tweeting about the wtfjs stuff, maybe someone is interested in taking this fun quiz: http://gist.github.com/18744 [19:29] cpojer: ;) [19:29] okito: but there is really no reason why you can't have the best of both worlds [19:29] JAAulde: if anyone ever runs one on FreeBSD and needs to knwo how, just ask ;) [19:29] cpojer: it is nice and covers some hoops in the language [19:29] creationix: also that's why I've spend so much time trying to make the whole async model easier [19:29] gwoo: JAAulde: nice [19:29] okito: you can easily make sync code run on top of an async foundation [19:29] okito: but you can't go the other way [19:29] okito: that is why for example Ruby code is hard to convert over [19:29] creationix: okito: my only worry is that if you allow node to work both ways, all new people will use the easier sync version and never learn the harder, but better way [19:30] okito: yes - instead if they decide async isn't the best solution for their problem they just won't use node.js at all [19:30] creationix: agreed, it's a problem, that's why I think an external module may be a good place for it [19:30] charlenopires has joined the channel [19:30] okito: yeah me too [19:31] okito: if only I could make it work... :/ [19:31] okito: I guess I could fork node to expose the property I need. that would suck [19:31] aguynamedben1 has joined the channel [19:31] JoePeck has joined the channel [19:32] brainss has left the channel [19:32] okito: can anyone point me to evlib docs [19:32] okito: for some reason googling it turns up nothing for me [19:32] creationix: of course, what's wrong with only using node for async stuff, it was never meant to do everything, just be really good at event based servers [19:32] okito: because then I can't share my same JS everywhere [19:33] okito: since it doesn't run in the same environment [19:33] okito: I want to be able to write a library and use it in a command line tool, in the server, and in the web browser [19:33] creationix: hmm, that's a tough one [19:34] creationix: well, the browser has to be async unless it's a pure cpu bound operation [19:34] creationix: and node is async except for require [19:34] cpojer: okito: write the base code to work on both client and server and make one clientside and one serverside extension of that [19:34] creationix: and the sync fs calls [19:34] okito: well that's my problem [19:35] okito: I want to wrap require() to have the same semantics as my browser-based CommonJS loader [19:35] okito: so I need to make it sync. :) [19:35] creationix: that's the sync loader for the browser? does it add a script tag to the head or something like that? [19:35] creationix: s/that's/what's/ [19:35] okito: no [19:36] okito: it pairs with build tools that preload all the required modules [19:36] RayMorgan_ has joined the channel [19:36] okito: the browser loader has a sync + async version [19:36] okito: this way most code can be ported in directly and you can lazy load modules (Async) when you want to go the extra mile [19:36] okito: also - btw - you can solve the async problem in very different ways in the browser than in the server [19:37] okito: using property observing and bindings [19:37] okito: you rarely need to use callbacks [19:37] creationix: how's that different from callbacks and event emitters? [19:37] okito: but that doesn't work in a good server design where each incoming request needs to be a share-nothing design [19:37] okito: so my background is in the SproutCore framework [19:37] okito: it's rare to write nested callbacks like I do when writing node code [19:38] okito: I'm not saying one is better than the other [19:38] okito: just that different techniques work [19:38] creationix: I think it's the nature of the work, you're doing less IO in the browser, if changing the innerHTML was async for example, you'd have a lot more nesting [19:39] creationix: My answer for now is to just use stuff like promises/Do/flow-js to reduce the nesting and go all async [19:40] creationix: I'll get back after I finish the new code for node_blog and node_docs. Then I'll have more experience writing real apps [19:40] okito: well I can't go all async. I'm working on framework code so I can't just rewrite all the code that runs on it [19:40] cpojer: okito: what kind of framework? [19:40] okito: http://www.sproutcore.com [19:40] cpojer: ah [19:40] creationix: btw, sproutcore is very nice [19:40] okito: thx [19:41] okito: I really want to rewrite our build tools on top of node [19:42] creationix: what about the sync fs functions + eval [19:42] creationix: you could implement your own require with that pretty easily right? [19:42] jpoz has joined the channel [19:43] okito: ok so the high level is that I'm trying to implement a kind of package manager on top of node that is very flexible [19:43] okito: so you can write plugins for each aspect of it [19:43] okito: for example - you might write a plugin that loads a package/module from a server on request [19:43] okito: so I am defining a plugin API [19:43] okito: my ideal design defined a simple async plugin API [19:44] okito: which both require() and require.async() could invoke [19:44] okito: require() just used loop/unloop [19:44] tmpvar: okito, are you familiar with CommonJS and the module spec? [19:44] okito: yes [19:44] okito: this is all built on that [19:44] tmpvar: oh, a plugin for sc [19:45] cpojer: are you sure loading a module remotely is a good idea? [19:46] okito: sure. here's a good example -- [19:47] okito: let's say I want to deploy onto a cluster of 100 machines [19:47] okito: it would be really nice if I could just deploy new code [19:47] okito: and when it references some package not yet installed it can go fetch it [19:47] okito: the first time [19:47] okito: in some ways this would be a much simpler method of deployment [19:47] cpojer: git [19:47] cpojer has left the channel [19:48] okito: ? [19:48] tmpvar: okito, npm might be something to look at [19:48] cpojer has joined the channel [19:48] okito: yeah I did. I've also been following creationix kiwi [19:48] okito: oops i meant visionmedia [19:49] creationix: yeah, it's not mine :) [19:49] okito: you did node-router though right? [19:49] okito: I'm using it right now actually for my package server [19:49] creationix: yep, that was my first one I think [19:49] okito: not bad for some fast code. [19:49] creationix: well, it's based heavily on ryan's code from node_chat [19:51] gf3 has joined the channel [19:51] kriskowal has joined the channel [19:51] creationix: okito: what about an async bootstrap file that did all the nasty requirement's loading and then called your main app when everything was ready to roll [19:52] okito: well I really want to be able to mix and match sync/async code [19:52] okito: otherwise I think node's utility is greatly reduced [19:52] creationix: at startup time, or while running? [19:52] okito: while running. [19:52] okito: I'll have to think about this a bit...maybe I can live with no async [19:52] okito: er no sync functions [19:52] creationix: now that's where it's dangerous [19:52] creationix: since node is single threaded [19:53] okito: think of node in cases other than in a server [19:53] okito: that's where I'm thinking about using sync code [19:53] creationix: ok, so back to utility scripts... [19:53] okito: totally agree server === async all the way [19:53] okito: only way to go [19:54] creationix: the biggest problem I see with an async require, for example, is that you're whole program is now indented at least one level [19:54] kriskowal_ has joined the channel [19:54] creationix: one level isn't that bad, and I do that in the browser already so as not to pollute the global namespace, but it's still a pain [19:55] javajunky: okito: I'm working with tj on kiwi right at this moment, its in good shape and probably worth looking at :) [19:58] cpojer: that guy does amazing work but his coding style scares me off [20:00] javajunky: yeah the lack of braces is interesting, but I'm usually happy to go with other people's flow ;) [20:01] cpojer: I admire that [20:01] cpojer: but I believe that most jslint settings actually do make sense [20:01] okito: javajunky why is kiwi written in ruby + sh instead of JS? [20:01] cpojer: and that javascript is not meant to be written without semicolons and similar [20:03] javajunky: okito: pragmatic reasons I think, however my fork of kiwi has a js client :) … the difference in numbers of lines between mine and the bash version is amusing… my recursive mkdir is tens of lines :( [20:03] okito: yes [20:03] okito: I can imagine [20:03] creationix: okito: isn't this the whole reason you're having trouble using node? [20:07] pmuellr has left the channel [20:08] bronson has joined the channel [20:10] RayMorgan has joined the channel [20:11] okito: well core code can be wordy if its fast [20:11] okito: :) [20:14] okito: javajunky so one other issue with kiwi [20:14] okito: it looks like it just adds a package to the require paths [20:14] okito: right? [20:16] morgan has joined the channel [20:17] Aduros has joined the channel [20:20] bpot has joined the channel [20:20] bpot has joined the channel [20:25] javajunky: not entirely [20:27] pedrobelo has joined the channel [20:28] javajunky: in fact not really at all, it rather requires you use something like kiwi.require('haml', '= 0.1.2') [20:28] javajunky: instead of require('haml') [which does look at the require paths] [20:29] jspiros has joined the channel [20:33] binary42 has joined the channel [20:38] bpot_ has joined the channel [20:38] bpot_ has left the channel [20:41] inimino: okito: "instead if they decide async isn't the best solution for their problem they just won't use node.js" I'm not sure that's a problem [20:41] inimino: I think it's good for platforms to be opinionated and not try to be all things to all people [20:43] n8o_ has joined the channel [20:44] derferman has joined the channel [20:45] inimino: creationix: why not use "(function(){" and then just not indent? [20:45] creationix: cause it's "wrong" ;) [20:46] creationix: with two space indenting it's not that bad anyway [20:46] creationix: but indented or not, you do need to remember to wrap it [20:47] inimino: yes [20:47] inimino: I have a rule about indentation though [20:48] lifo_ has joined the channel [20:48] inimino: which is that what's "wrong" is to have any indent, dedent pair that you can't see both ends of on one screenful of code [20:49] inimino: so if you wrap something around your entire program as an idiomatic kludge around JavaScript's lack of file-level scope, don't feel you need to indent everything too [20:52] creationix: inimino: I like your rule [20:54] JimBastard_ has joined the channel [20:54] rictic has joined the channel [21:03] dnolen has joined the channel [21:04] inarru has joined the channel [21:14] javajunky has joined the channel [21:14] isaacs has joined the channel [21:15] okito has joined the channel [21:17] stepheneb has joined the channel [21:17] binary42 has joined the channel [21:18] javajunky has joined the channel [21:18] okito: sorry - left for lunch [21:30] confounds has joined the channel [21:31] paul_ has joined the channel [21:34] okito: yay - my loop extension seems to work [21:34] stepheneb has joined the channel [21:43] creationix: okito: awesome [21:44] creationix: okito: I don't know anything about the sproutcore team, are you a one-man-shop or a larger team [21:44] joshthecoder has left the channel [21:45] okito: I'm the lead dev but it's a pretty big team [21:45] okito: we have 8 core contributors [21:45] okito: and a few dozen other contributors sprinkled around [21:45] okito: a few hundred engineers building apps on it [21:45] okito: at my company [21:45] creationix: few hundred, wow [21:46] sveimac has joined the channel [21:46] sveimac has joined the channel [21:46] okito: yep [21:46] okito: so there is a lot of code I can't break. :) [21:46] creationix: for sure [21:47] creationix: so I had a suggestion for you guys about a year ago, but I never proposed it [21:47] okito: what's that? [21:47] okito: always interested [21:47] creationix: have you looked at my topcloud framework [21:47] creationix: originally it was my clone of sproutcore [21:47] creationix: http://github.com/creationix/topcloud [21:48] mikeal: so [21:48] mikeal: is everyone aware of this [21:48] mikeal: http://xmljs.sourceforge.net/ [21:48] okito: interesting creationix [21:48] okito: are you still working on this? [21:48] creationix: okito: In particular I had made a view language instead of js files [21:48] creationix: http://github.com/creationix/topcloud/blob/master/examples/Dialogs/BindSample.tci [21:49] okito: interesting. why did you go that direction? [21:49] creationix: I made it for a PHP shop where I worked, the people there weren't very good at JS (and we had to support IE6) [21:49] okito: I see [21:50] creationix: after I made it I thought it would be neat to have plain text views in sproutcore too [21:51] maushu has joined the channel [21:53] okito: yeah I wouldn't mind having a DSL for this [21:53] creationix: mikael: looks neat, does it run in node too or just browsers? [21:53] okito: I definitely think it should be converted by the build tools [21:53] mikeal: it would take some small modifications [21:53] okito: just like building haml etc [21:53] okito: in-browser compiling hurts performance [21:53] creationix: okito: yeah, that's what I was thinking. node is pretty good at this kind of compiling [21:53] okito: its ok in small doses but at scale you end up having to throw up a lot of spinners [21:54] okito: right [21:54] okito: agreed [21:54] okito: hence why I am here. ;-) [21:54] creationix: well, that was my idea, a year later I told you about it :) [21:54] okito: cool idea [21:54] creationix: of course there wasn't much node back tne [21:54] mikeal: when someone needs to parse XML i just assume it's for some legacy system that doesn't need to be performant [21:54] mikeal: something that hasn't been moved to JSON yet :P [21:54] okito: We should look at merging in your text-file format once the buildtools are far enough along to take compilers [21:55] okito: btw - have you seen Greenhouse? [21:55] okito: http://github.com/sproutit/greenhouse [21:55] okito: interface builder for SproutCore [21:55] creationix: no, I like it though [21:56] okito: hopefully we'll be showing it at jsconf [21:56] mikeal: someone needs to write a script to convert javascript libraries for the browser to node :) [21:56] jherdman: mikeal: you probably don't need that unless you're touching the DOM [21:57] mikeal: you still need to add exports stuff [21:57] tmpvar: i thought someone did this [21:59] mikeal: someone wrote a require() like statement that works with code intended for the browser [21:59] tmpvar: that seems good.. that way you don't mess up your upgrade path [22:00] gwoo has joined the channel [22:01] JimBastard_: hey tmpvar JS party next thursday at my spot [22:01] JimBastard_: just posted to nyc.js [22:02] tmpvar: just read that [22:02] JimBastard_: ^_^ [22:02] tmpvar: sounds fun :) [22:03] tmpvar: blarg, waf is annoying me so [22:03] JimBastard_: yeah there are soo many loose ends on hook.io that revolve around releasing new versions of node modules [22:03] JimBastard_: so hopefully it will be a win win [22:04] tmpvar: sounds good man, count me in [22:04] tmpvar: although, thursday isnt much of a party night hah [22:04] JimBastard_: well its gonna be thursday night and friday night [22:04] JimBastard_: possibly [22:04] tmpvar: ah [22:04] JimBastard_: i'll see how it works out on thursday [22:04] tmpvar: sounds decent [22:05] JimBastard_: do me a favor and respond to the thread saying you are in? [22:05] tmpvar: sure [22:05] JimBastard_: awesome thanks [22:05] teemow has joined the channel [22:05] steadicat has joined the channel [22:11] micheil_mbp has joined the channel [22:17] micheil_mbp has joined the channel [22:19] aryounce has joined the channel [22:22] kriskowal has joined the channel [22:23] maritz has joined the channel [22:26] stepheneb_ has joined the channel [22:29] joshbuddy has joined the channel [22:39] CIA-77: node: 03Ryan Dahl 07master * r2c7cbbc 10/ (src/node.js src/node_events.cc): Optimize event emitter for single listener - http://bit.ly/9CkZ49 [22:39] CIA-77: node: 03Ryan Dahl 07master * rd7efb0f 10/ src/node_events.cc : Factor out TryCatch in ReallyEmit - http://bit.ly/8YkN0j [22:41] isaacs has joined the channel [22:45] kenneth_reitz has joined the channel [22:45] tmpvar: wow, well.. i'd love to write some code but waf stands in the way [22:46] tmpvar: ACTION breaks face on desk [22:47] JimBastard_: i just pretended you said waffles instead of waf, lulz [22:48] pdelgallego has joined the channel [22:49] MattJ: Mmm, waffles [22:56] _ry: tmpvar: ? [22:57] maushu: Compiling node on my ubuntu in my vm that is in my netbook. [22:58] michaelk^ has joined the channel [22:58] maushu: be back in 2014, bai [22:58] tmpvar: oh hey _ry, im trying to build avro via node-waf. apparently a dependency, jansson, does a #include [22:58] _ry: :/ [22:58] _ry: what's jannson? [22:58] tmpvar: jansson, sorry.. I believe its a json parser? not completely sure [22:59] _ry: god [22:59] _ry: these people are such pussys [22:59] tmpvar: lol [22:59] maushu: Cats? Where?! [23:00] JimBastard_: engrish revenge [23:00] tmpvar: well, i've never used waf as a build tool before so.. ill be the first to admit that its my fault ^_^ [23:00] _ry: well it doesn't look that bad: http://www.digip.org/jansson/ [23:01] tmpvar: nah, it doesnt.. its actually included in the avro dist [23:01] schell has joined the channel [23:01] schell: hello room [23:01] tmpvar: do you know how to modify the include path in such a way that #include will resolve to an arbitrary dir using waf? [23:02] schell: no, i don't [23:02] schell: don't know much about waf [23:02] tmpvar: sorry, that was directed at _ry :) [23:02] _ry: tmpvar: http://github.com/ry/node/blob/master/wscript#L332 [23:02] schell: ah, just the first thing i saw [23:02] _ry: schell: hi [23:02] schell: hiya [23:03] schell: i've got a q about sys.exec [23:03] schell: if anyone is up for it [23:04] okito has joined the channel [23:04] tmpvar: _ry, ill give this another go and push it up to github [23:06] tmpvar: _ry, oh, you are using #include "coupling.h" in coupling.c [23:06] rauchg has joined the channel [23:06] derferman has joined the channel [23:06] _ry: tmpvar: but in src/node_stdio.c i do #include [23:06] _ry: .h [23:07] schell: i'm trying to start couchdb from sys.exec, sys.exec('couchdb -b', callback), and even though from the cli that command starts couchdb in the background and exits, it seems to hang in node and never call back - is what i want to do possible? [23:07] tmpvar: _ry, i see.. i have an idea [23:07] _ry: schell: hmm - i guess the couchdb process daemonizes? [23:08] schell: yeah, it does [23:09] _ry: schell: hmm [23:09] _ry: i think that should emit a chld signal.. (which is when the callback is called...) [23:11] schell: if i sys.exec('couchdb -d', anothercallback), it kills the first process and both call back - don't know if that helps [23:12] _ry: schell: try using the createChildProcess [23:12] schell: mmmmm [23:13] schell: sweet [23:13] _ry: schell: http://nodejs.org/api.html#_child_processes [23:13] schell: haha, on it, thanks! [23:15] Tim_Smart has joined the channel [23:23] gf3 has joined the channel [23:24] pdelgallego has joined the channel [23:25] Tim_Smart: Is mixin moving from core to the sys module, or vanshing altogether? [23:28] gwoo: Tim_Smart: i think it's gone altogether [23:28] Tim_Smart: OK cool. [23:28] Tim_Smart: Seemed a little weird to start with [23:29] gwoo: yeah [23:29] gwoo: it was a temporary solution [23:33] maushu: *sigh* I still haven't found a stable data system. [23:35] schell: createChildProcess works great _ry [23:35] schell: thanks again [23:41] pdelgallego has joined the channel [23:42] Tim_Smart: maushu: Did couchdb fail? [23:47] derferman has joined the channel [23:48] javajunky has joined the channel [23:49] felixge has joined the channel [23:49] felixge has joined the channel [23:51] inarru has left the channel