[00:06] [[zzz]] has joined the channel [00:09] matyr_ has joined the channel [00:10] infynyxx has joined the channel [00:10] jtsnow has joined the channel [00:11] pt_tr has joined the channel [00:14] kriszyp has joined the channel [00:18] jtsnow has joined the channel [00:19] cying has joined the channel [00:21] djQuery: anyone got an opinion of the most mature mvc for a newbie [00:21] JaKWaC has joined the channel [00:22] schwab has joined the channel [00:29] JaKWaC has joined the channel [00:31] reid has joined the channel [00:31] ldoaslodsa has joined the channel [00:31] reid has joined the channel [00:31] reid has left the channel [00:31] k1ttty has joined the channel [00:31] reid has joined the channel [00:33] Guest88818 has left the channel [00:37] liar has joined the channel [00:40] normanrichards has joined the channel [00:40] ckknight has joined the channel [00:43] JaKWaC has joined the channel [00:47] dominictarr: hey, if a connection: keep-alive is not set, will the http request always close in node? [00:49] tzmartin has joined the channel [00:51] jonrohan has joined the channel [00:51] losing has joined the channel [00:52] aho: i thought keep-alive was only necessary for http 1.0 [00:52] Tobias| has joined the channel [00:53] aho: "to specify a persistent connection is deprecated in HTTP/1.1, since HTTP/1.1 specifies that connections are persistent by default and must be closed manually by sending " [00:53] aho: http://stackoverflow.com/questions/7033112/why-is-connection-keep-alive-still-being-specified-in-http-headers-isnt-it-dep [00:54] smtlaissezfaire has joined the channel [00:55] nerdy_ has joined the channel [00:58] gregmoreno has joined the channel [00:59] rfay has joined the channel [01:03] julioj has joined the channel [01:03] confoocious has joined the channel [01:03] confoocious has joined the channel [01:04] julioj: what's up y'all [01:05] smus has joined the channel [01:06] alibapcyk: Quick question if anyone can help [01:06] alibapcyk: when doing an http.request, you get a res.on('data') [01:06] alibapcyk: which comes in in chunks [01:06] alibapcyk: how do I know when that's finished? [01:07] Twelve-60 has joined the channel [01:07] julioj: alibapcyk: the on('end') event [01:08] julioj: alibapcyk: but let's double check the docs to make sure i'm not lying to you [01:08] alibapcyk: ah I see [01:08] navaru: res.on('data') <-- shouldn't be request [01:09] alibapcyk: so it's .on('end') ? [01:09] navaru: yes, it's .on('end' event [01:10] AD7six has joined the channel [01:10] alibapcyk: navaru: Sweet, ta [01:10] navaru: var chunks = ''; [01:10] navaru: req.on('data', function (data) { chunks += data; }); [01:10] navaru: req.on('end', function () { console.log(chunks); }); [01:11] alibapcyk: navaru - perfect, thank you [01:12] navaru: alibapcyk: anytime [01:12] cha0s: Hey guys, is __POSIX__ defined on everything except Windows? [01:12] deedubs has joined the channel [01:13] julioj: that pattern can be used on other things too, like fs.createReadStream and process.stdin. [01:15] alibapcyk: hm, on end never appears to get called [01:18] cha0s: alibapcyk, I wonder if that has to do with a persistent connection (just guessing) [01:19] cha0s: Is there an .on('close' ? [01:19] [[zz]] has joined the channel [01:19] alibapcyk: http://pastebin.com/2xLVPYny [01:19] alibapcyk: Here's my code [01:19] wootThe has joined the channel [01:21] alibapcyk: Doesn't look like there is an .on('close') [01:21] alibapcyk: from the docs [01:21] cha0s: I was backwards, end is the request end, close is the connection close =) [01:21] cha0s: Is there any way your remote HTTP response is never terminating? [01:21] jonaslund_ has joined the channel [01:21] alibapcyk: I don't think so [01:21] cha0s: There is http://nodejs.org/docs/v0.5.6/api/http.html#event_close_ but it's not the right event for your case [01:21] alibapcyk: it's a basic google search [01:21] jvdev has joined the channel [01:21] alibapcyk: I get response 200 [01:22] cha0s: Well, that's interesting. I remember learning about using 'transfer-encoding: chunked' to allow dynamic body lengths [01:22] cha0s: Is google setting that header? Might make sense with all their new G+ stuff [01:23] alibapcyk: Um, yes I guess so [01:23] cha0s: I'm not sure what the 'right' way is to handle that. I'd guess you could parse the response as you get it, and just close it yourself when you get what you need? [01:23] jobin88 has joined the channel [01:24] alibapcyk: Maybe, seems a bit hacky though, I'd rather figure out what's actually preventing on end from getting called [01:24] julioj has joined the channel [01:24] cha0s: alibapcyk, if Google's setting chunked that means the connection isn't actually ending... that is, at any time it can send more down the pipe [01:25] alibapcyk: cha0s, sure, but the result is complete, so [01:25] enhydra has joined the channel [01:26] cha0s: alibapcyk, like I said, my best guess is it has to do with the new G+ stuff. When I load google.com now, it sits there and a couple seconds later you can see it transfer a small amount more data for the bar on top. My guess would be that. [01:26] workit has joined the channel [01:26] workit: ENOTFOUND error [01:26] cha0s: You might have to actually execue the JS in order for that to happen as it does in a browser... no idea tbh [01:26] workit: anyone know how to fix it? [01:27] alibapcyk: cha0s: Hm, ok, thanks [01:27] cha0s: alibapcyk, have you considered using Google's API instead of just hitting their main page? [01:28] alibapcyk: cha0s - No, I wanted to keep it simple, but maybe I must now [01:28] cha0s: workit, http://groups.google.com/group/nodejs/browse_thread/thread/dc3f63da79060c88 ? [01:30] workit: thanks cha0s, checkin it out [01:30] joshkehn has left the channel [01:30] cha0s: Do C/C++ addons not work in Windows? [01:31] cha0s: I only ask because it seems like all the process.dlopen code is #ifdef'd by __POSIX__. I'm trying to figure out how this is defined. [01:33] workit: using Cygwin cha0s? [01:33] ShonM has joined the channel [01:33] cha0s: workit, well, I'm only asking in theory =) I'm not actually trying to make it work on Windows [01:34] cha0s: I'm just trying to learn how it's working [01:34] cha0s: (or not working?) [01:34] workit: lol [01:34] workit: trying to get AjaxIM to work with node.js [01:34] workit: very intimidating [01:35] cha0s: ^^ [01:35] cha0s: I kinda want to build a game engine on node.js, but I'm wimping out for now and just going C++/V8 [01:35] CIA-109: node: 03Ben Noordhuis 07master * r6ee676c 10/ src/platform_cygwin.cc : cygwin: fix return of uninitialized variable - http://git.io/YAwujg [01:35] CIA-109: node: 03Ben Noordhuis 07master * rd91f64f 10/ src/platform_cygwin.cc : cygwin: fix new[]/delete mismatch - http://git.io/92AEIw [01:36] workit: hehe did u see the football game done in node.js [01:36] cha0s: I didn't. Is it browser based? [01:36] ShonM: workit: http://ajaxim.com/documentation/development/servers/nodejs-library/ ? [01:36] CIA-109: libuv: 03Ben Noordhuis 07master * r01441ab 10/ src/unix/udp.c : unix: fix close() of potentially uninitialized fd - http://git.io/8QUXoA [01:36] CIA-109: libuv: 03Ben Noordhuis 07master * rd31a57d 10/ src/unix/cares.c : unix: fix NULL pointer dereference - http://git.io/WgdXzQ [01:37] workit: @ShonM [01:37] bnoordhuis: cha0s: windows add-on support == work in progres [01:38] cha0s: bnoordhuis, got it. My main question is, how does __POSIX__ get defined? I don't understand .gyp files but from scanning it, it seems to be defined on all except Windows. Is that correct? [01:38] workit: @ShonM it still has issues. i changed the server host to 127.0.0.1 and it tried to work, but wen i accessed it localhost:31411 it crashed [01:38] ShonM: workit: OS issue? [01:38] workit: with a TypeError: Object # has no method 'setBodyEncoding' [01:38] avih has joined the channel [01:38] bnoordhuis: cha0s: the compiler defines __POSIX__ (on posix platforms only, of course) [01:38] jvdev has joined the channel [01:39] workit: i hope not. Win764, using Cygwin. i;ve been able to run the node chat though [01:39] bnoordhuis: cha0s: so for node that means all supported platforms except windows [01:39] cha0s: bnoordhuis, Thanks! [01:39] ShonM: workit: imo install ubuntu, try it there. [01:39] bnoordhuis: workit: are you mixing express and plain node? [01:40] bnoordhuis: setBodyEncoding is not a method in the core node api [01:40] cha0s: I basically really like the idea of binary addons in a game engine and I'm curious how node did it. Kind of sucky that it doesn't work on Windows, *but* if I got that route, I'll probably learn enough to get it working in node, too =) [01:40] workit: as we speak,. vmware is doing that ^^ [01:40] workit: i think it is plain [01:40] bnoordhuis: cha0s: if you really want you can link in your add-ons statically [01:41] bnoordhuis: workit: in that case you probably want setEncoding (sans Body) [01:41] cha0s: bnoordhuis, I don't like that though. The whole point of using V8 in general is so things can be nice and dynamic [01:41] workit: let me try. thanks [01:41] cha0s: but, noted. =) [01:42] JaKWaC has joined the channel [01:43] cha0s: I haven't touched it in a looong time but the freebasic source code has a cross-platform method for dynamic library loading. I'm wondering how much I can cannibalize. [01:43] workit: bnoordhuis: am having request.setBodyEncoding('utf8'); [01:43] JaKWaC has joined the channel [01:43] workit: you suggest i make it, request.setBodyEncoding('sans Body'); [01:44] bnoordhuis: workit: read what i said again [01:44] bnoordhuis: and for the french language-challenged, 'sans' in this context means 'without' [01:45] cha0s: workit, he means setEncoding, not setBodyEncoding [01:45] JakeyChan has joined the channel [01:45] workit: hehe well what i did was change the setBodyEncoding to setEncoding and the new error i got was TypeError: Object # has no method 'sendHeader' [01:46] workit: forgive my slowness bnoordhuis [01:46] cha0s: Well, it doesn't make sense to send a header to a response... [01:46] workit: bnoorduis: i think it is a DNS issue though. wat is yo take? [01:47] bnoordhuis: workit: my take is that you misspelled 'setHeader' [01:47] ShonM: wow hook.io looks fun [01:47] workit: am using the server.js that comes with AjaxIM [01:47] workit: not sure its a good idea to keep changing their code [01:48] slickplaid: ShonM: hook.io *is* fun :D [01:48] githogori has joined the channel [01:48] cha0s: workit, it kinda sounds like they're using an outdated node api. [01:48] bnoordhuis: workit: it sounds like it was written for 0.2.x, iow ancient [01:48] ShonM: slickplaid: have you encountered any severe issues with data corruption or other unrecoverable errors? that's my main concern [01:49] workit: owwh [01:49] cha0s: forking their code is probably the only way to make it work at this point [01:49] slickplaid: ShonM: Not a one. [01:49] ShonM: wicked [01:49] slickplaid: It Just Works(tm) every time I've resorted to using it. [01:49] workit: hmmm. thats a wall. well thanks. wonder how u figured out its ancient tho [01:50] ShonM: i think i'll only use it for some things at first. task queue's, notifications, and the like. things that really can't cause any harm [01:51] spathi^ has joined the channel [01:51] dshaw_ has joined the channel [01:51] bnoordhuis: workit: because those methods have been deprecated for ages now [01:51] slickplaid: ShonM: Good idea. [01:51] bnoordhuis: deprecated and removed [01:53] ttpva has joined the channel [01:53] workit: thanks guys. gonna downgrade node.js, can u recommend which version may work with AjaxIM [01:53] ShonM: 0.4.9? [01:54] ShonM: ACTION guesses wildly [01:54] slickplaid: if things have been deprecated and removed [01:54] slickplaid: i would guess 0.2.x or lower [01:54] workit: cool will keep u updated wen am thru [01:54] slickplaid: But, I'd strongly recommend finding another solution if that's the case. (or rebuilding it to work with the newest version) [01:54] slickplaid: you're going to create more headaches than it solves [01:55] workit: thanks but got only hours at a Garage48 event [01:56] slickplaid: Well then, good luck and godspeed :D [01:58] jj0hns0n has joined the channel [02:00] CIA-109: node: 03Ben Noordhuis 07v0.4 * raff91f7 10/ src/platform_cygwin.cc : cygwin: fix return of uninitialized variable - http://git.io/HFIvtw [02:00] CIA-109: node: 03Ben Noordhuis 07v0.4 * r942b92a 10/ src/platform_cygwin.cc : cygwin: fix new[]/delete mismatch - http://git.io/Jjx45Q [02:03] JaKWaC has joined the channel [02:05] davidbanham has joined the channel [02:06] bombworm has joined the channel [02:07] devaholic has joined the channel [02:12] CIA-109: libuv: 03Bert Belder 07master * r985f1a1 10/ include/uv-private/uv-win.h : cleanup - http://git.io/8SQi9w [02:12] CIA-109: libuv: 03Bert Belder 07master * r77bc00e 10/ src/win/pipe.c : win: uv_pipe_queue_read should set read_pending flag - http://git.io/utMQPA [02:12] rfay has joined the channel [02:12] beejeebus has joined the channel [02:12] CIA-109: libuv: 03Bert Belder 07wintty * r8c1f528 10/ (5 files in 2 dirs): win: TTY work - WIP - http://git.io/H8BEww [02:13] beejeebus: anyone know where to get a node.js t-shirt? [02:13] beejeebus: http://www.redbubble.com/people/dmitrybaranovsk/t-shirts/5821133-node-js-old-school?p=t-shirt [02:13] beejeebus: is that trust-worthy? [02:14] skm has joined the channel [02:18] torsd has joined the channel [02:19] MooGoo: I'm failing to see how nodejs is old school [02:20] MooGoo: well its the oldschool logo I guess [02:20] Vennril2 has joined the channel [02:21] devaholic: hmm [02:21] devaholic: i dont think he is allowed to sell node.js t shirts [02:21] MooGoo: doubt it [02:21] _jhs has joined the channel [02:22] MooGoo: but its just a teeshirt [02:22] beejeebus: devaholic: MooGoo: yeah, that's why i'm asking. if there's an 'official' place to get them, i'd prefer to use it [02:22] d_low: is there a way to do a synchronous "http get" with node? [02:22] MooGoo: the only offical place is from joyent [02:22] MooGoo: I dont know if they have teeshirts [02:22] MooGoo: they probably should tho [02:22] marcello3d has joined the channel [02:22] MooGoo: and a mug or two [02:22] d_low: looks like http.request is async only [02:23] beejeebus: also - anyone know of node.js community events in SF or portland from october 13 - 25 [02:24] MooGoo: I think there's a node orgy coming up soon in SF [02:24] rmzg: d_low: Maybe step js will help you? [02:24] shanebo has joined the channel [02:24] d_low: rmzg: do you have a link? google sent me here [02:24] d_low: https://github.com/ajalabox/stepjs [02:25] rmzg: oh er [02:25] beejeebus: MooGoo: url? [02:25] reid has joined the channel [02:25] MooGoo: uh [02:25] rmzg: d_low: I meant http://tamejs.org/ [02:25] MooGoo: forget I said anything [02:25] d_low: ohh ic, got it now. Thanks rmzg [02:25] rmzg: =] [02:25] rmzg: haha [02:25] rmzg: Well, step is another way to do it I think! [02:26] julioj has joined the channel [02:26] d_low: rmzg: thanks, i think this will help [02:27] devaholic: why would you want http.get to be sync [02:29] trepan has joined the channel [02:29] d_low: devaholic: i guess it doesn't have to be. Its just a lot more work for what im doing (getting json data from a remote site and sending it back to the client) [02:29] MooGoo: that doesnt sound like a lot of work [02:29] d_low: MooGoo: i can make assumptions too [02:29] d_low: thanks for the help so far. I was just curious really [02:29] ShonM has joined the channel [02:30] MooGoo: yes...we can all make assumptions [02:30] JaKWaC has joined the channel [02:31] sam350 has joined the channel [02:32] d_low: MooGoo: if you want me to go into it, fine. I'm requesting some data from a remote server and the client is waiting on it before it loads something. It's basically a sync operation. So I'll either need to setup a timer and handle it that way or do it sync. Sync would be easier if it existed. [02:32] beejeebus: d_low: just because the client is blocking on the request doesn't mean node.js should [02:33] spathi^ has joined the channel [02:33] d_low: beejeebus: what would your recommendation be? [02:34] beejeebus: d_low: write a callback to handle the returned data, and pass it back to the client from there [02:35] vcv has joined the channel [02:36] Kai` has joined the channel [02:36] rmzg: Callbacks are so 20th century [02:37] d_low: im trying to rethink some of it now [02:40] smus has joined the channel [02:41] beejeebus: d_low: http://nodejs.org/docs/v0.4.12/api/streams.html#stream.pipe [02:41] vcv: Hi, I installed node on fedora 15, after the installation node --help worked, I tried V8 options and I coldn't exit from v8 console so I closed the terminal. after that when I tried to install npm it tells "Maybe node is installed, but not in the PATH? Note that running as sudo can change envs. PATH=/usr/lib64/ccache:/sbin:/bin:/usr/sbin:/usr/bin" and when I tried node --help or node -v, it tells "bash: node: command not found... Insta [02:41] d_low: thanks beejeebus. I don't think i need a stream though [02:42] d_low: i think ive got it figured out actually [02:42] beejeebus: d_low: http://nodejs.org/docs/v0.4.12/api/http.html#http.ServerResponse [02:42] beejeebus: a http server response is a stream :-) [02:43] d_low: i mean i think get is fine for what i need [02:43] joshkehn has joined the channel [02:43] vcv: I'm using fedora 15 and I used main installation method, do I want to unistall node and use an alternation installation method? [02:44] igl has joined the channel [02:45] tmzt: what would cause a CALL AND RETRY 2 ALLOCATION FAIL on node v0.4.12 ? [02:46] jj0hns0n has left the channel [02:49] julioj has joined the channel [02:49] navaru: vcv: you could use bashrc and setup an alias directly to node's path [02:49] ilikeit: SubStack: browserling has an incredible design too/exit [02:49] dgathright has joined the channel [02:49] ilikeit: lol [02:51] m1k3l has joined the channel [02:51] navaru: vcv: use fg, kill the process, or find the process and kill it, I don't see the point in installing it again if it worked [02:53] normanrichards has joined the channel [02:54] heavysixer has joined the channel [02:55] JaKWaC has joined the channel [02:55] astropirate has joined the channel [02:56] siong1987 has joined the channel [02:57] cha0s has joined the channel [02:57] vcv: thanks for reply, I'll try it [02:58] necrodearia has joined the channel [02:59] navaru: vcv: if you installed node as root, as another user you'll sometimes get that, you have to add node's PATH to your user's PATH [03:01] smathy has joined the channel [03:02] navaru: vcv: edit $HOME/.bashrc ... add "export PATH=/path/to/node/dir:$PATH" ... logout/login (exit/open terminal) [03:03] rmzg: You can just source ~/.bashrc instead of exiting [03:05] navaru: rmzg: correct, forgot about that [03:05] JaKWaC has joined the channel [03:06] PuffTheMagic: when I use nodejs to start /bin/sh -l, i get an error the error "can't access tty; job control turned off" [03:06] PuffTheMagic: anyone know why or how I can fix it [03:06] rmzg: PuffTheMagic: You'd have to spawn a tty for it [03:06] PuffTheMagic: im using the tty module [03:06] PuffTheMagic: tty.open('/bin/sh') [03:07] rmzg: Then clearly it's not working! [03:07] rmzg: =] [03:07] PuffTheMagic: any idea why its not working ? [03:08] rmzg: Why do you need job control anyway? [03:08] rmzg: And why are you spawning bash [03:08] rmzg: This seems like a terrible idea [03:08] vcv: before you reply I uninstall node and tried to reinstall. now it tried install npm and it told "EACCES, Permission denied '/home/dumindu/local/node/lib/node_modules'. I'll tried it with sudo. If the path not get again after close the terminal I'll edit .bashrc. [03:08] PuffTheMagic: im create a terminal app [03:08] PuffTheMagic: so... i must spawn sh [03:09] gnuanu has joined the channel [03:09] schwab has joined the channel [03:11] vcv: it was failed, installing npm, I'll edit .bashrc [03:15] devongovett has joined the channel [03:16] vcv: I did "sudo make install" this time and node commands working properly and there are 2 "export PATH=$HOME/local/node/bin:$PATH" on .bashrc file now [03:16] vcv: but an error on npm installation [03:16] navaru: vcv: what error? [03:17] meso has joined the channel [03:18] navaru: vcv: you're using ./configure --prefix=$HOME/local/node ? [03:18] navaru: vcv: when compiling node [03:18] vcv: yes [03:19] navaru: vcv: and you're using the shell script, npmjs.org/install.sh? [03:19] kmiyashiro has joined the channel [03:19] boehm has joined the channel [03:20] vcv: navaru : yes(./configure --prefix=$HOME/local/node) [03:21] vcv: navaru : to install npm "sudo curl http://npmjs.org/install.sh | sh" [03:21] rev has joined the channel [03:21] vcv: Could not create /home/dumindu/local/node/lib/node_modules/___npm.npm npm ERR! error installing npm@1.0.30 Error: EACCES, Permission denied '/home/dumindu/local/node/lib/node_modules' [03:21] navaru: vcv: drop the sudo, you don't need it since is your user's dir [03:22] copongcopong has joined the channel [03:24] navaru: vcv: if you need to use 'sudo'.. use it here: ....install.sh | sudo sh [03:26] deedubs_ has joined the channel [03:26] vcv: navaru : "Could not create /home/dumindu/local/node/lib/node_modules/___npm.npm npm ERR! error installing npm@1.0.30 Error: EACCES, Permission denied '/home/dumindu/local/node/lib/node_modules'" ,so I did "sudo chmod 777 /home/dumindu/local/node/" and trying [03:27] balupton_ has joined the channel [03:27] parshap: is it appropriate to require long-stack-traces all the time or would you require it conditionally for development? [03:28] devaholic has joined the channel [03:29] newsbad_com has joined the channel [03:29] vcv: navaru : same error : "Could not create /home/dumindu/local/node/lib/node_modules/___npm.npm npm ERR! error installing npm@1.0.30 Error: EACCES, Permission denied '/home/dumindu/local/node/lib/node_modules' [03:29] vcv: navaru : "npm ERR! Could not create /home/dumindu/local/node/lib/node_modules/___npm.npm npm ERR! error installing npm@1.0.30 Error: EACCES, Permission denied '/home/dumindu/local/node/lib/node_modules' npm ERR! Error: EACCES, Permission denied '/home/dumindu/local/node/lib/node_modules' npm ERR! Report this *entire* log at: npm ERR! npm ERR! or email it to: npm ERR! n [03:29] navaru: vcv: I don't know what commands are you running [03:30] devaholic: vcv installing node on fedora 15 here was pretty painless [03:30] vcv: navaru : curl http://npmjs.org/install.sh | sh [03:31] navaru: vcv: put ... | sudo sh [03:31] jakehow has joined the channel [03:32] smtlaissezfaire has joined the channel [03:33] navaru: parshap: I don't see the point to use it production, in my opinion you sould stick it only in development (it might affect performance) [03:33] JaKWaC has joined the channel [03:34] nforgerit has joined the channel [03:34] devaholic: it doesnt do anything [03:35] Spion_ has joined the channel [03:36] navaru: vcv: if you can't get it to work, there are a few options in this gist: https://gist.github.com/579814 [03:36] parshap: navaru: that's the conclusion i came to as well. what condition should the branch be based on? [03:37] aho has joined the channel [03:37] jetherson has joined the channel [03:38] navaru: parshap: condition? i don't follow [03:38] parshap: when to require - if (ENV === "development") { require ... } [03:39] vcv: navaru : Thanks a lot for the help. I logged as root with su, and tried "curl http://npmjs.org/install.sh | sh", Its worked. thanks a lot [03:42] navaru: parshap: that depends on your development requirements, I don't see as a strict condition, my advice is to keep it as simple as possible and clear.. avoid confusion, don't add stuff because you might use it, find good purpose for everything you add [03:42] Andrevan has joined the channel [03:42] Andrevan has joined the channel [03:42] devaholic: good advice [03:44] dexter_e has joined the channel [03:46] parshap: navaru: that's exactly why i asked. if the require should not happen in production then the program must know about its environment. is there a common way of achieving this (e.g., a NODE_ENV environment variable)? [03:47] navaru has left the channel [03:47] kriszyp has joined the channel [03:48] hidden has joined the channel [03:48] davidwalsh has joined the channel [03:48] hidden has left the channel [03:52] mAritz has joined the channel [03:56] mAritz: I'm looking for a node.js project. Preferable small open source projects that are desperate for more people and are game related. PM me! :) [03:59] cying has joined the channel [03:59] socketio\test\00 has joined the channel [04:03] htoothrot has joined the channel [04:03] yhahn has joined the channel [04:03] aho has joined the channel [04:05] fread2281 has joined the channel [04:05] fread2281: will pcc work? [04:05] blueadept: anyone here ever have any issues with mongoose and commonjs-utils.validate? [04:05] sechrist has joined the channel [04:05] sechrist: Is there a nice module that's a base for creating console apps? [04:05] sechrist: console as in with a prompt and colored output [04:06] sechrist: I see the color modules and a few modules that provide a little prompt but no little boilerplate thing [04:08] Coderah has joined the channel [04:09] vcv: thanks for the help guys:) [04:10] jchris has joined the channel [04:10] devaholic has joined the channel [04:11] ttpva has joined the channel [04:13] Charuru has joined the channel [04:14] catb0t has joined the channel [04:15] yuwang has joined the channel [04:15] andrewfff has joined the channel [04:17] ecin_ has joined the channel [04:20] dexter_e has joined the channel [04:22] pizthewiz has joined the channel [04:23] schwab has joined the channel [04:26] Frippe has joined the channel [04:29] Frippe has joined the channel [04:30] davidbanham has joined the channel [04:30] julioj has joined the channel [04:31] OmidRaha has joined the channel [04:32] murilobr has joined the channel [04:33] skm has joined the channel [04:33] dingomanatee has joined the channel [04:38] Voxxit has joined the channel [04:39] aoberoi has joined the channel [04:42] fayce has joined the channel [04:43] JaKWaC has joined the channel [04:45] EhevuTov has joined the channel [04:48] e6nian has joined the channel [04:48] smtlaissezfaire has joined the channel [04:51] fangel has joined the channel [04:53] e6nian has joined the channel [04:54] JaKWaC has joined the channel [04:54] smus has joined the channel [04:56] metellus has joined the channel [05:04] smtlaissezfaire has joined the channel [05:05] ecin_ has joined the channel [05:11] mrsrikanth has joined the channel [05:16] max_dev has joined the channel [05:19] smus has joined the channel [05:21] willwhite has joined the channel [05:25] te-brian has joined the channel [05:25] Twelve-60: Is the event loop processed in a LILO fashion? [05:26] pen has joined the channel [05:26] sub_pop has joined the channel [05:27] jonrohan has joined the channel [05:30] _sh0x has joined the channel [05:31] openpercept has joined the channel [05:32] yhahn has left the channel [05:32] shanez_ has joined the channel [05:33] brianseeders has joined the channel [05:34] ptlo has joined the channel [05:35] avih has joined the channel [05:36] openpercept has left the channel [05:36] julioj has joined the channel [05:37] EyePulp has joined the channel [05:40] devaholic has joined the channel [05:40] skm has joined the channel [05:46] kimico has joined the channel [05:47] kmiyashiro has joined the channel [05:50] ckknight has joined the channel [05:53] sivy has joined the channel [05:53] willwhite has joined the channel [05:56] smtlaissezfaire has joined the channel [06:00] andrewthemerry has joined the channel [06:04] SamuraiJack has joined the channel [06:05] willwhite has joined the channel [06:07] dgathright_ has joined the channel [06:10] k1ttty has joined the channel [06:13] clarkfischer has joined the channel [06:15] CarterL has joined the channel [06:15] elliottcable: Ugh. Anyone else think `module.exports` is terribly named? [06:16] elliottcable: “SyntaxError: ” indeed. [06:17] AAA_awright: elliottcable: No [06:17] julioj: meh [06:20] elliottcable: God *damnit*, half of my names in this file are apparently reserved words. ಠ_ಠ [06:21] elliottcable: er. wrong channel. well, related channel, but I didn’t intend to say that in *here*. [06:21] mjr_ has joined the channel [06:23] jacobolus has joined the channel [06:30] EhevuTov: anyone use nodemon with the Cloud9 IDE in debugging, successfully? [06:36] necrodearia has joined the channel [06:37] avih has joined the channel [06:38] Twelve-60: There was an internal error in Node's debugger. Please report this bug. [06:38] Twelve-60: :o [06:40] smus_ has joined the channel [06:43] saschagehlich has joined the channel [06:43] jacobolus has joined the channel [06:47] simenbrekken has joined the channel [06:50] hasenj has joined the channel [06:54] wmage has joined the channel [06:55] Nuck: I just hit 13 middlewares on Express. [06:55] Nuck: *One one project* [06:59] ryanrolds: Nuck: Anyone of them to deal with problems in express/connect or are they all additional functionality? [06:59] Nuck: ryanrolds: All additional haha [07:00] shanebo: Nuck is that total, including native connect and/or express? [07:00] Nuck: shanebo: aye, about 8-10 of those are express.thing [07:01] ryanrolds: I know I usually add about 4-5 custom on top of the usual express/connect middleware. [07:01] cchristiansen has joined the channel [07:01] Nuck: bodyParser, cookieParser, logger, session, favicon, query, compiler, static, and router [07:02] Nuck: Plus a custom one that adds default session values, express-form, my own upload system for AJAX uploads, and my error middleware [07:03] ryanrolds: That sounds about normal. [07:03] stisti has joined the channel [07:05] shanebo: my max is 9 [07:05] Nuck: This is for a full website [07:05] shanebo: mine too [07:05] Nuck: Mind you, it's only about 1/5 done, and probably already thousands of lines in [07:07] meandi has joined the channel [07:09] shanebo: you guys know of any modules that will consolidate duplicate css? [07:10] Nuck: shanebo: Like, automatically, or providing mixins? [07:10] Nuck: Because I use LESS, some people use Stylus, others use SASS [07:10] Nuck: No matter what, you're basically gauranteed mixins [07:10] anoop has joined the channel [07:10] shanebo: well i'm using connect-assetmanager which allows for middleware [07:11] ryanrolds: connect-assetmanage is quite nice. [07:11] shanebo: agreed :) [07:11] matyr has joined the channel [07:11] ryanrolds: I'm not aware of many things that hook in to it. [07:12] Nuck: That anything like express.compiler? [07:12] shanebo: https://github.com/mape/connect-assetmanager [07:13] shanebo: see: http://cl.ly/093t1F0r2L1a1z2U3S3f [07:14] andrewfff has joined the channel [07:16] Emmanuel` has joined the channel [07:18] dgathright_ has joined the channel [07:21] julioj: sweet, got my little CLI running all "jitsu-like", nice not having to prepend the node command everytime. [07:27] cjroebuc_ has joined the channel [07:27] DrMcKay has joined the channel [07:28] ryanrolds: Any "jitsu-like" suites for deploying applications to servers? I found Cast, which works, but development doesn't appear to be going on anymore. [07:29] ryanrolds: It needs to install apps to servers that I have spun up and configured, not any of the normal hosts. [07:36] Druide has joined the channel [07:38] herbySk has joined the channel [07:38] diorahman has joined the channel [07:39] diorahman has left the channel [07:40] whitman has joined the channel [07:57] openpercept has joined the channel [07:57] JakeyChan has joined the channel [07:58] overclk has joined the channel [07:59] petrjanda has joined the channel [08:03] petrjanda has joined the channel [08:03] Wizek has joined the channel [08:10] shedinja has joined the channel [08:11] shedinja: how can I tell if a net.Socket is currently connected or not? Is there a variable/function on it I can look at? [08:12] mehlah has joined the channel [08:13] Frippe has joined the channel [08:13] reid has joined the channel [08:13] reid has joined the channel [08:15] ron_frown has joined the channel [08:15] ron_frown: ladies [08:16] ron_frown: anyone got advice ehre? I am enamoured with node + socket.io but need somenative clients to connect to basically the same services [08:17] ron_frown: doesnt look like there are any fantastic solutions for native java/c# [08:19] __doc__ has joined the channel [08:20] monokrome: Hello. Does anyone here know if there is a way to do integration testing with express? I am trying to find a way to verify that requests don't fail when code changes. [08:20] TheJH has joined the channel [08:22] rhizmoe has joined the channel [08:22] saesh has joined the channel [08:23] matyr has joined the channel [08:23] fread2281_ has joined the channel [08:24] adambeynon has joined the channel [08:24] eventualbuddha has joined the channel [08:24] dash has joined the channel [08:25] knifed has joined the channel [08:25] k1ttty has joined the channel [08:31] Fabryz has joined the channel [08:32] Fabryz: so, did anyone take any pic during #nodejisconfit? =) [08:32] cognominal has joined the channel [08:33] cconstantine has joined the channel [08:44] _bat has joined the channel [08:45] DrMcKay_ has joined the channel [08:48] zastaph has joined the channel [08:49] madsleejensen has joined the channel [08:50] temp02 has joined the channel [08:53] CrypticSwarm_ has joined the channel [08:54] sfoster has joined the channel [08:56] fly-away has joined the channel [08:57] monokrome: Hey. Does anyone know of a decent ORM backed by Riak? [08:58] SomeoneWeird has joined the channel [08:59] SomeoneWeird: Whats "does not equal" in node? i keep getting an error when using != [09:00] matyr has joined the channel [09:01] monokrome: What's your code? [09:02] reid has joined the channel [09:03] SomeoneWeird: if(last=="") { [09:03] SomeoneWeird: last = d; [09:03] SomeoneWeird: } elseif(last!=d) { [09:03] SomeoneWeird: etc. [09:03] SomeoneWeird: oh. [09:04] SomeoneWeird: >_> [09:04] SomeoneWeird: ACTION stupid [09:04] lmorchard has joined the channel [09:04] SomeoneWeird: sorry [09:09] blup has joined the channel [09:10] `3rdEden has joined the channel [09:12] hermanjunge has joined the channel [09:15] jhbot has joined the channel [09:17] mike5w3c has joined the channel [09:19] Fabryz: uploaded fre #nodejsconfit pics http://t.co/s2QdMOVO [09:19] Fabryz: some* [09:19] elliottcable: Can I install an NPM-based package just using git? [09:19] elliottcable: that is, without using `npm`. [09:20] elliottcable: for whatver reason, it consistently crashes for me. [09:20] deadman87 has joined the channel [09:22] tylerstalder has joined the channel [09:23] TheJH: elliottcable, could you gist the crash? [09:23] mjr_: monokrome: Riak is not a relational database, so an ORM would be an odd fit. [09:23] TheJH: elliottcable, you can, but it's a lot of pain if it has dependencies [09:23] monokrome: mjr_: Riak represents relations via link walking [09:24] mjr_: Yeah, kinda. [09:24] mjr_: But it's more like a secondary index than an actual relation [09:24] mjr_: You can't do "joins" [09:24] monokrome: meh [09:24] monokrome: It might not be a constraint, but it's a relation. [09:25] mjr_: But what's to map? You can store your actual objects in there, just JSON.stringify them, boom. [09:25] monokrome: Either way, there's got to be someone out there implementing an interface to make that easier. [09:25] shedinja_ has joined the channel [09:25] elliottcable: TheJH › sure, but I need to get this working quickly [09:25] elliottcable: in the middle of some intense debugging, and I don’t want to lose my train of thought [09:26] mjr_: Riak is hard to use at the moment. It's getting better with 1.0, but it still lags behind Mongo in terms of usability. [09:26] mjr_: That said, I'm a fan of Riak, and I think it's worth suffering through the initial learning curve. [09:26] elliottcable: how do I ensure I have the latest npm? [09:26] monokrome: Too bad mongo sucks at everything else [09:26] TheJH: elliottcable, what package is it? I could just install it here, make a tarball and give you the tarball, I think [09:26] TheJH: elliottcable, depends on your current npm version? [09:27] TheJH: elliottcable, for newer versions, "npm update npm -g" [09:27] elliottcable: crap, even trying to install NPM crashes NPM. [09:27] elliottcable: watf. [09:27] torgeir_ has joined the channel [09:27] TheJH: elliottcable, what node version? [09:27] elliottcable: yeah that’s not useful because anything NPM crashes /= [09:27] elliottcable: whatever HEAD is [09:27] elliottcable: `brew install node --head` [09:27] elliottcable: er, HEAD* [09:27] elliottcable: 0.5.8-pre [09:27] DrMcKay: don't. [09:27] TheJH: elliottcable, well, don't use node HEAD [09:28] DrMcKay: and don't use brew [09:28] elliottcable: heh, so I’ve heard. I couldn’t get `brew install node` to work. [09:28] elliottcable: *that* kept crashing too. [09:28] elliottcable: DrMcKay › lolwut? [09:28] DrMcKay: node is easy enough to install from source [09:28] hermanjunge: elliotcable [09:28] elliottcable: sure, but I have no desire to litter stuff all over my system. [09:28] hermanjunge: what version of node.js are you using? [09:28] TheJH: elliottcable, git clone, configure, make, make install [09:28] DrMcKay: I mean, use brew, but not for node [09:28] hermanjunge: no [09:28] hermanjunge: git clone.... etc etc [09:28] hermanjunge: better [09:28] elliottcable: DrMcKay › again, I don’t want to leave any stuff *outside* of homebrew’s control. Makes it more difficult to manage/remove. [09:28] TheJH: ah, I forgot "checkout" [09:28] elliottcable: Whatever you want me to do, though, I can do by building a custom formula. [09:29] hermanjunge: curl -O http://nodejs.org/dist/node-v0.4.12.tar.gz [09:29] elliottcable: is there something you want me to do with the source that the existing forumla already doesn’t do? [09:29] hermanjunge: :P [09:29] elliottcable: yeah, that’s exactly the dist it’s trying to use [09:29] elliottcable: let me wipe my entire brew and start over. [09:29] elliottcable: Maybe something’s messing with it. [09:30] TheJH: !remember head If you're using the git HEAD version of something, expect stuff to break. Period. Use a version the author declared as "stable" or at least one he released as a seperate version. [09:30] jhbot: saved definition of 'head' [09:30] hermanjunge: yep [09:30] hermanjunge: the HEAD version is unstable [09:30] elliottcable: TheJH › For every single one of my hundreds of projets, the HEAD *is* the declared-stable. [09:30] hermanjunge: the last week at last [09:30] TheJH: hermanjunge, no, HEAD is more unstable than "unstable" (0.5.x) [09:30] elliottcable: anything unstable, shouldnt’ be in Master yet. [09:30] elliottcable: that simple. [09:30] elliottcable: ’s what branches are for, broski! [09:30] elliottcable: ACTION pokes around [09:30] hermanjunge: well, this way they encourage collaboration [09:31] hermanjunge: if not, they would call in a closed repository [09:31] Sense545 has joined the channel [09:31] hermanjunge: they would work* [09:31] elliottcable: what? [09:31] elliottcable: how does this have *anything* to do with collaboration? [09:31] elliottcable: ACTION shrugs [09:31] elliottcable: not here to argue that. Here to get my NPM workin’. ^‿^ [09:31] hermanjunge: well, you got a point, ppl could work in branches [09:31] hermanjunge: lettin head for the stable stuff [09:32] hermanjunge: it is a question of conventions and culture of the moment [09:32] rendar has joined the channel [09:32] kkaefer has left the channel [09:32] elliottcable: hermanjunge › http://blog.elliottcable.name/posts/granular_committing.xhtml [09:32] elliottcable: forgive the broken design, I haven’t shown that blog any love in nearly three years [09:33] elliottcable: I really wish Node.js would build with multiple cores. http://ell.io/z29t [09:34] hermanjunge: TL;DR [09:34] elliottcable: hermanjunge › lol. [09:35] hermanjunge: just kidding. I see you know a couple of things about working on repositories [09:35] hermanjunge: I declare myself totally n00b. Don't bite me :D [09:35] elliottcable: not quite [09:35] elliottcable: I know a ‘couple of things’ about working on *my* repositories [09:36] elliottcable: but they’re by no means standard; I have zero knowledge of the requirements or tactics required on a project like Node.js or NPM. [09:36] elliottcable: my code is all public because I want people to be able to learn from it and use it freely; not because I accept much in the way of contributions. [09:37] hermanjunge: what is your repo? [09:37] elliottcable: so, I was expressing a reasoning for my surprise at the fact that HEAD was unstable; not a judgement of the Node.js team for taking the old-school way of “releasing” code outside of the repository, and using the repository solely for unstable development ^‿^ [09:37] hermanjunge: cool [09:37] elliottcable: it worked! [09:37] hermanjunge: with 4.12? [09:37] elliottcable: for some odd reason, it took several minutes to run before spitting anything out, but it worked eventually [09:37] elliottcable: so, happyiottcable. [09:38] elliottcable: thanks for calling out my idiocy with --HEAD, y’all. [09:38] TheJH: elliottcable, npm often works that way, you have to stare at a blank screen until it has nearly finished its work [09:39] hermanjunge: Haven't seen elliotcable's repo. 97! :P [09:40] elliottcable: hermanjunge › if you’re curious what my “granular committing” system looks like in practice, http://ell.io/n3b7 [09:41] hermanjunge: ok, I'm going. It's 06:41 here [09:42] stonebranch has joined the channel [09:43] megalomix has joined the channel [09:43] megalomix: hello everybody [09:44] megalomix: can i run node with no-root user? [09:44] rmzg: Probably! [09:45] DrMcKay: sure you can [09:45] megalomix: k but i remember there was problem with lass privileges using Express.js [09:46] megalomix: (to listen 80 port) [09:47] DrMcKay: only root can listen on port 80 [09:47] DrMcKay: and that's not node's fault, that's how Unices are designed [09:48] megalomix: hmm ok [09:48] SomeoneWeird: afaik non-root users can only bind to ports >8000 [09:48] liveink has joined the channel [09:48] megalomix: before i used nginx [09:48] konobi: depends where you're running it [09:48] DrMcKay: SomeoneWeird: >1024 [09:48] megalomix: nginx bind 80 with root but create a proces to handle requests with the user i set [09:49] konobi: no.de, you can can bind to port 80 as a normal user [09:49] SomeoneWeird: orly DrMcKay [09:49] SomeoneWeird: ok [09:50] mklappstuhl has joined the channel [09:50] DrMcKay: elliottcable: what command generates this nice tree you have there? [09:51] megalomix: konobi, can I? [09:52] markwubben has joined the channel [09:56] boehm has joined the channel [09:58] philjackson has joined the channel [10:00] reid has joined the channel [10:03] ph^ has joined the channel [10:03] konobi: megalomix: indeed [10:07] megalomix: indeed yes or indeed no? [10:07] megalomix: ahahah ;-) [10:07] megalomix: joking [10:09] DrMcKay: :edit! [10:10] DrMcKay: fuck. [10:12] DrMcKay: btw, if anyone was looking for an awesome vim javascript plugin, here it is: https://github.com/pangloss/vim-javascript [10:13] ron_frown: anyone recommend any connection/session management plugins [10:13] DrMcKay: ron_frown: plugins for what? [10:13] ron_frown: I've got raw websockets and socket.io connections that I'd like to kinda lump together and enable something like socket.io's chatrooms functionality [10:14] ron_frown: so I'd like to be able ot have groups of people lumped together [10:14] ron_frown: almost like a hybrid of pubsub [10:14] DrMcKay: ron_frown: why not use socket.io, then? [10:14] ron_frown: apparently it doesnt talk the draft the clients do so I have to use websocket-server [10:15] DrMcKay: ron_frown: (works with Chrome 15) [10:15] ron_frown: connecting from native apps [10:16] okuryu has joined the channel [10:17] DrMcKay: oh. well, I'm not familiar with websocket-server, sorry [10:17] Remoun has joined the channel [10:19] adambeynon has joined the channel [10:21] megalomix: guys on package.json i put something like: "redis": ">= 0.6.7" [10:21] megalomix: but [10:21] megalomix: how to always get the latest version ? [10:21] DrMcKay: megalomix: "redis": "*" [10:21] megalomix: because if i use it i always will have 0.6.7 version [10:21] megalomix: DrMcKay, Perfect! it gets the lastest? [10:22] DrMcKay: megalomix: yup [10:22] megalomix: goo [10:22] megalomix: d [10:23] megalomix: now i'm thinking maybe is not safe to do that, because if i test with a version does not mean that it will work forever....hmmm [10:23] megalomix: better to specify the version :) [10:24] megalomix: lasti thing...how can i see the versions of a package? [10:24] TheJH: megalomix, "npm ls"? [10:24] megalomix: i mean...at the moment express.js is 3.0.0alpha1 so i don't thing is already good to use [10:24] megalomix: npm express ls [10:25] megalomix: ? [10:25] TheJH: megalomix, no, just "npm ls" [10:25] megalomix: i would get the last stable version [10:25] jbpros has joined the channel [10:26] TheJH: megalomix, 2.4.6 is the latest express version on npm [10:26] megalomix: how did you see it [10:26] megalomix: ? [10:26] TheJH: err, wait. what is express.js? [10:26] megalomix: yes [10:26] megalomix: express.js [10:27] megalomix: web framework [10:27] TheJH: megalomix, is that even on npm? [10:28] megalomix: sure [10:28] megalomix: i'm searching at: http://search.npmjs.org/ [10:28] megalomix: but i don't find that [10:28] augustl: it's just called "express" [10:28] augustl: packages are discouraged from having the .js suffix in npm [10:28] megalomix: augustl, yes [10:29] megalomix: i searched "express" [10:29] megalomix: but there is not [10:29] megalomix: https://github.com/visionmedia/express <--- this package i mean [10:29] TheJH: megalomix, go to http://search.npmjs.org/#/express directly [10:30] megalomix: strange...the search is not working goo [10:30] megalomix: good [10:30] megalomix: ok i see that page 2.4.6 the latest [10:31] megalomix: TheJH, but all the "stable" versions are listed? [10:31] jhbot has joined the channel [10:31] megalomix: because if i scroll down i see "beta" [10:31] TheJH: megalomix, what? listed where? [10:31] megalomix: http://search.npmjs.org/#/express <----- [10:32] TheJH: megalomix, ah, yes - it's up to the package owner whether he published beta stuff on npm, most don't [10:33] megalomix: ah ok [10:33] megalomix: perfect [10:33] megalomix: btw we have to tell to isaacs that the search is not working good [10:36] augustl: what's wrong with the search? [10:39] TheJH: augustl, it orders alphabetically. so all the express-addon-stuff that comes before express in the alphabet shows up on the search results page, and express isn't shown because of the result count limit [10:40] augustl: ah [10:40] augustl: that's kind of bad :) [10:42] Morkel has joined the channel [10:45] mraleph has joined the channel [10:49] reid has joined the channel [10:49] reid has joined the channel [10:49] wmage has joined the channel [10:51] alphahydrae has joined the channel [10:58] shipit has joined the channel [10:58] megalomix: guys i need to install connect-redis package...i see its dependency is "redis" => 0.0.1 [10:58] megalomix: what happen if i put redis on my package.json? [10:58] megalomix: it will download two versions? [10:59] DrMcKay: megalomix: npm handles it just fine [10:59] megalomix: the version i chose and the version for connect-redis dependency? [10:59] micrypt has joined the channel [10:59] DrMcKay: megalomix: 0.0.1 will go to node_modules/connect-redis/node_modules, your one will go to node_modules [10:59] megalomix: ok, two versions [10:59] matyr has joined the channel [11:01] N0va` has joined the channel [11:03] k1ttty has joined the channel [11:18] davidbanham has joined the channel [11:19] mklappstuhl has joined the channel [11:19] topaxi has joined the channel [11:20] jhbot has joined the channel [11:20] TheJH: !npm show npm [11:20] Country has joined the channel [11:20] TheJH: !npm info npm [11:20] jhbot: npm by Isaac Z. Schlueter, version 1.0.30, last updated : A package manager for node [11:21] Metal3d has joined the channel [11:22] jhbot has joined the channel [11:22] TheJH: !npm info npm [11:22] jhbot: npm by Isaac Z. Schlueter, version 1.0.30: A package manager for node [11:22] TheJH: !npm info express [11:22] jhbot: express by TJ Holowaychuk, version 2.4.6: Sinatra inspired web development framework [11:22] TheJH: !help [11:23] replore has joined the channel [11:23] replore_ has joined the channel [11:23] mAritz has joined the channel [11:25] guidocalvano has joined the channel [11:25] diamonddog has joined the channel [11:25] guidocalvano: if I have an object: var o = {} ; [11:25] DennisRasmussen has joined the channel [11:25] guidocalvano: and I have some function Bla() {} [11:26] guidocalvano: and I do o[ Bla ] = "hello" ; [11:26] guidocalvano: how large is the key of Bla then? [11:26] guidocalvano: is it the entire function, or just a reference to it? [11:27] mAritz: according to my quick test: entire function [11:27] mAritz: probably because .toString is used, not sure though [11:27] mAritz: (tested in chrome dev console) [11:27] guidocalvano: and if I do a reference to the prototype of Bla ? [11:28] mAritz: what exactly are you trying to do here? this seems sketchy :D [11:28] mraleph: guidocalvano: it's not function, it's the string representation of it [11:28] guidocalvano: I want to try a new design pattern I've been thinking of [11:29] guidocalvano: I want to embed objects in other objects [11:29] pradeepto has joined the channel [11:29] TheJH: guidocalvano, you can only use strings as keys [11:29] guidocalvano: mmmm [11:29] guidocalvano: that sucks [11:29] TheJH: guidocalvano, why? [11:29] TheJH: guidocalvano, you can use whatever you want as value, should be sufficient [11:31] guidocalvano: is it possible to get a pointer value out of an object? [11:31] TheJH: guidocalvano, huh? pointer value? everything but primitives gets passed around by reference [11:31] guidocalvano: I want the prototype of an object to identify an embedded object [11:31] guidocalvano: yes [11:31] jldbasa has joined the channel [11:32] guidocalvano: but unless I can get an int representation of that reference I can't use it as a key [11:33] guidocalvano: I want to somehow get a unique value for an object [11:33] guidocalvano: ideally the pointer [11:33] guidocalvano: (or reference or whatever you want to call it) [11:34] wbednarski has joined the channel [11:35] guidocalvano: the name won't suffice because there might be more prototypes with the same name, but in different namespaces [11:36] beeviz has joined the channel [11:36] TheJH: guidocalvano, could you just have a global counter and increment it for each object you want to have a unique id for? [11:37] TheJH: guidocalvano, oh, wait, I think that wit weakmaps, you actually can use objects as keys [11:37] TheJH: *with [11:37] guidocalvano: mmmm [11:39] robhawkes has joined the channel [11:40] aoberoi has joined the channel [11:41] Rile has joined the channel [11:42] azeroth_ has joined the channel [11:43] DrMcKay: MONGOOSE Y U NO DEPOPULATE? [11:48] guidocalvano: I think I can generate the key [11:48] guidocalvano: I'll just add a function key( object ) [11:49] guidocalvano: if( object.____key ) return object._____key ; else { object.____key = genNextUnique() ; return object.____key ; } [11:50] navaru has joined the channel [11:51] Rile has left the channel [11:53] rootslab has joined the channel [11:54] blup has joined the channel [11:56] jetienne has joined the channel [11:57] jomoho has joined the channel [11:59] metellus has joined the channel [12:00] anoop has joined the channel [12:03] mklappstuhl has joined the channel [12:05] MrNko has joined the channel [12:05] japj has joined the channel [12:05] nephics has joined the channel [12:10] kuebk^ has joined the channel [12:11] zemanel has joined the channel [12:12] DrMcKay: lol, I like it how `git fsck` can [12:12] DrMcKay: *can't fit into one screen [12:15] Acolyte has joined the channel [12:15] Acolyte: is there such a concept as website "bootloader"? [12:16] robi42 has joined the channel [12:17] DrMcKay: Acolyte: huh? [12:17] TheJH: Acolyte, huh? What would a "website bootloader" do? [12:17] Acolyte: I suppose its the way I see it, but here it is [12:18] Acolyte: You treat the server as raw data "server", i.e. mongodb, rest or odata service and also as static file server [12:19] Acolyte: composition of pages happen through client side templates that are pulled statically from the server [12:19] Acolyte: which are populated by data [12:19] cooter has joined the channel [12:19] mAritz: Acolyte: sure, a lot of pages do that. especially single page apps. [12:20] Acolyte: so, "bootloader", in a sense, would be a very small piece of code that gives certain info so that everything else can be loaded after if necessary [12:21] Acolyte: mAritz: can you give me an example? [12:21] mAritz: backbone.js is for example used a lot for doing mvc in the browser and there are numerous templating solutions (jquery itself even has one) [12:23] DrMcKay: knockout.js! [12:25] DrMcKay: Acolyte: ^ [12:25] Acolyte: can't tell straightaway if backbone.js is server-side or not [12:25] rfay has joined the channel [12:27] huskyr has joined the channel [12:28] mAritz: it's not [12:28] azeroth_ has joined the channel [12:30] mrsrikanth has joined the channel [12:35] kriszyp has joined the channel [12:35] robotmay has joined the channel [12:36] boogyman has joined the channel [12:39] yogesh has joined the channel [12:40] Brandon_R has joined the channel [12:40] Brandon_R: u9\ [12:40] Brandon_R: hi [12:40] yogesh: anyone pls tell me how to uninstall node [12:40] yogesh: i m using ubuntu 11.04 [12:41] Acolyte: thanks DrMcKay and mAritz [12:42] boogyman: rm -rf [12:42] boogyman: ^ dont actually do that.. lol [12:43] yogesh: ?? [12:43] cchristiansen: did you install it manually or through synaptic/apt-get? [12:44] Brandon_R: how did you install it? [12:44] Brandon_R: and why would you want to uninstall it lol [12:44] swhit has joined the channel [12:44] Brandon_R: node is awesome [12:44] boogyman: and IE is relevant [12:45] alphahydrae: Hi all. Does anyone here use connect and dispatch (https://github.com/caolan/dispatch)? I'm trying to configure a method for a route as documented in the readme ('GET /item'), but as soon as I set the method, the route is unreachable. It says "Cannot GET /item". [12:46] cchristiansen: @boogyman http://stackoverflow.com/questions/5650169/uninstall-node-js-using-linux-command-line [12:46] boogyman: yogesh: ^ [12:47] Brandon_R: any of u guys know erlang? [12:47] yogesh: i have installed v0.5.8-pre [12:47] yogesh: with this some npm modules are not compatitable [12:48] yogesh: so i want to remove this and install a stable version [12:48] mehlah has joined the channel [12:49] Brandon_R: k [12:49] Brandon_R: how did you install it? [12:49] cchristiansen has joined the channel [12:49] Brandon_R: with a package manager? [12:50] yogesh: nope [12:50] yogesh: using git [12:51] Brandon_R: k [12:51] whitman has joined the channel [12:55] petrjanda has joined the channel [12:56] T0aD: rm -v `which node` [12:57] guidocalvano has joined the channel [12:57] whitman: Is it possible to force a reload with require()? [12:58] whitman: Actually, nevermind, looks like I can just delete the entry from require.cache. [12:58] synax has joined the channel [12:58] testing_ has joined the channel [12:59] jbrokc has joined the channel [12:59] SubStack: clever [13:00] DrMcKay: um, really? [13:00] DrMcKay: on v0.5.7 require.cache is always empty [13:01] DrMcKay: at least with built-in modules [13:01] madsleejensen has joined the channel [13:02] whitman: I'm using 0.4.12 and docs suggest that it can be done: http://nodejs.org/docs/v0.4.12/api/globals.html#require.cache [13:02] whitman: I'm testing it now. [13:03] jetienne_ has joined the channel [13:03] thinkt4nk has joined the channel [13:06] mikeal has joined the channel [13:10] blup has joined the channel [13:15] yogesh: best node framework for development [13:15] yogesh: express [13:15] yogesh: or grasshopper [13:16] shripad has joined the channel [13:16] murilobr has joined the channel [13:18] DrMcKay: yogesh: define best [13:18] shripad: hello all... just a clarification. it says here http://code.google.com/p/v8/issues/detail?id=847 that the v8 1GB mem limit can be increased to any value... is it possible now for node to use more than the 1.7GB mem limit (64bit)? [13:19] whitman: Yep, deleting entries from require.cache works reload files with require(). [13:19] whitman: s/reload/to reload [13:19] yogesh: i mean to a framework easy to develop [13:21] DrMcKay: yogesh: I would go for express [13:21] yogesh: ok tnks [13:21] DrMcKay: shripad: this is a WIP, but they've already done some changes to increase this limit [13:21] yogesh: how many concurrent user can a single node server instance can handle [13:22] japj: shripad: the memory limit is currently still in place in v8, but there is an experimental new garbage collector being developed for v8 that should solve that [13:22] DrMcKay: yogesh: OVER 9000! [13:23] DrMcKay: yogesh: (but seriously, on legit hardware it should be able to handle > 10k req) [13:23] scottschecter has joined the channel [13:24] yogesh: ok so clustering is possible to handle more than 9k users ? [13:25] shripad: japj, DrMcKay cool. :) [13:26] torsd has joined the channel [13:26] mc_greeny has joined the channel [13:31] gdusbabek has joined the channel [13:31] sam350 has joined the channel [13:35] khrome_ has joined the channel [13:39] joshkehn has joined the channel [13:39] level09 has joined the channel [13:41] level09: what is a good way to execute a shell command from node ? [13:41] malkomalko has joined the channel [13:41] level09: I'm basically trying to restart the node server in attempt to resolve some memory issues [13:43] khrome__ has joined the channel [13:45] MUILTFN has joined the channel [13:49] normanrichards has joined the channel [13:49] DrMcKay: !doc link child_processes [13:49] dmkbot: http://nodejs.org/docs/latest/api/child_processes.html [13:49] DrMcKay: level09: ^ [13:50] level09: DrMcKay: thanks, however, in my case, I will be executing this process every 15 min, should I then use exec instead of spawn ? [13:50] zemanel has joined the channel [13:51] DrMcKay: level09: why? [13:51] DrMcKay: (also, your design might be fucked up if your having memory problems with node) [13:51] level09: DrMcKay: when I run forever start server.js, I get into memory leaks, and my server crashes after 15 - 30 min [13:51] petrjanda has joined the channel [13:51] ph^ has joined the channel [13:52] level09: DrMcKay: socket.io is still young, and requires a lot of bug fixes [13:52] level09: I want to do some workarounds until it gets a more stable release [13:52] DrMcKay: level09: oh, don't kill it with command line, then [13:52] DrMcKay: level09: use forever API [13:53] level09: DrMcKay: is there any way to restart forever every 30min for example [13:53] MooGoo: .lexit [13:53] level09: I thought the only way is to execute the shell command (forever restart server.js) [13:54] DrMcKay: level09: https://github.com/indexzero/forever [13:54] DrMcKay: "Using forever module from node.js" part [13:55] DrMcKay: also, what MooGoo said, why don't you set up a timeout which exits a process after some time? [13:55] MooGoo: what did I say now [13:56] DrMcKay: MooGoo: process.exit, didn't you mean that? [13:56] Vennril has joined the channel [13:56] igl1 has joined the channel [13:56] MooGoo: I didnt realize I said anything till you said I did [13:56] MooGoo: .lexit [13:56] MooGoo: I dont even know [13:56] DrMcKay: lol [13:58] MooGoo: tiling window manager + focus follows mouse [13:58] scottschecter has joined the channel [13:59] MooGoo: can end up with what you are typing being spread out over 2 or 3 windows [13:59] DrMcKay: :D [14:01] nodokodo has joined the channel [14:01] megalomix has joined the channel [14:01] megalomix: hello [14:01] megalomix: Error: EACCES, Permission denied [14:01] nickf has joined the channel [14:01] megalomix: listing at 80 port [14:02] dgathright has joined the channel [14:02] megalomix: can i not run with a normal user? [14:02] MooGoo: you can... [14:02] japj: port <1024 requires root access on a unix machine [14:03] MooGoo: hm [14:03] MooGoo: is that so [14:03] TheJH: megalomix, either use another port or run as root or configure a redirect rule with iptables [14:03] nodokodo: megalomix: ports less than 1024 have to be a priviliged user [14:03] japj: http://www.linuxquestions.org/linux/articles/Technical/Why_can_only_root_listen_to_ports_below_1024 [14:03] megalomix: k [14:04] MooGoo: root access or a certain usergroup? [14:04] TheJH: MooGoo, normally root [14:04] gaving has joined the channel [14:05] nodokodo: megalomix: depending what youre doing try https://gist.github.com/1174831 for iptables [14:06] megalomix: ok thanks [14:06] madsleejensen has joined the channel [14:06] DrMcKay: how do I throw HTTP errors in express? [14:07] DrMcKay: ah, OK, I see [14:07] jtsnow has joined the channel [14:08] navaru: in a production environment is it wise to use node.js (0.4.11) as a http server or to proxy through nginx? [14:08] joshkehn has joined the channel [14:09] joshkehn has left the channel [14:11] amigojapan has joined the channel [14:12] normanrichards has joined the channel [14:13] Sorella has joined the channel [14:14] megalomix: guys, last thing.. can i create a global object without reimporting the module again and again ? example if i have app.js and i do var a = require('mymodule') how can i use this 'a' abject everywhere? [14:14] max_dev has joined the channel [14:15] sub_pop has joined the channel [14:16] r04r: There is a GLOBAL variable you can use I think, but this shouldn't be necessary in most cases [14:16] losing has joined the channel [14:17] schwab has joined the channel [14:18] mandric has joined the channel [14:18] adambeynon has joined the channel [14:20] k1ttty has joined the channel [14:21] nodokodo: navaru: current stable nginx doesn't support web sockets if that's your thing so ymmv [14:21] CarterL has joined the channel [14:21] JakeyChan has joined the channel [14:21] nodokodo: they're in the dev branch though if you like living on the edge :P [14:22] mike5w3c has joined the channel [14:23] zastaph has joined the channel [14:26] megalomix: r04r, i'm using 'nconf' [14:26] megalomix: i have to import this module in each .js file i have [14:26] megalomix: i would like to have one global variable of this module [14:26] megalomix: *package [14:26] level09 has joined the channel [14:27] level09 has left the channel [14:29] kriszyp has joined the channel [14:32] junkee[] has joined the channel [14:38] megalomix: https://gist.github.com/1240656 <- che i print directly with EJS ? [14:38] c4milo1 has joined the channel [14:39] fread2281: how would i run node.js on ppc? [14:39] dgathright has joined the channel [14:40] Fabryz: uhm Chrome 14 seems to fallback to XHR polling instead of using websockets first [14:40] piscisaureus has joined the channel [14:40] losing has joined the channel [14:41] indutny: Fabryz: protocol changed [14:41] indutny: AFAIK [14:42] DrMcKay: yup, one of the latest versions introduced some new protocol implementation, I thinl [14:42] Fabryz: was just reading https://github.com/LearnBoost/socket.io-client/issues/282 [14:42] DrMcKay: *think [14:47] sim642 has joined the channel [14:48] brianseeders has joined the channel [14:50] shanez_ has joined the channel [14:50] enosis has joined the channel [14:50] losing has joined the channel [14:51] madsleejensen has joined the channel [14:55] jonrohan has joined the channel [14:56] schwab has joined the channel [14:57] maushu has joined the channel [15:00] jarek has joined the channel [15:00] jarek has joined the channel [15:00] jarek: Hi [15:00] matyr has joined the channel [15:01] jarek: what's the easiest way to remove dir recursively? [15:01] jarek: fs.rmdirSync() takes only one argument (the path) and it breaks if the dir contains any files [15:01] cchristiansen has joined the channel [15:02] DrMcKay: jarek: isaacs' rimraf [15:02] jarek: do I really need to use something like this? https://gist.github.com/807712 [15:02] jarek: there must be an easier way [15:02] alibapcyk has joined the channel [15:02] DrMcKay: jarek: https://github.com/isaacs/rimraf [15:02] jarek: DrMcKay: thank you [15:03] fread2281_ has joined the channel [15:04] DrMcKay: jarek: :) [15:04] alibapcyk: Hey - Have a quick question if anyone is willing to help, not quite sure how to approach this [15:04] alibapcyk: I have a collection of 8 urls that I want to visit, scrape the text from and combine into a single string [15:05] alibapcyk: so I need some way of using http.get on my server, to visit each in turn, with a lowish timeout, so if the site doesn't respond I just move on [15:05] alibapcyk: and combine all at the end, [15:05] alibapcyk: what's the best way of managing that sort of thing? [15:07] alibapcyk: I guess just http.get in a loop and then call out to some management function on each onend? is there a cleaner way? [15:08] Lingerance: async's .parallel is what I use for a similar situation [15:10] chrischr1s has joined the channel [15:10] xsyn has joined the channel [15:11] alibapcyk: Lingerance - thanks! i'll look into that [15:11] xsyn: Has anybody here got experience with building select boxes in jade? [15:12] yogesh has joined the channel [15:13] xsyn: I'm trying to show that a particular option has been chosen in an edit route, and not quite sure how to tell jade how to pick that particular select box option [15:14] d0k has joined the channel [15:17] Charuru has joined the channel [15:18] devongovett has joined the channel [15:20] jvdev has joined the channel [15:21] herbySk has joined the channel [15:23] ohtogo has joined the channel [15:24] stagas: xsyn: option(..., selected=(isSelected[i] ? 'selected' : '')) [15:25] stagas: xsyn: you need to build your own logic there [15:25] slifty has joined the channel [15:25] jakehow has joined the channel [15:27] wbednarski has joined the channel [15:27] Styles has left the channel [15:30] fread2281: how would i run node.js on ppc? [15:30] xsyn: stagas: perfect [15:30] xsyn: thank you [15:30] ron_frown has joined the channel [15:30] smus has joined the channel [15:31] japj: fread2281: V8 does not currently support PowerPC [15:32] fread2281_ has joined the channel [15:34] beawesomeinstead has joined the channel [15:35] Spion has joined the channel [15:36] DrMcKay: lolwut? [15:36] DrMcKay: when running nodemon mount.ntfs uses like 30% CPU [15:36] smus has joined the channel [15:38] N0va` has joined the channel [15:38] jtsnow has joined the channel [15:39] willwhite has joined the channel [15:39] huskyr has joined the channel [15:39] MrTopf has joined the channel [15:40] mehlah has joined the channel [15:40] ruben has joined the channel [15:40] wmage has joined the channel [15:40] ruben: Hey there! [15:40] boogyman has joined the channel [15:41] MUILTFN has joined the channel [15:41] ruben: I´ve seen alot talking about node.js, but I could not find a writeup on how to run it on a production server - so I´ve got this v-Server for me, how should I connect my www.domain.com to the node JS Server ... am I missing something? [15:42] JakeyChan has joined the channel [15:43] Morkel has joined the channel [15:43] jarek: is there a module that would allow me to combine multiple CSS and JS files and eventually minify them? [15:43] marcello3d has joined the channel [15:44] Sorella has joined the channel [15:44] cjroebuck has joined the channel [15:46] nickf: jarek: you could look at uglifyjs https://github.com/mishoo/UglifyJS [15:46] nickf: i've not used it myself, but i have heard about it around the place [15:47] nickf: doesn't look as though it does css [15:47] kmwallio has joined the channel [15:48] jarek: I mean something like a build system [15:49] jarek: where you specify which files should be combined, minizmized and moved when deploying the app on production system [15:49] jarek: s/minizmized/minimized [15:49] DrMcKay: jarek: yui? [15:50] DrMcKay: jarek: still, you have to write some build script yourself [15:50] nickf: i'm pretty new to node, and i'd bet there's something already written which does exactly what you want, but you could use Jake to write a build script [15:50] nickf: http://howtonode.org/intro-to-jake [15:51] cying has joined the channel [15:51] Lingerance: jarek: ready.js [15:52] jarek: thanks, I'll investigate those projects [15:53] nickf: could anyone give me a little jade/express help? [15:53] Fabryz: tip needed: any other better convention other than using var that = this? https://gist.github.com/c7bb5bdbef61cc32d6b2 line 25 [15:53] Lingerance: Just ask the question guy. [15:54] nickf: if i have some raw markdown-formatted text in my app, how could i insert that into a tmeplate [15:54] jetienne_ has joined the channel [15:54] stonecobra has joined the channel [15:54] Fabryz: using filters? [15:54] devrim has joined the channel [15:54] nickf: yep - but how do i actually insert the variable [15:55] nickf: i've tried something like this (but with line breaks): div :markdown #{myMD} [15:55] nickf: but it outputs

