[00:00] sechrist: noooooooooooooooooooode [00:01] brianseeders has joined the channel [00:01] detaos: ues, you are in the right place. [00:01] bwinton has joined the channel [00:02] CIA-48: node: 03Ryan Dahl 07many-writes-fix * r76f6af6 10/ lib/net_uv.js : Simplify arg parsing in String.write - http://git.io/33I9tg [00:02] lukegalea has joined the channel [00:04] nibblebot has joined the channel [00:07] replore has joined the channel [00:07] replore_ has joined the channel [00:08] CIA-48: libuv: 03Ben Noordhuis 07master * r06b83e0 10/ src/unix/stream.c : unix: avoid unnecessary read() syscall - http://git.io/yiyYhw [00:10] jakehow has joined the channel [00:11] robotmay has joined the channel [00:11] chrislorenz has joined the channel [00:13] robi42 has joined the channel [00:15] CIA-48: node: 03Bert Belder 07writefix2 * raac95e7 10/ (lib/buffer.js lib/http.js lib/net_uv.js): mess - http://git.io/KMX9zg [00:15] shaggydog97 has joined the channel [00:16] CIA-48: node: 03Ryan Dahl 07many-writes-fix * r822ac44 10/ (3 files in 3 dirs): Upgrade libuv to 06b83e0 - http://git.io/3YfF-w [00:17] rchavik has joined the channel [00:17] hermanju_ has joined the channel [00:19] Yuffster_work has joined the channel [00:20] racar has joined the channel [00:20] diogogmt has joined the channel [00:21] piscisaureus_ has joined the channel [00:23] tprice has joined the channel [00:25] enmand has joined the channel [00:29] erichynds has joined the channel [00:33] CIA-48: libuv: 03Ben Noordhuis 07master * r5816f2d 10/ src/unix/stream.c : unix: avoid unnecessary read() syscall - http://git.io/eaO9FA [00:36] CIA-48: node: 03Bert Belder 07writefix2 * r11120fe 10/ lib/buffer.js : Never mind about the buffer stuff - http://git.io/S3V5pg [00:36] jetienne_ has joined the channel [00:36] CIA-48: node: 03Ryan Dahl 07many-writes-fix * r626a258 10/ (3 files in 3 dirs): uv: upgrade to 5816f2d - http://git.io/WdpR5w [00:39] neoesque has joined the channel [00:39] ydef has joined the channel [00:40] ydef: well, do *I* feel silly. I've NEVER used .length= to destructively modify an array before [00:40] vikstrous1 has joined the channel [00:40] ydef: Is that behavior widely supported? [00:40] vikstrous1: hey, do you guys know if inter process communication guarantees that your message will arrive? [00:42] taf2 has joined the channel [00:44] trotter has joined the channel [00:44] mynyml has joined the channel [00:44] justinf has joined the channel [00:44] justinf: . [00:46] bnoordhuis: vikstrous1: define "inter process communication" [00:47] dgathright has joined the channel [00:48] justinf: hi all, im running node 0.5.8 and want to use connect. anyone have connect 2.x working with node 0.5.x? [00:49] vikstrous1: bnoordhuis: I think i meant sending messages with msgsnd [00:49] dynacker: 0.5.x isnt stable [00:49] dynacker: why are you using it [00:50] bnoordhuis: vikstrous1: you mean sending data over local sockets? [00:51] aconbere has joined the channel [00:51] justinf: im using it for the diffie-hellman crypto additions [00:51] kenperkins has joined the channel [00:51] vikstrous has joined the channel [00:51] d_low has joined the channel [00:54] CarterL has joined the channel [00:56] deadman87 has joined the channel [00:56] justinf: i'll stick with running connect-unstable for now [00:59] Coderah has joined the channel [01:01] vikstrous1 has joined the channel [01:01] gxdssoft has joined the channel [01:01] jmar777 has joined the channel [01:05] Zamarok has joined the channel [01:07] sdwrage has joined the channel [01:07] TooTallNate has joined the channel [01:09] MUILTFN has joined the channel [01:11] vikstrous has joined the channel [01:13] schwab has joined the channel [01:13] shanebo has joined the channel [01:13] skiz_ has joined the channel [01:13] CIA-48: node: 03Bert Belder 07many-writes-fix * r59999c1 10/ (lib/http.js lib/net_uv.js): Some small optimizations - http://git.io/GdHiJA [01:14] saikat has joined the channel [01:15] konobi: ryah: how's the new GC looking? [01:15] ryah: konobi: we're waiting until it's pushed out to chrome [01:15] jacobolus has joined the channel [01:15] ryah: konobi: so far - seems slower [01:15] konobi: ryah: gotcha [01:15] konobi: huh [01:16] jacobolu_ has joined the channel [01:16] saikat has joined the channel [01:17] joey14 has joined the channel [01:19] Jay has joined the channel [01:19] vikstrous1 has joined the channel [01:21] dominictarr has joined the channel [01:22] vikstrous has joined the channel [01:26] sh1mmer has joined the channel [01:28] clu3 has joined the channel [01:28] catshirt has joined the channel [01:29] ditesh|cassini has joined the channel [01:33] d_low has joined the channel [01:33] d_low has joined the channel [01:34] briandh has joined the channel [01:34] vikstrous1 has joined the channel [01:36] jldbasa has joined the channel [01:36] ryanmcgrath has joined the channel [01:37] willwh has joined the channel [01:37] robi42 has joined the channel [01:38] scottschecter has joined the channel [01:40] broofa has joined the channel [01:42] infynyxx has joined the channel [01:42] broofa has joined the channel [01:42] stagas has joined the channel [01:43] neurodrone_ has joined the channel [01:44] AvianFlu_ has joined the channel [01:44] sub_pop has joined the channel [01:46] BillyBreen has joined the channel [01:47] maletor has joined the channel [01:50] mikeric has joined the channel [01:51] cjm has joined the channel [01:54] Xano has joined the channel [01:55] _jhs has joined the channel [01:58] a_suenami has joined the channel [02:02] hacksparrow has joined the channel [02:03] brianseeders has joined the channel [02:07] vikstrous has joined the channel [02:09] talltyler has joined the channel [02:10] abraxas has joined the channel [02:12] innociv: What do I do to find the source of the problem when socket.io connection just won't connect? The page takes forever to load as it's waiting to connect, and the page just never resolves as it's trying to connect to socket.io. I keep having to restart node. [02:12] replore__ has joined the channel [02:12] replore_ has joined the channel [02:14] smtlaissezfaire has joined the channel [02:15] mike5w3c has joined the channel [02:15] igl1 has joined the channel [02:18] vikstrous1 has joined the channel [02:19] tilgovi has joined the channel [02:20] torsd has joined the channel [02:21] neoesque has joined the channel [02:23] aelien27 has joined the channel [02:23] gibybo has joined the channel [02:24] gibybo has left the channel [02:26] harthur has joined the channel [02:27] isaacs: ydef: yes, arr.length=0 to truncate has been around since the start of es3, i believe [02:27] isaacs: ydef: at least, i recall doing that in the ie4/nn4 days [02:28] skiz has joined the channel [02:29] tuhoojabotti: That seems legit [02:29] ydef: yeah, just found it in an old article ... and couldn't BELIEVE that I never knew that. [02:31] isaacs: i didn't ever realize it was specified, though. [02:31] isaacs: i thought it was just a works-by-accident hack until creationix was all, "no, that's legit, dude" [02:31] kahrens has joined the channel [02:32] boltR has joined the channel [02:32] tuhoojabotti: I wish I had more motivation and time to code. :/ [02:34] Peniar has joined the channel [02:35] tuhoojabotti: hmm [02:35] tuhoojabotti: physics and math today and I'm missing both books [02:35] tuhoojabotti: can't do homework :D [02:35] Gregor: can't pass class :D [02:36] tuhoojabotti: The books will arrive today probably [02:36] Wa has joined the channel [02:37] Wa has joined the channel [02:37] dominictarr has joined the channel [02:39] talltyler: Are the base modules like fs.js and http2.js compiled into the node binary? [02:39] smathy has joined the channel [02:39] CIA-48: libuv: 03Igor Zinkovsky 07master * r012fc07 10/ (include/uv-private/uv-win.h src/win/fs-event.c): windows: fixes #193. Ensures that uv_fs_event deals with short and long names - http://git.io/KZfozQ [02:44] mandric has joined the channel [02:45] vikstrous has joined the channel [02:45] konobi: with connect, is there a way I can intercept a request in a route, modify the file path and then leave it for the static middleware to serve? [02:46] Vennril2 has joined the channel [02:49] jhurliman has joined the channel [02:49] vikstrous1 has joined the channel [02:51] vikstrous has joined the channel [02:52] diamonds has joined the channel [02:52] diamonds: anyone have experience with compiling lesscss from the CLI with the node tool? [02:52] diamonds: npm installed less but I don't seem to have the "lessc" utility [02:54] trotter has joined the channel [02:56] reid has joined the channel [02:58] aaronblohowiak has joined the channel [02:59] aaronblohowiak: when setting up node to serve ssl with a godaddy certificate, what option do i pass for the certificate file that godaddy calls the "intermediary certificate" ? [02:59] heavysixer has joined the channel [03:00] Lingerance: talltyler: Yes [03:01] _main_ has joined the channel [03:01] elijah has joined the channel [03:01] sub_pop has joined the channel [03:01] cognominal_ has joined the channel [03:02] aaronblohowiak: also, how do i set up the use of RC4 instead of AES-256 [03:03] _main_0 has joined the channel [03:06] Aphelion has joined the channel [03:07] smathy: aaronblohowiak… should be the `ca` option. [03:07] vikstrous has joined the channel [03:08] d_low_ has joined the channel [03:09] mike5w3c_ has joined the channel [03:09] Kami_ has joined the channel [03:12] d_low has joined the channel [03:13] dominictarr has joined the channel [03:14] digman543 has joined the channel [03:15] aaronblohowiak: smathy: thanks! [03:17] talltyler: Not anything big but I just created my first Node.js pull request, it fixes issues with some of the v8 options [03:17] talltyler: https://github.com/joyent/node/pull/1837 [03:18] vikstrous1 has joined the channel [03:19] sub_pop has joined the channel [03:22] flamboz has joined the channel [03:23] vikstrous has joined the channel [03:25] jerrysv has joined the channel [03:25] vikstrous1 has joined the channel [03:26] te-brian has joined the channel [03:28] tilgovi has joined the channel [03:28] tilgovi has joined the channel [03:28] Destos has joined the channel [03:30] htoothrot has joined the channel [03:33] Kami_ has joined the channel [03:34] zackattack has joined the channel [03:34] vikstrous has joined the channel [03:34] kahrens has left the channel [03:35] zackattack: j #backbone.js [03:37] dexter_e has joined the channel [03:38] tilgovi has joined the channel [03:38] davidbanham has joined the channel [03:39] vikstrous1 has joined the channel [03:41] vikstrous has joined the channel [03:43] boehm has joined the channel [03:43] vikstrous2 has joined the channel [03:45] patcito_ has joined the channel [03:45] stalled has joined the channel [03:46] vikstrous1 has joined the channel [03:46] JSManiacs has joined the channel [03:49] skiz has joined the channel [03:49] hacksparrow has joined the channel [03:51] amigojapan has joined the channel [03:51] cjm has left the channel [03:53] zackattack: how's it going everybody [03:53] mikeric has joined the channel [03:54] dynacker: very good thank you [03:56] ChrisPartridge has joined the channel [03:56] stagas has joined the channel [03:56] langworthy has joined the channel [03:58] abraxas: this community's so friendly :) *happy tears* [03:58] brianc: haha please don't cry [03:59] brianc: I wil agree with you though overall node has a very friendly community [03:59] brianc: I take it you're coming from rooby? [04:00] SubStack: http://substack.net/images/browsers/war_of_the_browsers.png [04:00] hacksparrow_ has joined the channel [04:00] brianc: haha that's pretty cool [04:00] brianc: I iike the style of your art [04:01] brianc: you're still in college aren't you? [04:01] mike5w3c_ has joined the channel [04:01] brianc: SubStack: ? [04:01] dynacker: rude [04:01] brianc: rude? [04:01] dynacker: RUDE [04:02] brianc: WHY [04:02] SubStack: brianc: negatory [04:02] dynacker: I DONT KNOW WHY ARE WE SHOUTING [04:02] schwab has joined the channel [04:02] brianc: SubStack: oh, for some reason I thought you were. And I greatly envied your youth and bright future. ;) [04:03] brianc: but I still think you're work is inspiring and super cool [04:03] SubStack: I'll be 24 later this month >_< [04:03] SubStack: so old [04:03] brianc: let's form a back-rub circle [04:03] boaz has joined the channel [04:04] brianc: http://www.flickr.com/photos/38903869@N08/3988521158/ [04:06] brianc: wanna hear a song I recorded recently? http://static.brianc.me/audio/moonman_20111004.mp3 note: off-topic [04:06] vikstrous has joined the channel [04:08] pointlessjon has joined the channel [04:08] vikstrous2 has joined the channel [04:11] vikstrous has joined the channel [04:12] jacobolus has joined the channel [04:13] swankydoodle has joined the channel [04:14] tiglionabbit_ has joined the channel [04:16] chance- has joined the channel [04:17] yozgrahame has joined the channel [04:18] chance-: do you guys roll your own authentication per project or use one of them out there? [04:18] chance-: both connectauth and everyauth seem…. big [04:18] brianc: I use everyauth [04:18] brianc: if you want OAuth/OAuth2 support everyauth is a big win [04:19] swankydoodle has left the channel [04:19] brianc: if you _only_ need password support, I think you're right, everyauth is kinda opinionated [04:19] chance-: which i do, just not atm [04:19] chance-: i know how much of a pita oauth is though [04:19] chance-: hmmph [04:19] brianc: yeah…it makes oauth a cinch [04:20] chance-: well, my biggest concern w/ everyauth is i dont see a way to have multiple login paths [04:20] brianc: and you can feel good about yourself having avoided the deadly NIH syndrome [04:20] chance-: ie, /admin/login, /business/login, /user/login [04:20] chance-: that sorta thing [04:20] jakehow has joined the channel [04:20] brianc: hmmm [04:20] brianc: have some redirect to a single point? [04:20] brianc: I'm not sure about that either [04:20] brianc: if you open an issue I'm sure they'll help you out [04:20] chance-: hmmph, yea that didnt seem like it'd be fun either [04:21] brianc: very helpful [04:21] ChrisPartridge: can't just route */login to your login method? [04:22] chance-: ChrisPartridge: hmm, yea i guess i could but it handles registration too [04:22] chance-: no? [04:22] jtsnow has joined the channel [04:23] dexter_e has joined the channel [04:25] aaronblohowiak: smathy: thanks, i wrote it up here: http://aaronblohowiak.com/setting-up-ssl-hsts-and-an-http-https-redirec [04:26] ChrisPartridge: chance-: Will these logins and register pages differ at all? if not, just route */register to /users/register or w/e [04:26] mike5w3c has joined the channel [04:27] NewCoder has joined the channel [04:27] avih_ has joined the channel [04:29] ryan[WIN] has joined the channel [04:31] aoberoi has joined the channel [04:33] chance-: ChrisPartridge: yea, they are all different [04:33] nuba has joined the channel [04:34] chance-: ChrisPartridge: i'll figure it out, thanks man [04:36] skiz has joined the channel [04:37] kriszyp has joined the channel [04:39] Daegalus: Hey, if a library uses JQuery and its Ajax functions, what would generally be the equivalent for node? [04:39] shanebo has joined the channel [04:40] Kami_ has joined the channel [04:41] Shrink has joined the channel [04:41] Shrink has left the channel [04:42] amigojapan has joined the channel [04:47] JakeyChan has joined the channel [04:48] JakeyChan: hi ? Is there have anyway to execute php code from javascript [04:49] tbranyen: you could shell it out [04:50] yenz: or attempt something w/ phpjs... but shelling to an actual php interpreter is probably the sane way to go ;) [04:51] Tprice has joined the channel [04:51] JakeyChan: is it compatible with node.js ? [04:52] chrislorenz has joined the channel [04:53] dexter_e: If we require('v8-profiler'); in production does it run through some unnecessary cycles or does it only happen if a debugger is connected to it on 5858? [04:54] Tprice: im trying to make an executable when you install with npm install -g [04:54] Tprice: its install ok but when i run it i get ": No such file or directory" [04:54] smathy has joined the channel [04:54] isaacs: Tprice: does it have a shebang at the top? [04:54] isaacs: Tprice: #!/usr/bin/env node or something [04:55] Tprice: yeah it does but i think it might be the problem [04:55] Tprice: see the code https://github.com/FLYBYME/rpc-socket/blob/devel/bin/rpc-socket [04:56] isaacs: looks fine to me [04:56] isaacs: maybe you've got \r chars in there or something? [04:56] Isaiah has joined the channel [04:56] goatlord has joined the channel [04:57] Tprice: humm yes that might be the problem [04:57] Tprice: this is the first time making an executable [04:59] neilk_ has joined the channel [04:59] melcher has joined the channel [05:00] cognominal has joined the channel [05:01] m64253 has joined the channel [05:02] JakeyChan has joined the channel [05:03] fangel has joined the channel [05:04] mike5w3c has joined the channel [05:07] Yuffster_work has joined the channel [05:08] mikeric has joined the channel [05:09] r04r has joined the channel [05:09] hasenj has joined the channel [05:10] tilgovi has joined the channel [05:10] tilgovi has joined the channel [05:10] `10 has joined the channel [05:12] langworthy has joined the channel [05:15] Kami_ has joined the channel [05:15] r04r has joined the channel [05:16] stalled has joined the channel [05:20] Spion has joined the channel [05:23] r04r has joined the channel [05:23] leon_pegg has joined the channel [05:24] Spion_ has joined the channel [05:25] langworthy has joined the channel [05:28] JakeyChan_ has joined the channel [05:28] maletor has joined the channel [05:29] r04r has joined the channel [05:30] githogori has joined the channel [05:31] metellus has joined the channel [05:31] chrislorenz has joined the channel [05:32] dexter_e: Is it recommended to manually run GC? [05:35] torsd has joined the channel [05:36] ChrisPartridge: dexter_e: afaik, no [05:36] dexter_e: thanks [05:37] r04r has joined the channel [05:37] dexter_e: have you used the v8-profiler? [05:38] johnwards has joined the channel [05:38] dexter_e: Im trying to track down a memory leak right now and wondering how to find out which objects are using memory. The profiler just says (String) or (Closure) [05:41] ChrisPartridge: dexter_e: No sorry, however I've read before naming anonymous functions can help track issues down [05:42] r04r has joined the channel [05:42] r04r has joined the channel [05:43] johnwards has joined the channel [05:48] SamuraiJack has joined the channel [05:49] mike5w3c has joined the channel [05:53] r04r has joined the channel [05:53] Daegalus: Node supports namespacing right? [05:54] tilgovi has joined the channel [05:54] Daegalus: maybe this library isnt using it right [05:54] JSManiacs has joined the channel [05:54] stagas has joined the channel [05:55] hellp has joined the channel [05:55] simoon has joined the channel [05:55] ambroff has joined the channel [05:56] DennisRasmussen has joined the channel [05:59] r04r has joined the channel [06:02] akiva has joined the channel [06:02] jetienne_ has joined the channel [06:06] mike5w3c has joined the channel [06:08] innociv: What do I do to find the source of the problem when socket.io connection just won't connect? The page takes forever to load as it's waiting to connect, and the page just never resolves as it's trying to connect to socket.io. I keep having to restart node. [06:11] simoon: innociv: I would get wireshark [06:11] simoon: and take a look at what's going on [06:11] innociv: Guh. Kay. [06:11] simoon: does it say anything in the javascript console? [06:12] simoon: like "can't find socket.io.js" [06:12] simoon: ACTION has bad memory [06:12] simoon: ctrl-shift-j in firefox [06:12] innociv: Yes. [06:13] stephank has joined the channel [06:13] innociv: Though usually it just never connects and it's a blank page infinitely. [06:13] langworthy has joined the channel [06:13] simoon: hmm with no errors? [06:13] ambroff has joined the channel [06:14] simoon: what's the href for your socket.io.js? It might be pointing somewhere that doesn't exist, I had to do domain.com:4444/blaha/socket.io.js [06:14] simoon: I can find out exactly... just a sec [06:15] simoon: http://fgsfds.com:4444/socket.io/socket.io.js [06:19] `10: i'm getting this using node-oauth [06:19] `10: TypeError: undefined is not a function [06:19] `10: at CALL_NON_FUNCTION_AS_CONSTRUCTOR (native) [06:19] `10: trying to auth against facebook [06:19] sdwrage has joined the channel [06:20] gkmngrgn has joined the channel [06:20] `10: http://pastie.org/private/zfzlbsj3nyzlsarq1j11iw [06:20] `10: minimal test case [06:22] `10: when i grab just lib/{oauth2.js,_utils.js} out of a fresh clone of node-oauth, i don't get the constructor error, but then get [06:22] `10: TypeError: Cannot call method 'match' of undefined [06:22] `10: happening inside _utils.js to check for misbehaving hostnames (google) [06:23] mendel_ has joined the channel [06:24] mike5w3c has joined the channel [06:24] `10: forcing _utils.isAnEarlyCloseHost to return false (i'm not authing against google), it seems to work [06:25] petrjanda has joined the channel [06:25] reid has joined the channel [06:25] jetienne_ has joined the channel [06:26] simoon: oauth is hell :( [06:27] mattp_ has joined the channel [06:27] fg3 has joined the channel [06:27] livinded has joined the channel [06:28] livinded: If I'm defining a class as a variable and exporting it in one file, is there a way to reference it in another file without having to call it as a method on a variable that I save the require result to? [06:29] xules has joined the channel [06:30] navaru has joined the channel [06:32] DennisRasmussen has joined the channel [06:33] navaru: Hello, I want to write an article on asynchronous in Node.js, could someone point some good articles, please [06:33] navaru: The article won't be written in english :) [06:34] innociv: simoon, it exists wheni restart it [06:34] innociv: after it dies it doesn't [06:34] innociv: I mean, node is still running.. [06:34] innociv: but it won't respond. [06:34] innociv: and doesn't deliver the js [06:34] akiva has joined the channel [06:35] simoon: huh [06:35] simoon: ACTION ponders [06:35] brannig_an has joined the channel [06:35] innociv: it has only been happening since i put minecraft on my server. When minecraft lag, node.js stops responding even once minecraft settles down. [06:36] innociv: (probably anything using the cpu it wants, not just minecrat.) [06:36] simoon: wtf [06:36] simoon: weird innociv... [06:36] simoon: good at GDB :P [06:36] innociv: i'll wait for it to die agian [06:36] simoon: ?? [06:37] simoon: sounds like a bug in node.js [06:37] innociv: Yeah it does. [06:37] polotek has joined the channel [06:37] innociv: I've seen lots of daemons that die when something else uses the cpu it wants. [06:38] innociv: Lots of things recover fine. [06:38] innociv: Some crash or act weird [06:39] Morkel has joined the channel [06:40] vidi has joined the channel [06:40] thalll has joined the channel [06:40] _sri has joined the channel [06:42] goatlord_ has joined the channel [06:45] goatlord_: testings [06:45] chance-: 123 [06:47] simenbrekken has joined the channel [06:51] sh1mmer has joined the channel [06:53] mike5w3c has joined the channel [06:54] mc_greeny has joined the channel [06:55] beevi7 has joined the channel [06:56] nroot7 has joined the channel [06:56] dob_ has joined the channel [06:56] joshgillies has joined the channel [06:57] nroot7: I just cloned node from https://github.com/joyent/node.git and its failing to build with --without-ssl flag. Is this a known issue ? [06:57] pid_ has joined the channel [06:57] dreamdust has joined the channel [06:57] topaxi has joined the channel [06:58] andree has joined the channel [06:59] nroot7 has left the channel [06:59] nroot7 has joined the channel [07:00] ckknight: nroot7: paste a gist of your error log [07:00] nroot7: ok let me redo the make and redirect to a log file [07:01] stagas has joined the channel [07:02] fangel has joined the channel [07:02] maletor has joined the channel [07:03] joshgillies has joined the channel [07:04] emattias has joined the channel [07:05] NetRoY has joined the channel [07:05] raphdg has joined the channel [07:08] nroot7: ckknight: http://pastebin.com/7dWLf7AQ [07:08] petrjanda has joined the channel [07:09] `3rdEden has joined the channel [07:10] DrMcKay has joined the channel [07:10] ckknight: probably need to install zlib-dev or something [07:11] dshaw_ has joined the channel [07:12] nroot7: thanks [07:13] rednul has joined the channel [07:15] gut4 has joined the channel [07:16] markwubben has joined the channel [07:16] burningdog has joined the channel [07:18] guidocalvano has joined the channel [07:19] mendel_ has joined the channel [07:19] joshgillies has joined the channel [07:20] creationix has joined the channel [07:20] reid has joined the channel [07:21] creationix has left the channel [07:21] jackbean has joined the channel [07:22] Druid_ has joined the channel [07:22] dmitrya2e has joined the channel [07:22] mikeric has joined the channel [07:22] Ginlock has joined the channel [07:26] boaz- has joined the channel [07:26] ctavan has joined the channel [07:26] JSManiacs has left the channel [07:27] djcoin has joined the channel [07:27] `3rdEden has joined the channel [07:28] Frippe has joined the channel [07:30] oiiii has joined the channel [07:31] rednul has joined the channel [07:31] dgathright has joined the channel [07:32] [AD]Turbo has joined the channel [07:32] bergie has joined the channel [07:33] mike5w3c has joined the channel [07:34] [AD]Turbo: hi there [07:36] mynix has joined the channel [07:36] creationix has joined the channel [07:37] johnwards has joined the channel [07:37] JakeyChan has joined the channel [07:38] Wizek-other has joined the channel [07:39] jslatts has joined the channel [07:39] Frippe has joined the channel [07:39] amiller has joined the channel [07:41] nroot7 has joined the channel [07:42] `10: is anyone using node-oauth or any other oauth2 lib to successfully auth against and get an api token from facebook? [07:42] ptlo has joined the channel [07:44] jacobolus has joined the channel [07:45] fangel has joined the channel [07:46] fangel has joined the channel [07:46] creationix has left the channel [07:49] Manuel- has joined the channel [07:51] shapeshed has joined the channel [07:52] cosmincx has joined the channel [07:53] CoverSli1e has joined the channel [07:53] Lemon_BE2 has joined the channel [07:53] dmitrya2e_ has joined the channel [07:53] a_suenam_ has joined the channel [07:53] ambroff_ has joined the channel [07:54] dgathright_ has joined the channel [07:54] ambroff__ has joined the channel [07:55] Manuel-_ has joined the channel [07:55] Aphelion has joined the channel [07:56] xules_ has joined the channel [07:57] ippz has joined the channel [07:57] mertimor has joined the channel [07:57] Tprice has joined the channel [07:57] jackbean has joined the channel [07:57] andree has joined the channel [07:58] chilts has joined the channel [07:58] livinded: is there a way to pass a class name as a variable and call new on the variable? [07:58] jackbean has left the channel [07:59] mpavel has joined the channel [07:59] augustl has joined the channel [08:00] fangel has joined the channel [08:00] madari has joined the channel [08:00] _kud has joined the channel [08:01] CIA-48: node: 03Ryan Dahl 07master * r471c570 10/ (6 files): uv_write2 uv_read2_start binding - http://git.io/spkvPA [08:01] CIA-48: node: 03Ryan Dahl 07master * rf6d8895 10/ (2 files): mv test-child-process-spawn-node.js test/simple/test-child-process-fork.js - http://git.io/4r3ZDQ [08:01] CIA-48: node: 03Ryan Dahl 07master * r08c12de 10/ (4 files in 3 dirs): Upgrade libuv to 886b112 - http://git.io/OMfWJQ [08:01] CIA-48: node: 03Ryan Dahl 07master * r26c5905 10/ (lib/child_process_uv.js src/node.cc): [08:01] CIA-48: node: Reimplement child_process.fork [08:01] CIA-48: node: Fixes test/simple/test-child-process-fork.js - http://git.io/3drUlg [08:01] CIA-48: node: 03Ryan Dahl 07master * r51f7ba4 10/ (14 files in 6 dirs): Merge branch 'ipc-binding' - http://git.io/aB6hsw [08:02] Jabbers has left the channel [08:02] mraleph has joined the channel [08:03] Tprice has joined the channel [08:03] azeroth_ has joined the channel [08:04] mpavel has left the channel [08:08] whitman has joined the channel [08:09] `10: anyone using superagent with node? [08:09] CIA-48: node: 03Ryan Dahl 07master * rd2ab314 10/ node.gyp : Turn off V8's -Werror in GYP - http://git.io/sR2GBw [08:09] `10: even simple queries are not working: http://pastie.org/private/kvkmlylxwpi0je8ekwlrrq [08:09] `10: prints 'null' for me [08:11] stagas: `10: the callback in node is (err, res) [08:11] saikat has joined the channel [08:11] hitana has joined the channel [08:11] `10: stagas: :) [08:12] Aiden has joined the channel [08:12] mikl has joined the channel [08:13] _kud_ has joined the channel [08:14] hitana has joined the channel [08:15] navaru has left the channel [08:16] saikat has joined the channel [08:17] markwubben has joined the channel [08:17] bergelmir has joined the channel [08:17] stagas_ has joined the channel [08:18] akiva has joined the channel [08:18] rendar has joined the channel [08:18] bergelmir has joined the channel [08:19] eldios has joined the channel [08:19] akiva has joined the channel [08:20] hellp has joined the channel [08:20] hitana has joined the channel [08:20] vguerra has joined the channel [08:21] mike5w3c has joined the channel [08:21] innociv has joined the channel [08:23] hitana has joined the channel [08:25] stagas has joined the channel [08:26] aaronmcadam has joined the channel [08:26] tiglionabbit_ has joined the channel [08:27] stonebranch has joined the channel [08:28] fangel has joined the channel [08:28] ctavan_ has joined the channel [08:30] CIA-48: node: 03Ryan Dahl 07master * rb413c77 10/ (3 files in 3 dirs): [08:30] CIA-48: node: Support sending handles to other processes [08:30] CIA-48: node: Needs test. - http://git.io/ivZGXg [08:32] sh1mmer has joined the channel [08:32] herbySk has joined the channel [08:32] saikat has joined the channel [08:32] dgathright has joined the channel [08:33] hkjels has joined the channel [08:34] CIA-48: node: 03Fedor Indutny 07master * r6984553 10/ (9 files): use uv for memory and loadavg functions - http://git.io/YdYpfg [08:34] CIA-48: node: 03Fedor Indutny 07master * r4561d9e 10/ src/node_os.cc : [08:34] CIA-48: node: Don't check sign of loadavg [08:34] CIA-48: node: Fixes #1838 - http://git.io/j6oGLg [08:35] cognominal_ has joined the channel [08:36] JakeyChan: hi ? what's the good library to connect mysql in node.js program ?? [08:36] JakeyChan: node.mysql [08:36] JakeyChan: ? [08:37] saikat has joined the channel [08:37] ivanfi has joined the channel [08:39] saikat has joined the channel [08:41] CIA-48: libuv: 03Ryan Dahl 07master * r1c72aeb 10/ src/unix/process.c : unix: IPC stdio stream should be duplex - http://git.io/1jvNgA [08:41] CIA-48: libuv: 03Fedor Indutny 07master * r5ac0400 10/ include/uv.h : better docs - http://git.io/NZew2A [08:43] adrianmg1 has joined the channel [08:43] adrianmg1 has left the channel [08:44] saikat has joined the channel [08:46] cjm has joined the channel [08:46] akiva has joined the channel [08:49] Lemon_BE has joined the channel [08:49] dominictarr has joined the channel [08:50] mike5w3c has joined the channel [08:50] tiglionabbit has joined the channel [08:51] tiglionabbit: When I read a binary file with fs.readFile, can I convert the result into a string? [08:57] GasbaKid has joined the channel [08:58] kulor-uk has joined the channel [08:59] mike5w3c has joined the channel [09:00] GasbaKid has joined the channel [09:02] GasbaKid has joined the channel [09:02] rootslab has joined the channel [09:03] dmwuw has joined the channel [09:03] GasbaKid has joined the channel [09:05] robotmay has joined the channel [09:06] saikat has joined the channel [09:08] wbednarski has joined the channel [09:08] saikat has joined the channel [09:09] GasbaKid has joined the channel [09:09] markwubben has joined the channel [09:09] jslatts has joined the channel [09:10] liar has joined the channel [09:13] wbednarski has joined the channel [09:14] jakeskik has joined the channel [09:14] bzinger has joined the channel [09:15] boaz has joined the channel [09:16] Margle has joined the channel [09:17] saikat has joined the channel [09:20] massivebiz has joined the channel [09:21] dmwuw has joined the channel [09:21] irahgel has joined the channel [09:21] joshgillies has joined the channel [09:24] N0va` has joined the channel [09:27] bzinger has joined the channel [09:28] meso has joined the channel [09:28] DoNaLd` has joined the channel [09:28] Esteb has joined the channel [09:28] Esteb_ has joined the channel [09:29] dmwuw has joined the channel [09:29] saikat has joined the channel [09:30] davve has joined the channel [09:35] mikl has joined the channel [09:36] jomoho has joined the channel [09:37] DoNaLd` has joined the channel [09:39] saikat has joined the channel [09:43] webjay has joined the channel [09:44] GasbaKid has joined the channel [09:44] saikat has joined the channel [09:44] webjay: { _id: 4e8175d775b963712a000000, Services: [] } [09:45] webjay: How do I access Services? [09:45] ckknight: obj.Services [09:45] webjay: which says undefined? [09:46] ckknight: I don't know how you have that object reference [09:47] webjay: I get it from MongoDB: docs.forEach(function (user) { console.log(user.Services); [09:47] webjay: and I get undefined [09:48] dmwuw has joined the channel [09:48] ckknight: hmm [09:48] ckknight: and user shows up like { _id: 4e8175d775b963712a000000, Services: [] }? [09:48] ckknight: freaky [09:48] webjay: yes, although there are data in Services, I just didn't paste it here [09:49] confoocious has joined the channel [09:50] webjay: I can get the _id [09:50] saikat has joined the channel [09:50] Gigablah has joined the channel [09:50] Xano has joined the channel [09:52] dmwuw has joined the channel [09:52] aaronmcadam has joined the channel [09:53] webjay: https://gist.github.com/351d4b5b9de385c9baa9 [09:56] fermion has joined the channel [09:58] Wizek has joined the channel [09:58] dmwuw has joined the channel [09:59] rachelderp: hi #Node.js !! [10:00] GasbaKid has joined the channel [10:00] dmwuw has joined the channel [10:01] The_Fly has joined the channel [10:01] ckknight: howdy, rachelderp [10:02] The_Fly: console.log(eval("['" + "Hellllooo Room! :P".split('').join("', '") + "']").join('')) [10:05] GasbaKid has joined the channel [10:06] saikat has joined the channel [10:07] fly-away has joined the channel [10:07] Poetro has joined the channel [10:07] Poetro has joined the channel [10:08] johnwards_ has joined the channel [10:11] mAritz has joined the channel [10:13] dmwuw has joined the channel [10:13] mike5w3c has joined the channel [10:14] eldios has joined the channel [10:14] GasbaKid has joined the channel [10:16] michela has joined the channel [10:17] ckknight has joined the channel [10:18] dmwuw_ has joined the channel [10:18] zackattack has joined the channel [10:19] robi42 has joined the channel [10:19] GasbaKid has joined the channel [10:20] saikat has joined the channel [10:21] wbednarski has joined the channel [10:22] wbednarski has joined the channel [10:22] Circlefusion has joined the channel [10:23] jsurfer has joined the channel [10:24] GasbaKid has joined the channel [10:25] sfoster has joined the channel [10:26] webjay: user = user.toJSON(); #solvedIt [10:26] amiller has joined the channel [10:26] dmwuw has joined the channel [10:28] Vampire_Mudkipz has joined the channel [10:28] michela: Is there a way to use relative paths for Express.js' path in res.sendfile? Can only get it working with absolute paths [10:28] Vampire_Mudkipz: http://morph-society-4real.wikia.com/wiki/History_of_the_Illyrian_World [10:29] saikat has joined the channel [10:29] amigojapan has joined the channel [10:30] Vampire_Mudkipz: amigojapan: Wow. You're Japanese Mexican. O_O [10:30] markwubben has joined the channel [10:30] Guest4957 has joined the channel [10:32] piscisaureus_ has joined the channel [10:33] saikat has joined the channel [10:33] SomeoneWeird: Been looking for a while, are there any libraries for image recognition? (also looking for google api library) [10:33] dmwuw has joined the channel [10:33] ayaz has joined the channel [10:34] Vampire_Mudkipz: SomeoneWeird: Are you someone weird? [10:34] SomeoneWeird: are you a vampire Vampire_Mudkipz ? [10:34] Vampire_Mudkipz: No. [10:35] SomeoneWeird: k. [10:36] SomeoneWeird: Well, if anyone could answer either of my questions it would be really appreciated :) [10:37] piscisaureus has joined the channel [10:39] ph^ has joined the channel [10:39] saikat has joined the channel [10:40] FireCat has joined the channel [10:41] dmwuw has joined the channel [10:41] GasbaKid has joined the channel [10:42] Qekrzuv has joined the channel [10:43] JakeyChan has joined the channel [10:44] dmwuw has joined the channel [10:44] jetienne_ has joined the channel [10:45] briandh has left the channel [10:45] d0k has joined the channel [10:47] dmwuw has joined the channel [10:47] zakuni has joined the channel [10:48] dmwuw has joined the channel [10:48] dmwuw_ has joined the channel [10:49] dmwuw has joined the channel [10:51] madsleejensen has joined the channel [10:53] stagas_ has joined the channel [10:54] kurtzhong has joined the channel [10:54] cgfuh has joined the channel [10:55] dmwuw_ has joined the channel [10:56] N0va` has joined the channel [10:56] ErikCorryV8 has joined the channel [10:57] dmwuw has joined the channel [10:57] saikat has joined the channel [10:58] dmwuw has joined the channel [10:59] k1ttty has joined the channel [10:59] gut4 has joined the channel [10:59] Sebastien-L has joined the channel [11:00] dmwuw has joined the channel [11:01] gut4 has joined the channel [11:03] jfrag has joined the channel [11:03] saikat has joined the channel [11:04] jfrag: hi [11:04] dmwuw has joined the channel [11:04] jfrag: i search help for https module [11:04] CIA-48: node: 03Ryan Dahl 07master * r899358e 10/ (6 files in 4 dirs): Add test-child-process-fork2 and fixes to make it work - http://git.io/lwV_rw [11:04] hnan has joined the channel [11:05] replore has joined the channel [11:05] replore_ has joined the channel [11:05] jfrag: i have 6 cpnnection using https.request on 1 process but only 5 connection is launched i don't have any error report for the last connection [11:06] dmwuw_ has joined the channel [11:07] dmwuw has joined the channel [11:07] jfrag has joined the channel [11:07] jfrag: re [11:08] jfrag: it's possible to launch multiple https request on 1 process ? [11:08] jfrag: ? [11:08] konobi: agent.maxSockets [11:09] jfrag: thx [11:09] jfrag: agent is a module ? [11:09] konobi: http://nodejs.org/docs/v0.4.12/api/http.html#agent.maxSockets [11:09] saikat has joined the channel [11:10] jfrag: you save my life :D [11:10] jfrag: thx very much [11:10] dmwuw has joined the channel [11:12] dmwuw has joined the channel [11:13] max_dev has joined the channel [11:13] dmwuw has joined the channel [11:14] eee_c has joined the channel [11:14] jfrag: agent.maxSockets works for https module ?? [11:15] dmwuw has joined the channel [11:17] jfrag: it's for stream twitter api [11:17] dmwuw has joined the channel [11:18] saikat has joined the channel [11:18] ctavan has joined the channel [11:18] fairwinds has joined the channel [11:20] meso has joined the channel [11:20] dmwuw has joined the channel [11:21] jfrag: anybody at chan [11:21] jfrag: ? [11:22] dmwuw has joined the channel [11:22] dmwuw has joined the channel [11:24] prssn has joined the channel [11:25] luke`_ has joined the channel [11:26] piscisaureus: jfrag: agent.maxSockets is for the http client [11:26] dmwuw has joined the channel [11:26] markwubben has joined the channel [11:26] piscisaureus: if you're writing a server it doesn't help [11:26] jfrag: i'm not writing a server i just contact stream.twitter.com [11:26] jfrag: with https [11:27] dmwuw has joined the channel [11:27] jfrag: but only 5 of 6 request work [11:27] bnoordhuis has joined the channel [11:27] jfrag: it's a twitter limitation ? [11:27] dmwuw has joined the channel [11:27] johnwards has joined the channel [11:28] dmwuw has joined the channel [11:30] dmwuw has joined the channel [11:30] piscisaureus: I know that twitter has limitations [11:30] piscisaureus: but you gotta figure out yourself what the limits are [11:31] Fabryz has joined the channel [11:32] JakeyChan has joined the channel [11:33] dmwuw has joined the channel [11:33] scott_gonzalez has joined the channel [11:33] sfoster has left the channel [11:33] schwab has joined the channel [11:34] dmwuw has joined the channel [11:35] mape has joined the channel [11:37] eee_c1 has joined the channel [11:38] saikat has joined the channel [11:38] dmwuw has joined the channel [11:39] kurtzhong_ has joined the channel [11:39] __directory has joined the channel [11:40] markwubben has joined the channel [11:41] dmwuw has joined the channel [11:43] rurufufuss has joined the channel [11:43] boehm has joined the channel [11:44] saikat has joined the channel [11:44] dmwuw has joined the channel [11:44] dmwuw has joined the channel [11:45] stonebranch has joined the channel [11:45] dmwuw has joined the channel [11:45] matyr has joined the channel [11:46] jfrag: :'( [11:47] schristo has joined the channel [11:48] cjm has joined the channel [11:49] dmwuw has joined the channel [11:50] dmwuw has joined the channel [11:51] JakeyChan_ has joined the channel [11:51] dmwuw has joined the channel [11:52] Wizek has joined the channel [11:53] astropirate has joined the channel [11:53] jj0hns0n has joined the channel [11:54] neurodrone has joined the channel [11:54] saikat has joined the channel [11:54] spcshpopr8r has joined the channel [11:55] dmwuw has joined the channel [11:56] erichynds has joined the channel [11:57] dmwuw has joined the channel [11:58] JakeyChan_ has joined the channel [11:58] saikat has joined the channel [12:01] _kud has joined the channel [12:01] dmwuw has joined the channel [12:01] phiggins has joined the channel [12:02] Lemon_BE2 has joined the channel [12:03] AAA_awright_ has joined the channel [12:03] Drakonite2 has joined the channel [12:03] paulwe has joined the channel [12:04] dmwuw has joined the channel [12:06] burningdog has joined the channel [12:07] willwhite has joined the channel [12:08] _jhs has joined the channel [12:08] simenbrekken has joined the channel [12:09] cjroebuck has joined the channel [12:09] Sebastien-L has joined the channel [12:09] ditesh|cassini has joined the channel [12:09] dmwuw has joined the channel [12:11] dshaw_ has joined the channel [12:12] kurtzhong has joined the channel [12:12] Wizek has joined the channel [12:13] ceej has joined the channel [12:14] saikat has joined the channel [12:15] gut4 has joined the channel [12:15] bshumate has left the channel [12:17] diamonds has joined the channel [12:19] ayaz has joined the channel [12:20] dexter_e has joined the channel [12:21] saikat has joined the channel [12:22] markwk_ has joined the channel [12:22] metellus has joined the channel [12:24] markwk_: noob question: installed node.js server on fresh ubuntu server, start node.js script for my project and getting this error: "warn - websocket connection invalid" [12:25] markwk_: not really sure what the issue is with setting up the server... port issue? [12:26] Destos has joined the channel [12:27] fumanchu182 has joined the channel [12:28] `3rdEden: Are there any articles available on how to handle back pressure in Node.js? [12:29] saikat has joined the channel [12:30] FIQ|screen has joined the channel [12:30] brianseeders has joined the channel [12:31] jlaire has joined the channel [12:31] saikat has joined the channel [12:32] bpr has joined the channel [12:33] bpr has left the channel [12:33] wbednarski has joined the channel [12:34] CarterL has joined the channel [12:34] saikat has joined the channel [12:35] JakeyChan has joined the channel [12:36] aconbere has joined the channel [12:39] dmwuw has joined the channel [12:39] mehtryx has joined the channel [12:41] piscisaureus_ has joined the channel [12:43] dmwuw has joined the channel [12:44] dmwuw has joined the channel [12:44] kurtzhong_ has joined the channel [12:46] burningdog has joined the channel [12:46] N0va` has joined the channel [12:46] markwubben has joined the channel [12:47] xules has joined the channel [12:47] dmwuw has joined the channel [12:48] dmwuw has joined the channel [12:48] saikat has joined the channel [12:49] dmwuw_ has joined the channel [12:52] Wizek has joined the channel [12:52] CrisO has joined the channel [12:53] saikat has joined the channel [12:53] Glenjamin: a better chair? [12:55] ptlo has joined the channel [12:55] saikat has joined the channel [12:56] jetienne_ has joined the channel [12:57] jmar777 has joined the channel [12:58] saikat has joined the channel [12:58] dmwuw has joined the channel [12:59] davidsklar has joined the channel [13:00] jldbasa has joined the channel [13:00] dubenstein has joined the channel [13:00] dmwuw has joined the channel [13:01] gut4 has joined the channel [13:01] bzinger has joined the channel [13:01] alex____ has joined the channel [13:02] dmwuw has joined the channel [13:02] kevwil has joined the channel [13:02] bshumate has joined the channel [13:02] bshumate has joined the channel [13:02] __doc__ has joined the channel [13:02] hebz0rl has joined the channel [13:04] piscisaureus has joined the channel [13:07] AaronMT has joined the channel [13:07] kurtzhong has joined the channel [13:07] ayaz has joined the channel [13:07] burningdog_ has joined the channel [13:08] burningdog_ has joined the channel [13:08] dmwuw has joined the channel [13:09] sfoster has joined the channel [13:09] jj0hns0n has joined the channel [13:10] Gaunt has joined the channel [13:10] dmwuw has joined the channel [13:10] thalll has joined the channel [13:10] enmand has joined the channel [13:12] willwhite has joined the channel [13:12] lazyshot has joined the channel [13:13] darinc has joined the channel [13:14] Xano has joined the channel [13:15] ed8t has joined the channel [13:15] hnan has joined the channel [13:16] janne has joined the channel [13:16] JasonJS has joined the channel [13:16] aheckmann has joined the channel [13:16] dmwuw has joined the channel [13:17] dexter_e has joined the channel [13:20] saikat has joined the channel [13:20] hernan has joined the channel [13:21] dmwuw has joined the channel [13:22] burningdog has joined the channel [13:22] dmwuw has joined the channel [13:22] saikat has joined the channel [13:23] ph^ has joined the channel [13:23] dmwuw has joined the channel [13:24] dmwuw has joined the channel [13:27] dmwuw has joined the channel [13:29] k1ttty has joined the channel [13:29] jtsnow has joined the channel [13:30] talltyler has joined the channel [13:31] dmwuw has joined the channel [13:31] sai has joined the channel [13:32] guidocalvano has joined the channel [13:34] kurtzhong_ has joined the channel [13:34] saikat has joined the channel [13:36] EvRide has joined the channel [13:36] dmwuw has joined the channel [13:38] c4milo has joined the channel [13:38] ckknight has joined the channel [13:38] kurtzhong_ has joined the channel [13:38] Ang3 has joined the channel [13:39] Ang3: 0/ [13:39] Ang3: i just test some node code with redis. it returns a connection error. [13:39] Ang3: can figure out why. [13:39] cjroebuck has joined the channel [13:39] Ang3: Anyone got some redis skills around ? [13:40] xerox: http://en.wikipedia.org/wiki/Ada_Lovelace#Commemoration [13:42] dmwuw has joined the channel [13:43] JakeyChan has joined the channel [13:43] Zamarok_ has joined the channel [13:44] dmwuw_ has joined the channel [13:44] xetorthio has joined the channel [13:44] saikat has joined the channel [13:46] burningdog has joined the channel [13:46] icebox has joined the channel [13:46] dmwuw has joined the channel [13:46] thomblake has joined the channel [13:46] thomblake has left the channel [13:47] heavysixer has joined the channel [13:48] Peniar has joined the channel [13:48] dmwuw has joined the channel [13:49] localhost has joined the channel [13:50] dmwuw has joined the channel [13:51] Vennril has joined the channel [13:52] kurtzhong_ has joined the channel [13:52] Swizec has joined the channel [13:54] CIA-48: libuv: 03Bert Belder 07master * r81c09cb 10/ src/win/error.c : win: add error mappings for ECONNRESET - http://git.io/oA5U1g [13:54] dmwuw has joined the channel [13:56] shanebo has joined the channel [13:56] jtrudeau has joined the channel [13:56] alex____ has joined the channel [13:57] dmwuw has joined the channel [13:57] joshkehn has joined the channel [13:58] dmwuw has joined the channel [13:59] Raynos has joined the channel [13:59] jtsnow has joined the channel [13:59] DrMcKay has joined the channel [14:00] ksheurs has joined the channel [14:00] dmwuw has joined the channel [14:03] markwubb_ has joined the channel [14:03] uchuff has joined the channel [14:03] joshkehn: Anyone know if the AMI's listed on http://www.daemonology.net/freebsd-on-ec2/ are current? [14:04] kriszyp has joined the channel [14:04] dmwuw has joined the channel [14:04] Ang3: any advice to get redis working with node.js ? [14:04] hebz0rl has joined the channel [14:05] dmwuw has joined the channel [14:05] Aikar: markwk_: that looks like a socket.io error, likely a person connected with an unsupported browser? [14:06] markwk_: Aikar: didn't get this error locally, using same browser (Chrome OS X) [14:06] Aikar: jfrag: twitter limits # of active requests to stream, I thought it was 1, but i guess it might be 5 for flexability on reconnections [14:07] jfrag: i found a solution :D [14:07] ppcano has left the channel [14:07] Aikar: jfrag: node-twitter should handle all of that [14:07] jfrag: var options = { host: 'stream.twitter.com', port: 443 }; var agent = https.getAgent(options); [14:08] ppcano has joined the channel [14:08] jfrag: applied that and it work [14:08] jfrag: thank's for you're help [14:08] jfrag: youre* [14:08] Aikar: i dont know how well an https client is going to work with the streaming api [14:08] jfrag: :) [14:08] erichynds has joined the channel [14:08] FireCat has joined the channel [14:08] Aikar: streaming api is meant to be long lived [14:09] chuck_daniel has joined the channel [14:09] boaz has joined the channel [14:09] Ang3: what noSQL db do you use ? [14:09] dmwuw has joined the channel [14:09] jfrag: the streamin api is only on https now [14:10] aconbere has joined the channel [14:10] Aikar: jfrag: yes but i meant to continously get data, that nodes http client wasnt designed for a long lived connection [14:10] jfrag: sysadmin limitation :-/ [14:10] Aikar: Ang3: mongodb :P [14:11] Aikar: jfrag: im saying youd be better off using node-twitter lib that handles a normal TCP socket to it and maintains the stream [14:11] Ang3: Aikar: never test Redis ? Hum i was hesitate btw mongo & redis.. [14:11] Ang3: I gonna switch :) [14:11] jfrag: if the connection is keep-alive it work fine [14:11] Aikar: Ang3: nah i havent gotten to much db usage stuff yet [14:11] brianc has joined the channel [14:12] Aikar: and mongo having some querying support outside map/reduce is a big pro to me [14:12] Ang3: hum ok - i'll test it [14:12] Ang3: Node mods are pretty messy :p [14:12] Tprice: im trying to use the pipe function but im getting this error " throw er; // Unhandled stream error in pipe." [14:13] dmwuw has joined the channel [14:13] Aikar: db.table.find({userId: 32}) is fairly simple interface :P [14:14] dmwuw_ has joined the channel [14:14] vipaca has joined the channel [14:14] vipaca has joined the channel [14:15] dmwuw has joined the channel [14:15] Vertice has joined the channel [14:16] catb0t has joined the channel [14:16] kulor-uk_ has joined the channel [14:16] brianc has joined the channel [14:18] jedahan has joined the channel [14:18] dmwuw has joined the channel [14:19] robotmay has joined the channel [14:21] dmwuw has joined the channel [14:21] kurtzhong_ has joined the channel [14:22] igl has joined the channel [14:22] dmwuw has joined the channel [14:23] dmwuw has joined the channel [14:24] ppcano: I have a npm linked package ( 'mypackage' ), which add a function to HTTPServer via --> express.HTTPServer.prototype.useCfg, on this case the function applies to HTTPServer on the npm package context, however (i don't know why?) the function is not applied on the context of the project in which is require('mypackage'). Any hints?? [14:25] dmwuw has joined the channel [14:26] dmwuw has joined the channel [14:26] jrbran has joined the channel [14:26] CoverSlide: ppcano: did you export the new `express` in `mypackage` or are you trying to use `require('express')` after that? [14:26] JJMalina has joined the channel [14:26] firebalrog has joined the channel [14:27] dmwuw has joined the channel [14:28] dmwuw has joined the channel [14:28] dob_ has joined the channel [14:28] ppcano: CoverSlide: no, i didn't export the new 'express', and i also use require('express') after that [14:28] dob_: hello [14:28] dob_: i have some jade question [14:29] dob_: http://pastebin.com/HBuLNMv4 --- Why is the li not in the ul? [14:29] dmwuw has joined the channel [14:29] CoverSlide: ppcano: you can't do that [14:30] CoverSlide: when you `require` a module, it becomes a copy of the original state of the module when the source is read [14:30] CoverSlide: it is cached, so there is no performance hit, but you can't change what you get out of `require` [14:30] vicapow has joined the channel [14:31] vicapow: has anyone done anything with optimistic concurrency between node services? [14:31] dmwuw has joined the channel [14:31] CoverSlide: so if your package modifies express, it needs to export the new express in order for other modules to see it [14:32] kurtzhong_ has joined the channel [14:32] errordeveloper: hm .. I'm a bit stumbled .. [14:33] dmwuw has joined the channel [14:34] errordeveloper: I am trying to read a file into a variable and set a watcher which will re-read it [14:34] ppcano: CoverSlide: i will try it, anyway my implementation is closed to: https://github.com/visionmedia/express-resource/blob/master/index.js and so far, i see. I don't see the export of the new express [14:34] errordeveloper: because each time this file is being read it needs to be parsed, hence [14:34] dmwuw has joined the channel [14:34] errordeveloper: I don't wanna read it evert time there is a request [14:35] errordeveloper: I don't know why there doesn't see to be an event generated by fs.watchFile [14:35] dmwuw has joined the channel [14:35] errordeveloper: so I'm going to creat an event there .. though [14:35] dob_: jade specific question: http://pastebin.com/HBuLNMv4 --- Why is the li not in the ul? Any ideas? I have no idea why i can't add a if in the ul.... [14:35] jslatts has joined the channel [14:36] errordeveloper: I'm still a bit confused what am I doing wrong [14:36] jakehow has joined the channel [14:36] adrianmg1 has joined the channel [14:36] cryptix has joined the channel [14:36] dmwuw has joined the channel [14:36] stagas_ has joined the channel [14:37] airhorns has joined the channel [14:37] dmwuw has joined the channel [14:37] dmwuw has joined the channel [14:38] jocafa has joined the channel [14:38] stash1 has joined the channel [14:38] cryptix: can somebody tell me how to expose __() from node-i18n to jade's templating engine? [14:38] dmwuw has joined the channel [14:39] jetienne_ has joined the channel [14:39] dmwuw has joined the channel [14:39] cryptix: or maybe suggest another module with better support [14:39] sirdancealot has joined the channel [14:39] mroessler has joined the channel [14:40] dmwuw has joined the channel [14:40] JJMalina has joined the channel [14:41] kurtzhong_ has joined the channel [14:42] dmwuw has joined the channel [14:44] ksheurs has left the channel [14:44] jtsnow has joined the channel [14:44] dmwuw has joined the channel [14:44] kurtzhong has joined the channel [14:45] sub_pop has joined the channel [14:46] Glenjamin: dob_: looks like the indenting is off [14:46] nickadeemus2002 has joined the channel [14:46] Glenjamin: the if should be inside the ul [14:48] aelien27 has joined the channel [14:48] dmwuw has joined the channel [14:48] CrisO has joined the channel [14:48] dmwuw has joined the channel [14:49] dmwuw has joined the channel [14:50] dob_: Glenjamin: I tried several different indents, nothing worked with the if. The li is working but not the li after the if. Tried it also in the ul... [14:50] dmwuw has joined the channel [14:51] hellp has joined the channel [14:51] liberum has joined the channel [14:51] dmwuw has joined the channel [14:51] dob_: Glenjamin: This also does not work: http://pastebin.com/HjCBkqgM [14:52] dmwuw has joined the channel [14:53] errordeveloper: oops .. well, watchFile does emit 'change' event [14:53] Glenjamin: dob_: http://pastebin.com/BNDsjHb9 [14:53] errordeveloper: pardon me, it's just undocumented [14:53] errordeveloper: ;( [14:53] Sembiance: Ang3: I use node_redis with redis [14:54] Sembiance: Ang3: npm install redis [14:54] dmwuw has joined the channel [14:54] kurtzhong has joined the channel [14:54] Ang3: yes Sembiance i did it [14:54] Ang3: but i got a Redis connection to 127.0.0.1:6379 failed - ECONNREFUSED, Connection refused [14:54] dob_: Glenjamin: Thank u thought i already tried this! [14:54] Ang3: dunno why [14:55] zastaph has joined the channel [14:55] adrianmg1 has left the channel [14:56] neurodrone has joined the channel [14:56] pixel13 has joined the channel [14:58] jetienne_ has joined the channel [14:58] sonnym has joined the channel [14:58] dmwuw has joined the channel [14:59] saikat has joined the channel [15:00] jaequery has joined the channel [15:01] kurtzhong_ has joined the channel [15:02] erichynds has joined the channel [15:02] pixel13 has left the channel [15:03] dob__ has joined the channel [15:03] wicker_ has joined the channel [15:03] saikat has joined the channel [15:03] dmwuw has joined the channel [15:04] beve has joined the channel [15:04] jstash has joined the channel [15:04] darinc has joined the channel [15:04] issackelly_ has joined the channel [15:05] dmwuw has joined the channel [15:06] kurtzhong_ has joined the channel [15:07] tjholowaychuk has joined the channel [15:07] kurtzhong__ has joined the channel [15:08] saikat has joined the channel [15:08] kurtzhong___ has joined the channel [15:10] saikat has joined the channel [15:10] dmwuw_ has joined the channel [15:10] kurtzhong___ has joined the channel [15:10] skiz has joined the channel [15:13] JaKWaC has joined the channel [15:14] vicapow: in need of occ in node js! [15:14] joshkehn: !define occ [15:15] josephboyle1 has joined the channel [15:15] skm has joined the channel [15:15] Venom_X has joined the channel [15:17] uchuff has joined the channel [15:18] dguttman has joined the channel [15:19] enmand_ has joined the channel [15:20] kurtzhong_ has joined the channel [15:21] inpho has joined the channel [15:21] metellus has joined the channel [15:23] mraleph has joined the channel [15:23] josephboyle1 has joined the channel [15:24] Sicrus has joined the channel [15:25] Sicrus has left the channel [15:25] alvaro_o has joined the channel [15:25] kurtzhong_ has joined the channel [15:26] harthur has joined the channel [15:26] eignerchris has joined the channel [15:26] jamesd_ has joined the channel [15:26] sirdancealot has joined the channel [15:27] dingomanatee has joined the channel [15:27] nibblebot has joined the channel [15:27] benvds has joined the channel [15:28] eresair has joined the channel [15:29] jxck has joined the channel [15:30] willwhit_ has joined the channel [15:32] fairwinds has joined the channel [15:32] infynyxx has joined the channel [15:33] sirdancealot has joined the channel [15:33] bergelmir has joined the channel [15:35] pointlessjon has joined the channel [15:35] isaacs has joined the channel [15:35] jtsnow has joined the channel [15:36] DennisRasmussen has joined the channel [15:37] Spion has joined the channel [15:37] diamonds: I asked yestrerday but had to go: has anyone had success with the node LESS compiler? [15:37] diamonds: lessc [15:38] diamonds: I got the package but lessc doesn't seem to be part of it [15:38] jakehow has joined the channel [15:40] JohnBeales has joined the channel [15:40] davemo has joined the channel [15:41] jhardinee has joined the channel [15:41] Glenjamin: you have to install globally [15:42] BillyBreen has joined the channel [15:43] chrislorenz has joined the channel [15:44] broofa has joined the channel [15:44] __sorin__ has joined the channel [15:45] jhardinee has left the channel [15:46] joshthecoder has joined the channel [15:46] sirdancealot has joined the channel [15:46] smathy has joined the channel [15:48] cNoNim has joined the channel [15:48] jeremyw has joined the channel [15:48] cNoNim: hello, all [15:48] langworthy has joined the channel [15:48] jeremyw: Hello all. [15:48] joshkehn: Hello [15:49] cNoNim: i have some questions. why was removed possibility async module loading? [15:49] cNoNim: it is possible to write more portable code for browser and node.js [15:49] cNoNim: IMHO [15:50] saikat has joined the channel [15:51] louissmit has joined the channel [15:53] michaeldeol has joined the channel [15:53] dmwuw has joined the channel [15:54] shanebo has joined the channel [15:54] jeremyw: I hate to ask such a simple question but I'm new to node.js from a usage perspective. I need to write a very simple server. It listens on a particular port/path, runs a somewhat expensive operation (command line execution) and returns the payload to the calling user. Can anyone make any suggestions for using node.js in such an environment? [15:54] Morkel has joined the channel [15:54] guillermo has joined the channel [15:54] jeremyw: I keep googling to find some advice on the subject but I'm not finding much. Must e using the wrong search terms. [15:56] digman543 has joined the channel [15:56] merlin83 has joined the channel [15:56] kriszyp has joined the channel [15:57] vguerra has left the channel [15:58] jeremyw: Maybe there isn't anything special I need to do at all. The biggest thing is that this will be hit a lot. If anyone wants to get involved with the convo, just highlight me. [15:58] swick has joined the channel [15:59] Zamarok_: jeremyw: spawn a child process to execute your commands. That's about it [16:00] wankdanker has joined the channel [16:00] gsmcwhirter has joined the channel [16:00] Zamarok_: Returning the 'payload' is rather abstract. You can use https://github.com/substack/jsonify, maybe [16:00] nibblebo_ has joined the channel [16:00] jeremyw: Zamarok_: Makes sense. Does that change how I handle requests? I mean, I'll spawn said child process and get its stdout and send back to the user. [16:01] dmwuw has joined the channel [16:01] gut4 has joined the channel [16:01] jebberjeb has joined the channel [16:01] tjholowaychuk: jsonify wtf [16:01] jeremyw: Since it takes a bit to run, a few seconds per request I'd guess...as I'm typing this I see that things don't change really. [16:02] mandric has joined the channel [16:02] bshumate has left the channel [16:02] pizthewiz has joined the channel [16:02] Zamarok_: jeremyw: not sure.. I guess it depends on implementation [16:02] ryanmcgrath has joined the channel [16:02] kulor-uk has joined the channel [16:02] TheJH has joined the channel [16:03] Yuffster__work has joined the channel [16:03] FireCat has joined the channel [16:03] temp01 has joined the channel [16:04] jeremyw: Zamarok_: It's a bandaid really. I'm against it but basically I need a server that listens and gets a payload, a hostname/ip, and runs nmap against it. The implementation is really simple but I just want to do it in a scalable way. [16:05] jeremyw: Response time is not the most important thing as much as scalability. I can even limit the number of concurrent executions. Since I'm learning by doing, I just figured I'd get a little help. [16:06] fennec has joined the channel [16:06] fennec has joined the channel [16:06] ed8t has joined the channel [16:07] Zamarok_: I see.. people here are usually helpful, if you ask specific questions that have concrete answers. That project is outside my scope of knowledge, but good look ^^ [16:07] Zamarok_: good luck* :p [16:07] Frippe has joined the channel [16:07] groovebucket has joined the channel [16:07] hwinkel has joined the channel [16:09] kenperkins has joined the channel [16:09] jimt_ has joined the channel [16:09] schwab has joined the channel [16:09] perezd has joined the channel [16:09] stisti has joined the channel [16:10] jeremyw: haha [16:10] jeremyw: Works for me. [16:10] jeremyw: You got me the first question I needed help with, the best way to run some potentially long running command. [16:11] webjay has joined the channel [16:11] mkrecny has joined the channel [16:12] dshaw_ has joined the channel [16:12] gkmngrgn has joined the channel [16:12] jerrysv has joined the channel [16:12] xerox: jeremyw: good question. have you already read child_process docs [16:12] dmwuw has joined the channel [16:13] jeremyw: xerox: I'm reading them now. [16:13] webjay: How do I convert a mongoose id into an ObjectID? [16:13] dmwuw has joined the channel [16:13] markwubben has joined the channel [16:14] jimt has joined the channel [16:14] bzinger has joined the channel [16:14] dguttman has joined the channel [16:14] chance- has joined the channel [16:14] diamonds: Glenjamin: less ? [16:14] Stephen has joined the channel [16:14] diamonds: Glenjamin: as a limited user I can call less, just not lessc [16:14] diamonds: neither can I call lessc as root [16:16] innociv: Back pressure? [16:18] saikat has joined the channel [16:20] dmwuw has joined the channel [16:21] saikat has joined the channel [16:22] Carter has joined the channel [16:22] joshkehn: Why does Array.prototype return [] ? [16:23] Margle has joined the channel [16:23] Bonuspunk: v8: Array.prototype [16:23] xerox: [] [16:23] xerox: ACTION whistles [16:24] Aikar: lololol [16:24] Aikar: you got me at first [16:24] zemanel has joined the channel [16:24] Bonuspunk: crap, what was the command again? [16:24] Aikar: bots dead [16:24] joshkehn: Funny thing is Math doesn't have a prototype either. [16:24] Aikar: js> Array.prototype [16:24] Aikar: both bots are dead [16:25] Bonuspunk: D: [16:25] nibblebot has joined the channel [16:25] joshkehn: $ node [16:25] joshkehn: > Array.prototype [16:25] joshkehn: [] [16:25] joshkehn: > [16:25] joshkehn: That's what I get [16:25] lime has joined the channel [16:26] Aikar: prolly that if prototype == Array.prototype, print [] instead of {} [16:26] swair has joined the channel [16:26] joshkehn: Weird. [16:26] joshkehn: Object.prototype gives me {} [16:26] joshkehn: But in Chrome it gives me the actual object. [16:26] creationix has joined the channel [16:26] Aikar: cause your making a "new clone of the prototype" or something, so a new array should return [] :P [16:27] joshkehn: But I'm not.... [16:27] vampi-the-frog has joined the channel [16:27] vampi-the-frog has joined the channel [16:27] mynyml has joined the channel [16:27] creationix has left the channel [16:27] joshkehn: I'm trying to redefine the prototype [16:27] MooGoo: if you really want to know look at the source code for util.inspect function [16:27] sh1mmer has joined the channel [16:28] navaru has joined the channel [16:28] joshkehn: for (var fn in Array.prototype) { Array.prototype[fn] = function () {}; } [16:28] eddanger has joined the channel [16:28] joshkehn: It seems the only way to do it is build a list of prototype functions and call each one individually. [16:28] skm has joined the channel [16:28] pixel131 has joined the channel [16:28] joshkehn: I'll look that the utils.inspect thing though. [16:28] pixel131 has left the channel [16:28] blup has joined the channel [16:29] tjholowaychuk: isaacs thanks for the git repo npm support! very helpful right now [16:29] pointlessjon has joined the channel [16:29] MooGoo: what are you even trying to do [16:29] joshkehn: Redefine Array's prototype. [16:29] dmwuw has joined the channel [16:30] MooGoo: you want to outright replace it with another object? [16:30] joshkehn: Not entirely. [16:30] dmwuw has joined the channel [16:30] mdarnall has joined the channel [16:30] Stephen: Anyone have experience with Hook.io? [16:31] MooGoo: native Array.prototype properties are non-enumerable [16:31] MooGoo: you'd have to use Object.getOwnPropertyNames(Array.prototype) to see them [16:31] mxp has joined the channel [16:31] mxp: i have an object of keys and values [16:31] joshkehn: What does non-enumerable mean exactly? [16:32] mxp: is there a way to treverse that object in async callback fashion [16:32] mxp: ? [16:32] MooGoo: it means they dont show up in a for..in statement [16:32] joshkehn: Got it. [16:32] fennec has joined the channel [16:32] fennec has joined the channel [16:32] Glenjamin: mxp: Object.keys combines with an async control flow lib [16:32] MooGoo: why would you want to mxp? [16:32] navaru has left the channel [16:33] mxp: i wont like the treversal to block everything else [16:33] mxp: if list is too long [16:33] mxp: i would preffer that methond [16:33] MooGoo: just break it up occasionaly with process.nextTick [16:33] Glenjamin: unless you use nextTick somewhere it'd block [16:33] jstash: how big of a list is this? [16:33] jstash: (number of keys) [16:33] Glenjamin: but if you want to call async functions on the items in the array you'll need to use some sort of async pattern [16:34] mehlah has joined the channel [16:34] mxp: can be 10000 or more [16:34] MooGoo: it's a flat object? [16:34] _kud has joined the channel [16:34] mxp: yes i only want to treverse on first level [16:34] jstash: async.forEach(Object.keys(thing),function() {},function() {}); [16:35] MooGoo: doesnt sound particularly cpu intensive really.. [16:35] jstash: https://github.com/caolan/async#forEach [16:35] markwk has joined the channel [16:35] jstash: and yeah, sounds rather intensive [16:35] MooGoo: it doesnt [16:35] MooGoo: and forEach is not async [16:35] Glenjamin: it can be [16:35] jstash: it isn't? oh, thought it was [16:35] Glenjamin: if you do process.nextTick(next); [16:35] Glenjamin: and your iterator callback is called next [16:35] MooGoo: then it's not forEach [16:35] mxp: so there is no general library available doing that [16:36] jstash: what async call am i thinking of then? [16:36] Glenjamin: MooGoo: yes it is [16:36] Glenjamin: forEach in parallel mode still only does one at a time [16:36] MooGoo: if you do nextTick inside a forEach the forEach will still run to completion [16:36] Glenjamin: yeah, but you'll release the loop after each operation [16:36] MooGoo: what [16:36] Glenjamin: oh [16:36] MooGoo: the forEach will just loop over the same thing multiple times [16:37] mxp: ok so if i do for (var i in obj) { process.nextTick(/*function handling i...*/) } would that be fine? [16:37] mxp: i mean registering too many nextTicks [16:37] mxp: ? [16:37] pointlessjon has joined the channel [16:37] jstash: no, i isn't bound [16:37] mxp: can node take that? [16:37] MooGoo: an object with 10,000 keys isnt really something I'd worry about [16:37] sub_pop has joined the channel [16:37] Glenjamin: MooGoo: async.forEach(array, function(item, next) { item.doSomething(); process.nextTick(next); }); [16:37] Glenjamin: and it depends what you're doing on each item [16:38] MooGoo: well I dont know what the var async is [16:38] joshkehn: MooGoo: So, why's it doing this? https://gist.github.com/1accd1394fc2b36ad9c3 [16:38] Glenjamin: aaaaah [16:38] Glenjamin: its https://github.com/caolan/async [16:38] dmwuw has joined the channel [16:38] Glenjamin: joshkehn: because you Array.prototype[obj] [16:39] MooGoo: im horrified at how slow my internet is being today.. [16:39] MooGoo: web pages just kinda spin for awhile then give up [16:39] joshkehn: Glenjamin: Can't believe I missed that. [16:39] joshkehn: Thanks [16:39] dmwuw has joined the channel [16:39] bEEEviz has joined the channel [16:40] gr-eg has joined the channel [16:41] bzinger has joined the channel [16:41] metacatdud has joined the channel [16:41] MooGoo: uh [16:41] MooGoo: no [16:41] metacatdud: hi everybody! [16:41] MooGoo: forEach passes (value, key) [16:41] wankdanker has joined the channel [16:42] kevinj has joined the channel [16:42] MooGoo: er [16:42] MooGoo: forget it [16:42] dmwuw has joined the channel [16:42] MooGoo: should work finnee [16:42] Glenjamin: async.forEach != Array.prototype.forEach :) [16:42] MooGoo: lol [16:42] mxp: Glenjamin, so it is async? [16:42] mxp: right [16:42] mxp: ? [16:43] Glenjamin: its async if you use the async library [16:43] Glenjamin: and use nextTick on the callback [16:43] Glenjamin: you might be better off doing Object.keys and Array.slice to group them into batches [16:43] ryanj has joined the channel [16:43] boaz- has joined the channel [16:43] Glenjamin: and then having two loops, releasing the loop only on the outer loop [16:43] metacatdud: I didn't find a clear answer. What exactly is soket.io [16:43] dmwuw has joined the channel [16:44] dexter_e has joined the channel [16:44] dguttman has joined the channel [16:44] ayaz has joined the channel [16:44] crodas has joined the channel [16:44] dmwuw has joined the channel [16:44] metacatdud: it is a node.js extension or something separate and can't work w/o it [16:45] maletor has joined the channel [16:45] dmwuw has joined the channel [16:47] hacksparrow has joined the channel [16:48] akiva has joined the channel [16:48] perezd has joined the channel [16:48] te-brian has joined the channel [16:49] knifed has joined the channel [16:49] spcshpopr8r has joined the channel [16:49] lightcap has joined the channel [16:50] towski has joined the channel [16:50] bEEEeviz has joined the channel [16:51] TooTallNate has joined the channel [16:51] saikat has joined the channel [16:53] Isaiah has joined the channel [16:53] ppcano has joined the channel [16:53] kenperkins: hey guys [16:53] saikat has joined the channel [16:53] cronopio has joined the channel [16:55] dmwuw has joined the channel [16:56] Tyr has joined the channel [16:56] Vertice has joined the channel [16:56] dmwuw has joined the channel [16:56] gregpascale has joined the channel [16:57] bzinger has joined the channel [16:58] ydef has joined the channel [16:58] nibblebo_ has joined the channel [16:59] ydef: What's the preferred way of packaging up a module for use as a command-line utility? [17:00] ydef: All I know atm is how to create basic npm modules, how to link 'em, submit etc [17:00] Glenjamin: there's a 'bin' section in package.json [17:00] lightcap has joined the channel [17:01] Glenjamin: there's also 'preferGlobal' [17:01] enmand has joined the channel [17:01] skm has joined the channel [17:01] Glenjamin: implementation-wise, i'd usually keep the bin script a short stub which loads part of the main lib [17:01] dmwuw has joined the channel [17:02] CIA-48: node: 03Bert Belder 07 * r8fbfa70 10/ deps/uv/src/win/error.c : win: add error mappings for ECONNRESET - http://git.io/_wCvfQ [17:02] CIA-48: node: 03Bert Belder 07 * r2752b75 10/ lib/net_uv.js : Black hole tcp reads after destroy() - http://git.io/MBvrTg [17:02] inph0 has joined the channel [17:02] swick has joined the channel [17:02] skiz has joined the channel [17:03] patcito has joined the channel [17:03] perezd has joined the channel [17:03] Sicrus has joined the channel [17:03] CIA-48: node: 03Bert Belder 07 * rfcad5e3 10/ lib/net_uv.js : Black hole tcp reads after destroy() - http://git.io/29pTFg [17:04] langworthy has joined the channel [17:04] dmwuw has joined the channel [17:04] swair has joined the channel [17:04] StanlySoManly has joined the channel [17:06] irahgel has left the channel [17:06] harthur has joined the channel [17:08] colinclark has joined the channel [17:09] jsurfer has joined the channel [17:09] franciscallo has joined the channel [17:09] agnat has joined the channel [17:09] markwubben has joined the channel [17:10] cjroebuck has joined the channel [17:11] mxp: has somebody made a cheatsheet for nodejs native library stuff? [17:11] CrisO has joined the channel [17:11] saikat has joined the channel [17:12] cjroebuc_ has joined the channel [17:12] dmwuw has joined the channel [17:12] ekryski has joined the channel [17:13] vyshay has left the channel [17:13] heavysixer has joined the channel [17:13] ekryski: Hey all. Has anyone used railwayjs? [17:13] massivebiz has joined the channel [17:13] ayaz has joined the channel [17:14] willwh has joined the channel [17:14] willwh has joined the channel [17:14] Sembiance: ekryski: not i [17:14] ekryski: hmm me neither but it looks pretty decent. [17:15] Sembiance: I'm NOT a fan of ruby on rails. [17:15] djbell has joined the channel [17:15] ekryski: I'm not a huge fan either but the way that the framework is structured it doesn't look too bad [17:15] ekryski: from the website that is. [17:16] ekryski: I was wondering who wrote it (aka who 1602 is on Github) [17:16] stbg has joined the channel [17:17] montylounge has joined the channel [17:18] dmwuw has joined the channel [17:19] dnyy has joined the channel [17:20] liar has joined the channel [17:21] vidi has joined the channel [17:21] tdegrunt has joined the channel [17:21] tdegrunt has joined the channel [17:22] webben has joined the channel [17:23] dmwuw has joined the channel [17:23] deadman87 has joined the channel [17:23] jocafa: Is there anyone using the same bits of code on both client and server? If so, how are you unit testing? [17:23] smtlaissezfaire has joined the channel [17:23] joshkehn: vows [17:24] dmwuw has joined the channel [17:24] jocafa: vows on the client too? [17:24] joshkehn: Yes [17:24] jocafa: client meaning browser... [17:24] joshkehn: Client meaning browser, yes [17:24] jocafa: how are you using vows on the client? [17:24] joshkehn: When we write code it's using a standard export pattern and then we just require() it [17:25] knifed has joined the channel [17:25] joshkehn: ;(function (global) { /* code uses global */}(typeof window === 'undefined' ? exports : window;)) [17:26] JasonSmith: isaacs: Dude. node-tap. 'nuff said [17:26] rednul has joined the channel [17:26] JasonSmith: Where've you been all my life?!? [17:26] isaacs: JasonSmith: you like it? [17:26] isaacs: it need some work in a few areas, pretty badly. [17:26] JasonSmith: Not so much the TAP protocol, that's fine, but I got to throw out all my assert.type and assert.similar and stuff I made by hand [17:26] jocafa: so in the browser, how are you getting reporting from vows? [17:27] isaacs: yeah, t.similar is nice. [17:27] isaacs: diffs ftw :) [17:27] dmwuw has joined the channel [17:27] joshkehn: Clarification: I'm not running the tests in a browser, I'm testing the client side JavaScript code. [17:27] isaacs: JasonSmith: there's a perl thing that does super awesome side-by-side diffs. konobi pointed me to it, and i was pretty jealous. [17:27] jocafa: ah ok [17:28] JasonSmith: I don't have super strong feelings but the "plain english" test stuff (Cucumber) strikes me as masturbatory. What could be clearer than explicit code and an assert? [17:28] isaacs: exactly [17:28] Morkel has joined the channel [17:28] jocafa: cucumber reminds me too much of applescript [17:28] isaacs: rspec/jspec/vows make me rageful. [17:28] Glenjamin: JasonSmith: cucumber isn't for devs to read [17:28] Glenjamin: its for BAs [17:28] isaacs: they're read-only [17:28] jocafa: the english language is inconsistent enough [17:28] Aikar: "masturbatoy" quote of the day [17:28] joshkehn: Cucumber is only good in a salad. [17:28] Frippe has joined the channel [17:28] Tyr has left the channel [17:28] DrMcKay: btw, people seriously use cucumber? [17:28] JasonSmith: yeah or sushi rolls [17:28] joshkehn: DrMcKay: Yes [17:28] joshkehn: Oh god yes. [17:29] joshkehn: It's a “story” [17:29] Glenjamin: DrMcKay: hell yes, we have banks of API tests written by non-devs running via cucumber [17:29] Aikar: great now i want sushi [17:29] joshkehn: A damn novel used to test your application. [17:29] isaacs: Today in Node.JS! Cucumbers strike JasonSmith, in a way which could only be described as "masturbatory"! [17:29] Aikar: guess i might hit the japanese joint up this evening now, thanks! [17:29] jsurfer_ has joined the channel [17:29] DrMcKay: NO. it can't be true. [17:29] DrMcKay: non-devs shouldn't write tests! [17:29] DrMcKay: and story != test [17:29] JasonSmith: isaacs: What is the side-by-side diff doffing? [17:30] JasonSmith: pinche autocomplete. "diffing" [17:30] Glenjamin: BA specifies the requirements, in a story, convert to cucumber test, code to pass it [17:30] Glenjamin: doesn't replace unit tests, but is excellent for an integration test [17:30] isaacs: JasonSmith: so, the idea is that you'd take the two objects, and JSON.stringify or util.inspect them or yamlish-encode them, or whatever, and then highlight spots where one side adds a field, or the fields differ, etc. [17:30] talltyler has joined the channel [17:30] Glenjamin: proper BDD is awesome [17:31] pid_ has joined the channel [17:31] Glenjamin: DrMcKay: https://github.com/glenjamin/nodespec/tree/master/features implementation agnostic full-stack black-box tests [17:31] dmwuw has joined the channel [17:32] stagas__ has joined the channel [17:32] JasonSmith: isaacs: Interesting, I have a similar tool obj_diff that I use for CouchDB validations. Not documented but it's unit tested pretty okay, c.f. https://github.com/iriscouch/obj_diff/blob/master/test/policy.js#L71-90 [17:32] dmwuw has joined the channel [17:32] Glenjamin: the best feature of RSpec isn't the syntax anyway, it's the nested contexts and let() declarations [17:32] isaacs: JasonSmith: the advantage there is that there may be more than one difference, and node-tap's diffs will only show you the first deviation. [17:32] markwk has joined the channel [17:33] isaacs: Glenjamin: node-tap supports nested tests. [17:33] towski has joined the channel [17:33] Glenjamin: isaacs: i quite like the look of node-tap as well [17:33] DrMcKay: Glenjamin: all those tests would be half shorter if written in some normal test framework [17:33] isaacs: test("something", function (t) { t.test("something else", function (t) { ... [17:33] Glenjamin: does it have async before/after definitions running for each test? [17:33] lz has joined the channel [17:33] DrMcKay: ACTION checks out node-tap [17:34] isaacs: Glenjamin: well, you can just have your first test not do anything, and do some setup, or do your setup before entering the test. [17:34] Glenjamin: DrMcKay: its extra for only one or 2 tests, but lots of similar tests requiring similar setup/teardown work well in RSpec [17:34] DrMcKay: hey, isaacs, that's nice! [17:34] isaacs: Glenjamin: mcavage was asking for a .finish() method or something that would be guaranteed, but i don't htink i've delivered on that, yet. [17:34] dmwuw has joined the channel [17:34] Glenjamin: isaacs: generally I want to instantiate a clean object for each test run [17:35] AvianFlu has joined the channel [17:35] eee_c has joined the channel [17:35] isaacs: Glenjamin: yeah, this was more for like, starting a server, and then .close()ing it when your tests are done. [17:35] Glenjamin: mm [17:35] madsleejensen has joined the channel [17:35] isaacs: even if one of them bails out or something, skipping the rest of the tests. [17:35] dmwuw has joined the channel [17:36] Glenjamin: this stuff is my favourite feature of RSpec: https://github.com/glenjamin/nodespec/blob/master/features/subjects.feature [17:36] JasonSmith: isaacs: obj_diff basically shows you the difference between two objects by having only keys which A and B had not-on-common. And it's recursive of course. There are also at_most() and at_least() assertions. I use them for validation like this http://friendpaste.com/6UKIAljmbF75oupSDFs1If [17:37] Glenjamin: you basically say subject = new Class arg1, arg2; arg1 = 'a'; arg2 = 'b'; [17:37] Glenjamin: and then in sub-contexts you can say arg2 = 'c'; [17:37] Glenjamin: because they're evaluated lazily [17:37] JasonSmith: not sure if it's ideal for tap though, just FYR [17:37] Wizek has joined the channel [17:38] torsd has joined the channel [17:38] isaacs: JasonSmith: it wouldn't be too hard to write a little something that adds that functionality to tap.assert. [17:38] dmwuw has joined the channel [17:39] JasonSmith: isaacs: Yeah I am pretty addicted to at-most and at-least change assertions. The only thing I'd want to do is change the syntax a bit [17:39] gut4 has joined the channel [17:40] JasonSmith: assert.at_least({"some.deep.nested.string.value": {from:"this_must_be_old", to: /new_val_must_match_me/}}) [17:40] DrMcKay: isaacs: npm license changed? [17:40] gplg has joined the channel [17:40] isaacs: DrMcKay: yeah, i'm toying with this idea. [17:41] DrMcKay: isaacs: nothing to be afraid of, I see [17:41] isaacs: DrMcKay: i want to give people the freedom to do whatever they want with npm, but i don't want them to send users my way to debug the issues they create. [17:41] adambeynon has joined the channel [17:41] ctavan has joined the channel [17:41] isaacs: i'm not going gpl or anything, don't worry :) [17:41] DrMcKay: isaacs: ah, that's perfectly OK [17:41] brianc: anyone have a recommendation on a place to buy an SSL cert? [17:42] isaacs: brianc: i hear diginotar will trade you one for a chicken [17:42] brianc: hahahaha [17:42] brianc: anyone have a recommendation on a place to buy a chicken? [17:42] DrMcKay: isaacs: when I've noticed 'Update license type', I was really afraid about something GPL-related :) [17:42] markwk: isaacs: what's wrong with gpl? [17:43] Glenjamin: isaacs: if i add a TAP formatter to my test runner, could that link up with your node-tap stuff? [17:43] isaacs: markwk: it's not free enough, and too contagious [17:43] stepheneb has joined the channel [17:43] isaacs: markwk: i want you to be able to use npm in closed-source programs that you charge money for. [17:43] dmwuw has joined the channel [17:44] isaacs: commerce is what organizes teh activities that eventually put food in bellies. sane people eventually grow up and realize how necessary it is. [17:44] innociv has joined the channel [17:44] DrMcKay: isaacs++ [17:44] brion has joined the channel [17:44] brion has joined the channel [17:44] markwk: isaacs: depends on the logic of what we're building... is it software as a service or software as software [17:44] cgfuh has joined the channel [17:45] isaacs: markwk: MIT lets you use it for either. [17:45] isaacs: markwk: the gpl overreaches. [17:45] nrajlich has joined the channel [17:45] JasonSmith: npm -g -p -l [17:45] isaacs: :) [17:45] jmar777_ has joined the channel [17:45] JasonSmith: Matter of time. Mark my word. [17:45] AvianFlu has joined the channel [17:45] isaacs: JasonSmith: npm ls -gpl [17:46] DrMcKay: haha [17:46] isaacs: JasonSmith: that's just the same as: npm ls --global --parseable --long [17:46] jmar777__ has joined the channel [17:46] LikeAVirginBoy has joined the channel [17:46] Glenjamin: isaacs: i mentioned the other day i'd like to add an "npm exec" command - but without an exec() call in core i'm not sure how i'd go about it - any ideas? [17:46] markwk: I just don't see a lot of people producing for the code... but for what the code does... using open source [17:46] LikeAVirginBoy: So, I've finally figured it out. [17:46] isaacs: Glenjamin: what does `npm exec` do? [17:47] LikeAVirginBoy: So, I've finally figured it out. [17:47] LikeAVirginBoy: Twisted vs. Node.js is like a McLaren F1 against a bicycle starting from the finish line. [17:47] isaacs: markwk: that's like saying that you see a lot of people producing frying pans, but only for cooking, not for frying pans themselves. [17:47] Glenjamin: it runs a binary, using the node_modules/.bin dirs before global npm [17:47] isaacs: Glenjamin: i see. [17:47] JasonSmith: Uh huh. That's what they always say. In the beginning. Then you wake up one day in the middle of a Kafkaesque coup d'etat and it's all "HANDS ON THE WALL! WE'RE TAKING YOUR FREEDOM." [17:47] isaacs: Glenjamin: take a look at the npm explore command. [17:48] markwk: isaacs: I don't see how the metaphor applies to software :) [17:48] Glenjamin: isaacs: finding the relevant binary is easy enough, I just cant' think of a way to run it [17:48] LikeAVirginBoy: Kafka would have loved Ecstasy pills. [17:48] isaacs: markwk: the purpose of software is to tell computers to do stuff. [17:48] isaacs: markwk: i mean, if you want to product code for code's sake, then that's fine, you can do that. but if it doesn't *do* anything, then it's just a poem. [17:48] JasonSmith: ACTION is getting concerned that working on databases all day trains one to be pessimistic about everything [17:48] markwk: isaacs: so software doing stuff... isn't the same as a frying pan... it's the frying [17:48] LikeAVirginBoy: isaacs: Not really. [17:49] markwk: a lot of ways to skin a cat [17:49] DrMcKay: isaacs += 1 << 31 [17:49] scott_gonzalez has joined the channel [17:49] trotter has joined the channel [17:49] dmwuw has joined the channel [17:49] isaacs: markwk: here's what it comes down to: if you license your code under the GPL, then you're saying that if I use your code in MY program, then MY program has to *also* be GPL'ed. [17:49] DrMcKay: assuming isaacs is a long long int :P [17:49] markwk: isaacs: open source stuff has created huge increase in effeciency, better code... [17:50] isaacs: DrMcKay: i'm not. you just flipped me max-negative. thanks a lot ;P [17:50] fumanchu182 has joined the channel [17:50] isaacs: markwk: right, so.. you can still use my MIT thing in your GPL thing. [17:50] isaacs: markwk: i mean, clearly, having the option is better, yeah? [17:50] markwk: isaac: MIT is okay too [17:50] `10 has joined the channel [17:50] DrMcKay: isaacs = 1 << 30 [17:50] isaacs: i put GPL (and other copy-left licenses) in teh same bucket as MPAA/RIAA or proprietary company licenses, etc. [17:50] DrMcKay: isaacs: there you go :P [17:51] isaacs: DrMcKay: much better. in fact, as much better as it is possible to be better :) [17:51] DrMcKay: :) [17:52] isaacs: i mean, i'm still going to *watch* movies that are RIAA-restricted no-copy blah blah blah. but i won't use them in my own art (if i were to make movie-art) because i'm not comfortable with that restriction, or passing that restriction on to my users. [17:52] isaacs: in teh same way, i'll *use* lots of gpl softwrae on my system. but i don't distribute any of it.e [17:52] yept has joined the channel [17:52] isaacs: or link to it, or include it in my programs, etc. [17:53] LikeAVirginBoy: Saying the purpose of software is to tell computers to do stuff is... the most patently absurd thing of which I've ever heard. [17:53] DrMcKay: LikeAVirginBoy: huh? [17:53] isaacs: LikeAVirginBoy: what do you think the purpose of software is? [17:53] LikeAVirginBoy: It's like saying the purpose of a chef is to operate an oven. It completely misses the point, isaacs. [17:54] DrMcKay: LikeAVirginBoy: then, what does software do? [17:54] isaacs: no, it's like saying the purpose of an oven is to produce food. [17:54] Glenjamin: it allows people to make computers do things [17:54] Glenjamin: hrn [17:54] darinc has joined the channel [17:54] Glenjamin: no, i still prefer yours [17:54] LikeAVirginBoy: isaacs: Forget it... [17:54] markwk: I guess my point is that open source software has significantly helped tons of projects and the world as a whole. [17:54] storrgie has joined the channel [17:54] isaacs: a software program is like a machine. i mean, i get that there's an art to it, i really do, that's why i do this. [17:54] LikeAVirginBoy: You're completely missing what software is about. [17:54] Glenjamin: please, enlighten us poor fools [17:54] joshkehn: LikeAVirginBoy: Yet you won't enlighten us as to your view. [17:55] dmwuw has joined the channel [17:55] simoon has joined the channel [17:55] LikeAVirginBoy: ACTION goes back into his Ivory Tower. [17:55] isaacs: but if you just sit around all day writing algorithms and never running them, well, that's not software development, that's computer science. [17:55] markwk: isaacs: i just don't want you to pull a MySQL... and say certain things about it are now restricted access [17:55] isaacs: may as well go argue about haskell vs scala on hacker news. [17:55] DrMcKay: or do node benchmarks! [17:55] dexter_e has joined the channel [17:56] isaacs: markwk: if MySQL had been MIT from the start, we wouldn't be in this mess. [17:56] brianc: DrMcKay: ++ [17:56] isaacs: markwk: but no, really, the only change to the npm license (which isn't final, like I said, just kind of toying with the idea) is what you can use my name, url, and email address for. [17:56] brianc: DrMcKay++ [17:56] brianc: hmmm...i guess beer-bot isn't working [17:56] langworthy has joined the channel [17:56] markwk: I wonder if MySQL would have been successful under another license [17:57] vidi has joined the channel [17:57] isaacs: in other words, "if you break this thing, please don't give me credit for breaking it." [17:57] markwk: Maria is pretty much all I use now. [17:57] isaacs: markwk: yeah, it's hard to say. [17:57] AvianFlu_ has joined the channel [17:57] DrMcKay: so when someone makes his fork totally different, we should enable github issues. [17:58] isaacs: part of what made mysql successful was the corporate moneys it got, which it got by using a business model where it's gpl for free, or proprietary for $$$ [17:58] dmwuw has joined the channel [17:58] markwk: isaacs: they made money from service agreements [17:58] isaacs: as opposed to the more subtle and challenging, but ultimately freer and safer, business model that joyent is using with node. [17:58] markwk: how do you think ubuntu plans to make $? [17:58] LikeAVirginBoy: isaacs: A more accurate definition of software might be what Steve Jobs said, that software is an extension of our minds, a bicycle. [17:58] isaacs: markwk: mysql also made money by selling proprietary non-gpl licenses. [17:59] isaacs: LikeAVirginBoy: the purpose of a mind is to tell its body what to do. :P [17:59] isaacs: LikeAVirginBoy: minds are inherently embodied. [17:59] markwk: isaacs: I wonder if that came from the fact that many companies can't really use GPL stuff... like oops I attached a bit our 3-year development code into some GPL... fuck [17:59] dmwuw has joined the channel [17:59] isaacs: software, as an extension of our minds, turns machines into an extension of our bodies. [17:59] LikeAVirginBoy: Seeing the word MySQL on my screen makes me want to bang my fists on my desk repeatedly until I go into a rage and throw my laptop out the window and into the street. [18:00] joshkehn: I love MySQL [18:00] joshkehn: ACTION wonders how he feels about that [18:00] markwk: I love MySQL too.. or at least MariaSQL [18:00] markwk: same guy... different daughter [18:00] LikeAVirginBoy: ACTION would like to see a taxi full of burning people dropped on joshkehn. [18:00] isaacs: markwk: that's why i don't use gpl, either. i might want to sell this stuff some ay :) [18:00] dmwuw has joined the channel [18:00] joshkehn: Well that's a bit harsh. [18:01] markwk: isaacs: that sentence makes me afraid [18:01] wadey has joined the channel [18:01] dmwuw has joined the channel [18:01] isaacs: markwk: npm itself will always be mit [18:01] isaacs: i just might wnat to bundle it in something that isn't free as in speech. [18:02] isaacs: or someone else might, and that might be something interesting and good. [18:02] LikeAVirginBoy: isaacs: Again, missing the point. That's not the purpose of our minds. [18:02] markwk: isaacs: they said something similiar about mysql... corporations are evil... [18:02] isaacs: i don't want to prevent that. [18:02] dmwuw has joined the channel [18:02] isaacs: markwk: you can still get the last version of mysql that was released GPL'ed, and use it under the GPL, right? [18:02] enmand_ has joined the channel [18:02] LikeAVirginBoy: The purpose of our minds is to funnel decision trees into the meta universes. [18:02] isaacs: or is it still? [18:03] joshkehn: WTF [18:03] isaacs: LikeAVirginBoy: you said the same thing i did. [18:03] isaacs: LikeAVirginBoy: or you said nonsense. not sure which, really. [18:03] markwk: isaacs: mysql is now dead to me... vivre maria! [18:03] isaacs: :) [18:03] Aikar: what spawned this mysql convo, they just changed license? [18:03] hydrozen has joined the channel [18:03] AvianFlu: it's amazing how many of the people who come in here and say strange things from strange nicknames are connected via webchat [18:03] LikeAVirginBoy: isaacs: Well, I've been doing lines of coke this morning so I'm a bit off today. :) [18:03] isaacs: Aikar: i added a no-false-attribs clause ot npm's license. [18:04] LikeAVirginBoy: ACTION goes back to coding. [18:04] seebees has left the channel [18:04] seebees has joined the channel [18:04] dmwuw has joined the channel [18:04] isaacs: Aikar: still MIT, just that if you change or disable a bunch of stuff, you have to also remove my email address from the error output. [18:04] jmoyers has joined the channel [18:04] Aikar: ah [18:05] LikeAVirginBoy: AvianFlu: Are you a fan of DUAL DETROIT & MOTOWN MADONNA? [18:05] markwk: Aikar: they took a very large step towards saying certain things will be proprietary [18:05] isaacs: Aikar: https://github.com/isaacs/npm/blob/master/LICENSE#L18-25 [18:05] Aikar: what is this maria you guys mentioned, found some article saying its a new engine to replace innodb, but in 2008? that surely didnt happen [18:05] markwk: completely closed source [18:05] zmbmartin has joined the channel [18:06] Aikar: markwk: is this new or old? [18:06] Aikar: links? [18:06] markwk: Aikar: fairly new... couple weeks, month [18:06] markwk: google it [18:07] jj0hns0n has joined the channel [18:07] randylien has joined the channel [18:07] DrMcKay: isaacs: hey, is something particularly wrong with my npm version or are you just busy? (not bugging you, just wondering) [18:07] dmwuw has joined the channel [18:07] darinc: Aikar: http://mariadb.org/ [18:07] isaacs: DrMcKay: been pretty busy. [18:07] isaacs: DrMcKay: it's in teh pipeline [18:07] hydrozen: I'm trying to use process.setuid right after calling the listen command in express and I get this on my mac "Error: EINPROGRESS, Operation now in progress". I'm guessing its because the listen() call isnt done? [18:07] DrMcKay: isaacs: no problem :) [18:08] markwk: Aikar: mariadb is a total drop in solution for replacing mysql... it's apparantly better in some ways too [18:08] isaacs: hydrozen: listen() takes a callbakc. you could try doing it there. [18:08] isaacs: server.listen(function () { process.setuid("nobody") }) [18:09] dmwuw has joined the channel [18:09] LikeAVirginBoy: You know what the problem coders have is. We have all this skill, but God never tells us what to do build with it. [18:09] Aikar: http://mysql.com/news-and-events/web-seminars/display-666.html [18:09] Aikar: that stuff huh [18:09] Aikar: that is really lame [18:10] jslatts_ has joined the channel [18:10] Aikar: what happened to making-alot-of-money-on-our-commercial-products-because-people-love-us-for-our-open-source-products [18:10] LikeAVirginBoy: We are the Communicators for God's people, but he ignores us. God only talks to crazy people in the street. WTF?! [18:11] Aikar: lets keep religion out of the channel [18:11] LikeAVirginBoy: Aikar: The revenue-from-support business model replaced it? [18:11] Dulak has joined the channel [18:11] markwk: Aikar: Oracle plays funny games sometimes [18:11] LikeAVirginBoy: ACTION isn't talking about religion. [18:12] franciscallo has joined the channel [18:12] sh1mmer has joined the channel [18:12] dmwuw has joined the channel [18:13] skm has joined the channel [18:13] AaronMT has joined the channel [18:14] ph^ has joined the channel [18:14] hydrozen: isaacs: its the 2nd argument? [18:14] ctavan has joined the channel [18:14] isaacs: hydrozen: ? [18:15] hydrozen: of listen() [18:15] isaacs: hydrozen: oh, yeah [18:15] isaacs: listen(port, cb) [18:15] isaacs: you can also do listen(port, interfaceIp, cb) [18:16] Aikar: or even listen(function() { }) and let the OS assign a port :P [18:16] Aikar: "callback is last" is the principle [18:17] Aikar: .listen(function() { var port = this.server().port; var client =net.createConnection(port); }); [18:17] Aikar: is a common thing to do for testing [18:17] tjholowaychuk has joined the channel [18:17] versicolor has joined the channel [18:18] tjholowaychuk has joined the channel [18:19] neilk_ has joined the channel [18:19] ayaz has joined the channel [18:19] markwk: isaacs: sorry if I sounded negative on the license stuff... love what you did/do/will do with npm... huge addition to the node.js ecosystem! I'm sure you aren't getting paid enough for that ;) [18:20] vicapow has joined the channel [18:20] langworthy_ has joined the channel [18:20] isaacs: markwk: aw, thanks. i don't think you sounded too negative. [18:21] dmwuw has joined the channel [18:21] Sicrus has joined the channel [18:22] hotch has joined the channel [18:22] dgathright has joined the channel [18:23] dmwuw has joined the channel [18:24] sechrist2 has joined the channel [18:24] perezd: are there any libraries in node for distributed locks? [18:24] locks has left the channel [18:25] dmwuw has joined the channel [18:25] ydef: Say, guys -- what's the recommended way to take an npm package, and make a script within it available to run as a command-line tool? [18:26] sechrist2: So I've encountered this in all forms of javascript, but I've never came to a conclusin as to why. If I'm declaring var foo = loop_subject[i]; before an async call, or anything with a callback.. in the callback and within the same scope, foo is always the last item by the time the network calls come back [18:26] isaacs: ydef: http://npmjs.org/doc/json.html#bin [18:26] tjholowaychuk: ydef check out some existing packages [18:26] sechrist2: and I usually fix it with (function(foo){})(foo); but I've never known why that works [18:26] jesusabdullah: Especially ones with bins, obvs [18:27] pid__ has joined the channel [18:27] ydef: oh! duh! Thanks, isaacs! [18:27] dmwuw has joined the channel [18:28] ydef: (will come back with more specific question later, probably. ;) ) [18:28] isaacs: sechrist: because your async things are trapping a reference to the same "foo" var that's defined outside the scope. [18:28] dmwuw has joined the channel [18:28] isaacs: sechrist: for example: [18:29] AvianFlu: sechrist: the short answer nobody gave you is "loops don't create scope in JS" [18:29] isaacs: v8: var foo = "bar"; function f () { console.log(foo) }; f(); foo = "baz"; f() [18:29] isaacs: aw, no v8bot [18:29] isaacs: anyway... you'd expect that to print "bar" and then print "baz", right? [18:29] dmwuw has joined the channel [18:29] robotmay has joined the channel [18:30] sechrist2: hmm, yep [18:30] isaacs: sechrist: so, what about this? [18:30] dmwuw has joined the channel [18:30] isaacs: var foo = "bar"; function f () { console.log(foo) }; [1, 2, 3, 4, 5].forEach(function (num) { foo = num; setTimeout(f) }) [18:31] isaacs: sechrist: the timeout happens *after* the forEach has run all the way through, right? [18:31] isaacs: and we've scheduled 5 of them. [18:31] wankdanker has joined the channel [18:31] isaacs: so, we're doing: foo=1; setTimeout; foo=2; setTimeout; ... ; foo=5; setTimeout [18:31] isaacs: then all the setTimeouts fire. [18:31] sechrist2: ahhhhh [18:31] isaacs: and you get 5, 5, 5, 5, 5 [18:31] sechrist2: that makes perfect sense now [18:32] isaacs: but!!! if you did this: [1, 2, 3,4 ,5].forEach(function (num) { setTimeout( function () { console.log(num) }) }) [18:32] dmwuw has joined the channel [18:32] isaacs: now you're defining a *new function* for each iteration [18:32] isaacs: and that new function traps the current value. [18:32] joshthecoder has joined the channel [18:32] isaacs: rather than referring to some shared reference that they all close over. [18:33] sechrist2: which is why the (function(blah){...})(blah) always fixes it for me [18:33] isaacs: exactly. [18:33] Dmitrijus: "trapping a variable", nice :) [18:33] isaacs: for (var i in obj) (function (value) { ... })(obj[i]) [18:33] isaacs: or something like that [18:33] boaz has joined the channel [18:33] ydef: LoL, baby [18:34] lmorchard has joined the channel [18:35] jroesslein has joined the channel [18:35] thalll has joined the channel [18:35] dmwuw has joined the channel [18:35] kahrens has joined the channel [18:35] dmwuw has joined the channel [18:36] markwk has left the channel [18:36] reid has joined the channel [18:37] dmwuw has joined the channel [18:37] joshkehn: So portsnap installs seem to be unbearably slow. [18:37] joshkehn: Anyone have an idea why? [18:37] dmwuw has joined the channel [18:38] perezd has joined the channel [18:38] dmwuw has joined the channel [18:39] ydef: isaacs: periods in npm package names: cool or uncool? [18:40] ydef: I see just a tiny handful of packages using periods. [18:40] ydef: like socket.IO [18:41] CarterL has joined the channel [18:42] CrisO: is there a way for the node repl to maintain history of commands across sessions? kinda like irb [18:42] tjholowaychuk: CrisO i think there's an issue open regarding a disk dump [18:42] tjholowaychuk: of history [18:43] Aikar: CrisO: sounds like a discent pull req to offer and get your name in the AUTHORS file :P [18:43] Aikar: decent* [18:43] CrisO: BAM! [18:43] mkrecny has joined the channel [18:43] darinc: isaacs: thanks for your explanation. Very timely for me as I am currently digging out of that specific scope heck [18:43] paulwe has joined the channel [18:43] CrisO: shit... now I gotta go tweet that I got called out on the irc room... brb ;) [18:43] dmwuw has joined the channel [18:44] swair has joined the channel [18:44] nphase has joined the channel [18:44] livinded has joined the channel [18:44] dmwuw has joined the channel [18:46] fbartho has joined the channel [18:46] isaacs: ydef: i'd say not-cool. [18:46] isaacs: ydef: i think it's allowed, though [18:46] livinded: I'm trying to pass the name of an object as a variable and then instantiate the object stored in the variable but I'm node is dying with https://gist.github.com/874a933101c2177dbecb [18:46] isaacs: ydef: i prefer a single short easy to type name, *maybe* with a hyphen [18:46] livinded: name of a class* [18:47] isaacs: livinded: you can't do that. [18:47] isaacs: livinded: like, x = "SomeClass"; new x()? [18:47] livinded: right [18:47] isaacs: livinded: this isn't php. [18:47] isaacs: ;P [18:47] fbartho: Does anyone have a pointer to how to go about building a node module that has a binary component? I looked at the github wiki and the various module search pages, but I couldn't find it. I googled "node modules" and "node binary modules" among others. Any suggestions? [18:48] isaacs: you can do x = SomeClass; new x() though [18:48] dmwuw has joined the channel [18:48] ydef: heh http://npmjs.org/doc/json.html#bin [18:48] isaacs: fbartho: https://github.com/isaacs/node-async-simple [18:48] dmwuw has joined the channel [18:48] livinded: isaacs: the class name is taken from the key from a hash [18:48] isaacs: fbartho: binary as in compiled, or as in executable thingie? [18:48] Aikar: if its global you can do new globan[x] [18:49] Aikar: global* [18:49] isaacs: livinded: yeah, back up, don't do that, do a differentthing. [18:49] isaacs: that's my advice. [18:49] livinded: isaacs: not sure how else to do this then [18:49] isaacs: livinded: put the class in the hash, instead of putting its name there. [18:49] isaacs: instead of hash[key] = "SomeClass", do hash[key] = SomeClass [18:49] dmwuw has joined the channel [18:49] fbartho: thanks guys, my interest is in making a FUSE filesystem plugin written in node. Step one on the FUSE side is writing a CPP module that plugs in to nodejs [18:50] jesusabdullah: fbartho: What are you fuse-ing? [18:50] isaacs: fbartho: awesome. [18:50] jesusabdullah: Like, what's the filesystem? [18:50] jesusabdullah: Surely something slick right? [18:50] fbartho: @isaacs are you Isaac Schlueter ? [18:50] tjholowaychuk: does github have a fuse thing yet? [18:50] isaacs: fbartho: i started down that task, but haven't been able to get back to it. [18:50] isaacs: yeah [18:50] toopay has joined the channel [18:50] joshkehn has left the channel [18:50] isaacs: ACTION is Isaac Z. Schlueter [18:50] jeremyw has joined the channel [18:50] fbartho: I think you posted in the only thread that comes up when I search for the topic [18:50] tjholowaychuk: woudl be cool to see GH integration [18:50] DrMcKay: isaacs: PROVE IT! [18:51] Aikar: fbartho: i would love you 3000 times if you made a better SSH fs that maintains a connection and uses like ls and cd to list directories [18:51] isaacs: pm me a string, i'll sign it wiht my private key [18:51] isaacs: :) [18:51] DrMcKay: lol [18:51] livinded: isaacs: thanks, that worked [18:51] tjholowaychuk: Aikar http://fuse.sourceforge.net/sshfs.html [18:51] fbartho: I want to make a MYST-style multiuniverse that generates minecraft worlds [18:51] Aikar: its absolutely stupid you can ls in a remote ssh terminal 30x faster than an SSH mount [18:51] DrMcKay: and where's your public key? :D [18:51] Aikar: tjholowaychuk: thats slow [18:51] Aikar: i mean one that does it more effecient [18:51] tjholowaychuk: ah [18:51] livinded: metaprogramming and typing in javascript is so full of failure :( [18:51] fbartho: basically, I don't want to deal with Minecraft's Java code and instability. Instead I'll deal with the fileformat which has been pretty stable [18:51] isaacs: DrMcKay: search the public gpg registries for my email address. [18:52] Aikar: if i can type ls in a terminal and see results instantly, i should be able to in nautilus too [18:52] isaacs: DrMcKay: if i give it to you here, you can't trust that i'm really me. [18:52] fbartho: step one is build the FUSE plugin/module for node [18:52] isaacs: DrMcKay: same if i give you my email address here, or tell you where to find it. [18:52] fbartho: step two is build on top of that for the minecraft project. [18:52] DrMcKay: isaacs: true [18:52] isaacs: DrMcKay: also, "isaacs" is registered with irc.freenode.net [18:52] dmwuw has joined the channel [18:52] mwillhite has joined the channel [18:52] isaacs: so depending on the level of proof you want, that could be enough [18:53] fbartho: isaacs is in oregon [18:53] fbartho: :P [18:53] mwillhite: hey all, I'm doing some research on using nodejs (over ruby) to write an API… [18:53] DrMcKay: isaacs: I demand SHA1 of your DNA! [18:53] mwillhite: brand new to nodejs, tho I've been working in javascript for the last 6 months [18:53] isaacs: mwillhite: what kind of api? [18:53] mwillhite: can anyone point me to some good resource in regards to best practices, api's with node, database interaction [18:54] mwillhite: it just needs to talk to a database on the backend, do a little post processing, then send the values out to an app [18:54] mwillhite: mostly graphable data [18:54] jeremyw: mwillhite: I've used node.js+express to create a RESTful API that basically does object CRUD backed by a database. Pretty common from what I know. [18:55] mwillhite: what are you using to talk to the db? [18:55] dmwuw has joined the channel [18:55] jeremyw: The DB was MongoDB which itself is RESTful. [18:55] mwillhite: okay [18:55] jeremyw: There are also DB libs you can find. [18:55] tjholowaychuk: mwillhite we have drivers for lots of dbs [18:55] mwillhite: I'll be talking to mysql [18:55] mwillhite: yeah I've seen there are a bunch [18:55] tjholowaychuk: but not really anything like datamapper etc [18:55] mwillhite: just not sure which are the best [18:55] mwillhite: our ruby implementation was going to use the sequel gem [18:56] mwillhite: something like that would be incredible [18:56] mwillhite: we'll likely have to talk to different databases, sometimes as part of the same request to the api [18:56] mwillhite: dealing with a sharded database [18:56] mwillhite: in the longer term at least [18:56] jmar777 has joined the channel [18:56] chiyam has joined the channel [18:57] mwillhite: right now we're thinking that a ruby api while looking at middleware solutions like storm may suffice [18:57] mwillhite: then storm could do the post process of the queries… [18:57] dmwuw has joined the channel [18:57] mwillhite: but it seems nodejs will just be better for handling lots of requests at once [18:58] tjholowaychuk: honestly i had ruby running just fine [18:58] tjholowaychuk: i just prefer js [18:58] tjholowaychuk: haven't compared them perf-wise in a long time but at the time node/ruby with thin etc was comparable [18:59] DrMcKay: use rubinius if it's about performance [18:59] mwillhite: yeah I've been looking at these: http://tjholowaychuk.com/post/543953703/express-vs-sinatra-benchmarks [18:59] mwillhite: not sure if its really relevant [18:59] DrMcKay: but (ruby && performance) == false, anyway [18:59] tjholowaychuk: mwillhite super old now [19:00] mwillhite: oh good point [19:00] mwillhite: I didn't notice the date [19:00] tjholowaychuk: and i left out static file serving [19:00] tjholowaychuk: for a reason [19:00] livinded: I might have to actually benchmark ruby+eventmachine and see how it compares [19:00] tjholowaychuk: haha [19:00] tjholowaychuk: ) [19:00] tjholowaychuk: :)* [19:00] livinded: javascript is driving me crazy... [19:01] Joseph_ has joined the channel [19:01] dmwuw has joined the channel [19:02] Joseph_: Hi! I have a old source file in C with some functions. 1) Its possible to transform it in a Node Module? [19:02] reid has joined the channel [19:02] dmwuw has joined the channel [19:03] dmwuw has joined the channel [19:03] Joseph_: Hi! I have a old source file in C with some functions. 1) Its possible to transform it in a Node Module? [19:03] jstash: 1) yes [19:03] Tigraine has joined the channel [19:04] kahrens has left the channel [19:04] jstash: node-ffi or convert it to C++ [19:05] dmwuw has joined the channel [19:05] mxp: wat is the one liner to convert function arguments to array? [19:06] davidwalsh has joined the channel [19:06] dmwuw has joined the channel [19:06] tjholowaychuk: mxp [].slice.call(arguments) [19:06] massivebiz has joined the channel [19:07] heavysixer has joined the channel [19:07] dmwuw has joined the channel [19:09] ismell has joined the channel [19:10] dmwuw_ has joined the channel [19:12] ph^ has joined the channel [19:12] japj has joined the channel [19:12] mwillhite: I'm about to ask some stupid questions [19:12] mwillhite: but this stuff is new to me [19:12] mwillhite: concurrency in node…what does that give me? [19:12] mehlah has joined the channel [19:13] dmwuw has joined the channel [19:13] mwillhite: allowing more users to hit the same type of request at a time? [19:13] nealstewart has joined the channel [19:13] Migaaresno has joined the channel [19:13] mwillhite: I don't understand how it all works together…say I have a thin API that just queries a database and returns the data [19:13] mwillhite: what is the advantage of using node over something like ruby/sinatra? [19:13] mehlah has joined the channel [19:14] Margle has joined the channel [19:14] tjholowaychuk: mwillhite js :D [19:14] tjholowaychuk: haha [19:14] dmwuw has joined the channel [19:14] mwillhite: a great argument, sure…but is that it? [19:15] smtlaissezfaire has joined the channel [19:15] mwillhite: I'd love to use node for this project, but I need to justify it to the higher-ups if its going to happen [19:15] mwillhite: and right now, node is going to be a slower startup…just because its a bunch of ruby guys that I'll be working with [19:15] xerox: it can be fun [19:15] tjholowaychuk: I prefer the workflow personally [19:15] tjholowaychuk: i prefer the libraries that our community have built etc [19:16] xerox: also notice that he invented 4/5 of the workflow [19:16] xerox: and he wrote 4/5 of the libraries [19:16] mwillhite: hehe [19:16] deadman87 has joined the channel [19:16] dmwuw has joined the channel [19:16] tjholowaychuk: no lol we have tons of good stuff [19:16] tjholowaychuk: our package manger is nicer IMO [19:16] tjholowaychuk: lots of things [19:17] tjholowaychuk: i like that we have one concurrency model [19:17] mwillhite: but in terms of performance [19:17] mwillhite: what am I gaining? [19:17] wink_: it really depends on what you're doing [19:17] xerox: : ) [19:17] mwillhite: well…given the api example [19:18] mwillhite: I have a lot of graphable data that will be consumed by a couple of different clients [19:18] jerrysv: mwillhite: there is no threading, so anything cpu intensive is not something you'd want to use node for [19:18] mwillhite: I will need to do some post processing on the data after it comes out of the db, but I could potentially use some middleware for that [19:18] mwillhite: okay [19:18] wink_: mwillhite: is your current ruby stack running up against a performance wall? [19:18] jerrysv: a good example is an unoptimized fibseq generator [19:19] artgon has joined the channel [19:19] mwillhite: it hasn't been built yet… [19:19] mwillhite: I don't know where I would hit the wall either [19:19] tjholowaychuk: mwillhite looking for a magic bullet is probably not the right approach [19:19] mwillhite: I'm rebuilding an api, the new one is going to be hitting a much more complicated database structure [19:19] tjholowaychuk: there are lots of good solutions [19:19] tjholowaychuk: I'd suggest node for an api like that though for sure [19:19] wink_: absolutely [19:19] mwillhite: why would you suggest that? [19:20] dreamdust: Yeah, just offload the CPU stuff to C modules or bash scripts [19:20] mwillhite: (sorry just trying to get a handle on something I can use to justify the shift) [19:20] jerrysv: hm. i wonder if this is the only language specific irc channel that also questions whether the language is the right one for the problem [19:20] ekryski: probably not :-) [19:21] wink_: mwillhite: it seems you're putting the cart before the horse here. if you know that little about node vs ruby, you probably dont want to hang your nuts out to your bosses :> [19:21] AvianFlu: millwhite: if you've got a shop full of devs that don't write node, trying to get them all to pick up node cause you say so is gonna be fail [19:21] mwillhite: I'm just trying not to be too bored on this project [19:21] wink_: you have a solution looking for a problem, that'll get you in trouble [19:21] dmwuw has joined the channel [19:22] mraleph has joined the channel [19:22] mwillhite: good point wink_ [19:22] AvianFlu: every time one of them messes up some async code, it will be "node sucks" and it'll be your fault [19:22] mwillhite: and AvianFlu [19:22] mwillhite: haha [19:22] mwillhite: very true [19:22] mwillhite: but I can handle that :) [19:22] jerrysv: if you're looking to justify a language change to not be bored, maybe you're in the wrong job :) [19:22] wink_: your example however, is a good fit for node in the general case [19:22] AvianFlu: it's just how people react to new things when they already know how to do it the old way [19:22] mwillhite: thanks wink_ [19:23] coldfire22x has joined the channel [19:23] smtlaissezfaire has joined the channel [19:23] davegb3 has joined the channel [19:23] wink_: if your ruby guys are actually ruby guys and not polyglots writing ruby, they might try to lynch you ;> [19:23] dmwuw has joined the channel [19:23] mwillhite: I don't mind pushing people to look forward, especially when their current ways could bite them [19:23] AvianFlu: as much as I don't like to say it, coffeescript might actually help you [19:23] stbuehler has joined the channel [19:24] AvianFlu: it will let them write code on node that looks like the code they're used to [19:24] ekryski: If your looking to not be bored try getting some of the guys in the office to try working on a node side project first [19:24] mwillhite: yeah not so worried about that… [19:24] coldfire22x: is there a convenient way to include another javascript file and parse it as javascript (similar to require, but without having to make use of exports etc) [19:24] mwillhite: its less the guys I'm worried about than the timeline extension [19:24] mwillhite: alright, well this has been helpful [19:25] mwillhite: but it sounds like performance wise I may not gain a ton from switching to node over ruby [19:25] mwillhite: at least no one spoke to that [19:25] ekryski: it depends on your requirements [19:25] ryah: mwillhite: cough [19:25] mwillhite: sure [19:25] ryah: yes you will gain a ton [19:25] wink_: mwillhite: you would likely gain a ton [19:25] ryah: sorry, that was implicit [19:25] jerrysv: ryah: was wondering who would respond to that one [19:25] ekryski: node is much faster but its not perfect for everything [19:25] mwillhite: please elaborate [19:25] dmwuw has joined the channel [19:25] ekryski: ha ha ryah [19:25] mwillhite: haha [19:25] jerrysv: you can slow node way down, it is possible [19:25] mwillhite: I was hoping that putting that out there would strike some conversation [19:26] wink_: the vm is far quicker, the async model is much more efficient for i/o heavy workloads [19:26] wink_: the overhead per connection way less [19:26] AvianFlu: the vm is WAY WAY WAY quicker [19:26] AvianFlu: the overhead per function call is an order of magnitude less [19:26] ryah: the VM is *much better* and you will be forced to design your server better [19:26] dmwuw has joined the channel [19:26] mwillhite: great, this is what I'm looking for ;) [19:26] jerrysv: but if you don't have a problem that can be addressed asynchronously, then you need to either re-think your problem, or re-think your solution [19:27] xy has joined the channel [19:27] dmwuw has joined the channel [19:28] dmwuw_ has joined the channel [19:28] ryah: v8 is built by professionals - ruby is a hobby project [19:29] mwillhite: it sounds like if we wanted to move the data monitoring apps (the consumers of the api) to real-time, then node is definitely the way to go [19:29] ekryski: yes [19:29] tjholowaychuk: ruby has many implementations :p [19:29] tjholowaychuk: js is just as shitty for that [19:29] mwillhite: because then we get access to sockets and other great things [19:29] dmwuw has joined the channel [19:29] tjholowaychuk: but yeah v8 is infinitely better [19:30] DrMcKay: tjholowaychuk: v8 = infinity * ruby ? [19:30] isaacs: didn't we recently establish that it can calculate fibonacci numbers faster than any other platform [19:30] isaacs: ? [19:30] ekryski: ha ha [19:30] AvianFlu: isaacs: recursively, yes. [19:30] AvianFlu: but when you don't make ruby or CPython call functions, they aren't nearly as bad [19:30] DrMcKay: we need fibonacci as a service! [19:30] xerox: please [19:30] ryah: mwillhite: for any technical reason you should use Node. there may be some valid social reasons to not use it. [19:31] isaacs: ryah++ [19:31] dmwuw has joined the channel [19:31] ryah: mwillhite: (over ruby that is) [19:31] ag4ve has joined the channel [19:31] ekryski: ya like if you don't want to be hipster ;-) [19:31] Aikar: "node is cancer!" = social reason [19:31] isaacs: ryah: though i'm not so sure those social reasons are "valid" [19:31] isaacs: ryah: (with respect to ruby, that is) [19:32] ryah: also if you don't want tumors covering your body - you probably shouldn't use node [19:32] ryah: it does in fact cause that. [19:32] ryah: :( [19:32] Aikar: hahah [19:32] dmwuw has joined the channel [19:32] isaacs: ryah: really sad about how node killed steve jobs. [19:32] tjholowaychuk: hahaa [19:32] xerox: hey that was not written on the packaging! [19:32] xerox: I demand my money back!!! [19:32] DrMcKay: rotfl [19:32] wink_: node took our jobs? [19:33] isaacs: also, princess diana. killed by node. [19:33] Aikar: lol [19:33] dmwuw has joined the channel [19:34] dmwuw has joined the channel [19:34] tjholowaychuk: those old benchmarks still kinda show how much faster v8 is actually [19:34] jmoyers has joined the channel [19:34] tjholowaychuk: even though that was over a year ago [19:34] tjholowaychuk: so it's bound to be far better now [19:34] CIA-48: node: 03talltyler 07 * r10f97f9 10/ lib/fs.js : [19:34] CIA-48: node: Fixing #1774 about issues when running node with --harmony_block_scoping v8 option [19:34] CIA-48: node: Fixes #1837. - http://git.io/JzeWWQ [19:35] dmwuw has joined the channel [19:35] Aikar: :O you can pass v8 flags like that at runtime? [19:35] Aikar: i thought those were compile time options [19:35] wink_: :x [19:35] xerox: http://arstechnica.com/business/news/2011/10/google-puts-mysql-in-app-engine-cloud.ars [19:35] dmwuw has joined the channel [19:36] wink_: Aikar: go blow your mind, node --v8-options [19:36] wink_: ;> [19:37] stonebranch has joined the channel [19:37] Aikar: harmony stuff only in 0.5.x i take it? [19:37] dmwuw has joined the channel [19:37] mwillhite: where does ssl stand with node at this point? [19:37] ryah: Aikar: yes [19:37] mwillhite: supported? [19:37] Xano has joined the channel [19:37] Aikar: yes mwillhite [19:37] ryah: mwillhite: yes [19:37] dmwuw has joined the channel [19:38] Aikar: too bad harmony proxies are in bleeding edge [19:38] fennec has joined the channel [19:38] Aikar: prolly rare chance thatll land in a v8 version before .6 :( [19:38] tjholowaychuk: no wayzzz [19:39] dmwuw has joined the channel [19:39] ryah: Aikar: they're under a flag in v0.5 [19:39] ryah: --harmony_proxies [19:39] Aikar: the node-proxy module works pretty well but proxied functions have typeof == object instead of function [19:39] tjholowaychuk: node --get-rid-of-magical-js-crap [19:39] Aikar: ryah: O.o i thought it was bleeding-edge, node doesnt use bleeding does it? [19:40] dmwuw has joined the channel [19:40] ryah: Aikar: it's in v8 trunk - which is what node uses [19:40] ryah: node and chrome-dev are on the same V8 [19:40] Aikar: hmm i saw work being done in BE, thought it wasnt landed yet [19:41] trose has joined the channel [19:41] dmwuw has joined the channel [19:41] ag4ve has joined the channel [19:42] Aikar: ryah: what do you think of defaulting harmony stuff on in node? [19:42] dmwuw has joined the channel [19:43] japj: ryah: I'm having some issues with bleeding edge node and install npm (it works with v0.5.8), I'm having an unhandled exception in pipe.c.. I'm trying to bisect it, but maybe this rings a bell somewhere? [19:43] ryah: Aikar: we follow V8 defaults [19:43] ryah: japj: can you paste it? [19:44] trose: hey i'm trying to create a server that will read a buffer, run some scripts on that information then return something. What would allow me to do that? [19:44] temp01 has joined the channel [19:44] swick has joined the channel [19:44] dmwuw has joined the channel [19:44] swick has left the channel [19:45] talltyler: The harmony features that are add-ons I can see just enabling all the time but things like block level scope change the way you have to write code, these should remain option until people start writing code with in in mind [19:45] ryah: japj: just update the issue you posted - what you're giving us isn't much info [19:45] meming has joined the channel [19:45] japj: ryah: I need to rebuild node master again so I can actually paste the stack trace, just a sec [19:45] lmorchard has joined the channel [19:45] ryah: japj: thanks [19:46] japj: ryah: yeah I know, I was hoping to have found the offending commit by now, but my git bisect foo is a bit.... problematic today it seems [19:46] dmwuw has joined the channel [19:46] ag4ve__ has joined the channel [19:48] artgon: Is there a simple way for node to interact with other applications? i.e. Scala (JVM) [19:48] McMAGIC--Copy has joined the channel [19:49] Aikar: artgon: use a common message format and communicate over sockets [19:49] Dmitrijus: artgon: have a look at zeromq [19:49] ph^ has joined the channel [19:49] artgon: hm ok, thanks guys [19:50] ryah: artgon: http :) [19:50] Migaaresno: I have done 'sudo npm install express' but I still get "Cannot find module 'express'". Im not sure what im doing wrong. [19:50] Dmitrijus: btw [19:50] ryah: Migaaresno: did it create a directory called node_modules in your current directory? [19:50] Dmitrijus: "embassy-grade software paltform"? [19:51] ryah: Migaaresno: npm installs packages locally [19:51] `10 has joined the channel [19:51] isaacs: Migaaresno: npm link express [19:51] artgon: ryah, yeah I just figured there might be an easier way if let's say they're both running on the same box -- i.e. without marshalling/unmarshalling [19:51] isaacs: oh, cannot find module. [19:51] isaacs: nvm [19:51] isaacs: Migaaresno: yeah, it should create a ./node_modules/express [19:52] isaacs: in the folder where you installed it [19:52] japj: ryah: handle->read_cb is actually 0x000000 [19:52] ryah: artgon: nope, sorry [19:53] ryah: japj: do you have a way of reproducing it? [19:53] japj: ryah: I updated the issue with the information, I have everything in MS Visual Studio debugger if you need me to lookup anything else [19:53] Aikar: ryah: so that domains feature, what i gather is all "event loop" related stuff such as sockets and timers are registered in a group and your able to kill everything associated with a group at once with a .kill()? [19:53] ryah: Aikar: yes [19:53] japj: ryah: this is 100% reproducable for me following the npm installation instructions for windows, using the node master [19:54] Aikar: ryah: how would current connections/requests be handled, would a 'killrequested' type event fire and let them gracefully shutdown first, or would it forcefully kill the connection ? [19:54] ryah: japj: piscisaureus will be on a in minute - im sure he'll be able to solve it quickly. sounds easy. [19:54] ryah: Aikar: no - force kill [19:54] tjholowaychuk: domains sound handy [19:55] tjholowaychuk: that would be great for things like kue, too hard to shut down 10+ redis connections [19:55] swair has joined the channel [19:55] tjholowaychuk: and intervals n shit [19:55] dmwuw has joined the channel [19:55] tjholowaychuk: and for test suites [19:55] japj: ryah: k, np [19:55] Aikar: ryah: maybe a singletick callback event could fire to give SOME support for cleanup? (just no async code able to be used) [19:55] mwillhite: thanks all, you may be seeing a lot more of me! [19:55] Aikar: ie do emit() on each then kill it [19:56] ryah: Aikar: you're worried about 500 pages? [19:56] Aikar: no, just i could see some desire to implement different logic with a domain kill vs a client disconnect [19:57] ryah: client disconnect => you'll get an 'end' [19:57] Aikar: yeah but if its part of a domain, may be other stuff you want to teardown [19:57] Aikar: where as a normal client disconnect you wouldnt [19:57] k1ttty has joined the channel [19:57] ryah: there won't be clean ups for domains - it's too tangly [19:58] Deegie has joined the channel [19:58] Aikar: and i dont see how it would hurt, on .kill(), blah.emit('killed'); blah.end() in a single tick [19:58] gplg has joined the channel [19:59] jeremyw: When I parse a request url using require('url').parse(req.url, true), is there a better way to check and see if a query param was passed than "if (qParams.param != undefined) { ... }"? Basically, if a query param isn't provided I want to return a 405. [19:59] hitana has joined the channel [19:59] Migaaresno: isaacs, thanks. npm link helped. [19:59] jeremyw: I'm learning by doing so bear with me...well, I'm reading some API docs as well. ;) [19:59] ag4ve has joined the channel [20:00] jeremyw: I guess this is more core JavaScript than node. I'll look around ref docs, my bad. [20:00] ryah: Aikar: domains are meant to localize uncaught exceptions - after the uncaught exception you're already in a bad state [20:00] ryah: Aikar: there's nothing that can be done but to shutdown [20:00] tjholowaychuk: isaacs it would be sweet if some day the community unified changelogs [20:00] dgathright has joined the channel [20:00] tjholowaychuk: so you could do [20:01] tjholowaychuk: $ npm changes (or something) [20:01] isaacs: tjholowaychuk: yeah, people have asked for that [20:01] tjholowaychuk: to get updates for the versions matching your deps [20:01] isaacs: but it's hard to do in any reasonable way [20:01] tjholowaychuk: yeah i can imagine [20:01] TheJH: isaacs, btw, could you add support for saving the git commit checksum in the package or so? [20:01] mwillhite: jeremyw: you could so something like qParams.param ? doSumtin() : return504(); [20:01] isaacs: i think what's going to happen is that we'll figure out how to harvest docs, and then have some way to search/view them, and CHANGELOG or CHANGES will just be one of those files you could see [20:02] TheJH: isaacs, then you could just use git magic :D [20:02] hitana has joined the channel [20:02] simenbrekken has joined the channel [20:02] isaacs: TheJH: nah, you'd have to save the whole .git folder to the registry then, or make remote fetches for it at install time... it all just sucks to do that. [20:02] isaacs: better to just read the docs. [20:02] te-brian has joined the channel [20:03] TheJH: isaacs, or fetch it at "npm changelog" time [20:03] FMJaggy has joined the channel [20:03] sh1mmer has joined the channel [20:03] fbartho: @isaacs I've been reading your node-async-simple sample and you have this DoSomething_After method that isn't actually bound anywhere. How and why is it different? How would I use it? [20:04] te-brian has joined the channel [20:04] isaacs: fbartho: you give eio_custom 2 functions: one to run on the thread pool, and another to run after the threaded work is done [20:04] isaacs: the thread-pool function can't access v8 objects [20:04] isaacs: it's "away" [20:04] fbartho: ahhh [20:05] isaacs: so you have to do your long-running job there, but then come back with the results, and translate the results into v8-isms for javascript [20:05] isaacs: bbiab [20:05] fbartho: so, for what I need to do, I have the FUSE cpp runtime, and I need to use the lowlevel io framework it has to push events into Javascript [20:05] hitana has joined the channel [20:05] fbartho: without being initially called from JS [20:06] TheJH: ACTION heard FUSE [20:07] TheJH: fbartho, you're doing FUSE bindings? [20:07] fbartho: I want to [20:08] fbartho: I really wanted a node project for a distributed world generator (think MYST) that creates worlds for minecraft [20:08] fbartho: via FUSE [20:08] fbartho: the minecraft fileformat is much more stable than the JAVA code... [20:08] saikat has joined the channel [20:08] tjholowaychuk: haha yeahhhhh myst [20:08] mikeric has joined the channel [20:09] nealstewart: fbartho that sounds ridonculous [20:09] ryah: FUSE, like the userspace filesystem? [20:09] hitana has joined the channel [20:09] fbartho: fun though, right? [20:09] TheJH: FUSE bindings would be sooo cool :) [20:09] ryah: yes [20:09] fbartho: Step one though is the FUSE bindings [20:09] ag4ve has joined the channel [20:09] fbartho: and only one person ever posted on google about doing it [20:09] ryah: isaacs has done some work on fuse bindings [20:09] fbartho: and they gave up [20:09] fbartho: isaacs chatted about it with this person, but didn't actually do any work. [20:10] Aikar: ill bake you (premixed) cookies and mail you them if you make a FUSE file system for SSH that is implemented using standard linux commands like ls and cat so we can have an sshfs that doesnt suck :( [20:10] tjholowaychuk: Aikar i haven't actually bothered to try sshfs is it that bad? [20:10] fbartho: Saving that quote. [20:10] ryah: i can advise someone who wants to make fuse bindings [20:10] baudehlo: any node core tls people here? [20:10] Aikar: its worse than smbfs [20:10] TheJH: Aikar, is sshfs bad? why? [20:10] fbartho: heh [20:10] Aikar: its slow [20:10] ryah: baudehlo: ? [20:10] tjholowaychuk: sadface [20:10] fbartho: sftp is slow [20:11] Aikar: you double click a folder and it takes like 3-5s [20:11] Dulak: it's never going to be fast [20:11] fbartho: I think you're boned there. [20:11] Aikar: if i can issue an ls command and see results instantly [20:11] Aikar: why cant an sshfs [20:11] fbartho: it has to stat the files [20:11] TheJH: true, should work... [20:11] Dulak: you have 2x the overhead from the encryption and decryption on top of the slow speed of the network [20:11] fbartho: so that it can serve them up the right way [20:11] baudehlo: ryah: oh hey... is it considered a bug that 'drain' is called before write() returns on a connected pair of tls sockets? [20:11] ryah: baudehlo: yes [20:11] baudehlo: I expect drain to only be called after write() returns false. [20:12] Aikar: ideally id like an sshfs that simply opens an ssh connection, maintains it, and uses the results of the linux commands to render the file system results [20:12] baudehlo: but it's being called from within the write() path. [20:12] TheJH: fbartho, who are you on github and did you already create the repo? [20:12] ryah: baudehlo: yeah, that's bad [20:12] fbartho: not created yet [20:12] fbartho: fbartho on github [20:12] ryah: baudehlo: can you make a test case and post an issue? [20:12] TheJH: fbartho, you have a new follower :) [20:13] baudehlo: I'll try but for some reason this works in some places and not others. [20:13] baudehlo: ryah: though here's the stack trace: https://gist.github.com/1271232 [20:13] fbartho: TheJH: I plan on getting a helloworld of a node module + fuse before I post it. [20:13] baudehlo: ryah: it's fairly easy to see *why* it happens. There's emit('drain') in _pull(). [20:13] ryah: baudehlo: hm yeah [20:13] ryah: baudehlo: i guess we should insert some nextTicks there. [20:14] baudehlo: *nod* that would be nice. :) [20:14] ryah: baudehlo: please make an issue for me - or else i'll lose it [20:14] baudehlo: I'll put some protection around it for now in Haraka. [20:14] baudehlo: ok [20:14] ryah: thank you [20:14] hitana has joined the channel [20:16] baudehlo: hmm, actually I don't think nextTick() solves it... [20:17] baudehlo: because if it has actually been drained, then you want write() to return true, right? [20:17] [[zzz]] has joined the channel [20:17] baudehlo: and it seems to do that too. [20:18] baudehlo: Bah, I'm gonna have to create a test case. [20:18] hitana has joined the channel [20:18] wink_: yorick: ping [20:19] Dulak: Aikar: you know you can use a key, and an agent to make ssh transparent? Once setup you can simply do ssh hostname ls -la /path/to/list [20:19] gplg has joined the channel [20:19] m00p has joined the channel [20:19] Aikar: Dulak: huh? that has nothing to do with what was talking bout lol, were talking about FUSE SSHFS [20:20] Aikar: and I was saying we need a replacement that works off linux commands [20:20] TheJH: Dulak, also, re-auth with all that crypto back-and-forth and expensive operations for each command? no thanks [20:20] piscisaureus has joined the channel [20:20] Aikar: yeah sshing into my home box is slow :( [20:20] Aikar: but once im in, golden [20:20] HardPhuck: can I include all *.js files in a folder? [20:20] Dulak: TheJH: it's like 10x faster than sshfs [20:21] TheJH: Dulak, but you can't just run programs, like run the local gcc on a remote c file or so [20:21] kahrens has joined the channel [20:21] Aikar: what i would like is an sshfs that when you open a folder in nautilus, the FUSE file system layer issues "ls directoryyourequested", then uses that text output to build the directory listing on your file browser. [20:21] hitana has joined the channel [20:22] Aikar: theres no reason that shouldnt be "visually instant" if it can be in your terminal [20:22] Dulak: TheJH: no that's what fuse does, but very very slowly [20:22] nealstewart: HardPhuck: why? [20:22] nealstewart: each file should be a separate "module". [20:22] TheJH: Dulak, I'm pretty sure the slow part isn't fuse itsel, but sshfs [20:22] HardPhuck: right [20:22] HardPhuck: thanx [20:22] TheJH: *itself [20:22] Aikar: yes its sshfs, cause smbfs isnt as bad [20:22] Aikar: i use smbfs over sshfs at work [20:23] nealstewart: HardPhuck: that answered your question? [20:23] HardPhuck: it did, thank you [20:23] nealstewart: ok. [20:23] HardPhuck: not directly, got me thinking :) [20:24] TheJH: Aikar, so, we need two parts, right? FUSE bindings and something that talks to the ssh client. second part should be easy... [20:24] hermanju_ has joined the channel [20:25] DrMcKay: there's ssh library for node [20:25] DrMcKay: with focus on sftp [20:25] hitana has joined the channel [20:25] Aikar: TheJH: yea [20:25] TheJH: DrMcKay, WHAT? COOL! where? [20:25] TheJH: DrMcKay, you mean, ssh protocol native in node? [20:25] Aikar: hell sftp protocol would prolly be even better [20:25] Aikar: yea [20:26] Aikar: !npm search ssh [20:26] jhbot: packages (short format): ssh, NodeSSH, ssh-agent, control, sshmq, grasshopper [20:26] TheJH: !npm info ssh [20:26] jhbot: ssh by James Halliday, version 0.0.1: Write ssh servers in node.js [20:26] TheJH: !npm info NodeSSH [20:26] jhbot: NodeSSH by tsmith, version 0.5.0: SSH Client for NodeJS [20:26] DrMcKay: I'll look for it [20:26] baudehlo: ryah: a nextTick fixed it for me. https://github.com/joyent/node/issues/1841 [20:26] Dulak: It's a wrapper over the cli ssh, it doesn't do it's own ssh [20:26] Aikar: my point being the FUSE filesystem layer should be issueing commands and receiving basic text output to render the file explorers gui. if a shell connection can give you instant results, the remote FS should be able to too [20:27] TheJH: NodeSSH uses OpenSSH... [20:27] TheJH: !npm info grasshopper [20:27] jhbot: grasshopper by Chandra Sekar S, version 0.4.3: A feature-rich and flexible MVC framework. [20:27] Aikar: and if you could bundle in file notifications like smbfs has... awesome [20:27] Dulak: Yes, it basically does 'ssh hostname command' for whatever you pass it. It does not handle ssh directly [20:27] Aikar: like if i update a symlink on the remote server, my local mounts see it [20:27] TheJH: DrMcKay, I think isaacs or so began with ssh bindings and didn't inish [20:27] Aikar: Dulak: eww really? [20:28] Aikar: no wonder its so slow [20:28] TheJH: ewww [20:28] Aikar: isnt there some -t flags to ssh that makes it reuse sessions and such? [20:28] AvianFlu: libssh isn't thread-safe [20:28] AvianFlu: that was part of the problem iirc [20:28] hermanju_ has joined the channel [20:28] Dulak: Yes, I tried using it for my fabric clone but it's basically just a thin wrapper that escapes for you, nothing more. [20:29] Aikar: so ready to go home [20:29] Aikar: beat gears of war 3 [20:29] Aikar: finish up aurora this weekend [20:29] gplg has joined the channel [20:29] fbartho has joined the channel [20:29] Dulak: Aikar: that only applies to multiplexing, it requires a first connection to speed up the second, third, etc [20:31] Dulak: sshfs is so slow because for every syscall, it has to encrypt it, send it across the network, decrypt it, run the syscall, then encrypt it, send it back across the network, decrypt it, and finally return it. [20:31] Aikar: https://github.com/aikar/aurora working on a compiler tool like coffee, but for Streamline and Traceur preprocessors. still not done though. full traceur support isnt functional and a few quirks here and there. [20:31] Aikar: streamline is pretty damn awesome [20:32] Aikar: so much easier to write some async logic with it [20:32] TheJH: Dulak, erm, "ls" over ssh is pretty fast [20:32] errordeveloper has joined the channel [20:32] Dulak: TheJH: you mean the command? like 'ssh hostname ls /home/user'? [20:32] Aikar: Dulak: no, on an already open connection [20:33] TheJH: Dulak, I mean issuing the command over an existing connection [20:33] Aikar: its the connection part thats slow [20:33] TheJH: sshfs is pretty fast here [20:33] TheJH: just tried [20:33] Aikar: issueing 'ls' on an existing connection still has to do all those encryption passes you mentioned [20:33] parshap has joined the channel [20:33] Aikar: TheJH: to a box where? :P [20:33] Dulak: On an ssh connection, you skip like 2/3 of what sshfs has to do though, so of course it feels fast [20:33] TheJH: Aikar, our school which has a DSL connection [20:34] Aikar: and now try opening an IDE with a massive project on the mount with code completion indexing lol [20:34] TheJH: Aikar, :D [20:34] trotter has joined the channel [20:34] willwh: NFSv4 <3 [20:34] Aikar: simple actions seem "tolerable" [20:35] Aikar: but those latencys that arnt as visible to the human eye add up quick in mass operations [20:35] jmoyers has joined the channel [20:35] Dulak: think, it encrypts the command, sends it over the network, decrypts it, runs the command, encrypts the output, sends it back to the network, decrypts it, and outputs. So every syscall that command makes has no overhead at all, vs every syscall generating all that overhead. [20:35] ag4ve__ has joined the channel [20:35] wbednarski has joined the channel [20:35] Aikar: yes but doing that on an existing session is instant, the encryption itself isnt the problem [20:36] Aikar: the ssh handshake and initialization is the heavy paret [20:36] Aikar: that has to be gotten rid of and reuse a single connection [20:36] chuck_daniel_ has joined the channel [20:36] TheJH: over sshfs, did "grep '#!' *" inside /etc/init.d. less than half a second, I think. [20:36] TheJH: but "cd" takes a long time [20:36] TheJH: ACTION is away for 30min now [20:37] Aikar: i dont believe you! [20:37] Dulak: You are not understanding that you are encrypting the string 'ls -la /path' and sending it, vs the 500+ syscalls that ls actually uses to generate the output you see. [20:37] Aikar: you need |away in your nick! [20:37] Aikar: yes, and NOTHING of the slowness has anything to do with the ls command itself [20:37] Poetro has joined the channel [20:37] Poetro has joined the channel [20:37] Aikar: its all in the ssh connection start [20:38] tylerstalder has joined the channel [20:38] CrisO has joined the channel [20:38] Dulak: do me a favor and run 'strace ls /some/path/with/more/than/a/few/files' [20:38] TheJH: Aikar, hmm, back faster than I thought :D [20:38] Aikar: >>> time ssh home 'ls /etc | wc -l' [20:38] Aikar: Ubuntu 11.04 [20:38] Aikar: 273 [20:38] Aikar: real 0m6.359s [20:38] Aikar: user 0m0.020s [20:38] Aikar: sys 0m0.000s [20:39] TheJH: Aikar, I did the command in an sshfs [20:39] Dulak: and watch all that stuff that has to be encrypted, sent, decrypted, vs 1 string, and the syscalls happening on the remote side. [20:40] TheJH: oops... actually, I ran it on my local machine :/ [20:40] TheJH: a lot slower over sshfs :D [20:41] Dulak: You guys don't understand the difference of 1 string (the command) vs all the strings that make up the syscalls that ls actually performs. [20:41] CIA-48: node: 03Bert Belder 07 * red65b7b 10/ lib/net_uv.js : Simplify writeReq handling in net_uv - http://git.io/DP4acg [20:41] CIA-48: node: 03Ryan Dahl 07 * r29ec850 10/ lib/net_uv.js : Simplify arg parsing in String.write - http://git.io/4LTPhg [20:41] CIA-48: node: 03Bert Belder 07 * r153629c 10/ (lib/http.js lib/net_uv.js): Some small optimizations - http://git.io/lAa5LQ [20:41] CIA-48: node: 03Ben Noordhuis 07 * r1bb820a 10/ lib/net_uv.js : [20:41] CIA-48: node: net: remove unconditional getpeername() call [20:41] CIA-48: node: Speeds up http_simple benchmark by about 1.0% - http://git.io/0eVIjA [20:41] thalll_ has joined the channel [20:42] Aikar: if i just issue time ls -l /usr/bin its 0.02s at most [20:42] TheJH: hmmm... I guess ls does blocking IO or so... DrMcKay, AvianFlu, you have to write nls :D [20:42] TheJH: DrMcKay, ping [20:42] DrMcKay: TheJH: haha [20:42] Aikar: Dulak: and? its not encrypting all of those subcalls [20:42] AvianFlu: that would be easy [20:42] Aikar: its running the command on the server and then ecrypting STDOUT [20:42] DrMcKay: btw, we have ncp and ngrep [20:43] Aikar: and noones denying that there is alot of function calls [20:43] DrMcKay: we need more! [20:43] Aikar: it still doesnt change the fact they are FAST and not whats running slow [20:43] Dulak: Aikar: ssh does, sshfs does not do that. It passes the syscalls across the connection [20:43] DrMcKay has joined the channel [20:44] Dulak: Aikar: and for every syscall, you have encrypt, send, decrypt, wait, encrypt, send back, decrypt. [20:44] jimt has joined the channel [20:44] Aikar: an ssh home ls -la /etc call executes the command on the server. it doesnt translate some special sys call back and forth [20:44] DrMcKay: run with -c arcfour256 and tell me the difference [20:44] DrMcKay: it should be noticable [20:45] Dulak: Aikar: but when you just ssh, every syscall happens on the remote machine, and it only has to do the encryption/decryption on the output, not every syscall [20:45] chuck_daniel has joined the channel [20:45] Aikar: now, sshfs may be getting a plain list of file names, then issueing another ssh home stat command for each one [20:45] slloyd has joined the channel [20:45] Aikar: Dulak: same for an ls command over 'ssh home ls /etc/' [20:45] Aikar: just, the slowness is the ssh connection initialization, not the ls command itself [20:45] Dulak: Aikar: you really need to read the sshfs spec. [20:46] Migaaresno: Whoot! I finally get websockets using socket.io! [20:46] Migaaresno: got* [20:46] Aikar: Dulak: im not denying that sshfs sucks at implementation, im trying to say what it SHOULD be implemented as [20:46] Aikar: the fact that it reinitializes a connection so much is a big problem [20:47] Dulak: Aikar: and I'm trying to get you to understand that it does not do what you seem to think it does [20:47] Aikar: didnt you say earlier it simply issues 'ssh foo ls' commands? [20:47] Dulak: no, that's tho nodessh library [20:47] Dulak: sshfs works on syscalls, not commands [20:48] Dulak: so you get tons and tons of overhead vs just running the command using ssh [20:48] Aikar: so back to the point of me saying we need a better implemented spec :P [20:48] Aikar: one that relies on SFTP commands [20:49] `10: am i missing any more mature libraries for oauth2? i had to patch node-oauth to get it to work with facebook, and reading the code it seems like it could be more robust in a lot of places [20:49] markdaws has joined the channel [20:49] `10: surely folks are interested in authenticating against facebook with node [20:49] Aikar: `10: why do you need a library for oauth2? [20:49] Aikar: the point of oauth2 is that its so simple... [20:49] Aikar: a library like doesnt serve any purpose [20:49] Aikar: for client side [20:50] `10: Aikar: maybe that's the philosophy that has resulted in several incomplete, non-working oauth2 libraries for node;) [20:50] russfrank has joined the channel [20:51] Aikar: i just dont understand how a library helps you, theres better ways to redirect a user and to parse GET data [20:51] russfrank: anyone know if v8 can be compiled for dalvik? [20:51] `10: it is indeed simple, but not so simple that i'd feel the need to roll my own over and over again, for every of numerous providers i'd like to auth against [20:52] brianloveswords has joined the channel [20:52] TheJH: Aikar, sshfs uses SFTP [20:52] Cheery has joined the channel [20:52] DrMcKay: https://github.com/mikedeboer/node-ssh [20:53] Aikar: do you create a new oauth2 consumer product on a weekly or daily basis O.o? [20:53] Aikar: I implemented oauth2, user not logged in? redirect to the oauth2 server, with specified callback url. callback url reads GET param access_token, then uses token on the OAuth resource [20:53] AvianFlu has joined the channel [20:54] Dmitrijus: DrMcKay: dat is epic [20:54] Aikar: i just cant see much reuse of the code [20:54] DrMcKay: Dmitrijus: :) [20:54] TheJH: DrMcKay, wooow! [20:55] trose: how big of a buffer will nodejs use for incoming streams? what is common practice to protect against buffer overflow? [20:56] AvianFlu: trose that kind of stuff is handled down in C land for you [20:56] Aikar: now if you have a specific set of API calls that your using on the oauth, sure you can write a lib specific to that resource. but the concept of "redirect to the oauth server", "read the GET parameter access_token" and "append &access_token=xxx to my request" really is so simple id find it annoying trying to work around someones library implementation [20:56] AvianFlu: by the time you get that stuff in JS it's bounds-checked [20:56] trose: AvianFlu, thanks [20:56] jesusabdullah: idk man, I think you might be able to massage that into some kinda handy, erm [20:56] TheJH: AvianFlu, unless you buffer complete lines [20:56] jesusabdullah: middleware [20:56] jesusabdullah: or some such [20:57] AvianFlu: TheJH: what do you mean, are there overflows possible? [20:57] MUILTFN has joined the channel [20:57] `10: aikar: not so much the difficulty of authing against one resource as the repetition involved in performing what is a nearly identical process for each of many [20:58] TheJH: AvianFlu, well, it makes a buffer longer and longer until RAM is full and then it crashes, i think. not exploitable for code execution like buffer overflow, but DoS-able, i think [20:58] `10: which would lead me to think that somebody has separated this code out into something parameterized over the few pieces that change from provider to provider [20:58] AvianFlu: okay, that's not really a concern with stream chunks, though, I think [20:58] `10: and maybe that said person had released this nice work as open source:D [20:58] TheJH: trose, with "buffer overflow", do you mean "stuff is written to a place it doesn't belong" or "RAM fills up"? [20:59] TheJH: AvianFlu, e.g. dnode buffers until it sees a newline [20:59] CIA-48: node: 03Ryan Dahl 07 * r26c08a3 10/ (4 files in 3 dirs): Do load balancing test in test-child-process-fork2. - http://git.io/gtvIKQ [20:59] TheJH: AvianFlu, send it "aaaa...." and see what happens. didn't try it, but I'm nearly sure it'll crash after filling up your RAM [20:59] jeremyw: Is there a preferred way to add a function to a node.js object, like adding specialized methods to the http server? [21:00] trose: TheJH, I'm worried about "stuff going where it doesn't belong" [21:00] TheJH: jeremyw, it's better to wrap it so that you don't change the real http core module [21:00] eee_c has joined the channel [21:00] markdaws: jeremyw: not really a good idea to add to objects you don't own [21:00] TheJH: trose, that shouldn't be able to happen [21:01] TheJH: trose, unless someone does stuff wrong in C++ bindings, you should be safe [21:01] AvianFlu: trose: node buffers all end up in the heap [21:01] AvianFlu: I don't think there are any stack overflows even possible [21:01] jeremyw: Makes sense to me. :) Any reason not to have helper methods? I mean, i want to handle a multipart form submission in a non-blocking way for example. [21:02] TheJH: AvianFlu, still, buffer overflows can be used to overwrite password hashes or permissions so, it think [21:02] jeremyw: function handleRequest(response, body) { ... } http.createServer(...); [21:02] TheJH: s/so/or so/ [21:02] jeremyw: Where something in createServer's request handler will call handleRequest. [21:03] trose: TheJH, AvianFlu thanks for your help :) [21:04] markdaws: jeremyw: helper methods are good, nothing wrong with calling handleRequest from the request handler function [21:04] jeremyw: Great. [21:04] chuck_daniel has joined the channel [21:04] markdaws: jeremyw: or possibly adding you helper code to a new file then doing a require('my-helper-file) and using functions you have exported [21:04] jeremyw: Yeah. I will bump this into a module when it grows enough. ;) [21:05] aconbere has joined the channel [21:06] jeremyw: In case anyone wants to critique my first node.js app: https://pastee.org/3rhz9 [21:06] jeremyw: It's not much but it solves a hube problem where we need to run said nmap command within a JVM... [21:07] hitana has joined the channel [21:07] `10: Karel SedláčekKarel Sedláček17:09:23 <-- | robotmay (~robotmay@5ad79ab8.bb.sky.com) has quit (Remote host closed the connection) │ `10 [21:07] TheJH: jeremyselier, instead of `== undefined`, I'd use `== null` [21:08] jeremyw: My feelings don't get hurt, after committing to open source for a decade, it wouldn't be the first time. [21:08] jeremyw: TheJH: Point taken. [21:09] TheJH: jeremyw, instead of `nmapParts.indexOf(illegalChars[i]) > -1`, you could also write `~nmapParts.indexOf(illegalChars[i])`, but that's probably a question of style [21:10] jeremyw: TheJH: Oh? That's a new style to me. Is that standard JavaScript or some V8 thing? [21:10] TheJH: jeremyselier, also, seriously, do whitelisting, not blacklisting [21:10] hitana has joined the channel [21:10] saikat has joined the channel [21:10] ag4ve has joined the channel [21:10] TheJH: jeremyw, ~ flips the sign bit, it's standard JS [21:10] jeremyw: Nice. [21:10] hellp has joined the channel [21:11] jeremyw: Never used it. [21:11] TheJH: jeremyw, also, seriously, do whitelisting, not blacklisting - e.g. ";" is dangerous, too [21:11] jeremyw: As for blacklisting vs. whitelisting, it's just a very simplistic check to see if the command args contains anything that could cause an issue. [21:11] theCole has joined the channel [21:11] TheJH: jeremyw, the input is trusted? [21:11] jeremyw: I'm not hoping to be comprehensive. It's gonna be a service being called behind the firewall by a known service so it's just a "make the writer a little happier" type thing. ;) [21:12] Migaaresno has left the channel [21:12] theCole_ has joined the channel [21:12] TheJH: jeremyw, mhmm, ok... so the caller already verified it? [21:13] jeremyw: Yes. The caller, a Java application, is generating it. I am thinking I will eventually just create paths/endpoints that map to the different nmap invocations and just accept an array of hostnames to scan. [21:13] TheJH: jeremyw, also, "it's ok to be vulnerable because it's behind the firewall" sounds like the wrong mindset to me [21:13] tilgovi has joined the channel [21:13] jeremyw: Oh, that's not what I meant to imply. [21:13] hitana has joined the channel [21:13] TheJH: jeremyw, ah, ok [21:14] jeremyw: :) [21:15] bronson has joined the channel [21:15] TheJH: jeremyw, also, newlines are unsafe, too [21:16] jeremyw: Thanks again. [21:16] bronson: trying to find a module I heard about a month ago... It's a way of doing RPC, sets up an object client side and server side and keeps them in sync automatically. [21:16] jeremyw: Other than that, is the implementation sound? I mean, did I make any glaring node.js "don't do that" type of mistakes? [21:16] bronson: think it uses socket.io. it's a vague competitor to dnode. [21:16] bronson: Anyone know what I'm talking about? [21:17] jerrysv: batman.js ? [21:17] TheJH: bronson, you mean nowjs and I think it's ugly. [21:17] hitana has joined the channel [21:17] TheJH: bronson, ugly as hell. [21:17] bronson: TheJH, right on [21:17] TheJH: jeremyw, also, not sure whether it's exploitable, but I'd just ban backslashes [21:18] bronson: What's so bad about it? Right now it exactly solves a problem with an app I'm writing. [21:18] bronson: Just need to keep an object cache in sync on client and server. [21:18] jeremyw: ACTION is picking his kid up from school... [21:18] TheJH: bronson, well, e.g. you don't know when stuff got synced. and the client-side part polls the object for changes every second [21:18] TheJH: that's so wrong [21:18] bronson: gah, every second?? [21:19] TheJH: bronson, yes [21:19] bronson: yeah, that's bad [21:19] jeremyw: TheJH: Thanks for your help. I hope other than the blacklisting stuff, things look solid. [21:19] TheJH: jeremyw, I'm a security fanatic guy, didn't read further :P [21:19] jeremyw: Crap. [21:19] jeremyw: Well, I'll hit you up when I get back then. I have to jet. [21:19] jeremyw: ;) [21:20] bronson: It's true that you don't know when stuff gets synced... And the chat example they give on the home page would be easier with straight dnode. [21:20] bronson: BAH [21:20] hitana has joined the channel [21:21] onr has joined the channel [21:21] TheJH: bronson, https://github.com/Flotype/now/blob/master/lib/client/now.js#L425 [21:21] TheJH: !git context Flotype/now lib/client/now.js 425 [21:21] jhbot: 424 if (socket.socket.connected) { [21:21] jhbot: 425 lastTimeout = setTimeout(lib.processNowScope, 1000); [21:21] jhbot: 426 } [21:21] tjholowaychuk has joined the channel [21:22] tjholowaychuk has joined the channel [21:22] bronson: TheJH, thanks. guess I'll write my own cache sync lib. Node doesn't have enough duplicate modules... [21:22] groovebucket has joined the channel [21:24] jscheel has joined the channel [21:24] jscheel has joined the channel [21:24] ag4ve__ has joined the channel [21:24] TheJH: bronson, feel free to use ignoringDeepEquals from https://github.com/isaacs/npmjs.org/commit/0196a34f28b48ec54994b7c0bbd95ae87ad21342 for validating stuff [21:25] hitana has joined the channel [21:26] guidocalvano: I'm thinking about requirejs and unit testing... [21:26] guidocalvano: in requirejs I can make a define function [21:26] guidocalvano: *call [21:27] guidocalvano: and that define function basically specifies all external dependencies of a class [21:27] sechrist2: woah at !git in here [21:27] guidocalvano: this is really cool [21:27] guidocalvano: cause I could use that to inject mock objects to test against [21:28] TheJH: sechrist, my bot :) [21:28] guidocalvano: but here is the problem: the arguments to define of the required file are inside the required file [21:28] bronson: TheJH, not understanding... you mean to see if client object and server object are the same? [21:28] bronson: I'd do that but it means transmitting the entire object each time I want to check...? [21:29] guidocalvano: is it possible to require such a file and override the arguments passed to define? [21:29] hitana has joined the channel [21:29] TheJH: bronson, ah, wait, right. probably a bad idea [21:30] ag4ve has joined the channel [21:32] hitana has joined the channel [21:34] saikat has joined the channel [21:35] mehtryx has joined the channel [21:36] liar has joined the channel [21:37] saikat has joined the channel [21:38] tmedema has joined the channel [21:38] tmedema: Anyone I can ask about using everyauth (for facebook) when the client side javascript/html is embedded on the client side, in this case an android application? [21:38] PythonBathhouse has joined the channel [21:38] PythonBathhouse: WHERE ARE MY BANANAS. [21:38] zmbmartin has joined the channel [21:39] DrMcKay has joined the channel [21:40] errordeveloper: PythonBathhouse: have you checked the local store? [21:41] errordeveloper: PythonBathhouse: ah, sorry I can see that it wasn't a question as such. [21:42] perezd: are there any best practice articles about working with raw net sockets? [21:42] perezd: in node [21:42] SubStack: guidocalvano: or you could write your browser code the node way with browserify [21:42] errordeveloper: guys .. this is quite interesting ... I'm using fs.watchFile and basically everything is working okay [21:42] SubStack: and not have to indent your whole file inside of a define() [21:43] saikat has joined the channel [21:43] errordeveloper: apart from - when edit the file in vim and fit :w [21:43] errordeveloper: Node see the file as 'no such file' ... [21:43] errordeveloper: WTF ? [21:44] guidocalvano: SubStack: I kind of like the idea of loading my dependencies async... but I'll look at browserify [21:44] errordeveloper: seems like vim deletes the file and then writes the buffer out into a new file ? [21:44] errordeveloper: hm ? [21:44] chjj: sync module loading is the only reason worth living [21:44] DrMcKay: errordeveloper: yes [21:44] chjj: im sorry [21:44] errordeveloper: DrMcKay: do you know a work around ? [21:45] errordeveloper: DrMcKay: actually, is this normal ? [21:45] TheJH: errordeveloper, I think vi does in-place stuff [21:45] guidocalvano: SubStack: would browserify be able to require some file, but force it to load different dependencies? [21:45] Stephen has left the channel [21:45] DrMcKay: errordeveloper: not sure [21:45] chjj: errordeveloper: what do you mean? vim will write the buffer to the filename, but if it has changed, vim will get all mad at you [21:46] errordeveloper: chjj: i get no error or anything from vim [21:46] errordeveloper: basically I got a simple use case for fs.watchFile [21:46] chjj: i guess that wasnt the case then? i dont even know what youre talking about [21:46] chjj: i just felt like talking [21:46] chjj: ;p [21:47] stepheneb has joined the channel [21:47] errordeveloper: and basically when I touch it it's okay and node does what I want it to [21:47] JSManiacs has joined the channel [21:47] chjj: what do you want it to do? [21:47] errordeveloper: but when I try to edit the file with vim [21:47] JSManiacs has left the channel [21:47] JSManiacs has joined the channel [21:47] smathy: errordeveloper… that's precisely what vim does. Look in the :help backupcopy [21:47] jeremyw has joined the channel [21:47] Vertice has joined the channel [21:47] errordeveloper: after i save the file (with :w or :x) - node crashes [21:48] errordeveloper: smathy: cool, thanks [21:48] mcluskydodallas has joined the channel [21:48] ekryski1 has joined the channel [21:48] smathy: errordeveloper… you can switch it off with the backupskip option. [21:50] errordeveloper: smathy: but in my set-up vim doesn't make backups .. hm [21:50] errordeveloper: well it appears to be set to backupcopy=auto [21:51] jeremyw: TheJH: Do you mind looking at that file a little further? I've made changes per your security findings. Just wondering if I did something crazily wrong or if there is something I can learn. [21:51] SubStack: guidocalvano: you can either put stuff in file-specific node_modules directories or inject files with the browserify api to do that at runtime [21:51] TheJH: jeremyw, sure. link? [21:51] TooTallNate has joined the channel [21:52] jeremyw: https://pastee.org/3rhz9 [21:52] errordeveloper: smathy: but otherwise ... may be I could do it in my node server to nandle this .. i.e. setTimeout when file seems to have diassappered ..though I'm not sure whether there is a need to do it in lib/fs.js also - I mean [21:52] Wizek has joined the channel [21:53] errordeveloper: I'm not sure whether current implementation of fs.watchFile is able to tell me that the file has been deleted ..does anyone know ? [21:54] s has joined the channel [21:54] AvianFlu has joined the channel [21:54] TheJH: jeremyw, can't spot anythng really wrong. however, can't see the security improvements... [21:54] TheJH: jeremyw, maybe you gave me the old version again? [21:55] andrewfff has joined the channel [21:55] errordeveloper: on the other hand, watchFile has a period parameter - but I don't think that it would really solve it - that's just making a bug less frequent [21:55] jeremyw: Yeah. I didn't update to show your improvements. You said you stopped after looking at the security stuff and I was just hoping you'd be able to look a little further. ;) [21:55] joshthecoder has joined the channel [21:57] springmeyer has joined the channel [21:57] michela_ has joined the channel [21:57] arpunk has joined the channel [21:57] mcluskydodallas has joined the channel [21:57] TheFuzzb_ has joined the channel [21:57] markwubben has joined the channel [21:58] lz has left the channel [21:58] lz has joined the channel [21:58] matyr has joined the channel [21:59] fly-away has joined the channel [21:59] eddanger has joined the channel [21:59] errordeveloper: it looks like Emac does the same thing .. omg [21:59] saikat has joined the channel [22:00] piscisaureus has joined the channel [22:00] elliottcable has joined the channel [22:00] shariffy has joined the channel [22:00] issackelly_ has joined the channel [22:00] TheJH: jeremyw, I think some people don't like "for i in array", you could use .forEach - but I think it's fine that way, too [22:01] TheJH: jeremyw, oh, and instead of `sendResponse(res, 405, str); return`, you can usually do `return sendResponse(res, 405, str)` [22:01] AvianFlu: you can't do "for i in array" in JS [22:01] AvianFlu: `in` only works for object keys [22:01] eyze has joined the channel [22:02] errordeveloper: for an array you should do .forEach, isn't it ? [22:02] jeremyw: These are keys that I'm iterating over. [22:02] jeremyw: Should be fine right? [22:03] jeremyw: Nope, I'm using it for an array in one instance. [22:03] jeremyw: I wonder why it's working then. Weird. [22:03] TheJH: v8> "you there?" [22:03] TheJH: .. "you there?" [22:03] TheJH: meh [22:03] DrMcKay: I guess I'll have to make my bot work [22:04] jeremyw: AvianFlu: for (var i in array) { console.log(array[i]); } [22:04] jeremyw: That seems to work locally. [22:04] jeremyw: If it's not a good practice, I can understand that. [22:04] jeremyw: But what is bad about it? [22:04] TheJH: !admin eval (function(){var str=""; for (var i in ["a", "b", "c"]) str+=i; return str})() [22:04] skm has joined the channel [22:04] jhbot: 012 [22:04] TheJH: AvianFlu, ^ [22:04] Jippi has joined the channel [22:05] CIA-48: libuv: 03Igor Zinkovsky 07 * r9f6024a 10/ (4 files in 2 dirs): windows: fixes crash in pipe.c - http://git.io/TMzEtQ [22:05] jeremyw: TheJH: I wonder why the for loop is frowned upon...I guess I can see that if forEach returned the object instead of an index to which you use to get an object, it's a little shorter in code. [22:05] AvianFlu: really? [22:05] AvianFlu: weird [22:06] Margle has joined the channel [22:06] jeremyw: I use it in a few different places, node.js and browser stuff. [22:06] TheJH: jeremyw, I think weird stuff might happen if you mess with the Array prototype or so [22:06] ag4ve has joined the channel [22:06] alessioalex has joined the channel [22:06] TheJH: jeremyw, but I'm not sure [22:06] ksheurs has joined the channel [22:07] jeremyw: Pfft...I thought you were told not to do that kind of thing. ;) [22:07] TheJH: jeremyw, http://stackoverflow.com/questions/500504/javascript-for-in-with-arrays [22:08] davidbanham has joined the channel [22:08] jeremyw: I do see what you mean now. [22:09] cjm has joined the channel [22:10] maushu has joined the channel [22:10] brianloveswords has joined the channel [22:11] jocafa: is anyone working on an IndexedDB implementation for node? [22:11] eldios has joined the channel [22:11] willwhite has joined the channel [22:13] DrMcKay has joined the channel [22:13] KaL_ has joined the channel [22:13] saikat has joined the channel [22:14] jeremyw: TheJH: I just looked into the ~ operator...I see what it does now and I can see how it could be used in the way you suggested. [22:14] jeremyw: Pretty slick, yet I see a lot of JavaScript programmers saying they avoid it due to confusion. [22:15] Poetro has joined the channel [22:15] Poetro has joined the channel [22:15] sh1mmer has joined the channel [22:17] shariffy has left the channel [22:18] shariff has joined the channel [22:18] saikat has joined the channel [22:21] CIA-48: node: 03Ryan Dahl 07 * ra23d8ad 10/ (9 files in 5 dirs): [22:21] CIA-48: node: Upgrade libuv to 9f6024a [22:21] CIA-48: node: Fixes #1840 - http://git.io/T6fbXg [22:21] jeremyw: TheJH: You'll be happy to know that I now no longer use the args for the nmap args...using a path to dictate which nmap invocation to use. ;) [22:21] isaacs has joined the channel [22:24] simenbrekken has joined the channel [22:26] digman543 has joined the channel [22:26] storrgie has joined the channel [22:28] neilk_ has joined the channel [22:30] cgfuh has joined the channel [22:30] fairwinds has joined the channel [22:31] matyr has joined the channel [22:33] eldios has joined the channel [22:35] sechrist2: are there any popular ways to do javascript in vim? [22:35] sechrist2: other than some basic tab stuff [22:35] sh1mmer has joined the channel [22:37] jeremyw: TheJH: I have an updated version that should be a little better. Thanks for helping me get this sanitized. ;) [22:38] TheJH: jeremyw, no problem :) [22:38] joshgillies has joined the channel [22:38] saikat has joined the channel [22:39] tjholowaychuk has joined the channel [22:41] webjay: Why is it that 'Services._id': '4e8176bb75b9634310000000' matches but 'Services._id': parameters.service_id.toString() which to me contains the same value doesnt? [22:41] jeremyw: TheJH: I have one more question...when my request handler calls "return sendResponse(...)", it seems lines of code after the return are executed. Got any idea why? [22:42] jeremyw: I can give you an updated script and example if need be. [22:42] TheJH: jeremyw, hmm, that shouldn't happen [22:42] jeremyw: I wouldn't think so either, yet I see logged output for a command that has already returned. [22:42] jeremyw: Really wild. [22:44] saikat has joined the channel [22:44] jeremyw: TheJH: https://pastee.org/ypd3e (If I end up calling "return sendResponse(res, 405, ...)" for when there is an illegal character in the request, I still see the console.log() for the nmap cmd and the response. [22:45] CrisO: Dudes - https://github.com/criso/fbgraph <--- My first open source contribution. I *needed* to contribute to the awesomeness that is node [22:45] sh1mmer has joined the channel [22:45] skampler has joined the channel [22:45] CarterL has joined the channel [22:45] Sorella has joined the channel [22:46] jeremyw: TheJH: I'm sure it's something easy that I'm overlooking. [22:46] joshkehn has joined the channel [22:47] Aiden has joined the channel [22:48] TheJH: jeremyw, found it [22:48] TheJH: jeremyw, you're just returning from the forEach iterator function [22:48] TheJH: jeremyw, you'll have to use "some" instead of "forEach", I think [22:49] TheJH: jeremyw, and then "return true" if you found something [22:49] TheJH: jeremyw, and if "some" returns true, return again [22:49] jeremyw: some? [22:49] jeremyw: I'll go look. [22:49] jeremyw: Probably some part of JavaScript I've never used before. ;) [22:50] TheJH: jeremyw, https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some [22:51] CrisO: wow, that's the first I've heard of `some` [22:52] scott_gonzalez has joined the channel [22:52] AvianFlu_ has joined the channel [22:52] webjay: Could someone help me with matching a string? [22:52] joshkehn: Sure? [22:52] jeremyw: CrisO: Same here. [22:52] Vertice: webjay: /^.*$/.test('string') [22:53] Vertice: or was that exec you needed =) [22:53] CrisO: horrible name for a function though [22:53] jakehow has joined the channel [22:53] joshkehn: CrisO: Agreed. [22:53] webjay: When I lookup with 'string in here' it works but when it's in a variable it's doesn't [22:53] efoster: webjay: var found_match_arr = some_string.match(/^.*$/); [22:53] joshkehn: webjay: Is that variable a string? [22:53] webjay: yes [22:53] joshkehn: Absolutely sure of that? [22:54] webjay: when i console.log it it's the same [22:54] webjay: typeof says so [22:54] joshkehn: Okay, just checking. [22:54] stbg has joined the channel [22:54] joshkehn: What is the pattern you're using? [22:54] xerox: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/match [22:54] Bergle_1 has joined the channel [22:54] groovebucket: I'm a little confused about how node finds packages. I just ran 'express my_app', and it created an app skeleton. Then, when I issued a 'node app.'s', I got "Error: Cannot find module 'express'". I see that express is in $HOME/.npm. Any suggestions? [22:54] webjay: 'Services._id': parameters.service_id.toString() [22:54] xerox: for you joshkehn [22:54] groovebucket: I meant app.js [22:55] webjay: parameters.service_id.toString() = 4e8176bb75b9634310000000 [22:55] jeremyw: TheJH: I have a better approach now...just pass IP addresses and use Net to check for IP address. ;) [22:55] TheJH: jeremyw, much better :D [22:55] webjay: 'Services._id': '4e8176bb75b9634310000000' works?! [22:55] joshkehn: xerox: > /^.+$/.test('something') works as well.... [22:56] xerox: oh sorry, I think it's webjay that was asking! [22:56] xerox: and now I don't understand the question anymore [22:56] joshkehn: I think he's getting a failed pattern match. [22:56] joshkehn: But I don't know what the pattern is. [22:56] Sami_ZzZ has joined the channel [22:57] webjay: 'Services._id': '4e8176bb75b9634310000000' matches a doc in MongoDB but 'Services._id': parameters.service_id.toString() doesn't [22:57] webjay: and they have the same value [22:57] joshkehn: Um [22:57] joshkehn: You can't specify ._id [22:57] joshkehn: It's an ObjectID instance [22:57] joshkehn: You have to say ObjectID('4e8176bb75b9634310000000') [22:57] joshkehn: This is really a Mongo question, not a regex or string matching question. [22:58] webjay: how do I do that in NodeJS? [22:58] joshkehn: One sec. [22:58] fennec has joined the channel [22:58] webjay: it says ObjectID is undefined [22:58] joshkehn: ObjectID = require('../../node_modules/mongodb/lib/mongodb/bson/objectid.js').ObjectID; [22:58] joshkehn: You'll have to adjust the require path though [22:58] joshkehn: That's how I did it. [22:59] webjay: I'll give it a try [22:59] webjay: 'Services._id': '4e8176bb75b9634310000000' works though via Mongoose [22:59] joshkehn: Yeah [22:59] joshkehn: Mongoose is dumb. [23:00] xerox: that was my impression as well, which was too bad, but… [23:01] Isaiah has joined the channel [23:02] jeremyw: if (!net.isIP('127.0.0.1;')) { ... } is evaluating as false which means 127.0.0.1; is evaluating to a valid IP address. That doesn't seem legit. Am I wrong? [23:02] joshkehn: It's valid. [23:02] joshkehn: It's a loopback [23:02] joshkehn: I don't see what's invalid about that. [23:02] jeremyw: Notice the ; at the end. [23:03] jeremyw: That is not a valid IP address. ;) [23:03] MUILTFN has joined the channel [23:03] joshkehn: Oh whoops. [23:03] joshkehn: :o [23:03] jeremyw: But, I realize this is a failure on my part...forgot to pass a valud to net.isIP()... Funny thing is net.isIP() evaluates to true for some reason when obviously no value should not. [23:05] jeremyw: Am I wrong? Shouldn't net.isIP(), notice no valud passed to the function, return false? [23:05] jeremyw: Or is '', or no value, default to local loop back address? [23:06] mwillhite has joined the channel [23:07] Deegie has joined the channel [23:07] joshkehn: Not sure actually. [23:07] kahrens has left the channel [23:09] gplg has joined the channel [23:09] zackattack has joined the channel [23:09] sh1mmer has joined the channel [23:14] jowop has joined the channel [23:17] gplg has left the channel [23:18] sonnym has joined the channel [23:19] te-brian: I would like to use mongoosejs, but I am wary of having all my model logic so tightly coupled with the storage engine. Is there any way to leverage mongoose without being stuck with it? [23:26] nibblebot has joined the channel [23:27] bronson: te-brian, nope. It wedges itself in tight. [23:27] bronson: Mongoose is OK if you have serious domain logic to implement. [23:27] neurodrone has joined the channel [23:28] bronson: Personally tho, I just wrote it out of one of my projects and went back to just passing JSON data structures and native mongo client. [23:28] bronson: it simplified things quite a bit. It was a simple app tho. [23:28] te-brian: bronson: Yeah.. in PHP land we've always just hardcoded all the mongo queries. [23:28] te-brian: bronson: But I appeciate the strengths of an ORM... there there are certainly weaknesses [23:29] bronson: I love ActiveRecord and loathe every other ORM I've tried. [23:29] brianseeders has joined the channel [23:30] bronson: well, that's not true. I don't loathe mongoose. [23:30] te-brian: bronson: I suppose a lot of it depends on the app's lifecycle... if you are trying to launch asap and don't plan on extensive upgrades, mongoose would prob be fine. [23:30] te-brian: bronson: But if its a year long contracts... then custom is prob the way to go? [23:30] bronson: Mongoose I'm ambivalent about. AR > Mongoose > all others [23:30] dominictarr has joined the channel [23:30] te-brian: bronson: I would be 100% more into mongoose if the API docs weren't that crappy style that is creeping into all the node.js projects. [23:31] te-brian: bronson: lol.. I really hate it [23:31] bronson: I think it just depends on the problem you're trying to solve... If it's mongoosey, use mongoose. :) [23:31] sh1mmer has joined the channel [23:32] davidbanham has joined the channel [23:32] bronson: But a lot of projects only send queries and render pages... Mongoose doesn't help there. [23:32] bronson: Not much. [23:33] bronson: You talking about these docs? http://mongoosejs.com/docs/validation.html [23:33] bronson: doesn't seem too bad to me. The API is utter junk of course. [23:34] bronson: Anyone know how well dnode handles binary data? [23:35] jaequery has joined the channel [23:35] SubStack: bronson: it should handle it as well as JSON.{stringify,parse} handles binary data [23:35] SubStack: you could also base64 encode binary blobs if you run into trouble [23:35] tjholowaychuk: te-brian haha the crappy api docs are somewhat my fault [23:35] tjholowaychuk: i agree they suck though [23:36] tjholowaychuk: as nice as the idea of generated docs sounds [23:36] tjholowaychuk: it usually doesnt work out too well [23:36] te-brian: tjholowaychuk: yeah.. no personal offense meant.. but my brain just doesnt think that way... I need more heirarchy. [23:36] SubStack: I concurr. [23:36] SubStack: s/r$// [23:36] tjholowaychuk: te-brian no worries [23:36] tjholowaychuk: i dislike it too [23:37] te-brian: tjholowaychuk: I mean.. don't get me wrong... generated docs > no docs :) [23:37] softdrink has joined the channel [23:37] SubStack: speaking of docs, http://browserling.com:9088/docs/ [23:37] jeremyw: If I'm using child_process.exec, is there anything I need to do to cleanup from an execution? It seems node is returning really slow when I use ab to perf test requests when the command line invocation of the exec returns almost instantaneously. [23:37] SubStack: :D [23:38] weezle has joined the channel [23:38] SubStack: tjholowaychuk: also, you and guillermo should get learnboost to buy a small team plan once testling launches! [23:38] tjholowaychuk: let us know & we'll check it out [23:38] tjholowaychuk: i dont know much about it [23:38] tjholowaychuk: haha [23:39] SubStack: http://browserling.com:9088/ [23:39] tjholowaychuk: other than, it's called testling [23:39] tjholowaychuk: ah nice [23:39] SubStack: you can run javascript tests in all the browsers from the command-line [23:39] SubStack: using curl [23:39] SubStack: you can even use npm modules! [23:39] tjholowaychuk: sounds good to me [23:40] SubStack: and you get stack traces in all the browsers too >:D [23:40] SubStack: using stackedy [23:40] SubStack: and burrito [23:40] te-brian: SubStack: "automate away your QA" .. I just read that with the "Set it and forget it" voice. [23:41] bronson: SubStack, JSON.stringify(new Buffer(1024)).length / 1024 => 89.38 [23:41] bronson: 90X expansion is worse than I thought. [23:42] bronson: I take this to mean DNode is basically horrible at handling binary data? [23:44] jimt_ has joined the channel [23:45] CIA-48: node: 03Ryan Dahl 07 * r12486a6 10/ (4 files in 3 dirs): [23:45] CIA-48: node: Change API for sending handles [23:45] CIA-48: node: Does not support sending net.Server objects only raw TCPWrap objects. - http://git.io/iKti2w [23:45] SubStack: te-brian: excellent, then it's working [23:45] joshkehn has left the channel [23:46] SubStack: 90x o_O [23:46] SubStack: bronson: oh just stringify that first [23:46] SubStack: then it's only 2x [23:47] SubStack: or do this [23:47] SubStack: > JSON.stringify(new Buffer(1024).toString('base64')).length [23:47] SubStack: 1370 [23:47] SubStack: best ^^^ [23:48] AvianFlu: SubStack++ [23:49] SubStack: we use base64 encoded chunks over dnode for browserling [23:49] SubStack: of bulk image data [23:49] SubStack: seems to work ok [23:49] mcluskydodallas has joined the channel [23:50] bronson: SubStack, right on. That seems fine. [23:50] fbartho: Does anyone know how to make an EventEmitter with events being generated from a native (c++) library? [23:50] fbartho: or have examples? [23:50] bronson: 1.3X expansion is A-OK. I didn't even know about toString(base64) [23:50] bronson: thanks! [23:50] livinded has left the channel [23:50] SubStack: > var buf = new Buffer(1024); [ buf, buf.toString(), buf.toString('base64') ].map(function (x) { return JSON.stringify(x).length / 1024 }) [23:51] SubStack: [ 86.3564453125, 3.7578125, 1.337890625 ] [23:51] SubStack: bronson: it's really silly that JSON.stringify() of a buffer is 90x though [23:51] SubStack: I guess buffer objects have lots of other data [23:51] jimt has joined the channel [23:51] bronson: "automate away your QA" I read that in the singsongy "wash away your gray" voice. [23:51] sh1mmer has joined the channel [23:51] SubStack: that plus they're a hash of string indicies to byte integers [23:52] joshkehn has joined the channel [23:52] Bretzky has joined the channel [23:52] SubStack: bronson: if it works for late-night infomercials then it works for me! [23:53] pizthewiz has joined the channel [23:53] SubStack: infomercials have optimized the shit out of moving product [23:53] azeroth_ has joined the channel [23:53] SubStack: they only put up the pretense of low production quality so that you'll let your guard down [23:54] k1ttty has joined the channel [23:54] bronson: SubStack, you know what it is? It creates, I kid you not, an object like this: {"0":144,"1":12,"2":57 ... "8190":99,"8191":24} [23:54] jldbasa has joined the channel [23:55] bronson: Stringifies the entire buffer capacity, not just the used part, into an object. [23:55] bronson: An OBJECT. Not even an array of integers. [23:55] SubStack: bronson: yep [23:55] bronson: oh, you said that above. Right. [23:55] SubStack: ah that makes sense [23:55] clickmoon has joined the channel [23:55] fbartho: sounds like Buffer should provide a toString method [23:55] fbartho: ;) [23:56] SubStack: fbartho: toJSON you mean? [23:56] fbartho: that too [23:56] fbartho: :P [23:57] _mdp has joined the channel [23:59] shariff has left the channel