[00:00] iFire has joined the channel [00:00] iFire has joined the channel [00:02] rchavik has joined the channel [00:02] rchavik has joined the channel [00:03] tedsuo has joined the channel [00:14] rsms has joined the channel [00:19] dyer has joined the channel [00:19] dyer has joined the channel [00:19] saikat has joined the channel [00:21] brez__ has joined the channel [00:22] brettgoulder has joined the channel [00:22] ngs has joined the channel [00:22] bde has joined the channel [00:23] Bwen: node is in C++? [00:24] swizard has left the channel [00:24] xandy: Bwen v8 is in c++ and node too i guess [00:24] nailer has joined the channel [00:26] Bwen: if I want to make a module for node I write it in C++ then not C? [00:27] xandy: yes [00:27] shiawuen has joined the channel [00:27] Intel_iX has joined the channel [00:27] mscdex: yup [00:27] mscdex: :) [00:27] xandy: you could write it in js too ;) [00:27] Intel_iX: Question, how do you increase the max memory for node? [00:27] Intel_iX: I'm trying to save files in RAM [00:28] Intel_iX: Instead of the disk [00:28] Intel_iX: But it gives me out of memory errors [00:28] mscdex: Intel_iX: yikes [00:28] mscdex: why are you storing such large files in ram? [00:28] xandy: v8 has a built in memory limit afaik [00:28] Intel_iX: well, I get [00:29] tedsuo has joined the channel [00:29] boogyman has joined the channel [00:29] Intel_iX: terminate called after throwing an instance of 'std::bad_alloc' [00:29] Intel_iX: what(): std::bad_alloc [00:29] Intel_iX: Aborted (core dumped) [00:29] mscdex: i think the limit is 1gb or something [00:30] mscdex: yep, 1gb on x86 and 1.7-1.9 on x64 [00:31] Intel_iX: Shouldn't buffers save data outside of v8 ._. [00:31] Intel_iX: That's annoying. [00:31] daekano: sure, save it to disk. [00:31] daekano: lol [00:31] Intel_iX: = slow [00:31] mscdex: Buffers are not included in that heap limit [00:32] Intel_iX: even new Buffer(0x35000000); causes a memory error [00:32] jakehow has joined the channel [00:32] samsonjs has joined the channel [00:33] Intel_iX: 20 gives me FATAL ERROR: CALL_AND_RETRY_2 Allocation failed - process out of memory ._. [00:33] xandy: Intel_iX v8 was designed for browsers and performance. no browser js engine should need more than 1gb of ram per page. [00:33] xandy: that's why v8/node stops at 1gb atm [00:33] xandy: afaik [00:33] Intel_iX: Aren't buffers excluded? ._. [00:33] xandy: nope [00:33] mscdex: yes [00:33] mscdex: heh [00:33] xandy: hm [00:34] xandy: maybe yes [00:34] mscdex: buffer's backing storage is outside the heap [00:34] xandy: ;)( [00:35] Intel_iX: So how do I expand the backing storage [00:35] FireFly|n900 has joined the channel [00:35] mscdex: hmmm, creating a new buffer with that size works fine for me on x64 [00:36] zivester: any express + jqtpl users here? wondering how to correctly register a function for use within the template [00:36] Intel_iX: Is there some kind of flag I can put in the makefile to do that [00:36] Intel_iX: doesn't for me ._. [00:36] mscdex: you're on x64 too or x86? [00:36] Intel_iX: amd64 [00:36] Intel_iX: 2.4 commit out of 10, 2.1 physical [00:37] Intel_iX: (4 max physical) [00:40] matyr has joined the channel [00:40] rook2pawn has joined the channel [00:40] mscdex: i dunno then, works fine for me here... [00:41] mscdex: i'm on ubuntu server 10.04 lts fwiw [00:42] tedsuo has joined the channel [00:42] deedubs has joined the channel [00:42] carlw2 has joined the channel [00:42] matyr_ has joined the channel [00:43] bockmabe has joined the channel [00:45] carlw2: Hi all, I released rel yesterday http://cjwoodward.github.com/rel/, its a port of Arel from the ruby world. It is a nice way to build sql. I am working on a port of ActiveRecord now. I also wrote a blog post on circular dependencies in node which was interesting issue in the port: http://carlwoodward.com/circular-dependencies-in-node. Anyway just thought I'd share. [00:50] coreb: carlw2: that's cool [00:50] carlw2: thanks coreb [00:51] Epeli: carlw2: looks awesome :) [00:52] carlw2: thanks Epeli [00:52] matyr has joined the channel [00:52] zentoooo has joined the channel [00:52] coreb: looks like mysql sql being generated? [00:55] Tobias| has joined the channel [00:55] carlw2: coreb: im still testing it with different databases so it should work to sql standard [00:56] k1ttty has joined the channel [00:56] carlw2: it pushes out what arel does [00:56] beejeebus has joined the channel [00:56] carlw2: and arel doesn't have many customisations for different dbs [00:57] flippyhead has joined the channel [00:57] cryptix has joined the channel [00:58] zivester has joined the channel [00:59] gmci has joined the channel [01:00] [[zz]] has joined the channel [01:02] patcito has joined the channel [01:02] zkirill has joined the channel [01:02] zivester: anyone know how to disable html escaping for a specific function in jqtpl ? [01:02] matyr_ has joined the channel [01:03] dyer has joined the channel [01:06] Yuffster has joined the channel [01:06] jacter has joined the channel [01:11] JulioBarros has joined the channel [01:12] dre has joined the channel [01:12] bwinton has joined the channel [01:13] Gigawattz: how come process.title does not work ? [01:13] abraxas has joined the channel [01:14] Bwen: once I have my .node how do I incorporate it to node? [01:16] newy_ has joined the channel [01:17] Nexxy has joined the channel [01:18] Aria: require it. [01:18] Aria: Gigawattz: what OS? [01:19] Gigawattz: Ubuntu 11.04 [01:19] Bwen: Aria: ohh I see, sweet. Thx :) [01:20] matyr has joined the channel [01:23] abraham has joined the channel [01:23] Aria: Hm. Should work on Ubuntu, Gigawattz. You're setting it? [01:24] Gigawattz: process.title = 'My Application'; does not change it! [01:25] mikeal has joined the channel [01:26] picasso has left the channel [01:27] JacobSingh has joined the channel [01:27] jacter1 has joined the channel [01:29] brolin_ has joined the channel [01:31] ditesh|cassini has joined the channel [01:32] brez__ has joined the channel [01:32] Gigawattz: how can i tell if the instance of my application was executed via the console [01:32] newy_ has joined the channel [01:33] dhasenan: Gigawattz, you can use /proc and /dev to tell if stdout is connected to a virtual terminal, probably. [01:34] Gigawattz: dhasenan: please explain what you mean [01:35] dhasenan: There is a symlink in /proc/self/fd/1. [01:36] dhasenan: If you ran your application on the command line, like "./foo", that will be linked to /dev/pts/{some number} [01:36] JacobSingh: Any opinions on https://github.com/1602/express-on-railway ? [01:37] astropirate has joined the channel [01:37] astropirate: Anyone here use Dust with express? [01:37] astropirate: better question: does express work with dust? [01:37] brownies has joined the channel [01:38] dhasenan: Might work, might not. [01:38] killfill has joined the channel [01:38] Gigawattz: can i just do: require('tty').isTTY(process.stdout); [01:38] hij1nx has joined the channel [01:39] dhasenan: That's probably more portable. [01:39] Gigawattz: kool, ill give it a test! [01:39] dhasenan: Actually, no. process.stdout is a stream. [01:39] dhasenan: You need a file descriptor, which for stdout is 1. [01:43] Gigawattz: hmm, it returns true, and even if i just do: require('tty').isatty() [01:43] mdoan has joined the channel [01:43] Gigawattz: anyway i can get the fd for the current console [01:44] killfill has joined the channel [01:46] zentoooo has joined the channel [01:46] matyr has joined the channel [01:47] lightcap has joined the channel [01:51] zivester: can someone explain how to load static files from nodejs or express [01:53] newy_ has joined the channel [01:54] sshaginyan has joined the channel [01:55] sshaginyan: Guys I'm having soooo many problems with jsdom...... [01:55] _rain has joined the channel [01:55] killfill has joined the channel [01:56] boaz has joined the channel [01:56] Gigawattz: dhesenan: Streams have a local variable for thedescriptor, [01:56] Gigawattz: exports.inTerminal = require('tty').isatty(process.stdout.fd); [01:58] sshaginyan: My code and the error please someone help.... http://pastie.org/1829991 [02:01] sshaginyan: Please someone....? [02:01] F1LT3R has joined the channel [02:02] zivester: I've learned this IRC can be somewhat quiet [02:02] ditesh|cassini has joined the channel [02:02] sshaginyan: lol [02:02] mscdex: Gigawattz: process.title only affects what is seen in ps, top, and the like [02:02] gdusbabek has left the channel [02:02] mscdex: not xterm window title or anything [02:02] sshaginyan: zivester: I've been trying to get this to work for 5 days now [02:03] zivester: I'm just trying to get /static files to load... one step at a time [02:04] mscdex: zivester: simplest way with just nodejs is to (after writing the header of course): fs.createReadStream('foofile').pipe(res) [02:05] zivester: mscdex... im using the express framework.. suppose to be as simple as app.use(express.static(__dirname + '/static')); .. but i keep getting Cannot GET /static/images/logo_us.gif [02:06] mscdex: never used express, so can't help you there [02:06] hassox has joined the channel [02:06] zivester: ya i dont know where else to get express support then in here [02:07] saikat has joined the channel [02:08] Gigawattz: msdex, what you mean by ps, top and the like ? [02:08] daekano has joined the channel [02:09] mscdex: Gigawattz: those are console unix utilities [02:09] Gigawattz: ooh ok, so it's not available in my case [02:09] mscdex: huh? they should be [02:09] tedsuo has joined the channel [02:10] Gigawattz: it does not set the title of the winodw [02:10] Gigawattz: window [02:10] mscdex: right, i said it wouldn't :) [02:10] mscdex: process.title != window title [02:10] Gigawattz: ooh you just said the yshould be, i was a little confused [02:10] Gigawattz: yea [02:10] Gigawattz: process.title [02:10] Gigawattz: oooh [02:11] mscdex: when you change process.title, you will set the process title that shows up when you do `ps` [02:11] Gigawattz: so this is not the window title [02:11] mscdex: or `top` [02:11] mscdex: if you want to change the window title, you have to use some escape characters to set that [02:11] Gigawattz: pph shii, im with you dood, ps as in the process list [02:12] jiggliemon has joined the channel [02:14] saikat has joined the channel [02:17] timmywil has joined the channel [02:19] daekano has joined the channel [02:19] Tobsn: does anyone know why update-rc.d blah defaults returns "update-rc.d: using dependency based boot sequencing" on squeeze?! [02:19] sub_pop has joined the channel [02:20] langworthy has joined the channel [02:22] JimBastard: npm rap is almost done [02:22] JimBastard: maybe [02:22] JimBastard: back to real f*cking work now [02:23] jacter has joined the channel [02:24] varunsrin has joined the channel [02:24] sshaginyan: can anyone recommend a stable web scrapping library? [02:24] varunsrin: node.io is good i hear [02:25] varunsrin: i have not actually used it myself [02:25] Mrfloyd: what do u wanna scrape? [02:25] varunsrin: btw, can anyone help me with an issue I'm having with Node & MongoDB/Mongoose [02:25] sshaginyan: all the functions within this page http://php.net/quickref.php [02:25] varunsrin: The problem is up on stack overflow, at this URL http://stackoverflow.com/questions/5772982/finding-an-embedded-document-by-a-specific-property-in-mongoose-node-js-mongodd [02:30] Adman65 has joined the channel [02:30] jamesarosen has joined the channel [02:30] justinTNT has joined the channel [02:30] themiddleman has joined the channel [02:31] jacter1 has joined the channel [02:31] mscdex: Gigawattz: to change the window title to whatever you pass in as arguments: https://gist.github.com/65b046e17e922865207b [02:32] JimBastard: sshaginyan: ive use http-agent module before, i think tj has superagent or something, its not that hard, just chain through the pages and run some jquery [02:32] zivester: if someone can help me with express static file loading, here's my simple example that doesn't work: http://pastie.org/1830046 [02:32] sshaginyan: JimBastard: or should I use node.io? [02:33] justinTNT: hi zivester, [02:33] JimBastard: sshaginyan: ive never used it, try it out? report back [02:34] zivester: hello, express expert?! [02:34] mscdex: :) [02:34] sshaginyan: sure thing [02:34] justinTNT: I had that same problem till someone here set me right : make it app.use('/url/path/component/', express.static(__dirname + '/public')); [02:35] justinTNT: so, to route to a simple static server, app.use('/', express.static(__dirname + '/public')); [02:35] jiggliemon has joined the channel [02:37] jiggliemon has left the channel [02:38] zivester: hmm so just change line 10 to app.use('/',express.static(__dirname + '/public')); ? why doesn't that work still [02:39] davidcoallier has joined the channel [02:41] pifantastic: brianc: Using your postgres module (https://github.com/brianc/node-postgres), working awesome except one problem that may be user error. When I query a table called 'user' I get weird results [02:41] zivester: ya justinTNT, i'm still getting a 404 [02:41] kriszyp has joined the channel [02:41] pifantastic: Posted an issue here: https://github.com/brianc/node-postgres/issues/28 [02:42] justinTNT: hmmmm, dno. [02:43] arnorhs has joined the channel [02:44] zkirill_ has joined the channel [02:45] deepthawtz has joined the channel [02:46] dyer has joined the channel [02:46] dyer has joined the channel [02:47] abraham has joined the channel [02:49] zivester: is there an express API? there seems to only be that guide, which isn't really an API [02:49] zeunix has joined the channel [02:51] jacobolus has joined the channel [02:52] Aria: Most of Express's API is connect. [02:52] newy_ has joined the channel [02:52] zeunix: Anyone using underscore.js's native templating w/ node? I get: DEBUG: ReferenceError: _ is not defined [02:52] zeunix: at anonymous (eval at (/opt/local/lib/node/.npm/underscore/1.1.6/package/underscore.js:747:16)) [02:52] zeunix: at Function.template (/opt/local/lib/node/.npm/underscore/1.1.6/package/underscore.js:748:19) [02:52] zeunix: unless I declare the require as a global variable. [02:52] zeunix: But every other underscore method I try seems to work fine. [02:54] varunsrin: anyone wanna help me with my express / mongodb issue here [02:54] varunsrin: http://stackoverflow.com/questions/5772982/finding-an-embedded-document-by-a-specific-property-in-mongoose-node-js-mongodd [02:54] Gigawattz: v9: [1,2,3].count [02:54] Gigawattz: v8: [1,2,3].count [02:54] v8bot: Gigawattz: undefined [02:55] mscdex: v8: [1,2,3].length [02:55] v8bot: mscdex: 3 [02:55] mscdex: :) [02:55] Gigawattz: legth thats the one [02:55] Gigawattz: it;s like 4 am here :( [02:55] Gigawattz: length* [02:55] kmwallio has joined the channel [02:56] mscdex: hehe [02:57] david has joined the channel [03:00] zivester: Aria, any idea why this simple static server doesn't work with connect: var connect = require('connect'); connect( connect.static(__dirname+'/static').listen(9000); [03:00] JulioBarros has joined the channel [03:00] maeldur: connect is just middleware, i dont think it exposes listen() ? [03:01] varunsrin: anyone here familiar with mongoose ORM / mongodb? [03:01] zivester: maeldur http://senchalabs.github.com/connect/connect.html [03:02] zivester: i can't get that 3 liner at the end to work [03:02] Aria: I don't, zivester, not offhand. [03:02] Aria: What's "doesn't work" look like? [03:03] zivester: 404's and spits back: "Cannot GET /static/logo.gif" [03:03] zivester: `node static.js` in my home direction... and ~/static/logo.gif is there, permissions 777 [03:03] Aria: Hm. [03:03] maeldur: directly hit /logo.gif [03:03] zivester: wtf [03:04] maeldur: the static will remount it at / [03:04] zivester: that works.. but but.. [03:04] throughnothing has joined the channel [03:05] zivester: can i get it to use /static/ ? [03:05] Me1000 has joined the channel [03:05] maeldur: you'd probably want to create a static inside static then.. it works just like public/ in rails [03:07] zivester: not a rails guy, but that does clear it up... thank you! [03:10] gazumps has joined the channel [03:11] micheil has joined the channel [03:14] zkirill has joined the channel [03:14] Nexxy has joined the channel [03:17] sh1mmer has joined the channel [03:18] Remoun has joined the channel [03:19] unomi has joined the channel [03:28] huang47 has joined the channel [03:30] varunsrin: any mongoose / mongoDB experts? [03:33] mike5w3c has joined the channel [03:36] tilgovi has joined the channel [03:36] sivy has joined the channel [03:37] Me1000 has joined the channel [03:39] jamesarosen has joined the channel [03:39] Spion__ has joined the channel [03:40] matyr_ has joined the channel [03:42] tk has joined the channel [03:43] zcopley has joined the channel [03:50] matyr has joined the channel [03:53] rook2pawn has joined the channel [04:00] sh1mmer has joined the channel [04:08] RushPL has joined the channel [04:10] rfay_ has joined the channel [04:14] langworthy has joined the channel [04:14] jamesarosen has joined the channel [04:16] davidwalsh has joined the channel [04:18] Bogh has joined the channel [04:18] Charuru has joined the channel [04:21] EM03 has left the channel [04:23] shanez has joined the channel [04:23] sreeix has joined the channel [04:27] abraxas: Any node-mysql maintainers online? [04:31] boaz has joined the channel [04:33] matyr_ has joined the channel [04:34] rook2pawn has joined the channel [04:36] matyr_ has joined the channel [04:37] kmduke has joined the channel [04:38] PhilK has joined the channel [04:38] Knio has joined the channel [04:42] tilgovi has joined the channel [04:50] skm has joined the channel [04:56] marcello3d has joined the channel [04:56] marcello3d: yarg. node cluster is so confusing/complex :( [04:56] rmustacc has joined the channel [04:56] Tobsn: ;) [04:57] planetic has joined the channel [05:00] mscdex: heh [05:00] a2800276_ has joined the channel [05:00] mscdex: abraxas: that's felixge, he comes on here occasionally [05:01] throughnothing has joined the channel [05:01] zkirill has joined the channel [05:01] mscdex: abraxas: did you have a question? [05:04] Tobsn: yeah and its 6am his time hehe [05:04] enos_feedler has joined the channel [05:06] christopherbull has joined the channel [05:07] christopherbull: Hey, i'm wanting to store twitter JSON tweet objects in a mongodb database that I collect off the streaming API, my question is, I don't need any of the ORM data definition stuff of mongoose, out of all the monogo npm packages, which is the correct one to use for making a simple connection to mongodb and inserting JSON objects? [05:08] Tobsn: mongo native? [05:08] Tobsn: the same mongoose is using [05:08] JacobSingh has joined the channel [05:09] fr0stbyte: old mongoose! [05:09] dnolen has joined the channel [05:09] christopherbull: is that this one? https://github.com/christkv/node-mongodb-native [05:11] christopherbull: does anyone have any opinion on mongoq? https://github.com/zzdhidden/mongoq/ [05:13] sonnym has joined the channel [05:14] marcello3d: christopherbull: mongolian deadbeef :) [05:14] tedsuo: http.getAgent('mydomain.com').maxSockets and max concurrent connections with mydomain.com is 1:1, right? I'm not being daft about that? [05:15] marcello3d: christopherbull: https://github.com/marcello3d/node-mongolian [05:16] christopherbull: macello3d: lol thought you were joking with the name :D that looks great, thanks! [05:17] Darshan-NowJS: marcello3d: #nowjs misses you :P [05:21] marcello3d: night all [05:22] jamesarosen has joined the channel [05:27] binaryjohn has joined the channel [05:30] swizard has joined the channel [05:31] newy_ has joined the channel [05:35] sreeix has joined the channel [05:36] indutny has joined the channel [05:36] abraxas: mscdex: still around? I was out for lunch [05:38] saikat has joined the channel [05:38] k1ttty has joined the channel [05:39] sh1mmer: hm [05:40] sh1mmer: node-repl has some weird interaction with assert [05:40] blaenk has joined the channel [05:40] JusticeFries has joined the channel [05:40] sh1mmer: I just spent an hour trying to debug something that repl was somehow screwing up [05:46] dyer has joined the channel [05:47] konobi: sh1mmer: patches welcome [05:47] konobi: =0P [05:47] konobi: sh1mmer: how goes bru? [05:51] sh1mmer: yeah yeah I know [05:51] sh1mmer: I finally figured out it was repl [05:51] brownies has joined the channel [05:51] sh1mmer: but I haven't figured out why [05:51] sh1mmer: just writing, back to real life tomorrow [05:51] sh1mmer: wish I had more time, but I can't take any more time off work [05:55] konobi: sh1mmer: meh, wiritng is work related... jsut need to wangle it that way =0P [05:56] indutny has joined the channel [05:57] mnutt has joined the channel [06:00] zcopley has joined the channel [06:01] gmci_ has joined the channel [06:01] sreeix_ has joined the channel [06:02] zkirill has joined the channel [06:09] k1ttty has joined the channel [06:09] _rain has joined the channel [06:10] JacobSingh has joined the channel [06:10] matyr has joined the channel [06:11] newy has joined the channel [06:14] rchavik has joined the channel [06:14] rchavik has joined the channel [06:15] eydaimon has joined the channel [06:15] Opaque has joined the channel [06:16] matyr has joined the channel [06:24] mynyml has joined the channel [06:26] saschagehlich has joined the channel [06:28] viirya has joined the channel [06:28] JacobSingh has joined the channel [06:29] astropirate: If i use Redis with express does req.sessionStore give me an instance of node_redis? [06:33] e6nian has joined the channel [06:34] matyr_ has joined the channel [06:35] harth has joined the channel [06:37] e6nian: who use express here? I wanna fetch a remote url and render it,how to do this? My sample codes is here http://pastebin.com/ySHtQ4Z5 . this render 500. [06:39] sonnym has joined the channel [06:40] sreeix has joined the channel [06:40] matyr has joined the channel [06:41] seivan has joined the channel [06:45] e6nian: what a pity,nobody here? [06:45] bwinton has joined the channel [06:45] rook2pawn has joined the channel [06:46] JacobSingh has joined the channel [06:48] Xano has joined the channel [06:50] dr0id has joined the channel [06:50] dr0id: woohoo [06:50] chapel: lots of people here [06:50] dr0id: yeah! [06:52] zentoooo has joined the channel [06:52] dr0id has left the channel [06:52] mtsl has joined the channel [06:52] e6nian: chapel: would you please review my codes? I'm a newbie of node.js [06:54] astropirate: How does one make multiple DB calls simultaneously? << thats the easy part, how does one know they are all finished? [06:55] zkirill has joined the channel [06:56] chapel: post a link, and people can look at it e6nian [06:58] zentoooo has joined the channel [07:00] e6nian: chapel: http://pastebin.com/ySHtQ4Z5 [07:00] e6nian: chapel: thanks a lot [07:01] pkrumins has joined the channel [07:01] pkrumins: what's goin down #node.js! [07:01] SubStack: hackedy hackin' [07:01] SubStack: actually drawing some arts [07:02] pkrumins: alright! [07:02] ditesh|cassini has joined the channel [07:02] antimatter__ has joined the channel [07:04] chapel: SubStack: you should make a module that draws your art [07:04] chapel: :) [07:04] pkrumins: like that computer [07:04] pkrumins: in CHM [07:04] vipaca has joined the channel [07:04] vipaca has joined the channel [07:06] incon has joined the channel [07:06] k1ttty has joined the channel [07:07] samsonjs has joined the channel [07:07] chapel: e6nian: does the code work? [07:09] piranha has joined the channel [07:10] e6nian: chapel: not working. [07:10] Viriix has joined the channel [07:11] e6nian: chapel: I can console.log(body),but can't pass the body to the render:(. May be I use the wrong pattern. [07:14] chapel: well, from what I can tell, you have the rest of the code outside of the request callback [07:14] JacobSingh has joined the channel [07:16] bwinton has joined the channel [07:16] chapel: http://pastebin.com/Y3Zbnjtp [07:16] hackband has joined the channel [07:17] chapel: I haven't tested the code, but you had the if (result) code outside of the anonymous callback in request(), so the if (request) couldn't see request, because it is handled at a different time than the callback [07:17] vipaca has joined the channel [07:17] vipaca has joined the channel [07:18] chapel: most likely before, since request didn't exist, it just defaulted to else [07:18] chapel: and threw the error [07:18] e6nian: chapel: so,what's the solution? [07:18] chapel: I linked you to my changes [07:20] e6nian: chapel: ok,I've try it out:) [07:20] adambeynon has joined the channel [07:22] e6nian: chapel: ok,that's working. [07:22] eydaimon: is there any way to run system calls? [07:22] chapel: e6nian: do you know how callbacks and scope works? [07:22] e6nian: chapel: by the way, is this style of coding non-block? [07:22] e6nian: chapel: not actually. [07:23] chapel: non-block? you mean asynchronous ? [07:23] chapel: or non-blocking [07:23] e6nian: chapel: non-blocking [07:23] eydaimon: chapel: any idea? [07:23] chapel: using callbacks doesn't necessarily mean its non-blocking, you can still block the main process, but using callbacks is key, and most if not all node code is based around callbacks [07:24] chapel: eydaimon: what kind of system calls? [07:24] eydaimon: chapel: like I want to just run a traceroute and print the stdout to a socket or some such [07:24] zentoooo has joined the channel [07:25] chapel: like tracert/ [07:25] vipaca has joined the channel [07:25] chapel: eydaimon: http://nodejs.org/docs/v0.4.7/api/child_processes.html#child_process.exec [07:25] eydaimon: no, just like unix tracroute [07:25] e6nian: chapel: ok, may be when I dig into the more codes of node,I'll figure out what you mean. [07:26] eydaimon: chapel: yes, thanks :) [07:26] eydaimon: gah, I had even skimmed that page but missed it [07:26] e6nian: chapel: thanks for your help. [07:26] chapel: np [07:31] e6nian: is there any identity tools in vim for node.js [07:32] e6nian: what's your IDE/editor for node.js dev? [07:33] mikeal has joined the channel [07:34] JacobSingh has joined the channel [07:35] chapel: identity tools? [07:35] chapel: umm, I have been using textmate, but plan on learning vim eventually [07:36] noded has joined the channel [07:36] noded: can anyone help with this error? [07:36] e6nian: chapel: I use vim for my main editor for years. [07:36] noded: haroon@haroon-VAIO /cygdrive/c/projects/alohasrc/node $ ./configure Checking for program g++ or c++ : /usr/bin/g++ 0 [main] python 6172 C:\cygwin\bin\python.exe: *** fatal error - unable to remap \\?\C:\cygwin\lib\python2.6\lib-dynload\itertools.dll to same address as parent: 0x3C0000 != 0x3D0000 Stack trace: Frame Function Args 002891E8 6102796B (002891E8, 00000000, 00000000, 00000000) 002894D8 6102796B (6117 [07:37] chapel: noded: link a gist/pastie [07:37] noded: Frame Function Args 002891E8 6102796B (002891E8, 00000000, 00000000, 00000000) 002894D8 6102796B (6117EC60, 00008000, 00000000, 61180977) 0028A508 61004F1B (611A7FAC, 6124A6D4, 003C0000, 003D0000) End of stack trace 1 [main] python 6440 fork: child 6172 - died waiting for dll loading, errn o 11 /cygdrive/c/projects/alohasrc/node/wscript:232: error: could not configure a cxx compiler! [07:37] e6nian: noded: windows? I think it may be a not good choice [07:37] noded: lol... thanks [07:37] noded: any work arounds? [07:38] chapel: windows has issues, sorry out of my scope [07:38] chapel: and for next time, don't paste it in here [07:38] chapel: use http://gist.github.com [07:38] noded: oops... sorry! [07:38] Druide_ has joined the channel [07:38] chapel: or http://pastie.org [07:38] e6nian: noded: you can run a linux in a virtualbox. [07:39] e6nian: noded: windows is not recommonded for developing node.js [07:39] noded: I know, I may need to... I was trying to get something working fast, it would have been easier [07:39] noded: I am not trying to develop node.js, just compile it [07:40] noded: I dont have too much experience with node.js hence why I asked... [07:41] Bj_o_rn has joined the channel [07:42] robhawkes has joined the channel [07:45] MikhX has joined the channel [07:46] ph^ has joined the channel [07:47] msucan has joined the channel [07:48] chapel: noded: using linux is preferable to windows for node.js [07:48] newy_ has joined the channel [07:48] chapel: regardless if you are working on the core of node, or doing your own stuff [07:48] chapel: ryah (creator of node.js) seems to want to focus on windows for node.js, but that is all I know [07:49] brownies has joined the channel [07:51] sveimac has joined the channel [07:51] noded: @chapel thanks for the insight, to be honest I dont even really know what node is I am trying to compile an editor and I need it for that... [07:51] chapel: cloud9? [07:51] planetic: hello, the question about the express.js web framework. what is the best way to specify separate directory for partials? [07:54] planetic: And another question, is there any decent REPL integration for emacs? [07:57] sreeix has joined the channel [07:57] niftylettuce has joined the channel [07:57] niftylettuce: anyone know of an html5/node.js/MVC framework? [07:58] niftylettuce: or node.js mvc in general? [07:58] planetic: niftylettuce: express.js? [07:58] chapel: niftylettuce: express.js can be mvc [07:58] chapel: and html5 is up to you [07:59] niftylettuce: i for sure thought someone here had started an express.js mvc [07:59] niftylettuce: already had it all build out in a git repo [07:59] chapel: someone might have [08:00] chapel: but there is an mvc example [08:00] niftylettuce: u guys use mongodb or postgresql? [08:01] blaenk has joined the channel [08:03] ezmobius has joined the channel [08:04] noded has left the channel [08:04] mraleph has joined the channel [08:05] xSmurf has joined the channel [08:06] bockmabe has joined the channel [08:09] JacobSingh has joined the channel [08:09] coreb has joined the channel [08:09] unomi has joined the channel [08:09] jacobolus has joined the channel [08:15] indexzero has joined the channel [08:15] planetic: niftylettuce: i use couchdb) [08:16] indexzero: anyone know how to watch progress to a WriteableStream? [08:16] JacobSingh: Any opinions on brunch? seems cool, but also complex and the docs aren't making a lot of sense to me. [08:16] indexzero: planetic: couchdb ftw [08:18] planetic has left the channel [08:18] [AD]Turbo has joined the channel [08:19] planetic has joined the channel [08:19] Wizek has joined the channel [08:19] planetic: is there any express.js users? [08:20] zilch has joined the channel [08:21] planetic has left the channel [08:21] chapel: couchdb \o/ [08:22] chapel: indexzero: what kind of progress? [08:22] niftylettuce: large scale user based applications for mobile devices [08:22] niftylettuce: you would think node.js or apache? [08:22] niftylettuce: you would think mysql, postgre, etc..? [08:22] niftylettuce: i need advice [08:22] indexzero: chapel: I'm trying to output the byes written to a writeable stream (think watching progress on a file upload) [08:23] matyr_ has joined the channel [08:24] chapel: indexzero: this is old, and not really usable code, but should give you an idea http://debuggable.com/posts/streaming-file-uploads-with-node-js:4ac094b2-b6c8-4a7f-bd07-28accbdd56cb [08:25] chapel: var progress = (stream.bytesReceived / stream.bytesTotal * 100).toFixed(2); [08:25] indexzero: chapel: yeah, but I'm trying to output this progress on the client-side [08:26] indexzero: think file uploads from a CLI tool [08:26] chapel: browser or cli? [08:26] indexzero: chapel: working on a progress bar for uploads via jitsu [08:26] chapel: well do you know the full file size? [08:26] indexzero: chapel: yes https://github.com/nodejitsu/jitsu/blob/master/lib/jitsu/api/client.js#L91 [08:27] chapel: you would just count the buffers size, add it up, and use that for progress [08:27] JacobSingh has joined the channel [08:27] indexzero: chapel: right, but I'm having trouble getting progress from the WriteableStream [08:27] indexzero: I know when bytes come in from the readable stream, but not when they have been successfully written / drained on the WriteableStream [08:29] mike5w3c has joined the channel [08:29] sreeix has joined the channel [08:30] chapel: http://nodejs.org/docs/v0.4.7/api/streams.html#event_drain_ [08:30] chapel: I am sure you know that [08:30] chapel: I guess I am not sure what your problem is exactly [08:30] chapel: or have enough experience with that problem [08:31] autotron has joined the channel [08:33] autotron has left the channel [08:34] skm has joined the channel [08:35] blaenk has left the channel [08:37] pootietang has joined the channel [08:37] indutny has joined the channel [08:37] dve_ has joined the channel [08:38] chapel: indexzero: looking at .pipe in the node source, they will emit their events like normal [08:38] chapel: you could just do some checks [08:39] newy_ has joined the channel [08:39] indexzero: chapel: the problem seems that the WriteableStream isn't emitting drain correctly [08:39] chapel: hmm [08:39] chapel: could it be an issue with request? [08:40] hellp has joined the channel [08:43] brownies has joined the channel [08:46] sechrist_ has joined the channel [08:47] JacobSingh has joined the channel [08:47] pdelgallego has joined the channel [08:48] tmzt has joined the channel [08:49] jwl: how do you check if a path is relative or absolute? [08:49] jwl: cause i have to throw an error if a relative path is passed [08:50] killfill_ has joined the channel [08:51] ronald has joined the channel [08:51] chapel: jwl: http://nodejs.org/docs/v0.4.7/api/path.html#path.normalize [08:52] chapel: that could take care of them for you [08:53] rottenbanana has joined the channel [08:53] saikat has joined the channel [08:53] rottenbanana: anyone tried using the knox module [08:54] rottenbanana: i keep getting the following response when trying to upload a file: "The request signature we calculated does not match the signature you provided. Check your key and signing method." [08:54] chapel: hmm maybe not jwl [08:54] jwl: chapel: yeah [08:55] jwl: i think i could just check if it starts with / [08:55] JacobSingh has joined the channel [08:55] chapel: well normalize works for some stuff [08:55] chapel: like ./blah.js will equal blah.js [08:55] zkirill has joined the channel [08:56] jwl: i have to pass an absolute path [08:56] jwl: so i can just check / maybe [08:56] chapel: /Users/chapel/../chapel/ will = /Users/chapel/ [08:56] jwl: if its not starting with / then its not an absolute one [08:57] jwl: yeah but that is not the ase [08:57] jwl: case [08:57] jwl: i want to check is a path absolute or relative [08:57] chapel: yeah [08:57] chapel: well just check for / [08:57] chapel: or [08:57] chapel: use path.resolve [08:58] chapel: http://nodejs.org/docs/v0.4.7/api/path.html#path.resolve [08:58] ditesh|cassini has joined the channel [08:58] chapel: if you feed it relative paths, it will give you an absolute path [08:59] jwl: chapel: okay [08:59] chapel: var test = path.resolve('./test.js'); // '/full/dir/to/test.js' [08:59] jwl: the problem is that i am calling a function to pass a relative path [08:59] chapel: ? [08:59] jwl: eg. createDir('new'); [09:00] jwl: no this [09:00] jwl: createDir('new/dir'); [09:00] jwl: and that function is in another file .. so it will create new/dir from its location [09:00] jwl: not from the file i called it [09:00] jwl: you get me= [09:00] jwl: ? [09:00] chapel: oh [09:00] jwl: i dont know how to solve this [09:01] jwl: so i thought .. you can only pass an absolute path into the function .. if you throw relative then it will throw an error [09:01] chapel: http://nodejs.org/docs/v0.4.7/api/fs.html#fs.mkdir [09:01] chapel: not using that? [09:01] tobmaster has joined the channel [09:01] jwl: that function was just a dummy function [09:01] jwl: the concept is the same [09:02] jwl: createApp("windows") .. then i want it to create from that location .. not from the location where the function is [09:02] jwl: maybe there is a way to get the calling file? [09:02] jwl: it should work somehow [09:02] chapel: mkdir works with relative paths [09:03] chapel: I just tested it using node repl [09:03] jwl: yeah but im not talking about the built in functions .. im creating my own functions [09:03] niftylettuce: anyone here want a few hours of work tomorrow (Monday) to help me finish a node.js project? [09:03] chapel: when using mkdir, it makes it relative to where the shell is currently at [09:03] niftylettuce: i pay well, PM me, yo [09:03] chapel: why make your own when there are ones that work [09:04] kkaefer has joined the channel [09:04] coreb: has anyone tried out alienvps? worringly cheap [09:04] jwl: create folder was just an example [09:04] coreb: *worryingly [09:05] chapel: jwl, well the fs module has everything you need, and it should be robust [09:05] niftylettuce: coreb: wow so cheap, why [09:05] chapel: I understand what you are trying to do [09:05] chapel: coreb: they are probably over selling [09:05] chapel: never trust companies that sell for too cheap [09:05] jwl: okay then [09:05] jwl: what about i have to create a folder then run it [09:06] jwl: hmm [09:06] jwl: what the hell am i talking about =) [09:06] jwl: okay lets try the functions and see if i need anything else [09:06] rottenbanana: anyone experienced a similar problem using knox? getting a "SignatureDoesNotMatch" res from amazon [09:07] eb4890 has joined the channel [09:08] coreb: what vps hosts are you guys using for node stuff? [09:09] chapel: coreb: well linode works really well [09:10] coreb: chapel: yeah, they seem solid, but they charge a lot [09:13] SamuraiJack_ has joined the channel [09:13] JacobSingh has joined the channel [09:16] m64253 has joined the channel [09:16] Shrink has joined the channel [09:16] pt_tr has joined the channel [09:16] chapel: not really [09:16] chapel: seems great for the ease of use [09:17] coreb: have you used them yourself? [09:18] chapel: yep [09:18] chapel: but don't have any projects up that need hosting [09:18] chapel: indexzero: any luck? [09:18] indexzero: chapel: yeah, thanks [09:19] chapel: awesome, I will be using your cli tool soon [09:19] Gruni has joined the channel [09:19] chapel: is the web interface up to snuff yet? [09:22] gazumps has joined the channel [09:23] zilch has joined the channel [09:26] matyr has joined the channel [09:29] jwl: how do i copy folders in node.js+ [09:31] matyr has joined the channel [09:31] bojicas has joined the channel [09:32] chapel: well I don't see a built in copy command [09:32] mike5w3c_ has joined the channel [09:32] chapel: you could use child and exec to do cp [09:33] chapel: or write a cp function using fs.read then write [09:33] djcoin: Hi all [09:33] chapel: hola djcoin [09:33] jetienne has joined the channel [09:33] skm has joined the channel [09:33] djcoin: :) [09:34] djcoin: Node.js give me the strength to geek, my gf does not like that [09:34] djcoin: damnb [09:35] chapel: lol [09:35] McConnell has joined the channel [09:35] chapel: she doesn't like you geeking out? [09:36] fawek has joined the channel [09:36] djcoin: She does but she was away for the WE and today in france is still a bank holiday, so i wanted to geek a little more, hard time coming :) [09:36] hackband has joined the channel [09:36] rottenbanana has left the channel [09:37] zentoooo has joined the channel [09:37] jwl: anyone knows how i copy one folder to another with node.js? [09:38] chapel: a whole folder? [09:38] jwl: yeah [09:39] jwl: seems like it would be a good function to have [09:39] djcoin: exec('cp', 'r') stuff :b [09:39] chapel: well my advice still stands, you can use the built in tool cp, or you can write a function using node [09:39] jwl: )( [09:39] chapel: its a matter of what you are trying to do, and what matters [09:39] jwl: chapel: you mean built in "cp" on linux [09:39] chapel: it probably would be easiest to just use cp [09:39] chapel: yeah [09:39] jwl: node.js has no cp [09:39] chapel: like djcoin said [09:39] chapel: I know jwl [09:39] wereHamster has joined the channel [09:40] vdemedes has joined the channel [09:40] chapel: maybe someone needs to add it :P [09:40] jwl: okay then .. linux cp it is [09:40] vdemedes: hi all [09:40] jwl: a little bug ugly though =) [09:40] jwl: bit [09:40] chapel: jwl: sure [09:40] chapel: but sometimes it matters more that it works [09:40] chapel: and cp is solid [09:40] chapel: hola vdemedes [09:41] vdemedes: I'm curious, are there any ORM for Redis like Mongoose for MongoDB? [09:42] jwl: were is the exec command [09:43] JacobSingh has joined the channel [09:43] d0k has joined the channel [09:44] jwl: they removed exec? http://nodejs.org/docs/v0.4.7/api/process.html [09:44] saikat has joined the channel [09:45] chapel: jwl: child [09:45] jwl: ah [09:45] jwl: damn =) [09:45] mike5w3c has joined the channel [09:48] JacobSingh has joined the channel [09:50] beejeebus has left the channel [09:53] onre_ has joined the channel [09:54] MattJ has joined the channel [09:56] codetonowhere has joined the channel [09:58] onre_ has joined the channel [10:04] pig has joined the channel [10:04] planetic has joined the channel [10:04] vuliev has joined the channel [10:05] planetic: Is there module for express to load templates(views) from database and not from fs? [10:07] visa has joined the channel [10:08] JacobSingh_ has joined the channel [10:09] pig has joined the channel [10:09] Bonuspunkt has joined the channel [10:09] onre has joined the channel [10:13] dve_ has joined the channel [10:15] onre_ has joined the channel [10:16] autotron has joined the channel [10:16] zilch: what is the sweetest way to JSONify something ? [10:16] zilch: Stringify ? [10:16] autotron: to create a string ? [10:16] SubStack: v8: JSON.stringify([1,2,3]) [10:16] v8bot: SubStack: "[1,2,3]" [10:17] autotron: or turn a string into an object ? [10:17] iFire has joined the channel [10:19] zilch: I have a file which contain word ( a word on each line ) and I want to send an output as .json file .. [10:19] zilch: Looking for the succinct way , so asked [10:19] zilch: looks stringify is way to go [10:20] insin has joined the channel [10:24] andersjanmyr has joined the channel [10:24] vdemedes has joined the channel [10:26] sendark has joined the channel [10:26] onre_ has joined the channel [10:28] ejardim has joined the channel [10:29] tim___ has joined the channel [10:31] pig has joined the channel [10:32] mike5w3c has joined the channel [10:34] zilch: in express framework how we out arrange for the content negotiation ? [10:34] zilch: e.g abc.json should send json output .. [10:35] jarek has joined the channel [10:35] jarek has joined the channel [10:36] ditesh has joined the channel [10:36] pig has joined the channel [10:36] jarek has joined the channel [10:36] dyer has joined the channel [10:37] djcoin: SubStack: hey, Substask, Im using your awesome dnode module. In the README you say this has many advantages, as: no need to make your own state machine. The protocol I have to set up is statefull, what did you have in mind with dnode when you say so about state machine ? Cause I have to use one. Thanks a lot [10:37] jacter has joined the channel [10:37] zilch: it is done automatically !! :p [10:37] jarek has joined the channel [10:37] jarek has joined the channel [10:38] Blackguard has joined the channel [10:38] onre_ has joined the channel [10:38] djcoin: I wanted to go on a state machine stuff like in oop and design patterns, but there must be some other way as you told me. Any fp folks is welcome on that :) [10:39] mtsl has joined the channel [10:40] jarek has joined the channel [10:40] jarek has joined the channel [10:41] pig has joined the channel [10:43] onre_ has joined the channel [10:45] SubStack: djcoin: I mean that you don't have to keep track of pending requests and responses as asynchronous events on the server fire [10:45] autotron has joined the channel [10:45] SubStack: you just pass a callback same as in node.js directly [10:46] mvitorino has joined the channel [10:46] pig has joined the channel [10:46] mikl has joined the channel [10:47] Twelve-60 has joined the channel [10:50] djcoin: Hm, okay. It seems a bit obscure to me at the moment. I was on my way to define a clear protocol. I think cb can be offcourse so powerful, yet for defining a protocol, and checking that the clients (maybe there are no checks in this case, or that the cb with the bounded variable does the check itself) seems a bit obscure to me. But i will give a try [10:50] djcoin: Thanks a lot for your help [10:51] k1ttty has joined the channel [10:53] matyr has joined the channel [10:54] onre_ has joined the channel [10:55] a2800276 has joined the channel [10:57] JianMeng1 has joined the channel [10:59] hackband has joined the channel [11:00] fairwinds has joined the channel [11:01] ditesh has joined the channel [11:01] ngs has joined the channel [11:03] ngs has joined the channel [11:05] jacter has left the channel [11:08] onre has joined the channel [11:10] Country has joined the channel [11:11] justinTNT_ has joined the channel [11:11] justinTNT_: ckeditor+node.js? [11:12] vdemedes has left the channel [11:12] deedubs has joined the channel [11:12] JacobSingh has joined the channel [11:13] ngs has joined the channel [11:13] onre_ has joined the channel [11:15] JacobSingh_ has joined the channel [11:17] mischief has joined the channel [11:19] mischief has joined the channel [11:20] mischief has joined the channel [11:20] onre_ has joined the channel [11:20] autotron has joined the channel [11:24] onre_ has joined the channel [11:24] okuryu has joined the channel [11:27] liar has joined the channel [11:28] Lorentz has joined the channel [11:29] geochap has joined the channel [11:33] daglees has joined the channel [11:34] Killerbang has joined the channel [11:35] nailer has joined the channel [11:35] onre_ has joined the channel [11:36] matjas has joined the channel [11:37] ngs has joined the channel [11:41] tiemonster has joined the channel [11:42] stagas: SubStack++ [11:42] v8bot: stagas has given a beer to SubStack. SubStack now has 25 beers. [11:42] stagas: hashish rulez [11:42] pig has joined the channel [11:42] jacobolus has joined the channel [11:43] Xano has joined the channel [11:43] stagas: saves me so much typing [11:45] jacter has joined the channel [11:46] onre_ has joined the channel [11:46] FireFly has joined the channel [11:47] SubStack: stagas: hooray! [11:47] SubStack: I hate typing too [11:47] pig has joined the channel [11:48] thalll has joined the channel [11:49] autotron has joined the channel [11:50] stagas: I mean this should be core js, I use it in all my projects now [11:52] chapel: give me an example of it being used [11:52] SubStack: chapel: pick one of my modules at random [11:52] pig has joined the channel [11:52] SubStack: I also use it everywhere [11:52] chapel: well trying to see what stagas uses it for [11:52] chapel: :) [11:52] SubStack: ah [11:53] stagas: chapel: well whenever I want to iterate a hash object, I use .map and .forEach most [11:54] fly-away has joined the channel [11:54] devdazed has joined the channel [11:54] Wizek_ has joined the channel [11:54] lukegalea has joined the channel [11:56] stagas: chapel: ie I now did paths = Hash.map(paths, function(pathname) { return path.join(root, pathname) }) [11:57] chapel: hmm [11:57] SubStack: or you could Hash.map(paths, path.join.bind(null, root)) [11:57] chapel: :P [11:57] pig has joined the channel [11:58] onre_ has joined the channel [12:01] kriszyp has joined the channel [12:01] skohorn has joined the channel [12:02] herbySk has joined the channel [12:02] pig has joined the channel [12:05] paolodedios has joined the channel [12:07] nailer has joined the channel [12:09] stotes has joined the channel [12:12] dyer has joined the channel [12:13] davidcoallier has joined the channel [12:14] Killerbang has joined the channel [12:15] djcoin: Is there a way to get a prompt in the context [12:15] djcoin: without using a debugger ? [12:15] djcoin: i see repl [12:16] djcoin: but i have no context in it [12:16] sirkitree has joined the channel [12:17] Lorentz has joined the channel [12:19] pig_ has joined the channel [12:20] markwubben has joined the channel [12:20] zilch: I want to read a line in a file using awk command 'awk 'NR==15763{print;exit}' gu.txt', should I use exec [12:20] zilch: or should I read the stream ? [12:20] gdusbabek has joined the channel [12:22] djcoin: you should do both no ? [12:24] jscheel has joined the channel [12:24] jscheel has joined the channel [12:24] pig has joined the channel [12:24] onre has joined the channel [12:25] zilch: djcoin, oh ! I am asking if should use readstream to actually find that line ? [12:25] ezl has joined the channel [12:25] zilch: or should rely on awk to do that job for me and read the output of awk command ? [12:27] djcoin: oh sorry [12:27] djcoin: you program is simple enought [12:28] djcoin: but i have no experience, so I wont make advice you :) [12:28] djcoin: or you could use Sed [12:28] djcoin: there are node bindings [12:28] djcoin: in sed its just : sed '15673p' [12:28] djcoin: zilch: ^ [12:29] pig has joined the channel [12:29] djcoin: Or maybe a fs.seek or whatever [12:29] djcoin: but I guess seek does not operate on lines [12:29] zilch: djcoin, awk is faster than sed, right ? [12:29] djcoin: dont know [12:29] djcoin: I guess awk is overkill for this simple case [12:30] zilch: djcoin, use 'time' command to test it [12:31] djcoin: oh your script actually means : read until 15674 ? [12:31] JusticeFries has joined the channel [12:32] djcoin: i thought of linenumber 15673 [12:32] sledge has joined the channel [12:32] djcoin: sed -n 1,6p tutu [12:32] djcoin: where 6 if the line number, well [12:32] djcoin: whatever :b [12:33] djcoin: anyone having using prompt ? [12:33] djcoin: from util ? [12:34] pig has joined the channel [12:34] JacobSingh has joined the channel [12:35] djcoin: from npm [12:35] djcoin: sorry [12:37] shaunau_ has joined the channel [12:38] a2800276 has joined the channel [12:38] tfe_ has joined the channel [12:39] pig has joined the channel [12:39] mischief has joined the channel [12:40] xSmurf has joined the channel [12:44] pig has joined the channel [12:45] mischief has joined the channel [12:45] jtrally has joined the channel [12:46] jtrudeau has joined the channel [12:47] danfo has joined the channel [12:50] sunblush has joined the channel [12:53] jdavenport has joined the channel [12:57] mischief has joined the channel [12:57] brez__ has joined the channel [12:58] fay has joined the channel [13:02] pdelgallego has joined the channel [13:02] djcoin: I have a rather simple question, I see that npm has a "prompt" method [13:02] djcoin: but I do not know how to import it, can I ? [13:03] djcoin: https://github.com/isaacs/npm/blob/master/lib/utils/prompt.js [13:03] http402 has joined the channel [13:03] mischief has joined the channel [13:05] seivan has joined the channel [13:05] sirkitree has joined the channel [13:07] jlecker has joined the channel [13:08] fermion has joined the channel [13:10] davidsklar has joined the channel [13:10] bshumate has joined the channel [13:10] bshumate has joined the channel [13:10] unomi has joined the channel [13:11] Xano has joined the channel [13:11] beejeebus has joined the channel [13:12] V1 has joined the channel [13:12] jaket has joined the channel [13:12] aheckmann has joined the channel [13:13] tiagoa has joined the channel [13:14] cbibler_ has joined the channel [13:14] justinTNT: out [13:14] justinTNT has left the channel [13:15] aheckmann has left the channel [13:15] aheckmann has joined the channel [13:16] jano has joined the channel [13:17] rfay has joined the channel [13:17] JusticeFries has joined the channel [13:20] huang47 has joined the channel [13:20] c4milo has joined the channel [13:20] amacleod has joined the channel [13:23] avalanche123 has joined the channel [13:23] demastrie has joined the channel [13:27] huang47 has left the channel [13:27] k1ttty has joined the channel [13:27] demastrie has left the channel [13:28] dnolen has joined the channel [13:29] galaxywatcher has joined the channel [13:29] galaxywatcher has joined the channel [13:29] SSgtSpoon|work has joined the channel [13:30] stagas: whee another tiny lib: https://github.com/stagas/confu [13:30] dipser has joined the channel [13:30] V1: require('./conf/config') > all configuration loaders [13:31] fly-away has joined the channel [13:32] flippyhead has joined the channel [13:33] fangel has joined the channel [13:34] mbrevoort has joined the channel [13:34] seangaffney has joined the channel [13:36] onre has joined the channel [13:37] asdfsafdsa: but then u have to put everything in module.exports [13:37] stagas: and still do path resolving by hand [13:37] brianc has joined the channel [13:38] rworth has joined the channel [13:38] stagas: and only node could read it, where .json is portable [13:40] stagas: I was rewriting this code every time at the top of my apps, now it's a one-liner :P [13:40] asdfsafdsa: i like yaml better [13:42] mikedeboer has joined the channel [13:43] c4milo has joined the channel [13:43] eventi has joined the channel [13:45] nciagra has joined the channel [13:45] brolin has joined the channel [13:46] sunblush has joined the channel [13:46] mickaelz has joined the channel [13:46] onre_ has joined the channel [13:47] Zeta has joined the channel [13:49] thomblake has joined the channel [13:49] sivy has joined the channel [13:51] matjas has joined the channel [13:52] amacleod has joined the channel [13:54] dcampano has joined the channel [13:54] taf2: hey all check this example out: https://github.com/taf2/fork.node/blob/master/test/parent_child_talk.js [13:54] jano has joined the channel [13:54] taf2: it demonstrates using node.fork to fork a child process and send data back and forth between the parent and child processes [13:55] taf2: the parent and child communicate over a pipe [13:55] taf2: so, the parent could fork a child process that might be used to crunch some numbers - but not block [13:56] alexandere has joined the channel [13:56] taf2: hoping this might be interesting and useful... [13:57] geochap has joined the channel [13:58] onre has joined the channel [13:58] taf2: i've got the two processes running in an infinite loop now to test... i'm seeing no memory growth and they're staying stable at 50% cpu... [13:59] taf2: so... my thought is this should be stable for simple message passing [13:59] stagas: taf2: this is interesting but it would be useful if you would wrap it into a module for us to use :) [13:59] Swimming_bird has joined the channel [14:00] taf2: stagas, yeah, i'm definitely going to work on a higher level API i was thinking more like the Worker's API [14:00] strmpnk has joined the channel [14:00] eee_c has joined the channel [14:00] taf2: but first i had to work out the low level details... [14:00] taf2: also, i've never created a node.js module for others to use :) [14:01] timmywil has joined the channel [14:03] mike5w3c has joined the channel [14:03] onre_ has joined the channel [14:04] stagas: taf2: go for it :) [14:04] nefD has joined the channel [14:05] taf2: definitely - i really like the c++ interface for node.js v8 is ice [14:05] taf2: nice* [14:06] brianc has joined the channel [14:06] nibblebot has joined the channel [14:09] JianMeng1 has joined the channel [14:10] onre_ has joined the channel [14:10] bingomanatee has joined the channel [14:13] sivy has joined the channel [14:15] onre_ has joined the channel [14:16] gde33 has joined the channel [14:17] hij1nx has joined the channel [14:20] onre_ has joined the channel [14:20] Know1edge has joined the channel [14:21] Gigawattz has joined the channel [14:22] alek_br has joined the channel [14:23] jacksonmills has joined the channel [14:24] Corren has joined the channel [14:24] sub_pop has joined the channel [14:25] onre_ has joined the channel [14:26] BillyBreen has joined the channel [14:31] rpj8 has joined the channel [14:32] niftylettuce has joined the channel [14:32] niftylettuce: ce_, ...we'd need to know a _lot_ more about this game. Are you building a custom wire protocol? Is it more twitchy in nature? How much does response time matter to the clients (vs to what extent can those c [14:32] niftylettuce: woooops [14:32] niftylettuce: for mass multiplayer mobile game... would you guys think node.js/mongodb/expressjs or apache/Zend?? [14:33] niftylettuce: i asked in #html5, they said to come here [14:34] hij1nx: niftylettuce: node is great for realtime, so possibly [14:34] mraleph has joined the channel [14:35] hij1nx: niftylettuce: couch is going to give you great mobile replication [14:35] chapel: node.js is good for realtime or lots of updates [14:35] chapel: well hij1nx that is if you use the mobile stuff [14:35] niftylettuce: hij1nx: yeah I was interested in couchdb, what is difference b/w couch and mongo? [14:35] blowery has left the channel [14:36] chapel: if its browser based, then he doesn't benefit from that [14:36] onre_ has joined the channel [14:36] niftylettuce: yeah its HTML5 [14:36] niftylettuce: not native [14:36] hij1nx: couch is great for single instance durability, but mongo is great for HUGE amounts of data [14:36] hellp has joined the channel [14:36] niftylettuce: then I would need mongo [14:36] chapel: mongo is more like mysql, if you think about it in how they are used (not the actual tech) [14:36] hij1nx: couch has a native rest API [14:36] mraleph: indexzero: Tuesday April 25, 2011 <- no more doubts, nodejitsu is run by people from other planet :-) [14:37] hij1nx: mraleph: eh? [14:37] mraleph: well maybe I am from other planet but today is Monday [14:37] tmpvar has joined the channel [14:37] F1LT3R has joined the channel [14:37] niftylettuce: hij1nx: what are you suggesting reg'd the native restAPI [14:37] mraleph: 25 april 2011 [14:37] nciagra has joined the channel [14:38] hij1nx: mraleph: heh, i just noticed that, but what else lead you to believe that we are 'from another planet'? [14:38] mraleph: different calendar [14:38] mraleph: well maybe parallel universe [14:38] mraleph: or time travelers from the future [14:38] hij1nx: niftylettuce: no you'd want to use an node API library [14:39] mraleph: never mind — russian humour [14:39] jamesarosen has joined the channel [14:39] niftylettuce: hij1nx: I was thinking express.js, node.js, mongodb, html5, sass/haml, jade [14:39] mikl has joined the channel [14:39] mikl has joined the channel [14:40] hij1nx: niftylettuce: express would have a lot of overhead for what you're doing, you may want to try journey [14:40] chapel: depends again on what you are doing [14:40] niftylettuce: hij1nx: link to journey? [14:40] chapel: if you want a more robust client experience, you will want to make node lighter, and the client heavier [14:40] hij1nx: chapel: i think he's creating a game [14:40] chapel: `v git node journey [14:40] v8bot: chapel: An example of using Journey with Node-Static in node.js — Gist - https://gist.github.com/708119 [14:41] shanez has joined the channel [14:41] hij1nx: v8bot: nice ;) [14:41] v8bot: hij1nx: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [14:41] onre_ has joined the channel [14:41] niftylettuce: chapel: so you are suggesting using? [14:41] chapel: I know he is making a game, but what kind of game :P [14:42] hij1nx: i love a well written bot [14:42] chapel: well for a client heavy app, like a game, I would recommend node-browserify and dnode :) [14:42] chapel: `v git dnode [14:42] v8bot: chapel: substack/dnode - GitHub - https://github.com/substack/dnode [14:42] chapel: `v git browserify [14:42] v8bot: chapel: substack/node-browserify - GitHub - https://github.com/substack/node-browserify [14:42] SSgtSpoon|work has joined the channel [14:42] losing has joined the channel [14:43] hij1nx: niftylettuce: chapel is right, it sounds more like RPC would be more useful to you than a webserver with templating [14:43] niftylettuce: RPC? [14:43] chapel: remote procedure call [14:43] chapel: `v commands [14:43] v8bot: chapel: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support. [14:43] davidsklar has joined the channel [14:43] chapel: `v google rpc [14:43] v8bot: chapel: Remote procedure call - Wikipedia, the free encyclopedia - http://en.wikipedia.org/wiki/Remote_procedure_call [14:44] chapel: or [14:44] chapel: `v google rpc @ niftylettuce [14:44] v8bot: niftylettuce: Remote procedure call - Wikipedia, the free encyclopedia - http://en.wikipedia.org/wiki/Remote_procedure_call [14:44] chapel: :) [14:44] hij1nx: niftylettuce: i use dnode, i love it. [14:45] pig has joined the channel [14:45] jasong_at_apache has joined the channel [14:45] niftylettuce: so instead of server loading everything [14:45] niftylettuce: the client requests from server [14:45] niftylettuce: then the server responds with ?? [14:45] chapel: well [14:45] niftylettuce: dont get it? [14:46] chapel: its more than that [14:46] niftylettuce: can you xplain? [14:46] jakehow has joined the channel [14:46] chapel: dnode allows you to write functions on either the server or the client, or both, and both client and server have access to said functions [14:47] SubStack: chapel: http://browserling.com:9900/ [14:47] chapel: instead of on the server writing some function, have it output json as a result when the client requests a certain url, and on the client fetching the json then parsing it [14:47] niftylettuce: chapel: can you give me scenario using dnode vs something like just expressjs and node/connect? [14:47] chapel: nice SubStack [14:48] chapel: node/connect... connect is express, with less stuff [14:48] chapel: niftylettuce: check out SubStack's link [14:48] sivy has joined the channel [14:48] mtsl has joined the channel [14:49] chapel: SubStack: no way to run the example? [14:49] SubStack: not yet [14:50] chapel: oh, dont forget to remove and uncheck those boxes when you select a different example [14:50] pig has joined the channel [14:51] SubStack: oh hah [14:51] niftylettuce: ACTION the cat says meow [14:51] chapel: should make the header the background image too [14:51] Venom_X has joined the channel [14:51] chapel: and where is the frog? [14:51] SubStack: turtle [14:51] chapel: oh [14:51] Mrfloyd has joined the channel [14:51] chapel: yes turtle [14:52] onre_ has joined the channel [14:52] niftylettuce: so this is RPC? [14:52] chapel: its examples [14:52] chapel: using code [14:53] brianc: howdy [14:53] brianc: I got a few questions about DNS w/ node... [14:53] brianc: and DNS in general [14:53] chapel: shoot [14:54] brianc: does connecting to "localhost" require a dns lookup? (at least looking up the host file)? [14:54] mscdex: it shouldn't [14:55] brianc: Reason I'm asking is I'd like node-postgres to connect to any hostname but the libpq bindings do a blocking dns lookup...so I was thinking I could do the DNS lookup before creating the connection in libpq if a hostname was passed, and wanted to known if I should skip the node async dns lookup for localhost as well as ip addresses [14:55] sirkitre_ has joined the channel [14:55] pig has joined the channel [14:55] chapel: I wouldn't think so [14:56] brianc: basically: you want to connect to postgres? using 'localhost' or an ip address? go right ahead. Not using localhost or an ip address? Hold on one second while I use node to do the dns lookup on your host name so libpq doesn't block yer node process. [14:56] brianc: libpq supports async operation but it looks like much of the initial socket initialization and connection is blocking, so...trying to cut down on that [14:56] jpld has joined the channel [14:56] jpld has joined the channel [14:57] niftylettuce: chapel: this RPC (e.g. the browserling example) would be more efficient than simply node/express?? [14:57] SubStack: niftylettuce: express is another niche entirely [14:57] niftylettuce: chapel: I guess we could have a server running the game and another running the front-end of the site/registration/etc. [14:57] SubStack: niftylettuce: dnode plays nicely with express [14:58] chapel: what SubStack said [14:58] coreb: with jade, how do I do a default value for a non submitted locals variable? [14:58] EyePulp has joined the channel [14:58] niftylettuce: SubStack: the key component of dnode is that the client calls all the connections to server versus the server automatically doing it itself? [14:58] chapel: dnode is not mutually exclusive to express/connect [14:58] SubStack: niftylettuce: select express from the drop-down: http://browserling.com:9900/ [14:58] niftylettuce: e.g. on page load, the index file has DNode.connect, assuming that the client is the one dependent on connections??? [14:59] lessthanzero has joined the channel [14:59] Guest92586 has joined the channel [14:59] SubStack: niftylettuce: dnode.connect() just opens up a bidirectional channel on top of socket.io [14:59] niftylettuce: SubStack: meaning? [14:59] chapel: niftylettuce: the client connects to the server requesting the website, the server sends it html and js files, the js files have a bunch of functions including dnode that tell it to connect to the server, and then at that point, there can be a direct connection between server and browser that doesn't actually reload the page, like ajax, but much more robust and easier to code [15:00] SubStack: from which you can pass json data and functions which get wrapped transparently in order to respond intelligently to asynchronous events without having to roll your own dispatch system [15:00] niftylettuce: dispatch system? [15:00] kuya has joined the channel [15:00] pig has joined the channel [15:01] BillyBreen has joined the channel [15:01] hij1nx: mraleph: interesting, the date issue is actually a bug with creationix's "wheat" (the blogging software we use) [15:01] hij1nx: mraleph: doing a patch today maybe [15:02] brianc1 has joined the channel [15:02] niftylettuce: SubStack: this is very interesting, please explain further if possible [15:02] SubStack: niftylettuce: usually when you start passing bidirectional data around you've got to route that data to where it needs to go in your program [15:03] SubStack: that's what I mean by dispatch system [15:03] SubStack: in dnode you just call functions instead of passing data around directly [15:04] onre_ has joined the channel [15:04] mikl has joined the channel [15:04] mikl has joined the channel [15:05] pig has joined the channel [15:06] briznad has joined the channel [15:06] binaryjohn has joined the channel [15:06] niftylettuce: SubStack: and express can be integrated for MVC? [15:07] boaz has joined the channel [15:07] vipaca has joined the channel [15:07] vipaca has joined the channel [15:07] SubStack: niftylettuce: express is just a webserver [15:07] fumanchu182 has joined the channel [15:07] link has joined the channel [15:08] esundahl has joined the channel [15:08] SubStack: socket.io works fine on top of express and so does dnode [15:08] mikl_ has joined the channel [15:09] insin has joined the channel [15:10] pig has joined the channel [15:10] no-gooder has joined the channel [15:10] seyz has joined the channel [15:11] Opaque has joined the channel [15:11] link has joined the channel [15:11] niftylettuce: what is a good MVC framework/setup for node? [15:11] necromancer has joined the channel [15:12] no-gooder: is there any simple eventemitter working example which explains what it is? [15:13] m64253 has joined the channel [15:14] no-gooder has joined the channel [15:14] seyz: Hello guy, I'm using expressjs but I have a problem with javascript or nodejs or expressjs (I don't know) [15:14] necromancer has left the channel [15:14] seyz: here my piece of code : http://paste.pocoo.org/show/377908/ [15:14] chapel: no-gooder: http://nodejs.org/docs/v0.4.7/api/util.html#util.inherits that is an example [15:14] seyz: line 15: allProperties array always returns 0 length :-( Why ? [15:14] Bonuspunkt has joined the channel [15:15] chapel: because when console.log is called, the client.hgetall hasn't ran yet [15:15] stride: seyz: the console.log where you're reading .length is executed outside of the callback to hgetall, which is before hgetall even did something [15:16] seyz: Oh yes ! I see thanks [15:16] no-gooder: chapel, thanks [15:17] seyz: but how can I render my view "properties/index" into the hgetall callback ? [15:17] baudehlo has joined the channel [15:18] onre_ has joined the channel [15:18] pig_ has joined the channel [15:18] seyz: example: if I write "console.log(allProperties.length)" into the hgetall function callback... I will have a lot of message, but I want once (at the end), do u understand ? [15:19] chapel: seyz: no guarantee this works, but roughly that is what you want to do, or something similar http://paste.pocoo.org/show/377913/ [15:20] seyz: chapel, hmmm I see, but is it beautiful ? [15:20] chapel: lol [15:20] chapel: I would learn the basics before I worry about having beautiful code [15:20] chapel: that and I personally think all my code is ugly, and I have heard most coders think their code is ugly [15:20] seyz: No, I want to learn the basics and write some beautiful code :-) At the same time :-) [15:21] dambalah has joined the channel [15:21] seyz: the problem is that if I have 1000 000 data... The callback tests 100 000 times if objlen <= 0 [15:21] seyz: :-( [15:22] esundahl has left the channel [15:22] jgv has joined the channel [15:22] vier has joined the channel [15:22] rfay has joined the channel [15:23] onre_ has joined the channel [15:23] jacksonmills_ has joined the channel [15:23] vier: hey Node.js, i dont know much about this, but was curious, am i able to run the node server in a clients webpage? [15:24] EyePulp: vier: no - it's server based [15:24] vier: EyePulp: thanks, i thought so, but was hopeful, as i would like some way of allowing people to connect to clients via html/Ajax etc [15:25] EyePulp: vier: though maybe you could write a java applet that makes a VM to run node under it. There might be some performance impact however. *might*. [15:26] vier: EyePulp: ahuh, sounds pretty complex though [15:26] EyePulp: heh - it would be a tremendous waste of time. it's like asking if you can run apache in a browser. [15:27] baudehlo: wait, isn't connecting to node.js via Ajax exactly what most people do with it? [15:27] baudehlo: they just run it on the server not on the client. [15:27] EyePulp: baudehlo: he wants to run node inside a browser. inside. [15:27] EyePulp: (if I read right) [15:27] brianm has joined the channel [15:27] brianm has joined the channel [15:27] baudehlo: Yeah, but I just think (hope) his/her thinking is wrong. [15:28] EyePulp: I would assume it is, or his understanding of node is just a bit off. [15:28] vier: EyePulp: yes, you read right, i was hoping for some method of connecting to a client [15:28] baudehlo: Sometimes people ask the wrong questions :) [15:28] chapel: seyz: again no word if this works, but conceptually it should http://paste.pocoo.org/show/377921/ [15:28] baudehlo: vier: what's wrong with Ajax to the server (which would be node)? [15:28] EyePulp: vier: node is a server. your browser is a client. Your client can connect to a server, and node can be that server. [15:28] pig has joined the channel [15:28] trotter has joined the channel [15:29] vier: baudehlo: EyePulp: yes, i understand, but i want a client to connect to another client [15:29] brez_ has joined the channel [15:29] vier: basicly to allow file x to be transfered from client a to client b without going through the server [15:29] EyePulp: vier: that is problematic via web browsers. [15:29] baudehlo: vier: security wouldn't allow that. [15:29] vier: yes, except html5 web sockets allow cross-domain requests [15:29] dmcquay has joined the channel [15:30] vier: and