[00:00] bigfooterfella: does it usually take awhile to get node.js to compile? I been compiling for the last hour or so [00:00] willwhit_ has joined the channel [00:00] DTrejo has joined the channel [00:00] bnoordhuis: bigfooterfella: depends on how much memory and how many cores you have [00:00] erictj: bradleymeck: that did it, thx. (I had my repl.start().context() all chained together. Got it now) [00:01] bnoordhuis: if you have more than one core, run ./configure --jobs=n-of-cores [00:01] bigfooterfella: ok, thanks...I am running an I5 machine, but I am installing/compiling inside of a virtual machine [00:04] fson_ has joined the channel [00:04] geetarista has joined the channel [00:04] willwhite has joined the channel [00:06] bigfooterfella: how well does it do with multi-threading? [00:07] dguttman has joined the channel [00:07] bnoordhuis: bigfooterfella: node? [00:07] balaa has joined the channel [00:08] bigfooterfella: yeah, I apologize for the oddity of my questions...just getting my feet wet with it [00:08] willwhit_ has joined the channel [00:08] guidocalvano has joined the channel [00:08] bnoordhuis: bigfooterfella: the javascript part of node is single-threaded [00:08] willwhit_ has joined the channel [00:08] bnoordhuis: it's driven by the event loop [00:09] bnoordhuis: disk i/o and other blocking things are farmed out to a thread pool [00:09] k1ttty has joined the channel [00:13] level09 has joined the channel [00:14] bigfooterfella: I am sort of amazed by how dependent it is on the python libraries...I suppose java was thrown out from the get go hah [00:14] willwhite has joined the channel [00:14] Murvin has joined the channel [00:14] [[zzz]] has joined the channel [00:15] migimunz2: hey nail_ [00:15] migimunz2: shit, scrap that [00:15] baudehlo has joined the channel [00:15] migimunz2: hey Nexxy? [00:15] willwhite has joined the channel [00:16] Nexxy: migimunz2, ? [00:16] willwhite has joined the channel [00:17] foxkid has joined the channel [00:18] AvianFlu has joined the channel [00:18] bigfooterfella: bnoordhuis: thanks for the input man [00:18] bnoordhuis: bigfooterfella: my pleasure [00:18] bigfooterfella: quit [00:18] bigfooterfella: oops :) [00:19] bigfooterfella has left the channel [00:19] spcshpopr8r has left the channel [00:19] gtramont1na has joined the channel [00:19] willwhite has joined the channel [00:20] foxkid: hi all. I am learning how to use node.js, but I have one question: Can someone show me some links where is node.js really been used? [00:20] jesusabdullah: You mean, in the Real World foxkid? [00:21] foxkid: I am asking it, because all examples I see seems equal. [00:21] foxkid: yes. in real world, my friend. [00:21] mape: http://transloadit.com/ [00:21] mape: http://voxer.com/ [00:21] mape: http://www.uber.com/ [00:21] jesusabdullah: Also, learnboost, nodejitsu and browserling [00:21] foxkid: oops, checking it out right now. [00:21] geetarista: https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node [00:22] jesusabdullah: I believe Yahoo also uses it internally [00:22] SubStack: and facebook [00:22] foxkid: Can I use node.js like an script language? Something like #!/bin/node ? [00:22] chilts: yep [00:23] foxkid: nice. [00:23] erictj has left the channel [00:23] AAA_awright has joined the channel [00:24] socketio\test\82 has joined the channel [00:25] willwhite has joined the channel [00:26] CIA-65: node: 03Ryan Dahl 07master * r3a219de 10/ lib/net_uv.js : net_uv: resume on closed net.Socket shouldn't crash - http://bit.ly/riwt58 [00:26] CIA-65: node: 03Ryan Dahl 07master * r2c11718 10/ test/simple/test-child-process-double-pipe.js : Add some debug output to test-child-process-double-pipe - http://bit.ly/nojcBR [00:26] CIA-65: node: 03Ryan Dahl 07master * rfb7faef 10/ (3 files in 3 dirs): Upgrade libuv to d358738 - http://bit.ly/ovaMB1 [00:27] bradleymeck: foxkid webos alone is intimidating [00:28] willwhit_ has joined the channel [00:28] rfay has joined the channel [00:31] seivan has joined the channel [00:33] chapel: SubStack: http://blog.milewise.com/post/8792373531/how-we-used-node << they mentioned browserify :) [00:35] tristanseifert has joined the channel [00:36] CStumph has joined the channel [00:38] mosen has joined the channel [00:38] willwhite has joined the channel [00:40] bitwise has joined the channel [00:40] jbrokc has joined the channel [00:40] willwhit_ has joined the channel [00:41] scott_gonzalez has joined the channel [00:42] nerdfiles has joined the channel [00:42] nerdfiles has left the channel [00:43] indexzero has joined the channel [00:44] neoesque has joined the channel [00:44] CIA-65: libuv: 03Bert Belder 07master * rb13f46f 10/ .gitignore : Add msvs build products to .gitignore - http://bit.ly/ogS804 [00:44] CIA-65: libuv: 03Bert Belder 07master * r2d40e35 10/ (src/win/pipe.c test/echo-server.c): Style - http://bit.ly/oXEE6t [00:44] CIA-65: libuv: 03Bert Belder 07master * ra2ee485 10/ (5 files in 2 dirs): Windows: dynamically load some ntdll functions - http://bit.ly/pMcdMJ [00:44] CIA-65: libuv: 03Bert Belder 07master * r89aa407 10/ src/win/pipe.c : Windows: try to avoid using the thread pool for pipe shutdown - http://bit.ly/q4vBrq [00:44] CIA-65: libuv: 03Bert Belder 07master * r4c63f55 10/ src/win/pipe.c : Windows: much better pipe_pound_1000 results - http://bit.ly/nisswL [00:45] CIA-65: libuv: 03Bert Belder 07funnel * r8cd362b 10/ (src/win/core.c src/win/internal.h): iocp funnel test - http://bit.ly/oAmYQL [00:46] bitwise_: anyone know why building jquery from github fails with node 0.5.4-pre [00:46] cjm has joined the channel [00:46] AaronMT has joined the channel [00:46] AaronMT has left the channel [00:46] jetienne: bitwise_: i dunno, have you tried with the stable version ? [00:47] balaa has joined the channel [00:47] Sorella_ has joined the channel [00:48] willwhite has joined the channel [00:49] bitwise_: no.. it actually does spit out a .min.js so i might be ok [00:50] zilch has joined the channel [00:50] alnewkirk has joined the channel [00:50] jetienne: bitwise_: cool, just wanted to make sure you were aware you run an unstable version [00:51] bitwise_: its more stable than the stable [00:52] jetienne: bitwise_: really ? [00:52] level09 has joined the channel [00:53] jetienne: well lets not argue, you are clearly aware of it [00:54] bitwise_: yeah. there is a major bug that is crashing IE8 [00:54] bitwise_: in 1.6.2 [00:54] bitwise_: https://github.com/jquery/jquery/commit/5c4a9cc001fcd803efa65ff95571c72cbdafbe69/ [00:55] jj0hns0n has joined the channel [00:55] curtischambers has joined the channel [00:55] CIA-65: libuv: 03Ben Noordhuis 07master * r7b5d28e 10/ config-unix.mk : build: use -pthreads on sunos, -pthread everywhere else - http://bit.ly/oAxUhc [00:55] jetienne: bitwise_: oh ok miscommunication, i was talking about node version, not jquery one [00:55] willwhit_ has joined the channel [00:56] bitwise_: ah cool. [00:56] bitwise_: so yeah, i did try node stable (0.5.3) fwiw [00:58] AvianFlu: that's not stable, that's unstable [00:58] AvianFlu: stable is 0.4.x [01:04] sonnym has joined the channel [01:04] unlink has joined the channel [01:04] unlink has joined the channel [01:04] willwhite has joined the channel [01:06] soapyillusions has joined the channel [01:11] Swizec_ has joined the channel [01:13] maushu: Is it possible to get the name of the object from where a function is called? [01:13] maushu: In side the function called, I mean. [01:13] Tobsn has joined the channel [01:14] jetienne: arguments.callee or something [01:14] jetienne: not sure it is still supported [01:14] gkatsev: deprecated [01:15] jetienne: https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope/arguments/caller [01:15] AvianFlu: there's a Function.prototype.caller, no? [01:15] maushu: Lets see. [01:15] BoarK has joined the channel [01:16] jetienne: http://stackoverflow.com/questions/280389/how-do-you-find-out-the-caller-function-in-javascript [01:17] maushu: Hmm, I think I want something even weirder. [01:17] mape: isaacs: https://gist.github.com/675a4f8773aa0ecb1fe3 is that me doing something bad? [01:17] maushu: var a = { hi: function() { console.log(); } }; [01:17] baoist has joined the channel [01:18] maushu: a.hi() should return "a". [01:18] maushu: That is what I mean. [01:18] mscdex: can't get that afaik [01:18] sniper506th has joined the channel [01:18] maushu: I know that sounds completely crazy. [01:18] jetienne: same opinion here [01:19] jetienne: even for function, you need a function name, anonymous function wont do [01:19] mscdex: this is madness [01:19] jetienne: no sparta ? [01:19] blueadept has joined the channel [01:19] cjm has joined the channel [01:20] mscdex: maybe he's coding sparta.js [01:20] jetienne: i am the hole :) [01:20] maushu: (They are onto me!) [01:20] hippich has joined the channel [01:20] CIA-65: libuv: 03Igor Zinkovsky 07master * r23e9ecb 10/ test/echo-server.c : fix memory leak in echo server - http://bit.ly/rq3b6X [01:21] fireiris has joined the channel [01:21] kavla: works in coffee [01:22] maushu: Hmm, I was playing around with that code in the chrome console. [01:22] maushu: I somehow got lost. [01:22] maushu: if (injectCommandLineAPI && inspectedWindow.console) { inspectedWindow.console._commandLineAPI = new CommandLineAPI(this._commandLineAPIImpl, isEvalOnCallFrame ? object : null); [...] [01:22] maushu: right... [01:23] jetienne: interesting... how did you learn about _commandLineAPI ? [01:24] maushu: Like I said, I got lost. [01:24] cccaldas has joined the channel [01:24] a2800276_ has joined the channel [01:25] maushu: Hmm, I wonder if I can call this stuff from a website. [01:27] iammerrick has joined the channel [01:27] Ond has joined the channel [01:28] materialdesigner has joined the channel [01:29] mscdex: hax! [01:29] blueadept: anyone know how to pass multiple child objects to forever.startServer() ? i'm passing them as arrays and it's not working [01:30] maushu: Wait, wait, [01:30] maushu: I have an idea. [01:30] maushu: Totally insane. [01:30] maushu: But it will work. [01:31] smus has joined the channel [01:31] maushu: Oh man, this is so going to work! [01:32] a2800276 has joined the channel [01:33] Swimming_bird has joined the channel [01:33] indexzero has joined the channel [01:33] eyesUnclouded has joined the channel [01:33] marcello3d has joined the channel [01:33] jakehow has joined the channel [01:33] marcello3d: woooo [01:34] c4milo1 has joined the channel [01:35] maushu: Ok, here goes nothing. [01:35] maushu: woooooo [01:35] maushu: It works! [01:35] jetienne: maushu: keep hope, you learn something important, you learn another way which doesnt work :) [01:35] jetienne: houray=11111 [01:36] maushu: function() { for(var i in this) { if (this[i] === argumewnts.callee) { return i; } } return null; }; [01:36] maushu: Read and weep. [01:36] maushu: *arguments [01:37] maushu: It's not perfect since it doesn't work well with multiple copies of itself... [01:37] mynyml has joined the channel [01:37] fireiris has left the channel [01:37] ditesh|cassini has joined the channel [01:37] jakehow_ has joined the channel [01:39] maushu: Ok, now one more step into the madness. Get the parent name. [01:39] jellosea has left the channel [01:41] AvianFlu_ has joined the channel [01:44] Drakonite has joined the channel [01:45] zaxis42 has joined the channel [01:45] postwait has joined the channel [01:46] blueadept: could anyone explain to me why forever.startServer() breaks with this automated fucntion? http://pastie.org/private/jaczsjewrfr7ot1emtrig [01:46] replore has joined the channel [01:46] replore_ has joined the channel [01:46] marcello3d has joined the channel [01:47] Anton_ has joined the channel [01:47] blueadept: the first one works, but it's manual, the second one tries to automate it, and it fails [01:48] iammerrick has joined the channel [01:48] zaxis42: "npm install less" <- works but the bin/lessc always crashes http://pastebin.com/eGbwkTb9 [01:51] JumpMast3r has joined the channel [01:52] jetienne: zaxis42: use node stable ? [01:52] zaxis42: yea [01:52] zaxis42: v0.5.3 [01:52] jetienne: ok :) [01:52] brianseeders has joined the channel [01:52] jetienne: 0.5.x is unstable [01:53] jetienne: zaxis42: install 0.4.x this is the stable version [01:53] zaxis42: really? damn, checking [01:53] chilts: v0.4.10 seems to be the latest stable on the website [01:53] jetienne: with require.paths btw :) [01:53] caolanm has joined the channel [01:54] zaxis42: hm... I think this means I'll need to reinstall all my stuff, like npm and coffe etc.. [01:54] jetienne: zaxis42: i dont think so, just reinstall node [01:54] jetienne: maybe npm itself [01:58] seivan has joined the channel [01:59] jerrysv has joined the channel [01:59] zaxis42: how do I change version of node? there are no git branches [02:00] ryah: zaxis42: tags [02:00] zaxis42: ah right [02:00] WRAz has joined the channel [02:01] greg has joined the channel [02:01] blueadept: would anyone know why my second call stack isn't working here? http://pastie.org/private/jaczsjewrfr7ot1emtrig [02:03] blueadept: forever.startServer is what's not working exactly [02:04] soapyillusions has joined the channel [02:05] hdon- has joined the channel [02:11] arpunk: a [02:12] kartmetal has joined the channel [02:13] guillermo has joined the channel [02:14] d0k has joined the channel [02:17] CIA-65: libuv: 03Ben Noordhuis 07master * r1485c47 10/ src/eio/config_freebsd.h : eio: define HAVE_UTIMES 1 on freebsd, fixes build - http://bit.ly/o3EtNF [02:17] CIA-65: libuv: 03Ben Noordhuis 07master * r2007428 10/ BSDmakefile : [02:17] CIA-65: libuv: build: add BSDmakefile [02:17] CIA-65: libuv: Warns user to run `gmake` instead. - http://bit.ly/r1s6X9 [02:18] edger has joined the channel [02:18] edger: Hello, can somebody help me [02:18] edger: I am trying to install the node.js [02:19] cafesofie has joined the channel [02:19] balupton has joined the channel [02:19] plutoniix has joined the channel [02:20] skm has joined the channel [02:20] balupton has left the channel [02:20] blueadept: ./configure && make && make install [02:20] blueadept: should work [02:20] edger: but I get an error whe make [02:21] mscdex: edger: what's the error? [02:21] edger: task: libv8.a [02:21] blueadept: pastie.org, could you paste it? [02:21] edger: Sconstruct -> libv8.a [02:21] edger: I am using cygwin [02:21] blueadept: ah [02:22] mscdex: edger: paste the entire output on gist.github.com or pastie.org [02:22] edger: Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a} [02:24] mscdex: edger: that's not the actual error [02:24] mscdex: edger: it's above that [02:24] bartman_ has joined the channel [02:25] edger: g++ obj/release/snapshot.cc: No such file or directory [02:26] edger: I just paste it on https://gist.github.com/1141309 [02:27] c4milo2 has joined the channel [02:27] mscdex: edger: where did you download from? and what node version? [02:27] edger: I used git [02:27] yuroyoro has joined the channel [02:28] edger: and I downloaded the version v0.5.3 from git [02:29] mscdex: edger: hrm... try checking out v0.4.10 and see if that compiles for you [02:29] marcello3d: what unit test libs do people use? [02:29] edger: ok will try [02:29] mscdex: edger: otherwise, there's a native mingw-based build for Windows [02:29] mscdex: edger: which is a work-in-progress [02:30] edger: ok, now no error [02:30] edger: lets see if it finish compiling [02:30] edger: I checked out v0.5.0 [02:30] indexzero has joined the channel [02:31] marcello3d: you should get the stable 0.4.x branch instead of 0.5.x [02:31] marcello3d: if it's your first time using/building node [02:31] edger: ok... so I just check out the 0.4.x?? [02:31] edger: git checkout v0.4.0 (for example???) [02:32] marcello3d: I honestly don't remember the command or branch name, I use gitx :) [02:32] mscdex: edger: git checkout v0.4.10 [02:32] edger: ok [02:32] edger: thanks [02:33] smus has joined the channel [02:33] bradleymeck has joined the channel [02:40] socketio\test\40 has joined the channel [02:42] jerrysv has joined the channel [02:43] JakeyChan has joined the channel [02:43] isaacs has joined the channel [02:43] kawaz_home has joined the channel [02:43] socketio\test\91 has joined the channel [02:43] socketio\test\72 has joined the channel [02:43] marcab has joined the channel [02:44] russell_h has joined the channel [02:45] boehm has joined the channel [02:46] jacobolus has joined the channel [02:49] WRAz: just stumbled onto underscore [02:49] WRAz: http://jsfiddle.net/HfFyd/5/ really like it, way better than hefty frameworks like mootools/etc [02:50] tristanseifert has joined the channel [02:50] WRAz: (wrong url) http://jsfiddle.net/HfFyd/6/ [02:50] hij1nx has joined the channel [02:52] marcello3d: hah, snap, I don't have gcc anymore [02:52] marcello3d: after upgrading to lion [02:52] marcello3d: anyone know where to gets? [02:52] WRAz: http://www.ubuntu.com/ ( ;) ) [02:54] navaru has left the channel [02:56] marcello3d: WRAz: no thanks, I've modified more than enough xfree conf files for one lifetime [02:56] blueadept: whatup marcello [02:57] marcello3d: ah sweet, xcode4 is free now [02:57] WRAz: thats awesome, actually. I remember having to pay for it >.> [02:57] WRAz: I really like xcode. [02:57] marcello3d: yea, it used to be $5 hah [02:57] marcello3d: maybe it's only free on lion? [02:57] piscisaureus has joined the channel [02:58] WRAz: I've been looking for a good node.js IDE... though C9 is working well now. [02:58] marcello3d: I've been using intellij [02:58] WRAz: their community version? [02:58] marcello3d: ultimate [02:58] marcello3d: I do java dev, too, so I already ahd it [02:59] WRAz: ah, I have their community version for minecraft plugins [02:59] WRAz: its actually really nice. [02:59] marcello3d: not sure if the community one has JS support [02:59] marcello3d: but the JS support is pretty slick [02:59] marcello3d: they even have a node.js module now [02:59] WRAz: wow [02:59] marcello3d: that lets you click on require links and stuff [02:59] marcello3d: and highlights stacktraces/colorizes in the console [02:59] ale has joined the channel [03:00] marcello3d: I might be lying on the stack trace thing [03:00] marcello3d: I don't remember if it does that :) [03:00] marcello3d: I think so, though [03:00] WRAz: so do you use prototype factories at all in node? [03:00] marcello3d: not sure what that means [03:00] WRAz: http://jsfiddle.net/HfFyd/6/ [03:01] WRAz: def is a prototype factory [03:01] marcello3d: oh [03:01] marcello3d: class building glue? [03:01] WRAz: basically [03:01] ale: Hello, I am trying to use expressjs, but I connected to :81, so then I should write on the url my.page:81, but it makes no sense to make the user write that! But the problem is that on port 80 I am running apache to render php, etc...how can I do that? [03:01] marcello3d: I haven't so far, in node, no [03:01] WRAz: you can get around it for the most part with require and inherit [03:01] marcello3d: yea [03:02] marcello3d: ale: you could setup apache to proxy to node [03:02] marcello3d: ale: or run apache on a different port and have node proxy to apache ;) [03:02] devongovett has joined the channel [03:02] WRAz: or proxy -> apache/node [03:02] marcello3d: or that [03:02] ale: marcello3d: how can I do that??? I've really node idea [03:02] marcello3d: you could even run a node proxy to proxy to apache and node ;) [03:02] WRAz: so there are some node proxies but I recommend using nginx [03:02] ale: sorry no idea haha [03:02] mosen: WRAz, on the client side i use a proto factory but.. in node i had to change my code syntax because of how inherits works :) [03:03] marcello3d: does nginx support websockets? [03:03] WRAz: thinkso [03:03] ryah: ACTION does a back flip [03:03] WRAz: The question should be "What doesn't nginx support?" [03:03] ale: But I have to learn ngnix from 0, and manty hosting providers do not accept it [03:03] marcello3d: https://github.com/nodejitsu/node-http-proxy [03:03] WRAz: ^ that works well [03:03] erock has joined the channel [03:03] WRAz: be prepared to setup an init script to maintain it though [03:03] blueadept: is there a way to get a function to take two object litearls without putting it into an array? [03:04] marcello3d: ale: your simplest first step would be to do an apache proxy [03:04] bartman_: ale: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html [03:04] WRAz: There is node daemon, but I haven't had good results from that [03:04] mosen: blueadept, using the arguments ? [03:04] marcello3d: afk [03:04] blueadept: yeah [03:04] ale: thanks! And what would be the 2nd step? [03:04] WRAz: function(obj, obj) ? [03:04] blueadept: mosen: like for instance, http://pastie.org/private/jaczsjewrfr7ot1emtrig [03:05] jj0hns0n has joined the channel [03:05] blueadept: the top function works because i'm passing each object literal in one by one, but if i loop it using an array, it fails [03:05] blueadept: forever.startServer can only be started once, so the issue i'm having is trying to generate two objects, then insert them into forever.startServer once i'm done [03:05] ale: Can someone please explain me how does node-http-proxy work? [03:06] temp02 has joined the channel [03:06] WRAz: does child.start() return child? [03:07] blueadept: hm, not sure [03:07] blueadept: i dont think so [03:07] blueadept: it just starts it up [03:07] WRAz: usually they return the object so you can chain them [03:08] luke` has joined the channel [03:08] WRAz: if start() returns the object, then you could get away with http://jsfiddle.net/EktsB/ [03:09] blueadept: hm i see [03:09] WRAz: weird that startServer wouldnt' call start on the monitors though [03:09] WRAz: so you wouldn't need to "start" the monitor [03:09] dipser has joined the channel [03:09] blueadept: its a change indexzero made in v 0.6 of forever [03:10] blueadept: it used to automatically do it, now it's manual [03:10] blueadept: let me try your strategy [03:10] WRAz: woah, my strategy is just for condensing.. for readability I'd go with yours. [03:10] WRAz: give the monitors better names tho [03:10] indexzero: ale, blueadept, WRAz: sup [03:11] blueadept: ah there he is [03:11] mscdex: nginx doesn't support the current widely used websockets draft [03:11] blueadept: <--- corey, i wrote you earlier [03:11] indexzero: I saw questions about node-http-proxy from ale, which does support the widely used websockets draft mscdex :-D [03:11] polotek has joined the channel [03:12] indexzero: and blueadept, WRAz: questions about forever? [03:12] mscdex: ok, but nginx doesn't :p [03:12] ale: what?? [03:12] indexzero: blueadept: Ah, ok [03:12] blueadept: indexzero: i'm just trying to figure out how to add chains of childs to startServer [03:12] blueadept: i realize now why startServer can only start once [03:13] blueadept: but if i pay an array of childs to it, it comes back null, i'm just trying to figure out how to pass multiple childs [03:13] blueadept: but I think the code WRAz wrote works [03:13] indexzero: blueadept: Having startServer start the monitors would be a weird change [03:13] mscdex: it's a good thing i didn't get very far into my websockets-10 implementation as i saw someone already has it done :-) [03:13] indexzero: mscdex: Yes, thank goodness [03:14] blueadept: hm, getting EADDRINUSE, Address already in use when i do that [03:14] blueadept: but it works [03:14] mscdex: i wonder how long until we see it in socket.io [03:14] mscdex: unless they're holding off for final version [03:14] WRAz: ofc it works blueadept, its just not readable imo [03:14] blueadept: indexzero: what would be the best way to go about chaining multile child processes? [03:15] boehm has joined the channel [03:15] indexzero: blueadept: You mean just starting up multiple monitors? [03:16] bbrandon has joined the channel [03:16] blueadept: well no i got that [03:17] blueadept: i just want to be able to call forever.list [03:17] blueadept: and see which ones are running in the app [03:17] k1ttty has joined the channel [03:17] blueadept: hm, maybe i should go about this differently [03:17] davidascher has joined the channel [03:20] blueadept: http://pastie.org/private/jaczsjewrfr7ot1emtrig [03:20] blueadept: the thing is i want to be able to start up multiple servers from one app [03:20] blueadept: i can only do this, but i can't get a listing of them from within the app without forever.list [03:20] indexzero: blueadept: this should be possible [03:20] indexzero: I'm updating your sample [03:20] blueadept: i can't add to forever.list without either doing it mannually, because the array wont pass [03:23] indexzero: blueadept: check this out [03:23] indexzero: https://gist.github.com/1141361 [03:23] blueadept: woah [03:23] ale: I need help with httpProxy, I don't understand how it works! [03:24] blueadept: dude that is awesome [03:24] blueadept: let me try that out see how it goes here [03:25] tristanseifert has joined the channel [03:25] davidascher has joined the channel [03:27] indexzero: ale: what don't you understand [03:27] indexzero: blueadept: I'm writing a new sample that will go into the forever repo [03:27] indexzero: I'll ping you when it's done [03:28] ale: indexzero: I don't understand what does it do [03:28] blueadept: hm still getting null [03:28] indexzero: http-proxying [03:28] blueadept: hm, wait a minute [03:29] indexzero: ale: see http://www.ietf.org/rfc/rfc3040.txt and http://en.wikipedia.org/wiki/Reverse_proxy [03:29] jj0hns0n has joined the channel [03:29] ale: thanks! [03:30] isaacs: you know, it just occurred to me that we read the wrong direction. [03:30] isaacs: we read top to bottom, which is optimized for paper [03:30] blueadept: indexzero: still getting return of null [03:30] shipit has joined the channel [03:30] isaacs: this will never happen, but if we read bottom-to-top, it'd be much more ergonomically designed for shells and such [03:30] indexzero: blueadept: I'm seeing the same thing [03:30] indexzero: debugging [03:32] JakeyChan_ has joined the channel [03:32] indexzero: blueadept: ahh, I see, my arguments parsing was a little too clever [03:32] indexzero: I wrote it to support [03:33] indexzero: forever.startServer(monitor1, monitor2, monitor3, function () { ... }) [03:33] indexzero: not [03:33] isaacs: i wonder how hard it'd be to reverse the bottom to top flow order in my shell and web browser [03:33] indexzero: forever.startServer([monitor1, monitor2, monitor3], function () { ... }) [03:33] blueadept: yep [03:33] blueadept: thats what i figured [03:33] indexzero: blueadept: I'm updating it now [03:33] indexzero: to do either or [03:33] blueadept: cool [03:33] EyePulp has joined the channel [03:33] polotek has joined the channel [03:36] Qbix1 has joined the channel [03:37] c4milo1 has joined the channel [03:38] mizerydearia has joined the channel [03:38] ironlad has joined the channel [03:39] indexzero: blueadept: forever@0.6.4 published to npm with this argument parsing fix [03:39] ebovine has joined the channel [03:39] indexzero: example for listing multiple processes here: https://github.com/indexzero/forever/blob/master/examples/list-multiple.js [03:39] ebovine: 'm having a nesting problem with async callbacks, specifically with persistence.js. [03:40] ebovine: http://pastebin.com/FZD0XPcP [03:40] ebovine: That is giving me parent1, parent2, childOf1, childOf1, childOf1, childOf2… instead of the expected parent1, childOf1, childOf1, parent2, childOf2…. [03:41] blueadept: indexzero: awesome, thanks for the help! [03:42] aah has joined the channel [03:43] dherman has joined the channel [03:45] smus has joined the channel [03:48] smus_ has joined the channel [03:48] eboyjr: Guys, this crashes Node.js with an assert failure: setInterval(5000, function(){}); [03:48] eboyjr: Yes, I know the arguments are in the wrong order but it shouldn't crash [03:48] socketio\test\92 has joined the channel [03:49] materialdesigner has joined the channel [03:51] Gurpartap has joined the channel [03:55] langworthy has joined the channel [03:56] aah: I kind of like being reminded I'm an idiot. Nothing like the death of a framework to clear the head. [03:57] Gurpartap: :P [03:58] Gurpartap: would anyone be so kind to proof-read this bit of JS: https://gist.github.com/1141421 [03:59] davidbanham has joined the channel [03:59] Gurpartap: I'm trying to generate alphanumeric incrementing strings, like bit.ly or tinyurl would have. [03:59] chilts: I suspect they won't be using incremental to be honest [04:00] Gurpartap: for preventing brute scraping? [04:00] snowinferno has joined the channel [04:00] chilts: also because their systems are probably distributed (ie. not on one machine) [04:01] chilts: I mean, they _could_ do it that way, but it'd be harder [04:01] Gurpartap: true [04:01] Gurpartap: but i'm really looking forward to go incremental, however it be. [04:01] chilts: wow, lots of charAt and indexOf and replaceAt [04:01] Gurpartap: haha :p [04:01] Gurpartap: first take :) [04:02] chilts: well, I've looked at it ... does it work? [04:02] Gurpartap: yes it does. [04:02] chilts: ACTION could try it but there was no question to answer :) [04:02] chilts: cool [04:02] Gurpartap: just want to be sure the results are correct too. [04:02] snowinferno: Hi all, anybody know what's going on with the Fedora repo submission of node.js? Or where I might be able to find the srpm? [04:02] tim_smart: Gurpartap: array_of_chars[generateRandomNumberBetween(0, array_of_chars_length)] [04:02] tim_smart: Do that a few times [04:03] chilts: or the other way of doing it would be to have an incrementing integer, and then convert that to your base 62 result :) [04:03] Gurpartap: tim_smart: i'm looking to do incremental :s [04:03] joshthecoder has joined the channel [04:03] Gurpartap: hmm [04:04] chilts: that's probably what I would do with your requirements, but yeah, I probably wouldn't do it that way if I was choosing [04:04] meso_ has joined the channel [04:04] Gurpartap: i never knew base 62 [04:04] neilk_ has joined the channel [04:04] neilk_ has joined the channel [04:05] chilts: well, you have 62 chars in your string at the top 0..9a..zA..Z [04:05] chilts: so it's base62 [04:05] Gurpartap: true [04:05] Gurpartap: true true [04:05] Gurpartap: hah [04:05] Gurpartap: <3 [04:05] chilts: ACTION hears a penny drop [04:05] Gurpartap: lol [04:07] rfay has joined the channel [04:12] gkatsev has joined the channel [04:14] monokrome: ACTION found a penny! [04:16] chilts: Gurpartap: https://gist.github.com/1141448 <- run that program and give it an integer as an input parameter [04:16] Gurpartap: http://padbury.tumblr.com/post/8710973693/tusk81-gah [04:16] Gurpartap: hah [04:16] Gurpartap: thank you :) [04:16] chilts: e.g. ./number-to-base-62.js 2912832 ==> cdLa [04:17] Gurpartap: having integers taking care of unique id is great, since redis can handle not getting them conflicting already! [04:17] Gurpartap: :D [04:17] EyePulp has joined the channel [04:17] admc has joined the channel [04:19] wookiehangover has joined the channel [04:19] vid__ has joined the channel [04:22] tristanseifert has joined the channel [04:22] __class__ has joined the channel [04:24] aah: so, I know I've asked this before, but I'm old and forgetful. [04:24] Gurpartap: chilts: one difference is that it doesn't generate keys starting with 0 like 00, 0a, 0g etc [04:25] aah: can someone explain to me why the common async pattern of "return x, then call onSuccess / onError to register a callback" isn't going to run into timing issues? [04:26] aah: I mean, I *like* the pass a callback that takes (err, data). it makes sense. this whole register callbacks after you've already made the call idea seems silly. [04:26] Gurpartap: chilts: alrite i'm not looking for any more optimizations :) [04:26] Emmanuel` has joined the channel [04:26] curtischambers has joined the channel [04:27] chilts: Gurpartap: really no sure why you want to have a preceding zero??? [04:27] chilts: s/no/not/ [04:28] Gurpartap: chilts: just to cover all the combinations? not so critical. but i think i can serve the purpose of having a small string keys for a longer collection. [04:28] Gurpartap: s/longer/larger/ [04:29] Gurpartap: s/i can/it can/ [04:29] chilts: well, if you want zero padding, just put some zeros in the front until you get the length you need [04:29] chilts: other than that, it's Friday and I'm off home!!! Wahoo! :) [04:29] Gurpartap: :D [04:30] chilts: good luck [04:30] Gurpartap: thanks mate! [04:30] Gurpartap: :) [04:30] chilts: ACTION & [04:30] Gurpartap: ACTION ¿ [04:30] seivan has joined the channel [04:30] Gurpartap: Y(-_-)Y [04:30] Gurpartap: m(-_-)m [04:30] Gurpartap: Y(-_-)Y [04:30] Gurpartap: m(-_-)m [04:30] Gurpartap: :p [04:31] skm has joined the channel [04:31] zeade has joined the channel [04:33] JakeyChan: 8) [04:33] jj0hns0n has joined the channel [04:35] aah: anyone? timing issues? thoughts? [04:35] losing has joined the channel [04:37] Gurpartap: hmm [04:38] mikeal has joined the channel [04:38] mosen: aah, I think ive had timing issues with something similar, but im not sure [04:38] mosen: aah, from a function that returns an emitter that adds a listener [04:40] aah: exactly.. seems like a fast turnaround could mean the listener gets added after the event is complete [04:40] aah: just making sure I'm not crazy. :P [04:41] mosen: yep im pretty sure ive run into that case [04:41] polotek: aah: if you anything async happens before you set your listeners, you risk missing events [04:41] tristanseifert has joined the channel [04:41] polotek: this is a known issue with node [04:41] polotek: you have to set your listeners before you do anything else [04:41] polotek: you can call other functions as long as they are sync [04:41] polotek: once you yield back to the event loop, you should be ready to go [04:42] polotek: The alternative is to temporarily buffer any data (or other event arguments) until you're ready to receive them [04:42] aah: polotek: thanks. the problem is that most common cases appear to fire the async immediately upon call, and return the object that you add listeners to. this happens all over the place in libraries, for instance. [04:43] andrewfff has joined the channel [04:43] aah: nodestalker being the case in point I'm dealing with now. [04:43] polotek: if a call passes you back and event emitter and you immediately set listeners, you shouldn't miss anything [04:43] polotek: there's only one thread, so nothing can happen between the call and when it returns to you [04:44] polotek: I don't know anything about nodestalker, so I can't comment there [04:44] polotek: maybe post an example gist that shows your issue [04:44] aah: .. actually, that's a great point. that's what I was missing. [04:44] catb0t: SyntaxError: Unexpected string [04:44] smus has joined the channel [04:45] aah: well, I can still imagine an issue -- if the return data is so large that it's going to fill a network buffer, before your code gets a chance to register a handler [04:45] aah: but that's pushing it a bit. [04:46] polotek: aah, if the network buffer fills up, it starts to buffer into node. at least I think so [04:46] polotek: but that's not as big an issue as you think [04:47] polotek: data events can start before after the connection is opened [04:47] polotek: but those events still have to wait until you yield back to the event loop [04:47] aah: so.. [04:47] smus has joined the channel [04:47] polotek: if you take a while to do so, there may be several events waiting for you [04:47] aah: pt A: var foo = someAsyncCall(blah); [04:48] aah: pt B: foo.onSuccess(function() .. ) [04:48] aah: there's nothing that can happen between pt A and pt B -- no OS losing data, nothing [04:48] polotek: correct, one execution thread [04:49] polotek: there are always exceptions, but in this instance those edge cases are very remote [04:50] jerrysv_ has joined the channel [04:50] wookiehangover has joined the channel [04:50] aah: got any google fu that can help me read up on those edge cases? curious. other than that -- I keep forgetting the single thread. it makes things so much simpler, but it's hard to remember coming from java. :P [04:50] ecin_ has joined the channel [04:52] mynyml has joined the channel [04:52] snowinferno: Anybody know where I can find an up to date srpm for Node.js? [04:53] jacobolus has joined the channel [04:56] dgathright has joined the channel [04:59] isaacs: snowinferno: you want dated sperm for Node.js? [04:59] isaacs: oh, what's srpm? [04:59] isaacs: sorry, got dyslexic on that one. [05:00] rurufufuss has joined the channel [05:00] zilch has joined the channel [05:01] mikeshark has joined the channel [05:01] WRAz has joined the channel [05:03] JakeyChan: hi, is there have shanghai friends here ? [05:03] JakeyChan: :) [05:04] mikeshark has left the channel [05:05] cagdas has joined the channel [05:06] soapyillusions has joined the channel [05:08] blueadept: anyone know a good way to parse stdout? [05:10] snowinferno: isaacs: source rpm [05:11] smtlaissezfaire has joined the channel [05:15] scas_ has joined the channel [05:19] Spion_ has joined the channel [05:20] tmpvar has joined the channel [05:22] tim_smart has joined the channel [05:25] hkjels_ has joined the channel [05:26] Draggor: is typed-array supposed to come with node? [05:27] Draggor: oh, newp [05:28] skm has joined the channel [05:28] mikeal has joined the channel [05:29] smus has joined the channel [05:33] augustl: what am I supposed to `require` in a bin/ for a npm package? [05:33] augustl: `require("./../lib/mything")` won't work, no? [05:33] isaacs: augustl: yeah, that's how it works [05:33] isaacs: augustl: just pretend you were given /full/path/to/bin/in/your/package.js [05:34] augustl: neat, tnx [05:34] isaacs: np [05:36] augustl: how does that work? Won't the bin be in ~/local/node/bin and the lib dir in ~/local/node/lib/node_modules/mylib/lib? [05:41] JoshC1 has joined the channel [05:44] reid has joined the channel [05:47] dexter_e has joined the channel [05:48] Bonuspunkt has joined the channel [05:49] Ratty_ has joined the channel [05:50] Ratty_: Yo. When pushing a package to npm how do I specify that it's 'unstable'. i.e. it shouldn't be installed unless you user explicitly requests it. Like how the beta rails gems require --pre. [05:50] isaacs: Ratty_: --tag unstable [05:51] Ratty_: Oh, simple as that. Thanks. [05:51] isaacs: Ratty_: any tag you want. "latest" is the only magical one. [05:52] Ratty_: Cheers, I'll give that a try [05:52] dshaw_ has joined the channel [05:55] stephank has joined the channel [05:56] xAt has joined the channel [05:57] martyziff has joined the channel [05:57] skm has joined the channel [06:01] tylergillies_ has joined the channel [06:01] tylergillies_: how do i JSON.stringify EJS without it adding " ? [06:02] indexzero has joined the channel [06:03] SamuraiJack has joined the channel [06:05] cying has joined the channel [06:08] plutoniix has joined the channel [06:09] tylergillies_: <%- instead of <%= [06:09] tylergillies_: always wondered what the diff was, now i know [06:09] azeroth_ has joined the channel [06:11] JoshC1 has joined the channel [06:12] zilch: My express.js server tends to crash every few hours ... would handling app.error(...) should be enough ? [06:13] mendel_ has joined the channel [06:13] idefine: how do you manage package dependencies via npm if your dependencies lives on a private github repo? [06:13] hkjels_ has joined the channel [06:13] avalanche123 has joined the channel [06:14] Gurpartap: zilch: catch the error, exit yourself, then have a monitoring tool restart your app. [06:14] Gurpartap: log the error, while at it [06:14] Gurpartap: too. [06:14] zilch: Gurpartap, i am using forever.js to monitor it ... [06:15] zilch: I just wonder if the error which breaks my node process is not due to express.js , what would happen ? [06:15] hkjels__ has joined the channel [06:15] idefine: zilch: process.on('uncaughtException', function(err) { do what you need to here to handle this, and continue to process other requests }); [06:15] smtlaissezfaire has joined the channel [06:16] madsleejensen has joined the channel [06:16] rchavik has joined the channel [06:18] hellp has joined the channel [06:18] zilch: idefine, should it be done along with app.error(...) ? or are they to be used exclusively ? [06:19] dherman has joined the channel [06:19] idefine: zilch: you should use both, uncaughtExceptions are for exceptions that weren't caught elsewhere [06:21] CIA-65: libuv: 03Igor Zinkovsky 07gqcsEx * r95554c4 10/ (5 files in 2 dirs): use GetQueuedCompletionStatusEx if the OS supports it - http://bit.ly/oHyppm [06:24] Swizec has joined the channel [06:26] blup has joined the channel [06:27] augustl: zilch: a separate monitoring system is probably a good idea [06:28] zilch has joined the channel [06:29] zilch: idefine, I am trying to replicate an exception randomly ... https://gist.github.com/1141573 [06:30] Vertice has joined the channel [06:30] zilch: but process.on('uncaughtException', function(err) { ...) seems to be never executed ... I see error thrown on the console , which is by default !! [06:31] ph^ has joined the channel [06:32] confoocious has joined the channel [06:32] balaa has joined the channel [06:33] zilch has joined the channel [06:34] seivan has joined the channel [06:37] zilch: idefine, where I am being wrong ? [06:38] piscisaureus has joined the channel [06:39] idefine: zilch: take a look at when uncaughtExceptions occur: http://nodejs.org/docs/v0.4.9/api/process.html#event_uncaughtException_ [06:41] zilch has joined the channel [06:42] zeade has joined the channel [06:43] korch has joined the channel [06:45] chrisdickinson: isaacs: fyi, making a lot of headway in node-ifying git.js. [06:46] zilch has joined the channel [06:46] `3rdEden has joined the channel [06:47] idefine: zilch: https://gist.github.com/1141573#gistcomment-45044 [06:48] andrewfff has joined the channel [06:49] loob2 has joined the channel [06:49] dob_ has joined the channel [06:50] ccare has joined the channel [06:51] TomY has joined the channel [06:51] mendel_ has joined the channel [06:52] andrewff1 has joined the channel [06:53] kixxauth has joined the channel [06:54] zilch: idefine, I could see that ... if the error is inside express then it will be not caught by process.on('uncaughtException', function (err) {...} [06:54] jacobolus has joined the channel [06:54] steffan_ has joined the channel [06:56] zilch: it looks express will not let process.on('uncaughtException', function (err) {...) to take care of the error and will throw the error to console itself. [06:56] andrewfff has joined the channel [06:57] zilch: idefine, please see the gist ... I updated it ... [06:57] __tosh has joined the channel [06:57] TomY has joined the channel [06:59] idefine: zilch: i believe that express catches the errors in its router middleware... [06:59] skm has joined the channel [07:00] igl has joined the channel [07:00] zilch has joined the channel [07:00] groom has joined the channel [07:00] mikedeboer has joined the channel [07:00] idefine: zilch: you can use node-inspector to find out [07:00] ttpva has joined the channel [07:01] seawise has joined the channel [07:02] cying has joined the channel [07:02] mraleph has joined the channel [07:03] andrewff1 has joined the channel [07:05] euforic has joined the channel [07:06] smus has joined the channel [07:06] Swizec has joined the channel [07:07] andrewfff has joined the channel [07:07] luke` has joined the channel [07:07] raphdg has joined the channel [07:08] zilch: idefine, gist updated again .. https://gist.github.com/1141573#comments [07:08] zilch: idefine, i would be happy to just use app.error(...) for now [07:08] SubStack: isaacs: what is with all the python/erlang jerks getting all hurt whenever somebody talks about node amirite? [07:08] SubStack: as per your post on HN [07:09] zilch: pardon for my ignorance, erlang is what good for ? [07:10] zeade has joined the channel [07:10] andrewff1 has joined the channel [07:10] idefine: zilch: why would you not want to log uncaught exceptions? [07:11] idefine: zilch: it may help to debug the issue of your app dying every few hours [07:12] topaxi has joined the channel [07:13] polotek has joined the channel [07:13] zilch: idefine, I would ... and I am ... what the point i drove home is ... just process.on('uncaughtException', function (err) {..} is not enough [07:14] zilch: when you are having express.js server ... [07:14] zilch: my question that which one should be used has a new answer ... the anwer is ... both !! [07:15] hybsch has joined the channel [07:15] idefine: zilch: I never said not to use app.error [07:16] idefine: zilch: i said to use both [07:16] thalll has joined the channel [07:16] JakeyChan: hi [07:16] CIA-65: node: 03Ryan Dahl 07master * r89bed19 10/ (104 files in 17 dirs): Upgrade V8 to v3.5.4 - http://bit.ly/nSi9wl [07:16] JakeyChan: I have custom module and want to support new nid filter for views. can I [07:16] zilch: idefine, yup !! [07:17] pyrotechnick has joined the channel [07:18] zilch: idefine, funny thing is if you don't put ... anHTTPServer.error(...) and you don't know that there is express.js default middleware ... you tend to think that process.on('uncaughtException', function (err) {...) is not working [07:18] zilch: anyway !!! [07:18] zilch: idefine, you were certainly right :P ... you just make more sense :P [07:22] randomn1c has joined the channel [07:24] TomY has joined the channel [07:24] ryan0x2 has joined the channel [07:26] tomb_ has joined the channel [07:26] jhurliman has joined the channel [07:28] dsirijus has joined the channel [07:28] Swimming_bird has joined the channel [07:29] unlink has joined the channel [07:29] unlink has joined the channel [07:29] blueadept: how does one catch brackets with regex? [07:30] iFire` has joined the channel [07:30] blueadept: like for instance i'm looking for the exact chracter that equals /\u001b[90m/ [07:30] blueadept: but if i have that bracker [ in there, it breaks the code [07:31] mpavel has joined the channel [07:31] zilch has joined the channel [07:32] cjm has joined the channel [07:34] unlink has joined the channel [07:34] unlink has joined the channel [07:34] damiano has joined the channel [07:34] damiano: hello everybody [07:35] damiano: i have to use session with express [07:35] industrial: Is there a way to look into the raw request data going over the line between a local nodejs server and say a test suite for that? I'm on OS X and have Charles.app installed but that includes a firefox plugin to monitor the data, and I can't get it to work for my tests (run from the shell). [07:35] damiano: i saw [07:35] damiano: app.use(express.session({ secret: "keyboard cat", store: new RedisStore })); [07:35] damiano: what is the "secret" property ?? [07:35] blueadept: its the session key that identifies the session [07:36] industrial: Sessions support can be added by using Connect’s session middleware. [07:36] blueadept: for instance if you keep that secret static, node.js can go down, and the session will be kept in Redis [07:36] industrial: damiano: did you check out connect session middleware on the connect github site? [07:36] blueadept: such that if you restart node, redis will keep the session going [07:36] blueadept: yeah but redis is better [07:36] industrial: (I'm using mongo to store my sessions) [07:36] blueadept: keeps the session going even after restarts [07:36] a2800276 has joined the channel [07:36] blueadept: or mongo perhaps [07:37] blueadept: haven't tried that yet [07:37] damiano: no i'0m seeing http://expressjs.com/guide.html [07:37] industrial: damiano: I just pasted that from that site [07:37] industrial: anyway, http://senchalabs.github.com/connect/middleware-session.html [07:38] damiano: thank you [07:38] industrial: honestly I dont understand why express just renames connect. to express.. [07:38] industrial: when its actually connect doing it [07:38] damiano: btw yes redis is good [07:39] andree has joined the channel [07:40] blueadept: i want to start to use it for other stuff, but right now i just have it handle all my session data [07:40] damiano: industrial, to not generate confusion [07:40] industrial: damiano: but the connect API docs helped me more then the express guide on how those middleware work, their options, etc. [07:40] industrial: just link to there, imho [07:41] industrial: doesnt really matter either way tho ;p [07:41] damiano: industrial, right [07:41] jbpros has joined the channel [07:43] TheJH has joined the channel [07:43] damiano: btw the session key is not like a "password" [07:43] damiano: i can put there also "helloworld" [07:43] EvRide has joined the channel [07:44] damiano: it is important to get the session if node goes down [07:44] damiano: or i have to use something like: GDS.3AsifjO34GH.3.352.ETGQhfdhwet34fhnsfdh43..gdf [07:44] damiano: ? :D [07:44] mikedeboer has joined the channel [07:45] blueadept: no its not a password [07:45] blueadept: just temp if you want [07:45] aperiodic has joined the channel [07:45] blueadept: it just ensures that the session can be identified and not spoofed [07:46] galexcd has joined the channel [07:46] blueadept: for instance i have a md5 has autogenerated for sessions when in production [07:46] blueadept: hashes* [07:47] whitman has joined the channel [07:48] smtlaissezfaire_ has joined the channel [07:49] davidascher has joined the channel [07:51] cosmincx has joined the channel [07:55] booo has joined the channel [07:55] iaincarsberg has joined the channel [07:57] damiano: ops i forgot to install redis (i only installted the modules) :-D ahah [07:57] seivan has joined the channel [07:57] seivan has joined the channel [07:57] damiano: i have to check the package on ubuntu [07:57] chjj: oo, upgraded v8, head has weakmaps now [07:58] ryah: yeah fancy :) [08:00] chjj: not bad [08:00] chjj: ! [08:02] burningdog has joined the channel [08:03] damiano: connect.sid [08:03] damiano: yeeaaah [08:03] damiano: :D [08:03] damiano: works!!!!!!!1 [08:03] damiano: :D [08:03] burningdog has left the channel [08:04] galexcd: anyone familiar with the xml2js node library? [08:04] davidascher has joined the channel [08:06] galexcd: or what about just callbacks in general for that matter [08:06] markwubben has joined the channel [08:07] randomn1c: It's normally best to ask your question outright instead of waiting for permission :) [08:07] randomn1c: What you need? [08:07] TheJH: galexcd, you're asking whether anyone here is familiar with callbacks? [08:07] TheJH: galexcd, you should just assume that [08:07] galexcd: right, sorry [08:09] galexcd: the xml2js library sets a callback function on a addListener function rather than in the parseString function itself, which is a little different than other node libraries I have used before. My problem is I can't quite figure out how to use closure with it. [08:09] sebastia_ has joined the channel [08:09] galexcd: I know that isn't a question yet, just figured I'd throw that out there, basically my problem is this: [08:09] uchuff has joined the channel [08:09] hasta84 has left the channel [08:10] galexcd: I've got net listening on a port and I'd like to use xml2js to parse incoming data, and based on that incoming data, send data back to the client who sent it [08:10] CIA-65: libuv: 03Ryan Dahl 07master * r65f71a2 10/ src/uv-unix.c : Temp disable pipe2 on linux - http://bit.ly/qmCZI6 [08:11] galexcd: however, since the callback for that library goes into an event listener, I don't know how to get a pointer back to the socket in the callback function [08:11] galexcd: sorry, it's confusing, let me put some code up on pastebin [08:11] TheJH: galexcd, I think you have to create a new parser per request [08:12] TheJH: ehm, per document you want to parse [08:12] galexcd: ah [08:12] galexcd: that might be my problem [08:12] galexcd: alright, thanks let me give that a shot [08:12] TheJH: galexcd, if you're receiving data as a stream, just using a single parser would even mess u stuff [08:13] TheJH: *up [08:13] mhauri has joined the channel [08:14] mendel_ has joined the channel [08:14] robotmay has joined the channel [08:15] anoop has joined the channel [08:15] sebastia_ has joined the channel [08:15] eirikb has left the channel [08:15] __tosh has joined the channel [08:15] mendel__ has joined the channel [08:16] liar has joined the channel [08:17] CIA-65: node: 03Ryan Dahl 07master * r6c614fe 10/ (12 files in 5 dirs): Upgrade libuv to 65f71a2 - http://bit.ly/qESNYS [08:17] sebasti__ has joined the channel [08:18] mendel___ has joined the channel [08:20] sebastia_ has joined the channel [08:20] damiano: when i do: req.session.var1= 'content 1'; i have seen a cookie was sent to browser as "connect.sid" .... ok, the problem is the "expiring", i mean: when i do: req.session.something why the expire doenst change each time i set this variable ? [08:21] fly-away has joined the channel [08:22] pickels has joined the channel [08:22] guidocalvano has joined the channel [08:25] kulor-uk has joined the channel [08:26] CIA-65: node: 03Ryan Dahl 07master * rcfba1f5 10/ (4 files in 3 dirs): Bump version to v0.5.4 - http://bit.ly/n9QTtT [08:27] Nuck has joined the channel [08:29] damiano: Redis will remove the key:value at the date i see on the cookie, right? [08:29] tomb| has joined the channel [08:32] mendel_ has joined the channel [08:32] davidascher has joined the channel [08:33] jarek has joined the channel [08:34] seivan has joined the channel [08:34] damiano: hmmm maybe i found a bug on connect-redis [08:35] sebasti__ has joined the channel [08:35] damiano: Session#touch() [08:35] damiano: Updates the .maxAge, and .lastAccess properties. Typically this is not necessary to call, as the session middleware does this for you. [08:35] damiano: when i reload the page that sends the session i don't see changes [08:36] damiano: so it doesnt change maxAge automatically [08:36] damiano: i need to do .save() [08:36] TheJH: damiano, I'd ask tjholowaychuk when he comes online the next time [08:36] damiano: maybe i'm wrong [08:36] damiano: oh thank you TheJH [08:36] sebast___ has joined the channel [08:37] damiano: I'm seeing: http://senchalabs.github.com/connect/middleware-session.html [08:42] galexcd has left the channel [08:44] polotek has joined the channel [08:44] sebastia_ has joined the channel [08:45] davidbanham has joined the channel [08:46] cognominal_ has joined the channel [08:47] zilch has joined the channel [08:47] sebasti__ has joined the channel [08:50] ditesh|cassini has joined the channel [08:50] blup has joined the channel [08:50] dnjaramba has joined the channel [08:50] level09 has joined the channel [08:51] liquidproof has joined the channel [08:51] smtlaissezfaire has joined the channel [08:51] damiano: TheJS, i have to check all the logged users of my website.... i create a session for each logged user. I have to deny double login (the same user that login two times)... is there a sense to check all the session on redis to understand if a user is already logged ? [08:53] robhawkes has joined the channel [08:54] mendel__ has joined the channel [08:55] __doc__ has joined the channel [08:55] seivan has joined the channel [08:56] TheJH: damiano, I don't have much experience with express, connect or redis (nearly none) [08:57] damiano: k i will ask to tjholowaychuk [08:58] hlindset has joined the channel [08:58] sebastia_ has joined the channel [08:58] hlindset has joined the channel [08:58] k1ttty has joined the channel [08:58] mendel_ has joined the channel [08:59] mosen: heya, i saw a module using fs.sendfile but no doco, I guess its deprecated api? [09:00] FireFly has joined the channel [09:00] ryah: mosen: well - don't use it [09:00] ryah: it's a bit hidden on purpose [09:00] ryah: we'll probably have a more general purpose thing that supports windows soon [09:01] mosen: ryah, no problems, will switch to the public stuff [09:01] tshpaper has joined the channel [09:02] mosen: and thanks for the code [09:04] davidbanham has joined the channel [09:04] blueadept: would anyone know why this callback is returning undefined? http://pastie.org/private/9v7pl1slmqvx9sg5kij2g . i returns fine without the callback [09:05] Emmanuel` has joined the channel [09:06] blueadept: ah wait i know why, scope [09:06] mosen: hehe [09:07] icebox has joined the channel [09:07] sebasti__ has joined the channel [09:08] zilch: Hi All, I have possible forever.js issue ... I may be incorrect with my assumption so I am sharing test scenario with you ... https://gist.github.com/1141749 [09:08] Nexxy has joined the channel [09:08] hide has joined the channel [09:08] zilch: Here forever is only able to restart my node process when the error is thrown by express server ... [09:09] zilch: if the error is thrown by anywhere else ... see line 9 ... it fails to restart !!! [09:10] zilch: is it acceptable ? [09:11] zilch: one can run and see the results ... [09:11] skm has joined the channel [09:11] bzinger has joined the channel [09:11] a2800276 has joined the channel [09:12] ryah: a2800276: cool domain name [09:14] cognominal___ has joined the channel [09:15] seivan has joined the channel [09:16] mc_greeny has joined the channel [09:16] CIA-65: node: 03Ryan Dahl 07master * r5b58473 10/ src/node_version.h : Now working on v0.5.5 - http://bit.ly/o4qawH [09:17] markwubben has joined the channel [09:18] jetienne: (function(){ foobar.. })(); <- does this has a name ? 'forced closure' or something ? [09:19] sebastia_ has joined the channel [09:23] mosen: anonymous self executing function? [09:24] sebasti__ has joined the channel [09:24] icebox: jetienne: super closure :) [09:25] jetienne: ok so lets say there are no name :) [09:26] jetienne: 'anonymous self executing function to force closure' is super explicit but super long :) [09:26] yuroyoro has joined the channel [09:28] sebastia_ has joined the channel [09:29] zippy has joined the channel [09:30] masylum has joined the channel [09:30] bosphorus has joined the channel [09:30] masylum: hi [09:30] sebasti__ has joined the channel [09:31] zippy: Hi! Does anyone know if there is a possibility for sql server to send notifications every time a update/insert occurs and node.js to receive that notification? [09:31] zilch: jetienne, I have possibly closed in to the issue we are facing with running express.js [09:31] zilch: It looks forever.js something to do with it [09:32] zilch: jetienne, using cluster it is working fine :) [09:32] jetienne: zilch: :) [09:32] masylum: I have a stupid doubt about deploying nodejs apps [09:32] bbrand0n has joined the channel [09:33] masylum: when I want to run commands over ssh, it doesn't load ~/.profile [09:33] masylum: so it never loads npm and node paths [09:33] isaacs: masylum: add this to ~/.bashrc: source ~/.profile [09:34] masylum: ok [09:34] astropirate has joined the channel [09:34] masylum: thanks isaacs [09:34] booo has joined the channel [09:35] burningdog has joined the channel [09:36] sebastia_ has joined the channel [09:36] zippy: anyone? [09:36] Croms has joined the channel [09:37] sebasti__ has joined the channel [09:37] zilch: zippy, wrong forum to ask !! ask in respective sql server product forum for such feature !! [09:38] nerdfiles1 has joined the channel [09:38] nerdfiles1 has left the channel [09:38] zippy: ok thanks [09:38] zilch: jetienne, see https://gist.github.com/1141749 along with the code as comment [09:38] industrial: is there a way of viewing raw HTTP data going between a local NodeJS server and a local test suite making requests to this? [09:39] jetienne: zilch: no time now [09:40] zilch: jetienne, oh !!! sure !! [09:40] TheJH: zilch, actually, there is a npm module for notifications when a mysql db gets changed [09:40] adammw111 has joined the channel [09:41] TheJH: can't rememebr the name, but it exists [09:41] TheJH: industrial, wireshark [09:41] TheJH: industrial, sniff on the "lo" interface [09:42] adammw111: I'm trying to write a node module that has a object which inherits EventEmitter, but all the functions on the prototype don't seem to be present when I require(). Is there an order that has to be used, or something special? [09:42] TheJH: adammw111, how do you do the inherit stuff? [09:43] adammw111: util.inherits(Conversation, EventEmitter); where Converstation is my object and EventEmitter is require('events').EventEmitter [09:43] industrial: TheJH: ah, right. [09:43] Charuru has joined the channel [09:43] mosen: adammw111, I (think) that inherits will replace the prototype? [09:44] adammw111: So then I should just put it before I start changing the prototypes... that seems to make sense, although annoying. [09:44] zilch: TheJH, well his question didn't specified the sql server product unless he wanted MS SQL server ... [09:45] zilch: TheJH, still it is good to know that such things exists :) [09:45] TheJH: zilch, I'd just ask, and most beginners who use sql use mysql [09:45] mosen: adammw111, i hope one of these guys corrects me :) [09:45] adammw111: mosen, sounds right.. moving util.inherits above the Conversation.prototype.connect = function(){...} works. [09:46] mosen: adammw111, yeah and just augment it with properties from there [09:49] zilch: TheJH, apologies , noted !! .. will take care !! [09:52] socketio\test\83 has joined the channel [09:54] tbassetto has joined the channel [09:54] zilch has joined the channel [09:55] adammw111: I'm still having trouble with EventEmitter, my module works fine if I use this.emit in the function, but I need to emit from within the callbacks inside the function, and doing var emit = this.emit doesn't seem to work. [09:56] TheJH: adammw111, that's how it's supposed to be [09:56] TheJH: adammw111, do you know how "this" works? [09:57] adammw111: TheJH: What's the right way of emitting events from within callbacks? "this" refers to the object/function that is currently being executed (by default, some weirdness happens with .call or .apply) [09:58] TheJH: adammw111, "var self = this" in outer scope, "self.whatever()" in inner scope [09:58] damiano: is there a addslashes function for \' \" ? [09:59] TheJH: damiano, for what purpose? [10:00] blueadept: what would i need to do to pass this fobj object to the callback? http://pastie.org/private/9v7pl1slmqvx9sg5kij2g [10:00] NetRoY has joined the channel [10:01] TheJH: blueadept, aren't you already doing that? [10:01] blueadept: comes back undefined [10:01] blueadept: how do i get it out of exec [10:02] TheJH: blueadept, I can spot no way it can be undefined, could you show me the code that uses it? [10:02] TheJH: e.g. where you call newList [10:03] Wizek has joined the channel [10:03] damiano: TheJS for mysql [10:03] TheJH: damiano, are you talking to me? [10:03] TheJH: H, not S :P [10:03] damiano: yes [10:04] damiano: eheheh [10:04] damiano: :D [10:04] damiano: excuse me [10:04] TheJH: damiano, use prepared statements or a higer abstraction [10:04] blueadept: TheJH: refresh [10:04] blueadept: its at the bottom [10:04] TheJH: blueadept, "callback(fobj)" and "function(err, ok)" - can you see it? :P [10:04] damiano: i'm investigating if mysql-node has a function to "Escape" this characters [10:05] blueadept: 0.o [10:05] davidbanham has joined the channel [10:05] TheJH: damiano, use a higher abstraction where you don't have to care about it [10:05] blueadept: wah it worked [10:05] blueadept: i need to take a break [10:06] blueadept: been at this a while [10:06] damiano: what do you mean with higher abstraction ? [10:06] blueadept: ty TheJH [10:06] TheJH: damiano, you're using felixge's node-mysql, correct? [10:06] damiano: yes [10:06] damiano: with [10:06] damiano: mysql-pool [10:07] hij1nx has joined the channel [10:08] idefine: if you're working on several packages and some depend on others (all locally). How are you managing your package dependencies with npm? just npm install package_dir where you need it? [10:08] TheJH: damiano, `client.query(SELECT COUNT(*) FROM users WHERE user = ? AND pass = ?`, [user, passs])` or so [10:08] TheJH: damiano, that way you don't have to escape yourself [10:08] TheJH: s/passs/pass/ [10:09] einaros_ has joined the channel [10:09] damiano: TheJH, a problem [10:09] damiano: what about if i have to add a number ? [10:09] TheJH: idefine, "sudo npm link" in the dependency, "npm link " in the depending package [10:09] micheil has joined the channel [10:09] damiano: i don't see '?' [10:10] damiano: so if i had id = ? [10:10] damiano: [user, pass, id] (but id is a number [10:10] damiano: how to solve it? [10:11] TheJH: damiano, I think I don't understand you. client.query('SELECT COUNT(*) FROM users WHERE user = ? AND pass = ? AND id = ?', [user, pass, id]) [10:11] idefine: TheJH: brilliant, thanks...is it possible to unlink at some point? [10:12] temp01 has joined the channel [10:12] zilch has joined the channel [10:12] damiano: TheJH Exactly... but id has a int value [10:12] idefine: TheJH: nvmnd, yes it is [10:12] einaros_: there's something profound about being in the irc channel #node.js -- via a irc client powered by node.js and socket.io [10:12] damiano: so it doens t have to add ' [10:12] jetienne_ has joined the channel [10:12] damiano: like '10' [10:12] damiano: because if is not a string (varchar) [10:13] damiano: *if --> id [10:13] TheJH: damiano, I think that adding the quotes won't cause any problems [10:13] TheJH: einaros_, where? http://beta.2x.io/ ? [10:14] damiano: id = '10' where id is an integer hmmm i think yes [10:14] einaros_: TheJH: no, that just happens to be one of the addresses for my node box [10:14] einaros_: TheJH: http://screencast.com/t/ifcT3l7Zjre [10:14] TheJH: damiano, let's ask in #mysql [10:14] damiano: ok [10:15] damiano: but i can write it [10:15] damiano: *there [10:15] damiano: #mysql :Cannot send to channel [10:15] damiano: can you ask it for me? :D [10:16] jj0hns0n has joined the channel [10:16] jomoho has joined the channel [10:17] Net_RoY has joined the channel [10:26] fermion has joined the channel [10:27] nhaesler has joined the channel [10:30] okuryu has joined the channel [10:30] tbassetto has joined the channel [10:32] dexter_e has joined the channel [10:35] hellp has joined the channel [10:36] zilch has joined the channel [10:36] tomb_ has joined the channel [10:44] jamonkko has joined the channel [10:47] JumpMast3r has joined the channel [10:47] zilch has joined the channel [10:55] zilch has joined the channel [10:55] skm has joined the channel [10:59] fairwinds has joined the channel [11:00] marcello3d has joined the channel [11:01] zilch has joined the channel [11:02] unlink has joined the channel [11:02] unlink has joined the channel [11:03] markwubb_ has joined the channel [11:04] weezle has joined the channel [11:05] sebastia_ has joined the channel [11:06] davidbanham has joined the channel [11:07] ttpva has joined the channel [11:08] mendel_ has joined the channel [11:11] sebasti__ has joined the channel [11:13] sebastia_ has joined the channel [11:13] Sembiance: love being a node.js/cutting edge developer. so very productive! just started a new project yesterday, already using: yui3, normalize.css, nginx, node.js, fugue, express.js, dust.js, step, JSV, stylus, mongolian, mongodb [11:13] Sembiance: Fun :) [11:14] Sembiance: will be adding elasticsearch to that list at some point here. json for the win ;) [11:16] davve: too many dependencies ;) [11:17] davve: node can do it all ! [11:17] stephank has joined the channel [11:17] ghv has joined the channel [11:19] sebastia_ has joined the channel [11:20] m00p has joined the channel [11:21] zilch has joined the channel [11:22] kulor-uk has joined the channel [11:26] thalll has joined the channel [11:27] materialdesigner has joined the channel [11:28] sebastia_ has joined the channel [11:29] einaros_: hm. hadn't heard about fugue [11:29] hoodoos has joined the channel [11:29] einaros_: could use something like that for draw.2x.io [11:30] k1ttty has joined the channel [11:30] industrial: Anyone here use node-inspector? I'm having trouble getting it to work [11:30] zilch has joined the channel [11:30] hoodoos: hello guys, anyone ever dealt with zero width space in url? like when in utf8 document link looks fine, but with that damn space in the end, most sites will return 404. i can't seem to find a way to remove it. with nginx atleast :( [11:30] industrial: I have started my node --debug app.js and the node-inspector is running. If I go to the url in Chrome then I can't select app.js from the list of sourced javascript files [11:31] industrial: Instead that list of files is the chrome interface code itself [11:32] jbpros has joined the channel [11:34] sebasti__ has joined the channel [11:37] marcello3d has joined the channel [11:37] navaru has joined the channel [11:37] marcello3d: Sembiance: woo mongolian :D [11:38] sebastia_ has joined the channel [11:42] |fly| has joined the channel [11:42] adrianmg has joined the channel [11:42] sebasti__ has joined the channel [11:43] TheJH: industrial, I've used it some time ago [11:43] __tosh has joined the channel [11:44] davidcoallier: Hmm scope issues with writeHead and write. Boo! [11:44] TheJH: davidbanham, scope issues? [11:44] davidcoallier: I keep getting you have to use writeHead before write :-) [11:44] davidcoallier: Something with my fs reading I reckon. [11:45] TheJH: davidbanham, could you gist your code? [11:45] davidcoallier: TheJH: it's a bit large, but it's on github, hold on a sec. [11:45] industrial: TheJH: never mind, I got it [11:46] sebastia_ has joined the channel [11:46] damiano has joined the channel [11:46] damiano: hello [11:47] akshatj has joined the channel [11:47] brianseeders has joined the channel [11:47] cjm has joined the channel [11:48] Ginlock has joined the channel [11:48] bosphorus has joined the channel [11:49] davidcoallier: hehe TheJH https://github.com/davidcoallier/node-php/blob/testing/lib/nodephp.js#L150 <-- [11:49] boehm has joined the channel [11:49] davidcoallier: If I remove this response.end(body) or replace it with response.write(body), then response.end(), etc. I get { message: 'You have to call writeHead() before write()' [11:49] davidcoallier: , stack: [Getter/Setter] [11:49] davidcoallier: If I remove it altogether and return nothing in my response it's fine. [11:51] TheJH: davidbanham, sure that the stuff in your try clause doesn't throw? [11:51] toxico has joined the channel [11:51] TheJH: davidbanham, if it throws before writeHead, it won't do the writehead and go on doing stuff [11:51] davidcoallier: Ah I think you got it ;-) [11:51] davidcoallier: *facepalm* [11:52] odie5533 has joined the channel [11:52] temp02 has joined the channel [11:52] eee_c has joined the channel [11:52] odie5533: When errors are thrown, they are like [object Object].myHandler. Is there a way to name the object so it's easier to read? [11:54] TheJH: odie5533, set its toString property to a function that returns whatever string you want it to return [11:54] davidbanham: TheJH: Different David! Confused the heck out of me for a minute there. [11:54] TheJH: :D [11:54] davidcoallier: ;) [11:54] davidcoallier: I figured it'd be funnier to not mention it :) [11:55] odie5533: TheJH: I must be doing it wrong. can you give me an example? [11:56] TheJH: v8> a={}; a.toString=function(){return "foo"}; console.log(a+""); [11:56] v8bot_: TheJH: CONSOLE: ["foo"], OUTPUT: undefined [11:56] TheJH: odie5533, seems like it works [11:57] TheJH: v8> a={}; a.toString=function(){return "foo"}; a.stupid = function(){ TODO() }; a.stupid() [11:57] v8bot_: TheJH: ReferenceError: TODO is not defined [11:57] TheJH: aww, gimme the stack :( [11:57] odie5533: I tried your console.log(this+"") and that worked. but when I see an error, it does not show the toString name. It still shows [object Object] [11:57] TheJH: v8> a={}; a.toString=function(){return "foo"}; a.stupid = function(){ TODO() }; try {a.stupid()}catch(e){console.log(e.stack)} [11:57] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:58] booo has joined the channel [11:58] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:58] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:58] TheJH: oops... [11:58] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:58] odie5533: loop bot! [11:58] davidcoallier: Hah, TheJH I just move out my writeHead() outside of the try/catch block and it works nicely now. [11:58] davidcoallier: Strange. [11:58] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:58] replore has joined the channel [11:58] replore_ has joined the channel [11:58] TheJH: HAHAHA!!! [11:58] v8bot_: TheJH: [Output truncated...] [11:58] odie5533: aww [11:58] TheJH: oh :( [11:58] Sembiance: marcello3d: yah. It's my first time using mongodb. I searched for "node.js mongodb" in google and found 'mongoose'. Quickly realized that I didn't want such a 'heavy' lib to just access mongodb. I then discovered mongolian and I've been super duper happy with it so far :) [11:58] bnoordhuis has joined the channel [11:58] zilch has joined the channel [11:58] Sembiance: marcello3d: so thanks for making it :) [11:58] marcello3d: you're welcom [11:59] marcello3d: :) [11:59] TheJH: v8> a={}; a.toString=function(){return "foo"}; a.stupid = function(){ TODO() }; try {a.stupid()}catch(e){console.log(e.stack.replace(/\n/g, " "))} [11:59] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:59] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:59] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:59] TheJH: man, v8bot :( [11:59] marcello3d: have to jet, ttyl! [11:59] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:59] v8bot_: TheJH: at Socket.emit (events.js:61:17) [11:59] v8bot_: TheJH: [Output truncated...] [11:59] odie5533: TheJh: let it handle the error rather than catching it [11:59] annihil4tor has joined the channel [12:00] TheJH: odie5533, just tried it on the console, doesn't work, you're right :( [12:00] sebastia_ has joined the channel [12:01] mendel_ has joined the channel [12:01] TheJH: odie5533, found a way: a={constructor: {name: "BAR"}}; a.toString=function(){return "foo"}; a.stupid = function(){ TODO() }; a.stupid() [12:02] TheJH: odie5533, this gives me BAR.stupid in the stacktrace [12:03] odie5533: how would I do that using a prototype? [12:04] TheJH: odie5533, maybe put in an intermediate prototype that's just for getting a useful name? [12:05] TheJH: yes, seems a bit hackish [12:05] odie5533: I don't even understand it [12:06] TheJH: odie5533, could you paste some example code in a gist or so and let me mess around with it? [12:06] odie5533: var Foo = function(){}; Foo.prototype.constructor['name'] = "Foo"; // not working [12:06] odie5533: that's basically the gist of it. [12:07] coreb has joined the channel [12:07] TheJH: odie5533, Foo.name = "Foo"? [12:07] odie5533: nope. [12:07] odie5533: well, I tried Foo.prototype.name [12:07] odie5533: neither work [12:08] odie5533: got it I think [12:09] odie5533: yep. Foo.prototype.constructor = {name:'FOO'}; [12:09] AAA_awright_ has joined the channel [12:09] odie5533: ty TheJH :) [12:11] gtramont1na has joined the channel [12:13] metellus has joined the channel [12:13] zilch has joined the channel [12:14] piscisaureus has joined the channel [12:15] damiano: app.use() wto handle errors (err, req, res, next) must to be at the end of the app.js script? [12:15] jamonkko has joined the channel [12:15] adrianmg has joined the channel [12:16] Yoric has joined the channel [12:17] harut has joined the channel [12:17] harut: we have a problem "node was compiled without openssl support" [12:17] harut: I have compiled node from the sources [12:18] harut: May you could help please? [12:19] c4milo1: harut: linux? [12:19] brokenjames has joined the channel [12:19] TheJH: harut, did you follow the instructions in https://github.com/joyent/node/wiki/Installation ? [12:21] craigpetchell has joined the channel [12:21] hij1nx has joined the channel [12:22] TheJH: davidcoallier, are you doing anything aganist directory traversal attacks in your code? [12:22] mendel_ has joined the channel [12:23] tomb| has joined the channel [12:24] blup: what's the best way of unpacking (function(p,a,c,k,e,d)) javascript? [12:24] TheJH: blup, http://jsbeautifier.org/ [12:24] jarek has joined the channel [12:24] jarek has joined the channel [12:25] odie5533: blup: perhaps you want the arguments keyword? [12:25] newbie has joined the channel [12:25] newbie: Hello all. [12:25] newbie: $ git clone git://github.com/joyent/node.git Cloning into node... github.com[0: 207.97.227.239]: errno=Connection refused fatal: unable to connect a socket (Connection refused) [12:25] Guest67336: Any comments on the above error? [12:26] odie5533: lol Guest67336. cant connect to github [12:26] hoodoos has left the channel [12:26] TheJH: Guest67336, are you behind a firewall? [12:26] odie5533: not really a node.js problem, but just download the latest tarball instead OR fallback to http [12:26] Guest67336: Yes most likely [12:26] blup: odie5533: what do you mean the arguments keyword? [12:26] odie5533: try the http fallback [12:26] TheJH: Guest18468, use https://github.com/joyent/node.git instead of the git url [12:26] odie5533: blup: well your question wasn't well formed. [12:27] Jippi has joined the channel [12:27] cccaldas has joined the channel [12:27] odie5533: blup: So my answer might not make sense =P [12:27] TheJH: odie5533, I understood him :P [12:28] Guest67336: TheJH, Is being behind a firewall is the most likely reason for the error? [12:28] TheJH: Guest18468, yes [12:28] mendel_ has joined the channel [12:28] odie5533: I think DNS is more likely [12:28] TheJH: (imo) [12:28] odie5533: wait dns is fine nvm [12:29] odie5533: yeah firewall. some block the git whatever it is, so http usually works [12:30] jerrysv has joined the channel [12:30] ryan0x2 has joined the channel [12:31] Guest67336: Trying "git clone https://github.com/joyent/node.git" gave the below error [12:32] bnoordhuis: i think github is having issues [12:32] bnoordhuis: i can't `git fetch` either [12:32] Guest67336: $ git clone https://github.com/joyent/node.git Cloning into node... error: Failed connect to github.com:443; Operation not permitted while accessing https://github.com/joyent/node.git/info/refs fatal: HTTP request failed [12:32] TheJH: the github is down? oh no!!!!! [12:32] TheJH: we're all going to die!!!! [12:33] Sembiance: Guest67336: the clone worked fine for me. [12:33] bnoordhuis: http://status.github.com/ <- all systems operational [12:33] bnoordhuis: LIES! [12:33] Sembiance: Guest67336: copied your command verbatim. no problems. [12:33] Guest67336: Sembiance, Then I guess it is because I am behind a firewall [12:34] TheJH: hmm, works for me [12:34] bnoordhuis: and now it works again [12:34] Sembiance: You know what I would love? a node.js powered full text module at the level of awesomeness of lucene :) [12:34] Guest67336: Will try to get out of the firewall and try again [12:34] Guest67336: Thank you all for your help [12:34] Sembiance: or maybe not. Maybe full text search is something you should treat as a database. something that is just fine to have as an external service to access [12:35] Sembiance: I'm gonna look into using elasticsearch because solr's configuration and complexity makes me throw up inside a little :) [12:35] elsig` has joined the channel [12:35] StepanKuzmin has joined the channel [12:36] bshumate has joined the channel [12:36] bshumate has joined the channel [12:39] woodiz has joined the channel [12:39] bradleymeck has joined the channel [12:40] mendel__ has joined the channel [12:40] deedubs has joined the channel [12:42] cjm has joined the channel [12:43] woodiz: Hi, I am looking for some who also uses node on a joyent smartmachine. [12:43] Sembiance: wtf is a'joyent smartmachine' [12:43] bnoordhuis: woodiz: i do [12:43] Sembiance: just googled it. [12:44] Sembiance: weird. [12:44] woodiz: the virtual machines that joyent provides [12:44] bnoordhuis: Sembiance: joyent has its own fork of solaris [12:45] Sembiance: woodiz: just curous, is there a specific reason you need someone who uses node on a joyent box rather than just node in general? [12:45] Sembiance: bnoordhuis: interesting, I didn't realize anyone used solaris anymore :) [12:46] bnoordhuis: Sembiance: joyent seems to get a lot of mileage out of it [12:46] woodiz: well I am trying to get npm to work to install express. Have been using git clone before but when I clone express it needs node 0.6 and do not get npm to work [12:46] woodiz: npm just installs things under the admin folder like ~/.node_libraries/.npm/express/active/package/ [12:47] TheJH: node 0.6? WTF? [12:47] Sembiance: bnoordhuis: I'm slightly curious what solaris gave them that other un*x like distros wouldn't have. [12:47] bnoordhuis: Sembiance: proper containerization [12:47] TheJH: node 0.6? did I miss something? [12:47] mendel_ has joined the channel [12:48] bnoordhuis: linux until recently didn't have that (and it's still not feature complete) [12:48] bnoordhuis: dtrace is nice too [12:48] woodiz: well I cant find any node 0.6 version... [12:48] TheJH: woodiz, because it doesn't exist [12:49] woodiz: Express 3.x (master branch) is compatible with node 0.6.x and connect 2.x from https://github.com/visionmedia/express [12:49] TheJH: woodiz, so, does the npm way work for you? [12:49] woodiz: no the npm does not work [12:49] TheJH: woodiz, could you gist the error? [12:50] woodiz: what is gist? [12:50] edude03 has joined the channel [12:51] TheJH: !@woodiz mem gist [12:51] jhbot: woodiz, Gist is kind of a pastebin. Every paste is a git repo. https://gist.github.com/ [12:51] arthurdebert has joined the channel [12:51] woodiz: it does not get any errors, have been trying to figure out how to install it in the folder I am in but still just install in some other folder. I use --global [12:52] Circlefusion has joined the channel [12:52] TheJH: woodiz, don't use --global [12:53] benvds has joined the channel [12:53] TheJH: woodiz, --global for cli commands, without --global for modules you want to use in your code [12:53] calliostro has joined the channel [12:53] Country has joined the channel [12:53] woodiz: ok got it. here https://gist.github.com/1141968 [12:54] TheJH: woodiz, that version of npm is ancient [12:54] TheJH: !@woodiz mem npm-install [12:54] jhbot: woodiz, you can install npm by doing "curl http://npmjs.org/install.sh | sudo sh". If you don't feel comfortable piping data from http in a sudo'ed shell (which really isn't a good idea), you can also download it, look at it and then pipe it in the shell. [12:55] damiano: is there Express boss ? [12:55] damiano: :) [12:55] BoarK has joined the channel [12:55] TheJH: damiano, the main developer of express currently isn't online [12:56] damiano: someone call him [12:56] damiano: :D [12:57] paul_k has joined the channel [12:57] booo: can someone tell me how to notifiy the main thread from a worker and exchange data between them. the main thread should call a callback function for the worker once the worker notified him [12:58] industrial: How would I rewrite this using underscore.js ? https://gist.github.com/410e55759fd83b1dadce [12:58] industrial: I see map can act on objects, but still returns an Array not an Object [12:58] TheJH: booo, are you creating C++ code? if not, no threads. [12:59] booo: TheJH, yeah talking about c++ [12:59] woodiz: Thanks that worked. new version of npm but now nothing happens with npm install express and if I do it from git I get this error https://gist.github.com/1141975 [12:59] industrial: #C++ ? :P [12:59] TheJH: woodiz, did you give npm some time? [12:59] CIA-65: node: 03Arnout Kazemier 07v0.4 * r7ba30a4 10/ doc/api/fs.markdown : [12:59] CIA-65: node: Small changes for fs.watchFile. Fixed broken markdown. Changed variable `f` to a proper filename. [12:59] CIA-65: node: Fixes #1507. - http://bit.ly/ruQJhK [12:59] TheJH: woodiz, I'd at least wait a few minutes [12:59] mizerydearia has joined the channel [13:00] AaronMT has joined the channel [13:00] `3rdEden: Nice highlight :p [13:00] woodiz: first thing took no time just ended, second try went fast but error [13:00] TheJH: woodiz, gist the error, please [13:00] woodiz: error https://gist.github.com/1141975 [13:01] TheJH: woodiz, WTH did you enter? just do "npm install express" [13:01] CrisO has joined the channel [13:02] futuredarrell has joined the channel [13:02] woodiz: npm install express does nothing just like pressing the enter on the terminal. the other that makes the error is the following sudo npm install https://github.com/visionmedia/express.git [13:03] TheJH: woodiz, the first one does nothing? really? could you gist that? [13:04] mehtryx has joined the channel [13:04] mehtryx1 has joined the channel [13:05] mehtryx has joined the channel [13:06] balupton has joined the channel [13:10] davidsklar has joined the channel [13:11] woodiz: Thanks theJH and others could install express with npm after updating to latest version standing outside the node_modules folder and deleting the olde node_modules folders. Real thanks for all the help:) [13:12] kennyluck has joined the channel [13:12] kennyluck has left the channel [13:12] zilch has joined the channel [13:13] Metal3d has joined the channel [13:14] damiano: how can i get the IP of the request with Express? [13:14] colinclark has joined the channel [13:16] hybsch has joined the channel [13:20] tjholowaychuk has joined the channel [13:21] damiano: tjholowaychuk, Hi! [13:21] damiano: :) [13:21] scott_gonzalez has joined the channel [13:21] tjholowaychuk: hey hey [13:21] deedubs: run [13:21] damiano: i read your express-redis [13:21] damiano: or [13:21] damiano: connect-redis [13:21] damiano: i found a problem [13:21] damiano: touch() you wrote it called automatically [13:21] damiano: but i see that the codice (expire) is not update "each time" [13:21] damiano: i have to use save() [13:22] damiano: to update the expiration [13:22] fumanchu182 has joined the channel [13:22] damiano: wrong? [13:22] tjholowaychuk: touch is more of an internal thing but yeah you're right [13:22] JoshC1 has joined the channel [13:24] tiemonster has joined the channel [13:24] Peniar has joined the channel [13:24] tiemonster: Has anyone successfully installed node.js on OS X Leopard? [13:25] adnam: hmm, yes [13:25] edude03 has joined the channel [13:25] adnam: pretty sure my laptop runs leopard [13:25] damiano: tjholowaychuk, so i need to call save() each time ? [13:25] tjholowaychuk: damiano yeah, if you look at the code save() is what actually does the socket writes, touch() just sets some properties [13:26] tiemonster: I tried the precompiled binaries and get some strange error about "unknown required load command" [13:26] damiano: ok [13:26] tiemonster: which when I google seems to have something to do with static vs dynamic linking [13:26] kriszyp has joined the channel [13:26] hornairs has joined the channel [13:26] tiemonster: nor do I know where to start in installing gcc, python-dev, and openssl on a mac... [13:27] butu5 has joined the channel [13:27] butu5: what is the best way to copy large video files using nodejs [13:27] butu5: spawning child process? "cp x y" or any other node specific code [13:28] adammw111 has joined the channel [13:29] kenperkins has joined the channel [13:30] butu5: I spawned child process and did "ulimit -n 512" able to copy.. [13:30] hippich has left the channel [13:30] TheJH: butu5, open the source and destination and pipe()? [13:30] adammw111: Hi, I'm writing an asynchronous net app but I've got problems in that my app's crashing with error "write UNKNOWN". I'm guessing it's from trying to write to a socket that's already been closed, but the 'end' listener has fired yet to set .connected (a custom property) to false. Is there a way to check if a socket is writable before calling write? [13:31] Frippe has joined the channel [13:32] adammw111: um, i feel a bit stupid now.. is it as simple as stream.writable ? [13:32] butu5: TheJH: I am using child = exec "cp #{sourceDir}/#{s} #{targetDir}/#{s}",(error,stdout,stderr) -> [13:32] shipit has joined the channel [13:33] CIA-65: node: 03Ben Noordhuis 07v0.4 * re00c2ec 10/ cmake/package.cmake : build: remove 1024 char read limit from cmake file - http://bit.ly/qk70BD [13:34] TheJH: butu5, I'd do it using fs.open() and streams pipe() [13:35] aheckmann has joined the channel [13:35] butu5: sure..will do it.. but I don't want to open those files any manipulation [13:35] dherman has joined the channel [13:36] moop has joined the channel [13:36] butu5: opening and streaming will it open and read the stuff byte by byte or anything? [13:36] TheJH: butu5, not exactly byte by byte, it will do it in bigger chunks [13:37] robhawkes has joined the channel [13:38] butu5: hmmm.... [13:38] broofa has joined the channel [13:39] sniper506th has joined the channel [13:40] versicolor has joined the channel [13:41] shinuza has joined the channel [13:41] bradleymeck has joined the channel [13:42] jhbot has joined the channel [13:43] Frippe has joined the channel [13:44] burningdog_ has joined the channel [13:45] progme has joined the channel [13:45] jhbot has joined the channel [13:46] burningdog_ has joined the channel [13:47] abourget has joined the channel [13:47] CIA-65: node: 03Ben Noordhuis 07master * rfa378ee 10/ (lib/net_legacy.js lib/net_uv.js): [13:47] CIA-65: node: net: defer DNS lookup error events to next tick [13:47] CIA-65: node: net.createConnection() creates a net.Socket object [13:47] CIA-65: node: and immediately calls net.Socket.connect() on it. [13:47] CIA-65: node: There are no event listeners registered yet so [13:47] CIA-65: node: defer the error event to the next tick. [13:47] CIA-65: node: Fixes #1202. - http://bit.ly/pCyDBi [13:47] CIA-65: node: 03Ben Noordhuis 07master * r3cac576 10/ test/simple/test-http-dns-error.js : test: add test for #1202, uncatchable exception on bad host name - http://bit.ly/oRSRls [13:47] CIA-65: node: 03Ben Noordhuis 07master * ra002f4f 10/ Makefile : test: enable simple/test-http-dns-error for `make test-uv` - http://bit.ly/oeDRqd [13:48] CIA-65: node: 03Ben Noordhuis 07v0.4 * r4e204f3 10/ lib/net.js : [13:48] CIA-65: node: net: defer DNS lookup error events to next tick [13:48] CIA-65: node: net.createConnection() creates a net.Socket object [13:48] CIA-65: node: and immediately calls net.Socket.connect() on it. [13:48] CIA-65: node: There are no event listeners registered yet so [13:48] CIA-65: node: defer the error event to the next tick. [13:48] CIA-65: node: Fixes #1202. - http://bit.ly/oFq6o8 [13:48] CIA-65: node: 03Ben Noordhuis 07v0.4 * r028b33b 10/ test/simple/test-http-dns-error.js : test: add test for #1202, uncatchable exception on bad host name - http://bit.ly/oZnR8G [13:49] jhbot has joined the channel [13:49] hellp has joined the channel [13:50] Poetro has joined the channel [13:50] Poetro has joined the channel [13:51] Country has joined the channel [13:51] Tom has joined the channel [13:52] Tom: How should one check if an object is a Buffer? [13:52] hlindset has joined the channel [13:52] TheJH: Tom, `foo instanceof Buffer` should work [13:53] Tom: TheJH: ah right, thank you [13:53] tjholowaychuk: Tom there's also Buffer.isBuffer() like Array.isArray [13:53] thalll has joined the channel [13:53] eguest309 has joined the channel [13:54] Tom: tjholowaychuk: ah right, I prefer that way, thank you too [13:54] eguest309: hello guys .is there a way to create raw sockets from the client side.ie that is from a web browser . kind of like a tellent client on the web side not using web sockets? [13:55] thalll_ has joined the channel [13:56] TheJH: eguest309, no, not raw sockets, but websockets [13:56] thomblake has joined the channel [13:56] JJMalina has joined the channel [13:56] micheil: the reason websockets exist is due to the security factors in giving the client side access to raw sockets. [13:56] TheJH: eguest309, raw sockets are not supported by any browser [13:56] micheil: You would need to make some sort of gateway telnet <-> websocket [13:57] CIA-65: node: 03Brian White 07master * rb7c23ac 10/ (11 files in 3 dirs): Incorporate endianness into buffer.read* function names instead of passing in a boolean flag - http://bit.ly/pmnF0r [13:58] butu5 has joined the channel [13:58] jscheel has joined the channel [13:58] eguest309: okay. michael,TheJH [13:59] thomblake has left the channel [13:59] ditesh|cassini has joined the channel [14:00] kulor-uk has joined the channel [14:01] smtlaissezfaire has joined the channel [14:01] BillyBreen has joined the channel [14:03] ironlad has joined the channel [14:03] eguest309: micheil TheJH. do u know of any libraries that will allow me to do this? [14:04] seivan has joined the channel [14:04] eguest309: i can make a proxy server on my own to link the two. [14:05] eguest309: but are there any libraries out there for this ?? [14:05] bradleymeck: node-http-proxy [14:05] TheJH: eguest309, for sending messages over websockets, there's a bunch of libs, socket.io is the most popular one [14:06] TheJH: bradleymeck, he wants to proxy telnet over websockets, no http [14:06] micheil: I wouldn't recommend socket.io for a telnet / websocket proxy [14:06] micheil: I'd be inclined to use something like node-websocket-server or "websocket" on npm [14:08] kevwil has joined the channel [14:08] balaa has joined the channel [14:08] madsleejensen has left the channel [14:09] pandeiro has joined the channel [14:10] sdf has joined the channel [14:10] pandeiro has joined the channel [14:10] seivan has joined the channel [14:11] CIA-65: libuv: 03Augusto Henrique Hentz 07master * r51d3959 10/ src/uv-unix.c : [14:11] CIA-65: libuv: uv-unix: fix typo in definition of HAVE_PIPE2 [14:11] CIA-65: libuv: The define HAVE_PIPE2 was always being set, even when the requisites [14:11] CIA-65: libuv: were not met. - http://bit.ly/nCAl1c [14:11] CIA-65: libuv: 03Ben Noordhuis 07master * r855bebb 10/ (test/benchmark-pound.c test/echo-server.c): bench: rearm connections after close - http://bit.ly/ouR9fv [14:12] mikeal has joined the channel [14:13] damiano: someone know how to get the list of mysql users? [14:13] CIA-65: libuv: 03Augusto Henrique Hentz 07master * r7f82995 10/ src/uv-unix.c : [14:13] CIA-65: libuv: uv-unix: fix typo in definition of HAVE_PIPE2 [14:13] CIA-65: libuv: The define HAVE_PIPE2 was always being set, even when the requisites [14:13] CIA-65: libuv: were not met. - http://bit.ly/r1FNvX [14:13] TheJH: damiano, maybe you should ask in #mysql? [14:13] damiano: TheJH, i can chat there as i told you before [14:14] Metal3d has joined the channel [14:14] rfay has joined the channel [14:14] TheJH: damiano, type '/msg nickserv help register' [14:14] FleetFox: select * from mysql.user; ? [14:14] TheJH: damiano, you have to be registered to talk there, I think [14:15] kkaefer has joined the channel [14:15] a2800276 has joined the channel [14:15] CIA-65: node: 03Ben Noordhuis 07master * r01b64fc 10/ deps/uv/src/uv-unix.c : uv: upgrade to 7f82995 - http://bit.ly/r0I7zN [14:16] kevwil has joined the channel [14:16] nhaesler_ has joined the channel [14:16] Cromulent has joined the channel [14:17] pickels has joined the channel [14:17] cronopio has joined the channel [14:18] explodes has joined the channel [14:20] ceej has joined the channel [14:20] brolin has joined the channel [14:20] skm has joined the channel [14:20] frodenius has joined the channel [14:20] frodenius has joined the channel [14:21] temp01 has joined the channel [14:21] nhaesler has joined the channel [14:22] damiano: k [14:22] jakehow_ has joined the channel [14:22] jakehow has joined the channel [14:23] igl has joined the channel [14:24] CIA-65: node: 03Glen Low 07master * r04122ad 10/ (4 files in 4 dirs): crypto: PBKDF2 function from OpenSSL - http://bit.ly/pcUvnR [14:26] Frippe has joined the channel [14:27] geetarista has joined the channel [14:28] Swimming_bird has joined the channel [14:29] balaa has joined the channel [14:30] seivan has joined the channel [14:33] jerrysv has joined the channel [14:34] pjacobs has joined the channel [14:37] hkjels has joined the channel [14:38] Booster2ooo has joined the channel [14:38] Booster2ooo: Hi there [14:39] EyePulp has joined the channel [14:40] Booster2ooo: I've got a theorical question for you. Some moth ago, I built a little Web2Irc chat using Node.JS. I unfortunatly had to give up on this project because each user had the same IP which was breaking the TOS of the IRC network I'm using (3conn/ip max). [14:41] Booster2ooo: I checked Mibbit, and I saw that a user connected with their service was connected with his real IP [14:42] Booster2ooo: So I was wondering how did they acheive that [14:42] dguttman has joined the channel [14:42] brianc has joined the channel [14:43] adnam: Booster2ooo: they are perhaps connecting client-side [14:43] odie5533: I don't think so adnam [14:44] arthurdebert has joined the channel [14:44] Booster2ooo: It's wierd because it's a crossdomain websocket which isn't secure [14:44] brolin has joined the channel [14:44] odie5533: I think they use web irc protocol? [14:45] tbranyen: websockets don't have crossdomain issues Booster2ooo [14:45] Booster2ooo: (I'm still a big noob in JS/NodeJS so correct me if I'm telling bullshit ^^) [14:45] febits has joined the channel [14:45] tbranyen: they aren't affected by the SOP [14:45] Booster2ooo: tbranyen > So you can connect a websocket to any server? [14:45] tbranyen: Booster2ooo: any server that supports the websocket protocol [14:45] Booster2ooo: indeed [14:46] yhahn has joined the channel [14:46] piscisaureus has joined the channel [14:46] odie5533: http://www.qwebirc.org/ [14:47] k1ttty has joined the channel [14:47] cronopio has joined the channel [14:47] Booster2ooo: cheers, checking [14:48] sub_pop has joined the channel [14:48] losing has joined the channel [14:49] rfay has joined the channel [14:51] damiano: guys, something about async. Suppose that we have: https://gist.github.com/1142193 as you can see there are 3 "inner functions"... as far i correctly understand how it works... when "login" function are called (from app.use()) it will be executed....then another process do the first query....then wait the response.....then check the response...if there is an error throw it or do another query etc etc [14:51] Arys has joined the channel [14:51] eee_c has joined the channel [14:51] tbranyen: damiano: got some crazy whitespace going on there [14:51] Arys has left the channel [14:52] skm has joined the channel [14:52] tbranyen: damiano: might be cool to use an async lib and run those in parallel [14:52] JoshC1 has joined the channel [14:53] dshaw_ has joined the channel [14:53] heavysixer has joined the channel [14:53] damiano: ahahahah [14:53] damiano: yes i added too whitespace on this example :-D [14:54] cying has joined the channel [14:54] damiano: no no i don't want to use other thing [14:54] damiano: i need to understand how node works [14:54] damiano: is it correct what i said ? [14:54] colinclark has joined the channel [14:54] Gurpartap has joined the channel [14:54] Gurpartap has joined the channel [14:55] rfay has joined the channel [14:55] gazumps has joined the channel [14:56] SamuraiJack_ has joined the channel [14:57] jtsnow has joined the channel [14:58] kmiyashiro has joined the channel [14:58] sandropadin has joined the channel [14:59] piscisaureus has joined the channel [15:01] cafesofie has joined the channel [15:03] sonnym has joined the channel [15:04] unlink has joined the channel [15:04] unlink has joined the channel [15:05] rfay has joined the channel [15:06] jelveh has joined the channel [15:06] zilch has joined the channel [15:06] Brandonn has joined the channel [15:07] bripkens has joined the channel [15:08] dpritchett has joined the channel [15:09] pickels has joined the channel [15:10] RORgasm has joined the channel [15:10] willwhite has joined the channel [15:10] brianloveswords has joined the channel [15:12] robertfw has joined the channel [15:12] smtlaissezfaire has joined the channel [15:13] vnaren has joined the channel [15:13] vnaren has left the channel [15:13] vnaren has joined the channel [15:14] explodes: var x = new Object(); Object.definedProperty(x, 'foo', {get: function() { return this.foo}}); console.log(x.foo); >> stack overflow [15:14] eyesUnclouded has joined the channel [15:15] explodes: Or rather, "RangeError: Maximum call stack size exceeded" [15:15] industrial: explodes: seems x.foo calls the getter calls the getter calls the getter [15:16] explodes: Right, I get that but how do I return the correct value? Do I need another instance property to return? [15:18] explodes: The getter could be used to hide private variables, etc [15:18] tjholowaychuk: with 0.4.x can you not remove ALL listeners? [15:18] Tom: SubStack: hi SubStack. I was wondering, with node-buffers, how does one get the amount of buffers in the list and how does one get the buffer at index i? [15:18] tjholowaychuk: not just for a given event [15:19] zanes has joined the channel [15:19] Tom: tjholowaychuk: don't think so, at least it's not in the API [15:19] eyesUnclouded has joined the channel [15:19] Tom: guess you could iterate over each event and call removeAllListeners [15:22] butu5 has joined the channel [15:22] TheFuzzball has joined the channel [15:23] explodes: Ok, 2 things. require('http') prints out the object in a terminal. It has the property like this: getAgent: [Function: getAgent], [15:24] explodes: instead of getAgent: [Function] [15:24] softdrink has joined the channel [15:24] explodes: Why is that function named? [15:24] copyboy has joined the channel [15:24] smus has joined the channel [15:24] copyboy: hey everyone [15:25] brianc: copyboy: hi [15:25] copyboy: i just noticed the net module only accepts IP addresses [15:26] copyboy: i know i can use dns.lookup, but i just wanted to know the reason for that [15:26] TheJH: copyboy, uhm, what? I don't think so [15:27] brianc: copyboy: net module accepts a port and host. host does dns lookup automatically if it's not an ip address. [15:27] copyboy: getting "{ code: 'OK', errno: 'OK', syscall: 'connect' }" when passing the server name [15:27] brianc: "host does dns lookup" -> net module looks up the ip address of the host [15:28] TheJH: copyboy, well, "OK" seems fine, doesn't it? [15:28] copyboy: it works if i lookup and pass the IP [15:28] butu5: I am running socket.io... basic setting it up... it is saying require is not defined in client side console [15:28] TheJH: copyboy, could you gist your code? [15:28] copyboy: TheJH: yes, "Error: connect OK" [15:28] copyboy: it's weird [15:28] brianc: butu5: indeed. require is _not_ defined client side. Gist your client side code. [15:28] fatjonny has joined the channel [15:29] TheJH: copyboy, could you gist your code? [15:29] TheJH: !@copyboy mem gist [15:29] jhbot: copyboy, Gist is kind of a pastebin. Every paste is a git repo. https://gist.github.com/ [15:29] brianc: is there a place to go for people new to node to learn things? [15:29] copyboy: it's ugly though [15:29] TheJH: brianc, http://nodejs.org/docs/latest/api/ maybe? not exactly a tutorial or so, but... [15:30] TheJH: copyboy, just paste it :) [15:30] brianc: TheJH: yeah, was thinking this morning I'd like to write some really simple tutorials but don't want to reproduce stuff that's already been done [15:30] copyboy: sorry, brb, reallife stuff [15:30] explodes: function abc() {}; var x = new Object(); x.abc = abc; x.abc >>> [Function: abc] [15:30] jakehow has joined the channel [15:31] jakehow_ has joined the channel [15:31] ironlad has joined the channel [15:31] TheJH: brianc, there are some videos with ryan hacking stuff together life, but I don't know any good tutorials [15:31] brianc: k [15:31] brianc: I'll poke around a bit [15:31] brianc: I was thinking really simple starter things...like where you could almost copy/paste it in and it would run [15:31] copyboy: grrr [15:31] zanes has joined the channel [15:31] brianc: or _learn node the hard way_ [15:31] guillermo has joined the channel [15:31] explodes: versus: function X(){}; X.prototype.abc = function(){}; new X().abc >>> [Function] [15:31] wookiehangover has joined the channel [15:31] explodes: (for those who care) [15:32] explodes: now, require('riak-js') >>> { http: [Function], protobuf: [Function], defaults: { api: 'http' }, getClient: [Function], getSessionStore: [Function], HttpClient: [Getter], ProtobufClient: [Getter], ProtobufPool: [Getter], TestServer: [Getter], SessionStore: [Getter] } // What are these Getter functions? [15:33] TheJH: explodes, probably lazy-loading stuf [15:33] TheJH: *stuff [15:33] explodes: Ill get to the bottom of this. [15:33] cagdas has joined the channel [15:34] copyboy: TheJH: here we go -> https://gist.github.com/d275b5d8d4f156608700 [15:35] devongovett has joined the channel [15:36] TheJH: copyboy, ran it here, it says "[jann@Jann-PC tmp]$ node test.js [15:36] TheJH: Connecting to irc.esper.net ... [15:36] TheJH: Connected! [15:36] TheJH: " [15:36] brianc: looks like a lot of good stuff here: http://nodeguide.com/beginner.html [15:36] copyboy: then it's because i still have an old version [15:36] explodes: TheJH: You're right: var x = new Object(); x.__defineGetter__('piTo10MillionDigits', function() { SuperMath.calculatePi(10e6); } ); x.piTo10MillionDigits >>> 3.1415926555555555555... [15:36] copyboy: 0.5.2 [15:37] jbrokc has joined the channel [15:37] TheJH: copyboy, btw, by the way, there are some good irc libraries, I'm also using one of them for my bot [15:37] damiano: is there a "Scripting" module ? [15:38] copyboy: TheJH: i mostly found outdated ones, what do you use? [15:38] cognominal_ has joined the channel [15:38] TheJH: copyboy, irc-js [15:39] Spion has joined the channel [15:39] TheJH: copyboy, are you trying to create a bot or a client? [15:39] damiano: I followed the readme, I have done npm install bcrypt, but i have this problem --> http://nopaste.info/1e104d8eab.html [15:39] copyboy: TheJH: a bot [15:39] TheJH: copyboy, I'm interested. what do you wantt it to do? [15:39] brianc: damiano: what version of node? [15:39] TheJH: *want [15:40] damiano: brianc, 0.4.10 [15:40] copyboy: TheJH: to be honest, i have no idea. i'm going to use it for my channel and add whatever features might be useful [15:40] phrearch has joined the channel [15:40] phrearch: hello [15:41] brianc: phrearch: hi [15:41] phrearch: i wonder if anyone did some benchmarking on websocket servers, and what a decent amount of requests/second is [15:41] phrearch: hi brianc [15:41] phrearch: i wrote a simple program in my websocket cms server that does a roundtrip. i get at about 600-700 requests a second max on this machine [15:42] damiano: what is this problem? [15:42] phrearch: not sure if thats good or bad [15:42] damiano: Scripting module ?? [15:42] brianc: phrearch: I would think w/ websockets you wouldn't measure requests/second but maybe throughput or max number of clients [15:42] phrearch: http://hwios.org/my_mod/ [15:42] phrearch: chrome/chromium only [15:42] phrearch: brianc: max number of clients is hard to test [15:43] phrearch: at least, i didnt found any way of properly testing that yet [15:43] Metal3d has joined the channel [15:43] brianc: phrearch: benchmarkin' ain't easy [15:43] phrearch: brianc: no indeed. im not even sure if this benchmark is proper [15:43] damiano: brianc, ? [15:43] phrearch: it does a roundtrip which mainly involves url resolving and json encoding/decoding [15:44] brianc: damiano: not sure on that one. do you have node compiled with ssl? [15:44] zilch has joined the channel [15:45] damiano: yes [15:45] phrearch: amount of maximum requests it can handle makes sense to me. didnt found any benchmarks yet though [15:45] EvRide has joined the channel [15:45] phrearch: was hoping there would be some in node.js land [15:47] booo has joined the channel [15:48] c4milo1 has joined the channel [15:50] alvaro_o has joined the channel [15:52] eyesUnclouded has joined the channel [15:52] a2800276 has joined the channel [15:55] caolanm has joined the channel [15:56] catb0t has joined the channel [15:56] eguest309 has left the channel [15:56] jvduf has joined the channel [15:57] Yuffster_work has joined the channel [15:59] halfhalo-work has joined the channel [16:01] eee_c has joined the channel [16:01] jbpros has joined the channel [16:02] Qbix1 has joined the channel [16:02] ekryski has joined the channel [16:03] pjacobs2 has joined the channel [16:03] criswell has joined the channel [16:04] liquidproof has joined the channel [16:05] kenperkins has joined the channel [16:05] mikeal has joined the channel [16:06] JoshC1 has joined the channel [16:06] Destos has joined the channel [16:06] nphase has joined the channel [16:07] softdrink: anyone using cloud9? [16:08] vipaca has joined the channel [16:08] vipaca has joined the channel [16:10] jbrokc has joined the channel [16:10] jerrysv has joined the channel [16:11] CoinOpeBoy has joined the channel [16:11] dexter_e has joined the channel [16:12] fumanchu182 has joined the channel [16:13] tuhoojabotti: \o [16:13] tuhoojabotti: But not for node stuff. :D [16:13] tuhoojabotti: I edit my Chrome extension with it [16:14] tuhoojabotti: Well when I didn't have git and such set up [16:14] tuhoojabotti: http://urly.fi/bu <- this one!! [16:15] springmeyer has joined the channel [16:15] dshaw_ has joined the channel [16:15] softdrink: handy [16:16] tuhoojabotti: I did it because I kept whining to the guy who made urly.fi because he had no api, so I promised to make an extension if he did the api. ;D [16:17] tuhoojabotti: I have 3 more translations and such to add. :u [16:18] dannycoates has joined the channel [16:18] Sazpaimon has joined the channel [16:19] andrewfff has joined the channel [16:19] cafesofie has joined the channel [16:20] ekryski: tuhoojabotti: that's pretty handy. thx. [16:20] tuhoojabotti: np. :) [16:20] arthurdebert has joined the channel [16:21] pen_ has joined the channel [16:21] Destos has joined the channel [16:22] madsleejensen has joined the channel [16:22] pen has joined the channel [16:22] ank has joined the channel [16:23] febits has joined the channel [16:24] ts__ has joined the channel [16:25] cagdas has joined the channel [16:26] rabidewok has joined the channel [16:26] isaacs has joined the channel [16:27] softdrink: grrr one of the submodules that cloud9 relies on 404's on github [16:28] Guest5004 has joined the channel [16:28] zzo has joined the channel [16:29] zzo: any thoughts on : https://github.com/zzo/JUTE/issues/1 ?? [16:29] zzo: an npm issue? [16:30] smus has joined the channel [16:31] TheJH: zzo, you might want to talk to isaacs, he's online, just not in this channel [16:31] TheJH: zzo, he's the npm author [16:32] zzo: TheJH: thx [16:33] isaacs: zzo: apparently npm doesn't work with node 0.5.4. i'm not sure why. [16:33] isaacs: use 0.4.10 [16:33] isaacs: no time to fix right now. [16:34] TheJH: uh, isaacs, you're here? my client seems to be broken... [16:34] mpavel has left the channel [16:34] TheJH: :/ [16:34] TheJH: I can see the join message, but you're not in the user list... [16:35] TheJH: ah, opped and at the top of the list [16:35] mundanity has joined the channel [16:40] ronnieboy has joined the channel [16:41] TheFuzzball has joined the channel [16:42] zilch has joined the channel [16:42] halfhalo-work has joined the channel [16:42] mike5w3c has joined the channel [16:43] acid- has joined the channel [16:43] paulwe has joined the channel [16:44] shipit has joined the channel [16:44] piscisaureus has joined the channel [16:45] thalll has joined the channel [16:48] gr-eg has joined the channel [16:48] greg has joined the channel [16:50] sh1mmer has joined the channel [16:51] zemanel has joined the channel [16:51] softdrink: how does vows expect pending tests? [16:51] a2800276_ has joined the channel [16:53] zzo: isaacs: k thx [16:53] dgathright has joined the channel [16:55] chbrown has joined the channel [16:58] jbrokc has joined the channel [16:59] towski has joined the channel [16:59] aoberoi has joined the channel [16:59] CIA-65: node: 03Ben Noordhuis 07master * r97b0000 10/ node.gyp : build: add src/v8_typed_array.cc to gyp sources list (+5 more commits...) - http://bit.ly/pHODJq [17:00] bnoordhuis: ^ we have typed arrays now [17:00] xerox: cool [17:00] zk has joined the channel [17:00] odie5533 has joined the channel [17:01] ironlad has joined the channel [17:03] guillermo has joined the channel [17:04] AnthonyW has joined the channel [17:04] damiano: is there a module to check the form value ? i mean the length, if it's a number etc etc... [17:04] mike5w3c has joined the channel [17:04] damiano: or do i have to check all the paramenters of the form myself? (e.q. name.length > 3 && name.length < 30) [17:04] damiano: ? [17:07] brianc1 has joined the channel [17:10] node has joined the channel [17:11] node has left the channel [17:11] mraleph has joined the channel [17:13] node_user has joined the channel [17:14] zilch has joined the channel [17:15] Sembiance: damiano: I myself plan on taking all the values of a form, putting it into JSON and then using json-schema and JSV (https://github.com/garycourt/JSV) to validate it [17:15] Sembiance: damiano: but there are many different ways to validate a form :) [17:16] fumanchu182 has joined the channel [17:16] joshthecoder has joined the channel [17:16] TooTallNate has joined the channel [17:17] charleyd has joined the channel [17:18] damiano: interesting [17:18] mattly has joined the channel [17:19] robotmay has joined the channel [17:19] damiano: that's what i need [17:19] damiano: thank you [17:19] CIA-65: node: 03Artem Zaytsev 07master * ra38bda9 10/ src/platform_freebsd.cc : [17:19] CIA-65: node: platform: fix GetFreeMemory() on 64 bits freebsd [17:19] CIA-65: node: v_free_count is defined as u_int v_free_count (struct vmmeter sys/vmmeter.h:87) [17:19] CIA-65: node: but variable info defined as unsigned long, this cause error on 64-bits systems [17:19] CIA-65: node: because higher 32 bits remain uninitialized - http://bit.ly/pF9AT8 [17:19] vid__ has joined the channel [17:20] meandi has joined the channel [17:20] pandeiro has joined the channel [17:26] mikeal has joined the channel [17:26] k1ttty has joined the channel [17:27] pointlessjon_ has joined the channel [17:28] zilch has joined the channel [17:29] dexter_e has joined the channel [17:29] Cleer has joined the channel [17:29] geetaris_ has joined the channel [17:29] Nuck has joined the channel [17:29] topaxi has joined the channel [17:29] isaacs: woodiz: it looks like you're using a very old npm [17:29] isaacs: woodiz: upgrade to 1.0. instructions in the README.md file [17:30] einaros has joined the channel [17:30] node_user: hi guys! i just started using node.js [17:30] node_user: was trying to send emails thru amazon ses using the aws-lib module [17:32] langworthy has joined the channel [17:32] node_user: the sendemail action is throwing up validation error..for this json structure [17:33] node_user: {Destination:{ToAddresses:"xyz@gmail.com"}, Message:{ Subject:{Data:"test email sending",Charset:"UTF-8"}, Body:{Text: {Data:"test content",Charset:"UTF-8"} } }, Source:"xyz@gmail.com" } [17:33] bnoordhuis: node_user: that's not json [17:34] jetienne has joined the channel [17:34] bnoordhuis: node_user: quote your keys [17:34] prph: node_user: jsonlint.com [17:34] node_user: ouch..thanks a lot [17:36] zilch has joined the channel [17:36] mscdex: node.js rules! [17:36] addisonj has joined the channel [17:37] isaacs: ACTION is ruled by node.js [17:37] mscdex: just putting that out there [17:37] isaacs: :D [17:38] mscdex: seriously though, productivity is through the roof. 0.6 will be even awesomer [17:38] Vertice has joined the channel [17:38] Raynos has joined the channel [17:39] rfay has joined the channel [17:41] einaros: *moan* - websocket changes have hit the chrome beta; now I can't use my node.js irc client :( [17:42] curtischambers has joined the channel [17:42] reid has joined the channel [17:43] jetienne: einaros: they disabled the other protocols ? [17:44] towski has joined the channel [17:44] eee_c has joined the channel [17:45] node_user: { "Destination":{ "ToAddresses":"@gmail.com" }, "Message":{ "Subject":{ "Data":"test email sending", "Charset":"UTF-8" }, "Body":{ "Text":{ "Data":"test content", "Charset":"UTF-8" } } }, "Source":"xyz@gmail.com" } [17:46] einaros: jetienne: reflects latest changes to the protocol draft. I haven't explored it further [17:46] aheckmann has joined the channel [17:46] node_user: quoted the keys..and verified it on jsonlint.com [17:46] node_user: the error from aws SES is message.body cannot be null [17:47] jetienne: einaros: ask on #socket.io they follow closely [17:47] node_user: should the JSON object structure be different? [17:48] AvianFlu has joined the channel [17:48] node_user: for sendemail action [17:48] einaros: jetienne: I saw a note on github a few days ago - they are apparently on it [17:49] Raynos: einaros: What you mean is [17:49] Raynos: websocket changes have hit beta, now I can go and re-write the websocket protocol handling code \o/ [17:49] einaros: Raynos: I don't want to duplicate the work others are already doing ;) [17:49] booo has joined the channel [17:50] Raynos: Anyone have familiarity with cradle? [17:50] bradleymeck has joined the channel [17:52] cying has joined the channel [17:52] rabidewok has joined the channel [17:52] Wa has joined the channel [17:53] node_user: anyone sending emails thru amazon ses using the aws-lib module? [17:54] zilch has joined the channel [17:55] node_user: an example would be really great... [17:55] mscdex: einaros: fwiw, someone already has a module for websockets v.09/10 ongithub [17:56] Raynos: yes and version 8 aswell [17:56] Raynos: its a real pain [17:56] Raynos: because different browsers support different versions :\ [17:57] mscdex: https://github.com/Worlize/WebSocket-Node [17:57] mscdex: i don't know of any other browser that supports anything between draft 76 and version 09 [17:58] mscdex: s/other// [17:58] mscdex: besides experimental builds [17:58] einaros: at this point I'd rather wait and see if the learnboost guys have protocol version detection in the works [17:59] ryan0x2_ has joined the channel [17:59] mscdex: ah, looks like ff6 uses 07 :S [17:59] bradleymeck: would be nice if websocket protocol included version [17:59] mscdex: it does now [17:59] mscdex: starting with 00 [17:59] mscdex: iirc [18:00] yozgrahame has joined the channel [18:00] mquin has joined the channel [18:01] temp02 has joined the channel [18:02] fs has joined the channel [18:02] skm has joined the channel [18:03] vipaca has joined the channel [18:04] zilch has joined the channel [18:04] perezd has joined the channel [18:05] patcito has joined the channel [18:06] rfay has joined the channel [18:06] AvianFlu has joined the channel [18:07] mikeal has joined the channel [18:10] creationix has joined the channel [18:12] TheFuzzball has joined the channel [18:13] zeade has joined the channel [18:13] towski has joined the channel [18:14] jbergstroem has joined the channel [18:14] jbergstroem: hey. looks like the test suite is borked. it assumes node lives in build/debug/node, but nowadays lives at build/default/node. perhaps the test suite should use symlinks in builddir instead? [18:14] rabidewok has joined the channel [18:15] zilch has joined the channel [18:16] BoarK has joined the channel [18:17] jbergstroem: sry, the real issue is that debug is nowadays build/debug/node_g , not build/debug/node [18:17] devongovett has joined the channel [18:17] broofa has joined the channel [18:21] c4milo1 has joined the channel [18:22] bnoordhuis: jbergstroem: what version of node? [18:23] TempUser has joined the channel [18:24] arpunk has joined the channel [18:25] ale has joined the channel [18:27] DTrejo has joined the channel [18:27] ph^ has joined the channel [18:28] tyfighter has joined the channel [18:28] zilch has joined the channel [18:30] copyboy has left the channel [18:30] jbergstroem: bnoordhuis: head. found it on my buildbot slave, see: http://buildbot.nodejs.org:8010/builders/Gentoo%2032bit/builds/927/steps/shell_2/logs/stdio [18:31] softdrink: does anyone know what the limitations on cloud9 are as far as running something? [18:31] `3rdEden has joined the channel [18:31] agnat_ has joined the channel [18:32] bradleymeck: softdrink, pretty much same as joyent, probably not quite as fault tolerant as having the full account, but enough for simple things [18:33] softdrink: websockets, filesystem? [18:34] zilch has joined the channel [18:34] guidocalvano: yo good day everyone [18:34] towski has joined the channel [18:34] fyskij has joined the channel [18:34] guidocalvano: anyone know how I can create an object from its prototype template in v8 ? [18:35] guidocalvano: using c++ [18:35] bradleymeck: softdrink no "true" websockets, use the socket.io shims and there is filesystem access but not per drone if i remember right [18:35] jvduf has joined the channel [18:36] bradleymeck: guidocalvano, NewInstance(), v8.h is something you will want to end up reading in full if you do C++ work, takes like 2 hours but you will know pretty much everything basic [18:37] guidocalvano: tnx (: [18:38] maushu has joined the channel [18:40] dshaw_ has joined the channel [18:40] zilch has joined the channel [18:42] weezle has joined the channel [18:46] pietern has joined the channel [18:47] chrisdickinson: out of curiosity, what does the "directories" directive in package.json do? [18:49] Sembiance: chrisdickinson: https://github.com/isaacs/npm/blob/master/doc/json.md [18:49] Sembiance: scroll down to 'Directories' [18:49] chrisdickinson: Sembiance: thanks! [18:51] Charuru has joined the channel [18:54] towski has joined the channel [18:54] zilch has joined the channel [18:54] valdas has joined the channel [18:54] robertfw has joined the channel [18:56] valdas: anyone heard of couchdb? [18:56] valdas: to me it seems like the community of couchdb is dead, wondering why. [18:58] pquerna: valdas: i wouldnt call it dead [18:58] kavla has joined the channel [19:00] Tobsn has joined the channel [19:01] jbrokc has joined the channel [19:01] Sembiance: valdas: I looked at couchdb a good while ago. Just didn't feel quite right to me. Ended up using 'redis' instead for my project. Now I'm on a new project and I'm using 'mongodb' [19:01] towski has joined the channel [19:02] tbranyen: mongo was too much for me to use, the apis in node were just ehhh [19:02] luke` has joined the channel [19:02] tbranyen: compared to the elegance i found in couch [19:02] tbranyen: personal opinion [19:02] patcito_ has joined the channel [19:04] jamonkko has joined the channel [19:06] bnoordhuis: pquerna: not dead, just resting? [19:06] zilch has joined the channel [19:06] norviller has joined the channel [19:07] bnoordhuis: or should i say 'RESTing'? [19:07] Qbix1 has joined the channel [19:07] pquerna: ouch, that hurts [19:07] ekryski has joined the channel [19:08] jbergstroem: last commit to their repo was 82mins ago. sounds alive to me [19:13] a2800276_ has joined the channel [19:14] zilch has joined the channel [19:15] bbrandon has joined the channel [19:16] mcluskydodallas has joined the channel [19:16] temp01 has joined the channel [19:16] luke`_ has joined the channel [19:19] isaacs has joined the channel [19:20] towski has joined the channel [19:23] TheFuzzball has joined the channel [19:24] dreamdust has joined the channel [19:25] jhurliman has joined the channel [19:28] clarkfischer has joined the channel [19:29] adelgado has joined the channel [19:30] zilch has joined the channel [19:30] tilgovi has joined the channel [19:30] tilgovi has joined the channel [19:30] mjr_: CouchDB doesn't release very often, especially since they got bought. [19:30] _sorensen_: bnoordhuis: nice one ;) [19:31] CIA-65: libuv: 03Igor Zinkovsky 07gqcsex * r3cdd124 10/ (5 files in 2 dirs): use GetQueuedCompletionStatusEx if the OS supports it - http://bit.ly/qIIzPE [19:31] tbranyen: mjr_: they are pushing all developments into the core couchdb branch [19:31] TheJH has joined the channel [19:31] TheJH has joined the channel [19:31] tbranyen: *supposedly* [19:31] chrisdickinson: isaacs: had a question re: making Git.js safe for the browser. I moved it to the CommonJS style -- removed all the implied globals and made exports explicit. What would be the best way to take that code and bundle it for the browser? [19:31] mjr_: I mostly really like couchdb. I hope they come up with something great with membase. [19:32] copyboy has joined the channel [19:33] _sorensen_: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis [19:33] _sorensen_: good little writeup since we're on the topic [19:33] techwraith has joined the channel [19:34] JWarm has joined the channel [19:35] zilch has joined the channel [19:35] mehlah has joined the channel [19:36] btbngr has joined the channel [19:37] nerdfiles has joined the channel [19:38] jbrokc has joined the channel [19:38] nerdfiles has left the channel [19:40] mikl has joined the channel [19:40] mikl has joined the channel [19:40] neilk_ has joined the channel [19:42] dnjaramba has joined the channel [19:42] clarkfischer: chrisdickinson, the way underscore.js does it is sorta clever: http://documentcloud.github.com/underscore/docs/underscore.html#section-10 [19:42] zeade has joined the channel [19:43] chrisdickinson: clarkfischer: yeah -- the only issue is that this project is spread across a *lot* of files, with dependencies on one another [19:43] clarkfischer: Ah [19:43] clotman has joined the channel [19:43] _sorensen_: is this from a browser in general use, or in conjunction with node.js [19:44] hij1nx has joined the channel [19:44] chrisdickinson: I solved it in plate by putting together a python build script: https://github.com/chrisdickinson/plate/blob/master/support/build.py [19:44] _sorensen_: there is browserify [19:44] fyskij has joined the channel [19:45] clarkfischer: require.js has a node build script [19:45] clarkfischer: http://requirejs.org/docs/optimization.html [19:45] zilch has joined the channel [19:45] chrisdickinson: _sorensen_: I was looking at that, but does that require a node.js server to be serving up the javascript? [19:46] cronopio has joined the channel [19:46] chrisdickinson: my ideal is that there's a general build script that takes a module as input, and returns the entire dependency graph compiled into a single file. [19:46] chrisdickinson: replacing `require` as necessary with the targeted module objects. [19:47] vipaca has joined the channel [19:47] vipaca has joined the channel [19:47] clarkfischer: I think that's what r.js does... I'm not particularly familiar with it. [19:47] moree has joined the channel [19:51] mikeal has joined the channel [19:52] addisonj_ has joined the channel [19:53] devinus has joined the channel [19:53] devinus: how well is node supported on windows platforms today? [19:53] devinus: where does it stand? [19:55] zilch has joined the channel [19:58] aoberoi has joined the channel [19:58] jerrysv has joined the channel [19:59] admc has joined the channel [20:00] sandropadin has joined the channel [20:01] clotman: devinus: http://blog.nodejs.org/2011/06/23/porting-node-to-windows-with-microsoft’s-help/ [20:02] skm has joined the channel [20:03] EvRide has joined the channel [20:06] zilch has joined the channel [20:06] jamonkko_ has joined the channel [20:06] JoshC1 has joined the channel [20:07] telemachus has joined the channel [20:08] jamonkko has joined the channel [20:08] edude03 has joined the channel [20:11] vipaca has joined the channel [20:12] bksf has joined the channel [20:14] zilch has joined the channel [20:14] Draggor: devinus: https://github.com/joyent/node/wiki/ChangeLog <--- The 0.5.x branch is currently listed as unstable, but for the most part I find it usable. [20:14] Draggor: It's certainly not as solid as 0.4.10, but each release gets better. [20:15] zemanel has joined the channel [20:15] bpwnr has joined the channel [20:18] PhiloSurfer has joined the channel [20:21] zilch has joined the channel [20:24] devongovett has joined the channel [20:24] kmiyashiro has joined the channel [20:28] sh1mmer has joined the channel [20:28] clifton has joined the channel [20:29] clifton: any good links to an article explaining harmony weak maps [20:29] gazumps856 has joined the channel [20:29] c4milo2 has joined the channel [20:30] chjj: clifton, what do you want to know about them? [20:31] brianc1: got express/connect cookie question. I see this header coming back down in chrome inspector: Set-Cookie:connect.sid=tXMDWlwP5aEQ89FRHqDURDAe.XikF5Y%2ByTwjA6tRDrqtq96%2BWBRTQek%2BFmVvbrtFmVpA; path=/; expires=Fri, 12 Aug 2011 12:28:37 GMT; httpOnly but then chrome isn't sending the cookie on the next request....any ideas? [20:31] chjj: well it looks like the cookie is expiring pretty quick there [20:32] brianc1: good point [20:32] brianc1: I am an idiot. Thanks. [20:32] chjj: ;p [20:32] brianc1: :) [20:33] vipaca has joined the channel [20:33] vipaca has joined the channel [20:33] S1r10n has joined the channel [20:34] cying has joined the channel [20:35] devdazed has joined the channel [20:36] zilch has joined the channel [20:36] smathy has joined the channel [20:38] parshap has joined the channel [20:38] temp01 has joined the channel [20:41] tilgovi has joined the channel [20:41] tilgovi has joined the channel [20:42] jellosea has joined the channel [20:43] jellosea: node.js sometimes just dies.. no error msgs or anything [20:43] jellosea: i'm using express [20:43] TheJH: any good library for reading erlang external term stuff in node? [20:43] jellosea: its caused by soem error but nothign is printed, it will die mid console.log [20:44] eee_c has joined the channel [20:44] bradleymeck: first line of defense : logging process.on('uncaughtException') , be sure to let that sucker die though with an exit afterward [20:44] TheJH: jellosea, console.error is blocking, unlike console.log [20:44] admc has joined the channel [20:45] jellosea: bradleymeck: how do i do that? [20:45] SubStack: chrisdickinson: that's exactly how browserify works [20:48] JWarm has joined the channel [20:49] m00p has joined the channel [20:49] ekryski has joined the channel [20:49] augustl: is it possible to do NAT traversal with Node.JS? I've no idea how NAT traversal works, but it seems to me like it would have to be something that happens at the IP layer. [20:50] DrPizza: upnp is XML and HTTP, NAT-PMP is UDP [20:50] wink_: https://github.com/enobufs/stun [20:50] micheil has joined the channel [20:51] augustl: hmm, I see [20:51] fly-away has joined the channel [20:51] DrPizza: depends what kind of NAT traversal you need [20:51] TheJH: augustl, there are different kinds of traversal, basically reconfiguration and punching [20:52] AAA_awright_: Is there any good documentation on how to write a .node module? [20:52] mscdex: falcon NAT punch! [20:52] TheJH: augustl, either tell the router "please, dear router, could you open a little hole in the firewall/nat for me?" or punch a hole yourself [20:52] mscdex: AAA_awright_: here's one, kinda old, but should still be useful: https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/ [20:52] DrPizza: the former tends to be more robust, as long as the router allows it [20:52] augustl: I didn't know NAT traversal was normal protocols over TCP or UDP, I imagined it was IP level hacks :) [20:53] mizerydearia has joined the channel [20:53] augustl: TheJH: got some more info on how to punch a hole yourself? [20:53] eignerchris has joined the channel [20:53] TheJH: augustl, Metal3d recently posted a gist on that in this channel [20:53] mscdex: AAA_awright: beyond the tutorial, looking at existing bindings is your best bet (i.e. ryah's postgres binding) [20:53] TheJH: augustl, one second... [20:54] blup has joined the channel [20:54] TheJH: augustl, https://gist.github.com/1135356 [20:54] mscdex: AAA_awright: the only thing you need to especially be aware of is that in node 0.5, EventEmitter is gone from c++ land [20:54] TheJH: augustl, this is a UDP hole punching implementation [20:54] augustl: TheJH: interesting, thanks [20:54] reid has joined the channel [20:55] TheJH: augustl, basically, you send packets to trick the firewall into thinking that there's already an established connection [20:55] FearTheCowboy has joined the channel [20:55] pquerna: TheJH: neat :) [20:55] AAA_awright: mscdex: How does one call events then? [20:55] FearTheCowboy has left the channel [20:55] zilch has joined the channel [20:55] chjj: c++ land is now a lonely place [20:55] FearTheCowboy has joined the channel [20:55] pquerna: TheJH: have you looked at doing UPNP too? [20:55] TheJH: pquerna, no, and that gist also isn't mine [20:56] mcluskydodallas has joined the channel [20:57] augustl: TheJH: wow, interesting [20:57] augustl: where the firewall is the NAT itself? [20:57] TheJH: augustl, yes [20:57] WarriorSl has joined the channel [20:58] augustl: want to write some software that people can run on servers in their homes, would be nice if it could work without router setup [20:58] micheil: TheJH: does that actually work? [20:58] clifton has joined the channel [20:59] TheJH: micheil, UDP hole punching? yes, skype e.g. is known for driving network admins crazy because it does P2P behind nats using such techniques [20:59] sonnym has joined the channel [20:59] micheil: I know about UDP hole punching, but that example.. does it work? [20:59] augustl: let's hope IPv6 goes mainstream soon so we can get rid of all this NAT-ing. [20:59] TheJH: "oh, I'm in a corporate network? let's see how we can circumvent this annoying firewall and link into the hivemind..." [20:59] TheJH: that's skype [21:00] augustl: sounds kind of crazy that there aren't unpunchable routers out there, that would make network admins a little less crazy. [21:00] pquerna: TheJH: ah [21:00] TheJH: augustl, there are less-punchable ones [21:00] pquerna: TheJH: just interested.. i've written a nat puncher in c++ long time ago :) [21:01] augustl: NAT normally uses random outgoing ports for connections though, no? Makes kind of sense that his mechanism is exploitable. [21:01] xicubed has joined the channel [21:01] losing has joined the channel [21:01] augustl: s/his/this/ [21:01] TheJH: augustl, I don't think that it uses random ports [21:02] TheJH: at least not often [21:02] TheJH: but I didn't write a nat-puncher myself yet or so, so don't rely on what I say [21:02] augustl: I thought that when a NAT router connects to port 80 of goole.com, that connection is opened _from_ port xxxxx on the router [21:03] mikeal has joined the channel [21:03] augustl: so not random, perhaps it reuses it, but unpredicable at least [21:03] pquerna: augustl: http://en.wikipedia.org/wiki/Full_cone_NAT#Methods_of_Port_translation [21:03] pquerna: its complicate [21:03] pquerna: d [21:03] pquerna: there are many possible situations [21:03] pquerna: and 'nat types' [21:03] augustl: some times this channel is incredibly useful :) [21:04] mscdex: only some times? :O! [21:04] augustl: all channel have their moments ;) [21:04] piscisaureus has joined the channel [21:05] AvianFlu has joined the channel [21:05] steadicat has joined the channel [21:05] CIA-65: libuv: 03Igor Zinkovsky 07gqcsex * r5b02fca 10/ (5 files in 2 dirs): use GetQueuedCompletionStatusEx if the OS supports it - http://bit.ly/n3RKeR [21:05] augustl: so if I understand that gist correctly, it sends data out on a given port, which makes the router also able to receive data on that given port for a short window of time? [21:05] pekim has joined the channel [21:06] TheJH: augustl, yes, that's the basic idea [21:06] mscdex: AAA_awright: basically what i ended up doing was just using util.inherits to extend my c++ class's prototype with js-land's events.EventEmitter in a js-land module and using that instead of the c++ addon directly [21:06] mscdex: AAA_awright: fwiw, here's how i modified node-ncurses: https://github.com/mscdex/node-ncurses/commit/d5c8fc1651c37483bd27288b67a37dcd7eab26c4 [21:06] sirdancealot has joined the channel [21:07] augustl: sounds like a daunting task especially if a machine is behind multiple NATs [21:07] c4milo2: is somebody using some sort of json schema validations? [21:07] brianc1: I'm getting an error in the build when trying to build node v0.5.4. Pretty sure it's how my environment is setup...but it's saying 'make[1]: /home/bmc/localgcc: Command not found' [21:07] brianc1: not really sure where to go with that [21:08] hakunin has joined the channel [21:08] mscdex: AAA_awright: oops, not util.inherits, but i actually extend the prototype by copying EventEmitter's prototype to my addon's prototype [21:08] towski has joined the channel [21:08] TheJH: augustl, by the way, there's someone who has even written a program that can create a server on a computer and another computer can connect to it without the server needing to know the ip or port of the client :D [21:08] skampler has joined the channel [21:08] augustl: c4milo2: not sure if it can be called JSON schema validation... But I do have some apps where I return a 4xx error and an error msg for ill formed JSON [21:08] aoberoi has joined the channel [21:08] TheJH: both behind NATs [21:09] mscdex: brianc1: what does your ./configure say? [21:09] augustl: TheJH: wow, nice [21:09] brianc1: it's in the deps/uv make file [21:09] junkee[] has joined the channel [21:09] c4milo2: augustl: yeah I'm talking about this https://github.com/garycourt/JSV [21:09] augustl: makes me wonder why games still require you to manually set up routers [21:09] c4milo2: augustl: http://json-schema.org/ [21:10] TheJH: augustl, http://samy.pl/pwnat/ [21:10] TheJH: "pwnat, pronounced "poe-nat", is a tool that allows any [21:10] TheJH: number of clients behind NATs to communicate with a [21:10] TheJH: server behind a separate NAT with *no* port forwarding [21:10] TheJH: and *no* DMZ setup on any routers in order to directly [21:10] TheJH: communicate with each other. The server does not need [21:10] TheJH: to know anything about the clients trying to connect." [21:10] brianc1: mscdex: `Checking for program gcc : /usr/bin/gcc` [21:10] TheJH: oops, that was a large paste, sorry about that [21:10] augustl: TheJH: cool [21:11] hakunin: Should I install npm packages as a server provisioning step? Or have them versioned with the app? (Node app is a service interacting with rails) [21:11] junkee[]: need help with v8 https://gist.github.com/5e133a9f046d1147de5f [21:12] brianc1: mscdex: `echo $PREFIX -> /hom/bmc/local' [21:12] brianc1: mscdex: I assume this is the problem [21:12] jtsnow has joined the channel [21:12] robotmay has joined the channel [21:13] hakunin: I believe some packages are written with C and would have to be recompiled in different environments [21:14] hakunin: Or is there something like bundler's Gemfile for npm where I can specify versions of packages to depend on and run a single command to install them? [21:14] zilch has joined the channel [21:14] isaacs: hakunin: package.json, and the command is `npm install` [21:14] isaacs: hakunin: you can create a package.json file with `npm init` [21:14] micheil: someone should make a pwnat binding for node.js :D [21:15] hakunin: isaacs: have a package.json that depends on my app's dependencies? kind of meta-package? [21:16] sirdancealot has joined the channel [21:16] isaacs: hakunin: sorta [21:16] isaacs: hakunin: it just installs everything locally in ./node_modules [21:16] isaacs: hakunin: think of a package.json as defining a "project" more than necessarily a "thing that gets installd and deployed elsewhere" [21:16] clifton has joined the channel [21:16] isaacs: not all packages get sent in the mail :) [21:16] augustl: micheil: thankfully, shelling out us easy! [21:17] brianc1: hakunin: I believe the way many people do it is have a package.json file in their app. Then the app's package.json file can specify dependencies. Just don't "npm publish" your app [21:17] zilch has joined the channel [21:17] micheil: no, don't shell it, make it built into a module. [21:17] hakunin: isaacs: that is what i already have happening. all deps are sitting in node_modules, my problem is that they're installed and compiled on my mac, but will be deployed on, say, EC2. They can't just work there without rebuilding, can they? [21:17] micheil: as in, it includes pwnat in it. [21:18] hakunin: brianc1: ^ [21:19] brianc1: hakunin: if they're modules which require compilation, they will not work there without being recompiled. [21:19] reid has joined the channel [21:19] damiano has joined the channel [21:19] damiano: hello [21:19] softdrink: what does emitter.on() return? [21:19] brianc1: I believe there is a way with NPM to specify a location of a pre-compiled package...but you'll still likely need to build the module on the machine or at least similar architecture. [21:19] augustl: micheil: interface with the C code you mean? [21:19] micheil: yeah [21:20] augustl: instead of using the CLI? [21:20] hakunin: brianc1: so then there is no point in having packages installed in a local dir much is there? [21:20] micheil: yeh [21:20] augustl: I suppose you can pass argv and argc too [21:20] wink_: micheil: if you're interested, i've got a module that binds up the sendmsg interface [21:20] S1r10n: anyone knows a tutorial on daemonizing/forking in node? I got the fork (so far everything is documented) just need to close all the streams (which I thought I'ld have done but apparently not)... my parent doesn't terminate [21:20] wink_: to node that is [21:20] hakunin: brianc1: rather, i'd have to gitignore it [21:21] hakunin: brianc1: and let server install my package.json [21:21] hakunin: anew [21:21] brianc1: hakunin: right, git ignore the modules folder & install them on the deploy server with `npm install` in the app directory (provided you have them specified within the app directory's package.json file [21:21] brianc1: hakunin: exactly [21:21] brianc1: hakunin: you can lock each module down to a specific version within the package.json file so you should have the same package local & in production [21:22] materialdesigner has joined the channel [21:22] c4milo2: hakunin: I use to deploy them everything along my app [21:22] hakunin: brianc1: that's sounds like exactly the type of solution i needed [21:22] hakunin: c4milo2: you deploy compiled packages with your app? [21:22] c4milo2: hakunin: nop [21:22] yhahn has left the channel [21:23] c4milo2: hakunin: well, yes, but they compile during the deployment, it's something that I have to fix somehow though [21:23] c4milo2: :/ [21:23] mikeycgto has joined the channel [21:24] brianc1: isaacs: is there something you can put in the package.json file so if you accidently do "npm publish ." in a private package folder it wont get sent into the npm registry? I've thought before it would be a bummer to accidentally the whole private project [21:25] brianc1: isaacs: or is the answer to this problem "don't be an idiot?" [21:26] TheJH: how can I easily create a buffer from a hexstring on v0.4.10? [21:27] TheJH: (in the REPL, for testing) [21:27] AvianFlu: there might be an arg for that in the Buffer() constructor [21:27] AvianFlu: but I haven't looked it up in a while [21:27] tomh-: hmm any socket.io user knows if you need to do anyting before you can use socket.json.send? [21:27] augustl: TheJH: nothing build in :S [21:28] TheJH: then I'll loop over the string and use parseInt(,16) [21:28] `3rdEden: tomh- there is nothing special you need to, are you running in to a issue? [21:28] damiano: guys, can i not create a "table" in Redis where to store my keys:values ? [21:28] btbngr has left the channel [21:29] tomh-: `3rdEden: oh wait, I probably look at the wrong section, I should still use socket.send on the client right? [21:29] augustl: TheJH: yup [21:29] `3rdEden: tomh- nope you can also do socket.json.send on the client [21:30] mscdex: AvianFlu: unfortunately not, patch time! [21:30] `3rdEden: tomh- got code? [21:30] AvianFlu: +10 [21:30] tomh-: `3rdEden: I could paste a small snippet one moment [21:31] damiano: is not possible? [21:31] damiano: all the keys are public? [21:33] tomh-: `3rdEden: http://pastebin.me/34b906ac1baa1555db545b16d925366e tell me if you need more information [21:36] nerdfiles has joined the channel [21:37] Nexxy: are my requested hooks completed yet? [21:37] DTrejo has joined the channel [21:37] mscdex: actually, my bad. it already works in 0.5 [21:37] mscdex: :-D [21:37] `3rdEden: tomh-Communication.socket.json.send({redis:'bla'}) should just work as well [21:38] mscdex: Nexxy: your what? [21:38] ekryski: Hey does anyone know if there is a sql server bindings library? [21:38] Nexxy: mscdex, wrong channel ;3 [21:38] mscdex: heh [21:38] `3rdEden: tomh- as we handle json.stringify in a crossbrowser manner [21:38] Nexxy: but hi! [21:38] augustl: well hi there [21:38] mscdex: hola [21:39] Nexxy: heelloooo [21:39] tomh-: `3rdEden: ok, but my console complains that socket doesn't have the method send or property json [21:39] `3rdEden: tomh- which version of socket.io are you using? [21:39] Nexxy: 0.2.1a [21:39] tomh-: the socket.io.js file sais 0.7.7 [21:39] augustl: TheJH: uhm, parseInt("10", 16) returns the number 16. Doesn't seem very hex friendly. [21:40] mikeal has joined the channel [21:40] `3rdEden: tomh- because i'm pretty sure that method does exist [21:40] TheJH: augustl, why? [21:40] TheJH: augustl, looks good to me [21:40] fostah has joined the channel [21:41] augustl: and I thought I understood number base [21:41] S1r10n: I think I managed it... need 2 sleep now gn8 everyone [21:41] `3rdEden: tomh- also sock.connect is io.connect() right? [21:41] c4milo2: `3rdEden: what version is considered stable for socket.io? [21:41] `3rdEden: c4milo2 all version in npm are considered stable ;) [21:42] augustl: TheJH: doh, nvm.. It turns hex strings into base 10 numbers :) [21:42] c4milo2: `3rdEden: gotcha [21:42] TheJH: seems like "buf.readUInt32" makes my code fail on v0.4.10. do I need 0.5.x for that? [21:42] TheJH: https://gist.github.com/ee74ae53618ec96ddd4c [21:42] augustl: TheJH: you needed the other way around though, no? number to hex string [21:42] tomh-: `3rdEden: ohhh wait, I think me and my coworker use different versions [21:42] TheJH: augustl, no, I needed hex->buffer [21:42] tomh-: `3rdEden: I think he uses 0.6 [21:43] `3rdEden: tomh- well that is the reason than.. [21:43] tomh-: ok [21:43] clifton has joined the channel [21:43] `3rdEden: 0.6 doesn't have a json method [21:43] tomh-: cool lemme try it out :) [21:43] brokenjames has joined the channel [21:43] `3rdEden: tomh- also 0.6 uses a different constructor [21:43] zilch has joined the channel [21:44] ekryski: Yo! does anyone know of any sql server bindings? [21:44] Nexxy: lol [21:44] kavla: ? [21:44] Nexxy: not a single one... [21:44] Nexxy: https://github.com/joyent/node/wiki/modules#wiki-database [21:44] tomh-: `3rdEden: yeah that was the issue, it now works thanks [21:44] tomh-: is there a socket io channel btw? [21:44] nerdfiles has left the channel [21:45] kavla: yep, #socket.io [21:45] tomh-: cool [21:45] ekryski: I'm not a noob to this stuff. I've looked everywhere. haven't found any. just thought I'd check here. [21:46] mcluskydodallas has joined the channel [21:46] Nexxy: ekryski, are you looking for something like linq? [21:46] ekryski: maybe. I just need to grab data from a sql server db because I'm migrating it to mongo [21:46] ekryski: that might work [21:46] Nexxy: well I mean there are tons of sql libs/orms [21:47] Nexxy: taek your pick [21:47] ekryski: ya I guess as long as I don't need to execute .net specific stuff or stored procedures I could use those. [21:48] random123: Is there a reference to node-mongodb-native? [21:48] ekryski: thanks. Nexxy [21:48] Nexxy: ekryski, any tiem~!1 ^-^ [21:48] c4milo3 has joined the channel [21:48] ekryski: random123: ?? [21:49] Nexxy: random123, found it! https://github.com/christkv/node-mongodb-native/tree/master/lib/mongodb [21:49] Nexxy: reference away! [21:49] AvianFlu has joined the channel [21:49] broofa has joined the channel [21:50] nerdfiles1 has joined the channel [21:50] random123: The source code is the reference? [21:51] wookiehang0ver has joined the channel [21:51] freewil has joined the channel [21:51] nerdfiles1 has left the channel [21:51] random123: That sucks [21:51] zastaph has joined the channel [21:52] random123: That is like Ryan making us read the source code to Node.js as a reference.. [21:52] random123: Instead of docs.. [21:53] damiano: how can i save a in Redis with an expiring? [21:54] random123: Nexxy: This is the reference you dope [21:54] random123: https://github.com/christkv/node-mongodb-native/blob/master/docs/README.md [21:54] zilch has joined the channel [21:54] kmiyashiro: damiano: that's right in the docs [21:55] damiano: kmiyashiro, where? i don't see it https://github.com/mranney/node_redis [21:56] robertfw has joined the channel [21:57] kmiyashiro: client.expire(2345235) [21:57] christkv has joined the channel [21:57] kmiyashiro: oops [21:57] kmiyashiro: client.expire('key', 235135) [21:59] kmiyashiro: http://redis.io/commands/expire [21:59] kmiyashiro: every redis command is exposed in client.* [21:59] mscdex: TheJH: the buffer.read* and buffer.write* methods are only available in 0.5 [22:00] TheJH: mscdex, ok, thanks [22:00] damiano: kmiyashiro, thank you really much! [22:00] davidcoallier has joined the channel [22:00] unlink has joined the channel [22:00] unlink has joined the channel [22:01] mscdex: TheJH: just a heads up: the signatures and names for those methods changed right after 0.5.4 was posted [22:01] JWarm: Is anyone familiar with using express-resource? [22:01] JWarm: And can you help me? [22:01] TheJH: mscdex, ah, ok [22:02] icebox has joined the channel [22:02] davidbanham has joined the channel [22:02] mscdex: TheJH: also, 0.5 allows you to construct a buffer with a 'hex' encoding (not sure about with spaces or not though) [22:03] TheJH: mscdex, already coded my own anyway :D [22:03] zilch has joined the channel [22:03] mscdex: heh :-) [22:03] CStumph has joined the channel [22:04] TheFuzzball has joined the channel [22:04] Sembiance: sheesh it's tough picking a good template system. [22:05] augustl: ejs [22:05] augustl: there :) [22:05] Sembiance: hehe [22:05] slickplaid: if you've already got html written, ejs. if you haven't, jade. :) [22:05] Sembiance: I started with dust.js, but I see no way to be able to do ((index % 3)==0) in it [22:06] augustl: I'm personally not a fan of hipster templating engines [22:07] augustl: I prefer <% %> tags with normal HTML [22:08] sebastia_ has joined the channel [22:09] mscdex: hipsters.js [22:09] CIA-65: libuv: 03Ben Noordhuis 07master * rf1df74d 10/ AUTHORS : Add Peter Bright to AUTHORS - http://bit.ly/ppBliF [22:09] teknopaul has joined the channel [22:09] mcluskydodallas has joined the channel [22:10] mikeal1 has joined the channel [22:10] AvianFlu has joined the channel [22:11] mikeal2 has joined the channel [22:11] monokrome: Hmm… Are web sockets secure over HTTPS? [22:12] thinkt4nk__ has joined the channel [22:12] TheJH: monokrome, depends on your definition of "secure" [22:12] damiano: how to get IP of the request using Express ? [22:12] AvianFlu: there's a wss:// , no? [22:13] monokrome: TheJH: I'm wondering if they use HTTPS or work differently. [22:13] asabil has joined the channel [22:13] zilch has joined the channel [22:13] TheJH: monokrome, they use HTTPS. the CIA could sniff, but someone who just fires up wireshark for fun couldn't [22:13] augustl: websockets doesn't use HTTP, that's for sure [22:13] augustl: they might use TSL though [22:14] AvianFlu: TLS [22:14] augustl: TLS* [22:14] mscdex: monokrome: it's over tls [22:14] micheil: websockets can be used over ssl, and it provides you with the same security as http over ssl [22:14] TheJH: augustl, they initially negotiate using HTTP and then "upgrade" the connection [22:14] augustl: I see, in case you're talking to a http server that isn't capable of web sockets I presume? [22:14] monokrome: Do they always use TLS? [22:14] micheil: no [22:14] augustl: monokrome: TLS requires certificates, so no [22:14] TheJH: augustl, true [22:14] willwhite has joined the channel [22:15] micheil: just like http doesn't always use TLS/SL [22:15] monokrome: hmm [22:15] micheil: *SSL [22:15] random123: The mongoDB reference sucks.. its spread all over the place and implimented differently across drivers [22:15] augustl: more blood! [22:15] random123: one uses .rename, the official docs use .renameCollection wtf? [22:16] monokrome: Welcome to mongodb. Enjoy your stay. [22:16] augustl: the joys of APIs vs languages (SQL) I guess .) [22:16] `3rdEden: random123 what do you expect, it's not a official drive [22:16] `3rdEden: r [22:16] damiano: <`3rdEden> do ytou know how to get the IP address using express? [22:16] todd__ has joined the channel [22:17] random123: It's important that there is a standard API for the database [22:17] monokrome: the client's IP address? [22:17] R4md4c has joined the channel [22:17] damiano: y [22:17] damiano: req <--- [22:17] `3rdEden: in the same as any other http server damiano using `req.socket.remoteAddress` [22:17] augustl: random123: well.. [22:17] damiano: the IP of the request [22:17] pifantastic has joined the channel [22:17] damiano: oh [22:17] damiano: ok [22:17] damiano: thank you [22:17] random123: MongoDB should create the drivers [22:17] random123: For the languages [22:17] random123: And use a standard [22:18] R4md4c: assertion "db_ == NULL" failed: file "../src/database.h", line 38, function: virtual Database::~Database() . What does this error means in sqlite-node ? [22:18] augustl: random123: tell them, not us [22:18] `3rdEden: #mongodb [22:19] monokrome: R4md4c: I'm not sure, but I'd assume that it means something didn't clean up properly in the deconstructor? [22:19] a2800276 has joined the channel [22:20] mck_ has joined the channel [22:20] random123: MongoDB's Docs are shit too [22:20] mcluskydodallas has joined the channel [22:20] R4md4c: monokrome, I am using database.close(function (error) {}) after a database.open() call. Is that the correct way to clean up ? [22:21] mraleph has joined the channel [22:21] blup has joined the channel [22:22] vnaren has left the channel [22:22] monokrome: Are you making sure that it opened successfully? [22:22] TheJH: yay! my serialized-erlang-reader can read couchdbs pseudo-json! (but it can't locate it in the database yet :( ) [22:24] isaacs: hakunin: you can put "private":true in your package.json file. [22:24] isaacs: hakunin: to prevent publishing anywhere [22:24] isaacs: hakunin: more tips: npm help json [22:24] mck_: Hi, I have a question about best practices using jade and Express. Where should I put my javascript embeds? They should usually be right before , but this is a part of my layout. Should I just insert them at the end of page specific jade code? [22:24] hakunin: isaacs: that's great, thanks! [22:24] TheJH: aww, that looks ugly, who would do that to JSON? :( https://gist.github.com/5b5d0ec116514def9f27 [22:24] zilch has joined the channel [22:24] R4md4c: monokrome, Yeah if it didnt open successfully it should throw an error [22:25] isaacs: TheJH: what is that? [22:25] monokrome: Whoa. That's really bad, TheJH... [22:25] TheJH: isaacs, I copy-and-pasted a part from the npm database file into my Erlang-"External Term Format" parser [22:25] isaacs: TheJH: that would only make sense if the order of keys mattered, and if the data could use the same key more than ocne. [22:25] isaacs:  [22:25] R4md4c: monokrome, I'd like to ask you do I open the db file at each request or just open at the start of the server ? [22:26] TheJH: isaacs, that's how couch stores it [22:26] isaacs: that'd make sense if the order of keys mattered, and if you could have the same key more than once. [22:26] monokrome: R4md4c: No idea, but I'd assume start of server. [22:26] isaacs: TheJH: oh, well, yeah, erlang doesn't have k-v dictionaries as a native concept like JS does. [22:26] isaacs: TheJH: so everything is tuples. [22:26] gazumps has joined the channel [22:27] isaacs: same with lisp [22:28] isaacs: that's actually a much better way to represent http headers, though [22:28] isaacs: except that you also want to do stuff like req.headers.host, and not req.headers.filter(function (h) { return h[0] === "host" })[0][1] [22:30] TheJH: isaacs, mhm, true [22:31] mehtryx has joined the channel [22:33] blueadept2 has joined the channel [22:34] thinkt4nk_ has joined the channel [22:34] zilch has joined the channel [22:36] mikeal has joined the channel [22:37] damiano: I have seen that the expire of the session are not update each time i re-set the value req.session.myvar = 'test' i MUST to do req.session.save() to update the cookie on the browser, is it wrong? [22:38] markwubben has joined the channel [22:39] AvianFlu has joined the channel [22:39] Nexxy has joined the channel [22:40] wookiehangover has joined the channel [22:40] jbrokc has joined the channel [22:41] broofa has joined the channel [22:41] srid has joined the channel [22:41] sniper506th has joined the channel [22:42] sniper506th has joined the channel [22:44] sniper506th has joined the channel [22:44] guilty_spark has joined the channel [22:45] zilch has joined the channel [22:45] JWarm has joined the channel [22:46] devongovett has joined the channel [22:50] AaronMT has joined the channel [22:50] PEEHTEEH has joined the channel [22:50] T0bsn has joined the channel [22:51] broofa has joined the channel [22:52] balaa has joined the channel [22:54] R4md4c: Do anybody here how to stop the "Destroying database" log message in mysql-node module? [22:54] R4md4c: knows [22:55] voieducode has joined the channel [22:55] zilch has joined the channel [22:59] adrianmg has joined the channel [22:59] adrianmg: hi! [23:05] dshaw_ has joined the channel [23:05] bedspax has joined the channel [23:06] eliziario has joined the channel [23:06] Sembiance: hrm. looks like dust.js is no longer maintained/developed [23:07] zilch has joined the channel [23:07] Charuru has joined the channel [23:07] cconstantine: is there an easy way to add npm services (npm start foo) to start automatically and restart on crash? [23:07] isaacs: cconstantine: it's os-specific [23:07] cconstantine: ubuntu [23:07] isaacs: cconstantine: check out upstart or monit [23:08] olareoun has joined the channel [23:08] cconstantine: isaacs, yeah... I was afraid of that. I guess it's not too terrible [23:08] isaacs: nah, it's fine [23:08] isaacs: it's not quite as simple as a bit of json and a single command, but almost :) [23:08] cconstantine: yeah [23:09] cconstantine: I've done it before [23:09] cconstantine: with monit there needs to be a pid file though [23:09] mikeal1 has joined the channel [23:09] clifton has joined the channel [23:12] sebasti__ has joined the channel [23:13] augustl: pid files are good, mkay [23:13] mDraze has joined the channel [23:14] cconstantine: bah [23:14] amerine has joined the channel [23:14] PEEHTEEH has joined the channel [23:14] Clex: Is there a simple way to get the Unix timestamp ? Date.now() / 1000 sucks, it has 999/1000 chances to need a cast. [23:15] xerox: I think you have to Math.floor(..) ? [23:15] AAA_awright: Clex: All numbers in Javascript are 64-bit floating points [23:15] augustl: Clex: Math.floor(Date.now() / 1000) perhaps? [23:16] AAA_awright: Unless it's some optimization technique you're talking about, but it has no way of knowing that ahead of time [23:16] Clex: It kinda looks overkill to get a timestamp. x( [23:16] zilch has joined the channel [23:16] AAA_awright: Getting the timestamp is far more expensive than casting it to an integer, even if it did cast it [23:16] augustl: Clex: function getTimestamp() { return Math.floor(new Date() / 1000) } [23:17] JWarm has joined the channel [23:17] Clex: Thanks anyway. [23:17] Clex: Is it worth it to get the timestamp once at startup and update it each seconds with a timer? :/ [23:18] augustl: setInterval(func, 1000)? [23:18] Clex: Im trying to keep my middlewares as light as possible. [23:18] augustl: no idea what you're talking about :) [23:19] AAA_awright: Clex: Rule of thumb is just don't write stupid code, but don't worry about if one technique is faster than another, the optimization changes so fast it's going to be outdated next minor revision [23:19] Clex: Yeah, you're probably right AAA_awright. I'm too much of a C code writer. [23:20] skampler: Clex: v8 has Date.now() [23:20] k1ttty has joined the channel [23:20] c4milo1 has joined the channel [23:20] Clex: skampler: yup, but it does not return an Unix timestamp. [23:21] AAA_awright: by "don't write stupid code" I mean something like, don't poll a file inside a for() loop if you know the contents aren't going to change (though Node.js makes that hard to do anyways) [23:26] Sorella has joined the channel [23:27] mck_ has left the channel [23:28] PhiloSurfer has left the channel [23:28] TomY has joined the channel [23:28] abpin has joined the channel [23:28] neilk_ has joined the channel [23:28] abpin: Hello All [23:29] PEEHTEEH has joined the channel [23:30] abpin: Does any one know how to handle a disconnection problem (err) when MySQL server restarts while there is an active connection using node-mysql? [23:30] FireFly|n900 has joined the channel [23:32] abpin: anyone using node-mysql? [23:32] abpin: I need some help please. [23:33] EvRide: yes, but not a pro at it [23:33] tilgovi has joined the channel [23:33] tilgovi has joined the channel [23:33] abpin: EvRide: Hi [23:33] zilch has joined the channel [23:33] abpin: do you know how to handle a disconnect? [23:34] abpin: i need to catch the error and try to reconnect [23:37] abpin: anyone [23:38] zilch has joined the channel [23:39] ryah: abpin: socket.on('close') [23:39] R4md4c: abpin, did try to catch it in process.on('uncaughtException') ? [23:41] abpin: @ryah: thanks, in node-mysql they use somthing like client._socket you mean I have to use that socket ? [23:41] zanes has joined the channel [23:41] ryah: abpin: maybe node-msyql propigates that up to the client object - i dont know [23:42] abpin: @ryah: what do you use for MySQL ? [23:42] abpin: how do you deal with those disconnections? using socket ? [23:42] mikeal has joined the channel [23:42] devdazed has joined the channel [23:42] TomY has joined the channel [23:45] al3xnull has joined the channel [23:45] mikeal2 has joined the channel [23:46] abpin: R4md4c: Thanks, so process.on('uncaughtException') is the highest level i can catch the error just before the process crashes? [23:46] devdazed has left the channel [23:47] socketio\test\42 has joined the channel [23:48] blueadept2: quick question, is this a good way of interpreting command line responses from within node, or is there an easier way to do this? http://pastie.org/private/9v7pl1slmqvx9sg5kij2g [23:49] matomesc has joined the channel [23:49] brianseeders has joined the channel [23:49] mikeal has joined the channel [23:50] R4md4c: abpin, I guess so I always use it If there is an error I don't know why it happens I catch it there and investigate it [23:51] abpin: R4md4c: it might be faster for you to answer it than for me to find it :) how do you print the error detail console.log( what do i put in here? ) [23:52] abpin: R4md4c: You'r in Italy, where are from from originally ? [23:55] zilch has joined the channel [23:56] cafesofie has joined the channel [23:58] bedspax: use unxcasd [23:58] ckknight has joined the channel