[00:00] tjholowaychuk: that would probably do it [00:00] tmzt_: Andi5: and it's MIT it appears, which is perfect for what I'm trying to do [00:00] oscarkilhed: jonaslund: but strict mode can surely not go into the main fork? [00:01] tmzt_: oscarkilhed: strict mode is only enabled if there's a 'strict mode'; at the top of the code [00:01] joshthecoder: ryah: if I ever get around to finishing libhttp I might try applying libol into it as well :_ [00:01] monokrome: Oh no. It's installing to ~/lib :( [00:01] oscarkilhed: tmzt_: aah [00:02] tmzt_: joshthecoder: what is libol? [00:02] jonaslund: tmzt: http://tinyclouds.org/iocp-links.html [00:02] joshthecoder: https://github.com/joyent/libol [00:03] tmpvar has joined the channel [00:03] joshthecoder: ^ hehe skip to the end, you'll get a good laugh [00:03] rook2pawn has joined the channel [00:03] tmzt_: will libeio use that on windows? [00:03] sivy has joined the channel [00:03] doubletap has joined the channel [00:04] joshthecoder: I don't think libeio would be used since it needs libev right? [00:04] doubletap has left the channel [00:04] joshthecoder: I think the idea is to use IOCP for all asyc stuff [00:05] isaacs: monokrome: hey [00:06] monokrome: hey [00:06] monokrome: ACTION was just looking around through your docs [00:07] mcantelon has left the channel [00:08] jimt_ has joined the channel [00:08] konobi: hey monokrome [00:08] monokrome: Hey, konobi [00:09] isaacs: so, you had some problem npm something thingie? [00:09] monokrome: isaacs: Any idea regarding changing the install prefix? :) [00:09] isaacs: monokrome: what's the issue you're seeing? [00:09] monokrome: When I configured node, I used: ./configure --prefix="${HOME}/local" [00:09] isaacs: monokrome: oh, saw your gist [00:10] isaacs: echo export NODE_PATH=$(npm config get root) >> ~/.bashrc [00:10] monokrome: But there is no ./configure for npm, so I'm not sure how to do the equivalent [00:11] beckje01 has joined the channel [00:11] captain_morgan: ryah: Any suggestions on debugging a stack_overflow in vm.runInNewContext? [00:13] monokrome: isaacs: but npm is being installed with ${HOME} as the prefix [00:13] NuckingFuts has joined the channel [00:17] gozala has joined the channel [00:19] zentoooo has joined the channel [00:19] monokrome: isaacs: If I manually move all the installed files into ~/local/ then it works... but it installs modules into ~/node_modules [00:20] monokrome: and: npm config get root is undefined [00:20] isaacs: monokrome: oh, ok [00:20] isaacs: monokrome: what's npm -v? [00:20] gazumps has joined the channel [00:20] monokrome: 1.0.1rc4 [00:20] RusAlex: guys please another question. http://pastebin.com/ZYc9sHHK this is my code to send json. in my chrome console i see an object params, but in my app console i see a blank req.params just [] [00:20] isaacs: monokrome: ok, are you installing things globally? ie, with the -g flag? [00:20] monokrome: no [00:20] monokrome: I'm trying to keep everything in my home dir [00:20] isaacs: monokrome: blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [00:21] bbttxu has joined the channel [00:21] sprout has joined the channel [00:21] isaacs: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [00:21] ryah: captain_morgan: hm - [00:21] ryah: captain_morgan: i'm not sure the v8 debugger jumps into new contexts... [00:21] ryah: captain_morgan: did you try "node debug" ? [00:21] monokrome: oooh [00:22] roneil has joined the channel [00:22] monokrome: I am assuming that install.sh does it locally, actually [00:23] captain_morgan: ryah: I did, and was unable to step into the new context [00:23] joshthecoder: anyone try playing around with v8 isolates in node yet? I am interested in maybe prototyping some sort of threading model. [00:24] captain_morgan: ryah: and if I let it go, it sort of throws and error, indicating only the line (runInNewContext) with no error message [00:24] captain_morgan: if I try{}catch it then I at least get the type: 'stack_overflow' but with no stack trace [00:25] monokrome: -g did a little bit better, but that might be because I switched to current git :/ [00:25] RusAlex: guys any idea ? tjholowaychuk [00:25] tjholowaychuk: RusAlex: sorry missed that [00:26] tjholowaychuk: RusAlex: yes, because req.params is an array with properties as well [00:26] derferman has joined the channel [00:26] tjholowaychuk: RusAlex: so if you plan on using res.send() to debug the params or something, dont :p [00:26] tjholowaychuk: JSON.stringify() ignores array props [00:26] RusAlex: im using console.log() [00:27] tjholowaychuk: they will show with console.log [00:28] monokrome: isaacs: There isn't an equivalent to --prefix when installing npm? [00:29] isaacs: monokrome: not at install time. but you can put `prefix = /path/to/wherever` in your.npmrc file [00:29] monokrome: If I use -g, I can't manually move the npm files because it can't find .././lib/ etc [00:29] RusAlex: so how i can pull a data from request, according my code ? in dailyjs example he use req.params.id, req.params.title, why i cant ? [00:29] isaacs: monokrome: or `npm config set prefix blah` [00:29] monokrome: I can't run npm because it throws an error that it can't find the npm library [00:29] tjholowaychuk: RusAlex: you can.. you said you doing res.send(req.params) [00:30] isaacs: monokrome: yeah... if you wanna *change* the prefix, you probably need to just remove and re-install with the curl command [00:30] tjholowaychuk: this wont work because it's an array with properties [00:30] tjholowaychuk: RusAlex: res.send(req.params.title) etc will work [00:30] monokrome: It looks for .././lib instead of ../local/lib/ [00:30] monokrome: ok [00:30] monokrome: I'll try the sh file again [00:30] tjholowaychuk: RusAlex: and params is for the segment parameters, not POST data [00:30] tjholowaychuk: RusAlex: read the docs some more my friend :) [00:30] willwhite has joined the channel [00:30] vckt has joined the channel [00:31] RusAlex: tjholowaychuk: can you recommend a good docs for this point ? [00:31] tjholowaychuk: RusAlex: req.query.foo == ?foo=bar req.body.foo == POST foo=bar req.params.foo = /some/path/:foo [00:31] tjholowaychuk: RusAlex: expressjs.com's guide should help [00:31] RusAlex: ok. will read expressjs.com [00:32] RusAlex: thanks for recomendation [00:32] llkazu has joined the channel [00:32] robtmr has joined the channel [00:32] tjholowaychuk: RusAlex: http://expressjs.com/guide.html#req.param() [00:32] perlmonkey2: are there any part of speech taggers written in node? [00:32] tjholowaychuk: param is kind of a stupid word [00:32] hij1nx has joined the channel [00:33] tjholowaychuk: req.args or something i dunno, nothing concise really makes sense there [00:34] monokrome: probably just to manually install jade [00:34] xandrews has joined the channel [00:35] davidcoallier has joined the channel [00:35] doubletap1 has joined the channel [00:35] charlenopires_ has joined the channel [00:36] RusAlex: tjholowaychuk: thanks once again. sorry for stupid questions [00:36] tjholowaychuk: RusAlex: no worries, I don't mind, I can at least point you to the right section of the docs [00:36] arpegius has joined the channel [00:36] tjholowaychuk: it's not uber-clear since "param" has little meaning [00:36] [[zz]] has joined the channel [00:36] doubletap1 has left the channel [00:37] RusAlex: ok. very nice technology nodejs. [00:37] doubletap1 has joined the channel [00:37] doubletap has left the channel [00:40] muk_mb has joined the channel [00:40] isaacs: monokrome: did that fix it? [00:41] secoif has joined the channel [00:41] EyePulp has joined the channel [00:42] thurmda: is there a queue for questions or should I just throw mine out there? [00:42] saschagehlich has joined the channel [00:42] thurmda: I'm having an issue using spawn (from child_process module). I'm not sure I'm using the second parameter args correctly or maybe it's a problem with the command I'm running... [00:42] thurmda: I'm trying to consume the twitter streaming API. I found a work around to get the data but I'd love to understand what I'm doing wrong... [00:43] thurmda: If I create a seprate process where I direct curl output a file, I can successfully read stdout from a spawn'd tail command i.e. curl -d "track=node" http://stream.twitter.com/1/statuses/filter.json -utwitteraccount:twitterpassword >tweetStream var tail = spawn("tail", ["-f", "tweetStream"]); tail.stdout.on("data", processNewLines ); [00:44] thurmda: sorry formatting... going to resend 1/line [00:44] thurmda: curl -d "track=node" http://stream.twitter.com/1/statuses/filter.json -utwitteraccount:twitterpassword >tweetStream [00:44] thurmda: then in node.js I'd do... [00:44] thurmda: var tail = spawn("tail", ["-f", "tweetStream"]); [00:44] thurmda: tail.stdout.on("data", processNewLines ); [00:44] thurmda: But I'd like to do something like this... But processNewLines never gets called when I do this. [00:44] thurmda: var cmd = spawn("curl", [00:44] thurmda: ['-d "track=node"', "http://stream.twitter.com/1/statuses/filter.json", "-utwitteraccount:twitterpassword"]); [00:44] thurmda: cmd.stdout.on("data", processNewLines ); [00:45] thurmda: I thought this had something to do with the progress bar curl likes to show, but I'm not sure. adding the -s arg didn't help. [00:45] isaacs: thurmda: this is wrong: ['-d "track=node"' [00:45] isaacs: thurmda: should be ['-d', 'track=node' [00:45] jano has joined the channel [00:45] isaacs: thurmda: but why are you cp'ing to curl? why not use node's http.request? [00:46] thurmda: so, no whitespace [00:46] hlynur has joined the channel [00:46] thurmda: :) I'm sure there is a better way to do this but I this highlighted teh issue I had with spawn [00:46] isaacs: thurmda: well, more to the point, when you call curl, you call it with "-d" as an arg, and then "track=node" as a second ar [00:46] isaacs: g [00:47] piscisaureus: @ryah: https://gist.github.com/897555? [00:47] isaacs: thurmda: otherwise, it's like calling: curl '-d "track=node"' [00:47] isaacs: and curl doesn't know what to do with an arg named '-d "track=node"' [00:47] monokrome: isaacs: Nope [00:47] isaacs: monokrome: so, what's up? [00:48] isaacs: monokrome: which npm --> should be ~/local/bin/npm ; npm root -g --> ~/local/lib/node_modules [00:48] jimt has joined the channel [00:48] isaacs: monokrome: that's what i'd expect from how you described your setup [00:49] monokrome: isaacs, The only ways that it works requires: 1) I keep lib & share in $HOME or else 2) I have a ~/node_modules directory [00:49] isaacs: monokrome: define "works" [00:49] monokrome: isaacs: Installs modules to somewhere that node can find [00:49] isaacs: monokrome: ok. so.. what's your NODE_PATH environ? [00:50] isaacs: monokrome: or `node -e require.paths` [00:50] thurmda: NICE! [00:50] thurmda: that was it [00:50] thurmda: thank you! [00:50] isaacs: thurmda: np [00:50] monokrome: /home/monokrome/lib/node [00:50] isaacs: thurmda: check out the docs on the "http" module [00:50] thurmda: yep, using it too [00:51] isaacs: monokrome: what is that? the NODE_PATH? or require.paths? [00:51] isaacs: or npm root? [00:51] monokrome: export NODE_PATH=/home/monokrome/lib/node [00:51] thurmda: I was actually letting other users pipe stuff to a file that I was watching [00:51] isaacs: monokrome: ok [00:51] isaacs: monokrome: and you're using the 1.0 rc, correct? [00:51] monokrome: Should I delete npm and then reinstall it with that set? [00:53] sunnyohno has joined the channel [00:53] jimt has joined the channel [00:54] monokrome: Nope. No difference installing it that way. [00:54] monokrome: isaacs: I am using curl http://npmjs.org/install.sh | npm_install=rc sh [00:55] isaacs: monokrome: can you gist `npm config ls`? [00:56] mkrecny has joined the channel [00:56] hornairs has joined the channel [00:56] twodollarz has joined the channel [00:57] monokrome: http://paste.pocoo.org/show/363592/ [00:57] monokrome: Sorry, didn't use gist. pocoo is a habit. :/ [01:00] drefined has joined the channel [01:01] doubletap1 has joined the channel [01:02] pquerna: ryah: http://etutorials.org/Programming/secure+programming/Chapter+10.+Public+Key+Infrastructure/10.5+Performing+X.509+Certificate+Verification+with+OpenSSL/ [01:02] tbranyen: isaacs: i'm completely missing how to add npm dependancies in the package.json file [01:02] darshanshankar has joined the channel [01:02] tbranyen: jsut read the developer faq [01:02] isaacs: tbranyen: "dependencies" : { "something" : "1.2.3 - 2.3.4 || 3.0" } [01:02] isaacs: tbranyen: npm help json [01:02] monokrome: isaacs: Did that paste help at all? [01:02] HattCzech has joined the channel [01:03] langworthy has joined the channel [01:03] tbranyen: isaacs: boom thats what i was looking for thanks [01:03] tfe_ has joined the channel [01:03] tfe_ has joined the channel [01:03] isaacs: monokrome: ok, cool. and is there a `prefix = /home/monokrome` in your .npmrc file? [01:03] monokrome: I don't have that file, I don't think [01:03] isaacs: ACTION needs to separate out what comes from where in npm config ls.... [01:03] isaacs: monokrome: ok. then what's `which node`? [01:04] monokrome: `which node` /home/monokrome/.bin/node [01:04] monokrome: Oh, sorry [01:04] monokrome: That's a symlink to [01:04] monokrome: /home/monokrome/local/bin/node [01:04] isaacs: there ya go [01:05] k1ttty has joined the channel [01:05] isaacs: npm does things based on where it *finds* node [01:05] HattCzech: would someone here be willing to help me resolve an issue with bufferlist? [01:05] monokrome: oooh. [01:05] isaacs: which is an unfortunate hack to work around Homebrwe and other symlink-based package managers [01:05] monokrome: So, I should add local/bin to my path :) [01:05] isaacs: monokrome: yeah. and remove hte symlink to ~/bin/node [01:06] HattCzech: does it matter when i get "Checking for node path : not found" when installing an npm package? [01:07] isaacs: HattCzech: no, i think that's a meaningless node-waf artifact [01:07] HattCzech: okay, that's good [01:07] HattCzech: now the tougher question of why bufferlist/binary doesn't work [01:07] HattCzech: i installed the bufferlist npm [01:07] HattCzech: and used one of their examples [01:07] HattCzech: and it doesn't work [01:07] isaacs: HattCzech: hm.. i was pinging SubStack about some stuff with that today [01:08] monokrome: isaacs: Would be nice if the installer did a readlink :) [01:08] HattCzech: gives me: "Error: Cannot find module 'bufferlist/binary'" [01:08] marcosvm has joined the channel [01:08] rwaldron_ has joined the channel [01:08] isaacs: monokrome: so, the problem with that is that npm will end up in /usr/local/Cellar/lib/node/0.4.4/bin/npm [01:08] isaacs: monokrome: i can just look at process.execPath [01:08] HattCzech: npm root [01:08] HattCzech: oops, sorry [01:08] monokrome: isaacs: Works now :) [01:08] isaacs: monokrome: sweet :0 [01:08] isaacs: :) [01:08] monokrome: thank you [01:09] HattCzech: so isaacs, is it something i did wrong? or is the package messed up? [01:09] dguttman has joined the channel [01:09] nonnikcam has joined the channel [01:10] sunnyohno has left the channel [01:10] isaacs: HattCzech: so, which package did you actually install? [01:10] HattCzech: rfb first (which has bufferlist as a dependency) [01:10] pquerna: OpenSSL 0.9.9 and above have a special option to disable compression per SSL instance, SSL_OP_NO_COMPRESSION. [01:10] HattCzech: but rfb doesn't work [01:11] HattCzech: (because of the same error) [01:11] HattCzech: so i went simpler and tried bufferlist with an example from git [01:11] HattCzech: and that doesn't work either [01:11] monokrome: isaacs: Never mind. Now it's installing into node_modules now. [01:11] monokrome: ~/node_modules [01:12] draginx has joined the channel [01:12] isaacs: monokrome: So: when you specify the -g to install globally, it'll install in {prefix}/lib/node_modules [01:12] roneil has left the channel [01:12] ben_alman has joined the channel [01:12] isaacs: monokrome: if you *don't* specify -g, then it'll install in ./node_modules [01:12] isaacs: monokrome: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [01:12] monokrome: Can the -g be specified with the curl install? [01:13] isaacs: monokrome: the curl install sets -g for install npm. [01:13] isaacs: but, for instance: npm install jade -g --> installs to prefix/lib/node_modules [01:13] isaacs: npm install jade --> installs to ./node_modules [01:13] draginx has joined the channel [01:13] draginx has joined the channel [01:13] sprout has joined the channel [01:13] gazumps has joined the channel [01:13] isaacs: to set it permanently, do: npm config set global true [01:15] sunnyohno has joined the channel [01:15] tim_smart: ACTION just moved his npm prefix to ~/local [01:15] pquerna: mjr_: what version of openssl are you using? [01:15] max_dev has joined the channel [01:16] tim_smart: isaacs: Do you add prefix/node_modules to your node path? [01:16] isaacs: tim_smart: prefix/lib/node_modules [01:16] isaacs: tim_smart: yes. [01:16] isaacs: (the lack of a "/lib" in there was a bug in the first few rc's) [01:16] tim_smart: NODE_PATH right? [01:16] isaacs: yeah [01:17] isaacs: actually, on my machine, i don't do that [01:17] isaacs: i install things locally if i want to require() them [01:17] isaacs: it's better [01:17] tim_smart: Depends if you use them in the repl a lot [01:18] jimt_ has joined the channel [01:20] isaacs: tim_smart: i use the repl constantly. but i'm almost always in one of my code directories [01:20] isaacs: oh, he's gone [01:20] robotarmy has joined the channel [01:21] ckknight: I've decided to make the plunge into node.js and do the stereotypical thing by making a blog :P [01:21] HattCzech: anyone want to try the bufferstack package and see if it works? [01:21] HattCzech: (sorry, bufferlist) [01:21] HattCzech: https://github.com/substack/node-bufferlist/blob/master/examples/simple_binary.js [01:21] HattCzech: that's the code i'm trying to test [01:22] pastak has joined the channel [01:22] tim_smart has joined the channel [01:23] Tobsn: hmm if a class supports event handlers, can i set more than one function per handler? [01:24] hasenj has joined the channel [01:24] Tobsn: obj.addEventHandler( 'ready', function(){ do something } ); obj.addEventHandler( 'ready', function(){ do something else too } ); [01:24] Tobsn: probably not i guess [01:24] HattCzech: Tobsn: i would think you could do that [01:24] monokrome: Why not? [01:24] Tobsn: hmm [01:24] monokrome: You can on the client-side [01:25] HattCzech: or it could be a function that calls two functions, couldn't it? :) [01:25] mattmcmanus has joined the channel [01:25] jimt has joined the channel [01:25] Tobsn: of course, i just want to make it "easier" and preset a event handler but dont want to steal if from the user of the class [01:26] pquerna: mjr_: https://gist.github.com/8312cbf02793d2017469 [01:26] pquerna: mjr_: you want that + a patch ryan is working on [01:26] pquerna: mjr_: currently every connection that is created, we are reparsing and reload the Root CA certs [01:26] mjr_: whoops [01:26] Tobsn: thats would explain why https is so slow here. [01:26] pquerna: mjr_: but it requires OpenSSL 0.9.9 > to disable compression per-connection [01:27] pquerna: go go instruments.app [01:27] mjr_: Oh, I was hoping to actually turn on compression at some poitn [01:27] e2i has joined the channel [01:28] mjr_: pquerna: so the issue is something related to turning ON compression? [01:28] abraxas has joined the channel [01:28] isaacs: HattCzech: i think you should probably post an issue for SubStack [01:28] isaacs: mjr_: you're gonna be happy [01:29] jtsnow has joined the channel [01:29] mjr_: I LOVE being happy [01:29] highermath_away has joined the channel [01:29] Tobsn: HattCzech, monokrome, btw. it works - it fires both eventlisteners [01:30] Tobsn: :D [01:30] HattCzech: good :) [01:30] pquerna: mjr_: with those changes, it goes from 150mb no patches, 110mb with no ca certs+ compression on, 15.1mb with both fixes [01:30] HattCzech: isaacs: i want to make sure it's an issue before i do [01:31] pquerna: mjr_: thats with 200 incoming clients [01:31] pquerna: mjr_: openssl by default turns on compression [01:31] mjr_: oh, interesting [01:31] pquerna: mjr_: infact, turning it _off_ is hrd [01:31] sprout has joined the channel [01:32] mjr_: You generally want compression for https though, don't you? Seems like it'd win big for the HTTP headers [01:32] pquerna: well, depends [01:32] pquerna: i mean kinda [01:32] isaacs: ryah: https://github.com/joyent/node/issues/868 [01:32] pquerna: i think at the least [01:32] pquerna: we should make it configurable to turn off [01:32] pquerna: and at best we can tune zlib [01:32] pquerna: to not be so insane [01:32] ryah: pquerna: https://gist.github.com/897595 [01:32] flasomm has joined the channel [01:34] tbranyen: are these tests comparable? https://github.com/joyent/node/issues/868 [01:34] tbranyen: oh lol isaacs [01:34] tbranyen: i see readFileSync which would probably cause some latency [01:35] unomi: its only loaded once [01:35] zorzar has joined the channel [01:35] templaedhel has joined the channel [01:35] tbranyen: unomi: good point [01:35] isaacs: tbranyen: yeah, that's only at startup [01:36] isaacs: tbranyen: i posted it because it's probably related to exactly what pquerna and ryah are debugging and hacking on atm [01:36] tbranyen: isaacs: oh baller [01:36] mengjian has joined the channel [01:36] tbranyen: as the young kids say [01:36] unlink has joined the channel [01:36] unlink has joined the channel [01:36] templaedhel: Hm. Trying to get cookies/sessions to work. For my /login/ url I set the name cookie, then use writeHead to change location to be the web root, but I still need to refresh for the cookie to work [01:36] templaedhel: shouldnt the redirect do that? [01:36] unomi: It would be nice if he wrote what version / revid he is testing on though [01:38] mjr_: pquerna: I need to step out for a while, so I won't be able to try this yet today. Thanks for digging into it though. [01:38] pquerna: mjr_: yeah, i think we will have a patch to try soon enough [01:39] pquerna: but ~15mb for 200 connections = winning [01:40] mjr_: oh yes [01:40] mjr_: SOO much better [01:40] mjr_: OK, gotta run [01:41] eventi has joined the channel [01:41] xastey has joined the channel [01:42] templaedhel: Hm, changing the header location property does not actually refirect the browser [01:42] templaedhel: What the hell? [01:42] Yuffster has joined the channel [01:42] xastey: whats a good lib or way to monitor realtime stats of my node app? [01:43] trotter has joined the channel [01:44] JimBastard has joined the channel [01:44] JimBastard: fucking, unicorns, already [01:45] JimBastard: im going to have to take april 1st off from the internet [01:45] tsutton has joined the channel [01:45] MatthewS: there's support for dtrace in node which is pretty nice. but dtrace and linux don't play together. [01:46] philipharrison has joined the channel [01:46] MatthewS: on the ops side of running an app i'm using statsd to instrument various calls [01:47] wirehead has left the channel [01:48] tsutton: hi folks, anyone know if the connect executable still exists? I don't see it in the repo, nor can I find any reference to it's demise. [01:49] deepthawtz has joined the channel [01:49] murz has joined the channel [01:50] DTrejo has joined the channel [01:51] alek_br has joined the channel [01:51] pquerna: ryah: http://www.dest-unreach.org/socat/contrib/socat-opensslcompress2.patch [01:51] arpegius has joined the channel [01:51] pquerna: ryah: line 150 on down [01:51] isaacs: tsutton: try `npm view connect bin` [01:52] isaacs: tsutton: i was not aware of any "connect executable" [01:52] bingomanatee has joined the channel [01:52] isaacs: JimBastard: you're fucking unicorns? [01:52] isaacs: you're hard-core. [01:52] pastak_ has joined the channel [01:52] tk has joined the channel [01:53] warz has joined the channel [01:53] JimBastard: isaacs: drinking their blood makes me rap good [01:53] warz has joined the channel [01:53] secoif has joined the channel [01:54] DTrejo: no excuse not to try node now! http://news.ycombinator.com/item?id=2394600 [01:54] fljitovak has joined the channel [01:55] jaxdahl has joined the channel [01:55] wilmoore has joined the channel [01:57] DTrejo: now it's free to get started w/ node even if you don't have a coupon code for any node hosting service, which means more traction for node, yay [01:59] alex_b has joined the channel [01:59] templaedhel: Anyone here who can quick help with http headers? [02:00] tmzt_: DTrejo: adding to thatsamcdand I have ndoe working on fastcgi, at least on bluehost [02:00] DTrejo: cool, is bluehost free to start off as well? [02:01] tsutton: isaacs: thanks, nada. [02:01] tsutton: isaacs: the connect executable I speak of is referred to here - http://extjs.github.com/Connect/ [02:01] tjholowaychuk: tsutton: that is longggg gone [02:01] NuckingFuts: I'm trying to get a friend to forkbomb themselves using NodeJS :3 [02:01] http402 has joined the channel [02:01] Lorentz has joined the channel [02:01] tjholowaychuk: tsutton: like a year ago, it became spark [02:01] tjholowaychuk: and no one really uses spark [02:01] tsutton: tjholowaychuk: thanks, I had a feelin' [02:01] tjholowaychuk: so it's replaced by fugue/cluster/spark2 [02:02] tsutton: ahhhh, thanks! [02:02] Tobsn: hmm titanium sdk gives you addEventListener( handle, function(e){} ) and fireEvent( handle, [obj] ); anyone an idea how i would pass data into "e" inside the listener? [02:03] templaedhel: Anyone here good with http headers? Or maybe can help me point out a blind bug I cant see? [02:03] Tobsn: nevermind, fixed it. [02:04] tjholowaychuk: templaedhel: let's see the code [02:04] tjholowaychuk: (gist) [02:04] Xelysium has joined the channel [02:04] wasabista has joined the channel [02:06] tmzt_: 0.2 cents and hour is how much a month? [02:07] halfhalo: to much? [02:07] tmzt_: bluehost is 7.95 or so, but I don't mean just bluehost, I mean that pretty much all shared hosting providers can support node now with the fcgi module [02:08] shaunau has joined the channel [02:08] tmzt_: that opens it up to those that don't want to or can't fully manage an aws instance, or don't want to deal with it [02:08] tim_smart: http://prgmr.com/xen/ [02:08] tmzt_: they just have to upload the site and set the main js file executable, which any good ftp client can do [02:08] tmzt_: this assumes that the provider has node in a global location though [02:10] unomi has joined the channel [02:13] jeromegn has joined the channel [02:15] templaedhel: Ok, found the problem, now why are my headers as follows: "Cache-Control:max-age=2592000" when I do res.writeHead(200, {'Content-Type': 'text/html','Cache-Control':'max-age=0'}); on the callback? [02:15] willwhite has joined the channel [02:15] DTrejo: halfhalo: tmzt_ it's free for the first year to newcomers to EC2 [02:16] halfhalo: ACTION has amany vps to use [02:16] DTrejo: :) [02:16] isaacs: tim_smart: i've had a prgmr machine doing nothing for months now [02:17] templaedhel: tjholowaychuk: ^ [02:17] isaacs: tim_smart: i just don't want to give it up, because they're so restrictive about new signups, and it costs less than i spend on coffee [02:17] tim_smart: isaacs: Heh. Yeah when they are low on resources signing up can be an ass [02:19] bingomanatee has joined the channel [02:19] blkcat: i'm torn between keeping my linode and moving to prgmr, haha [02:19] blkcat: or just waiting on my no.de coupon [02:19] sorens3n: im waiting too ;) [02:19] blkcat: prgmr is 50% less than my linode [02:20] evanmeagher has joined the channel [02:20] DTrejo: blkcat: use http://news.ycombinator.com/item?id=2394600 for a year :) [02:20] tmzt_: I'm just trying to make it a little easier for users using PHP or Rails to move to node.js, without having to change their hosting completely [02:20] blkcat: DTrejo: i'd love to but i already had an aws account :( [02:20] tmzt_: there are a lot of goog options, I just think having more options is better [02:21] jroes: heroku maxed out their node beta, right? [02:21] DTrejo: blkcat: what happens if you sign up with a different email? I guess that's just not a cool thing to do [02:21] blkcat: jroes: yeah, heroku is closed atm [02:22] jroes: sucks [02:22] blkcat: DTrejo: i'm not sure, honestly. [02:22] jroes: duostack is open-ish I think [02:22] fljitovak: im hoping on dotcloud, personally. [02:22] blkcat: but $12/mo. is nothing, i'm happy to pay for prgmr [02:22] jroes: yeah, I guess so, but deployment on heroku is about a thousand times easier [02:22] pquerna: https://gist.github.com/9a8246b5573eb34595b2 [02:23] jroes: you using chef or some other devops stuff? [02:24] blkcat: jroes: me? [02:24] jroes: yep [02:24] ryah: pquerna: :) [02:24] tim_smart: ACTION just got a year of the prmgr 512 [02:25] Hello71 has joined the channel [02:25] blkcat: jroes: nah, all my projects are still very much hobbyist. [02:25] tim_smart: ACTION is going to play around with node.js deployment strategies. [02:25] blkcat: until i can find work ;) [02:25] jroes: ahh :) [02:25] jroes: tim_smart: any leads so far? [02:25] tim_smart: jroes: On? [02:25] shiawuen has joined the channel [02:25] jroes: deployment strats [02:25] tim_smart: npm + git [02:26] tim_smart: (+ ssh) [02:27] tim_smart: I have been using fabric and npm-deploy. Will probably look to further extend npm-deploy to cover all my needs. [02:27] tmzt_: anybody on dreamhost or another provider with fastcgi support [02:27] ckknight: anyone know a good way to have a per-request cache? such that a new Object is made for the request to stick data into and retrieve data out of that is not exposed cross-request and is destroyed once the request is complete. [02:28] ckknight: in-memory cache, I mean [02:30] gst has joined the channel [02:30] gst has joined the channel [02:33] tmzt_: ckknight: is not exposed cross-request? [02:33] tmzt_: you could probably have a singleton associative array based on conn.id [02:34] ckknight: two requests come in, each making async calls, I want to be able to at any time get some Object that acts as a cache for that specific request [02:34] ckknight: hmm, yeah, I could see that working [02:35] tmzt_: in node you get to build this stuff yourself, that's half the fun [02:40] TheIronWolf has joined the channel [02:41] gerad has joined the channel [02:41] MikhX has joined the channel [02:41] gerad has joined the channel [02:42] gerad has joined the channel [02:42] killfill has joined the channel [02:43] bingomanatee: The fact that node creates persistent processes make the act of aggregating requests pretty simple. [02:43] luke`_ has joined the channel [02:45] ryah: Requests per second: 656.54 [#/sec] (mean) [02:45] ryah: ^-- https hello world [02:46] wilmoore has joined the channel [02:46] broofa has joined the channel [02:47] cronopio: some recent tests https://gist.github.com/897613 [02:48] gst has left the channel [02:49] cronopio: no, no recent [02:49] cronopio: now are old i guess [02:50] bingomanatee: sweet. [02:51] jakehow has joined the channel [02:51] softdrink has joined the channel [02:51] noahcampbell has joined the channel [02:53] ckknight: hey, does v8 have a concept of stack overflow or does it determine that through a different mechanism? [02:53] ukev has joined the channel [02:54] piscisaureus: v8: function a() { a() }; a(); [02:54] v8bot: piscisaureus: RangeError: Maximum call stack size exceeded [02:55] DTrejo: ryah: do we have a list of links to the build bots and speed profiler bots etc? [02:55] DTrejo: (just wondering) [02:55] ryah: DTrejo: http://buildbot.nodejs.org/ [02:55] ryah: http://arlolra.no.de/ [02:56] softdrink: I read that as areola.no.de [02:56] softdrink: I giggled [02:56] k1ttty has joined the channel [02:56] wookiehangover has joined the channel [02:57] DTrejo: thanks! [02:57] muk_mb has joined the channel [03:00] ckknight: piscisaureus: well, I figured it'd have something, but it varies from implementation to implementation, so I'm wondering about v8. How many calls cause it to end up breaking? [03:00] jtsnow has joined the channel [03:00] isaacs: new `npm config ls` output: https://gist.github.com/897660 [03:00] piscisaureus: hmm I don't know [03:01] isaacs: so much better for me. [03:01] dominictarr has joined the channel [03:02] CaioAlonso has joined the channel [03:02] mbrochh has joined the channel [03:03] mike5w3c_ has joined the channel [03:03] piscisaureus: v8: var a = 0; function b() { a++; if (!(a%1000)) console.log(a); b(); } b(); [03:03] v8bot: piscisaureus: RangeError: Maximum call stack size exceeded [03:04] luke` has joined the channel [03:07] muk_mb: man, couchdb's pretty cool, but that rap song about it makes me want to punch people [03:08] Xelysium has left the channel [03:10] EyePulp has joined the channel [03:13] christopherbull has joined the channel [03:13] Tobsn: mscdex, https://gist.github.com/3d3021a5ffff1141e2ba [03:15] mike_miller has joined the channel [03:15] copongcopong has joined the channel [03:16] christopherbull: hey guys, i'm wanting to replicate some of the email posting functionality of something like posterous. basically i want to have node listen for incoming emails somehow and then take the content and put it into the database (escaped of course), what is the best way to do this? The domain that I want to listen on currently has google apps handling its email. is it best to use that to setup the address or should i avoid [03:16] christopherbull: that and use a local server to check mail and notify node. with GApps, i'm imagining i need to use something like node-imap to collect the messages, but is there a better way using local linux services? thanks [03:16] astropirate has joined the channel [03:17] konobi: christopherbull: Haraka? [03:18] christopherbull: konobi: can Karaka support incoming mail? their github page suggests outgoing only [03:18] mscdex: Tobsn: ? [03:19] christopherbull: *smtp, not specifically outgoing [03:19] mscdex: christopherbull: according to baudehlo the other day, i think it supports both [03:19] christopherbull: oh cool [03:20] gazumps has joined the channel [03:21] christopherbull: a more general question then, with the standard MX settings that GApps requires, is there a way to make 1 email address an exception to their routing, or should i host it on a subdomain? [03:22] unlink has joined the channel [03:23] Tobsn: mscdex, the titanium thing i was messing around with [03:23] Tobsn: tcp socket class/handler [03:23] DTrejo: christopherbull: what if you forwarded all the emails to your node server? [03:23] DTrejo: which has it's own mail recieving set up [03:24] christopherbull: DTrejo: yeah was just going to do that, just wondering if it could go direct [03:24] darshanshankar has joined the channel [03:24] yozgrahame has joined the channel [03:26] luke`_ has joined the channel [03:27] timmywil_ has joined the channel [03:29] Horofox has joined the channel [03:29] mbrochh]2 has joined the channel [03:33] wilmoore has joined the channel [03:33] ryanfitz has joined the channel [03:35] templaedhel has left the channel [03:35] patcito has joined the channel [03:35] christopherbull: has anyone used haraka? looks like it's only a couple of weeks old [03:36] sub_pop has joined the channel [03:38] ericzz has joined the channel [03:41] mhooker has joined the channel [03:42] piscisaureus has joined the channel [03:42] mscdex: Tobsn: yeah, does it work now? [03:42] mscdex: baudehlo: ping [03:42] RusAlex: guys, any help online or any library to get picture from external source and scale it with imagemagick ? [03:44] bitmonk has joined the channel [03:45] Horofox has left the channel [03:45] robfaraj has joined the channel [03:45] mcantelon_ has joined the channel [03:45] Horofox has joined the channel [03:48] deepthawtz has joined the channel [03:50] saschagehlich_ has joined the channel [03:51] rpflo has joined the channel [03:52] blkcat has joined the channel [03:54] robfaraj: this is non-office hr related, but I'm looking for some help [03:54] robfaraj: trying to run node.js on an interface that is not the primary IP on my server with the following... [03:54] robfaraj: var http = require('http'); [03:54] robfaraj: http.createServer(function (req, res) { [03:54] robfaraj: res.writeHead(200, {'Content-Type': 'text/plain'}); [03:54] robfaraj: res.end('Hello World\n'); [03:54] robfaraj: }).listen(80, "111.22.33.44"); [03:54] robfaraj: when i try to run this as myself I get 'EACCES, Permission denied' [03:55] robfaraj: when i try to run this as root I get 'EADDRINUSE, Address already in use' [03:55] robfaraj: however, netstat -ntlp confirms this interface is not listening on port 80 (or any port) [03:56] robfaraj: but I do see the interface in ifconfig [03:56] robfaraj: any ideas/ [04:03] jimt_ has joined the channel [04:04] matschaffer has joined the channel [04:05] beawesomeinstead has joined the channel [04:06] steph021_h has joined the channel [04:07] dnolen has joined the channel [04:08] jimt has joined the channel [04:10] gozala has joined the channel [04:11] Horofox has left the channel [04:11] Horofox has joined the channel [04:11] seivan has joined the channel [04:12] Tobsn: mscdex, yep pretty good [04:12] Tobsn: only thing that bugs is the disconnect(), it does close the socket but it still tries to reconnect and odly enough says the connection was established even if the server is not responding [04:13] Tobsn: and if you hit this.stop=true it wont go back into the reconnect process after doing a connect() on a dead server [04:13] Tobsn: which is kinda odd but its messy enough for now haha [04:13] mscdex: ah [04:14] Tobsn: but well... if you really want to kill the conncetion you can just a sock.disconnect(); delete sock; for now [04:14] Tobsn: as workwaround :P [04:16] pauls has joined the channel [04:17] rfay has joined the channel [04:20] mcantelon_: Anybody recommendations for an up-to-data tutorial on Mongoose? Trying to figure out from tests but it's slow going. ;) [04:21] mscdex: sounds like this titanium things needs more cowbell :) [04:22] drefined has joined the channel [04:22] abraham has joined the channel [04:28] Horofox: mcantelon_: oh [04:29] Me1000 has joined the channel [04:29] Horofox: mcantelon_: i have something for you [04:29] mcantelon_: ACTION pricks up his ears [04:29] tfe_ has joined the channel [04:29] tfe_ has joined the channel [04:29] mcantelon_: Horofox: :D [04:30] abraham has joined the channel [04:30] Horofox: mcantelon_: https://gist.github.com/877192 [04:30] Horofox: mcantelon_: dont copy and paste it, make sure u understand what ur doing and i think it will help you [04:31] EyePulp has joined the channel [04:31] mcantelon_: Horofox: Much thanks! [04:31] fairwinds has joined the channel [04:31] Horofox: mcantelon_: i had much trouble until i could "query" something in mongoose, and i can query now so like... i think it can help you [04:31] c4milo has joined the channel [04:31] Horofox: mcantelon_: if you are new to mongodb, open the terminal, type "mongo" and "use mydb" [04:31] Horofox: and then, help [04:32] mcantelon_: Horofox: Ah, very nice. [04:32] Horofox: and learn how to see data in ur documents and stuff, its helpful to see if ur stuff ir working [04:32] Horofox: is* [04:34] mcantelon_: Horofox: Works like a charm... db.posts.find() yields its fruits! [04:34] ckknight: is this the correct place to ask about connect or is there somewhere better? [04:34] Horofox: mcantelon_: glad it was useful for you :) [04:35] mcantelon_: ckknight: This is probably a good place. :) [04:36] ryanf_ has joined the channel [04:36] ckknight: okay, in connect.router, when it can't find a route, why does it pass it to next() instead of firing a 404 or a 405? [04:36] piscisaureus has joined the channel [04:37] bingomanatee has joined the channel [04:37] mcantelon_: ckknight: That's to give the next piece of middleware a chance to deal with the request. [04:38] c4milo has left the channel [04:39] jenocin has joined the channel [04:40] konobi: openssl win? [04:41] sonnym has joined the channel [04:42] muk_mb1 has joined the channel [04:43] ckknight: when you want to return multiple values from a function, is it more appropriate to return an Object or an Array? [04:44] mike_miller: don't return values, use callbacks! :) [04:44] ROG has joined the channel [04:44] mike_miller: in all seriousness, whatever suits your problem the best. [04:44] bren has joined the channel [04:46] neorab has joined the channel [04:48] wasabista has joined the channel [04:48] Clooth has joined the channel [04:49] gazumps has joined the channel [04:52] [tm] has joined the channel [04:53] briznad has joined the channel [04:54] kriszyp has joined the channel [04:54] muk_mb1 has left the channel [04:55] javaanse_jongens has joined the channel [04:57] briznad has joined the channel [04:59] SamuraiJack has joined the channel [05:02] blkcat has joined the channel [05:02] blkcat: hm, running into some strange issues building on debian x64 [05:02] mscdex: gcc 4.6? [05:02] mscdex: or 4.5? [05:02] mscdex: :P [05:03] blkcat: 4.4.5 [05:03] mscdex: ah ok [05:03] mscdex: what's the problem? [05:03] blkcat: looks like gcc is eating up all available memory and then getting killed [05:03] mscdex: can you gist the output? [05:04] blkcat: sure, one moment [05:06] bitmonk has joined the channel [05:06] sreeix has joined the channel [05:07] k1ttty_ has joined the channel [05:13] blkcat: mscdex: https://gist.github.com/413138509adacb687dd6 [05:13] isaacs has joined the channel [05:13] DTrejo: OMG RYAH, I HAZ GRAPHZ FOR YOU! http://jsfiddle.net/dtrejo/RAayN/9/ [05:14] ryah: :) [05:14] mike5w3c has joined the channel [05:14] jakehow has joined the channel [05:15] DTrejo: I should convert bytes to MB [05:15] mscdex: blkcat: huh.... i've never run into that before [05:15] mscdex: or seen that [05:15] blkcat: yeah. :\ [05:16] mscdex: is this your own system or a cloud server? [05:16] blkcat: mscdex: linode - i had node running fine on a debian i386 build but installed the x64 image for mongodb [05:16] mscdex: ryah: what about nodejs.debuggable.com ? :p [05:19] hammerdr has joined the channel [05:19] DTrejo: ryah: now it uses MB: http://jsfiddle.net/dtrejo/RAayN/10/ [05:20] blkcat: hum. [05:20] blkcat: maybe i should just go back to i386. [05:20] hammerdr: I think I might be going crazy. I ran npm install coffee-script. It installs. I launch the repl and require('coffee-script') and it can't find it. Anyone know what might be up? [05:20] isaacs: hammerdr: what version of npm? npm -v [05:20] hammerdr: 0.3.18 [05:20] marcosvm has joined the channel [05:21] isaacs: hammerdr: npm config get root [05:21] hammerdr: 0.4.4 of node [05:21] hammerdr: /usr/local/lib/node [05:21] themiddleman has joined the channel [05:21] isaacs: echo export NODE_PATH=/usr/local/lib/node >> ~/.bashrc ; . ~/.bashrc [05:22] isaacs: ACTION can't wait for 1.0 to be the default. [05:23] blkcat: ryah: don't suppose you'd have any insight on this? [05:23] hammerdr: default of what? [05:24] hammerdr: Also, that fixed it. Did NODE_PATH become required recently? [05:24] ryah: blkcat:I don't know... [05:26] gazumps has joined the channel [05:28] ckknight: What'd be the best way to test a connect middleware I'm making? [05:29] bartt has joined the channel [05:29] samcday: ckknight: Aren't you the dude who developed like half of the wow addons that exist today? o.O [05:29] ckknight: I also made wowace and curseforge and the like. [05:29] samcday: Well then! [05:30] ckknight: and numbers-wise, I only made about 80 addons/libraries [05:30] samcday: ONly :P Didn' you make fubar though [05:30] ckknight: but that makes up 8% of the entire addon popularity, mind you [05:30] ckknight: samcday: among others [05:30] ckknight: now I'm playing with node.js ;-) [05:30] samcday: haha nice. [05:31] samcday: Take a look at the connect tests on github [05:31] samcday: They have a nice little framework that uses a node httpclient to unit test middleware [05:31] samcday: Run assertions on status/headers/response body, and the like. [05:31] ckknight: ah, I see, I just wasn't looking in the right place [05:32] ckknight: I'm working on a URL router that's a bit more ...advanced compared to the current solutions [05:32] raidfive has joined the channel [05:32] samcday: ckknight, Nice :) More advanced than express? In what way? [05:33] unlink has joined the channel [05:33] mape: http://blog.mrale.ph/post/4217120977/improved-v8-external-arrays-support-and-nodejs-buffer [05:33] mape: Is that coming to core? [05:34] ckknight: the declarations are gonna be a bit different, more suited to real development. Also it will provide url generation as well as the standard routing [05:34] ckknight: also, I plan on having it be extremely performant [05:35] ryah: mape: not until v0.5 [05:35] mape: k [05:35] ryah: we're sticking with v8 3.1 for node v0.4.x [05:35] draginx: when is 0.5 coming out? :( [05:35] samcday: ckknight, Sounds awesome! [05:36] ckknight: I do web development for my grown-up job, so I wanna take some of the things I've learned to that and apply it to node.js [05:36] mscdex: ryah: d'oh.. so freebsd will be borked until 0.5? [05:37] ryah: they backported the freebsd fixes for us to 3.1 [05:37] ryah: i just landed them today [05:37] mscdex: oh? [05:37] blkcat: phew, think i've fixed it now. [05:37] ryah: mscdex: https://github.com/joyent/node/commit/6631983dd1a7e82d14a27e9be856b65e58f19393 [05:38] mscdex: ah, nice [05:39] DTrejo: ryah: would you like me to put that graph somewhere? other than the fiddle? (where would be a good spot?) [05:39] ryah: DTrejo: yeah, save it - *shrug* [05:39] ryah: twitpic? [05:40] DTrejo: hmm, ok [05:40] ryah: post it to the mailing list? [05:40] DTrejo: oh! [05:40] DTrejo: yes [05:40] draginx: isaacs: do u use semicolons or not? :P [05:41] gundas has joined the channel [05:44] jesusabdullah: I like to mix and match [05:44] jesusabdullah: I use them artistically [05:45] mscdex: draginx: you have to ask him that? heh [05:47] joshthecoder: ryah: sent a few fixes for libol on mac [05:47] joshthecoder: curse apple for not implementing strnlen! [05:49] draginx: mscdex: just saw it on his posts and i couldnt tell from his post whether or not he does ;x [05:49] draginx: it just raised a question for me since i use semicolons but are they completely unecessary O_o [05:49] ryah: joshthecoder: oh, thanks! [05:49] samcday: jesusabdullah, Personally, I use them to express myself in a unique and individual way [05:49] joshthecoder: ryah: should probably just pass the length explicitly to ol_write2 [05:50] samcday: ACTION flicks emo fringe to the side [05:50] brianmario has joined the channel [05:51] wilmoore has joined the channel [05:51] mbrochh has joined the channel [05:52] dk00 has joined the channel [05:53] joshthecoder: ryah: would it be crazy to implement a backend for apple using CF's runloop? I mainly suggest it to make it easier to embed into a cocoa app [05:54] joshthecoder: I have a use case for node where I need it running together w/ CF's runloop in the same thread [05:54] joshthecoder: it seems pretty hard w/o major hacking to make it work w/ libev [05:54] DTrejo: ryah: posted :) http://groups.google.com/group/nodejs-dev/browse_thread/thread/18a5fe2c59527359 [05:54] ryah: CF? [05:54] joshthecoder: corefoundation [05:55] ryah: would be awesome for libol [05:55] joshthecoder: example: http://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CFRunLoopRef/Reference/reference.html [05:55] ryah: thanks [05:55] joshthecoder: can't be much worse than select() [05:55] joshthecoder: plus kqueue is buggy as hell I hear [05:55] gr3at has joined the channel [05:55] gr3at: Hi all! [05:55] ryah: joshthecoder: oh man - that would be awesome. [05:55] draginx: Who takes care of the 0.4.4 docs? Annnnd how can I get user input? from command line/running the script? [05:55] ryah: joshthecoder: we should at least make sure that ol's api can support htis [05:56] joshthecoder: ryah: consider it done :) [05:56] ryah: joshthecoder: so that even if we don't do it we can do it eventually [05:56] joshthecoder: well it's not done yet, but I'll work on it ;) [05:56] joshthecoder: ryah: sure [05:56] ryah: joshthecoder: tell me how sockets work there? [05:56] DTrejo: draginx: I kinda do, kinda. micheil does mostly though [05:57] joshthecoder: I am not a complete expert, but basically you create a CFSocket object then from that you can get a source object to add to the run loop for watching it [05:57] gr3at: Is it possible to do searches of a string based on keywords and return the results in an array. For example I have the following scenarios http://pastie.org/1742522 - is there a package already available for this? [05:57] DTrejo: draginx: you want to read about readline [05:57] DTrejo: draginx: which may not be documented.. maybe [05:57] ryah: joshthecoder: drool [05:58] ryah: joshthecoder: i had forgotten about this important event loop [05:58] DTrejo: draginx: https://github.com/cloudhead/http-console/blob/master/lib/http-console.js ctrl-f "readline" [05:58] draginx: lol yer ill look it up :) [05:58] gwm__ has joined the channel [05:58] ryah: how awesome would that be if we could set node on the actual CF event loop? [05:58] ryah: i be that'd make apple programmers happy [05:59] joshthecoder: ryah: my goal is to prototype a UI module for node to create desktop apps [05:59] jimt_ has joined the channel [05:59] joshthecoder: (working prototype for a possible Titanium 2.0) [06:00] joshthecoder: I really love node and it would be a big win for us to re-use the code instead of rolling our own v8 impl [06:01] draginx: TypeError: Object # has no method 'on' how does readline not have on :O [06:01] joshthecoder: we currently run on webkit's JSC w/ our own bindings into Poco (yuck!) [06:02] draginx: nvm [06:02] rchavik has joined the channel [06:02] bitmonk has joined the channel [06:02] DTrejo: draginx: what are you making? [06:02] NuckingFuts: I am so using NodeJS in a prank for tommorrow. [06:02] sreeix has joined the channel [06:03] andrewfff has joined the channel [06:03] NuckingFuts: Gonna rename every folder on our school's communal network drive to end with 's and a type of porn :P [06:03] mscdex: a prank where the other person creates something really cool and is productive? [06:03] mscdex: :P [06:03] ckknight: What should I call my routing library? [06:03] skm has joined the channel [06:03] NuckingFuts: I think this ought to be entertaining as the school freaks the fuck out. [06:03] mscdex: you got to be NuckingFuts to do something like that [06:04] mscdex: :-D [06:04] draginx: DTrejo: just a Team America script ;x [06:05] joshthecoder: ckknight: YANRL [06:05] DTrejo: draginx: nice, show it to me when you're done, maybe use it as an example in the readline docs [06:05] joshthecoder: yet another node routing library :) [06:05] DTrejo: draginx: if you feel like writing them :) [06:05] ckknight: joshthecoder: I would except for my disdain of acronyms [06:05] mscdex: node-ckknightrouter! [06:05] mscdex: :P [06:05] draginx: DTrejo: I use "Fuck yeah!" a lot ;x [06:06] ckknight: I'm currently calling it ckknight-routing :P [06:06] draginx: Going to pull random quotes though, etc. [06:06] ckknight: which feels kinda blah [06:06] DTrejo: mscdex: WRONG --> node-ckknightrouter.js [06:06] mscdex: that's the filename! [06:06] mscdex: ;) [06:06] DTrejo: :) [06:07] jimt has joined the channel [06:07] mscdex: yeahhh grappler win \o/ almost finished with youknow [06:09] CrypticSwarm has joined the channel [06:09] mscdex: i think it ought to be finished before monday [06:09] mscdex: node.js rules! [06:11] beckje011 has joined the channel [06:11] matjas has joined the channel [06:11] blkcat: yes it does. :) [06:12] skm has joined the channel [06:12] joshthecoder: ryah: will libol handle just sockets or do you plan on putting file asyc I/O abstraction in there as well? [06:14] kaiwren has joined the channel [06:15] mikeal has joined the channel [06:15] ryah: joshthecoder: yes, files, timers [06:16] joshthecoder: guessing for the libev backend will be paired with libeio? [06:18] ryah: joshthecoder: exactly [06:19] mscdex: blkcat: what did you end up having to do to fix your issue? [06:20] abraham has joined the channel [06:21] jimt_ has joined the channel [06:21] blkcat: mscdex: it appears to have been a permissions issue - not sure how it cropped up but i was able to take care of it. [06:22] micheil has joined the channel [06:22] perezd has joined the channel [06:22] mscdex: ok cool [06:23] joshthecoder: oh good CFFileDescriptor can provide a loop source for file watching :) [06:23] joshthecoder: this CF backend might just work out [06:23] ryah: does it work on regular files? [06:24] joshthecoder: yeah you just pass it a FD to create it [06:27] ryah: joshthecoder: should probably just #ifdef strnlen [06:27] ryah: er #ifndef [06:28] joshthecoder: ryah: yeah that should be fine [06:29] ryah: joshthecoder: do you not have __unix__ or __POSIX__ ? [06:29] muhqu has joined the channel [06:29] ryah: can you paste me gcc -ansi -E -dM - < /dev/null [06:29] joshthecoder: nope, it went straight for the ol-win.h [06:29] brianc has left the channel [06:30] joshthecoder: ryah: https://gist.github.com/cb5f86fc91f81c5d7b7a [06:30] ryah: thankis [06:31] dgathright has joined the channel [06:31] dk00 has joined the channel [06:32] Twelve-60 has joined the channel [06:32] e40020 has joined the channel [06:34] yrbe has joined the channel [06:34] tim_smart has joined the channel [06:35] yrbe has left the channel [06:36] gst has joined the channel [06:36] ckknight: anyone know why expresso doesn't give me my results until I ctrl-C? [06:37] gst has left the channel [06:37] tim_smart: ckknight: You have some things in a beforeExit and you have a open connection somewhere? [06:38] tim_smart: Use the --serial mode for most node.js testing [06:39] ckknight: oh, would a setInterval keep things open? [06:39] ckknight: that was totally it [06:39] ckknight: damn, not sure how to test this, then. [06:39] ckknight: I want to clear a cache every minute [06:40] visnup has joined the channel [06:41] CIA-1: node: 03Ryan Dahl 07v0.4 * r5c35dff 10/ (src/node_crypto.cc src/node_crypto.h): Don't load root certs for each SSL context - http://bit.ly/dHGckx [06:41] ryah: ^-- huge bug [06:42] wao: yay [06:42] qFox has joined the channel [06:42] isaacs: ryah: w00t [06:43] tim_smart: ryah: :D *blows the end of a smoking barrel* [06:43] yrbe has joined the channel [06:43] dgathright has joined the channel [06:45] blkcat: nice, haha. [06:47] emattias has joined the channel [06:48] jimt has joined the channel [06:49] joshthecoder: ryah: ol-unix.c -> ol_err_last is that a mistype or am I missing something here? [06:49] FMJag has joined the channel [06:49] joshthecoder: should that be ol_last_error() [06:50] ineation has joined the channel [06:51] ryah: joshthecoder: the error stuff isn't done yet in unix [06:53] sreeix_ has joined the channel [06:53] kaiwren has joined the channel [06:53] jimt_ has joined the channel [06:53] joshthecoder: gotcha [06:54] mikeal has joined the channel [06:54] skm has joined the channel [06:54] joshthecoder: working on a quick proof of concept for a CF backend before bedtime, was just looking the module over to see what needs coding and couldn't find those imps :) [06:55] groom has joined the channel [07:00] makuchaku has joined the channel [07:00] skm has joined the channel [07:02] gozala has joined the channel [07:04] mjr_ has joined the channel [07:05] mytrile has joined the channel [07:05] droops has joined the channel [07:05] andrewfff has joined the channel [07:05] fangel has joined the channel [07:06] adambeynon has joined the channel [07:07] yrbe has left the channel [07:08] emattias has joined the channel [07:08] mraleph has joined the channel [07:14] atiti has joined the channel [07:14] kristsk has joined the channel [07:19] mAritz has joined the channel [07:21] isaacs: ckknight: hey [07:21] ckknight: howdy, isaacs [07:21] ckknight: how's life treating you? [07:21] isaacs: ckknight: rather than setInterval to clear the cache, why not just clear it every time it's read, if it's over a certain amount of time? [07:21] isaacs: great [07:21] ckknight: oh, good point. [07:22] seivan has joined the channel [07:26] ajnasz has joined the channel [07:27] synisma has joined the channel [07:27] eschnou has joined the channel [07:28] synisma has joined the channel [07:30] kal-EL_ has joined the channel [07:30] msucan has joined the channel [07:30] [AD]Turbo has joined the channel [07:31] [AD]Turbo: hi there [07:33] tim_smart: ckknight: Node excels at evented "on-demand" things. So things like expiring caches etc can be approached differently than if you would Python, PHP or Ruby [07:33] kuebk has joined the channel [07:34] ckknight: tim_smart: okay then, so any insight as to how to do what I'm doing better, then? [07:34] ckknight: or is isaacs's advice sound? [07:35] ryah: ckknight: fs.watchFile [07:35] bergie has joined the channel [07:35] ryah: which on everything but linux - is actually a timer... [07:35] ckknight: I'm not doing any file stuff, ryah [07:36] ryah: oh sorry [07:36] isaacs: ckknight: this might come in handy: https://github.com/isaacs/node-lru-cache [07:36] isaacs: ckknight: it's reasonably efficient, though not optimized to absurdity [07:37] ckknight: my current thing is just a simple string-to-object map that clears out every 60 seconds [07:37] dxgriffiths has joined the channel [07:37] isaacs: ckknight: good when you have a fairly stable record size, and want to have a maximum number of records that you hold onto [07:37] ckknight: trying to be as efficient as possible for this [07:37] isaacs: ckknight: yeah, an lru is good there. [07:38] isaacs: ckknight: a less computationally expensive approach would be a hash table where you delete x% of the records whenever it hits a certain size. [07:38] isaacs: also, that lru-cache could probably be simplified somewhat to use a linked list instead of a hash [07:39] ckknight: the idea is: say you have a route that is "/users/:user", if someone visits "/users/ckknight", then a regex needs to be run to calculate out the callback you're going to as well as {user: "ckknight"}. On the second pass of visiting "/users/ckknight", you could simple look up the cache for that specific url and know that it's someCallback, {user: "ckknight"} [07:39] ckknight: it becomes more crucial once you hit more routes (as can be very likely in large apps) [07:39] ckknight: at work (not a node.js project), we have over 700 routes [07:39] brianmario has joined the channel [07:40] ckknight: I also do other various optimizations to minimize regex tests [07:40] stonebranch has joined the channel [07:40] isaacs: ckknight: 700 is not large. [07:40] isaacs: i guess, if you have 10k rps or something, sure, 700 might seem big [07:40] ckknight: isaacs: doing 700 regexes per request can be a real burden when trying to get sub-5ms times. [07:40] isaacs: right [07:41] isaacs: the problem is using regexps for routes ;) [07:41] sigue has joined the channel [07:41] ckknight: you have a better solution? [07:41] isaacs: just route based on pathparts [07:41] isaacs: `/page/:pagenum` [07:42] isaacs: "/page/:pagenum" : function (req, res, pagenum) { ... } [07:42] isaacs: or something [07:42] Kingdutch has joined the channel [07:43] isaacs: then you can optimize by splitting each one on "/", and split the request.url as well. string === comparisons are super cheap, and if charAt(0) === ":" then you know it's a var [07:43] isaacs: that's how couchdb does rewrites. it's a bit restrictive, but i've come to enjoy it. [07:44] raphdg has joined the channel [07:44] V1 has joined the channel [07:45] jan____ has joined the channel [07:45] ckknight: Well, my implementation has it so that if it's a static route, it goes into one map, if it's a dynamic route, then it's put into a heap which is sorted based on static prefix, so if you have "/some/big/route/:dynamic", it'll first check if it matches "^/some/big/route/", and if so, check the other regexes. This tends to cut down on a lot of processing in the general case. Then for each prefix, it goes through all the rout [07:46] kmiyashiro has joined the channel [07:46] ckknight: also, I definitely want to support having "/" inside of a slug, which I have needed in the past and see needing again. [07:46] jan____ has joined the channel [07:46] troessner has joined the channel [07:46] Wavyx has joined the channel [07:46] visnup has left the channel [07:48] sigue has joined the channel [07:50] isaacs: ckknight: you can get around that by first sorting the routes by length [07:50] isaacs: ckknight: if it matches a longer route, then use that instead. [07:50] ckknight: I do that. [07:50] ckknight: and really, it's a way to cut down from potentially 700+ regexes to doing 30 maximum [07:50] isaacs: so if you have: /foo/:bar/baz and /foo/:bar then "/foo/1234/baz" would match the first [07:50] ckknight: yep, I do that. [07:50] ckknight: :) [07:51] isaacs: for slugs with / in them, you could either a) not do that, because really, you don't have to, or b) define a new magic char besides : that means "swallow the rest" [07:52] isaacs: if you are able to chop the problem down from "match a regexp" to "compare these two short strings against one another", you will win a lot. [07:52] ckknight: nah, I also want to specify specific regex constraints, so that /blah/:num and /blah/:slug can map to two distinct routes [07:52] isaacs: does that logic really need to be in your routing table, though? i mean, is it worth the overhead of having to use regexps there? [07:52] ckknight: which is doable if they have distinct regexes for each part [07:52] ckknight: sure is. [07:53] FireFly has joined the channel [07:53] ckknight: the efficiency of regexes is acceptable in that case [07:53] isaacs: you could probably even solve that by having nested routing, and still using strings-only at the top level [07:54] ckknight: I have implicit nested routing taken care of for me, since I split up all my routes by their static prefixes [07:54] isaacs: "/blah/:thing" : function (req, res, thing) { route( {pattern:/\/blah\/[\d]+$/, function (req, res, ...) { ... }, ... }, req, res) } [07:54] L_star has joined the channel [07:55] isaacs: or even just put a typeof in your handler. [07:55] isaacs: or an isNaN, i guess [07:57] AAA_awright: There has to be a multi-pattern-matching regex lib that can efficently match a number of regular expressions at once, or tree out which one to match. Like a btree. [07:57] tbassetto has joined the channel [07:59] luke` has joined the channel [08:00] isaqual has joined the channel [08:01] zomgbie has joined the channel [08:01] Druide_ has joined the channel [08:02] mape: is regex performance really an issue in routes? [08:02] ckknight: mape: if you have a small amount of routes, no. [08:02] ckknight: if you have a large amount, yes, it can be. [08:04] mape: Did a rewrite test not to long ago, I could do 17,900,000 regex matches for complex paths in 3.4sec [08:05] mape: So more or less 5 route regexes per ms [08:06] meso_ has joined the channel [08:06] ehedenst has joined the channel [08:07] ehedenst: join #jquery [08:07] mape: I don't wanna [08:07] ehedenst: :) [08:08] ehedenst: haven't had my coffee yet [08:08] teemow has joined the channel [08:09] herbySk has joined the channel [08:12] phluffy has joined the channel [08:12] tmzt_: ckknight: something with plurals like rails for REST/json ? [08:13] ckknight: tmzt_: referring to the lib I'm making? You'll be able to specify your own route names, so it'll be whatever you want it to be. [08:13] astropirate has joined the channel [08:13] tmzt_: can you give an example? [08:13] liquidproof has joined the channel [08:14] tmzt_: I'm looking for something that would make it easy to expose ORM backed objects with REST [08:14] ckknight: uh, okay then [08:14] ckknight: note that none of this is finalized. [08:15] tmzt_: understood [08:18] ckknight: routing(function(routes) { app.url = routes.url; routes.bind("posts", "/posts", { get: function(req, res) { }, post: function(req, res) { } }); routes.bind("post", "/posts/{postID:int}", { get: function(req, res, params) { }, put: function(req, res, params) { } }); }); app.url.posts() == "/posts"; app.url.post(5) == "/posts/5"; app.url.post({postID: 5}) == "/posts/5" [08:18] ckknight: on the ones with params, params.postID === 5, not "5" [08:18] johnnywengluu: anyone using http://nowjs.com/ ? [08:19] ckknight: the :int modifier forces it to be match an integer and also parses the result as an integer. I'll make it so you can supply custom converters at whim. [08:20] tmzt_: what about something like :postID(:int) ? [08:20] beginner_ has joined the channel [08:20] tmzt_: I think we we're talking about adding better capture groups support to express earlier [08:20] beginner_: hi any one here to help me:) [08:20] tmzt_: beginner_: just ask [08:20] ckknight: beginner_: don't ask to ask, just ask [08:21] beginner_: 1. faye vs socket.io vs now [08:21] tmzt_: there's also dnode [08:21] aklt has joined the channel [08:21] V1: now is a socket.io wrapper, so you can remove that [08:21] V1: ;D [08:21] tmzt_: faye is cool, it's a comet implmentation, not really useful for a single client though, more of a pub sub [08:22] ckknight: tmzt_: that syntax rubs me the wrong way, especially since I plan on adding stuff like {postID:int(min=0)} or something [08:22] beginner_: so the best real time libs are faye and socket io? [08:22] tmzt_: ah [08:22] beginner_: as u guys are mroe exped which lib wud u guy used [08:22] tmzt_: why are you using ==? that's just for the example? [08:22] beginner_: im looking for a p2p and s2p communication [08:22] beginner_: very very new to node [08:23] tmzt_: I like the idea of having app.url() [08:23] beginner_: im a mootools guy with good php knowledge :) [08:23] ckknight: tmzt_: yeah, just to show you, I always use === in my code :P [08:23] ckknight: tmzt_: url's just an object, not a function [08:23] V1: beginner_: there are only 2 "good" core realtime libs, faye and Socket.IO.. But there are always libraries that provide some sort of abstraction on top of them. Like dnode and now.js are doing with Socket.IO [08:23] ckknight: tmzt_: a big problem with the routing libs that I've seen is that it's one-way, I need it to be two-way. [08:24] tmzt_: I mean something like app.url('/posts', {}) [08:24] tmzt_: that way you can have a default for the standard implmentations [08:24] ckknight: what's the point of that? [08:24] beginner_: v1 if u are to decide on one .. which one would u go and why ? [08:24] tmzt_: beginner_: use what fits the use case [08:24] ckknight: tmzt_: the idea is to be able to retrieve routes by name without knowing their exact urls. It becomes more important as you get into deep paths. [08:25] tmzt_: yes [08:25] V1: My opinion is biased anyways as I'm of the contributors for Socket.IO [08:25] tmzt_: then you have the app.url('posts', 5) or whatever but I guess that would be a problem [08:25] beginner_: even im biased to socket.io :) but hearing a lot about faye [08:25] ckknight: why not app.url.posts(5)? no need for pseudo-magic strings [08:25] tmzt_: I need that in jade, something I really like about rails [08:25] tmzt_: hmm [08:26] tmzt_: so this is a new routing framework, not build on express? [08:26] V1: The biggest reason to choose socket.io of faye is that Socket.IO supports allot fallback transports to provide the most optimal realtime connection to the server. [08:26] ckknight: it's built on connect [08:26] ckknight: and I plan to have it so it works with express [08:26] beginner_: ok :) thats great insight [08:26] ckknight: the goal is to be able to drop it in as a replacement for connect.router [08:26] tmzt_: that's the thing, I really only need better routes for my REST stuff [08:26] beginner_: and any of you guys using ec2 for node ? [08:26] tmzt_: the stuff that renders is just fine [08:27] ckknight: tmzt_: you're saying you don't need the URL generation? [08:27] tmzt_: beginner_: I'm experimenting with something that lets you host node pretty much anywhere you cna host php [08:27] tmzt_: ckknight: I do, but only in jade [08:27] tmzt_: but I"m only talking rest from js [08:27] ckknight: tmzt_: of course, that's where it's going to occur. [08:27] tmzt_: ckknight: where are you hosted now? [08:27] ckknight: unless you have certain partials defined in pure JS for some reason (which is generally bad practice) [08:28] tmzt_: oops [08:28] tmzt_: beginner_: [08:28] ckknight: but nearly all the URLs generated will be in views or possible in certain JSON objects or something [08:28] beginner_: yeah but scaling the app is a big headache and have very bad exps before with scaling php apps [08:28] beginner_: we are trying to put a architecture in place [08:28] tmzt_: ckknight: I am working on some stuff that would allow the same routing to be used on client and server, so it could do js partials [08:28] beginner_: 1. php server just doing computing [08:29] errumm has joined the channel [08:29] beginner_: 2. db layer (mysql /nosql) [08:29] beginner_: 3. cache layer [08:29] ckknight: tmzt_: ooh, I like that idea [08:29] beginner_: 4. real time layer [08:29] tmzt_: ckknight: so I'm trying to adapt express to browserify, with the "requests" being local to the machine [08:29] tmzt_: for this having a function for urls is crucial [08:30] tmzt_: though I'm actually okay with just trapping #whatever or /whatever like sammyjs [08:30] ckknight: why is it crucial? [08:30] ckknight: couldn't you generate a urls object that has the functions defined inside? [08:30] tmzt_: cleaner, you can quietly replace the real url with javascript or add the listener automatically [08:31] ckknight: if you want to hook into it, just loop over urls [08:31] tmzt_: I like the convention that express uses, that's why I'm saying app.url() [08:31] tmzt_: yeah, you can do that already $('a') [08:31] ckknight: magic strings in views rub me the wrong way [08:31] tmzt_: why do you keep saying magic strings? [08:32] ckknight: because '/posts' is magic when it's not in the context of its definition [08:32] tmzt_: it is, when js is disabled it falls back to a GET [08:32] ajnasz has joined the channel [08:33] tmzt_: the goal is to have the resulting page rendered exactly the same way when done on server or client [08:33] tmzt_: client should at least feel faster because the partial is retrieved [08:34] ckknight: I get what you're saying, and I'm telling you, magic strings are bad. [08:34] ckknight: ;P [08:34] tmzt_: what I'd really like to see though is something that exposes a mongo/sequolous collection as a REST route [08:34] ckknight: that seems easy enough. [08:34] pdelgallego has joined the channel [08:35] tmzt_: yeah, but express doesn't have it [08:35] ckknight: just define a resource function, pass in the model and the base route, do some behind-the-scenes coolness, and bam, free JSON routes [08:35] tmzt_: so I write app.get().. app.post() app.put(':id') etc. [08:35] tmzt_: right [08:35] ckknight: not as though it's hard to write a wrapper to do that for you [08:35] tmzt_: and even get rendering for free, though my json's are all under /apis/v0 and end in .json [08:36] tmzt_: no, I should probably do that [08:36] tmzt_: it's just been easier to write them out long so far [08:36] robhawkes has joined the channel [08:37] ckknight: I wouldn't do your json stuff like that [08:37] potomak84 has joined the channel [08:37] ckknight: why not just check the accept header? [08:38] jonaslund: omg.. [08:38] jonaslund: http://img.thedailywtf.com/images/201103/thumbdrive.jpg <- i'm so glad i'm not doing support :) [08:38] tmzt_: ckknight: browser compatibility, and I want the API to be public someday [08:38] tmzt_: it's modeled on twilios [08:38] jonaslund: (why a thumbdrive didn't work) [08:38] jeremyselier has joined the channel [08:39] ckknight: tmzt_: browser compatibility? [08:39] ckknight: tmzt_: what browser can't send an Accept header? [08:39] tmzt_: from XHR? [08:39] julienXX has joined the channel [08:39] ckknight: tmzt_: yeah, even IE6 can do that. [08:39] potomak84: hi [08:39] tmzt_: jonaslund: fry it [08:40] potomak84: do you know about a C binding for node of sox and ffmpeg? [08:41] jonaslund: potomak84: what do you need to do with ffmpeg ? [08:41] tmzt_: potomak84: ffserver is probably a good choice, it's all c though [08:41] potomak84: I'd like to use it to encode and decode audio streams [08:42] potomak84: than mixing them together using sox... [08:42] potomak84: I'd like to get a starting point to create a node addon [08:43] sjbreen has joined the channel [08:43] potomak84: I've red this documentation: http://nodejs.org/docs/v0.4.2/api/addons.html [08:43] tmzt_: why not gstreamer bindings? [08:43] tmzt_: at least that makes sense in an event context [08:44] jonaslund: or pipe data through an ffmpeg process ? [08:44] potomak84: ok... i'm here to get some hints about doing it or not... [08:44] tmzt_: just audio? what formats? [08:45] seivan: man [08:45] seivan: Dodged a bullet [08:45] potomak84: just audio... [08:45] bzinger has joined the channel [08:45] seivan: Convinced a CTO to let us use Node instead of PHP or .NET [08:45] tmzt_: yeah! [08:45] ErikCorry has joined the channel [08:45] jonaslund: seivan: now just don't muck up the project [08:46] potomak84: the pipe could be a solution, thanks... [08:46] jonaslund: it'll probably be alot faster than making a C binding [08:46] jonaslund: (coding wise) [08:46] tmzt_: potomak84: dig into ffserver, you should find what you need there [08:46] tmzt_: get that to listen on a pipe for one of the streams, or both [08:46] seivan: jonaslund: muck up? [08:47] tmzt_: fail to execute effectively [08:47] potomak84: thanks for your help guys [08:48] jonaslund: potomak84: if you notice it being slow later.. look into the V8 embedders guide aswell as that addon page. also i think the msgpack bindings can be a good example [08:48] littke has joined the channel [08:50] pdelgallego_ has joined the channel [08:52] potomak84: jonaslund: ok, I'll look into it to get the difference between embedders and addons [08:52] jonaslund: potomak84: the embedders guide is related to the V8 javascript engine that underlies Node [08:52] jonaslund: potomak84: it should give you all the info on talking between C and JS [08:53] potomak84: ok! [08:53] jonaslund: potomak84: but the node parts of the docs (and example) is good to follow to make sure everything works asynchronously [08:53] meso_ has joined the channel [08:53] jonaslund: try using a pipe first.. bugs in the JS/C++ bindings could be insideous if you don't have much C++ experience [08:54] potomak84: yes this is my fear... [08:54] potomak84: than +1 for pipes! [08:54] potomak84: thanks again... [08:54] jonaslund: np [08:56] potomak84 has left the channel [08:57] indutny has joined the channel [08:58] Aaron has joined the channel [08:58] beginner_: aaron from mootools [08:58] Guest80994: Nope, proxlet [09:00] void__ has joined the channel [09:00] indutny has joined the channel [09:02] FireFly|n900 has joined the channel [09:03] sveisvei has joined the channel [09:04] dcelix has joined the channel [09:08] jetienne has joined the channel [09:09] hellp has joined the channel [09:10] d0k has joined the channel [09:12] Twelve-60 has joined the channel [09:12] markwubb_ has joined the channel [09:16] johnnywengluu: can a browser have 2 or more websocket connections to multiple websocket servers? [09:19] konobi: johnnywengluu: tias? [09:20] jetienne: johnnywengluu: yes [09:20] BigWookie has left the channel [09:20] johnnywengluu: tias mean? [09:20] tmzt_: any limit might be in the number of TCP connections per domain in different browsers [09:20] tmzt_: but if they support websocket they probably allow enough connections anyway [09:21] tmzt_: really hope that muxing gets into the spec with a clean js api [09:21] unlink has joined the channel [09:21] unlink has joined the channel [09:22] johnnywengluu: ok [09:22] johnnywengluu: thanks [09:26] johnnywengluu: anyone from nodejitsu here? [09:27] beawesomeinstead has joined the channel [09:29] xla has joined the channel [09:29] Charuru has joined the channel [09:30] beawesomeinstead has joined the channel [09:30] beawesomeinstead has joined the channel [09:31] Gruni has joined the channel [09:38] asabil has joined the channel [09:40] davidcoallier has joined the channel [09:40] ckknight: is there an equivalent of encodeUriComponent available in node.js? [09:42] markwubben has joined the channel [09:42] MrTopf has joined the channel [09:44] mc_greeny has joined the channel [09:45] kuebk: is there a equivalent of $_GET/$_POST in node? [09:46] bingomanatee has joined the channel [09:49] luke` has joined the channel [09:53] FireFly|n900 has joined the channel [09:53] ehedenst has joined the channel [09:55] d0k has joined the channel [09:56] beawesomeinstead has joined the channel [09:57] samcday: ckknight, encodeUriComponent is available in Node, it's a JS standard builtin, thus it's in V8 [09:57] ckknight: doesn't appear to exist for me. [09:57] beawesomeinstead has joined the channel [09:58] liar has joined the channel [09:58] mikegerwitz: kuebk: $_GET = request.url, use the querystring module to parse. $_POST = request.on( 'data' ) [09:59] pmo5 has joined the channel [10:02] fermion has joined the channel [10:03] nail_: ckknight: it's encodeURIComponent [10:03] ckknight: ah [10:03] ckknight: my bad [10:03] m00p has joined the channel [10:05] kuebk: mikegerwitz: yea that's what I figured out about the $_GET [10:05] kuebk: but [10:05] kuebk: http://10.166.53.10:8080/api?xxx=1&xx=2 [10:05] kuebk: such url [10:06] kuebk: gives me: { '/api?xxx': '1', xx: '2' } [10:06] kuebk: so do I really have to cut /api? [10:06] mikegerwitz: kuebk: Can I see the code you use to parse the URL? [10:07] kuebk: var querystring = require('querystring'); [10:07] kuebk: console.log(querystring.parse(request.url)); [10:07] kuebk: using node 0.4.3 [10:07] alessio_alexAFK has joined the channel [10:08] teemow has joined the channel [10:08] saschagehlich has joined the channel [10:08] mikegerwitz: kuebk: Okay. Try require( 'url' ).parse( request.url, true ).query [10:09] mikegerwitz: kuebk: Forgot that querystring didn't remove that for you [10:09] kuebk: worked [10:09] kuebk: thanks mikegerwitz [10:09] kuebk: :) [10:10] mikegerwitz: kuebk: yep :) You'll need to to similar with POST after you receive all the data [10:10] hipe: non-sequitor: jsdom's unit test file is 24K LOC (for level 1) 12K LOC for level 2, 33K LOC for level 3 [10:10] hipe: it's just a lot of unit tests to cram into a single file, is all i'm saying [10:10] mikegerwitz: kuebk: http://nodejs.org/docs/v0.4.2/api/all.html#event_data_ [10:11] k1ttty has joined the channel [10:11] mikegerwitz: kuebk: (that's 0.4.2, might want to change the URL..I've had this page open for a very long time it seems) [10:13] johnnywengluu: someone should make a port to node.js for http://vagrantup.com/ [10:13] johnnywengluu: its supercool [10:14] hipe: mikegerwitz: does it compare to virtualenv (python) or rvm (ruby), i'm guessing [10:15] thurmda has left the channel [10:15] mikegerwitz: hipe: johnnywengluu*? [10:15] johnnywengluu: hipe? [10:15] johnnywengluu: oh [10:16] hipe: derp yes sorry note mikegerwitz, i meant that to johnnywengluu , question above ;) thanks mikegerwitz sorry [10:16] johnnywengluu: hipe: no its something completely different [10:16] johnnywengluu: its setting up a VM so you can develop with a clean environment [10:17] hipe: ah like a full stack-ey webby dev environment [10:17] johnnywengluu: when you are done (or don't want that VM anylonger) you just tear it down [10:17] hipe: whatever i mean by that [10:17] johnnywengluu: with one command [10:17] johnnywengluu: kinda like: start VM (for me to develop) ... shutdown VM [10:17] johnnywengluu: so you dont install your tools on your Mac directly [10:18] johnnywengluu: they will be installed on VM everytime you start it [10:18] johnnywengluu: very powerful [10:18] johnnywengluu: my explanation suck .. you have to use it to get it .. but its using ruby =) [10:19] johnnywengluu: its better than installing things directly on my mac .. because now my npm is broken and what is there for me to do, install Mac? [10:19] johnnywengluu: or i just use vagrant .. installing things on VMs [10:19] hipe: i see ! thx [10:19] johnnywengluu: i can have multiple VMs for multiple environments .. python, ruby, js/node etc [10:20] johnnywengluu: but still .. its ruby grrr .. would be better with js [10:20] matjas has joined the channel [10:20] hipe: haha so you have a vagrant virtualenv and in that you run rvm with different gemsets! and then bundler in those ! [10:20] johnnywengluu: if you want to [10:21] robhawkes has joined the channel [10:21] johnnywengluu: its just a VM .. you do whatever you want [10:21] johnnywengluu: its VM + chef [10:21] johnnywengluu: and automated setup / teardown [10:21] skm has joined the channel [10:22] hipe: johnnywengluu: if it's a VM can you test browsers on other OS's for example? alla selenium ? [10:22] hipe: or maybe bad idea? [10:22] johnnywengluu: its VM for console mode [10:22] hipe: ah [10:22] johnnywengluu: dont know if you can have it on GUI [10:22] johnnywengluu: ask on vagrant channel [10:22] johnnywengluu: 48 member [10:23] stagas has joined the channel [10:23] johnnywengluu: 6 months ago there were 7 =) [10:23] johnnywengluu: really gaining popularity [10:23] littke has joined the channel [10:23] johnnywengluu: # Boot with a GUI so you can see the screen. (Default is headless) [10:23] johnnywengluu: # config.vm.boot_mode = :gui [10:23] johnnywengluu: yeah it works [10:25] void__: is there any way to use deflate compression using websockets? [10:26] kuya has joined the channel [10:29] ph^ has joined the channel [10:30] liar has joined the channel [10:31] Tim_Smart has joined the channel [10:31] mbrochh]2 has joined the channel [10:35] pietern has joined the channel [10:35] abraxas has joined the channel [10:36] johnnywengluu: maybe good to use ruby libs after all .. more stuff to use =) [10:37] skohorn_ has joined the channel [10:38] saschagehlich has joined the channel [10:39] shaunau has joined the channel [10:41] unomi has joined the channel [10:41] aho has joined the channel [10:41] lukus has joined the channel [10:46] void__ has joined the channel [10:48] jonaslund: void__: why deflate in particular ? [10:48] void__: jonaslund: to transfer images encoded in base64 faster [10:49] jonaslund: well, just deflate/inflate the base64 encoded message [10:49] jonaslund: and put it on a higher level than the socket itself [10:50] johnnywengluu: i have problem with installing node [10:50] johnnywengluu: it says i have no openssl [10:50] johnnywengluu: but i did aptitude install libssl-dev libssl-0.9.8 [10:50] johnnywengluu: they are installed [10:50] johnnywengluu: but still i get: /tmp/node/wscript:340: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message. [10:50] johnnywengluu: any hints? [10:51] jonaslund: well.. you can alway do ./configure --without-openssl [10:51] bingomanatee: tjholowaychuk: ping [10:51] jonaslund: ah --without-ssl yes [10:51] jonaslund: hmm [10:51] jonaslund: johnnywengluu: is there a libcrypto package that's separate ? [10:51] jonaslund: or did it get installed automatically ? [10:51] johnnywengluu: jonaslund: i have no idea [10:52] johnnywengluu: its a clean install of ubuntu [10:52] beginner has joined the channel [10:52] johnnywengluu: i have just installed git-core, curl, libssl-dev and libssl.0.9.8 [10:52] johnnywengluu: dont quite get this with ssl and stuff [10:52] jonaslund: well.. browse stuff with aptitude [10:52] beginner: where can i find chat logs for this channels [10:53] jonaslund: beginner: see topic ? [10:53] beginner: got it [10:54] johnnywengluu: jonaslund: i installed libcrypto++-dev [10:54] johnnywengluu: but get the same error [10:54] jonaslund: crypto++ seems like something else [10:55] johnnywengluu: gr [10:55] johnnywengluu: why dont node get that and install it automatically =) [10:55] jonaslund: unix source mentality [10:55] johnnywengluu: so [10:55] johnnywengluu: what am i suppose to do [10:55] jonaslund: let the OS updates make sure you have a secure system [10:55] jonaslund: i'm booting my ubuntu vm [10:55] johnnywengluu: yeah! [10:56] johnnywengluu: im using vagrant =) [10:56] johnnywengluu: you should do the same! [10:56] jonaslund: vagrant ? [10:56] johnnywengluu: http://vagrantup.com/ [10:56] johnnywengluu: $ gem install vagrant [10:56] johnnywengluu: $ vagrant box add base http://files.vagrantup.com/lucid32.box [10:56] johnnywengluu: $ vagrant init [10:56] johnnywengluu: $ vagrant up [10:56] johnnywengluu: $ vagrant ssh [10:57] johnnywengluu: run these 5 commands and you are inside ubuntu ssh [10:57] ivanfi has joined the channel [10:57] johnnywengluu: when/if you want to delete it you run vagrant destroy [10:57] johnnywengluu: so good for development [10:58] varioust has joined the channel [10:58] jonaslund: did you install the openssl package ? [10:59] Spion__ has joined the channel [10:59] tokumine has joined the channel [10:59] johnnywengluu: yeah [11:00] johnnywengluu: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ [11:00] johnnywengluu: following this guide [11:00] johnnywengluu: works now! [11:01] johnnywengluu: dont know what i did [11:01] johnnywengluu: aptitude update [11:01] johnnywengluu: and aptitude install libssl-dev [11:01] johnnywengluu: wiii [11:01] johnnywengluu: checkout vagrant if you are ok with ruby .. its so great [11:01] johnnywengluu: wish there was a node.js clone [11:02] jonaslund: hmmm [11:02] johnnywengluu: but you dont have to know much ruby [11:02] jonaslund: I mostly work on windows [11:02] johnnywengluu: ok [11:02] hermansc has joined the channel [11:02] jonaslund: and use freebsd for serving [11:03] johnnywengluu: ok [11:03] johnnywengluu: know nothing about bsd [11:03] johnnywengluu: whats the diff between bsd and linux? [11:04] jonaslund: well [11:04] jonaslund: they come from different codebases [11:04] jonaslund: *bsd traces it heritage back to the original unixes [11:06] vckt has joined the channel [11:06] johnnywengluu: yeah [11:06] jonaslund: part of the reason linux got big was that bsd was in a legal limbo around 1992 or something like that and since gnu/linux had a different codebase alot of people went with it [11:06] johnnywengluu: ok [11:06] jonaslund: for most parts normal unixy code works the same, some details differ but it's nothing big [11:07] jonaslund: and most packages that comes as source works on both [11:07] MrTopf has joined the channel [11:07] ekes: package manangement is quite different [11:08] jdub has joined the channel [11:08] jonaslund: well.. that's kinda superficial compared to differences with mac or windows [11:08] b3f0r3 has joined the channel [11:08] zentoooo has joined the channel [11:09] framlin: what is the most adviced http-client-module? [11:09] johnnywengluu: yui?=) [11:09] johnnywengluu: works both on node and frontend [11:10] johnnywengluu: why not just use node client request? [11:13] framlin: I do not know ... I have n experience with node-modules [11:14] eee_c has joined the channel [11:14] framlin: I only want to build a small http-client to fetch some sites [11:16] framlin: (this train I sit in, does not have good internet-connection :( ) [11:16] johnnywengluu: framlin: you can use node's built in client Request [11:16] shaunau has joined the channel [11:16] johnnywengluu: to make http requests [11:17] johnnywengluu: read on node API doc [11:17] johnnywengluu: no need to use any modules [11:17] framlin: and every time I look at the node-modules-page, I see a lot of modules and never know, which to take ... [11:17] framlin: ahh, ok, thanks! [11:17] johnnywengluu: always look at github [11:17] stagas: framlin: https://github.com/mikeal/request [11:17] johnnywengluu: for that module [11:18] johnnywengluu: see if its actively maintained , how many watchers, documentation is good et [11:18] johnnywengluu: c [11:18] johnnywengluu: framlin: if you want to use same requests for frontend & node.js you want to use yui [11:19] johnnywengluu: its excellent for both ends [11:19] johnnywengluu: dont have to change anything [11:20] framlin: johnnywengluu: nno, I need it only for node.js as a "backend"-service [11:21] johnnywengluu: ok [11:21] sveisvei has joined the channel [11:22] framlin: I am only playing aroung, while sitting in this boring train ;) [11:22] johnnywengluu: yeah node is really fun to play around with [11:22] johnnywengluu: where are you heading? [11:22] RusAlex: guys, any online document or node api, for downloading remote file and save it to local storage ? [11:22] shaunau: johnnywengluu: i've started to use coding style as well to determine which modules to use. If i cant make sense of it i wont use it. [11:23] johnnywengluu: shaunau: ah so you look at the source? [11:23] johnnywengluu: or do you mean coding style of API? [11:23] shaunau: johnnywengluu: just incase i need to figure out whats going wrong etc. [11:23] shaunau: source code [11:23] johnnywengluu: thats a good way of picking a module [11:23] shaunau: basically i look at all of it :) source, api, style etc. [11:23] johnnywengluu: =) [11:23] johnnywengluu: nice [11:24] shaunau: number of users/watchers :) [11:24] johnnywengluu: how do you install node modules [11:24] johnnywengluu: npm or git clone? [11:24] shaunau: unless its from a node ninja like isaac [11:24] johnnywengluu: since you are looking a lot on source code i assume that you want to have it stored locally? [11:24] shaunau: both [11:24] RusAlex: guys, any idea ? [11:25] framlin: johnnywengluu: what do you mean by 'heading'? [11:25] johnnywengluu: framlin: you are on a train heading? =) [11:25] shaunau: not always, usually you can tell the style by light browsing the souce on github [11:25] johnnywengluu: shaunau: okay [11:25] johnnywengluu: i usualyy want to use my IDE (Webstorm) to find things [11:26] shaunau: i dont go through with a fine-tooth comb or anything like that, just use as a guide to help me pick which to use. [11:26] framlin: johnnywengluu: ah, I drive to Berlin/Germany [11:27] shaunau: theres a few pple in the community that i know of and respect, (i know the names when i see them) there stuff is always my first destination when looking for something [11:27] skm has joined the channel [11:28] shaunau: having said that i'm still not using node in production unfortunatley.. [11:28] shaunau: too many forces pulling in other directions. :/ [11:29] FireFly|n900 has joined the channel [11:32] piscisaureus has joined the channel [11:33] framlin: where has sys.puts gone? [11:33] mape: framlin: console.log? [11:34] mape: guess you get a \n extra but yeah [11:34] framlin: thanx ;) [11:35] mape: less requires at lest [11:35] framlin: node changes from day to day ;) [11:36] mape: For the better [11:36] tokumine: hey all, would anyone mind if I asked a braindead node_redis question? [11:36] mape: tokumine: probly better of just asking [11:37] Charuru: anyone have a good way to getting connect.sid from socket.io's header.cookie? [11:38] mape: Charuru: think that is coming up [11:38] mape: along with paths [11:39] Charuru: you mean built into socket.io mape? [11:39] emattias has joined the channel [11:39] mape: Charuru: yeah, some talks some time ago hinted it [11:39] Charuru: sounds cool, is everyone using regex for now? [11:39] mape: regex? [11:39] V1: socket.io who what where [11:39] mape: V1: to the right, up lef [11:39] mischief has joined the channel [11:39] mape: and a t [11:39] mape: for good measure [11:40] V1: oh Charuru https://gist.github.com/897196 something like that? [11:40] Charuru: var pattern=/.*connect\.sid=(.+?);.*/gi; [11:40] Charuru: var sid = client.request.headers.cookie+';'.replace(pattern, '$1'); [11:40] Charuru: that's what i have, haha [11:40] Charuru: thanks i'll use yours :) [11:40] tokumine: I have a question about node_redis and BLPOP. Given this code: http://pastie.org/1743325, I thought that BLPOP would block until there was something in the list, but it just seems to be looping round and round inside handleResponder. I think I'm basically setting up infinite callbacks - does anyone have a good example of using BLPOP correctly? [11:41] tokumine: mape: :) thanks [11:41] V1: ( havent tested it, it's just something my brains puked out yesterday in aid of helping a other socket.io user) [11:41] hij1nx has joined the channel [11:42] flasomm has joined the channel [11:44] V1: Charuru: But obtaining a header from a connection is hard for polling transports as they will close the connection once they receive an answer from the server. This gives a really small margin of retrieving the header of a active connection. [11:44] V1: So you client.request.headers will fail when a polling transport is used ;) [11:45] Charuru: thanks for that, yeah it's better to use something more bulletproof [11:46] nonnikcam has joined the channel [11:46] Charuru: though I don't actually have polling as an option [11:46] Charuru: lol [11:47] V1: oh, than client.request.header would probably be good enough ;) [11:48] SamuraiJack has joined the channel [11:48] saschagehlich has joined the channel [11:49] Charuru: ok cool [11:50] ivanfi has left the channel [11:51] framlin: what are possile reasons for 'Cannot find module 'xml2js'' after sax@0.1.2 ./node_modules/xml2js/node_modules/sax [11:51] framlin: xml2js@0.1.5 ./node_modules/xml2js [11:52] framlin: should be there, shouldnt it? [11:52] misterncw has joined the channel [11:52] seivan: http://eloquentjavascript.net/contents.html [11:52] seivan: Good book for migrating away from CoffeeScript to JS? [11:53] mh` has joined the channel [11:56] kriszyp has joined the channel [11:59] lukus has joined the channel [12:00] kuebk: guys is there any way to prevent node from sending response in chunks? [12:01] matschaffer has joined the channel [12:02] johnnywengluu: where is isaac [12:02] Vertice has joined the channel [12:02] johnnywengluu: the npm guru [12:02] fly-away has joined the channel [12:02] framlin: the node modules-installation-concept (git & npm & node_modules) is not quite clear for me. Is there any page showing, how that wqorks together? [12:03] johnnywengluu: framlin: so i develop a git repo [12:03] JianMeng1 has joined the channel [12:04] johnnywengluu: then i want to make this "app" accessible through the npm distribution channel [12:04] johnnywengluu: so people can use my app (that is a git repo but also now a npm package) by "npm install " [12:05] johnnywengluu: now people can use my npm package in 2 ways [12:06] johnnywengluu: on the command line (if i enabled it in package.json which is the npm config file you have in the npm package root folder) : eg /Volumes/local# my_app init [12:06] m00p has joined the channel [12:07] framlin: looks like OSX? [12:07] johnnywengluu: or in node scripts with : var my_app = require("my_app"); my_app.init() [12:07] johnnywengluu: what do you mean [12:07] framlin: sounds cool ;) [12:07] johnnywengluu: kinda like apt-get for ubuntu [12:07] unomi: wow, April 1st is hitting me hard this year [12:07] johnnywengluu: =) [12:08] unomi: been kicking my ass all day [12:08] johnnywengluu: =) [12:08] unomi: guess I must have been saving up alot of credulity [12:08] skm has joined the channel [12:09] framlin: but for now, it would be grate to know for me, how to debug, that a module is not available [12:10] johnnywengluu: what do you mean [12:11] beckje01 has joined the channel [12:11] framlin: what is the correct manual way, tu use a module: cd GITs; git clone node-mod; cd ../js; npm install ../GITs/node-mod; ...... thats the way I do it currently and its working most of the time .... but not for node-xml2js :( [12:12] framlin: johnnywengluu: 'Cannot find module 'xml2js'' [12:12] framlin: but I think, I have installed node-xml2js [12:13] johnnywengluu: npm install [12:13] johnnywengluu: dont have to use npm install [12:13] framlin: npm install ../GITs/node-xml2js has answered sax@0.1.2 ./node_modules/xml2js/node_modules/sax and xml2js@0.1.5 ./node_modules/xml2js [12:14] mraleph has joined the channel [12:14] framlin: I have tried npm install node-xmljs, too [12:16] framlin: npm install xml2js -> sax@0.1.2 ./node_modules/xml2js/node_modules/sax xml2js@0.1.5 ./node_modules/xml2js [12:16] mh`: anyone have a decent knowledge of cygwin/mingw? wondering whether the async file stuff like fs.watchFile() will still be.. asynchronous when used on these [12:17] mh`: or if it's just emulated with some sort of polling [12:17] framlin: but still Error: Cannot find module 'xml2js' [12:18] framlin: and this npm install has worked yesterday, but I do not know, why ;) [12:18] evilaliv3 has joined the channel [12:18] paulrobinson has joined the channel [12:18] framlin: what is this node_modules folder for? Is that a node-convention? [12:19] meandi has joined the channel [12:20] mikegerwitz: framlin: http://nodejs.org/docs/v0.4.4/api/modules.html#loading_from_node_modules_Folders [12:21] V1 has left the channel [12:22] meso has joined the channel [12:22] sirkitree has joined the channel [12:26] framlin: mikegerwitz: thanx! [12:26] seivan: is there a framework for node to build API's ? [12:26] seivan: Just like Sinatra is for Ruby [12:27] seivan: Just want to do a http call, and do some database logic and perhaps return json [12:28] xandrews has joined the channel [12:29] framlin: mikegerwitz: so if I have a folder node_module within the folder my test.js residents, and there is a node_modules/xml2js require('xml2js') shuold work, shouldnt it? [12:30] jscheel has joined the channel [12:30] jscheel has joined the channel [12:30] Ori_P has joined the channel [12:30] framlin: but it dont :( [12:30] unomi has joined the channel [12:32] framlin: other modules like request or optimist, do .... any idea, how to debug, whats going wrong? [12:32] ruxpin` has left the channel [12:32] V1 has joined the channel [12:32] arpegius has joined the channel [12:35] eirikurn has joined the channel [12:36] flasomm has joined the channel [12:37] tiagoa has joined the channel [12:37] fumanchu182 has joined the channel [12:38] mh` has left the channel [12:39] mscdex: the cake is a lie! [12:39] SubStack: the lie is a lie! [12:40] SubStack: OR IS IT? [12:40] pdelgallego_ has joined the channel [12:40] pdelgallego has joined the channel [12:41] muhqu_ has joined the channel [12:41] confoocious has joined the channel [12:41] confoocious has joined the channel [12:41] RushPL has joined the channel [12:42] f3r3nc has joined the channel [12:42] f3r3nc: hi [12:44] f3r3nc: could someone please point to the right direction with async fs? [12:44] MrTopf has joined the channel [12:44] f3r3nc: i want to read lines from a file and do some thing when a new line is read [12:45] f3r3nc: fs.readFile(file, callback) would read the whole file before calling the callback [12:45] dnolen has joined the channel [12:45] mattmcmanus has joined the channel [12:45] jetienne: http://networkimprov.github.com/node-doc-api/all.html#fs.read <- f3r3nc this read only a part of the file, and async [12:45] broofa has joined the channel [12:46] mscdex: f3r3nc: http://nodejs.org/docs/v0.4.4/api/fs.html#fs.readFile [12:47] mscdex: oh wait, nvm [12:47] mscdex: still waking up ;) [12:48] f3r3nc: thanks, but yeah, i don't know in advance how long a new line will be :) [12:48] jlecker has joined the channel [12:49] f3r3nc: what would happen if eventEmitter is subclassed and syncRead is done while doint emit for every line? [12:49] f3r3nc: would this be still blocky? [12:49] baudehlo: mscdex: pong? [12:50] mscdex: baudehlo: someone was inquiring about Haraka last night [12:51] baudehlo: ah cool. [12:51] baudehlo: Yeah I just read the log. [12:51] baudehlo: Yes it's for inbound as well as outbound. [12:54] mscdex: f3r3nc: here's one way to do it: https://gist.github.com/415fa64bc0da78542f29 [12:54] mscdex: f3r3nc: otherwise you could modify it to return an eventemitter that emits 'line' events or something [12:55] mscdex: and 'end' of course [12:55] f3r3nc: mscdex: thanks looking into it [12:56] jmhnilbog has joined the channel [12:56] mscdex: actually, you'll probably have to do a while loop around the inside of that 'data' event [12:56] mscdex: to check if there's multiple line endings in one chunk [12:56] mscdex: but you get the idea [12:56] housetier has left the channel [12:57] SubStack: line bufferin eh? [12:57] SubStack: require('lazy')(stream).lines.forEach(...) [12:58] SubStack: f3r3nc: ^ [12:58] mscdex: forEach is slow! [12:58] jasong_at_apache has joined the channel [12:58] mscdex: :p [12:58] baudehlo: why is forEach slow? [12:59] mscdex: just like for..in is slow [12:59] mscdex: heh [12:59] SubStack: that is lazy [12:59] SubStack: it is a different forEach [12:59] mscdex: that's confusing :S [12:59] davidsklar has joined the channel [12:59] SubStack: also write it the pretty way first [13:00] SubStack: and then go back later if it's too slow [13:00] baudehlo: is forEach really slower than the for (var i = 0; i < arr.length; i++) thing? [13:00] matschaffer has joined the channel [13:00] SubStack: yes because they do different things [13:01] mikegerwitz: baudehlo: Yes, function invocations vs a normal loop [13:01] SubStack: and who cares? [13:01] SubStack: they are both amazingly fast [13:01] mikegerwitz: Eventually I'd like to see v8 optimize it away [13:01] baudehlo: seems like an easy optimisation. [13:01] varioust has joined the channel [13:01] baudehlo: and/or an obvious one. [13:01] mraleph: patches are welcome [13:01] SubStack: the optimization introduces additional points into your computation [13:01] mscdex: baudehlo: you should cache the array length first [13:01] SubStack: it increases the amount of state you need to keep in your head at once [13:02] mscdex: i'm not sure if v8 has optimized the length checking or not [13:02] mikegerwitz: mscdex: nope..difference is very slight, but still there [13:02] mscdex: difference for what? [13:02] baudehlo: right, so for (var i=0,l=arr.length; i < l; i++) [13:02] mscdex: oh, and also ++i is faster than i++ :P [13:02] mikegerwitz: mscdex: arr.length vs len [13:02] SubStack: let the v8 devs worry about this shit folks [13:02] arpegius has joined the channel [13:03] baudehlo: yeah, feels too much like C [13:03] mikegerwitz: SubStack: It's important for developers to be aware of the performance implications [13:03] baudehlo: hell, even perl optimised this years ago :) [13:03] SubStack: mikegerwitz: that is not what is being advocated [13:03] mscdex: the pre vs. postfix isn't that big of a performance difference, but i noticed it with a recent build of chromium [13:03] mscdex: heh [13:05] SubStack: mikegerwitz: algorithmic optimizations are much more important than these small linear improvements [13:05] SubStack: where N is large, which is the only time when performance matters [13:05] mraleph: SubStack: +1 [13:05] mikegerwitz: SubStack: I agree, but the performance hit is huge in something like arr.forEach() on huge data sets [13:06] mikegerwitz: SubStack: That's the only time I care [13:06] boaz has joined the channel [13:06] mikegerwitz: SubStack: I use forEach() for convenience 90% of the time [13:06] V1: baudehlo: Perl as in Perl 6 ;)? Perl 5 is still a slow piece of crap :$ [13:07] mraleph: 1) write correct, readable and maintainable code; 2) be aware of algorithmic complexity 3) don't blame/optimize random things --- use the profiler. [13:07] baudehlo: V1? [13:07] bombo_ has joined the channel [13:07] V1: "hell, even perl optimised this years ago :)" ;)? [13:07] baudehlo: Perl 5 is far from slow. [13:08] V1: It's not something that I call fast either [13:08] baudehlo: *shrug* we process a billion emails a day with it. [13:10] aho: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=perl&lang2=php [13:10] aho: perl is similar to php [13:10] aho: i.e. kinda slow [13:10] V1: rakudo perl will be better.. One day.. [13:10] baudehlo: V1: I very much doubt it. [13:11] baudehlo: it's currently about 1000 times slower than perl 5. [13:11] aho: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=perl&lang2=python [13:11] unlink has joined the channel [13:11] unlink has joined the channel [13:11] kuebk: anyone tried to do jquery ajax to node server [13:11] kuebk: ? [13:11] aho: even slower than cpython... haha :> [13:11] V1: Thats why I said one day baudehlo It will probably take another 10 years to complete [13:12] V1: ;) [13:12] mikegerwitz: kuebk: It's no different than any other AJAX request. But yes [13:12] kuebk: jquery ajax fails with no response but fiddler shows that response has been received [13:12] mikegerwitz: kuebk: make sure you're calling response.end(); [13:12] aho: well, if you just read some text and run some regex stuff it won't really matter, i'd say [13:12] kuebk: yea [13:13] mikegerwitz: kuebk: Otherwise I'm unsure [13:13] boaz has joined the channel [13:13] kuebk: mikegerwitz: fiddler shows me that request [13:13] kuebk: with the complete [13:13] kuebk: body [13:13] ceej has joined the channel [13:13] kuebk: and in fiddler response looks [13:13] kuebk: ok [13:13] kuebk: but jquery fails [13:13] indexzero has joined the channel [13:13] rubydiamond_ has joined the channel [13:13] mikegerwitz: kuebk: Does the page load fine in the browser when you hit the URL directly? [13:13] rubydiamond_: hi friends.. [13:13] rubydiamond_: is getting this error [13:13] rubydiamond_: throw e; // process.nextTick error, or 'error' event on first tick [13:13] kuebk: yea [13:14] rubydiamond_: halp [13:16] alessio_alexAFK has joined the channel [13:16] thomblake has joined the channel [13:18] alex_b has joined the channel [13:19] zomgbie has joined the channel [13:21] xandrews has joined the channel [13:24] vckt has joined the channel [13:24] ruxkor has joined the channel [13:25] shiawuen has joined the channel [13:26] Poetro has joined the channel [13:26] andrewfff has joined the channel [13:27] ruxkor: hi everybody... i'm looking for ways to install node 0.4 the "debian" way. does anybody have experience with that/knows where i can find debs for it? i was thinking of using checkinstall but I don't know if it covers everything, and how i install npm after installing node.js as package. [13:27] fmarceau has joined the channel [13:28] Twelve-60 has joined the channel [13:28] mraleph: aho: shootout is not very representative... it's just a "benchmark _game_". it's kinda like SunSpider... [13:29] jscheel: ruxkor: node.js development is moving pretty fast, I wouldn't rely on packages as they will probably be a few versions behind [13:29] amacleod has joined the channel [13:30] ruxkor: jscheel yes, but i want to avoid building and installing node manually as we are about to migrate our infrastructure to puppet [13:30] wink_: ruxkor: jscheel is correct, you're gonna get smashed if you expect any .debs to keep up [13:31] wink_: that said, you could probably package your own pretty easily as long as you were willing to settle on a version [13:31] rubydiamond_: guys.. I need to write a sample node.js app.. [13:31] jscheel: ruxkor: could you create your own channel that you update when you want [13:31] rubydiamond_: what should I write.. [13:31] rubydiamond_: :D [13:31] rubydiamond_: I need to demo it to tell node.js is worth using [13:31] MikeMakesIt has joined the channel [13:31] jscheel: rubydiamond_: well, what kind of work do you do? [13:32] ruxkor: rubydiamonds_ wordsquare? [13:32] jscheel: rubydiamond_: do something contextually relevant and you will have a better chance of convincing the decision-makers [13:32] rubydiamond_: jscheel: banking applications [13:32] pauls has joined the channel [13:32] void__ has joined the channel [13:32] Horofox has joined the channel [13:32] micheil: rubydiamond_: that's going to be a hard sell. [13:32] jscheel: rubydiamond_: maybe a secure livestream of a banking ledger [13:33] micheil: jscheel: do you have an existing application? [13:33] arpegius_ has joined the channel [13:33] jscheel: micheil: I'm working on my first production app right now [13:33] micheil: erm, rubydiamond_: do you have an existing application? [13:33] ruxkor: wink_ jscheel i think setting up a channel will be necessary in any case, as we want to package also our own applications and distribute them on it [13:33] micheil: jscheel: wrong tabbed name :) [13:33] ruxkor: but I am unsure if there are any hidden catches by eg using checkinstall for node [13:33] wink_: ruxkor: cool, you'll definitely be able to do it, but im not aware of any groundwork laid for you [13:33] jscheel: ruxkor: oh, not sure about that [13:34] rfay has joined the channel [13:34] ruxkor: ok, thanks nevertheless [13:35] wink_: ruxkor: are you going to support multiple archs? 32/64bit? [13:35] jscheel: ruxkor: on a side-node, iirc, puppet was actually created by a guy here in Nashville [13:35] wink_: that could get tricky [13:35] jscheel: originally [13:35] wink_: jscheel: im in nashville too ;> [13:36] jscheel: wink_: really? where at? I'm at centresource [13:36] ryanfitz has joined the channel [13:36] ruxkor: wink_ we will be hosting node only on x86_64, so that will be the architecture i will be build my package for i suppose [13:36] wink_: im north at a healthcare company :> [13:36] ruxkor: but i was really hoping somebody already did this, since i am absolutely no expert in debian's packagin mechanics [13:36] jscheel: wink_: goodlettsville? [13:36] wink_: ruxkor: cool, the reason i ask is that would get a whole lot trickier if you needed to rebuild your modules and package those up as well [13:36] wink_: jscheel: yessir. [13:37] jscheel: wink_: cool, I'm from white house, live in springfield now [13:37] wink_: oh wow, i live in hendersonville [13:37] jscheel: wink_: nice to meet you :) [13:37] littke has joined the channel [13:37] wink_: and you as well :> [13:37] alek_br has joined the channel [13:37] kuebk has joined the channel [13:37] beawesomeinstead has joined the channel [13:37] beawesomeinstead has joined the channel [13:37] kuebk: re [13:37] wink_: what a small internet :p [13:38] ruxkor: wink_: @_@ you're right, i never thought about the modules...! aaaaaah! [13:38] jscheel: true true [13:38] wink_: ruxkor: if you're only going for a single arch, it may not be so bad [13:38] kaiwren has joined the channel [13:38] wink_: im pretty sure as part of the bundling you get some post hooks that you could just shell npm or just dump the built modules somewhere [13:38] ruxkor: wink_ yes but i have absolutely no clue how to re-package npm packages... [13:39] mattrobenolt has joined the channel [13:39] wink_: ruxkor: isaacs is usually around, wait for him to show up and then pounce [13:40] ruxkor: wink_ i just found a puppet npm provider which seems to satisfy exactly my needs! : ) [13:40] wink_: <3 [13:40] baudehlo1 has joined the channel [13:41] dxgriffiths: I had a problem today installing now.js on a Mac. [13:41] rubydiamond_: micheil: yes [13:41] micheil: rubydiamond_: see pm. [13:41] dxgriffiths: npm installed it under /usr/local/lib/node but for whatever reason that's not in my require.paths array. [13:42] yhahn has joined the channel [13:42] beejeebus has joined the channel [13:44] dxgriffiths: I can add it manually in a script to get require("now") to work but there must be something wrong. [13:44] aho: mraleph, yes, it's just a ballpark figure [13:45] aho: and as i said, if you just read some text and run some regex over it, it won't matter [13:49] eirikurn has joined the channel [13:49] mbrochh has joined the channel [13:52] jmar777 has joined the channel [13:52] timmywil has joined the channel [13:52] bingomanatee has joined the channel [13:52] Yuffster has joined the channel [13:53] willwhite has joined the channel [13:55] kaiwren_ has joined the channel [13:57] ben_alman has joined the channel [14:01] bolvarak has joined the channel [14:01] dylang has joined the channel [14:03] arpegius_ has joined the channel [14:03] jtsnow has joined the channel [14:05] alek_br has joined the channel [14:05] bolvarak has joined the channel [14:07] NuckingFuts has joined the channel [14:08] timmywil has joined the channel [14:09] wasabista has joined the channel [14:10] jonaslund has joined the channel [14:12] dmshann0n has joined the channel [14:12] highermath_away has joined the channel [14:14] Nohryb has joined the channel [14:15] davidwalsh has joined the channel [14:16] strmpnk has joined the channel [14:17] rfay has joined the channel [14:17] c4milo has joined the channel [14:17] sivy has joined the channel [14:17] davidvanleeuwen has joined the channel [14:18] xandrews has joined the channel [14:18] seivan has joined the channel [14:19] sivy has joined the channel [14:20] christoph_ has joined the channel [14:26] jga023 has joined the channel [14:26] jga023: anybody done google oauth inside node.js? [14:27] monokrome: OAuth or OpenID? [14:27] jga023: monokrome: at this point, either, I just want to be able to access gdata feeds [14:27] monokrome: Oh, so OAuth [14:28] monokrome: A lot of people say "OAuth" when they're talking about "OpenID"... So, I always verify. [14:28] vladikoff has joined the channel [14:29] monokrome: https://github.com/ammmir/node-gdata [14:29] monokrome: Haven't used it, but have you seen that? [14:30] monokrome: jga023: ^ [14:30] jga023: monokrome: thanks, taking a look now [14:31] monokrome: Hopefully it works :D [14:31] softdrink has joined the channel [14:33] arpegius_ has joined the channel [14:33] mrjjwright has joined the channel [14:33] indexzero has joined the channel [14:34] kmiyashiro has joined the channel [14:34] mrjjwright has joined the channel [14:34] hornairs has joined the channel [14:35] saschagehlich has joined the channel [14:35] mryan has joined the channel [14:36] jtsnow has joined the channel [14:37] Venom_X has joined the channel [14:37] CrypticSwarm has joined the channel [14:38] warz has joined the channel [14:38] warz has joined the channel [14:38] f3r3nc: mscdex: okay, it seems to work. did the while modification [14:38] f3r3nc: mscdex: maybe fancy some optimization? :) [14:39] lessthanzero has joined the channel [14:40] niklasfi has joined the channel [14:40] niklasfi has left the channel [14:42] skm has joined the channel [14:42] BillyBreen has joined the channel [14:42] christoph_: what are the browser reqs for a node app? I've read some stuff about flash to work around websockets not being there etc, but is that needed for just node ? [14:43] pifantastic has joined the channel [14:43] mattrobenolt: christoph_: You're thinking of socket.io. [14:43] mattrobenolt: Node.js requires just as much as say… PHP would require. It's nothing special to a browser. [14:43] gnagno has joined the channel [14:43] gnagno: hello all [14:43] softdrink: christoph_: none really… socket.io can fall back to long polling [14:45] gnagno: I am using socket.io, suppose that I want to send a message composed by username and message, is it correct to make this? socket.send( JSON.stringify({ :user_id => 1, :message => 'hello' } ) ) [14:45] colinclark has joined the channel [14:46] christoph_: mattrobenolt: thanks. I don't need socket.io for having some server and several browser clients? [14:46] KellyM has joined the channel [14:47] ngs has joined the channel [14:47] skyler_brungardt has joined the channel [14:47] softdrink: socket.io is separate from node. it's just a very nice websocket implementation [14:47] softdrink: node itself has no browser requirements [14:48] christoph_: right, and i don't need it for some basic pushing out of data from a server to many clients? [14:49] christoph_: clients being in a browser [14:49] softdrink: do you mean "push" specifically, or just "serving up requests"? [14:49] christoph_: push [14:49] christoph_: no polling [14:49] mattrobenolt: christoph_: As in… websockets? [14:49] christoph_: i have some code from an APE server [14:49] softdrink: you'd use socket.io for that, which also doesn't have any browser requirements as far as i know [14:50] christoph_: uh... code using APE from the ape project [14:50] christoph_: and wondering if it wouldn't be better to use node [14:50] christoph_: so just doing some research on that [14:50] softdrink: socket.io is incredibly easy to use :) [14:50] christoph_: just want to make sure to be aware of the browser requirements if i do switch it [14:50] jakehow has joined the channel [14:50] [AD]Turbo has joined the channel [14:51] softdrink: *nod* [14:51] softdrink: i'm not aware of any requirements [14:51] mattrobenolt: christoph_: It wouldn't be any different requirements than APE. socket.io gracefully falls back to long polling. [14:51] softdrink: if i remember right, it will use websockets natively if supported, fall back to flash sockets, then fall back to long polling in a worst case. [14:52] softdrink: you don't really have to do anything special for it to work its magic [14:52] pifantastic has joined the channel [14:52] christoph_: sounds good, thanks guys [14:52] softdrink: np [14:52] kinane has joined the channel [14:52] mattrobenolt: softdrink: I'm pretty sure you can configure which interfaces it is allowed to fallback to. For example if you never want it to use Flash sockets, you could configure it to just try websockets and fall back directly to long polling. [14:53] softdrink: mattrobenolt: oh yeah, i forgot that you could do that [14:53] hermansc has joined the channel [14:55] robotarmy has joined the channel [14:56] vckt has joined the channel [14:56] briznad has joined the channel [14:56] dylang_ has joined the channel [14:57] k1ttty has joined the channel [14:58] matschaffer has joined the channel [14:59] Bogo has joined the channel [14:59] Bogo has left the channel [15:01] Bogo has joined the channel [15:01] christoph_: do people use coffeescript a lot for node? [15:01] kkaefer: christoph_: most node.js code seems to be written in JavaScript [15:01] softdrink: some [15:02] Bogo: christoph_: good question, i'm wondering if coffeescript is a viable JS alternative at this point [15:02] indexzero has joined the channel [15:02] tmpvar has joined the channel [15:02] kkaefer: but there are commonjs modules [15:02] kkaefer: err [15:02] softdrink: no idea what percentage [15:02] kkaefer: coffeescript modules [15:02] softdrink: personally, i REALLY don't like the idea of having another layer between me and the browser [15:02] softdrink: [15:02] christoph_: i like that it cuts down on some code [15:03] softdrink: the people that use it seem to really love it though *shrug* [15:03] SubStack: I don't mind layers so long as they work [15:03] softdrink: SubStack: i just have flashbacks of GWT is all. totally irrational, i know ;) [15:03] SubStack: and coffee works great with browserify out of the box \o/ [15:03] hermansc_ has joined the channel [15:03] SubStack: softdrink: well GWT isn't very usable [15:03] briznad has joined the channel [15:03] arpegius has joined the channel [15:03] SubStack: too high of a barrier to entry I think [15:04] softdrink: it's also a steaming pile of dingo dung. [15:04] softdrink: gwt, i mean [15:04] SubStack: coffee has a low barrier to entry just like most good node code [15:04] skm has joined the channel [15:04] softdrink: *nod* [15:04] christoph_: nice to stimulate some discussion :) [15:04] softdrink: how's debugging coffeescript client-side? [15:04] tmpvar has joined the channel [15:05] EyePulp has joined the channel [15:05] vckt has joined the channel [15:05] Insanity5902 has joined the channel [15:06] aheckmann has joined the channel [15:06] Bogo: is there any way to run coffeescript directly with node? [15:06] Bogo: or do i always have to compile it before runing through node? [15:06] ckknight has joined the channel [15:07] jga023: you can run it through the coffee command [15:07] jga023: instead of node file.js [15:07] jga023: it's coffee file.coffee [15:07] SubStack: Bogo: you can compile it at runtime using the coffee api [15:08] vladikoff has joined the channel [15:08] Bogo: jga023: i see! thanks! [15:08] Bogo: SubStack: how could i do that? [15:08] SubStack: Bogo: like this https://github.com/substack/dcrypt/blob/master/dcrypt.js [15:08] SubStack: I would suspect that something on npm can already do this for you [15:09] SubStack: if not I'll hack one up [15:10] wookiehangover has joined the channel [15:10] fumanchu182: I'm installing npm on a production server, and just did a npm list, when did NPM blow up with all these packages, did I miss some huge event or something? [15:10] softdrink: i might give it a good college-try… i'm sick to death of typing out "function" [15:10] jmhnilbog has joined the channel [15:10] wookiehangover has left the channel [15:11] Bogo: SubStack: that's pretty neat, thx! [15:11] Bogo: CS is actually pretty, compared with JS ;) [15:12] mscdex: f3r3nc: optimization? like what? [15:12] kjeldahl has joined the channel [15:12] jga023: has anybody run into issues with https.get not making a call to https://host [15:14] mscdex: jga023: no [15:14] http402 has joined the channel [15:14] mscdex: jga023: just don't include 'https://' in your host property in your options [15:14] sorens3n: haha [15:14] sorens3n: http://www.hulu.com/index.htm [15:15] Charuru: can websockets replace ajax? [15:15] sorens3n: yes [15:15] jga023: mscdex: http://pastebin.com/5Gs1uVfe [15:15] sorens3n: websockets reverts to ajax even [15:15] jga023: mscdex: hit this in your browser: https://www.google.com/accounts/ClientLogin [15:15] Charuru: so if i'm making a site where every user has a websocket connection [15:15] jga023: different responses [15:15] dylang has joined the channel [15:15] Charuru: i can forgo ajax and use all socket reponses? [15:15] mscdex: jga023: i think you want /accounts/ClientLogin [15:15] sorens3n: it depends what your trying to do [15:16] jga023: mscdex: yep! [15:16] eee_c has joined the channel [15:16] jga023: mscdex: thanks [15:16] mscdex: np :) [15:16] Charuru: i've never heard of a site like that [15:16] Charuru: i'm just wondering what people's thoughts are [15:16] Charuru: whether or not it's 'safe' to do [15:16] mscdex: websockets reverting to ajax? since when? :) [15:16] Charuru: obviously i think right now is too early [15:17] mscdex: socket.io might downgrade to ajax [15:17] Charuru: as too many browsers have it turned off [15:17] mscdex: but not websockets themselves [15:17] copongcopong has joined the channel [15:17] ehedenst has joined the channel [15:17] sorens3n: well, yes, ive been looking at socket.io too much >.< [15:17] sorens3n: my mistake [15:17] Charuru: but maybe in 6 months? [15:17] Charuru: as ie9 and ff5 starts shipping with sockets enabled? [15:18] Charuru: the fallbacks that socket.io uses are way slower than the regular websockets sadly [15:18] davidascher has joined the channel [15:18] Charuru: for specific uses they're fine, it's a decent way to get realtime stuff going [15:18] sorens3n: the fallbacks, such as ajax? [15:18] Charuru: but as something to power the whole site I don't really like it [15:19] Charuru: well ajax sucks as a fallback, before ajax there's flashsockets which is second best [15:19] Charuru: but flash is slow to load [15:19] Charuru: and sucks in general [15:19] sorens3n: what would be your alternative [15:19] Charuru: huh? obviously websockets is preferable [15:19] sorens3n: if you dont use sockets [15:19] confoocious has joined the channel [15:19] confoocious has joined the channel [15:20] Charuru: i don't think there is an alternative, you can't do it obviously [15:20] sorens3n: well, there is ajax longpolling if you want to mimic [15:20] micheil: Charuru: asides from websockets, the only other alternatives are to use plugins or ajax [15:20] micheil: neither are a great solution, hence the reason for websockets [15:20] Charuru: right on [15:21] Charuru: i was just thinking out loud about building a site on websockets [15:21] micheil: but as far as fallbacks go, I'd rather have a slow init on a plugin then an overall slow connection [15:21] mscdex: well multipart streaming works on a lot of modern browsers [15:21] Charuru: yeah, defo [15:21] tjholowaychuk has joined the channel [15:21] mscdex: which is next best [15:22] dgathright has joined the channel [15:22] mbrochh]2 has joined the channel [15:22] Charuru: the whole idea of multipart streaming sounds terribly ugly to me [15:22] davidvanleeuwen has joined the channel [15:22] Bogo: i'm trying to understand something about node - if I have a google app engine app that provides a JSON output of it's database on query, is node a proper enviornment to implement a live update from that file? [15:22] christoph_: would i use socket.io to connect to some port on some box, to get data from it? It'll be json. [15:22] Bogo: or should i rather use AJAX JS? [15:22] Bogo: (and node should be taking the part GAE now has) [15:23] Charuru: yeah node is great for that bogo [15:23] mscdex: how is it ugly? [15:23] mscdex: multipart/x-mixed-replace [15:23] mscdex: :) [15:23] sub_pop has joined the channel [15:23] Bogo: Charuru: but isn't node a server-side software? [15:24] Bogo: Charuru: i cannot run node code on user side, right? [15:24] Charuru: you said node is taking the part of GAE? [15:24] Bogo: Charuru: i'm trying to understand if it should :) [15:24] mscdex: christoph_: you can't connect to any arbitrary port on some machine [15:24] Charuru: yes you use client side ajax to request data from the server [15:24] mscdex: christoph_: the place where you're connecting to has to understand websockets [15:24] Charuru: whether the server is gae or node [15:25] Charuru: python can server json just as well as javascript, so there's no real need for node if that's all you want [15:25] Charuru: obviously node is super cool and you should use it anyway though [15:25] Bogo: haha, yes :) [15:26] Bogo: so for data serving, should i use socket.io? [15:26] Charuru: mscdex because requests are blocking [15:26] Charuru: bogo if you need to push the data, socket.io is great yeah [15:26] mscdex: Charuru: huh? you can do async xhr [15:26] Bogo: Charuru: thx, will read up on it then [15:27] Charuru: from what i understand if you're holding the request open then you can't make other requests? [15:28] christoph_: mscdex: i mean separately from server to client. I need to be able to connect to a port on some box, massage the data, and then update the client [15:28] romainhuet has joined the channel [15:29] mscdex: Charuru: you'd have one async xhr connection open to the server which would be sending back a never-ending multipart/x-mixed-replace response, and separate xhr requests to send to the server [15:29] christoph_: so with APE, I do APE.sockClient [15:29] triel has joined the channel [15:29] mscdex: christoph_: right, but APE implements a server-side proxy [15:29] sreeix has joined the channel [15:30] mscdex: christoph_: it's not difficult to make the same thing in node [15:30] Charuru: ok, fair enough [15:30] Charuru: still sounds kinda ugly though, is it meant to be held open like that? [15:30] mscdex: Charuru: yes, multipart/x-mixed-replace is designed for that [15:30] christoph_: mscdex: the main thing i need is something that sits between the data coming from some port in json format, and a browser that should show that data in some UI [15:30] mikl has joined the channel [15:31] christoph_: and ideally, as soon as new data comes in, it's pushed to the browser [15:31] harth has joined the channel [15:31] mscdex: christoph_: yes. you could easily do this with something like socket.io [15:31] c4milo: does anybody knows what's suing cloud9ide.com as backend database [15:31] c4milo: s/knows/know/ [15:31] christoph_: mscdex: okay, just making sure. thanks! [15:31] c4milo: s/suing/using/ [15:32] Charuru: oh, well sweet then [15:32] Charuru: mscdex why is flash preferred then? there must be a catch [15:32] Charuru: lol [15:32] mscdex: Charuru: multipart/x-mixed-replace is what a lot of webcams use for showing a live feed [15:33] cossovich has joined the channel [15:34] mscdex: Charuru: if you're talking about flash websockets, that is better than multipart/x-mixed-replace because it's still a bidirectional connection [15:34] arpegius_ has joined the channel [15:34] mscdex: whereas multipart is unidirectional [15:34] tbranyen: SubStack: heh using events for iteration has received some bad feedback :( http://pastie.org/1744046 [15:35] Charuru: ok, thanks [15:35] kaichen has joined the channel [15:35] bingomanatee has joined the channel [15:36] mscdex: the other thing too is that IE doesn't support multipart/x-mixed-replace :-\ [15:36] mscdex: go figure eh? ;) [15:36] Charuru: lol [15:36] Spion_ has joined the channel [15:37] daniellindsley has joined the channel [15:38] cossovich: hello all, node newbie here... I've installed node and tested it, all good. Then installed npm and subsequently express jade and sass... setup an express app but I get an error on the web front-end: Cannot find module 'jade'. Is there someway I can manually specify the jade module [path] in the express app? [15:38] SubStack: tbranyen: I like it though [15:38] tokumine has joined the channel [15:38] tbranyen: SubStack: same, i'm just not sure on how i would bomb out after say the 5th iteration [15:39] tbranyen: i could emit an index, but should history have say a stop method? [15:39] softdrink: http://www.google.com/intl/en/jobs/uslocations/mountain-view/autocompleter/index.html [15:39] SubStack: tbranyen: history.end()? [15:39] softdrink: ಠ_ಠ [15:39] noahcampbell has joined the channel [15:39] tbranyen: SubStack: ah yea end would work better [15:39] SubStack: tbranyen: oh also perhaps you could specify indices to branch.history() [15:39] tommoor has joined the channel [15:40] SubStack: it could take arguments similar to slice() [15:40] tbranyen: yeah [15:40] tbranyen: thats a dope idea [15:42] stevereed has joined the channel [15:43] Treffynnon has joined the channel [15:44] yozgrahame has joined the channel [15:45] malkomalko has joined the channel [15:45] malkomalko: tjholowaychuk: you see anybody with this error in express after upgrading? Cannot read property 'methods' of undefined [15:46] tjholowaychuk: malkomalko: yeah, we had it just a few days ago actually [15:46] malkomalko: express/2.2.0/package/lib/http.js:15:21 and the stacktrace doesn't give me any of my code [15:46] tjholowaychuk: it's a really annoying combination of npm stuff [15:46] tjholowaychuk: for example [15:46] matschaffer has joined the channel [15:46] tjholowaychuk: actually i dont remember [15:46] tjholowaychuk: but [15:46] tjholowaychuk: if you use the wrong version of npm it sets up the modules wrong [15:46] malkomalko: and my Makefile in another project broke where it couldn't find expresso, really really weird [15:46] tjholowaychuk: so it cannot find connect [15:47] tjholowaychuk: what's your npm version? [15:47] malkomalko: latest stable.. 0.3.8 I think? [15:47] tjholowaychuk: 1.x didnt work for us [15:47] tjholowaychuk: and 0.2.x didnt work [15:47] malkomalko: 18 [15:47] tjholowaychuk: i think 0.3.x did [15:47] malkomalko: yah 0.3.18 latest stable [15:47] tjholowaychuk: hmm, not sure then, it is an npm thing though [15:47] deepthawtz has joined the channel [15:47] tjholowaychuk: we spent a good couple hours trying to get it to behave haha [15:48] malkomalko: bummer [15:48] tjholowaychuk: on our slow as staging server [15:48] tjholowaychuk: ass* [15:48] tjholowaychuk: yeah [15:48] malkomalko: butt [15:48] malkomalko: there may be children around :D [15:48] tjholowaychuk: i wish we were using ndistro for deployment, installing node 0.4.x took about an hour on that server too, so slow [15:49] malkomalko: think I just figured it out [15:49] malkomalko: post_activate didn't work after an update [15:49] kenbolton has joined the channel [15:49] tjholowaychuk: hm [15:49] malkomalko: you might have to manually: 'npm activate npm@0.3.18' [15:49] strmpnk_ has joined the channel [15:49] onr has joined the channel [15:50] malkomalko: nope.. worked for my make test problem, but not express :D [15:51] tjholowaychuk has joined the channel [15:51] eb4890 has joined the channel [15:51] strmpnk_ has left the channel [15:51] cossovich has left the channel [15:52] bingomanatee: ACTION is considering cancelling/postponing the April 28th Game/Node meetup as no speakers have committed. (not an Apr. Fools thing). The Node meetup at the 5th at RocketSpace is still on and weh have several speakers lined up for that so I don't see the point in putting energy into the latter meetup when nobody has come forward to present.  [15:52] vckt has joined the channel [15:53] timcosgrove has joined the channel [15:54] ako has joined the channel [15:54] perezd has joined the channel [16:01] saschagehlich has joined the channel [16:01] yozgrahame has joined the channel [16:02] timcosgrove has left the channel [16:03] fictorial has joined the channel [16:03] ph^ has joined the channel [16:03] piscisaureus has joined the channel [16:04] saschagehlich has joined the channel [16:04] MikhX has joined the channel [16:04] Schmallon has joined the channel [16:04] eee_c1 has joined the channel [16:04] z8000 has left the channel [16:04] arpegius has joined the channel [16:05] muk_mb has joined the channel [16:05] ben_alman: We got node.js trainings coming up, gimme some RT love! http://twitter.com/cowboy/status/53845826040111105 [16:05] Wizek has joined the channel [16:08] dmcquay has joined the channel [16:09] jakehow has joined the channel [16:09] jetienne has joined the channel [16:10] stephank has joined the channel [16:10] muk_mb has joined the channel [16:11] marcosvm has joined the channel [16:13] alek_br_ has joined the channel [16:15] softdrink: is there something like ruby bundler for node? [16:16] ruxkor: softdrink npm bundle ? [16:16] softdrink: *headdesk* why did i miss that? [16:16] softdrink: ACTION reads [16:17] EyePulp: looking for some advice on testing. we've got a chat system built off node.js & faye using browser based clients, and are trying to figure out an effective way to test it automatically. [16:17] johnnywengluu: is there a way to check if the first request to node.js contained "data" [16:17] johnnywengluu: i have to know if data was sent before i call res.end() [16:18] johnnywengluu: so i can't use req.on("data", ... ) [16:18] dgathright has joined the channel [16:18] mike_miller has joined the channel [16:19] max_dev has joined the channel [16:19] johnnywengluu: anyone [16:19] djQuery has joined the channel [16:19] tommoor: hey, quick q about websockets... is it guaranteed that messages will arrive in the same order that they are sent? [16:19] CIA-1: node: 03Ryan Dahl 07v0.4 * r4877279 10/ doc/api/globals.markdown : [16:19] CIA-1: node: Add timers to globals section [16:19] CIA-1: node: Closes GH-864. - http://bit.ly/hlF0pa [16:19] jetienne: tommoor: yes [16:19] tommoor: this seems as good a channel as any :) [16:20] mikegerwitz: johnnywengluu: don't call response.end() until request.on( 'end' ) has been raised. Then set a flag in request.on( 'data' ) [16:20] jetienne: tommoor: this is tcp connection below [16:20] galaxywatcher has joined the channel [16:21] johnnywengluu: mikegerwitz: i dont get the request.on("end") .. when will it be emitted? [16:22] mikegerwitz: johnnywengluu: It should be emitted after the request is complete. In the case of a post, when all data is received. [16:22] johnnywengluu: ah [16:22] johnnywengluu: ok [16:22] tommoor: jetienne: what do you mean by that? [16:22] alessio_alexAFK has joined the channel [16:24] draginx has joined the channel [16:26] saschagehlich has joined the channel [16:28] jetienne: tommoor: the tcp remark ? because tcp doesnt change the order of the data sent and received [16:28] murz has joined the channel [16:29] EyePulp: jetienne: but it doesn't guarantee the *arrival* order of things being sent [16:29] tommoor: jetienne: thanks :) [16:29] mrjjwright has joined the channel [16:29] EyePulp: some packets get delayed, other's don't [16:29] tommoor: EyePulp: yea, thats what i was asking... i am using it for real time games - so should i have my own incrementing counter so i can discard delayed messages? [16:29] tommoor: or sthat a waste of bandwidth [16:29] seivan has joined the channel [16:30] EyePulp: tommoor: you should build in robustness for delay of actions [16:30] mikeal has joined the channel [16:30] malkomalko: ack, this npm problem is killing me heh [16:30] jetienne: EyePulp: hue ? can you explain ? in which case the data wont arrive ? [16:30] johnnywengluu: mikegerwitz: thanks it worked [16:31] EyePulp: jetienne: tcp doesn't guarantee the order when things arrive at a destination. delays can occur, and you can receive things out of order. is that not so? [16:31] jetienne: EyePulp: no. things arrives in the same order they are sent. garanteed [16:33] EyePulp: jetienne: are we talking the tcp stack or websocket protocol? [16:33] EyePulp: or both? [16:33] eee_c has joined the channel [16:33] EyePulp: ACTION is happy to be wrong on this, but may not understand the question [16:34] jetienne: EyePulp: both got this property [16:34] deepthawtz has joined the channel [16:34] Yuffster_work has joined the channel [16:34] gozala has joined the channel [16:34] arpegius has joined the channel [16:35] mikegerwitz: EyePulp: TCP messages may not necessarily be received by the hardware in order, but the protocol itself with guarantee that they are reconstructed in the proper order. http://29west.com/docs/THPM/tcp-latency.html [16:35] EyePulp: I think TCP allows/assumes packets to arrive in any order, but will re-order them for protocols sitting on top of the stack - does that make [16:36] EyePulp: sense? [16:36] EyePulp: ACTION is too slow [16:37] jetienne: EyePulp: yep this is it. ip packet may be reordered/lost/duplicated on the path thru the internet, and the destination tcp stack sort them out. [16:37] dmcquay has joined the channel [16:37] mnbvasd: ACTION gives EyePulp some udp [16:37] jetienne: EyePulp: so above tcp stack, at the user socket level, things arrives in the order they are sent. [16:37] EyePulp: jetienne: that makes more sense. [16:38] jetienne: and then at the websocket level in the browser :) [16:38] mnbvasd: ACTION giggles [16:38] EyePulp: ACTION disagrees with using "arrive" versus say "presented" [16:38] darshanshankar has joined the channel [16:38] Draggor: The only confusing hole is wandering packet syndrome, which is incredibly rare [16:39] tommoor: i take it this all kinda slows down websockets though, as at the tcp level it is rerequesting packets? [16:39] mnbvasd: EyePulp: they arrive in the tcp stack in whatever order, they arrive ontop of the os layer (layer3) in the correct order. [16:39] EyePulp: heh [16:39] mnbvasd: erm layer4 even. [16:39] vipaca has joined the channel [16:39] vipaca has joined the channel [16:39] littke has joined the channel [16:39] mnbvasd: ACTION tries to be too clever ;) [16:39] tylerstalder has joined the channel [16:40] mnbvasd: after that, it's down to your server/browser to decide to re-order them. [16:40] ryanfitz has joined the channel [16:41] mikegerwitz: tommoor: It may depending on a variety of factors, which is why UDP is often preferred [16:41] mikegerwitz: tommoor: (for time-sensitive stuff..but TCP is more reliable for most applications) [16:41] hellp has joined the channel [16:41] EyePulp: jetienne: I think I got confused by "no. things arrives in the same order they are sent. garanteed" I guess it depends on which side of the stack you're looking at. =) [16:42] tommoor: mikegerwitz: in this case it's a browser game, so websockets seems a good solution [16:42] tommoor: a bit of delay will just have to be taken in stride. [16:42] jetienne: tommoor: :) [16:42] RusAlex: guys, any online help for validation forms with express ? [16:42] mikegerwitz: tommoor: Many games use UDP, because packet loss in't necessarily a problem. But UDP cannot be used within the browser at this time :( [16:43] mikegerwitz: isn't* [16:43] mnbvasd: tommoor: browsers don't understand udp yet fwiu. [16:43] davidsklar has joined the channel [16:43] tommoor: thanks all [16:43] tommoor: much clearer :) [16:44] tschundeee has joined the channel [16:44] abraham has joined the channel [16:44] tmpvar has joined the channel [16:44] indutny has joined the channel [16:45] tiagoa has joined the channel [16:46] perezd has joined the channel [16:47] atiti has joined the channel [16:47] Stan____ has joined the channel [16:49] ryanf_ has joined the channel [16:52] Guest67678 has joined the channel [16:52] tfe_ has joined the channel [16:54] technoweenie has joined the channel [16:55] zylo has joined the channel [16:58] dizzdiamonds has joined the channel [17:00] orls has joined the channel [17:01] orls: hello all [17:01] softdrink has joined the channel [17:01] orls: anyone got much experience w/ node-canvas? [17:02] davemo has joined the channel [17:02] mikeal has joined the channel [17:03] wirehead has joined the channel [17:05] ryanf_ has left the channel [17:06] baudehlo1: orls: tjholowaychuk probably does :) [17:06] sh1mmer has joined the channel [17:06] mcantelon has joined the channel [17:06] orls: ah didnt see that tj was in [17:07] harth has joined the channel [17:07] jmhnilbog has joined the channel [17:07] orls: @tjholowaychuk: is there any way of passing a stream of png data straight into a canvas ctx? [17:07] pt_tr has joined the channel [17:08] tjholowaychuk: orls: not easily right now unfortunately [17:08] orls: i.e if I have a png streeam form elsewhere, without writing it to disk and passing in the src [17:08] sorens3n: is it possible to use Keys with an express session? [17:08] liar has joined the channel [17:08] orls: looking through the src now, but unfortunaly my cpp isn't up to scratch :-( [17:09] tjholowaychuk: it's doable [17:09] tjholowaychuk: I just dont have time [17:09] tjholowaychuk: easiest would be Image#src=Buffer, without a streaming interface, sniff the img format and go from there [17:10] pquerna: ryah: did you want a patch that ref'counted the actual x509 objects? [17:10] pquerna: mjr_: also great success :) [17:10] malkomalko has joined the channel [17:11] orls: maybe i'll attempt a patch for it, tks for confirming. [17:11] bentruyman has joined the channel [17:11] ryah: pquerna: i think caching the cert store for roots is good [17:11] sourcode has joined the channel [17:11] pquerna: okay [17:11] ryah: seems to work fine [17:12] pquerna: hmm, what about custom CAs, won't we sill parse those every connection? [17:13] ryah: yeah [17:15] eee_c has joined the channel [17:16] ryah: pquerna: hm - for server-side connections i think we should be able to inherit the cert store [17:16] RusAlex: guys, is req.flash has been saved throught res.redirect ? [17:16] Max-Might has joined the channel [17:16] tjholowaychuk: RusAlex: req.flash() messages are in the session [17:17] dgathright has joined the channel [17:17] pquerna: ryah: perhaps, i was just thinking of keeping a hash of certs -> x509 objects more generically. [17:17] RusAlex: tjholowaychuk: will try to check it . [17:17] doubletap has joined the channel [17:17] pquerna: (root ca in there, custom cas too, other certs, etc) [17:17] doubletap has left the channel [17:18] heythisisdave has joined the channel [17:18] littke has joined the channel [17:18] brianmario has joined the channel [17:19] Country has joined the channel [17:19] jano has joined the channel [17:19] DoNaLd`: i will have one instance of nodejs application on more subdomains, is it possible working in nodejs with request from more sudomains .. something like john.myblog.org .. or peter.myblog.org .. etc. [17:19] ryah: pquerna: binding x509 objects to js and using a cert text in an object as key - might be good [17:19] brianmario has joined the channel [17:19] malkomalko: tjholowaychuk: looks like a connect problem.. if you just go into the node repl and do a require('connect') it returns back a blank object [17:19] kaichen has joined the channel [17:19] tjholowaychuk: malkomalko: no it's npm I assure you [17:20] tjholowaychuk: malkomalko: 100% [17:20] ryah: pquerna: but now that i think about it, server-side connections like mjr's should not be creating new ca_stores [17:20] michaelku has joined the channel [17:20] tjholowaychuk: we just had that issue 2 days ago [17:20] V1 has joined the channel [17:20] kaichen has joined the channel [17:20] malkomalko: I mean.. npm with connect though [17:20] ryah: pquerna: it should be made once and shared among all ssl contexts [17:20] tjholowaychuk: malkomalko: it's not connect specific [17:20] alek_br has joined the channel [17:20] tjholowaychuk: it happens with others as well [17:20] pquerna: +1 [17:21] malkomalko: ok, well I believe you :) [17:21] malkomalko: however [17:22] malkomalko: var connect = require('connect@1.2.1') yields back nothing [17:22] indexzero has joined the channel [17:22] malkomalko: var connect = require('connect@1.0.6) yields back something [17:22] paulrobinson has left the channel [17:22] malkomalko: just sayin :P [17:22] tjholowaychuk: yeah, it's something to do with how npm sets stuff up, we switched to some different npm version and it worked [17:22] ryah: pquerna: i'm pretty sure there's a way to do that in openssl automatically... (without having to call SSL_CTX_set_cert_store) [17:22] tjholowaychuk: but the state of that stuff is a bit of a mess [17:22] bingomanatee: Hey TJ - my latest version of express is marked as "beta" - is there a more stable version of express that I should back off to? [17:22] malkomalko: yah, hopefully 1.0 gets pushed out soon, and things can resolve [17:23] malkomalko: 2.2.0 is out bingomanatee [17:23] bingomanatee: okay thanks [17:23] tjholowaychuk: bingomanatee: 2.0 [17:23] meandi has joined the channel [17:23] littke_ has joined the channel [17:23] tjholowaychuk: bingomanatee: actually, 2.2 [17:23] tjholowaychuk: haha [17:23] tjholowaychuk: moving quickly [17:23] bingomanatee: aaasome. [17:24] hij1nx has joined the channel [17:24] bingomanatee: What kind of things are you focusing on in express nowadays? [17:24] timcosgrove has joined the channel [17:24] tjholowaychuk: added some cool stuff like app.get('/user/:id') => [Function, Function], app.match.get('/user/12'), will be handy for high level frameworks [17:24] tjholowaychuk: nothing to crazy [17:24] timcosgrove has left the channel [17:24] tjholowaychuk: just maintaining simplicity [17:25] malkomalko: i like the new res.locals(obj) that's hot [17:25] tjholowaychuk: yeah [17:25] tjholowaychuk: and res.local(key, val) for a single one [17:25] tjholowaychuk: handy stuff [17:25] tjholowaychuk: but now locals come from like 15 places haha [17:25] DoNaLd`: hello people, i will have one instance of nodejs application on more subdomains, is it possible working in nodejs with request from more sudomains .. something like john.myblog.org .. or peter.myblog.org .. etc. [17:26] malkomalko: true, but res.local is awesome for adding things from middleware, for like auth and stuff like that... very handy [17:26] ryah: DoNaLd`: use the 'Host' header [17:26] DoNaLd`: ryah: ou .. thnx for hint [17:26] tjholowaychuk: malkomalko: yeah totally [17:27] malkomalko: and so the new res.partial can be used behind an ajax request to render out a partial to the view.. is that the logic there? kind've like how rails did it back in the day? [17:27] tjholowaychuk: malkomalko: dunno about rails, but yeah that was the ideal [17:27] tjholowaychuk: idea [17:27] tjholowaychuk: * [17:27] bradleymeck has joined the channel [17:28] indexzero: DoNaLd: https://gist.github.com/869781 [17:28] malkomalko: jesus.. request, response, app, and settings are all exposed to the views now? lol [17:28] ryah: https://github.com/joyent/node/blob/75db1995b6529cb71513a45299e2ba742e7afde9/lib/tls.js#L722-727 <-- not good [17:28] ryah: ^-- called on every accept() [17:28] indexzero: multiple subdomains also handled easily in node-http-proxy [17:28] eventi has joined the channel [17:28] creationix has joined the channel [17:28] creationix has left the channel [17:28] tjholowaychuk: malkomalko: yup lol, makes it annoying to console.log() the locals, but people wanted it [17:29] malkomalko: I feel like that's a poor decision, people could've added that shit in if they wanted to know? [17:29] malkomalko: what was the use case for having that in every view? [17:29] mraleph has joined the channel [17:29] admc1 has joined the channel [17:29] DoNaLd`: indexzero: excellent .. thank you very much ! [17:29] xastey` has joined the channel [17:29] tjholowaychuk: malkomalko: generally I agree with leaving things out, but I've had so many requests for it that it was a might as well thing [17:30] tjholowaychuk: malkomalko: but yeah generally I agree to leave things customizable. settings is just one that I wanted [17:30] brianmario has joined the channel [17:30] malkomalko: settings I can see, that makes sense [17:30] spaceinvader: 13.89M 27% 1.02MB/s 0:00:34 [17:30] tjholowaychuk: yeah I'm meh about the others, settings IMO is a must [17:30] spaceinvader: oops [17:30] malkomalko: but to have the whole request, response object, I guess I see little value, and it pollutes it with two gigantic objects [17:31] yozgrahame has joined the channel [17:31] tjholowaychuk: I could remove response, that one is kinda pointless [17:32] malkomalko: do whatever you must, just some food for thought [17:32] ryah: pquerna: it's a matter of creating a ctx for the whole server and using SSL_new() instead of SSL_CTX_new() [17:32] ryah: this is the proper way to do this [17:33] pquerna: ah, right [17:33] pquerna: as long as the ssl_new is tied to the securecontext [17:33] pquerna: and we re-use that... [17:33] pandeiro has joined the channel [17:33] pquerna: it should all magically be goodness [17:34] norviller has joined the channel [17:34] xastey: anyone have experience with faye.js for node? [17:34] bartt has joined the channel [17:35] EyePulp: xastey: using it in a current project [17:35] mhooker has joined the channel [17:35] Erikcorry has joined the channel [17:35] xastey: experience any missed messages ? [17:36] seivan has joined the channel [17:36] xastey: beend doing some testing with siege [17:36] EyePulp: in which direction? (in either case I don't *think* so) [17:36] xastey: a simple test of 10messages per second range from only 3-5 messages being recieved on the client end [17:36] hellp has joined the channel [17:36] xastey: to the clients [17:36] xastey: from another client publishing [17:37] malkomalko: app.lookup.verb, app.match.verb and app.verb all return the route callback now tj? [17:37] tjholowaychuk: malkomalko: an array of callbacks. app reflection [17:37] EyePulp: xastey: I think faye has built in bundling of messages above a certain speed threshold, but you shouldn't have missing messages. [17:37] tg has joined the channel [17:38] malkomalko: so app.get with only the route returns the callbacks where app.get with route, callback defines it? [17:38] xastey: I think your talking about the MAX_DELAY setting right.. which is at 0.001 [17:38] EyePulp: that just means some would get lumped together - I think it's to prevent overwhelming the long-polling transport [17:38] tjholowaychuk: malkomalko: lookup is for the route so a regexp or string like "/user/:id", and match is tests a given url and returns routes that can match it (doesn't invoke any route callbacks) [17:38] __sorin__ has joined the channel [17:38] xastey: actually wait [17:38] tjholowaychuk: malkomalko: yup [17:38] xastey: this may be my fault [17:38] xastey: ..maybe i'm not readin over the message data right [17:38] xastey: lol... [17:38] EyePulp: xastey: I'm interested in what you find - either way [17:38] sorens3n: hmm, is faye usable with dnode? [17:38] malkomalko: need to wrap my head around how to use those, seems powerful on the outside [17:38] EyePulp: I'd like to know faye isn't going to lose stuff =) [17:38] sorens3n: or would it be one or the other [17:39] xastey: It should return an array for multiple messages [17:39] tjholowaychuk: malkomalko: so an express plugin-ish thing could basically ask the app if it has a route already defined to handle something, if not then define one etc. potentially very powerful [17:39] xastey: I'm pretty sure I'm doing something wrong there [17:39] EyePulp: sorens3n: I think dnode is socket.io based [17:39] V1: ^ yes it is [17:39] malkomalko: makes sense [17:39] broofa has joined the channel [17:40] fermion has joined the channel [17:40] sorens3n: hmm [17:40] malkomalko: also, any good examples of jade client side? [17:40] hobo has joined the channel [17:40] sorens3n: what are you doing in jade? [17:40] hobo: well? [17:40] tjholowaychuk: malkomalko: just require('jade').compile(str) => Function [17:40] tjholowaychuk: in the browser [17:40] rpflo has joined the channel [17:41] malkomalko: last week I tried adding the jade.min.js into my browser and it was returning errors because of the require [17:41] malkomalko: was that a bug that got fixed? [17:41] tjholowaychuk: hm [17:41] tjholowaychuk: cant remember [17:41] malkomalko: aight, I'll try again [17:41] sorens3n: ah, i actually had trouble using jade with browserify [17:41] malkomalko: now I gotta go fix this damn npm problem so I can use it :D [17:41] sorens3n: due to the require [17:41] tjholowaychuk: sorens3n: it has a stand-alone thing [17:41] tjholowaychuk: you dont need browserify [17:42] malkomalko: truth [17:42] tjholowaychuk: nor do i want it to depend on another library [17:42] sorens3n: i was using browserify for other things [17:42] tjholowaychuk: but i gotta run [17:42] copongcopong has joined the channel [17:42] malkomalko: peace [17:42] sorens3n: adios [17:42] tjholowaychuk: (still here, just got lots to do) [17:45] xastey` has joined the channel [17:46] darshanshankar has joined the channel [17:47] lupomontero has joined the channel [17:47] errumm has joined the channel [17:48] indexzero_ has joined the channel [17:51] xastey`: EyePulp you using any clustering modules? [17:52] EyePulp: i use cluster, but only with a single worker (seem to get weird issues w/ faye & cluster with multiple workers) [17:52] xastey: yeah same here [17:52] xastey: its because it works with the server messages [17:52] matschaffer has joined the channel [17:52] xastey: eh.. event listeners I mean [17:53] EyePulp: ACTION casts sidelong glances at tjholowaychuk  [17:53] stonebranch has joined the channel [17:53] EyePulp: xastey: not sure I follow [17:53] xastey: hanv't figure out a way to do other wise.. guess one would have to make an plug for cluster to do so [17:53] xastey: this._overrideListeners(httpServer, 'request', 'handle'); [17:53] tjholowaychuk: they should be built to scale [17:53] tjholowaychuk: not my fault :p [17:53] xastey: manly that [17:54] xastey: I think for it to work with cluster.js you need to work with the sockets and not the actual server instance [17:54] EyePulp: tjholowaychuk: =P [17:54] xastey: other wise you will get n number of reconnects as many workers you have [17:54] xastey: and they all reply with "unknown client" [17:54] dmshann0n has joined the channel [17:54] tjholowaychuk: if they were designed for a single process, then that is their failure [17:54] tjholowaychuk: you shouldn't rely on a single process maintaining state [17:55] EyePulp: ACTION is a bit lost, but that's nothing new [17:55] stonebranch has joined the channel [17:55] xastey: besides this missed messages problem faye runs pretty good [17:56] EyePulp: xastey: how do you do testing of your clients? I'm trying to make headway with zombie at the moment [17:56] xastey: seige [17:56] xastey: and make a direct publish request (GET) to the server [17:56] V1: tjholowaychuk: Socket.IO has the same issue ;) [17:56] tjholowaychuk: V1: yup [17:56] V1: Your fault ;) [17:56] EyePulp: heh [17:56] tjholowaychuk: i dont work on socket.io lol [17:56] xastey: heh [17:56] V1: doh :P [17:57] arpegius_ has joined the channel [17:57] insin has joined the channel [17:57] V1: your fault for not whipping Guillermo enough ;) [17:58] tjholowaychuk: it will happen lol we are just busy with a big refactor [17:58] tiagoa: preview of book about Node.js http://ofps.oreilly.com/titles/9781449398583/index.html [17:58] V1: tjholowaychuk: Iknow, just messing with you :9 [17:59] tjholowaychuk: :D [17:59] mscdex: tiagoa: 2010? it's already outdated! [17:59] mscdex: :) [17:59] dmcquay has joined the channel [17:59] tiagoa: but it's a preview [18:00] mscdex: at this point, node should be a google doc or something [18:00] mscdex: s/node/a book on node/ [18:00] EyePulp: tjholowaychuk: I get nervous when you say "a big refactor" [18:00] tjholowaychuk: EyePulp: of our app [18:00] tjholowaychuk: nothing open source [18:00] EyePulp: ah... [18:00] EyePulp: relief washes over him [18:00] mavin has joined the channel [18:01] mscdex: refactors are fun! [18:01] mscdex: :-D [18:01] dilvie has joined the channel [18:01] dilvie: hi [18:01] mscdex: hola [18:02] gozala has joined the channel [18:02] f3r3nc: mscdex: i wrote a perl script which reads lines from a file. converts them into http request then hammers a http server on 10 threads. i was hoping to speed this up with node, thus the read line async problem. but it seems that my node is worse than my perl :) [18:02] V1: EyePulp: Socket.IO also gets a big refactor, so be nervous ;) [18:03] Andi5 has joined the channel [18:03] EyePulp: V1: I jumped ship from socket - I'm a faye fanboy for the moment. =P [18:03] mscdex: f3r3nc: well, i guess you could try dealing with raw Buffers instead if .substr() is the bottleneck... [18:03] V1: O M G /block EyePulp ;) [18:03] EyePulp: just had too much trouble tracking down disconnects across transports. [18:03] kixxauth has joined the channel [18:03] mscdex: f3r3nc: maybe profiling the node app might show where it's spending most of the time [18:04] f3r3nc: mscdex: ic [18:04] f3r3nc: mscdex: thanks, i'll look into that [18:04] EyePulp: V1: believe me, I had invested so much time in dealing with correcting dropped connections I didn't want to re-write for faye. [18:05] V1: EyePulp: I can understand that :p debugging somebody elses code is painfull :p [18:05] ruggedcoder has joined the channel [18:05] mscdex: f3r3nc: maybe there's a more efficient way of detecting line endings too i dunno [18:05] EyePulp: V1: I won't be shocked if I come back to socket at some point. It's got a lot of things I like (and more I probably don't appreciate) [18:06] tg has joined the channel [18:06] colinclark has joined the channel [18:06] f3r3nc: mscdex: i am doing quite a bit of string length adjustment. i could drop that. but profiling is probably the 1st step :) [18:07] steffkes has joined the channel [18:07] f3r3nc: mscdex: thank or your help. gotta go now. [18:07] f3r3nc: bye [18:07] dilvie: any storify peeps in here? [18:08] V1: EyePulp: Like most people would say "The next version will be so much better" ;) [18:08] EyePulp: =) [18:09] tbranyen: V1: oh btw i was talking about firefox mobile the other day, which has websockets support [18:10] tbranyen: and webgl [18:10] V1: tbranyen: It's not disabled? how odd [18:10] tbranyen: yea [18:10] davidascher has joined the channel [18:10] beckje011 has joined the channel [18:11] V1: tbranyen: Are there emulators available for testing? [18:12] tbranyen: presumably you could get the android emulator and install the apk into that [18:12] V1: I'm a mac fan boy and don't have android stuff :p [18:12] tbranyen: android sdk runs on os x [18:12] tbranyen: has guis too [18:12] llkazu has joined the channel [18:12] wink_: the android emus are awesome as long as you're not doing any real opengl work [18:13] wink_: at least on windows the emu doesnt hw accel opengl [18:13] paulrobinson has joined the channel [18:13] wink_: so things run like crap [18:13] wink_: windows/linux i should say [18:13] V1: Probably the same for Mac to [18:13] Horofox: i'm using A HEAVY BIG LOT of socket.io in my app, is socket.io expensive in resources usage? [18:14] tbranyen: i don't know what a heavy big lot [18:14] tbranyen: is [18:14] tbranyen: Horofox: depends entirely on which method is connecting [18:14] Horofox: it's close to infinity [18:14] Horofox: oh [18:14] Horofox: what if i make all my users use websockets, is it ok? [18:15] V1: 12000 websocket connections made my process rise from 13mb to 19mb.. [18:15] tbranyen: Horofox: then why bother using socket.io? [18:15] Horofox: tbranyen: i expect most of my visitors to have websockets on [18:15] tbranyen: Thats cool, must be a lot of chrome users [18:15] tbranyen: since its diabled by defualt in everything else [18:16] Horofox: I will show how to enable it in firefox and opera [18:16] Horofox: and as the app works way smoother when using websockets, i bet most of them will agree [18:16] nciagra has joined the channel [18:16] wink_: anyone want to go protest in front of mozilla hq? their move to hold up websockets should earn them at least a little flaming [18:17] wink_: :< [18:17] Horofox: V1: what if i want to send to that 12000 users, is that "expensive"? [18:17] V1: wink_: FF has already implemented the new WebSocket specification 06.. So they just have to push it to the trunk.. and have alll FF4 users upgrade again... [18:17] bwinton: wink_: There are a couple of mozilla developers here. Can we just take your protest as given? [18:18] V1: Horofox: That would probably take some CPU cycles, but I didn't do any measurements on that yet [18:18] Horofox: V1: do u have any experience with that in production? does it work alright? [18:18] jetienne has joined the channel [18:18] wink_: bwinton: sure <3 [18:18] riven has joined the channel [18:18] riven has joined the channel [18:18] wink_: that'll save me a flight [18:18] Horofox: V1: i expect to do that like, 5 times a second to every user [18:18] paulrobinson has left the channel [18:18] V1: Horofox: I have Socket.IO running in production serving to about 100.000 concurrent connections [18:19] Horofox: and separately(not using broadcast) [18:19] Horofox: V1: oh... [18:19] ruggedcoder has left the channel [18:19] bwinton: wink_: Excellent. :) [18:19] ruggedcoder has joined the channel [18:19] Horofox: V1: how fast is it? :))) [18:19] V1: So yup, it works well. But that's all I can comment on that as the I'm tight to a NDA policy for that project.. [18:19] Horofox: oh :( [18:19] eirikurn has joined the channel [18:19] Horofox: damn its awesome hehe [18:20] V1: Horofox: It's still fast, but it does run on a huge dedicated machine [18:20] zomgbie has joined the channel [18:20] kaichen has joined the channel [18:21] bx2 has joined the channel [18:22] Horofox has joined the channel [18:23] mryan has joined the channel [18:24] akasimir has joined the channel [18:26] fly-away has joined the channel [18:27] arpegius has joined the channel [18:27] fermion has joined the channel [18:29] dmshann0n has joined the channel [18:30] eee_c has joined the channel [18:31] eee_c1 has joined the channel [18:33] tjholowaychuk has joined the channel [18:33] reid_ has joined the channel [18:34] hornairs has joined the channel [18:34] patcito has joined the channel [18:35] kristsk has joined the channel [18:35] sub_pop has joined the channel [18:36] steph021 has joined the channel [18:36] blueadept has joined the channel [18:43] tmpvar has joined the channel [18:45] copongcopong has joined the channel [18:45] matschaffer has joined the channel [18:46] jiveB has joined the channel [18:48] teemow has joined the channel [18:49] Quilck has joined the channel [18:49] norviller has joined the channel [18:50] statico has joined the channel [18:50] Horofox: anybody knows how do i "query" something in mongoose to find something like "find all ids that aren't 5" [18:50] Aikar: read docs? [18:50] Aikar: lol [18:51] Horofox: Aikar: i didnt find in docs [18:52] Horofox: Aikar: docs delayed as shit [18:52] mikegerwitz: Horofox: http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-%24ne [18:52] vckt has joined the channel [18:52] tmpvar: lol [18:52] mikegerwitz: Horofox: apply that concept to mongoose, if possible..I haven't used it [18:52] indexzero has joined the channel [18:52] nonnikcam has joined the channel [18:52] Horofox: mikegerwitz: ty, will try [18:54] isaacs has joined the channel [18:54] piscisaureus has joined the channel [18:54] mikeal: anyone here working with harmony:proxies ? [18:55] mryan has joined the channel [18:55] isaacs: uhoh [18:55] beckje01 has joined the channel [18:55] MikhX has joined the channel [18:56] tjholowaychuk: mikeal: I think there is a module in npm [18:56] tjholowaychuk: but it has the node- prefix (I think) [18:56] mikeal: i know [18:56] mikeal: i just need to figure out what the fuck this promiseFor thing is [18:56] tjholowaychuk: haha, the api is kinda shitty [18:57] tjholowaychuk: ive only used them a little bit, not a huge fan [18:57] arpegius_ has joined the channel [18:57] liar has joined the channel [18:58] statico: anyone know offhand how to install npm into an alternate directory, like /opt? [18:58] statico: (i'm stuck on centos) [18:59] mikeal: so [18:59] mikeal: in the spec they have this async accessor pattern [18:59] mikeal: and it uses a fuction called promiseFor [19:00] nciagra has joined the channel [19:00] mikeal: which is totally undefined in the spec [19:00] piscisaureus: ACTION has entered the building [19:00] mikeal: but it either means, proxy.attr will return a promise object of your own design [19:00] mikeal: or it's a backdoor fiber type thing [19:00] mikeal: which would be the terrible [19:00] isaacs: statico: what version of npm are you trying to install? [19:01] statico: isaacs: oh hai -- the latest. i've scoured the docs and i'm just trying to understand where npm will put thing. [19:01] dmcquay_ has joined the channel [19:01] statico: s/thing/things/ [19:02] isaacs: statico: so, npm will default its paths based on the location of the node binary [19:02] isaacs: ie, `which node` [19:02] statico: ahhhhhhh, ok [19:02] piscisaureus: ryah: do we need to guarantee that ol_close_cb is called from a fresh stack? [19:02] statico: isaacs: and it'll put libraries in `which node`/../lib ? [19:03] isaacs: statico: so, if you install node in /opt/local/bin, then npm will read global confs from /opt/local/etc/npmrc, put global installs in /opt/local/lib/node_libraries, global bins in /opt/local/bin [19:03] isaacs: statico: yes [19:03] ryah: piscisaureus: maybe [19:03] ryah: piscisaureus: in node we nextTick it [19:04] statico: isaacs: beautiful. thank you very much. [19:04] isaacs: statico: np. [19:04] piscisaureus_ has joined the channel [19:04] isaacs: statico: btw: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [19:04] isaacs: statico: you can change that by setting the "prefix" conf in npm [19:04] statico: thanks! [19:04] piscisaureus_: ryah: hmm ok [19:05] ryah: piscisaureus_: we had an interesting dicussion here last night [19:05] ryah: piscisaureus_: joshthecoder would like to write a libol backend for apple's CF event loop [19:05] piscisaureus_: ok. sorry I missed my flight :p [19:05] piscisaureus_: that is pretty awesome [19:05] ryah: yes [19:05] piscisaureus_: who is joshthecoder? [19:05] joshthecoder: oh hi :) [19:05] ryah: some dude [19:06] joshthecoder: yeah I am that dude [19:06] statico: isaacs: (and hello from San Mateo) [19:06] SubStack: tjholowaychuk: it's not that you /need/ browserify for jade, just that it makes it much more convenient to use it browser-side [19:06] ryah: if we can actually fork lift node onto libol - that's going to be awesome [19:06] SubStack: copying over files is lame [19:06] isaacs: statico: :) [19:06] isaacs: ryah++ [19:06] v8bot: isaacs has given a beer to ryah. ryah now has 2 beers. [19:07] tjholowaychuk: SubStack: does browserify convert stuff like __proto__ = ? [19:07] SubStack: tjholowaychuk: also knock off that require() stuff in jade's browser dist :p [19:07] ryah: e.g. we'll be able to run in the main event loop of iphone or mac apps [19:07] tjholowaychuk: pfft [19:07] SubStack: __proto__? [19:07] ryah: (instead of a thread - which is how current hacks are doing it) [19:07] tjholowaychuk: SubStack: my script takes node stuff and converts it to browser stuff, so I can still write jade as if it was only for node [19:07] tjholowaychuk: more or less [19:07] SubStack: it uses es5-shim and crockford's json2.js is all [19:07] ryah: assuming iphone allows people to mmap executable blocks in the future [19:07] piscisaureus_: ryah: joshthecoder: how long will it take to write a prototype CF event loop [19:07] ryah: could be really intersting [19:08] SubStack: tjholowaychuk: yes that is what browserify does generally so you don't need to implement it yourself in every module with a browser component [19:08] piscisaureus_: ryah: I heard mraleph say something about that lately [19:08] indexzero_ has joined the channel [19:08] joshthecoder: piscisaureus_ I just started last night, hoping to have something running later today [19:08] piscisaureus_: ah awesome [19:08] ryah: piscisaureus_: http://developer.apple.com/library/ios/#documentation/CoreFoundation/Reference/CFSocketRef/Reference/reference.html [19:09] SubStack: tjholowaychuk: you can use it internally in modules to generate source for modules without having to make the end-user worry about using it [19:09] piscisaureus_: it would be good to now whether CF can conveniently expose the current API before we proceed [19:09] SubStack: I did that in dnode to expose /dnode.js [19:09] tjholowaychuk: SubStack: I'll have to check it out better some time [19:10] joshthecoder: I would probably still use libev for servers, but for embedding into existings apps w/ CFRunLoop driving will now be possible [19:10] ryah: piscisaureus_: indeed [19:10] MrTopf has joined the channel [19:10] ryah: joshthecoder: why? [19:10] SubStack: and jade is in the unit tests for browserify already even so it already works! [19:10] ryah: i wonder what the socket perf of CFRunLoop is [19:10] ryah: if we had some cross platform tests we could test :) [19:11] joshthecoder: ryah: I believe CFSocket uses select() internally inside a thread. So it probably will match libev w/ select backend [19:11] ryah: what? [19:11] onr: tjholowaychuk: expressjs with jade 600 req/sec, with ejs 1200 req/sec, with res.send() 7000 req/sec [19:11] joshthecoder: but kqueue might scale better [19:11] brez has joined the channel [19:11] piscisaureus_: w00t [19:11] ryah: that sucks [19:11] tjholowaychuk: SubStack: cross browser though? it was full of tons of things that wont work in a lot of browsers [19:11] tjholowaychuk: SubStack: I have conditional stuff in the source that only my compiler thing will recognize etc [19:11] SubStack: working on that [19:11] SubStack: I've got es5-shim and json2.js [19:11] tjholowaychuk: onr: NODE_ENV=production [19:12] piscisaureus_: joshthecoder: but what is the point of using CF then? [19:12] tjholowaychuk: onr: on my macbook I get about 2500 w/ jade [19:12] onr: tjholowaychuk: i dont know where to set NODE_ENV [19:12] SubStack: compiler eh? I'm working on adding per-module wrapper functions [19:12] joshthecoder: piscisaureus_: well for my case I want to embed node into a cocoa app [19:12] SubStack: for preprocessors, code generators, or whichever [19:12] tjholowaychuk: onr: $ NODE_ENV=production node app.js [19:13] ryah: piscisaureus_, joshthecoder: http://lists.apple.com/archives/macnetworkprog/2009/Feb/msg00047.html [19:13] liar has joined the channel [19:13] ryah: lame [19:13] joshthecoder: code: http://www.opensource.apple.com/source/CF/CF-476.15/CFSocket.c [19:13] gJ|Alex has joined the channel [19:14] ryah: oh wow, source code [19:15] ryah: you don't see that in Windows-land [19:15] piscisaureus_: " 2) When your callback is called, always read all data/packets until you get an EWOULDBLOCK error " [19:15] piscisaureus_: ^- that requirement was a dealbreaker for implementing a better libev windows backend that uses WSAEventSelect [19:16] Me1000 has joined the channel [19:16] onr: tjholowaychuk: great! 3500 req/sec with jade [19:17] tjholowaychuk: onr: :) [19:17] tjholowaychuk: I need masssive text in the guide "SET NOD_ENV!!!!" [19:17] mhooker has joined the channel [19:17] ddollar has joined the channel [19:17] indutny1 has joined the channel [19:18] piscisaureus_: joshthecoder: if you can do a CF backend I'm totally fine with that. But if it means that you're swapping kqueue-eventloop-with-CF-thread for CF-eventloop-with-select-thread, I do not see the point of it. [19:18] mryan has left the channel [19:19] Booths has joined the channel [19:21] piscisaureus_: or am I judging too fast? [19:21] joshthecoder: piscisaureus_: for servers it doesn't make sense, but I am trying to run node within a cocoa app [19:21] joshthecoder: which already has its own loop [19:22] gwm__ has left the channel [19:23] saikat has joined the channel [19:23] piscisaureus_: joshthecoder: okay but, why not run the message pump in a thread and relay them to the main event loop using ev_async? [19:23] piscisaureus_: *them = the messages [19:23] pifantastic: Anyone know of some really good geo modules for node? [19:24] joshthecoder: well yeah that could work, but node/v8 needs to be on the main thread as well [19:25] raidfive has joined the channel [19:26] joshthecoder: rolling a backend for libol using CFSocket seems the quickest route (moves polling into it's own thread, handles all message passing, etc) [19:26] joshthecoder: vs trying to roll a kqueue based run loop source [19:26] indexzero has joined the channel [19:26] draginx1 has joined the channel [19:26] tjh has joined the channel [19:27] hornairs has joined the channel [19:27] joshthecoder: run loop custom source: http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/Art/custominputsource.jpg [19:27] arpegius has joined the channel [19:29] eshira_ has joined the channel [19:29] errumm has joined the channel [19:29] joshthecoder: "FSocket uses select in a second thread because there's no way on Mac OS X to wait on an event on a mach port and a file descriptor at the same time." [19:30] joshthecoder: : \ Guess that's why apple didn't use kqueue [19:31] tg has joined the channel [19:31] piscisaureus_: joshthecoder: I don't quite understand that. Why would they not use kqueue in a thread? [19:31] joshthecoder: cause you need to listen to a mach port to communicate back to the run loop main thread, but I guess OSX does not allow listening to both mach ports and file descriptors in the same thread [19:31] saschagehlich has joined the channel [19:32] piscisaureus_: so ryah, how will _you_ make sure that close_cb runs from a different stack? use ev_idle? [19:32] Gruni has joined the channel [19:32] joshthecoder: mach port = message queue for inter-thread/process communication [19:32] eshira_: I want to use rails + node together, and so I need them to use the same port somehow, at least seemingly so at the user level. What's a good solution to this? I've heard some people use varnish on top of their webserver (i'm using nginx). [19:33] colinclark has joined the channel [19:33] tbranyen: eshira_: nginx can do that out of the box [19:33] tbranyen: just use proxy_pass [19:33] varioust has joined the channel [19:34] tsutton has joined the channel [19:36] piscisaureus_: I wonder why it is so hard to make an OS that can wait for different types of stuff [19:37] joshthecoder: piscisaureus_: no kidding [19:37] piscisaureus_: no kidding ideed. On windows it is the same hell [19:37] joshthecoder: trying to verify that statement, but got a feeling it true. Otherwise apple would just use poll/kqueue in the first place [19:38] CIA-1: node: 03Ryan Dahl 07master * rf2dd8dd 10/ test/message/undefined_reference_in_new_context.js : [19:38] CIA-1: node: Fix test/message/undefined_reference_in_new_context [19:38] CIA-1: node: Broke after 75db199. - http://bit.ly/eQFO7Y [19:38] ryah: piscisaureus_: not sure [19:38] mikeal has joined the channel [19:38] eshira_: tbranyen: thanks. [19:38] CIA-1: node: 03Ryan Dahl 07v0.4 * r362785f 10/ src/node_crypto.cc : [19:38] CIA-1: node: Disable compression with OpenSSL. [19:38] CIA-1: node: This improves memory and speed. Users may apply compression in "userland" [19:38] CIA-1: node: above the CryptoStream layer if they desire. - http://bit.ly/fP7nfK [19:39] joshthecoder: I don't really need huge scaling for this use case (just a desktop app), so using select won't big a huge deal [19:39] ryah: shit. ignore 362785f [19:39] CIA-1: node: 03Ryan Dahl 07v0.4 * ra7254f3 10/ src/node_crypto.cc : [19:39] CIA-1: node: Revert "Disable compression with OpenSSL." [19:39] CIA-1: node: This reverts commit 362785f704b5754f6025bc4bcbe5835688d3002c. - http://bit.ly/gmvwxI [19:39] xla has joined the channel [19:42] TheIronWolf has joined the channel [19:43] paulrobinson has joined the channel [19:43] timmywil has joined the channel [19:43] devdazed has joined the channel [19:44] Tobsn: lol [19:44] Tobsn: ryan? hehe [19:44] paulrobinson has joined the channel [19:44] vladikoff has joined the channel [19:45] joshthecoder: "This may have changed in 10.6, which now has APIs which are capable of monitoring both mach ports and file descriptors at the same time. " [19:45] joshthecoder: Oh yeah might be some hope yet! [19:45] piscisaureus_: shit, my laptop is running out of gas [19:45] piscisaureus_: can you verify that? [19:45] mikeal has joined the channel [19:46] piscisaureus_: I mean you just showed us some source code? If that is true, there should be newer source code without select somewhere right? [19:47] bradleymeck has joined the channel [19:48] eirikurn has joined the channel [19:49] piscisaureus_: ACTION bye. out of gas [19:49] nciagra has joined the channel [19:51] liquidproof has joined the channel [19:54] maushu has joined the channel [19:55] springify has joined the channel [19:57] edw has joined the channel [19:58] arpegius_ has joined the channel [19:58] edw: OMFG mutable variables + clojures + lack of a real map = a world of node.js pain. [20:00] ckknight: edw: clojures in node.js? do you mean closures? :P [20:01] ckknight: also, does request.url contain the querystring? [20:01] EyePulp: xastey: is that you in the faye google group? [20:01] edw: ckknight: D'oh, I've been doing a lot of clojure coding recently. [20:01] Draggor: clojure is cool [20:02] ckknight: edw: but yeah, mutable structures can be a hassle to deal with. [20:02] iammerrick has joined the channel [20:02] Draggor: mutable structures outside of transactions can be a hassle* [20:02] edw: Is there a preferred module that provides a jQuery-style map(), grep(), etc.? [20:02] mscdex: ckknight: yes [20:02] iammerrick: Noob question does each file in node have there own local variable scope? [20:03] Draggor: underscore.js adds a lot of nice functional things [20:03] edw: Draggor: Thanks. [20:03] techwraith has joined the channel [20:03] iammerrick: so two files loaded concurrently have two separate var hi = 'hello'; [20:03] mscdex: iammerrick: yes [20:03] Draggor: I really need to write a monad thing in JS [20:03] mattmcmanus has joined the channel [20:03] iammerrick: mscdex: Sweet. [20:04] ckknight: Draggor: what'll that allow you that you can't do now, though? [20:04] Draggor: ckknight: Nothing, more of a just because project to help me understand monads kinda [20:04] ckknight: okay then [20:05] Draggor: For funsies, that's the term I was looking for [20:05] edw: I'd forgotten how much I hate JS w/o a functional programming library. Underscore will save my sanity. [20:05] Draggor: edw: before I found it I wrote a good portion of it on my own, heh [20:05] tjh: edw: I find if you are doing that stuff, (usually) the performance matters, in which case unrolling it to a for loop is muuuuuch better [20:06] tsutton has joined the channel [20:06] tjh: but for quick hacky / cli stuff its fine i guess [20:06] timmywil has joined the channel [20:06] edw: tjh: I hear you, but this is for initialization code that runs once. [20:06] tjh: yeah totally then [20:07] johnnywengluu: hm [20:07] johnnywengluu: i try to write to a file: fs.writeSync(path.join(cwd, 'events.log'), string, null, 'utf8'); [20:07] tbranyen: short nick is short [20:07] johnnywengluu: fs.js:302 [20:07] johnnywengluu: return binding.write(fd, buffer, offset, length, position); [20:07] johnnywengluu: ^ [20:07] johnnywengluu: TypeError: Bad argument [20:07] johnnywengluu: what does it mean [20:08] kristsk: it's bad, man. [20:08] drudge: aheckmann: do you have any successful reports of mongoose working in a windows environment? [20:08] edw: Without a map(), I can totally understand what's-his-name's "only one level of closures" advice. Causal, everyday mutation is so freaking evil. [20:09] johnnywengluu: what is bad? [20:09] aheckmann: drudge i haven't heard of any [20:10] johnnywengluu: hm think i get it [20:10] johnnywengluu: i should pass a stream to a file [20:10] johnnywengluu: but how do i do that? [20:11] edw: Oh, there's [1,2,3].map! [20:11] drudge: aheckmann: i've got a simple app that works great on mac/linux, made sure mongod is running on windows with all dependencies met i get no errors and it doesn't hit any mongoose methods in the code [20:11] tg has joined the channel [20:12] johnnywengluu: yay [20:12] johnnywengluu: fs.openSync() [20:12] doubletap has joined the channel [20:12] doubletap has left the channel [20:12] aheckmann: drudge can you connect to mongo directly? [20:12] drudge: yes [20:12] johnnywengluu: is there a way to write pretty formatted json to a file? [20:13] mhooker has joined the channel [20:13] johnnywengluu: now its one long line [20:13] aheckmann: drudge: can you track down the line where it stops? [20:13] aheckmann: does it just hang? [20:13] mscdex: johnnywengluu: util.inspect()? [20:14] johnnywengluu: mscdex: i mean writing it to a file [20:14] mscdex: i know [20:14] drudge: it appears to just hang yes, trying to see if i can get something useful from the debugger [20:14] drudge: aheckmann: ^ [20:14] johnnywengluu: hmm [20:14] mscdex: inspect returns a formatted string [20:14] johnnywengluu: ah [20:14] mscdex: with newlines and indentation [20:15] fermion has joined the channel [20:15] heavysixer has joined the channel [20:15] johnnywengluu: nope [20:15] johnnywengluu: didnt work [20:15] heavysixer has joined the channel [20:15] techwraith: johnnywengluu I usually use JSON.stringify(obj, null, 2) [20:15] johnnywengluu: still on one line with my IDE [20:15] Hello71 has joined the channel [20:15] Hello71 has joined the channel [20:17] tylerstalder has joined the channel [20:17] matschaffer has joined the channel [20:17] techwraith: that allows you to selec which properties you want output too - just replace null with an array of property names [20:17] Ori_P has joined the channel [20:18] jimt has joined the channel [20:18] johnnywengluu: techwraith: that did the trick [20:18] johnnywengluu: what does 2 mean [20:18] johnnywengluu: and what are the other options [20:19] techwraith: That's the number of spaces to use [20:19] techwraith: for indentation [20:19] mscdex: techwraith: i thought the second argument was a function? [20:19] techwraith: the second argument is a replacer function [20:19] techwraith: yeah, sorry, mixed that up with a custom one I wrote [20:19] johnnywengluu: where is the API doc for JSON stringify [20:19] johnnywengluu: cant find in mozilla [20:20] mscdex: https://github.com/douglascrockford/JSON-js/blob/master/json2.js [20:20] techwraith: https://developer.mozilla.org/En/Using_JSON_in_Firefox [20:20] mscdex: look at the header comment [20:20] mscdex: heh [20:20] mscdex: that too [20:20] johnnywengluu: so cool [20:20] johnnywengluu: thanks [20:20] techwraith: No prob :) [20:21] V1: Now that where discussion JSON2 anyways, does any body have a clue why on earth there's "use strict" in the code? [20:21] V1: It's not like a browser does not support JSON but does support ES5.. [20:21] hornairs has joined the channel [20:22] johnnywengluu: can one json file contain multiple {} {} ? [20:23] V1: if you wrap in a array, yup [20:23] johnnywengluu: yeah [20:23] techwraith: yep [20:23] V1: [{},{}] [20:23] johnnywengluu: just had it confirmed [20:23] johnnywengluu: {} {} doenst work [20:23] tmpvar: v8:console.log("hello") [20:23] v8bot: tmpvar: "hello" [20:23] tmpvar: v8:JSON.parse("{}{}") [20:23] v8bot: tmpvar: SyntaxError: Unexpected token { [20:24] jpick has joined the channel [20:24] techwraith: v8:JSON.parse("{[{}{}]}") [20:24] v8bot: techwraith: SyntaxError: Unexpected token [ [20:24] johnnywengluu: v8: he [20:24] v8bot: johnnywengluu: ReferenceError: he is not defined [20:24] techwraith: v8:JSON.parse("{[{},{}]}") [20:24] v8bot: techwraith: SyntaxError: Unexpected token [ [20:24] johnnywengluu: v8: Hej= 2 [20:24] v8bot: johnnywengluu: 2 [20:24] johnnywengluu: v8: Hej [20:24] v8bot: johnnywengluu: ReferenceError: Hej is not defined [20:24] johnnywengluu: cool [20:24] slickplaid: v8: JSON.parse('{"test":[],"again":{}}') [20:24] v8bot: slickplaid: {test:[],again:{}} [20:24] techwraith: v8:JSON.parse("{array: [{},{}]}") [20:24] v8bot: techwraith: SyntaxError: Unexpected token ILLEGAL [20:24] johnnywengluu: consoleseverywhere [20:25] johnnywengluu: hehe=) [20:25] techwraith: lol [20:25] johnnywengluu: JSON.parse("{array: [{},{}]") [20:25] johnnywengluu: v8: JSON.parse("{array: [{},{}]") [20:25] v8bot: johnnywengluu: SyntaxError: Unexpected token ILLEGAL [20:25] johnnywengluu: v8: JSON.parse("[{},{}]") [20:25] v8bot: johnnywengluu: [{},{}] [20:25] johnnywengluu: wii [20:25] slickplaid: v8: JSON.parse('array({},{})') [20:25] v8bot: slickplaid: SyntaxError: Unexpected token ILLEGAL [20:25] Ori_P_ has joined the channel [20:26] techwraith: v8:JSON.parse("{'arrayProp': [{},{}]}") [20:26] v8bot: techwraith: SyntaxError: Unexpected token ILLEGAL [20:26] slickplaid: v8: JSON.parse('{"prop": [{}. {}]}') [20:26] v8bot: slickplaid: SyntaxError: Unexpected token ILLEGAL [20:26] zpao has joined the channel [20:27] johnnywengluu: what are all the Flags can be 'r', 'r+', 'w', 'w+', 'a', or 'a+'. for fs [20:27] johnnywengluu: what does + mean [20:27] mwdev has joined the channel [20:28] dve has joined the channel [20:28] mwdev: Anyone have a good suggestion for forms authentication in node.js? [20:28] slickplaid: chmod a+w file [20:28] slloyd has joined the channel [20:28] slickplaid: Operator Description [20:28] slickplaid: + adds the specified modes to the specified classes [20:28] arpegius has joined the channel [20:28] slickplaid: would be my guess [20:30] slickplaid: http://en.wikipedia.org/wiki/Chmod#Symbolic_modes [20:30] techwraith: Damn, JSON.parse is pretty strict [20:30] slickplaid: yup [20:30] techwraith: JSON.parse('{"thing":[{},{}]}') [20:30] techwraith: That finally did it [20:30] techwraith: lol [20:30] techwraith: dmn quotes [20:30] slickplaid: hehe [20:31] techwraith: v8:JSON.parse('{"thing":[{},{}]}') [20:31] v8bot: techwraith: {thing:[{},{}]} [20:31] slickplaid: v8: JSON.parse('{"thing":[{},{}]}') [20:31] v8bot: slickplaid: {thing:[{},{}]} [20:31] slickplaid: heh [20:31] dmcquay has joined the channel [20:33] jpick has joined the channel [20:33] MrTopf has joined the channel [20:34] perezd has joined the channel [20:34] Rpianesi has joined the channel [20:34] Rpianesi: Heyy. [20:34] Rpianesi: Can someone please help me out? [20:34] mattrobenolt: johnnywengluu: This fully explains the modes for opening a file: http://pubs.opengroup.org/onlinepubs/007908799/xsh/fopen.html [20:35] johnnywengluu: thanks [20:35] Rpianesi: Im 15. My domain needs to be renewed within a day. Can someone let me do somthing for 8 dollars? [20:35] mattrobenolt: That's for C, but it's all the same thing. [20:36] EyePulp: Rpianesi: I'm sure there are plenty of channels willing to pay 15 yr olds 8 dollars to perform a service. I'm not sure node.js is that kind of channel though. [20:36] slickplaid: Rpianesi: Need a signed, notorized document from your parents with a photocopy of their drivers licence and your birth certificate. [20:38] teemow has joined the channel [20:38] Rpianesi has left the channel [20:38] iammerrick has left the channel [20:39] ggoodman has joined the channel [20:40] hipe: techwraith: slickplaid: whatever you guys are up to with the JSON there reminds me of a little JSON hack i added to a thing i'm working on. I added support for what i call "tersified JSON" which is basically JSON without quotes where they are not necessary .. [20:41] hipe: https://github.com/hipe/fap-doc/blob/master/lib/fap-doc/util.js#L1-29 [20:41] ruggedcoder has left the channel [20:41] slickplaid: hipe: thanks, I'll take a look at it :) [20:41] rfay has joined the channel [20:41] tjh: isaacs: any plan to have npm resolve two or more applicable module dependencies to the exact same exports? [20:42] tjh: isaacs: the issue I'm seeing around is that say you require('mime'), and so does connect, if you want to modify the one you required to give connect some more mime types, you cant [20:42] davidcoallier has joined the channel [20:42] hipe: slickplaid: good! it is a hack, that is, i wanted to use Ometa parser generator to make it a proper parser, but this is just a regex hack. there are things it can't parse ,but it has worked for everything i've needed it for and i like it ;) [20:42] tjh: I would think that if a single module can satisfy several deps, it should [20:43] tjh: we have to rm -fr node_modules and npm bundle again sometimes just to get express to grab the new connect etc [20:44] tg has joined the channel [20:46] johnnywengluu: so in a file i have [] [20:46] ggoodman: any ideas how to set a session-only cookie in express? it seems that cookies set with a date in the past are ignored... though I may easily be missing something. [20:46] johnnywengluu: how do i write a {} between the [ ] [20:46] johnnywengluu: its a json file [20:47] techwraith: [{}] [20:47] ckknight: what is the best way to have documentation inside a .js file? [20:47] tjh: ggoodman: what version of express? [20:47] eee_c has joined the channel [20:47] EyePulp: so what's a clean method for re-using client side JS w/o explicitly making it into modules with exports? I want to do some node based testing with client side logic, and still be able to pull up those files in a browser without error [20:47] techwraith: But in order for it to be a proper json file, you'll have to surround it with: { "somePropName": [{}] } [20:48] ggoodman: tjh: 2.2.0 [20:48] techwraith: johnnywengluu: ^ [20:48] hipe: ckknight: haha i hate 'literate programming' and docco i'll tell you that much, some of node.js uses this [20:48] johnnywengluu: hah [20:48] johnnywengluu: its a log file [20:48] johnnywengluu: so i append {} many times [20:48] insin: is qs' use of [] in querystring keys inspired by PHP? [20:48] tjh: ggoodman: you can pass options to the middleware, { cookie: { expires: null }} should work [20:48] EyePulp: if (exports){ exports.modules = foo; } or something? [20:48] johnnywengluu: so i have to append them insode the [] [20:48] tjh: ggoodman: or req.session.cookie.expires = false; [20:49] techwraith: Sounds like a lot of extra work for a log file [20:49] ckknight: hipe: I just want to be proper about it, since I plan on distributing the library, and I hate when other libraries have poor documentation. [20:49] ggoodman: tjh: I'm not trying to modify the cookie associated with the session middleware [20:49] tjh: ggoodman: oh [20:49] techwraith: why not parse the log file into a json file when you need to use it as such [20:49] techwraith: ? [20:49] hipe: EyePulp: i can tell you that Syntax Highlighter accomplishes this somehow (browser and backend executable js), checkout the github and look at examples http://alexgorbatchev.com/SyntaxHighlighter/ [20:49] ggoodman: tjh: I'm trying to push a cookie to the client for the duration of the browser session [20:49] EyePulp: hipe: thanks, I'll take a look [20:49] johnnywengluu: i could read the file [20:50] tjh: ggoodman: then just omit the expires prop [20:50] tbranyen: woot michael jackson on last.fm [20:50] tbranyen: the day rules [20:50] johnnywengluu: and just use push [20:50] johnnywengluu: but if the file gets too big [20:50] johnnywengluu: it takes time to read [20:50] hipe: ckknight: i keep wanting to stumble across a documentation convention that looks more like javadoc or perldoc or rubydoc and less like the "literate programming, write comments every few lines of code no matter how internal it is" thing but i haven't found it yet [20:50] johnnywengluu: if i could just tell it to place the {} before the last ] [20:51] techwraith: Do it async - write your objects to the file one per line, then create a read stream on it, and split the output by line break [20:51] ggoodman: tjh: is it normal behaviour that the cookie is shared between browser tabs? if so, is there a way to set a cookie for a single browsing session? [20:51] techwraith: then parse the output, push it to an array, and send that array out as JSON somewhere [20:51] mike_miller: Is anyone aware of install issues with profile? [20:52] tjh: ggoodman: the browser being open in general is the "browser session" [20:52] mike_miller: `sudo npm install profile` results in Error: profile@0.0.7 preinstall: `./scripts/preinstall.sh` [20:52] tjh: ggoodman: if you dont set expires, close the browser, come back it will be gone [20:52] tjh: ggoodman: that's what a session cookie is [20:52] tjh: gets confusing with the session middleware though haha.. "the session session cookie" [20:52] ggoodman: tjh: thanks, thought each 'tab' would have its own cookie environment for session-only cookies :p [20:53] ruggedcoder has joined the channel [20:53] tjh: ggoodman: I dont think so, maye some browsers i dunno [20:53] tbranyen: ggoodman: thats one of the reasons why incognito/private tabs were invented [20:53] mike_miller: mape: ping [20:53] tbranyen: the other was porn [20:53] tjh: ahaha [20:53] ggoodman: :D [20:53] hipe: ACTION bb 20 min!  [20:53] tbranyen: i use incognito for testing between two different logged in users, not sharing cookie sessions [20:54] meat_popsicle has joined the channel [20:54] meat_popsicle: hi, anyone here ever use zombie.js? [20:54] synisma has joined the channel [20:54] johnnywengluu: v8: JSON.parse() [20:54] v8bot: johnnywengluu: SyntaxError: Unexpected token ILLEGAL [20:56] johnnywengluu: v8: JSON.parse("") [20:56] v8bot: johnnywengluu: SyntaxError: Unexpected end of input [20:56] tbranyen: getting there [20:57] techwraith: johnnywengluu: JSON needs at least {} [20:57] johnnywengluu: or [] [20:57] johnnywengluu: or "aasd" [20:57] johnnywengluu: 1 [20:57] johnnywengluu: v8: JSON.parse(1) [20:57] v8bot: johnnywengluu: 1 [20:57] johnnywengluu: =) [20:57] johnnywengluu: looks strange [20:58] mikeal has joined the channel [20:58] techwraith: Right, that's kinda what I meant - all of those are objects [20:58] dgathright has joined the channel [20:58] arpegius has joined the channel [20:59] johnnywengluu: yeah [21:00] mike_miller: newbie JS question: how should I determine the runtime of code? I tried subtracting two Date() objects, but I get NaN as a result. [21:00] mike_miller: does node.js have anything builtin for benchmarking code? [21:00] saikat has joined the channel [21:01] techwraith: You should be able to subtract two dates just fine [21:01] techwraith: Do you have code anywhere? [21:01] SubStack: mike_miller: you can do Date.now() [21:01] SubStack: gives you microseconds [21:01] SubStack: also I think there is some built-in way to do profiling deltas [21:01] SubStack: or else some nifty module that I should remember but can't [21:01] mike_miller: hmm, would be interested to know if there was. [21:02] sub_pop has joined the channel [21:03] wink_: if you're trying to profile, check out --v8-options, there are some options to generate profiling data [21:03] meat_popsicle: mike_miller: if your browser doesn't have Date.now() [some old ones dont] you can use +Date [21:03] mike_miller: well, I'm not really concerned about computation time, so much as AJAX request latency [21:03] mike_miller: It's not client side profiling that I'm doing, it's server side. [21:03] meat_popsicle: latency != request time [21:04] herbySk has joined the channel [21:04] jpick has joined the channel [21:04] marajit has joined the channel [21:04] wink_: mike_miller: from the client, firebug will tell you how long a given request took total? [21:04] isaacs_ has joined the channel [21:05] mike_miller: wink__: yeah, but the issue is that my node.js server performs AJAX calls to another server, and THOSE are the ones I want to time. [21:05] wink_: ahh [21:06] marajit has joined the channel [21:06] softdrink has joined the channel [21:06] dizzdiamonds has joined the channel [21:06] msilverman2 has joined the channel [21:07] wink_: mike_miller: what sort of resolution do you need? Date.getTime() will give you epoch in millis [21:07] Tobias|| has joined the channel [21:07] mike_miller: that is fine. I'm profiling something that takes ~5s [21:08] tsutton has joined the channel [21:08] wink_: you're not likely to get much better resolution without something drastic like rdtsc [21:08] mike_miller: miliseconds is fine :) [21:08] mike_miller: hell, seconds would probably be ok [21:08] wink_: Date.getTime() should do you right then [21:09] mike_miller: capital D? [21:09] mike_miller: so I don't need to do var date = new Date(); ? [21:09] johnnywengluu: ah [21:09] johnnywengluu: fuck it [21:09] wink_: var start = new Date().getTime() [21:09] slickplaid: var date = new Date().getTime(); [21:09] slickplaid: right :D [21:09] wink_: var end = new Date().getTime(); [21:09] mike_miller: gotcha :) [21:09] johnnywengluu: i read the whole json file .. parse it to object .. push the object into the array .. and then stringify it and save [21:09] johnnywengluu: :D [21:09] wink_: v8bot: new Date().getTime() [21:09] v8bot: wink_: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [21:10] tim has joined the channel [21:10] wink_: meh, i cant use that thing ;> [21:10] pifantastic_ has joined the channel [21:10] meandi has joined the channel [21:10] mattrobenolt: v8: v commands [21:10] v8bot: mattrobenolt: SyntaxError: Unexpected identifier [21:10] mattrobenolt: v commands [21:11] mattrobenolt: v8: commands [21:11] v8bot: mattrobenolt: ReferenceError: commands is not defined [21:11] mattrobenolt: v8bot: shutup [21:11] v8bot: mattrobenolt: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [21:12] mattrobenolt: `v commands [21:12] v8bot: mattrobenolt: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support. [21:12] mattrobenolt: `v beers [21:12] v8bot: mattrobenolt: has 0 beers. [21:12] mattrobenolt: `v help beers [21:12] v8bot: mattrobenolt: beers Command: Type nick++ to give a beer to a user (usually as a way to say "thanks"). Type nick-- to take a beer away from a user. Type "`v beers " to get the number of beers for a specific user. [21:13] mattrobenolt: mattrobenolt++ [21:13] v8bot: mattrobenolt: Don't cheat! You can't give a beer to yourself. [21:13] mattrobenolt: v8bot++ [21:13] v8bot: mattrobenolt has given a beer to v8bot. v8bot now has 21 beers. [21:13] MattJ100 has joined the channel [21:13] jpick has joined the channel [21:13] jpick has left the channel [21:15] isaacs: mattrobenolt-- [21:15] v8bot: isaacs has taken a beer from mattrobenolt. mattrobenolt now has -1 beers. [21:15] isaacs: mattrobenolt++ [21:15] v8bot: mattrobenolt is getting too many beers. Don't let mattrobenolt get drunk! [21:15] mattrobenolt: hahaha [21:15] isaacs: tjh: hey [21:16] isaacs: "isaacs: any plan to have npm resolve two or more applicable module dependencies to the exact same exports?" [21:16] isaacs: no [21:16] tjh: why not? [21:16] isaacs: your program should live in its little home, and do its thing, and get its deps, and assume ownership over its domain [21:16] tjh: it ruins a lot of possibilities [21:16] MrTopf has joined the channel [21:17] techwraith: v8:console.log("I'm not drunk, I'm just buzzed...") [21:17] v8bot: techwraith: "I'm not drunk, I'm just buzzed..." [21:17] isaacs: what are you trying to do that you can't do? [21:17] mattrobenolt: v8bot++ [21:17] v8bot: mattrobenolt has given a beer to v8bot. v8bot now has 22 beers. [21:17] mattrobenolt: v8bot++ [21:17] v8bot: v8bot is getting too many beers. Don't let v8bot get drunk! [21:17] tjh: isaacs: like I said, even simple tasks like keeping a dictionary of mime types, doesn't work [21:17] tjh: because you can't add more, and have other modules use it since they have unique modules [21:17] isaacs: tjh: please explain more. [21:17] isaacs: oh, ok [21:18] isaacs: well... why are you relying on some other package to define your mime types for you? [21:18] tjh: and for example in LearnBoost, when we update connect in package.json [21:18] tjh: express does not see it [21:18] tjh: because it has it's own that was previously met, even though the new one would satisfy it as well [21:18] isaacs: tjh: no, express sees the version that express installs with [21:18] tjh: isaacs: because it's stupid for everyone to inline mime type stuff in their mods [21:18] isaacs: tjh: you CAN do: npm rm connect --prefix ./node_modules/express/ [21:19] jpick has joined the channel [21:19] isaacs: tjh: or just rm -rf ./node_modules/express/node_modules/connect [21:19] tjh: seems pretty dirty though [21:20] isaacs: tjh: i get why you want to have a different module that handles mime types. what i'm saying is, why does package A define a mime type that package B depends on? and if so, why are they both depending on "mime" instead of B just depending on A and having A give it what it needs? [21:20] tjh: ideally the most recent version of something that can satisfy other deps... should [21:20] isaacs: tjh: npm update [21:20] isaacs: tjh: that's what that does^ [21:20] jeromegn has joined the channel [21:21] tjh: hmm k maybe that part is fine, figured it would do that on bundle again [21:21] isaacs: tjh: oh, you're using 0.x [21:21] isaacs: tjh: npm bundle update [21:21] isaacs: tjh: in npm 1.0, bundle is implied, and way awesomer. [21:21] isaacs: (no .npm folder, no extraneous caches, etc.) [21:22] tjh: isaacs: the usage is say a user has connect or express, but they noticed some mime type is not resolved, they could just require('mime').define() in their own script, and connect would then in turn know about it [21:22] tjh: instead of connect.mime.define(), which only connect would see [21:22] tjh: which woudl basically render an external mime module useless [21:22] tjh: along with anything similar dealing with memory [21:23] isaacs: tjh: what you want is a global. [21:23] SubStack: gasp [21:23] isaacs: what? this is *exactly* the use case for a global. [21:23] Levi has joined the channel [21:23] isaacs: "I want to change something, and have everything see the change." [21:23] isaacs: the only use case for a global^ [21:23] tjh: isaacs: not really, I would just expect require('mod') to resolve to the same module all over, when possible [21:23] isaacs: if you want to do this wihtout globals, then pass references around. [21:24] isaacs: tjh: right, but what if connect changes its dependency, and it now collides wiht your program? [21:24] tjh: then it would become a second module [21:24] tjh: if it coudl be resolved by one existing in memory it should [21:25] tjh: if not, then load in the other one [21:25] saikat has joined the channel [21:25] jtsnow has joined the channel [21:25] isaacs: tjh: npm and node solve this problem in a general way to prevent version conflicts and infinite cycles. [21:25] isaacs: bbiab [21:25] tjh: just doesn't seem ideal [21:26] tjh: I like simplicity, that's just personally what I would expect [21:26] McMAGIC-- has joined the channel [21:27] stagas has joined the channel [21:28] tilgovi has joined the channel [21:28] softdrink has joined the channel [21:28] arpegius has joined the channel [21:29] ruggedcoder: new guy here that would like some advice on if what I'm doing is valid. Testing an express app with expresso, and hoped to put the common stuff into a helper.js similar to what rspec does. https://gist.github.com/898865 [21:29] ruggedcoder: are the exports in the helper.js module ok to do like this? if not, what is a better way? [21:30] tjh: ruggedcoder: var common = require('./common') [21:30] davida has joined the channel [21:30] mattly_ has joined the channel [21:31] tsutton has joined the channel [21:31] EyePulp: so I have foo.js, which requires('./a') and "a.js" requires "b.js"... how would foo.js pass values down to b.js for it to use on initialization? [21:31] EyePulp: if that makes sense... [21:31] ruggedcoder: would I then access the modules in the test with common.app and common.assert? [21:31] visa has joined the channel [21:32] techwraith: EyePulp: Interesting question, I'd like to know the answer as well [21:33] EyePulp: assumedly the require() furthest down the chain gets run/exported first, but how do I make sure it's got some settings sent down to it first? [21:33] ben_alman_ has joined the channel [21:33] MarkMenard has joined the channel [21:36] langworthy has joined the channel [21:39] mrjjwright has joined the channel [21:40] Stan____ has left the channel [21:41] MikeMakesIt has joined the channel [21:43] SubStack: the couchdb module on npm is broken :( [21:43] isaacs: SubStack: broken how? [21:43] SubStack: Error: Cannot find module 'promised-io/promise' [21:43] isaacs: SubStack: ping kriszyp [21:44] isaacs: oh, wait, no [21:44] isaacs: bug the author [21:44] isaacs: should be promised-io/lib/promise [21:44] SubStack: aha [21:44] tjholowaychuk has joined the channel [21:44] isaacs: also, promised-io doesn't have a main module. [21:44] isaacs: so that's dumb [21:45] arpegius has joined the channel [21:45] SubStack: yeah, lameness [21:45] SubStack: I will swoop in and fix everything [21:45] SubStack: you'll see [21:45] SubStack: actually I would hope that one of the 51 forks would already solve this [21:46] isaacs: haha [21:46] isaacs: if you send a pull req to the author and they are not responsive, lmk, and i'll forcibly shove the fix onto the registry [21:47] isaacs: i really want to get everyone using npm 1.0 and node 0.4 [21:47] SubStack: well felixge is the maintainer of the 'couchdb' package [21:47] isaacs: oh, ok, he's good people [21:47] SubStack: also he abandoned it on the readme [21:47] Draggor: Someone yell at me to switch to npm 1.0 this weekend :3 [21:47] SubStack: ACTION prods Draggor along [21:48] isaacs: Draggor: SWITCH TO npm 1.0 THIS WEEKEND!! [21:48] SubStack: I upgraded because isaacs mentioned me on the twitter [21:48] SubStack: and nothing seems to have broken, hooray [21:48] SubStack: of course I was using a reasonably modern npm version [21:48] isaacs: SubStack: yeah, i tried to prod all the people who i know do unusual things with npm and might be lagging [21:48] isaacs: yeah, you were using 0.3.15 [21:48] SubStack: haha you keep stats? [21:49] isaacs: in a manner of speaking. [21:49] isaacs: http://registry.npmjs.org/-/by-user/substack [21:49] SubStack: oh neat [21:49] isaacs: http://registry.npmjs.org/dnode/latest [21:49] isaacs: look at the "_npmVersion" field [21:49] Draggor: Is there an npm upgrade guide? I'm on 0.3.15 [21:49] SubStack: relatedly, I just started messing with couch finally [21:49] isaacs: Draggor: npm rm everything; curl http://npmjs.org/install.sh | npm_install=rc sh [21:50] isaacs: Draggor: it uses "prefix" rather than the 3 roots [21:50] marajit has left the channel [21:50] Draggor: thank goodness <3 [21:50] isaacs: Draggor: and, once installed, read the help docs. [21:50] SubStack: I still have no idea how to query that [21:50] isaacs: all of them [21:50] isaacs: :) [21:50] Draggor: The ones on your github are for 1.0 yeah? [21:50] ChrisOnNode has joined the channel [21:51] SubStack: hooray, temsa's couch module works just fine [21:51] SubStack: temsa should usurp the maintainer field [21:51] wirehead has joined the channel [21:52] SubStack: isaacs: is there an `npm usurp`? [21:53] gmci has left the channel [21:53] maushu: What the hell is key3 of websocket. [21:54] rfay_ has joined the channel [21:54] isaacs: SubStack: npm owner add whoever whatever [21:54] SubStack: oh neat [21:54] SubStack: I should add Draggor to bigint [21:54] rfay has joined the channel [21:55] Draggor: You should! [21:56] SubStack: Draggor: what is your npm name? [21:56] lupomontero has joined the channel [21:56] tim: is there a command to have npm remove all installed mods ? [21:57] Draggor: SubStack: draggor [21:57] Draggor: err, if it's email draggor@gmail.com [21:57] isaacs: tim: npm ls installed | awk '{print $1}' | xargs npm rm [21:58] SubStack: Draggor: npm adduser yourself! [21:59] dgathright has joined the channel [21:59] Draggor: Say I did that and completely forgot what I entered, how would I check? >_> [21:59] Draggor: (it's been a long, sleepless week) [21:59] SubStack: no idea! [22:00] Draggor: I really think I just took draggor [22:00] bradleymeck has joined the channel [22:00] SubStack: can't add you :/ [22:00] SubStack: npm ERR! 404 Looks like 'undefined' is not in the npm registry. [22:01] Tobsn: hey whats the best nodejs hoster? [22:01] SubStack: https://gist.github.com/898945 [22:01] Draggor: SubStack: try now? [22:02] isaacs: SubStack: whoa, that's not a good error. how'd you get that? [22:02] isaacs: oh, link, click, duh [22:02] isaacs: SubStack: you have to add the package name, too [22:02] SubStack: oh HAH [22:02] isaacs: SubStack: were you doing this in a package dir? if so, i guess i'd call that a UI bug. [22:03] SubStack: yeah from the package dir [22:03] eshira has joined the channel [22:03] SubStack: added! [22:03] isaacs: kewl. will fix for next 1.0 drop [22:04] SubStack: right-o [22:04] arpegius has joined the channel [22:04] ippa: hm does vanilla node.js define console.debug() ? [22:05] ippa: trying out a library that tries to use it and my node (latest) crashes onn that [22:05] mattrobenolt: ippa: Yes. [22:05] SubStack: ippa: there's console.error [22:05] SubStack: writes to stderr [22:05] ippa: mattrobenolt: why doesn't my node have it? :D [22:06] mattrobenolt: ippa: Actually, I take that back.. it doesn't. [22:06] mattrobenolt: :) [22:06] mattrobenolt: SubStack is correct. [22:06] segaway has joined the channel [22:06] ippa: was it recently removed? very odd of this lib to use it [22:07] mattrobenolt: > console [22:07] mattrobenolt: { log: [Function], [22:07] mattrobenolt: info: [Function], [22:07] mattrobenolt: warn: [Function], [22:07] mattrobenolt: error: [Function], [22:07] mattrobenolt: dir: [Function], [22:07] mattrobenolt: time: [Function], [22:07] mattrobenolt: timeEnd: [Function], [22:07] mattrobenolt: trace: [Function], [22:07] mattrobenolt: assert: [Function] } [22:07] ippa: right [22:07] mattrobenolt: You have log, info, warn, error, dir, time, timeEnd, trace, and assert [22:07] SubStack: should be enough for anyone! [22:08] techwraith: this probably has an obvious answer, but what does assert do? [22:08] tim has left the channel [22:08] tjholowaychuk: techwraith: calls assert.ok() [22:08] tjholowaychuk: so throws if it is not true [22:09] tjholowaychuk: not sure if anyone actually uses it [22:09] tjholowaychuk: haha [22:09] techwraith: That's just silly. Why not use assert.ok() then? [22:09] techwraith: lol [22:09] onr: tjholowaychuk: which ide you suggest? [22:09] Tobsn: how do you get your password and username from joyent if you cant remember [22:09] tim has joined the channel [22:09] tjholowaychuk: onr: textmate or vim [22:10] onr: tjholowaychuk: what about cloud9 ? [22:11] tjholowaychuk: onr: haven't touched it, I dont really want to edit in my browser lol [22:11] tjholowaychuk: and they never test their stuff [22:11] Tobsn: man that sucks [22:12] jpick1 has joined the channel [22:12] perlmonkey2 has joined the channel [22:12] techwraith: onr: I use kod, but I can't really assure you that you'll find it stable enough for your prefrences. [22:13] tjholowaychuk: techwraith: does it still crash on $ kod directory ? [22:13] tjholowaychuk: like $ kod . [22:13] onr: techwraith: im building my very first node app. so anything goes [22:13] techwraith: nope [22:13] KellyM: is kod really up to par? [22:14] techwraith: I use it every day [22:14] KellyM: last I tried it was basically syntax highlighting notepad [22:14] onr: techwraith: multiple vim windows work okay for now [22:14] tjholowaychuk: techwraith: cool, might check it out again [22:14] tjholowaychuk: that was the first thing i tried [22:14] tjholowaychuk: and it blew up immediately haha [22:14] techwraith: The only issue I have is it crashes once a day and syntax highlighting needs to be refreshed every once in a while [22:14] techwraith: but I haven't found one that's as nice to use [22:15] techwraith: so I'm sticking with it [22:15] KellyM: for free you mean? [22:15] techwraith: I'd really like to fork it and make a node specific thought [22:15] techwraith: *though [22:15] techwraith: No, I like it better than textmate [22:15] KellyM: orly [22:15] KellyM: why? [22:16] techwraith: Mainly the interface, for some reason I can't stand to look at textmate [22:16] KellyM: ah [22:16] tjholowaychuk: techwraith: crashed it again [22:16] techwraith: and I love kod's easy custom css themes [22:16] tjholowaychuk: haha [22:16] gmci has joined the channel [22:16] tjholowaychuk: there we go [22:16] tjholowaychuk: cool [22:16] techwraith: weird, what are you trying to open? [22:16] tjholowaychuk: looks pretty [22:16] mattrobenolt: techwraith: You're really using a text editor because of an interface? [22:16] KellyM: does it have bundle/snippet functionality? [22:16] tjholowaychuk: although it has way less features [22:16] gerad has joined the channel [22:16] techwraith: I don't really need much more than highlighting, lol [22:16] tjholowaychuk: that i often use [22:17] techwraith: tjholowaychuk: which ones do you miss the most? [22:17] KellyM: well of course we don't *need* much more than that [22:17] KellyM: but it sure is nice [22:17] tjholowaychuk: techwraith: well I dont really use kod so I dont know what it has, but I often use the jump to file/function stuff, snippits etc [22:17] mattrobenolt: TextMate has become literally a necessity in my life for a few core features that nothing I've come across yet has. [22:17] tjholowaychuk: techwraith: complex line editing [22:18] tjholowaychuk: column editing [22:18] KellyM: yeah [22:18] mattrobenolt: tjholowaychuk: +1 here as well. [22:18] tjholowaychuk: i like the idea of kod better, it would be cool to have stuff in mostly js [22:18] mattrobenolt: Cmd+T, Cmd+Shift+T :) [22:18] tjholowaychuk: and something that is actually supported hahaha [22:18] jpick has joined the channel [22:18] tjholowaychuk: I'll keep checking up on kod though [22:19] mattrobenolt: I like how GitHub added in TextMate esque "Cmd+T" to their code browser. [22:20] sdecastelberg has joined the channel [22:20] techwraith: Kod has been pretty unstable for me lately, I may have to switch back to TM for a bit [22:20] admc has joined the channel [22:20] tjholowaychuk: would be nice to have something highlight with pygments so we have all that shit already [22:20] tjholowaychuk: unless that is what kod does [22:21] techwraith: pygments? [22:21] softdrink: kod? [22:21] KellyM: kod is an open source editor [22:21] drudge: techwraith: macvim ftw [22:21] techwraith: http://kodapp.com/ || https://github.com/rsms/kod [22:21] KellyM: looks like chrome + textmate [22:22] saikat has joined the channel [22:22] dmcquay_ has joined the channel [22:22] mscdex: kod seems a little fishy to me [22:22] mscdex: :-D [22:22] softdrink: neat [22:25] mattrobenolt: I like how KOD boasts to be written with node.js, but there are a whopping total of 5 .js files used. [22:25] mattrobenolt: The rest is normal Obj-C. [22:25] techwraith: Yeah, there's not a lot of node in there [22:26] techwraith: but it is there, lol [22:26] softdrink: looks like it has potential [22:27] temp01 has joined the channel [22:27] eee_c has joined the channel [22:29] techwraith: Ok, how do I get textmate to put the project drawer on the left? [22:29] lurcio has joined the channel [22:29] caiogondim has joined the channel [22:29] caiogondim has left the channel [22:30] techwraith: Nevermind, that wasn't exactly intuitive [22:30] bjoern_ has joined the channel [22:31] techwraith: close project drawer -> move the window so it's positioned on far right of the screen -> open project drawer [22:31] robb1e has joined the channel [22:32] baudehlo1: techwraith: sadly that's just how project drawers work in OSX :) [22:32] baudehlo1: (generally) [22:32] baudehlo1: ACTION is waiting for textmate2 [22:32] techwraith: baudehlo1: lol, aren't we all [22:32] softdrink: i hate drawers so much [22:33] baudehlo1: http://textmate2.com/ [22:33] robb1e: hello, I'm having a path problem, an age ago I installed expressjs 1.0.0rc1 and even though I've installed 2.2.0 via npm, I'm getting getting 1.0.0rc1 loaded when I run node - is there a way to find what path node is using at runtime so I can hunt this down? Thanks [22:33] isaacs: robb1e: require.resolve("express") [22:33] baudehlo1: I tend to switch back and forth from textmate to textwrangler (for the latter's sftp support) [22:33] techwraith: http://wastm2released.com/ [22:34] EyePulp: tm2: DNF for nerds [22:34] robb1e: thanks isaacs [22:34] softdrink: mattrobenolt: how do you do the textmate-ish search on github? [22:34] isaacs: robb1e: np [22:34] Tobsn: does anyone know how joyent handles modules? [22:35] Tobsn: do you have to upload them or are they already present? [22:35] dnolen has joined the channel [22:35] SubStack: I should hope joyent uses npm [22:35] robb1e: tobsn I ssh onto the box and use npm [22:35] Tobsn: robb1e, no.de? [22:35] isaacs: Tobsn: you have to npm install stuff on no.de [22:35] robb1e: tobsn yeah [22:35] ryah: Tobsn: you can set dependencies in package.json [22:36] isaacs: Tobsn: it sucks, i know. working on getting npm 1.0 in there and having it auto-install stuff you define in your package.json [22:36] isaacs: ryah: it doesn't actually install them when you push, though [22:36] robb1e: I wanted to use ndistro, but didn't want to mess around with the deploy hooks [22:36] ryah: oh [22:36] SubStack: autoinstalls eh? [22:36] Tobsn: hmm [22:36] Tobsn: so its not automated or already offered [22:36] isaacs: Tobsn: you can bundle (or npm 1.0 install) them and add them to your git repo and push [22:36] Tobsn: its not like they have a module repo you can access they run automatically [22:37] isaacs: Tobsn: nope. building that. [22:37] eb4890 has joined the channel [22:37] isaacs: while also trying to get the world using 1.0 so that i can build it on 1.0 :) [22:37] Tobsn: hmm [22:37] Tobsn: but is it a good idea? [22:37] SubStack: I should write a 'backdoor' module [22:37] isaacs: is what? [22:37] Tobsn: i mean you would assume some people dont want the latest version [22:37] Tobsn: having module preinstalled [22:38] SubStack: that just forks off a background shell when you install it [22:38] Tobsn: well i dont even know how no.de works [22:38] Tobsn: i just got my password back and got a coupon mail for no.de like 6 month ago hehe [22:38] Tobsn: trying to try it out, finally [22:38] Tobsn: like do you get a vps [22:38] Tobsn: inside the cloud, or is it just a folder [22:38] wilmoore has joined the channel [22:39] Tobsn: without root only with an api and upload [22:39] SubStack: isaacs: that will teach people to upgrade npm! [22:39] SubStack: since the nobody account is less useful for that sort of thing [22:40] sdecastelberg has joined the channel [22:41] sdecastelberg has joined the channel [22:42] aheckmann has left the channel [22:42] figital has joined the channel [22:45] ben_alman has joined the channel [22:45] xastey: EyePulp yeah thats me on google-groups [22:47] tjholowaychuk has joined the channel [22:47] ddollar has joined the channel [22:47] zylo has joined the channel [22:47] sigue has joined the channel [22:47] mnbvasd has joined the channel [22:49] visa has joined the channel [22:50] Tobsn: hmm [22:50] Tobsn: wonder what is better... offering hosting and running or offering a whole vps with node support [22:50] Tobsn: whats the best host right now for node? [22:50] Tobsn: besides joyent [22:51] robb1e: tobsn I'm tempted to try Heroku but can't find any solid information on their node hosting apart from a blog mentioning it as an experimental feature [22:51] Tobsn: yeah thats what i know too [22:51] Tobsn: its only experimental [22:51] blkcat: heroku node testing is closed at the moment [22:51] Tobsn: i guess they dont really care so far [22:51] Tobsn: so there is nothing besides joyent? [22:51] blkcat: if you don't want to want for no.de i'd recommend just buying a vps :) [22:52] mattrobenolt: softdrink: https://github.com/blog/793-introducing-the-file-finder [22:52] Tobsn: if you dont want to want me... [22:52] Tobsn: ;) [22:52] tjholowaychuk: its weird that joyent is getting rid of rarely used node accounts [22:52] robb1e: tobsn I'm using no.de now for a little project, seems pretty good so far [22:52] tjholowaychuk: i dont think anyone else will want tjholowaychuk.no.de :s [22:52] Tobsn: lol [22:53] Tobsn: its not like you have to keep the old username [22:53] Tobsn: hehe [22:53] Tobsn: erm subdomain [22:53] Tobsn: "well we have one for you but you have to keep the subdomain." [22:53] Tobsn: ;) [22:53] Tobsn: btw. i got a coupon code like a WHILE ago and when i try to /heart the api it tells me unauthorized [22:53] Tobsn: :/ [22:53] Tobsn: is that normal? [22:53] sigue has joined the channel [22:53] noocx has joined the channel [22:53] noocx: hi [22:54] blkcat: Tobsn: if you didn't use the coupon for a while it likely expired [22:54] Tobsn: yeah probably [22:54] Tobsn: *sadface [22:54] blkcat: in which case i hate you because i want one ;) [22:54] Tobsn: hahaha [22:54] Tobsn: sorry [22:54] blkcat: <3 [22:54] Tobsn: i actually felt bad about it [22:54] Tobsn: not using it and all [22:54] robb1e: could always jump on the #joyent channel and ask nicely [22:54] Tobsn: i do that all the time [22:54] Tobsn: someone wants a battlefield online beta key? [22:55] Tobsn: im mac only so its kinda useless to me [22:55] blkcat: robb1e: i'm not sure that works, unfortunately. :D [22:55] blkcat: and anyway i have a linode so it's not terribly urgent, i'd just like to have it to play with. :) [22:55] Tobsn: hmm maybe doing that cause i really just want to mess with it... they can just delete it afterwards [22:56] Tobsn: im just curious how it works [22:56] Tobsn: like how do they manage it admin side [22:56] robb1e: I'd like Google Appengine to offer node support, I'm using it for some python projects at work and it's pretty good [22:56] sdecastelberg has joined the channel [22:56] Tobsn: really? [22:56] Tobsn: i read some bad things about it [22:57] Tobsn: performance wise [22:57] Tobsn: TOS wise etc. [22:57] robb1e: ah well, we use it for small apps and stick a big cache in between our main app and appengine [22:58] Tobsn: hmm [22:58] Tobsn: yeah that would fix it ;) [22:58] Tobsn: that would fix almost anything [22:58] Tobsn: im still hooked on rackspace cloud servers [22:58] Tobsn: i really like it. [22:58] robb1e: never used rackspace, lots of AWS, some slicehost [22:58] Tobsn: i would love to use softlayer for cloud stuff but they are just too expensive for cloud [22:59] Tobsn: slicehost is basically now rackspace hehe [22:59] markwubben has joined the channel [22:59] blkcat: i can't recommend slicehost, their pricing is just nowhere near competitive anymore. [22:59] robb1e: true, but it wasn't when I used it, and it's still kinda just small instances opposed to rackspaces more 'enterprisey' offerings, right? [23:00] Tobsn: i like rackspace cloud, when they came out with it i wrecked their system weekly... i had the most cloud instances in their system, kinda freaked them out haha [23:00] techwraith: Amazon is the best I've seen [23:00] tjholowaychuk: cant stand amazon [23:00] Tobsn: had like around 100 instances, they had to rise my ram limit on the account three times [23:00] tjholowaychuk: gotta get their shit together, worst apis ever [23:00] Tobsn: tjholowaychuk, me neither for some reason [23:01] Tobsn: i actually never tried it but their frontend gui just intimitades me [23:01] carllerche has joined the channel [23:01] sigue has joined the channel [23:01] Tobsn: tough s3 is nice [23:01] tjholowaychuk: their guis are terrible too [23:01] Tobsn: yeah [23:01] robb1e: if you think aws is bad, try Eucalyptus [23:01] tjholowaychuk: and their docs [23:01] techwraith: Actually I take it back, no.de/joyent is probably the best for node [23:01] canadian_marc has joined the channel [23:02] techwraith: Dreamhost ;) [23:02] Tobsn: btw. funniest shit: i logged into amazon like 6 month ago and set up S3 buckets, 3 month later im finally able, better my code is done, to use them and those buckets are gone... so i contact the support and get a call 2 days later. i had two accounts. [23:02] Tobsn: two accounts with the same email address with two different password [23:02] lancerforhire has joined the channel [23:02] Tobsn: both 4 years old [23:02] lancerforhire: Helloo [23:02] darshanshankar has joined the channel [23:02] heythisisdave has joined the channel [23:03] Tobsn: turned out around 2 years ago amazon realized that they didnt check for unique emails... [23:03] alek_br has joined the channel [23:03] Tobsn: hehe [23:03] jakehow has joined the channel [23:03] Tobsn: i even found out that i ordered some books with one account and some other with the other account [23:03] tim has left the channel [23:04] Tobsn: depending on which password i thought at the time was right when i ordered [23:04] lancerforhire: does node namespace support or anything similar? [23:04] tim has joined the channel [23:04] Tobsn: js supports namespacing i think [23:05] insin: lancerforhire: http://nodejs.org/docs/v0.4.4/api/modules.html [23:05] tjholowaychuk: Tobsn: no lol, just objects [23:05] lancerforhire: insin: cool link [23:05] stonebranch has joined the channel [23:05] Tobsn: tjholowaychuk, i thought i read that once [23:05] Tobsn: ive never seen it but... hey ;) [23:05] tjholowaychuk: i've seen all kinds of weird proposals [23:05] tjholowaychuk: for modules [23:06] tjholowaychuk: not sure if any of them are any good [23:06] eshira has joined the channel [23:06] tjholowaychuk: as long as it doesn't turn into ruby/py [23:06] Tobsn: i mean even php has now namespacing [23:06] Tobsn: if php has it... ;) [23:06] tjholowaychuk: yeah and it's terrible [23:06] Tobsn: hehe [23:06] insin: quel surprisey [23:06] lancerforhire: namespaces in php? [23:06] lancerforhire: they are fine [23:06] tjholowaychuk: you\like\this? [23:06] lancerforhire: yes\you? [23:06] tjholowaychuk: no [23:06] tjholowaychuk: lol [23:06] technoweenie has joined the channel [23:06] tjholowaychuk: c [23:07] lancerforhire: too\bad\foo [23:07] Tobsn: hmm i never use it [23:07] tjholowaychuk: php's syntax is worse than c [23:07] Tobsn: but its nice that they finally have it [23:07] Tobsn: java has namespacing [23:07] eshira: i'm using socket.io, and on the client side I have: [23:07] tjholowaychuk: which is bad, when you base a language on another [23:07] Tobsn: it blows beyond everything [23:07] Tobsn: but they have it [23:07] lancerforhire: so [23:07] lancerforhire: node doesnt have support? [23:07] Tobsn: btw. thats why i dont like lithium.... the whole namespace php5 crap [23:07] tjholowaychuk: lancerforhire: use modules [23:07] lancerforhire: back off lithium [23:07] eshira: i'm using socket.io, and on the client side I have: , but what if I want the URL to be like http://SERVER_URL/nodejs/socket.io? How would I configure socketio to add the "nodejs" path? [23:07] lancerforhire: unless you want to fight me [23:08] lancerforhire: >:) [23:08] Tobsn: lancerforhire, a module is its own namespace so to speak [23:08] Tobsn: thats where they want to point you [23:08] Tobsn: lancerforhire, no trust me, lithium is awesome but it gives me headache after 2 seconds [23:08] lancerforhire: how? [23:08] Tobsn: how what? [23:08] Tobsn: lithium or modules? [23:08] lancerforhire: does it give you a headache [23:08] lancerforhire: lol [23:08] Tobsn: oh [23:08] Tobsn: cause its just beyond what php is used to [23:08] Tobsn: in a good way [23:09] carllerche has joined the channel [23:09] lancerforhire: and that gives you a headache? [23:09] Tobsn: like when i meet people who tell me theyre good in php [23:09] Tobsn: i tell them to use lithium for a day and think about it [23:09] Tobsn: yeah [23:09] Tobsn: im used to php as simple script language [23:09] Tobsn: since 13 years [23:09] Tobsn: and than came lithium [23:09] lancerforhire: lithium is very simple [23:09] lancerforhire: before lithium [23:09] Vertice has joined the channel [23:09] lancerforhire: the other frameworks gave me a headache [23:09] isaacs: this is weird... [23:10] lancerforhire: yeah sorry for going OT :p [23:10] Tobsn: i use the slim framework now cause i hate frameworks [23:10] isaacs: anyone finding that `make test` in the node code folder obliterates the test/fixtures/a.js at some point and then some tests fail as a result? [23:10] Tobsn: why would a make test kill code? [23:10] hij1nx has joined the channel [23:10] lancerforhire: Tobsn: if you want some help with lithium pm me [23:11] lancerforhire: Tobsn: i will show you the light LOL [23:11] Tobsn: you in cali? [23:11] lancerforhire: east coast [23:11] Tobsn: i need to hire a coder soon [23:11] Tobsn: ;) [23:11] Tobsn: damnit. [23:11] __sorin__ has joined the channel [23:11] hij1nx has joined the channel [23:11] lancerforhire: but ill be in arizona in around two weeks [23:11] lancerforhire: thats not too far :D [23:11] Tobsn: true [23:11] Tobsn: youre moving there? [23:11] lancerforhire: possibly [23:11] Tobsn: why not move to san diego? [23:11] Tobsn: ;) [23:12] lancerforhire: theres something for me in phoenix [23:12] lancerforhire: ;) [23:12] Tobsn: in phienix? [23:12] softdrink: san diego is pricey [23:12] Tobsn: phoenix [23:12] tim: San Diego is where it is at [23:12] Tobsn: the most god forsaken place in earth haha [23:12] lancerforhire: LOL [23:12] Tobsn: *on [23:12] Tobsn: softdrink, not if youre 30 minutes away from it [23:12] Tobsn: its always sunny and the people are all super friendly [23:12] softdrink: but then you have to commute [23:12] Tobsn: its like san francisco but warmer and without bums [23:13] Tobsn: :P [23:13] softdrink: i do miss san diego though [23:13] Tobsn: i live outside [23:13] Tobsn: in san marcos [23:13] sigue has joined the channel [23:13] Tobsn: and office is 20 minutes away [23:13] softdrink: i lived in mira mesa for a while [23:13] Tobsn: ah its nice there [23:13] softdrink: worked over by legoland [23:13] mattrobenolt: I <3 me some Huntington Beach. [23:14] Tobsn: yeah thats close to my office [23:14] lancerforhire: i wonder if its possible to make a lithium-like framework for node :O [23:14] Tobsn: lancerforhire, for sure [23:14] Tobsn: its all mvc at the end [23:14] softdrink: i was working for NAMM at the time [23:14] lancerforhire: abstracted database access would be pretty sweet [23:15] Tobsn: so youre a music freak? :P [23:15] softdrink: hehe nah [23:15] Tobsn: oh namm is actually fairly close to our office [23:16] softdrink: i was doing web dev there [23:16] Tobsn: there are tons of web companies in sd [23:16] Tobsn: someone at the bank told me that before silicon vally san diego area was the first silicon vally [23:16] Tobsn: with tons of companies [23:17] saikat has joined the channel [23:17] Tobsn: i got that confirmed with the latest interview of the former SUN boss who wrote about that he had a meeting with apple in san diego about a merger [23:17] Tobsn: like 20 years ago [23:17] Tobsn: wlel not merger they wanted to buy them [23:18] tim: Tobsn do you do lots of work with node.js? I am in San Diego too, always lookin for other hackers in the area [23:18] Tobsn: well i use it when i need it [23:19] Tobsn: is there anything going on in SD with node at all? [23:19] wirehead: Well, San Diego did have some of the same attributes that Silicon Valley had. Both had military stuff, defense contractors, rich people. Just that the valley had UCB + Stanford and San Diego only had UCSD [23:19] tim: lots of folks mention it at our Hacker meetup so I would say so [23:20] tim: I dont know of any major compaines using it though [23:20] tim: sp * [23:20] Tobsn: hacker meetup? haha [23:20] Tobsn: whats that? [23:20] Tobsn: wirehead, yep [23:20] tim: last friday of eery month [23:20] tim: every [23:20] Tobsn: any interesting people? [23:21] tim: 25 - 30 folks that all work on startups etc... [23:21] Tobsn: oh really [23:21] tim: http://cses.ucsd.edu/wiki/index.php/San_Diego_Hacker_News_Meetup [23:22] tim: been going 16 months now [23:22] Tobsn: oh yeah [23:22] Tobsn: thats a hacke rmeetup hehe [23:24] softdrink: tea tree oil / mint toothpick + cherry diet coke = weirdness [23:24] Tobsn: interesting [23:25] stagas has joined the channel [23:25] tjholowaychuk: isaacs: I mostly agree with you now, I think only "util"-like modules will really be affected [23:25] isaacs: tjholowaychuk: yeah [23:25] tjholowaychuk: still kinda sucks, but I understand the need for simplicity, and definitely dont hate that [23:25] isaacs: tjholowaychuk: the require("jade") thing will keep working, though [23:25] isaacs: because modules see their *parent's* deps as well as their own [23:26] Tobsn: tim, i might come to one of these [23:26] Tobsn: i hate meetups and those kind of groups but well... im new to this area [23:26] isaacs: tjholowaychuk: so i'll do npm install jade express; and then express will do require("jade") and find the jade i installed [23:26] tjholowaychuk: isaacs: yeah I cant think of any other cases off hand a side from internal caching stuff [23:26] yhahn has left the channel [23:26] tjholowaychuk: yup [23:27] tjholowaychuk: if express had jade as a dep, then it would be fucked right? [23:27] isaacs: tjholowaychuk: still, though, imo, it'd be better to do something like express.template("jade", require("jade")) [23:27] tjholowaychuk: not that it ever will [23:27] tjholowaychuk: I have support for that, but it's not required [23:27] isaacs: tjholowaychuk: yeah, then the jade i install won't be the one you get, necessarily [23:27] zeqeiroz has joined the channel [23:28] tjholowaychuk: it wont be a huge concern now that things are going local [23:28] tjholowaychuk: it sucked with global libs [23:29] kenbolton has joined the channel [23:36] Gruni has joined the channel [23:36] davidascher has joined the channel [23:38] isaacs: tjholowaychuk: yes. express's "require("jade") use case is much better wiht local packages. [23:39] isaacs: tjholowaychuk: otherwise you activate something new (which, no one really can manage or understand, even me, and I wrote the shit), and suddenly things break. [23:39] isaacs: it didn't seem like a problem at first, but once you get over this threshold of a number of packages and versions, it gets very unweildy [23:39] tjholowaychuk: yeah we've seen that lots with our app [23:39] isaacs: not to mention that you end up with a dozen random versions of express hanging out in lib/node [23:40] tjholowaychuk: i first noticed it when I use expresso with expresso -I lib to expose "require('jade')" to the tests [23:40] isaacs: and it's not even a little clear which one is used by which thing [23:40] tjholowaychuk: and if i npm install jade and had diff versions my tests would magically break [23:40] isaacs: yeah [23:40] darshanshankar has joined the channel [23:42] KellyM: is there some kind of street abbreviation normalizer anyone know off the top of their head? [23:42] drudge: when is npm going to install to $PWD/node_libraries ? [23:42] isaacs: drudge: 1.0 [23:42] isaacs: s/libraries/modules/ [23:42] drudge: eta? [23:42] isaacs: now, if you want it :) [23:42] drudge: sorry :) [23:42] isaacs: it's in RC mode [23:43] isaacs: curl http://npmjs.org/install.sh | npm_install=rc sh [23:43] isaacs: remove your existing packages first [23:43] drudge: ok, thanks [23:45] lancerforhire has left the channel [23:45] pauls has joined the channel [23:46] Spencer__ has joined the channel [23:46] Spencer__: hello [23:48] Spencer__: where do you put a server.js if you want to launch it in cygwin? [23:49] isaacs: drudge: to update to the newer version of npm 1.0 rc, do `npm install npm@rc -g` [23:49] isaacs: drudge: normal update will try to install 0.3 [23:49] isaacs: drudge: since it's not default yet [23:49] KellyM: isaacs: oh yeah, I tried that again and it broke my npm again [23:51] Spencer__: where do you put a server.js if you want to launch it in cygwin? [23:52] hellp has joined the channel [23:52] sh1mmer: Spencer__: do you have node installed? [23:53] Spencer__: yup [23:54] dguttman has joined the channel [23:54] pkrumins has joined the channel [23:54] pkrumins: hello! [23:56] JimBastard has joined the channel [23:56] Spencer__: the tutorial i look at say.. $ cd node $ node simpleserver.js but i really dont know where to put the js file after i create it [23:56] zeqeiroz has joined the channel [23:57] Tobsn: well [23:57] Tobsn: anywhere [23:58] Tobsn: - /www/pages/domain/node/ [23:58] Tobsn: next to /www/pages/domain/htdocs/ [23:58] Tobsn: maybe [23:58] Tobsn: depends on what you do [23:58] Tobsn: at least thats how i sort my stuff [23:58] drudge: i use /home/nodes/site.domain [23:59] Spencer__: so it needs to be on a virtual server? [23:59] pyrony has joined the channel [23:59] Tobsn: i also put all global stuff into /www/ like libs/, geoip stuff for the server, logs/ etc. [23:59] Tobsn: no?