[16:33] nodelog has joined the channel [16:33] the_undefined: !log [16:34] the_undefined: !src [16:34] nodelog has joined the channel [16:34] ashb: the_undefined [16:35] the_undefined: !src [16:35] the_undefined: hm weird, source should work [16:35] nodelog has joined the channel [16:35] the_undefined: ah ok [16:35] the_undefined: ashb [16:35] the_undefined: !src [16:35] ashb: the_undefined [16:37] the_undefined: damn, your last message broke the parser [16:37] the_undefined: probably handling prefix wrong [16:37] the_undefined: * suffix [16:37] the_undefined: yeah, I can prepend that data [16:37] the_undefined: give me a bit [16:40] ashb: not the same format, but still might be usful [16:41] freenode-connect: VERSION [16:42] freenode-connect: VERSION [16:42] freenode-connect: VERSION [16:50] JimBastard has joined the channel [16:50] JimBastard: any options / suggestions for building node on windows [16:57] ashb: wait till the full moon and sacrifice 3 virgins? [16:58] ashb: more seriously [16:59] frodenius: oh, no virgins [16:59] JimBastard: do you think that would work? i wouldnt mind taking the time to make a windows binary to share, but ive never done that before [16:59] frodenius: hi ashb, the_undefined [16:59] ashb: JimBastard [17:00] JimBastard: i have literally no clue what steps would need to be taken to port to windows [17:00] ashb: JimBastard [17:00] the_undefined: JimBastard [17:00] JimBastard: would you know where to begin? [17:00] JimBastard: ive got some time to work on this [17:00] sztanpet: at a minimum [17:00] JimBastard: and i <3 JS [17:00] the_undefined: JimBastard [17:00] the_undefined: * ./configure [17:01] ashb: oh yeah waf. a bout 6 months ago waf flat out didn't work on windows and the author insulted us when we asked (us being hippo js guys) [17:01] ashb: hopefully its better now [17:01] JimBastard: waf? [17:01] ashb: a buildsystem [17:01] JimBastard: http [17:01] ashb: yeah [17:02] JimBastard: seems daunting [17:02] JimBastard: perhaps i should just use minigw [17:02] JimBastard: [17:03] ra88it has joined the channel [17:03] bentomas: ashb [17:03] ashb: bentomas [17:24] nodelog has joined the channel [17:26] nodelog has joined the channel [17:26] the_undefined: ok [17:26] the_undefined: you should be fixed now little nodelog [17:26] the_undefined: !log [17:26] the_undefined: !src [17:26] the_undefined: good boy [17:27] the_undefined: frodenius: yes, I did [17:27] the_undefined: frodenius: I just think porting deferred and DeferredList will do the same thing [17:28] frodenius: the_undefined: yep i know [17:29] the_undefined: so I'd rather not add stuff to Promise just to break it again in a bit [17:29] the_undefined: I just need the time to port Deferred, probably next weekend [17:31] frodenius: well i don't like the forced chain of deferred [17:31] the_undefined: frodenius: forced? [17:32] frodenius: of the callbacks [17:34] freenode-connect: VERSION [17:34] the_undefined: what is forced about it? [17:34] the_undefined: right now the promise callbacks ignore return values [17:34] the_undefined: which isn't all that helpful either [17:35] frodenius: yeah i know, there is currently know nice way to chain promises [17:35] frodenius: that is awesome about deferred [17:35] freenode-connect: VERSION [17:35] frodenius: s/know/no [17:36] gwoo: the_undefined: nice [17:36] gwoo: the_undefined: seems like a big day for nodejs [17:38] frodenius: the_undefined: maybe i just misunderstood that deferred should replace promise [17:39] the_undefined: gwoo: yeah [17:40] the_undefined: frodenius: I think they should [17:40] gwoo: the_undefined: cause simon posted something? [17:40] the_undefined: gwoo: among other things [17:40] frodenius: ^^ ok then i did understand right [17:40] the_undefined: janl (from couchdb) implemented redis in node [17:40] gwoo: like what, tell me, tell me [17:40] gwoo: oh yeah [17:40] gwoo: i wanted to check that out [17:40] gwoo: is it fast? [17:41] the_undefined: gwoo: probably reasonably so [17:42] the_undefined: gwoo: redis is pure C, it might be faster ;) [17:42] gwoo: hehe [17:42] gwoo: just a little ;) [17:42] the_undefined: yes [17:42] the_undefined: not orders of magnitude [17:42] the_undefined: the main thing slowing node down right now is that we can't copy data from sockets into v8 easily [17:42] ashb: oh? [17:43] ra88it has joined the channel [17:43] sztanpet: theres no O(1) way to be precise [17:43] the_undefined: sztanpet: yes [17:44] the_undefined: ryah is going up to denmark to straighten that out with the v8 guys so :D [17:44] gwoo: nice [17:53] ra88it has joined the channel [17:57] bentomas: This is probably a silly question but does anyone know the units of the memory that process.memoryUsage() returns? I am assuming bytes but might it be bits? [18:01] inimino: bentomas: I can't imagine such an API using bits [18:01] jed has joined the channel [18:02] inimino: bentomas: but you should be able to check with your OS's native memory reporting tools [18:02] ashb: inimino: where's that parser? ;) [18:03] bentomas: inimino: thanks, that's where I've been looking. I'll find it soon! [18:03] isaacs has joined the channel [18:03] ashb: bentomas: compare the output ro the RSS column in top/ps [18:03] ashb: (top/ps output is in KB) [18:04] inimino: ashb: I'm getting to that this week :-) [18:04] inimino: ACTION gets back to work [18:24] jan____: gwoo: it's about 10% done now, no way to benchmark yet [18:24] jan____: gwoo: and I call it a success if it is 1/10th of redis' speed [18:24] gwoo: jan____: ah nice [18:24] sztanpet: http://twitter.com/big_ben_clock [18:25] sztanpet: wtf [18:25] gwoo: ha [18:25] malkomalko has joined the channel [18:26] JimBastard: hey ashb you still around? i got minwin installed and configured, what exactly is the procedure for running configure now? [18:26] saikko has joined the channel [18:27] ashb: JimBastard: no clue for node. sorry [18:28] JimBastard: hrmm [18:28] JimBastard: its cool [18:28] JimBastard: just trying to figure this out, im sure its one command line [18:28] JimBastard: when i get it ill be sure to blog about it [18:29] ashb: ah - get a win32 version of python [18:29] ashb: the configure script is just a thin wrapper around waf [18:29] ashb: ryah_away: why dont you ship a waf precompile/compressed version? [18:30] JimBastard: i think i need MSYS [18:32] bradeeoh has joined the channel [18:39] aguynamedben has joined the channel [18:39] JimBastard: zomg its a terrorist [18:39] JimBastard: aguyn amedben [18:40] aguynamedben: hells yeah hit the deck! [18:42] yml has joined the channel [18:42] yml: hello good afternoon [18:43] yml: I am discovering node.js and I am coming from a django password [18:43] voodootikigod_: umm which password? [18:43] JimBastard: .... [18:44] JimBastard: babelfish [18:44] yml: I would like to create a page which display the result of "ls" in a web page [18:45] bh: runaway! runaway! [18:45] jan____: yml: you don't :) [18:45] JimBastard: please insert happy screwing driver into web applications remote protocol port [18:45] JimBastard: you should be good [18:46] yml: jan____: http://dpaste.com/124159/ [18:47] yml: so far here it is where I stand [18:47] jan____: :) [18:47] voodootikigod_: http://gist.github.com/241269 [18:48] yml: I am missing the part where you actually push the result to the page. Does anyone could point me what I am missing [18:48] JimBastard: nice voodoo [18:48] JimBastard: ugh i want to get node.js running [18:48] voodootikigod_: yml [18:48] voodootikigod_: see my post [18:48] JimBastard: im about to restart in mac os [18:48] JimBastard: at this rate [18:48] voodootikigod_: yml: http://gist.github.com/241269 [18:48] voodootikigod_: JimBastard: whats not working? [18:49] voodootikigod_: yml: does make that sense? [18:49] yml: voodootikigod_ thanks I am reading [18:50] JimBastard: voodootikigod, im pretty much just a retard when it comes to doing anything that isnt GUI based [18:50] JimBastard: i probaly shouldnt be bictching for basic advice on IRC for this [18:50] voodootikigod_: hahaha [18:50] JimBastard: im trying to get node.js to compile on windows [18:50] voodootikigod_: oh [18:50] voodootikigod_: umm [18:50] voodootikigod_: ssh into a good os :) [18:51] mediacoder: hehe [18:51] JimBastard: thats actually not a bad idea [18:51] JimBastard: i do have some rackspace instances [18:51] JimBastard: yeah i think that might be the best choice, i dont feel like rebuilding my dev enviroment in macos atm [18:51] voodootikigod_: those or EC2 are excellent for playing around [18:51] JimBastard: ACTION is running windows 7 on a macbook pro [18:52] voodootikigod_: JimBastard: FAILS [18:52] mediacoder: shame on you [18:52] JimBastard: yep [18:52] JimBastard: its work computer [18:52] aguynamedben has joined the channel [18:52] voodootikigod_: hey, hows your usb slot [18:52] voodootikigod_: cause its gotta hurt from fucking your computer like that [18:52] voodootikigod_: :) [18:52] JimBastard: :-D [18:52] JimBastard: ACTION has a new best friend [18:52] voodootikigod_: yml: you it get working? [18:52] yml: voodootikigod_ : your solution doesn't work [18:53] voodootikigod_: ??? [18:53] yml: as far as I can tell [18:53] voodootikigod_: yes it does [18:53] voodootikigod_: let me guess [18:53] yml: I copy past it in a file [18:53] voodootikigod_: ok [18:53] voodootikigod_: and [18:53] inimino: yml: it should certainly give you the idea... [18:53] voodootikigod_: .. [18:53] voodootikigod_: it works [18:53] yml: restart the server [18:53] voodootikigod_: you are point the server to the new file right? [18:53] yml: and refresh my browser and [18:53] voodootikigod_: not your file [18:54] yml: http://127.0.0.1:8080/ [18:54] voodootikigod_: hahaha [18:54] mediacoder: :-d [18:54] voodootikigod_: can not help [18:54] voodootikigod_: cannot see loopback addr [18:55] voodootikigod_: do me a favor [18:55] yml: yes [18:55] voodootikigod_: re-pastie what you think you are using [18:55] voodootikigod_: and an ls on teh directory [18:55] voodootikigod_: and the command you are using [18:55] voodootikigod_: (you can filter out any other files) [18:55] JimBastard: awesome, git already on my web server [18:55] JimBastard: why didnt i think of this before [18:55] voodootikigod_: JimBastard: see how fast you can move iwth a good os [18:55] voodootikigod_: :) [18:55] JimBastard: i always forget i have root on like 15 servers [18:55] mediacoder: i can confirm voodootikigod_ code working [18:56] yml: voodootikigod_ http://dpaste.com/124164/ [18:56] JimBastard: ohhh SHIT [18:56] yml: oups sorry [18:56] JimBastard: python was installed too [18:56] yml: I see my error [18:57] voodootikigod_: wrong file name [18:57] voodootikigod_: :) [18:57] voodootikigod_: come on [18:57] yml: didn't notice that voodootikigod_ used different port than I did [18:57] voodootikigod_: come on [18:57] voodootikigod_: FTW [18:57] yml: thank you [18:57] voodootikigod_: np [18:57] voodootikigod_: also [18:57] voodootikigod_: on yours [18:57] voodootikigod_: you were doing odd scoping of your directory [18:57] yml: yes [18:58] voodootikigod_: give me a second to help you on that [18:58] JimBastard: today looks like it might be partially cloudly with an 80% chance of WIN [18:59] JimBastard: ACTION crosses fingers that make and make install don't bomb [18:59] yml: voodootikigod_ how can i make the stdout escape the context of sys.exec callback ? [19:00] jan____: w00t! [19:00] jan____: awesome is 1/2 of redis speed [19:01] jan____: with 10% of the features [19:01] JimBastard: what is this jan? [19:01] JimBastard: is it fair to say that node.js follows the http://en.wikipedia.org/wiki/Reactor_pattern ? [19:01] voodootikigod_: yml: what do you mean "escape teh context" [19:01] voodootikigod_: its a call back [19:02] voodootikigod_: that happens whenever hte ls fnishes [19:02] JimBastard: nm, its linked on that page [19:02] voodootikigod_: damnit [19:02] voodootikigod_: i couldnt get my witty comment in [19:02] JimBastard: please continue [19:02] dschn^: hmm.. this could be a good head start on mysql adapter http://github.com/tmm1/em-mysql/ [19:03] yml: voodootikigod_ : in your example you use the response directly in the callback [19:03] jan____: JimBastard: Awesome is my Redis clone in node.js: http://github.com/janl/awesome [19:03] JimBastard: doesnt node.js connec to redis? [19:04] jan____: I melieve it does. [19:04] jan____: *believe [19:04] JimBastard: got ya [19:05] yml: where i would like to understand how i could use the the callback to set a variable that I will then use to populate the body for my response [19:05] JimBastard: ill follow ya [19:05] voodootikigod_: yml: correct [19:05] voodootikigod_: yml thats not really how an event system works [19:05] jcrosby has joined the channel [19:05] JimBastard: so now that i have nodejs installed, how do i hack the gibsen? [19:05] yml: http://dpaste.com/124159/ [19:05] yml: ^^ this was my attempt to do this [19:06] voodootikigod_: if you want something like that you need to do this [19:06] voodootikigod_: but i feel like its going to blow your django password mind [19:06] yml: :-) [19:06] yml: please do this :-) [19:08] JimBastard: YES YES YES YES [19:08] JimBastard: http://maraksquires.com:8000/ [19:08] JimBastard: <3 [19:08] JimBastard: all those years of learning every fucking detail of JS and ECMA [19:08] JimBastard: about to fucking pay off [19:08] JimBastard: FUCK YOU RUBY [19:08] voodootikigod_: http://gist.github.com/241291 [19:08] JimBastard: AND JAVA [19:09] JimBastard: thanks voodoo, that was painless [19:09] voodootikigod_: ACTION loves JimBastard ... in the bromatic sort of way [19:09] voodootikigod_: argh thats supposed ot be bromantic [19:09] JimBastard: lulz [19:09] JimBastard: i really want to create some opensource shit that isnt lame hrmmm [19:10] JimBastard: i think maybe instead of trying to build something for the sake of building it ill start up a website [19:10] JimBastard: and see what happens [19:10] isaacs: Hey, Simon Willison getting excited about nodejs: http://simonwillison.net/2009/Nov/23/node/ [19:11] JimBastard: any feedback from the existing routing frameworks? [19:11] voodootikigod_: JimBastard: the world is new and fresh for you [19:11] yml: isaacs: indeed this what brought be there ... [19:11] inimino: hehe [19:11] voodootikigod_: yml: does that code make sense? [19:11] yml: voodootikigod_ let me time to digest it [19:12] voodootikigod_: i used a bit of trickery to be ... trickery [19:12] yml: JimBastard: Simon has ported django url dispatcher [19:12] yml: JimBastard: http://github.com/simonw/djangode [19:13] voodootikigod_: http://github.com/raycmorgan/vroom [19:14] JimBastard: can either of those do bind / triggers [19:14] JimBastard: or is it just one closure per route [19:15] JimBastard: vroom looks okay [19:15] inimino: I guess I should look at what other people are using for dispatching at some point [19:15] JimBastard: sup inimino [19:16] JimBastard: i had to leave #javascript for a while, i had a noob overload [19:16] JimBastard: and to think i left #jquery to #javascript for the same reason [19:16] inimino: JimBastard: understandable ;) [19:16] inimino: #jquery is a wasteland [19:16] JimBastard: soon ill be running my own unreal server and talking to myself [19:17] voodootikigod_: JimBastard: who says thats not what you are doing right now..... [19:17] inimino: haha [19:17] JimBastard: how do i access window.onload in node.js? JK!!! :p [19:17] jaredgrippe has joined the channel [19:17] inimino: heh [19:17] saikko: does V8 lib provide any way to manipulate XML/DOM on the server, or is libxml.js the only way for now? [19:18] JimBastard: was reading the mailing list today about this, seems its just libxml.js [19:18] yml: voodootikigod_ : still not sure; Imagine that I have two functions get_ls and get_du and I would like to use one or the other to populate my response [19:18] inimino: JimBastard: actually somebody was going to implement that [19:18] saikko: I'd love to see E4X implemented in V8... [19:18] JimBastard: it makes sense to clone the browsers JS implementation [19:18] yml: and in all of you cases you do everything in the callback [19:18] voodootikigod_: yml [19:18] inimino: ACTION isn't a fan of E4X [19:18] JimBastard: so you could copy / pasta code [19:18] voodootikigod_: check out fu.js in the node source tree [19:18] voodootikigod_: or use a full parser [19:18] mediacoder: yml: you have to think of the async nature of node.. your function actually doesnt return anything, since the exec hasnt finished [19:19] JimBastard: its going straight to ECMA5 to my understanding [19:19] voodootikigod_: router [19:19] jan____: inimino: but it'd be great to have for people who are stuck on Spidermonkey [19:19] mediacoder: jan____: so when is couchdb using v8 :-D [19:19] JimBastard: ohh wait e4x nm [19:19] inimino: jan____: yes, but I'd hate to see the E4X cancer spread to new implementations [19:19] jan____: when it's get e4x [19:19] jan____: inimino: oh well [19:19] mediacoder: oh, right [19:19] inimino: jan____: let's strangle e4x while we we still can [19:20] jan____: I help when you give me a good replacement [19:21] inimino: ACTION falls silent and gets back to work [19:22] yml: voodootikigod_ mediacoder : it look likes get_ls and get_du will be very similar and this is why I thought I could only return stdout and not have to do all the rest [19:23] saikko: looks like I'm going to re-write a lot of e4x-dependent code to use it with node.js :/ [19:23] voodootikigod_: you could something like this [19:26] voodootikigod_: http://gist.github.com/241308 [19:26] JimBastard: so i use to have this website, retardbox.com [19:27] JimBastard: it was a mediawiki install that had no rules and encouraged abuse [19:27] voodootikigod_: yml: refresh [19:27] voodootikigod_: i left some old code in there [19:27] JimBastard: my server crippled under the strain, on several occasions [19:27] JimBastard: im thinking i will rebuild this in node [19:27] JimBastard: for the victory [19:27] yml: voodootikigod_ this is exactly what i was looking for [19:28] yml: thank you [19:28] yml: ACTION dissecting the example to understand it [19:28] the_undefined has joined the channel [19:28] the_undefined: !log [19:28] voodootikigod_: yml: you forgot to mention the second function call [19:29] voodootikigod_: nodelog: you're a peach [19:29] JimBastard: you guys ever heard of mustache (templating engine) http://dailyjs.com/2009/11/12/mojo/ [19:29] voodootikigod_: hahahaha [19:29] isaacs: yml: at a previous team at Yahoo, I worked on a language called yml. http://developer.yahoo.com/yap/yml/ [19:30] the_undefined: wow, 47 people in here [19:30] yml: voodootikigod_ I brain is still trying to shift from the years of blocking programming :-) [19:30] the_undefined: that's a record I think [19:30] voodootikigod_: JimBastard: jan____ is the main driver of the .js variant [19:30] yml: isaacs: that sweet name :-) [19:30] voodootikigod_: JimBastard: I am the poster that sort of went crazy on the mojo "benchmarks" [19:30] rhys__ has joined the channel [19:31] JimBastard: wait, is jan http://github.com/visionmedia/mojo ? [19:31] voodootikigod_: no [19:31] jan____: no, I'm github.com/janl/mustache.js [19:31] voodootikigod_: @janl github.com/janl/mustache.js [19:31] voodootikigod_: you asked about mustache not mojo [19:32] JimBastard: sorry, need to read more [19:32] JimBastard: much new information today [19:32] jan____: :) [19:33] JimBastard: so i guess the wise choice for templating engine would be mustache.... [19:33] JimBastard: that way i can bitch at jan___ when i cant make it work? [19:33] JimBastard: :D [19:33] saikko: I've implemented TAL (originally from ZOPE) in JS, but it's e4x-based so it's probably going to get another driver for node.js + libxml.js... [19:33] JimBastard: meeeeh TAL isnt that great [19:34] saikko: I liked in when working with php [19:34] JimBastard: tag based languages dont translate well to JS [19:34] saikko: http://code.google.com/p/jstal/ [19:34] JimBastard: peepin [19:35] saikko: this one did, for me. I use it in couchdb now :) [19:35] jan____: JimBastard: totally [19:35] inimino: ah, I just wrote a language called TAL :( [19:35] inimino: Tree Attribution Language [19:35] jan____: JimBastard: but use my full nick, for highlights and stuff :) [19:36] bentomas: voodootikigod_: http://nodejs.debuggable.com/ is exactly what I was looking for! thanks! [19:36] inimino: doesn't look like it does the same thing, anyway [19:36] voodootikigod_: bentomas: ? [19:37] Connorhd: btw, I think its against freenode rules to publicly log a channel without informing people [19:37] voodootikigod_: bentomas: methinks you want to thank the_undefined [19:37] saikko: JimBastard: why do you say it doesn't translate well to JS? [19:37] bentomas: voodootikigod_: ooops! you are completely right! [19:37] the_undefined: bentomas: source is here: [19:37] the_undefined: !src [19:38] frodenius: yeah there should be a notice to the channel or in the topic [19:38] JimBastard: saikko, i just dont understand how tag based languages work in JS [19:38] bentomas: yeah, when I started logging into irc last week the average number of users was in the twenty-somethings [19:38] bentomas: I think node.js is about to start getting a lot more attention [19:38] JimBastard: ive been hearing about it [19:39] JimBastard: and it was up AGAIN today on hackernews [19:39] JimBastard: figured it was stable enough to try out [19:39] JimBastard: so far, so good [19:39] JimBastard: whats wrong with this? var sys = require('sys'), http = require('http'), mustache = require("mustache"); [19:39] JimBastard: ACTION opens up the noob question flood gate [19:41] JimBastard: okay nm, var sys = require('sys'), http = require('http'), mustache = require("./mustache"); [19:41] JimBastard: that was easy, but now its not reading. is mustache not server side ready? [19:41] voodootikigod_: check out mybranch [19:41] voodootikigod_: http://github.com/voodootikigod/mustache.js [19:41] voodootikigod_: and rake build [19:41] voodootikigod_: it will build dojo, jquery, commonjs [19:42] voodootikigod_: or just rake commonjs [19:42] voodootikigod_: outputs to build dir [19:43] jan____: voodootikigod_: I merged the commonjs to my master [19:43] JimBastard: drrr brb [19:43] voodootikigod_: oh cool [19:43] voodootikigod_: i wish it would notify of that [19:43] jan____: I could have told you [19:43] voodootikigod_: umm [19:43] voodootikigod_: did you merge the most recent? [19:43] jan____: or you could read your github live-stream [19:43] jan____: I did merge last week [19:43] voodootikigod_: strange [19:43] jan____: I haven't seen a new pull request from you [19:44] voodootikigod_: it doesnt show in teh network graph [19:44] jan____: *burps* [19:44] JimBastard: i was just being retarded, its loading now [19:44] voodootikigod_: oh cause i hadn't sent it [19:44] voodootikigod_: JimBastard: #true [19:44] JimBastard: being a proffesional developer and also being mentally retarded is hard [19:44] JimBastard: let me tell you [19:44] voodootikigod_: hahah [19:44] JimBastard: although my coworkers do like the hugs [19:45] voodootikigod_: jan____: i just sent you a pull req. I refactored the entire build construct to all go into one directory [19:45] voodootikigod_: makes generating zip files easier [19:47] edspencer_ has joined the channel [19:47] jan____: will look later, gotta run [19:48] bh: someone refresh my memory... how can I make an object literal and "bless" it to have the same prototype as another object? [19:48] bh: o={id:32}; function F(){}; F.prototype.foo = function(){ return this.id; }; o.prototype = ... [19:49] bh: new F()? F.prototype? [19:49] meebo has left the channel [19:49] sztanpet: bh http://ejohn.org/apps/learn/ [19:51] JimBastard: :-D [19:51] JimBastard: when in doubt, consult God [19:51] JimBastard: (JohnResig) [19:54] bh: well sure that covers the basics but I don't see how to do it given just something like a raw object - maybe I'm being thick [19:54] sztanpet: http://ejohn.org/apps/learn/#72 [19:54] JimBastard: what is the best way to debug node.js applications, http://github.com/Connorhd/node_debug ? [19:54] JimBastard: also, do i have to restart the server everytime i make a change? [19:55] jed: bh: you can't reliably change the prototype of an object that already exists. [19:56] bh: thanks jed - that's what I was looking for [19:56] JimBastard: hee hee this is awesome [19:56] jed: bh: you can do obj.__proto__ = somePrototype on some platforms. [19:56] JimBastard: all the good backend programmers learning JS [19:56] bh: ok awesome - that's the missing link for me [19:56] jed: bh: yeah, i ran across that a while back. [19:57] jed: bh: for example, i'd really like to be able to create a function that has a prototype chain, but it's not possible. [19:57] JimBastard: it is jed [19:57] JimBastard: do you mean like a continuation monad? [19:57] jed: JimBastard: without using __proto__? [19:57] JimBastard: i could be mistaken [19:57] jed: JimBastard: i don't think so. [19:57] jed: JimBastard: code or GTFO, ha ha. [19:58] JimBastard: http://github.com/Marak/route.js [19:58] bh: for instance if you wanted to serialize an object as JSON then parse it back you cannot set the prototype on the parsed object then... [19:58] JimBastard: look at the route syntax, is taht what you mean? [19:58] jed: JimBastard: are you talking to me? [19:58] JimBastard: i think so [19:58] jed: JimBastard: i really don't think you can. [19:58] jed: bh: that's correct. [19:59] JimBastard: im probaly way off [19:59] bh: jed: thanks :) [19:59] jed: bh: you might be able to hack it using the "reviver" parameter of JSON.parse. [20:00] jed: bh: ie, you could pass the object to your own constructor function. [20:00] inimino: bh: yes, you probably have to construct a new such object using the reviver [20:01] isaacs_ has joined the channel [20:01] inimino: that is the clean way :) [20:02] bh: ACTION tries that [20:05] JimBastard: sweet ass, debugger working [20:06] voodootikigod_: ass debugger eh [20:06] JimBastard: NO THERE WAS A COMMA [20:06] JimBastard: ACTION sees what you did thar [20:07] JimBastard: is there anyway to get by the having to restart node everytime you make a change? [20:07] JimBastard: is there a way to dyanmically include resources on request? [20:08] JimBastard: or something [20:08] JimBastard: that isnt destructive [20:09] jed: JimBastard: i think there are folks working on that. [20:09] jed: JimBastard: but yeah, you have to restart right now. [20:09] JimBastard: word [20:10] JimBastard: kinda takes forever [20:10] jed: JimBastard: you could also roll your own library reloader, but it'd prolly be a mess. [20:10] JimBastard: well its a big problem if you think about it [20:10] JimBastard: caus you want to cache....but not cache... [20:10] JimBastard: huge headache [20:11] jed: JimBastard: with all the attention node is getting, i think it's only a matter of time. [20:11] JimBastard: meh the debugger seems to take forever to start [20:14] JimBastard: and when i debug.log a complex object instead of getting a clicky tree, im getting [object Object] [20:16] JimBastard: Connorhd ? [20:17] cruxst has joined the channel [20:24] isaacs has joined the channel [20:28] JimBastard: hey voodootikigod, so everything i want to include as module has to be in CommonJS? [20:28] JimBastard: using the export command? [20:31] frodenius: exoprts.whatever = [20:31] rakeshpai has joined the channel [20:32] voodootikigod_: not necessarily [20:32] voodootikigod_: but a good idea [20:32] voodootikigod_: you can use the load function [20:32] voodootikigod_: from raw v8 [20:32] JimBastard: well like, im trying to use mustache [20:33] JimBastard: and i cant seem to make it call the method no matter what i try [20:33] JimBastard: and the debug is kinda shitfuck [20:33] JimBastard: mustache = require("./mustache"), [20:33] JimBastard: mustache.to_html(template, view) [20:33] JimBastard: mustache.mustache.to_html(template, view) [20:33] JimBastard: just not finding the method, so i assumed it was because its not commonJS [20:34] voodootikigod_: gimmie a second [20:34] JimBastard: sure, thanks [20:38] voodootikigod_: run this [20:38] voodootikigod_: http://gist.github.com/241352 [20:40] rakeshpai_ has joined the channel [20:40] JimBastard: running [20:40] voodootikigod_: and worked? [20:40] voodootikigod_: should output wtf [20:42] JimBastard: TypeError: Object # has no method 'to_html' [20:42] JimBastard: sorry [20:42] JimBastard: one sec [20:42] JimBastard: let me try agian [20:42] ashb: elliottcable: i think you failed to understand sarcasm there ;) [20:43] voodootikigod_: methinks you aren'tusing the right commonjs code [20:43] voodootikigod_: whose branch are you using? [20:43] JimBastard: thats what im saying [20:43] voodootikigod_: janl's or mine? [20:43] JimBastard: i just downloaded the straight up one from the github, both i think [20:43] voodootikigod_: and you did rake commonjs [20:44] JimBastard: no... [20:44] voodootikigod_: and pulled the mustache.js file from ./build/commonjs/ [20:44] JimBastard: i didnt rake at all, i cant just get the build from github? [20:44] JimBastard: i must rake myself? [20:45] voodootikigod_: only on weekends [20:45] voodootikigod_: here i will post a file [20:45] JimBastard: i mean, if thats the procedure ill do it [20:45] JimBastard: i didnt really understand from the docs, first time hearing of commonjs [20:45] JimBastard: i googled it though [20:45] JimBastard: i understand the point [20:45] voodootikigod_: mainly because i just put it in [20:46] voodootikigod_: curl -O http://cloud.github.com/downloads/voodootikigod/mustache.js/mustache.js [20:46] JimBastard: ahhh [20:46] JimBastard: var sys = require("sys"), mustache = require("./mustache"); [20:46] JimBastard: err [20:47] JimBastard: exports.to_html = Mustache.to_html; [20:47] JimBastard: i see [20:47] voodootikigod_: yups [20:47] voodootikigod_: the previous one didnt have that [20:48] voodootikigod_: janl still has yet to merge the latest [20:48] ashb: toHTML is the JS-ier name :) [20:48] JimBastard: thanks voodootikigod, works perfect [20:49] JimBastard: so CommonJS is the standard for node.js modules? [20:49] JimBastard: does this mean any JS libraries im use to using will have to be wrapped? [20:50] voodootikigod_: you can use load("file") [20:50] voodootikigod_: as well [20:50] voodootikigod_: and it raw loads it [20:50] voodootikigod_: modules per http://wiki.commonjs.org/wiki/Modules/1.1 [20:50] voodootikigod_: ashb: true but to_html is what was started and came from the original mustache.rb [20:50] ashb: have both then! :) [20:50] JimBastard: thanks [20:50] voodootikigod_: hhaha [20:50] voodootikigod_: great ite [20:51] JimBastard: docs were a bit unclear on this [20:51] ashb: tbh i kinda prefer the to_html form [20:52] voodootikigod_: same [20:52] voodootikigod_: hahaha [20:52] voodootikigod_: o course [20:55] rektide: does raycmorgan chill in here at all? [20:55] rektide: i plan on using vroom in the future, just curious [21:03] mediacoder: rektide yea i think ive seen him here, too [21:16] bentomas: I'm trying to write a script to reload my node files when one of them changes. I figured I could just re-require the files I'm using and it would get the new code [21:17] bentomas: unfortunately, node caches all the modules it requires [21:17] bentomas: does anyone know if it is possible to clear the cache? [21:18] bentomas: here is where the moduleCache is created: http://github.com/bentomas/node/blob/master/src/node.js#L429 [21:18] JimBastard: i was just asking about that before [21:19] bentomas: yeah, it was your question that motivated me into looking into how it would work [21:20] bentomas: I could always fork and add a method, (like process.clearModuleCache) or something, but I am hesitant to go to the effort unless I know people are interested in that functionality. Is there a better way to do this? [21:20] bentomas: Maybe run the node scripts as a child process and then kill it when anything changes and launch a new child process? [21:23] JimBastard: i think maybe you should look into CommonJS? [21:23] JimBastard: surely they have a way of dealing with this already? [21:24] JimBastard: for modules at least [21:24] JimBastard: you might have to have a server.js that is a wrapper, so server.js is always running [21:24] JimBastard: and everything else is loaded dynamically [21:24] JimBastard: but this is a classic ruby problem to my understanding [21:24] JimBastard: how do you know when to call the cached version or to reload [21:28] bentomas: Well, in this case, I'm not interested in being smart. When a file changes I want to reload the whole app. That solves that problem. [21:30] JimBastard: how do you know when a file changes? [21:30] JimBastard: where are you checking for changes? [21:37] bentomas: node.js has a process.watchFile(): "Watch for changes on filename. The callback listener will be called each time the file changes." [21:38] JimBastard: heh [21:38] JimBastard: that sounds about right [21:38] JimBastard: so you should be able to reload your assett onchange [21:39] JimBastard: can you write a handler that will call require? [21:39] JimBastard: would that work? just overwrite it in memory? [21:39] bentomas: yeah, but you can't reload using require, because require pulls from the module cache, so no matter how many times you call "require('module')" it only loads the module once [21:40] frodenius: use posix.cat and process.compile [21:40] JimBastard: ahhh [21:40] JimBastard: if you can figure it out you should defintely make a new method (if applicable) [21:40] JimBastard: i would use it for sure [21:40] JimBastard: load my server.js and modify the assetts as i see fit [21:41] frodenius: bentomas: do you want to implement a function that realoads into the module cache? [21:42] JimBastard: i think im missing something here, im using http://github.com/fictorial/redis-node-client and ive got everything connected. am i going to have to implement my own CRUD methods from scratch? or is there already example code somewhere for talking from node.js -> redis [21:43] bentomas: frodenius: I could give it a go! [21:43] JimBastard: i found a little something at http://simonwillison.net/2009/Nov/23/node/, but seems to be missing [21:43] frodenius: bentomas: would be nice [21:43] JimBastard: for show bentomas [21:45] frodenius: bentomas: you maybe want to consider passing the old exports object into it, so code that holds a reference to some require() object use the new code too [21:49] bentomas: so, would we want reload('module', old_exports_object); [21:50] frodenius: nah, just reload('module') but the reload function passes the old exports object to the module functino [21:50] bentomas: oh right, of course [21:51] frodenius: idk, maybe you have to change require too for that to work [21:53] JimBastard: jesus redis is a bit much to learn in 30 minutes [21:53] JimBastard: anyone know any good tutorials? im stepping through the docs right now [21:55] frodenius: bentomas: i have another idea, the require function that is passed to the new module code should reload the required modules too so we have updated dependencies [21:56] bentomas: that does make sense. this might be getting a bit over my head... [22:10] JimBastard: is there an object-hash mapper for redis / node.js? [22:12] keeto has joined the channel [22:26] tfickett has joined the channel [22:27] the_undefined has joined the channel [22:35] orlandov has joined the channel [22:36] orlandov: is this the official node.js channel? or is that on irc.nodejs.org? [22:37] JimBastard: this is it [22:37] JimBastard: welcome to the party [22:37] orlandov: woot [22:37] orlandov: good to be here [22:37] JimBastard: 10 dollar cover charge [22:37] JimBastard: but you can drink all night [22:37] orlandov: tough but fair [22:38] orlandov: right now i'm trying to hack together an SCGI server w/ node, yay cargo culting http.js [22:45] the_undefined: !log [22:49] tfickett has left the channel [22:53] okito has joined the channel [22:55] ashb: http.js? [22:56] orlandov: ashb: node/lib/http.js [22:56] ashb: oh righyt [22:57] ashb: i thought you mean some other project i've managed to not hear of in the SJS space [22:59] elliottcable: isaacs: ahhah! [22:59] elliottcable: oops… inimino ^^ [22:59] ElVox has joined the channel [22:59] isaacs: hrm? [22:59] inimino: ;-) [22:59] isaacs: oic :) [22:59] isaacs: carry on. [23:00] inimino: and yes, lots of newbie BS flying past constantly in that other channel [23:01] ElVox has left the channel [23:01] okito: hi - I'm hacking on node.js a bit right now. beautifully structured code btw [23:02] okito: is there a way to load my own JS without having to rebuild the binary? [23:02] okito: i.e. my own hacked version of the node.js JS [23:03] Connorhd: lots of the features written in JS are librarys anyway now? [23:03] Connorhd: which part in particular are you looking to load? [23:05] okito: for example - I was thinking of hacking on the module loader in src/node.js [23:05] okito: I am working on the tiki loader to be used by Sproutcore and Bespin for the browser. [23:05] okito: commonjs module loader [23:05] okito: and I'm experimenting with ways to also have the same code work in a server-side environent [23:06] okito: SproutCore is very event-driven so it seems like a good fit w/ node.js [23:09] voodootikigod_: wait wait wait [23:09] voodootikigod_: wait [23:09] voodootikigod_: the tiki loader [23:09] voodootikigod_: for srs [23:11] okito: http://github.com/sproutit/tiki [23:11] okito: :) [23:18] jed has joined the channel [23:29] okito: is there anyway to get an interactive shell in node? [23:29] cruxst: info teknoid [23:29] okito: I tried node --shell [23:29] okito: like w/ v8 [23:30] cruxst: quick question: anyone attempted a full app with node.js yet? [23:30] cruxst: with amazon ec2? [23:30] cruxst: s3 storage? [23:32] okito: nm - figured out how to get a prompt... [23:33] orlandov: okito: how's that? [23:34] okito: node-repl [23:34] okito: I have no idea what REPL stands for [23:34] okito: still wondering how I can load my own hacked version of Node's JS... [23:34] inimino: http://en.wikipedia.org/wiki/REPL [23:34] okito: ah [23:34] okito: why not call it a shell? [23:34] okito: :) [23:35] inimino: because that's something else in the Unix tradition [23:35] okito: hm [23:35] okito: v8 calls it the shell [23:36] okito: ruby calls it the interactive ruby. ijs. :) [23:36] okito: anyway- bikesheds [23:37] ashb: i prefer the python way [23:37] ashb: `python` gives you a REPL [23:37] ashb: `python foo.py` runs the file [23:37] okito: it's called a repl? [23:37] ashb: a REPL is what it is. [23:37] ashb: it read's input, evals it, prints the output, and then loops back to the start [23:38] ashb: hmmm random ' [23:38] isaacs: repl = read, eval, print loop [23:40] orlandov: ah rad... so far i'm smitten with node.js- now if only there were mongodb bindings for it. wish my C++ skills hadn't gone to shit over a decade of disuse [23:40] ashb: i've got mongodb bindings. not for Node tho [23:41] ashb: sorry [23:41] ashb: <--- helpful [23:41] orlandov: for some other language you mean? [23:41] ashb: differnent SJS platform [23:41] orlandov: ahh [23:41] orlandov: gotcha [23:42] ashb: i'm one of those crazy people who thing the full async all the time gets in the way of the code :) [23:42] orlandov: if i understand the way node.js works, i can't simply just wrap libmongoclient either... it'd have to be non-blocking and play nice with eio and libev [23:42] ashb: i just camp out here to.. spread FUD and seal ideas or some such [23:42] ashb: yeah - it would have to be async to work well [23:42] orlandov: ashb: i hear ya... just like how a pure functional language is only good for warming up the room :) [23:42] ashb: you *could* just have it block, but it wouldn't be well received [23:43] orlandov: yeah exactly [23:43] ashb: i would say its easy since node is written in C++, but i'm not sure how easy it is to create classes in node [23:43] ashb: i'm too used to hippo's crazy template/boost meta-magic [23:44] elliottcable: yeah, lol, ashb is a CommonJS dude. [23:45] orlandov: yeah, i've only been looking at it for a couple of days, and it doesn't look too bad, but there's a lot of v8/libev/eio knowledge required [23:45] ashb: its certainly fast and cool. there's no doubnting that. its just not right for me [23:45] orlandov: ashb: what do you dislike? [23:45] orlandov: out of curiousity [23:46] ashb: partly i like some ofthe things that spidermonkey stole form python (generators,yield, array comprehensions) which v8 don't do [23:46] ashb: the other part is the forced async API doesn't agree with me - i'm not writing a facebook :) [23:46] rakeshpai has joined the channel [23:47] orlandov: heh fair enough [23:47] elliottcable: that’s the thing, for me. [23:47] elliottcable: I don’t like the async because it’s faster, I like it because it *makes sense* to me. [23:47] ashb: you *are* writing a facebook? [23:47] ashb: ;) [23:47] cruxst: holy shit [23:47] elliottcable: Anybody just using #Node.js because they have some inability to understand the phrase ‘premature optimization’ should leave the room now. [23:48] cruxst: node.js is awesome, but whos behind it? [23:48] elliottcable: cruxst: ryah_away [23:48] orlandov: ashb: we'll see :) [23:48] cruxst: how do i know its legit? [23:48] elliottcable: cruxst: uh, what? [23:48] elliottcable: !grab cruxst [23:48] ashb: its open source - go read the code? [23:48] cruxst: elliottcable: was anyone from the team on a big project before? [23:48] elliottcable: oh, shit, no phrik )-: [23:49] elliottcable: cruxst: oh, so code is onky ‘legit’ if somebody was on a big project before. [23:49] cruxst: ashb: source code is nothing unless you know exactly what youre looking for [23:49] elliottcable: cruxst: yeah, that’s totally a sustainable system. ever heard of ‘innovation?’ [23:49] jed has left the channel [23:49] ashb: cruxst: much like vague questions [23:49] cruxst: elliottcable: chances are undeniable higher when thats the case [23:49] cruxst: *undeniably [23:49] elliottcable: cruxst: because I *totally* want all of my code written by old fucks who work for Microsoft, wrote Word, and have *no* idea what’s going on nowadays. [23:49] okito: JS would be much enhanced with full co-routines [23:50] okito: then you could make async code look sync [23:50] okito: best of all worlds [23:50] ashb: cruxst: bullshit. big teams in my expereicne always produce corporate shit. [23:50] cruxst: elliottcable: old fucks also wrote things like IIS and Excel [23:50] elliottcable: I disagree, I like the async style. [23:50] elliottcable: But I wouldn’t argue against such a feature; each to their own. [23:50] cruxst: elliottcable: and a number of other successful projects [23:50] elliottcable: cruxst: You’re just making my point for me. [23:50] orlandov: i guess 1 out of 2 aint bad [23:51] cruxst: elliottcable: no i am not. those are very good bits of software. [23:51] okito: ashb what sjs r u using most? [23:51] elliottcable: cruxst: hahahahahahahahahahahahahahahahaha [23:51] ashb: okito: hippo and juice [23:51] ashb: since thats what i work on [23:51] cruxst: ashb: how much experiece do you have to say that, may i ask? [23:51] ashb: on what exactly? [23:51] elliottcable: (also, watching those a’s and h’s appear over this EDGE pipe was pretty hilarious. Bursts of laughing!) [23:51] cruxst: ashb: working with big teams that is [23:51] elliottcable: cruxst: how much experience do *you* have, that you can come in here and criticize us, eh? [23:52] cruxst: ashb: you said, from you experience [23:52] ashb: been programming professionaly for 10 years [23:52] ashb: about half working for a large team [23:52] cruxst: elliottcable: i am no trying to critisize you my friend. In fact, i am stoked about this project. [23:52] elliottcable: cruxst: (not that I care how many big teams you’ve worked on; frankly, the more you have, the less I give a shit what you have to say; that simply proves you can’t think for yourself and work on small, innovative projects where your skills actually matter as opposed to your presence as ‘just one more pair of hands at the keyboard’) [23:53] ashb: big team = easier to hide medicroicy [23:53] cruxst: elliottcable: i just want to make sure that people behind it are actually aware of millions of things they need to know before they can actually write a new platform for web apps like that [23:53] ashb: 1) dont trust IIS. [23:53] elliottcable: Node.js is extremely, extremely small, extremely thin. [23:53] cruxst: elliottcable: you are too aggressive [23:53] cruxst: elliottcable: chill pill? [23:54] orlandov: flame wars are boring guys [23:54] elliottcable: So it doesn’t really matter if ryah knows how to write Rails or (lol) IIS. He just needs to know how to write Node.js, and something else can be written by other people on top of it. [23:54] orlandov: if you're going to argue about something, talk about something we can all enjoy :P [23:54] ashb: everyone loves a good trolling [23:54] elliottcable: forgive me if I seem acerbic, I just had a conversation on Twitter that ended with these two tweets: [23:54] elliottcable: @photar: @elliottcable You need to irigate the sand from your vagina. [23:54] elliottcable: @photar: @elliottcable fine go fuck yourself. [23:54] orlandov: node.js will stand on its own merits, if it sucks no one will use it. it it rules, people will... i don't see what the problem is [23:55] elliottcable: so, understand that I am a little pissed in general. [23:55] orlandov: elliottcable: heheh [23:55] ashb: elliottcable: first mistake: arguing on twitter [23:55] orlandov: really.. [23:55] elliottcable: ashb: Oh, no, I do that all the time. [23:55] inimino: s/twitter/the Internet/ [23:55] ashb: second mistake: not learning after the first time ;) [23:55] cruxst: orlandov: i am trying to determinte if the project is worth my time. [23:56] cruxst: orlandov: since i dont have enough expertise to examine/contribute to the core, i have to trust the core team [23:56] inimino: cruxst: it's probably written by newbies and you should go use something enterprise-ready. I recommend IIS [23:56] orlandov: understood, the point i'm trying to make is that it's an OSS project that's fairly young; at the same time it seems pretty freakin' solid so far [23:56] elliottcable: inimino: hahaha! [23:56] orlandov: time will tell [23:57] cruxst: inimino: no need to be sarcastic here. IIS is a very complex product believe it or not. [23:57] isaacs: If you can't judge a system by RTFS, then you should'nt be the one judging systems, imho. [23:57] isaacs: I've used IIS pretty extensively. It's not the devil. [23:57] isaacs: but I wouldn't trust it, because I can't see the source. [23:57] isaacs: and if you can't judge the source, and still have to judge the system, then do so based on cost. [23:58] isaacs: i've seen ryah's code, and that's why i trust it, n00b or enterprise or expert or what. i'd never heard of the guy until node.js came across my radar. [23:58] cruxst: isaacs: open source world is kind of small [23:59] cruxst: isaacs: dont you think? [23:59] elliottcable: cruxst: hahahahahahahaha [23:59] isaacs: cruxst: do you think that small communities are less trustworthy? [23:59] cruxst: elliottcable: moreover, programming world is kind of small [23:59] cruxst: let alone JavaScript