{myMD}

[15:55] Lingerance: Fabryz: I don't see where you're using var in that gist. [15:55] Fabryz: Lingerance not in the gist, was just thinking about it [15:56] brokenjames has joined the channel [15:56] Fabryz: I guess the that = this scope trick is "ok"? [15:56] Fabryz: in the view of code conventions [15:58] Lingerance: You can .bind(), .call() and .apply() to force this to be that value you want. But normally it's just easier to do var self = this; [15:58] Fabryz: ok [15:59] ron_frown has joined the channel [15:59] nickf: so, any ideas on how to pass in some markdown to be parsed by jade? [16:00] Lingerance: You'd probably have to make jade parse the markdown before putting it in the other template [16:00] patcito has joined the channel [16:00] simenbrekken: I've got an iPhone app API backend running and I'd like to collect and visualize some statistics, any recommendations? [16:01] nickf: @Lingerance, so perhaps it'd just be easier to do it in the app and give jade the HTML instead? [16:02] Lingerance: Not sure [16:02] fread2281: how would i get node.js working on a powerpc? [16:02] Lingerance: Port v8 to it. [16:02] nickf: lol [16:02] fread2281: someppl have already :D [16:03] fread2281: i just don't know where to get the prot [16:03] fread2281: *port [16:03] Lingerance: Good, then compile node.js and ask more specific questions when you have a specific issue. [16:04] nickf has left the channel [16:04] devrim1 has joined the channel [16:05] jtsnow has joined the channel [16:05] markwubben has joined the channel [16:06] losing has joined the channel [16:06] MooGoo: who has [16:06] MooGoo: v8 directly generates machine code [16:07] MooGoo: it's not that portable [16:07] jtsnow has joined the channel [16:07] marcello3d: any suggestions on how to deploy node on debian as an init.d script? [16:07] slifty: everyone should watch this: http://www.youtube.com/watch?v=LXO-jKksQkM [16:07] MooGoo: marcello3d: why? [16:08] marcello3d: moogoo: or whatever. so it stays up [16:08] DrMcKay: marcello3d: use forever [16:09] marcello3d: but that won't start it if the server restarts, right? [16:09] MooGoo: yea...scripts running from init.d are not gaurenteed to stay running [16:09] MooGoo: you want node to start before any user logins? [16:09] marcello3d: this would be for a webserver, so yes [16:10] stagas: slifty: I've been watching these all day still can't believe my ears :P [16:10] MooGoo: well I guess that depends on your distro then [16:10] slifty: haha [16:10] MooGoo: !npm daemon [16:10] Lingerance: ACTION uses monit to keep his daemons up [16:10] MooGoo: !npm search daemon [16:11] jhbot: packages (short format): restarter, daemon-tools, daemon, irccd, init, ircd, smtp, nx-daemon, icecapdjs, cli, node-syslog, custom-debug [16:11] MooGoo: kjhasjkh [16:11] MooGoo: a bunch of those look relevant [16:11] MooGoo: hm [16:11] MooGoo: .npm search daemon [16:11] catb0t: cli, daemon, daemon-tools, icecapdjs, init, ircd, lpd, node-syslog, nx-daemon, restarter, shelld, smtp [16:12] MooGoo: hai catb0t [16:12] nforgerit has joined the channel [16:14] stagas has joined the channel [16:15] tjholowaychuk has joined the channel [16:15] TheJH: !npm show daemon [16:15] TheJH: !npm view daemon [16:15] TheJH: damn, how did I call it? [16:15] MooGoo: ?? [16:15] DrMcKay: !npm info daemon [16:15] jhbot: daemon by Arthur, version 0.3.0: Add-on for creating *nix daemons [16:15] TheJH: DrMcKay, thanks :D [16:16] MooGoo: dont you hate it when you forget how your own bot works [16:16] guidocalvano has joined the channel [16:16] TheJH: MooGoo, I know how it works, just not how the command is named :D [16:16] wmage has joined the channel [16:17] TheJH: !admin eval commands.npm.show = commands.npm.view = commands.npm.detail = commands.npm.info; 1 [16:17] jhbot: 1 [16:17] TheJH: !npm view daemon [16:17] jhbot: daemon by Arthur, version 0.3.0: Add-on for creating *nix daemons [16:17] TheJH: :) [16:17] DrMcKay: haha :D [16:17] TheJH: MooGoo, I guess I'll remember at least one of them :D [16:17] TheJH: MooGoo, if you can't hit the target, make it bigger :D [16:18] Lingerance: I tried that in a game of D&D once [16:18] Lingerance: It went horribly wrong really really fast. [16:18] DrMcKay: lol [16:18] TheJH: :D [16:18] TheJH: Lingerance, in what way did it go wrong? [16:20] Lingerance: Size increase means it gets damage bonuses (this was 3.5) more reach and it had enough attacks/round to hit each of us. [16:20] slifty has joined the channel [16:20] Lingerance: All for a +1 for us to hit it, and a -1 for it to hit us. [16:21] jhbot: I'm an evil deamon and I want to kill you all! Muhaha! [16:21] ryanrolds: ... [16:21] marcello3d: Lingerance: how do you like monit? [16:23] Lingerance: It's nice, you can set it up so it won't try restarting the daemon infinitely if there's something wrong with the start up at which point it can email an admin to check it out. [16:23] GooMoo has joined the channel [16:24] marcello3d: that sounds pretty useful [16:24] marcello3d: (I'm scanning the website) [16:25] marcello3d: Lingerance: how do you specify the node daemon itself? in an init.d script or elsewhere? [16:25] mandric has joined the channel [16:25] Lingerance: You have to make a start and stop script [16:25] Lingerance: Then make a special file for monit to see the daemon [16:26] Lingerance: After that though you're good [16:27] futini has joined the channel [16:28] MooGoo has joined the channel [16:31] ddollar has joined the channel [16:32] joshthecoder has joined the channel [16:36] Brandon_R has joined the channel [16:36] Brandon_R: guys [16:37] Brandon_R: i have a question [16:37] Brandon_R: how to i get the length of a stream? [16:39] Lingerance: You don't [16:40] pquerna: you would have to read all the data events until an end. [16:40] shanebo has joined the channel [16:40] Brandon_R: got it [16:41] Brandon_R: i will just use the end event instead :) [16:41] paulwe has joined the channel [16:42] marcello3d: a stream could be endless :) [16:42] marcello3d: e.g. /dev/random [16:43] jchris has joined the channel [16:43] Lingerance: That'll start blocking though [16:43] unomi has joined the channel [16:43] Lingerance: /dev/zero is a better example [16:44] Lingerance: (It's all 0x00) [16:44] normanrichards has joined the channel [16:45] avih has joined the channel [16:45] slifty has joined the channel [16:45] Brandon_R: cool [16:45] Brandon_R: i'm just trying out this new node canvas [16:46] malkomalko has joined the channel [16:48] avih has joined the channel [16:51] HardPhuck has joined the channel [16:52] avih has joined the channel [16:57] alibapcyk: Lingerance - Do you have any sample code using async.parallel - trying to create an array of functions with this callback is making my head explode [16:58] jonrohan has joined the channel [16:58] Lingerance: There's one in the readme [16:58] avih has joined the channel [16:58] alibapcyk: Yeah it's a bit contrived though, nm I'll figure it [16:58] guidocalvano has joined the channel [16:59] NetRoY has joined the channel [17:00] TomY has joined the channel [17:01] Lars_unique has joined the channel [17:01] aoberoi has joined the channel [17:01] infynyxx has joined the channel [17:03] bshumate has joined the channel [17:03] bshumate has joined the channel [17:05] Morkel has joined the channel [17:05] CarterL has joined the channel [17:07] devrim has joined the channel [17:07] brokenjames has joined the channel [17:07] nyrb has joined the channel [17:09] alibapcyk: Lingerance: If you'd please, could you take a quick look at this code: http://pastebin.com/NcV3ygrM [17:09] alibapcyk: and tell me why my final callback never gets called? Please. [17:09] alibapcyk: I never see 'All Done' [17:11] virajssinha has joined the channel [17:11] catb0t has joined the channel [17:11] stagas: alibapcyk: don't do new Array(8); just [] since you're going to push functions in it [17:11] confoocious has joined the channel [17:11] confoocious has joined the channel [17:12] alibapcyk: stagas - Wow, that fixed it. Thanks [17:12] ryanrolds: alibapcyk: Yes, if you don't have 8 itmes in your urls you will have items that never fire a callback. [17:12] alibapcyk: Well there are 8 items, [17:12] alibapcyk: but that still fixed it [17:13] slifty has joined the channel [17:13] avih has joined the channel [17:13] stagas: v8: a = new Array(8); a.push('foo'); a.length [17:13] v8bot_: stagas: 9 [17:14] alibapcyk: Aha. Thank you. [17:14] alibapcyk: Sorry, I'm a js noob ;) [17:14] ryanrolds: Oh, doh. [17:14] ryanrolds: I didn't realize that either. [17:14] alibapcyk: second quick question, I guess this is Closure related [17:14] alibapcyk: where I put 'Examining url: ' [17:14] ryanrolds: Make senses now, feel kinda dumb. [17:14] alibapcyk: that outputs the last url in the loop for all of them [17:15] alibapcyk: :( I feel dumb too [17:15] stagas: v8: new Array(8).join('node.js') [17:15] v8bot_: stagas: "node.jsnode.jsnode.jsnode.jsnode.jsnode.jsnode.js" [17:15] devaholic: https://github.com/tblobaum/nodeQuery [17:15] stagas: :P [17:16] stagas: that's the only use I know of new Array(length) [17:17] devaholic: nodeQuery lets you run jquery commands on the server and it updates the browser in realtime [17:17] avih has joined the channel [17:17] AvianFlu has joined the channel [17:18] kmiyashiro has joined the channel [17:20] codely has joined the channel [17:20] stagas: devaholic: this is cool. can you also pass values from the client to the server? [17:20] stagas: devaholic: or vice versa [17:20] codely: hey everyone, been using node a while now, but curious - if i'm running forever, cool - but is there a tool written in node yet that will let me know when i get an uncaughtException ? [17:20] devaholic: yes [17:20] codely: ie, email me, (page me hah!) [17:21] mjr_ has joined the channel [17:21] devaholic: stagas: no callbacks yet, though i am working on it [17:21] cconstantine_ has joined the channel [17:21] tjholowaychuk: codely cluster [17:21] tjholowaychuk: cluster-mail [17:21] jtsnow has joined the channel [17:21] avih has joined the channel [17:21] codely: nice [17:22] codely: ty tjholowaychuk [17:22] smus has joined the channel [17:23] devaholic: stagas: you could easily render templates on the server and send them off, though [17:23] stagas: devaholic: then how are values passed? can I do: var foo = $('input').attr('value'); and use foo in the server? [17:23] jonrohan has joined the channel [17:24] devaholic: right now nodeQuery just allows for those commands in the readme [17:24] devaholic: you cant get an attribute, yet [17:24] devaholic: but you can set them and remove them [17:24] abjorn has joined the channel [17:24] Badababuba has joined the channel [17:24] Badababuba has joined the channel [17:25] devaholic: stagas: and, since it uses dnode, you can always pass a value back that way [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] Badababuba has joined the channel [17:25] DrMcKay: what the...? [17:25] Badababuba has joined the channel [17:26] Badababuba has joined the channel [17:26] devaholic: its a bot [17:26] devaholic: look at the ip [17:26] Badababuba has joined the channel [17:26] Badababuba has joined the channel [17:26] Badababuba has joined the channel [17:26] devaholic: >.< [17:26] Badababuba has joined the channel [17:26] DrMcKay: yeah, I see it [17:26] Badababuba has joined the channel [17:26] DrMcKay: but seriously... [17:26] Badababuba has joined the channel [17:26] mynyml has joined the channel [17:26] Badababuba has joined the channel [17:26] Badababuba has joined the channel [17:26] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:27] DrMcKay: /ignore ftw [17:27] Badababuba has joined the channel [17:27] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] c4milo1 has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] Badababuba has joined the channel [17:28] stonebranch has joined the channel [17:28] devaholic: poke pquerna piscisaureus ryah [17:28] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] piscisaureus: devaholic: what? [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] devaholic: well... [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:29] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] devaholic: can you kick badababuba [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:30] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] mandric has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:31] Badababuba has joined the channel [17:32] Badababuba has joined the channel [17:32] Badababuba has joined the channel [17:32] Badababuba has joined the channel [17:32] Badababuba has joined the channel [17:32] Badababuba has joined the channel [17:32] EvRide has joined the channel [17:32] murilobr has joined the channel [17:33] devongovett has joined the channel [17:36] borior has joined the channel [17:37] djcoin has joined the channel [17:37] borior: hi all, I'm new to this lark. If i want to read binary data from a URL, I end up receiving it in chunks -- a stream of Buffers. If I want to assemble these into one big buffer, what's the best way to do so? [17:37] Swizec has joined the channel [17:38] robotmay has joined the channel [17:38] spathi^ has joined the channel [17:38] jbpros has joined the channel [17:40] Swizec has joined the channel [17:40] puphin has joined the channel [17:41] AvianFlu: borior, data.toString() [17:41] Wizek has joined the channel [17:41] AvianFlu: have an empty string 'total' and have each time be `total += data.toString()` [17:42] rbriggin has joined the channel [17:42] borior: AvianFlu: yeah, so that would work if it weren't binary data... [17:42] Morkel has joined the channel [17:42] borior: I'm guessing i just accumulate the buffers in a list [17:42] AvianFlu: oh, I misread you [17:42] AvianFlu: there's buffer concat stuff [17:42] borior: and then do bufList.reduce(function (x) { return x.length }) [17:42] AvianFlu: the Buffer prototype has some array-esque stuff that would probably help you [17:43] borior: AvianFlu: I can concat buffers? [17:43] borior: that doesn't look to be documented... [17:43] AvianFlu: give me a second [17:43] borior: hmm, no, I can't concat buffers [17:43] borior: it's alright, I think I've worked it out anyay [17:43] Swizec has joined the channel [17:44] AvianFlu: you get .copy and .slice [17:44] AvianFlu: my bad [17:44] borior: *anyway ... just create a new buffer with the length of all of them and buffer.copy =) [17:44] nerdy_ has joined the channel [17:45] stagas: borior: that, or you can use https://github.com/bnoordhuis/node-buffertools and .concat them [17:45] josdehar has joined the channel [17:46] josdehart has joined the channel [17:46] josdehart has joined the channel [17:47] p1d has joined the channel [17:48] NetRoY has joined the channel [17:49] skiz has joined the channel [17:50] farhadi has joined the channel [17:51] alibapcyk: I'd really massively appreciate it if someone could help me out with this: [17:51] alibapcyk: http://pastebin.com/ajrATkvE [17:51] alibapcyk: Closures are getting the better of me [17:51] Daegalus has joined the channel [17:54] devaholic: what is your plan for return function [17:54] devaholic: ... [17:54] harthur has joined the channel [17:55] alibapcyk: How do you mean? The reason that's there is to break the url being bound to the last one in the loop, so I can get at the correct url [17:55] alibapcyk: but if I just return that function [17:55] alibapcyk: it's not actually getting executed when I call async.parallel [17:55] alibapcyk: I haven't added it yet, but I will soon do http.get requests and ideally have them execute in parallel [17:56] devaholic: result = examineUrl(currentUrl)(); ?? [17:56] alibapcyk: Doesn't work, all the urls end up being the same [17:57] guidocalvano has joined the channel [17:57] stagas: alibapcyk: in 21 you need: var result = ... [17:57] Swizec has joined the channel [17:57] stagas: alibapcyk: to make 'result' be local in that closure, otherwise you're just overwriting the same variable [17:58] stagas: alibapcyk: goes to the top scope by default [17:58] alibapcyk: stagas - Thanks, but I still don't think that solves the problem [17:59] alibapcyk: Just checked, it doesn't [17:59] alibapcyk: Although that was a bug ;) [18:00] stagas: alibapcyk: ok also in examineUrl you return a function, not the url [18:01] AAA_awright: Yeah always use "var" even inside for loops [18:01] Swizec has joined the channel [18:01] alibapcyk: stagas, yeah, because if I just return the url, it ends up just binding to the last one from the loop [18:01] AAA_awright: Where's the "async" object come from? [18:02] alibapcyk: AAA_awright: var async = require('async') - it's a node module [18:02] alibapcyk: https://github.com/caolan/async#parallel [18:04] AAA_awright: I would think currentUrl is a new reference each time since it's a local scope [18:04] AAA_awright: But that's probably not good enough [18:04] stagas: alibapcyk: ok, what you're doing is weird. the anon function you create in 20, doesn't keep the currentUrl in closure since it executes in another context below [18:05] alibapcyk: stagas: Okay, I don't know how to fix :( [18:05] AAA_awright: alibapcyk: http://pastebin.com/rSqGCfgk [18:06] AAA_awright: That *should* work [18:06] alibapcyk: AAA_awright - Sweet thanks, I'll try it out [18:06] AAA_awright: If there's a better way to do it I'm unaware of how [18:07] AAA_awright: It's very non-intuitive, you would think a locally scoped var in Javascript would do the same thing [18:07] metellus has joined the channel [18:08] Brandon_R has joined the channel [18:09] AAA_awright: alibapcyk: Also, try using "let" instead of "var", maybe that's what that is for [18:09] alibapcyk: AAA_awright - Your example worked! Thank you! But jesus I'm struggling to follow it ;P [18:09] alibapcyk: You're some sort of magic man [18:10] AAA_awright: It's because it's using the variable inside a function, and the reference in the old function doesn't change when a new function is called [18:10] AAA_awright: s/variable/argument/ [18:10] AAA_awright: If that makes any sense [18:11] alibapcyk: AAA_awright - Yeah I follow why it was failing before, your solution blows my mind though [18:11] AAA_awright: You would expect the same thing to happen when you use var i=...; inside a loop, because it's declaring a new "i" each time that shouldn't override the old variable "i" but I guess not (likewise, I would expect it to happen if I used var i=...; outside the for loop, but redefined the value inside it) [18:11] Brandon_R has joined the channel [18:11] Brandon_R: hey guys [18:12] rootslab has joined the channel [18:12] cognominal has joined the channel [18:13] alibapcyk: AAA_awright That for loop syntax is wacky ;) [18:14] Morkel: Is it possible and useful to build a web scrapper with node.js? I can also use python, java or rails [18:14] Morkel: ruby [18:14] AAA_awright: Morkel: jsdom, sure [18:15] Morkel: AAA_awright: I found Zombie.js and phantomjs too. Do you know this libs? [18:15] stagas: alibapcyk: here's a simple solution http://pastebin.com/kRTc0hNn [18:15] stagas: alibapcyk: you shouldn't use async modules if you don't understand javascript well [18:15] AAA_awright: I don't think that's the same thing, isn't phantomjs literally a web browser so you can take screenshots? [18:16] stagas: leads to many problems [18:16] cognominal_ has joined the channel [18:16] AAA_awright: It's a wrapper around webkit or something [18:16] Morkel: AAA_awright: "PhantomJS is a headless WebKit with JavaScript API" [18:16] alibapcyk: stagas - Thank you. I find I learn best when I just drop into the hard stuff [18:16] AAA_awright: Yeah [18:17] Morkel: I need this scraper to extract data from a site und save this in a data base [18:17] Morkel: database [18:17] jetienne_ has joined the channel [18:17] isaacs has joined the channel [18:18] jonrohan has joined the channel [18:18] Morkel: AAA_awright: http://www.coderholic.com/scraping-the-web-with-node-io/ looks nice too [18:18] isaacs: TheJH: starring should work fine now [18:19] TheJH: isaacs, yay! :) [18:19] isaacs: TheJH: it was also updating the time.modified on the doc, which is why it wasn't working. [18:19] isaacs: i'm not sure if we want to consider starring a "modification", but i'm inclined to think it is [18:19] fread2281 has left the channel [18:21] devaholic: node.io kept maxing out my cpu =/ [18:21] devaholic: even for a one page crawl [18:22] stagas: alibapcyk: yeah but the async modules are an abstraction for things that are trivial to do without them most of the time [18:24] heavysixer has joined the channel [18:24] stagas: alibapcyk: I only use them if I have huge amounts of stuff to process [18:24] devaholic: async auto is pretty nice [18:24] rektide: i'm curious who/if anyone is using the node-xmpp server stuff [18:25] rektide: or knwos of projects that are [18:26] Margle has joined the channel [18:26] stisti has joined the channel [18:29] zeade has joined the channel [18:29] sivy has joined the channel [18:30] jtsnow has joined the channel [18:32] jtsnow has joined the channel [18:35] N0va` has joined the channel [18:37] cognominal_ has joined the channel [18:38] TheFuzzball has joined the channel [18:39] DrMcKay: isaacs: I just got EBADF error with npm, but I can't reproduce, should I report it? [18:40] isaacs: DrMcKay: what os? [18:40] DrMcKay: isaacs: Linux, Fedora 15 [18:41] isaacs: huh. weird. [18:41] isaacs: can't reproduce you say? [18:41] DrMcKay: isaacs: nope, first time it errored out, now it works [18:42] isaacs: weird. if you figure out how to make it happen again, i'd be interested. otherwise, meh. [18:42] DrMcKay: isaacs: OK :) [18:45] puphin_ has joined the channel [18:45] AvianFlu: EBADF: the only UNIX error you can play on a piano. [18:46] DrMcKay: AvianFlu: lol [18:47] TheJH: AvianFlu, bwahaha! [18:47] DrMcKay: btw, anyone here with a piano? I wonder how it sounds :D [18:48] schwab has joined the channel [18:48] TheJH: it actually doesn't sound that bad :D [18:48] akiva has joined the channel [18:48] AvianFlu: unresolved, but largely in key [18:50] augustl: how safe is it to rely on the contents of the message property of the exception you get when you require a none-existing file? [18:50] augustl: rely on it to detect that the error we got was that a module was missing, that is [18:50] AvianFlu: augustl: error.message is pretty consistent in that case [18:50] augustl: I hope so :) [18:51] AvianFlu: I check for it here https://github.com/nodejitsu/require-analyzer/blob/master/bin/find-dependencies#L33 and use it for the node-detective fallback [18:51] augustl: require.resolve also throws an exception [18:52] augustl: was hoping it would return null or something [18:53] TheJH: DrMcKay, http://content.wuala.com/contents/thejh/PUBLIC/EBADF.wav [18:53] AvianFlu: that would actually make a pretty pleasant "sorry, can't find file" sound [18:54] DrMcKay: TheJH: :D, thanks [18:54] jbrokc has joined the channel [18:58] TheJH: AvianFlu, that'd be sooo cool :) [18:58] jaequery has joined the channel [19:00] aho has joined the channel [19:00] m1k3l has joined the channel [19:00] TheJH: we need a virus that patches this into bash :D [19:00] AvianFlu: TheJH: sounds like you just found yourself a project [19:01] TheJH: AvianFlu, no, I have a cool programming language to create :/ [19:01] AvianFlu: on what platform [19:01] TheJH: AvianFlu, one that compiles to JS [19:01] AvianFlu: nice [19:01] AvianFlu: make it better than coffeescript and I'll give you a dollar [19:02] AvianFlu: XD [19:02] TheJH: AvianFlu, this already works: https://github.com/thejh/moronspeak/blob/master/example/simple.moron [19:02] augustl: give me a programming language with an asynchronous stdlib and line based async instead of callback based async! [19:02] TheJH: AvianFlu, but it's in a very early stage, no conditionals or loops or anything like that yet [19:02] AvianFlu: augustl, you should keep in mind that JS is a functional programming language... it really helped me to get down with callbacks [19:02] Lingerance: line-based async? [19:03] TheJH: augustl, line based async? you mean, non-indented callbacks? coco has those [19:03] Lingerance: How would that look? [19:03] AvianFlu: it's all math [19:03] augustl: example inc [19:03] AvianFlu: line-based async, I don't know [19:03] topaxi_ has joined the channel [19:03] AvianFlu: I think he means the futures / promises approach [19:03] AvianFlu: where it looks like it's returning [19:03] DrMcKay: like in adisp: a = yield asyncFunction() [19:03] AvianFlu: and you still get to write sync code [19:03] DrMcKay: (adisp is for python tornado) [19:04] augustl: http://pastie.org/2590424 [19:04] augustl: db.getStuff would not block the process [19:04] augustl: but that particular execution flow would still not continue to the next line until getStuff has finished [19:04] TheJH: augustl, coco has something like that [19:04] augustl: what's coco? [19:05] augustl: AvianFlu: not futures/promises. [19:05] AvianFlu: augustl, my bad, I misunderstood [19:05] TheJH: augustl, https://github.com/satyr/coco/wiki/additions#wiki-backcall [19:05] augustl: apology accepted :) [19:06] Lingerance: That looks like an actual future. [19:06] TheJH: augustl, coco is a coffeescript fork [19:06] AvianFlu: you can make a function that does that in js, though... you'd just still have to have async inside it XD [19:06] Lingerance: As in a variable that doesn't have a value until the async is done. [19:06] sivy has joined the channel [19:06] augustl: could the example have been harder to understand? Don't think so. Nice function names. >< [19:06] sechrist: So I'm using commander to spawn a command prompt, and backspace is coming up at ^H. Is that a localized terminal problem, or is there anything I can do in my app to handle that case? [19:07] sechrist: I started using securecrt, so I'm not sure if it's doing something special [19:07] AvianFlu: sechrist, I haven't used commander, but I know we patched backspace support into node-prompt a while back :) [19:07] sechrist: node-prompt eh? hummm [19:07] CIA-109: node: 03Fedor Indutny 07master * r9e09fc0 10/ (lib/_debugger.js src/node.cc): [19:07] CIA-109: node: more cli options [19:07] CIA-109: node: * node debug localhost:5858 - connects to remote debugger [19:07] CIA-109: node: * node debug -p `pgrep node` - connects to running process [19:07] CIA-109: node: * Fixed double-run of debugger on SIGUSR1 - http://git.io/8kUEQA [19:07] CIA-109: node: 03Fedor Indutny 07master * r2c9bcb2 10/ src/node.cc : move debugger_running to correct place - http://git.io/BY51wQ [19:07] CIA-109: node: 03Fedor Indutny 07master * r9b6acc2 10/ lib/_debugger.js : handle backtrace errors - http://git.io/uMyDBA [19:07] CIA-109: node: 03Fedor Indutny 07master * r26aab0d 10/ src/node.cc : [19:07] CIA-109: node: EnableDebug immediatly on SIGUSR1 [19:07] CIA-109: node: Don't wait for script to break somewhere, because that may not happen if [19:07] CIA-109: node: execution is inside event-loop, not in v8. [19:07] CIA-109: node: Add '\n' to the end of 'debugger listening...' message - http://git.io/XYDbeA [19:07] CIA-109: node: 03Fedor Indutny 07master * r82d0ac7 10/ src/node.cc : Ctrl+Break on windows starts debugger server - http://git.io/v5cvww [19:08] Morkel has joined the channel [19:08] sechrist: hawt [19:08] sechrist: NodeJitsu++ [19:08] v8bot_: sechrist has given a beer to NodeJitsu. NodeJitsu now has 1 beers. [19:08] AvianFlu: I haven't used commander, so I can't promise that there isn't something it can do that prompt can't [19:08] AvianFlu: but I know we got you on the backspace thing [19:08] AvianFlu: lol [19:08] sechrist: it has a really nice option parser [19:09] sechrist: I haven't actually used optimist or anything so I don't know how easy this is with just the modules, though [19:09] TheJH: augustl, simpler example: http://satyr.github.com/cup/#c:%28err,%20content%29%20%3C-%20fs.readFile%20%5Ctext.txt,%20%5Cutf8%0Athrow%20err%20if%20err%0Aconsole.log%20content [19:09] AvianFlu: optimist is pretty awesome [19:10] Frippe has joined the channel [19:12] augustl: TheJH: pretty neat [19:12] nyrb has joined the channel [19:13] mjr_ has joined the channel [19:14] r04r has joined the channel [19:14] mc_greeny has joined the channel [19:16] sechrist: AvianFlu it doesn't seem it's easy to do a "sh> " type readline prompt with node-prompt, or am I missing something? [19:16] sechrist: perhaps is this message thing that's messing with me [19:17] AvianFlu: there's also prompt.message and prompt.delimiter [19:17] AvianFlu: and then there's property.message which each individual prompt adds [19:17] AvianFlu: what part of "readline" are you referring to though [19:18] sechrist: I got it, but there's a leading space now [19:18] r04r has joined the channel [19:18] AvianFlu: that's odd [19:19] sechrist: I made delimiter and message empty strings [19:19] AvianFlu: it probably appends a space in there somewhere then [19:19] alphahydrae has joined the channel [19:19] sechrist: yep, no biggie, this is pretty sweet [19:20] ctide: is tehre a way to add routes to the express route chain at the top of the stack? [19:20] ctide: i have a catch all route that's defined, and i want to programatically add routes that need to be higher in the stack [19:20] DarkGrey has joined the channel [19:20] alphahydrae: Hi all. I've been trying out node.js the last few days and it looks awesome. There's one thing I haven't been able to find out yet though. Is there a standard documentation generator used by the node.js community? [19:22] tbranyen: alphahydrae: not really, nothing standard like javadocs is [19:22] tbranyen: i've had a decent experience with naturaldocs, but i think i'd rather write my docs in markdown and have the github wiki pick them up [19:23] jbpros has joined the channel [19:23] tbranyen: maintain a separate documentation repo effectively [19:23] sfoster has joined the channel [19:24] alphahydrae: tbranyen: thanks, I'll look into it. Haven't really tried the github wikis yet but that might do the job. [19:24] r04r has joined the channel [19:26] jetienne_ has joined the channel [19:27] ctide: i have a catch all route that's defined, and i want to programatically add routes that need to be higher in the stack [19:27] ctide: err, sorry, up arrow-entered the wrong terminal [19:27] ctide: :) [19:29] normanrichards has joined the channel [19:30] fread2281_ has joined the channel [19:31] petrjanda_ has joined the channel [19:33] rootslab: @alphahydrae take a look to visionmedia DOX https://github.com/visionmedia/dox [19:35] killfill: anyone runs node.js on freebsd?.. [19:37] matomesc has joined the channel [19:38] TomY has joined the channel [19:38] slifty has joined the channel [19:38] CIA-109: node: 03Fedor Indutny 07master * r02e0a0a 10/ doc/api/debugger.markdown : [19:38] CIA-109: node: debugger docs [19:38] CIA-109: node: Fixes #1767 - http://git.io/QBBO7A [19:38] catb0t has joined the channel [19:39] catb0t has joined the channel [19:40] alibapcyk: Is there a 'include' type functionality server-side with node? [19:40] alibapcyk: rather than exporting a module? [19:40] Margle has joined the channel [19:40] alibapcyk: Just a flat include? [19:40] dgathright has joined the channel [19:40] chjj: like a preprocessor include? [19:41] DrMcKay: in some sense, there is. [19:41] DrMcKay: but not really [19:41] chjj: there isnt, but if you want to do something really ugly, you could read a file and eval it [19:41] fread2281_ has left the channel [19:41] alibapcyk: Yeah like a preprocessor include [19:41] alibapcyk: chjj, yuck [19:41] alibapcyk: Module it is, I guess [19:41] DrMcKay: it just globalizes exported things [19:41] chjj: i told you it was ugly! [19:41] DrMcKay: so it's not a proper include [19:42] chjj: i dont know why you would need a preprocessor include [19:42] chjj: modules are all you need [19:42] AvianFlu: chjj++ [19:42] v8bot_: AvianFlu has given a beer to chjj. chjj now has 5 beers. [19:42] DrMcKay: (you could assign exported variables and function to global, but DON'T.) [19:43] alibapcyk: Okay - thanks, I'll stick with modules [19:43] chjj: it wouldnt be so ugly if you used the vm module to eval it, but that wouldnt give you a true eval in the same scope, only the same global context [19:43] DrMcKay: also, what chjj said. if you need it, rethink your design. [19:43] alibapcyk: sorry I was trying something a bit wacky [19:43] jetienne_ has joined the channel [19:44] chjj: but, you really shouldnt need any of that [19:44] chjj: the node module system is amazing [19:44] chjj: the only one worth using [19:44] smtlaissezfaire has joined the channel [19:44] Astro: rektide: julien51 of superfeedr is developing the c2s server stuff [19:45] Astro: rektide: better check out npm pkg "xmpp-server" [19:47] dgathright has joined the channel [19:48] ircretary has joined the channel [19:51] Lingerance: alibapcyk: For my port of ExtJS I ended up doing the lazy route and made Ext put itself in the global namespace (`global.Ext = Ext`) and all its submodules just attach themselves to said object. This sort of replicates include, but that wasn't my goal. [19:52] Lingerance: (For those curious I did it so I didn't have to massively rewrite most of the files) [19:52] alibapcyk: Lingerance: Yeah I see, thanks, I think I can mangle this to work with modules [19:52] alibapcyk: I was just being lazy :P [19:53] devrim has joined the channel [19:53] DrMcKay: I think I've been coding for 11 hours straight [19:53] DrMcKay: big code rewrites ftw! [19:54] fermion has joined the channel [19:54] Wizek-other has joined the channel [19:55] dshaw_ has joined the channel [19:57] eldios has joined the channel [19:59] DrMcKay: lol [19:59] DrMcKay: 11 hours == 2 weeks in Python :D [19:59] catb0t has joined the channel [20:00] dshaw_1 has joined the channel [20:01] coobr has joined the channel [20:03] fread2281 has joined the channel [20:04] mike5w3c_ has joined the channel [20:07] dreamdust has joined the channel [20:08] caolanm has joined the channel [20:12] maletor has joined the channel [20:13] devrim has joined the channel [20:14] jmoyers has joined the channel [20:15] fangel has joined the channel [20:15] normanrichards has joined the channel [20:15] dans has joined the channel [20:19] ako has joined the channel [20:19] aoberoi has joined the channel [20:20] jbrokc has joined the channel [20:23] reid has joined the channel [20:23] reid has joined the channel [20:26] Industrial: Anyone use deferred (https://github.com/medikoo/deferred)? Got a problem with https://gist.github.com/41f9b718128441d8c129 . TypeError: Object # has no method 'apply' on the a2p call. [20:28] niklasfi has joined the channel [20:30] CarterL has joined the channel [20:30] Lingerance: You'd have better luck getting help if you didn't use Coffee [20:30] niklasfi: hi, i am writing a blog-type application, where users should be able to write comments in markdown. what would you suggest for me to sanitize the input? [20:31] Industrial: Lingerance, thats a catch022 [20:31] Industrial: s/0/-/ [20:32] Industrial: though, I could show you my outputted JS ? :p [20:32] Lingerance: That'd work [20:32] Lingerance: Unless it's horrible [20:35] Lingerance: niklasfi: The only thing I can think of is to load it up into a dom, walk it and output what you're allowing. [20:35] Industrial: https://gist.github.com/41f9b718128441d8c129 [20:35] torgeir_ has joined the channel [20:35] Lingerance: Expensive, but sure to make sure it's clean. [20:35] Slayterson has joined the channel [20:37] Industrial: meh only when adding stuff into the db :)P [20:37] Sorella_ has joined the channel [20:38] Industrial: Lingerance, Trying out promises instead of eg node-seq or step. I saw https://github.com/bergie/noflo too, and kind of interested, but I'd like it much more if it was tiny and library based instead of habing its own executeable etc [20:38] Industrial: It reminds me of ZeroMQ [20:39] niklasfi: anyone know wheter markdown is regular? does anyone know its position in the chompsky hierarchy? [20:41] matjaz has joined the channel [20:41] rev has joined the channel [20:41] Lingerance: Industrial: I'm not all too familiar with deferred, but it looks like it's trying to treat something that isn't a function as if it were. [20:41] Lingerance: Can you post a full trace? [20:42] jbrokc has joined the channel [20:44] EyePulp has joined the channel [20:45] Industrial: https://gist.github.com/41f9b718128441d8c129/9cde4096bff8c1b6188576d850ac81013f1c8a0e [20:45] Industrial: I'm looking at async-to-promise.js [20:46] Industrial: damn, thats a lot of chopped up library code [20:47] Industrial: (es5-ext) [20:47] Industrial: Lingerance, besides node-seq (which is my current favorite) and Step, are there any others I should be looking at? [20:48] Lingerance: async gets talk [20:48] AvianFlu: yes [20:48] AvianFlu: http://github.com/caolan/async [20:48] Wizek has joined the channel [20:49] jetienne_: gowiththeflow.js is best :) [20:49] Wizek has joined the channel [20:49] jetienne_: 20 lines and node+browser :) [20:49] fly-away has joined the channel [20:50] jetienne_: https://github.com/jeromeetienne/gowiththeflow.js [20:50] jetienne_: micro library for the win [20:50] mrryanjohnston_ has joined the channel [20:50] mrryanjohnston_: if I want to execute a function upon object instantiation, how could I do this? [20:51] tylerstalder has joined the channel [20:51] jetienne_: mrryanjohnston_: call it in the object contruction [20:51] mrryanjohnston_: jetienne_: I've been looking around for a constructor function type of deal [20:51] mrryanjohnston_: and coming up empty handed. I thought I'd seen it before for JS [20:51] mrryanjohnston_: like __construct or something [20:51] jetienne_: =ryah [20:51] jetienne_: err [20:51] ryah: ? [20:52] jetienne_: ryah: typo my bad [20:52] CIA-109: libuv: 03Bert Belder 07wintty * r431daee 10/ (5 files in 2 dirs): win: TTY work - WIP - http://git.io/0uj7LQ [20:52] cconstantine_ has joined the channel [20:52] guidocalvano has joined the channel [20:53] sivy has joined the channel [20:53] mrryanjohnston_: ah [20:53] jetienne_: mrryanjohnston_: you mean any object instanciation, not one class in particular ? [20:53] mrryanjohnston_: could I just do Class.prototype = function() { }? [20:53] dreamdust: @mrryanjohnston: http://www.ruzee.com/blog/2008/12/javascript-inheritance-via-prototypes-and-closures [20:53] mrryanjohnston_: jetienne_: my class in particular [20:54] mrryanjohnston_: dreamdust: thnanks, I'll give it a look [20:54] jetienne_: mrryanjohnston_: ok your class for a function as constructor. just call you function in it [20:54] dreamdust: someone else might have a better article/more thorough introduction [20:54] madsleejensen has joined the channel [20:54] mrryanjohnston_: ahhh [20:54] mrryanjohnston_: yeah i think I got it [20:54] mrryanjohnston_: thanks guys [20:55] thepatr1ck has joined the channel [20:55] saesh has joined the channel [20:56] dreamdust: @mrryanjohnston_: A better article http://www.klauskomenda.com/code/javascript-programming-patterns/ [20:57] random123 has joined the channel [20:57] dreamdust: Or very in-depth http://addyosmani.com/resources/essentialjsdesignpatterns/book/ [20:58] jetienne_: dreamdust: i prefer the first one :) [20:58] dreamdust: The last one is probably the most comprehensive [20:58] muspelhe has joined the channel [21:00] fread2281 has joined the channel [21:00] Wizek has joined the channel [21:02] DrMcKay has joined the channel [21:03] jmoyers has joined the channel [21:05] devrim1 has joined the channel [21:06] thedjinn has joined the channel [21:06] mif86 has joined the channel [21:07] newsbad_com has joined the channel [21:07] fread2281 has joined the channel [21:08] Industrial: jetienne, how would I do things like seq/parEach/Map ? [21:08] Industrial: (coming from node-seq) [21:09] pizthewiz has joined the channel [21:11] liar has joined the channel [21:12] jetienne_: dreamdust: seq is in it. parEach = forEach + par [21:12] jetienne_: map i dunno what it is :) [21:13] fread2281_ has joined the channel [21:13] jetienne_: i prefere simple short stuff. [21:13] jetienne_: seq+par are the basics, this is why i kept only them [21:13] jetienne_: Industrial: see above [21:14] jetienne_: ACTION messed up the nicknames :( [21:14] marienz_ has joined the channel [21:14] Renegade001 has joined the channel [21:16] tk has joined the channel [21:16] fread2281_ has joined the channel [21:17] borior has left the channel [21:18] isaacs has joined the channel [21:19] dshaw_ has joined the channel [21:20] Andrevan has joined the channel [21:20] Andrevan has joined the channel [21:21] fread2281 has joined the channel [21:23] socialhack has joined the channel [21:24] liveink has joined the channel [21:25] kaueraal has joined the channel [21:26] torgeir_ has joined the channel [21:26] tlrobinson has left the channel [21:26] torgeir_ has joined the channel [21:26] tlrobinson has joined the channel [21:26] tlrobinson has left the channel [21:26] reid has joined the channel [21:26] reid has joined the channel [21:27] tlrobinson has joined the channel [21:30] mrryanjohnston_: so why doesn't this set to something other than undefined when i do new Deck(); [21:30] mrryanjohnston_: https://gist.github.com/1241178 [21:32] liar has joined the channel [21:32] jtsnow has joined the channel [21:33] fread2281 has joined the channel [21:33] tekky has joined the channel [21:34] marcello3d: mrryanjohnston_: not enough code. keep in mind that all of those 'var's are local to the function, not member variables on the object [21:34] jetienne has joined the channel [21:35] jetienne_ has joined the channel [21:35] reid has joined the channel [21:35] mrryanjohnston_: marcello3d: https://gist.github.com/1241178 [21:35] mrryanjohnston_: here's everything so far [21:36] mrryanjohnston_: and I thought I was getting around that by doing the getters and setters [21:36] marcello3d: yes. your 'var' code up there is wrong. you need to assign to to the this object [21:36] marienz_ has joined the channel [21:36] mrryanjohnston_: ah [21:36] mrryanjohnston_: ok [21:36] mrryanjohnston_: sorry, I'm not sure why I wawsn't catching that before :s [21:36] marcello3d: or define the getters within the constructor [21:36] marcello3d: e.g. var size = newSize || 10; this.getSize = function() { return size; } [21:37] pid_ has joined the channel [21:37] mrryanjohnston_: marcello3d: i'm trying to avoid that in hopes of making this faster [21:37] marcello3d: but that will have a different memory profile than the other approach [21:37] mrryanjohnston_: by using the prototype method [21:37] mrryanjohnston_: yeah [21:37] jetienne: or this.size = newSize || 10 ? [21:37] marcello3d: try both and see which is faster :) [21:37] marcello3d: really depends how the VM optimizes it [21:38] mrryanjohnston_: jetienne: is that ? part of the code? [21:39] jetienne: mrryanjohnston_: just a possible way to fix yout gist [21:39] jetienne: your gist [21:39] liveink_ has joined the channel [21:39] reid has joined the channel [21:39] dantalizing has joined the channel [21:39] reid has joined the channel [21:40] liveink__ has joined the channel [21:41] mrryanjohnston_: jetienne: I don't understand what the ? is doing? [21:41] mrryanjohnston_: I've never seen that before [21:41] jetienne: mrryanjohnston_: hehe this is just normal english [21:41] mrryanjohnston_: oh oh [21:41] mrryanjohnston_: gotcha [21:41] reid has joined the channel [21:41] cying has joined the channel [21:41] mrryanjohnston_: jetienne: that's what I ended up doing :) [21:41] tk: funny how people read to much into responses when programming is involved :P [21:41] mrryanjohnston_: thanks both of you [21:42] wadey has joined the channel [21:42] rmzg: tk: The translation between excessively precise programming and flexible english is just one of the reasons we've made no progress in computer science in the last 20 years! [21:43] reid has joined the channel [21:43] tk: rmzg: heh [21:43] jetienne: mrryanjohnston_: cool [21:43] tk: ugh... I should really do a clean install on my desktop... [21:44] liar has joined the channel [21:45] SubStack: v8: (function dim (xs) { return [xs.length].concat(Array.isArray(xs[0]) ? dim(xs[0]) : []) })([[[1],[0],[0]],[[0],[1],[0]],[[0],[0],[1]]]) [21:45] v8bot_: SubStack: [3, 3, 1] [21:45] SubStack: jesusabdullah: ^^^ [21:45] cognominal___ has joined the channel [21:46] jesusabdullah: whaaat [21:47] jesusabdullah: Nice [21:48] codely has joined the channel [21:49] broofa has joined the channel [21:50] jorenl_ has joined the channel [21:50] jesusabdullah: SubStack: https://github.com/jesusabdullah/node-tensor/blob/master/lib/tensor.js#L10-22 [21:50] jesusabdullah: That's how I did it last night [21:50] albertosheinfeld has joined the channel [21:51] jorenl_: Hi folks, my console is outputting "warn - websocket connection invalid" constantly when connecting to my socket.io app with chrome. Any idea why? Possible causes? [21:51] jesusabdullah: I like yours better. [21:51] Crassus has joined the channel [21:52] jmoyers: anyone else find that ab is broken on osx lion? [21:53] dash: jmoyers: i've found that ab is broken everywhere [21:54] jmoyers: whats that supposed to mean? [21:54] ohjeeze has joined the channel [21:54] ohjeeze: hello [21:55] jetienne: jorenl_: ask on #socket.io [21:55] jetienne: jorenl_: my gut feeling it is a matter of websocket protocol version and socket.io version [21:56] cconstantine_ has joined the channel [21:56] DrMcKay: jorenl_: what browser? [21:56] ohjeeze: I'm implementing a Stream, and I'm curious what the results will be if my Stream.write function is recursive [21:57] schwab has joined the channel [21:58] ohjeeze: currently I expect that calling this.write from Stream.write will insert content in the middle of the content sent to Stream.write, but it seemed like something worth checking [22:00] ohjeeze: anybody know what behavior I should expect doing this? [22:00] fread2281 has joined the channel [22:00] flexd has joined the channel [22:01] tk: ohjeeze: my bet is that it would append, not insert [22:01] ohjeeze: mmmk that was my fear >< [22:01] zemanel has joined the channel [22:01] ohjeeze: working on a test case atm, I'll report the results [22:02] ayo has joined the channel [22:02] blup has joined the channel [22:05] ohjeeze: tested with emit'ing a single char at a time and it inserts into the stream nicely [22:06] marienz_ has joined the channel [22:08] keyvan has joined the channel [22:08] jmoyers: by the way -- apache bench def broken on osx lion. compiling apache beta from source fixed it [22:08] jorenl_: jetienne; I asked on #socket.io, no reply (as usual) but I see you joined the room, after my q. (I actually copy pasted in both channels...) [22:09] jorenl_: DrMcKay: up to date Google Chrome [22:09] jetienne: jorenl_: ask 2rdeden when he is back from his conf [22:09] DrMcKay: jorenl_: try with Chrome 15 [22:09] jetienne: jorenl_: he is in italia for node conf where he is talking [22:09] DrMcKay: jetienne: it's 3rdeden [22:10] jorenl_: DrMcKay I'm using chrome 14, I can't really expect my 'visitors' to download a chrome beta right [22:11] DrMcKay: jorenl_: Chrome 14 is fundamentally broken with websockets [22:11] jorenl_: so I should just force it to use some other protocol [22:11] jorenl_: and since chrome is like the only websocket supporting browser, disable websockets completely? [22:11] DrMcKay: jorenl_: try with XHR polling [22:11] NewCoder has joined the channel [22:11] jorenl_: that's what FF is using (working perfectly fine) [22:12] jorenl_: what's a proper config setting to use for transports? xhr, jsonp and html? [22:13] jetienne: nah flash is way better from a latency pov [22:13] jetienne: flash socket == websocket from a ping latency pob [22:13] jetienne: pov [22:13] jorenl_: jetienne: but I had serious trouble with flashsockets before [22:14] jorenl_: are they reliable? :S cross browser? [22:14] jetienne: jorenl_: ah ? i never had any touble with it [22:14] jetienne: jorenl_: yep i used them with firefox for like 6months [22:14] boltR has joined the channel [22:14] Frippe has joined the channel [22:14] jetienne: it doesnt work on mobile tho [22:15] jorenl_: no need [22:15] jorenl_: I wanted to push this site I'mmaking to the public tomorrow :p [22:15] jorenl_: But I'm so afraid of node just crashing [22:16] jetienne: install foreever :) [22:16] ryan0x2 has joined the channel [22:17] ryanrolds: Handling crashes isn't that bad. You can use Forever, cluster, Monit, Supervise, etc... [22:17] ryanrolds: http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever [22:18] jorenl_: ryanolds: there's more scaring me :P I'm running it on a very, very crappy box and if people like it it will fry [22:18] ryanrolds: Having to upgrade/scale an in demand solution is a good problem to have. ;) [22:19] tk: ohjeeze: cool to know :) [22:19] jorenl_: well if there is any 'demand' my 1Gig mem/1.8Ghz CPU ancient box will fry for sure hehe [22:19] ryanrolds: Er, having to scale due to demand that is. [22:20] liar has joined the channel [22:20] jorenl_: I really wonder how many people it will be able to handle. It's so hard to predict with node :S [22:20] Lingerance: jorenl_: That's better than most started VPS' you'll be fine. [22:20] ryanrolds: Use ab (apache benchmark) [22:20] ryanrolds: It will give you some rough numbers to mull over. [22:20] mandric has joined the channel [22:21] Andrevan has joined the channel [22:21] jorenl_: Lingerance: I didn't mention the standard VDSL2 capped upload connection speed :p [22:21] Andrevan has joined the channel [22:22] ryanrolds: jorenl_: Completely agree with Lingerance, most VMs are that or less. I don't think I have single projection node instance running more then 1gig. [22:22] rfay has joined the channel [22:22] saschagehlich has joined the channel [22:22] ryanrolds: *production node instance [22:22] rootslab has joined the channel [22:23] saschagehlich: hey there [22:23] saschagehlich: is there a way to enable debug_mode of the redis client used for connect-redis? [22:24] jsonperl has joined the channel [22:24] jsonperl has left the channel [22:24] jorenl_: ryanolds: nice! so that means it isn't as crappy as I thought! :) I'll see how it goes. actually, I saw VPS pricing for something along those lines is about 50$/mo; [22:24] hasenj has joined the channel [22:24] tomh has joined the channel [22:29] parshap has joined the channel [22:29] smtlaissezfaire has joined the channel [22:30] jarek has joined the channel [22:34] mynyml has joined the channel [22:34] JaKWaC has joined the channel [22:37] sivy has joined the channel [22:37] nerdy_ has joined the channel [22:37] tk has joined the channel [22:38] liar has joined the channel [22:42] k1ttty has joined the channel [22:42] replore has joined the channel [22:42] replore_ has joined the channel [22:43] Cromulent has joined the channel [22:44] JaKWaC has joined the channel [22:48] k1ttty has joined the channel [22:49] markdaws has joined the channel [22:49] liar has joined the channel [22:49] Skyec: does anybody have any experiences to share with nodejistsu? [22:50] DrMcKay: Skyec: it's superb and easy :) [22:57] CIA-109: libuv: 03Bert Belder 07wintty * r46915bd 10/ (5 files in 2 dirs): win: TTY work - WIP - http://git.io/huXuyQ [22:57] liar has joined the channel [23:00] devongovett has joined the channel [23:01] brianseeders has joined the channel [23:02] liar has joined the channel [23:02] fread2281 has joined the channel [23:04] jarek_ has joined the channel [23:04] fread2281: hi [23:06] c4milo1 has joined the channel [23:06] fread2281 has joined the channel [23:09] Acolyte has joined the channel [23:09] Acolyte: Is there an authorization module that allows assigning permissions to routes? [23:10] ryanrolds: Which router are you using? Express? [23:10] Acolyte: yes [23:11] ryanrolds: You can use a route middleware to look at the req and call next if it's authorized or redirect/whatever if it's not. [23:11] liar has joined the channel [23:12] ryanrolds: Did you roll your own authentication or are you using OAuth or something like that that? [23:13] Acolyte: okay, but for example if I use restmvc.js and would like to verify if user is allowed to access the data, is it about the right approach? [23:13] Acolyte: I was going to use everyauth [23:14] Wa has joined the channel [23:14] ryanrolds: Yes. You need to make sure whatever middleware your using to perform authentication is earlier in the stack then restmvc.js. [23:15] k1ttty has joined the channel [23:16] nerdy_ has joined the channel [23:16] ryanrolds: Here is an example of something that hooks in to Express: https://github.com/bnoguchi/everyauth [23:16] ryanrolds: I haven't used it, it just turned up on a google search. [23:17] Skyec: DrMcKay: thanks for the feedback [23:17] Acolyte: thanks ryanrolds [23:17] DrMcKay: Skyec: :) [23:18] DrMcKay: Skyec: also, if you have any questions, they have an IRC channel [23:18] DrMcKay: Skyec: #nodejitsu [23:18] Acolyte: I was going to use it anyway [23:18] ryanrolds: Yeah, looking it it masks a bit of the connect implementation details. [23:18] liar has joined the channel [23:18] jakehow has joined the channel [23:19] ryanrolds: *looking at it, it masks [23:21] albertosheinfeld has joined the channel [23:21] JaKWaC has joined the channel [23:22] meandi2 has joined the channel [23:27] davidbanham has joined the channel [23:28] nightshift has joined the channel [23:29] sam350 has joined the channel [23:30] jonnytran has joined the channel [23:34] sechrist2 has joined the channel [23:37] te-brian has joined the channel [23:38] jonnytran: hello? i came here at the advice of the node github readme. [23:39] stoplights has joined the channel [23:39] tbranyen: i came here for the free snacks [23:39] amigojapan has joined the channel [23:40] stoplights: I'm new to Node and can't get an example script to work [23:40] Acolyte: you don't need to explain what you came here for or permission to ask the question - just ask it [23:41] stoplights: (it imports "http" and starts a server to print a string on each request) [23:41] Emmanuel` has joined the channel [23:41] stoplights: when pasting and running it in node console, it works [23:41] stoplights: but when calling "node example.js" from command line [23:41] jonnytran: yeah, this is my first time here, and it just seemed a little odd that there's hundreds of people here and it's completely silent [23:41] stoplights: it gives a process.nextTick error [23:41] tbranyen: jonnytran: welcome to irc... [23:41] jonnytran: thanks [23:42] stoplights: SyntaxError: Unexpected token ILLEGAL [23:42] tbranyen: hundreds of people connected, doesn't mean 100 people are reading everything you say [23:42] jonnytran: as you may have guessed, i'm new to node and trying to install it on snow leopard [23:42] stoplights: thought i'd ask here before i boot up VMWare or look in the source ;) [23:42] jonnytran: getting this error running make [23:42] khrome_ has joined the channel [23:42] jonnytran: Waf: Leaving directory `/Users/jtran/projects/node/build' [23:42] jonnytran: 'build' finished successfully (3m23.369s) [23:42] jonnytran: Traceback (most recent call last): [23:42] jonnytran: File "tools/waf-light", line 158, in [23:42] jonnytran: Scripting.prepare(t, cwd, VERSION, wafdir) [23:42] jonnytran: File "/Users/jtran/projects/node/tools/wafadmin/Scripting.py", line 145, in prepare [23:42] jonnytran: prepare_impl(t, cwd, ver, wafdir) [23:42] jonnytran: File "/Users/jtran/projects/node/tools/wafadmin/Scripting.py", line 135, in prepare_impl [23:42] jonnytran: main() [23:42] jonnytran: File "/Users/jtran/projects/node/tools/wafadmin/Scripting.py", line 186, in main [23:42] jonnytran: fun() [23:42] jonnytran: File "/Users/jtran/projects/node/wscript", line 939, in shutdown [23:42] jonnytran: os.symlink('build/default/node', 'node') [23:42] jonnytran: OSError: [Errno 17] File exists [23:42] quackquack has joined the channel [23:43] liar has joined the channel [23:43] tbranyen: jonnytran: nice. pastebin next time please =) [23:43] stoplights: *bump* lol [23:43] quackquack: What is Node.js' equivalent of ruby's Rake? [23:43] tbranyen: make clean [23:43] tbranyen: quackquack: jake [23:43] jonnytran: my bad [23:44] quackquack: tbranyen: thanks! i guess i should have guessed the name .. :P [23:44] tbranyen: Nake [23:45] stoplights: anybody run into this problem with "01SyntaxError: Unexpected token ILLEGAL01"? [23:45] DrMcKay: jonnytran: nothing bad, just remove node from your build directory and rebuild [23:46] tbranyen: or just make clean? [23:46] jmoyers: stoplights what example? [23:46] jmoyers: stoplights code? [23:46] Acolyte: stoplights: yes, it means that your ejs, jade or jqtpl runs into unexpected character when compiling the template [23:47] stoplights: from googling, it seems like a common error thrown in node [23:47] ecin has joined the channel [23:47] jonnytran: DrMcKay: thanks, that worked [23:47] stoplights: i installed the windows binary and just ran the first sample code from http://nodejs.org/ [23:48] stoplights: do i need to add node to path or some other environment tweak? it works fine from node console, but not from invoking the script as an argument [23:48] jonnytran: tbranyen: make clean did not remove out/ and node symlink for some reason [23:50] tbranyen: weird [23:50] tbranyen: good to know [23:50] MooGoo has joined the channel [23:50] stoplights: (moved node to different directory and added to path, but same error) [23:51] ShonM has joined the channel [23:51] quackquack: What should I use insead of `require.path` so that my code isnt full of `require("../../../bla")`? [23:51] jmoyers: stoplights its almost certainly a copy paste error [23:51] Acolyte: __dirname [23:51] jmoyers: whats the stack trace? it should be highlighting a particular line [23:51] skm has joined the channel [23:52] stoplights: the stack throws an error in module.js, not in my example script [23:52] ji0n has joined the channel [23:52] chrischris has left the channel [23:52] stoplights: the same problem exists even when the script just contains 'console.log("Hello World");' [23:53] JaKWaC has joined the channel [23:53] CarterL has joined the channel [23:54] racar has joined the channel [23:56] ShonM has left the channel [23:57] skm has joined the channel [23:57] smtlaissezfaire has joined the channel [23:58] [[zz]] has joined the channel [23:59] stoplights: i'll try on linux later then =)