[00:00] sechrist: Is there an object.extend or something in the standard library? [00:01] sechrist: if not, what npm package do I get to have it? :) [00:01] insin: extend as in copy properties, or extend as in inherit prototype from? [00:01] creationix has joined the channel [00:01] sechrist: copy properties [00:02] sechrist: I guess a simple merge [00:02] insin: I consider typing that simple function out to be like a kata for each project :D [00:02] davidmg has joined the channel [00:02] insin: so bloody useful [00:03] ohtogo has joined the channel [00:05] Kami_ has joined the channel [00:06] saikat has joined the channel [00:06] broofa has joined the channel [00:08] tktiddle: has dbgtest.js been replaced by something else in [00:08] tktiddle: ? [00:08] tktiddle: where can i find timer_tick() function these days? [00:09] dherman has joined the channel [00:10] storrgie has joined the channel [00:11] jbrokc has joined the channel [00:12] tktiddle: its just the docs on debugging suggest putting a breakpoint in the timer_tick() function in dbgtest.js, but that file anit present in my debugger [00:13] zivester has joined the channel [00:13] seivan has joined the channel [00:17] caolanm has joined the channel [00:18] riven has joined the channel [00:18] riven has joined the channel [00:21] eastender2 has joined the channel [00:22] Renegade001 has joined the channel [00:24] bradleymeck has joined the channel [00:24] metamind has joined the channel [00:25] bentruyman has joined the channel [00:25] jerkelens has joined the channel [00:27] CIA-65: libuv: 03Igor Zinkovsky 07master * re67b9a3 10/ (4 files): Skip IOCP for tcp operations that complete synchronously - http://bit.ly/nD82FW [00:28] [[zz]] has joined the channel [00:29] creationix has left the channel [00:31] amiller has joined the channel [00:36] roidrage has joined the channel [00:36] optixx has joined the channel [00:36] harth has joined the channel [00:37] Aphelion has joined the channel [00:38] springmeyer has joined the channel [00:41] jerkelens has joined the channel [00:43] visnup has joined the channel [00:43] ryanfitz has joined the channel [00:45] meso has joined the channel [00:45] jakehow_ has joined the channel [00:45] jakehow has joined the channel [00:47] hydrozen has joined the channel [00:48] cccaldas has joined the channel [00:49] Renegade001 has joined the channel [00:49] craigbarnes has left the channel [00:52] ohtogo has joined the channel [00:54] tim_smart has joined the channel [00:55] k1ttty has joined the channel [00:55] srid has joined the channel [00:56] ryanallenbobcat has joined the channel [00:56] hydrozen: anyone has experience with Mongoose? I'm trying to simply retrieve some documents from a collection and print em out… but it doesnt seem to work. [01:02] patrickjst has joined the channel [01:03] micheil has joined the channel [01:03] MarkMenard has joined the channel [01:07] neoesque has joined the channel [01:08] stagas: hydrozen: use this it's simpler https://github.com/marcello3d/node-mongolian [01:08] hydrozen: thanks. looks good indeed. [01:12] neoesque has joined the channel [01:13] Drakonite has joined the channel [01:14] wookiehangover has joined the channel [01:16] kriszyp has joined the channel [01:20] torsd has joined the channel [01:21] langworthy has joined the channel [01:26] abraxas has joined the channel [01:26] brianseeders has joined the channel [01:29] pen has joined the channel [01:29] mcluskydodallas has joined the channel [01:34] JacobSingh has joined the channel [01:35] meso has joined the channel [01:36] balaa has joined the channel [01:38] srid has joined the channel [01:40] dgathright has joined the channel [01:41] chjj: did github get a makeover? [01:41] d0k has joined the channel [01:41] chjj: or am i hallucinating? [01:42] kawaz_home has joined the channel [01:44] dshaw_ has joined the channel [01:44] AvianFlu: I'd bet both [01:45] chjj: me too ;p [01:46] fdenbow has joined the channel [01:46] jakehow_ has joined the channel [01:46] jakehow has joined the channel [01:47] kenperkins has joined the channel [01:47] Anton_ has joined the channel [01:47] agnat has joined the channel [01:50] jj0hns0n has joined the channel [01:50] ohtogo has left the channel [01:51] langworthy has joined the channel [01:51] daithi44 has joined the channel [01:54] pongwon has joined the channel [01:54] dshaw_ has joined the channel [01:54] cccaldas has joined the channel [01:54] yorick has joined the channel [01:55] DrWhoDoneIt has joined the channel [01:56] DrWhoDoneIt: Is there a better way to exec git commands other than doing child_process.exec('git init', function()) [01:56] DrWhoDoneIt: Is there a wrapper for git in node.js [01:57] andreyvit has joined the channel [01:57] postwait has joined the channel [01:57] davidmg has joined the channel [01:59] mikey_p: there's several I believe [01:59] mikey_p: this is probably the fastest: https://github.com/libgit2/node-gitteh [02:00] kkaefer has joined the channel [02:00] mikey_p: also http://www.readwriteweb.com/hack/2011/08/gitjs-a-git-implementation-in.php [02:01] mikeal has joined the channel [02:01] Generic_Dumbass has joined the channel [02:01] DrWhoDoneIt: @mikey_p I didnt see a way to execute basicallly: git init git add . git commit -m "Inital Commit" [02:02] mikey_p: yeah, not sure if any of those handle creation…i don't want to know what you're trying to do [02:02] seivan has joined the channel [02:04] rmcastil has joined the channel [02:05] DrWhoDoneIt: With child_proces.exec() can I string multiple commands together, i.e. ==> cd /somedir/somefolder; git init; git add .; git commit -m "Inital Commit" [02:06] devongovett has joined the channel [02:07] StanlySoManly has left the channel [02:08] eastender has joined the channel [02:08] devongovett has joined the channel [02:12] jamesd has joined the channel [02:14] shipit has joined the channel [02:17] dgathright has joined the channel [02:17] towski has joined the channel [02:18] ckknight has joined the channel [02:18] sechrist: What's it called when you do randomApiCallHere('ohai',{})(function(res){}) instead of randomApiCallHere('ohai',{},function(res){});? [02:18] [[zz]] has joined the channel [02:18] sechrist: the latter is "continuation passing style"? right? [02:18] Knifed has joined the channel [02:18] bnoordhuis: sechrist: it's called 'unreadable' [02:19] sechrist: hehehe [02:19] Aphelion has joined the channel [02:19] bnoordhuis: sechrist: cps is when you drag your state with you (like a closure) [02:20] bnoordhuis: sechrist: a continuation is a flow of execution that may be interrupted and resumed at a later time [02:20] misterm: sechrist: well it's hard to say [02:20] techsilo has joined the channel [02:20] misterm: sechrist: the first one, randomApiCallHere takes 'ohai' and an object as arguments [02:21] misterm: and returns a function, which you call and pass a function as an argument [02:21] cjm has joined the channel [02:21] misterm: the second version of randomApicallHere, takes 3 arguments [02:22] sechrist: ah I see [02:22] misterm: sechrist: so really it's called "taking two arguments" or "taking 3 arguments" [02:22] misterm: sechrist: or, "returning a function" vs "returning something else" [02:23] sechrist: hehe [02:23] misterm: sechrist: there may be some underlying reason for those decisions like using CPS but it's not clear from your example [02:24] newy has joined the channel [02:24] JakeyChan has joined the channel [02:24] misterm: sechrist: any time you pass one function to another, it's possible that it is a callback [02:25] sechrist: well yeah in my example I was alluding to a node function that did that [02:25] sechrist: and it looked bizzare compared to most of the func(blah,blah,function(err,res){}) I usually see [02:25] techsilo has left the channel [02:25] jasong_at_apache has joined the channel [02:26] sechrist: node library* rather [02:26] misterm: sechrist: ok, so the distinction is the first one creates a function for you to use, and the callback gets passed to that [02:26] misterm: where the other one just does the work itself [02:27] misterm: with the callpack passed to that [02:27] sechrist: yep, makes sense now [02:27] sechrist: my original question doesn't, heh [02:28] sechrist: thanks [02:28] Nuck: Ya' know, some people tell me Node isn't ready for a full site. [02:28] Nuck: I disagree. [02:28] misterm: sechrist: well I see what you meant now, np [02:28] Nuck: And then I drop a bunch of names and stats [02:28] sechrist: Nuck: my opinion isn't that it isn't ready, it's that it's just more labor currently [02:28] misterm: Nuck: ha I hope it is, otherwise I'm sort of screwed :-D [02:28] Nuck: misterm: Same :P [02:29] sechrist: and even that is debatable [02:29] Nuck: sechrist: It's plenty ready for a full site IMO. [02:29] sechrist: for somebody experienced with a plethora of different frameworks, and understands oss, yeah [02:29] sechrist: but to use node as an example of how to do a website, it wouldn't be anywhere on my list [02:30] sechrist: lamp stacks still run that game [02:30] Nuck: sechrist: Also to build a commercial web app [02:30] Nuck: I think it will fill much of the same niche that Ruby filled a few years afo [02:30] misterm: typical lamp stack probably wouldn't work for my purposes [02:30] Nuck: It's a different concept, but it still can serve much the same purpose. [02:30] Nuck: Did you guys see that LinkedIn switched to Node.js for their mobile app's backend? [02:30] sechrist: also the line is blurred now between "site" and "app" [02:31] Nuck: Went from 15 servers to 4. [02:31] sechrist: you don't know how much tweaking they did (or didn't do) to the original [02:31] sechrist: I can take a poorly performing php script that is running on apache with the compiled in mod_php [02:31] Nuck: Original was Rails. [02:31] sechrist: not even try to run fast-cgi [02:31] sechrist: and claim it's faster to use node :) [02:31] sechrist: ah [02:32] Nuck: Yeah [02:32] Nuck: Rails ain't the fastest [02:32] sechrist: is it rails itself or is it the ruby interpreter? [02:32] Nuck: Apparently the 4 Node servers also handle double the capacity >_> [02:32] sechrist: haha [02:32] Nuck: So basically, they went from 15 to 2 [02:32] sechrist: node is much more down to the mental [02:32] sechrist: metal* [02:33] sechrist: if you know your datamodel and stuff in advance [02:33] tbranyen: \m/ \m/ [02:33] Nuck: Of course, some of this is also optimizations on the new apps too [02:33] sechrist: it's just typing in json and mapping calls [02:33] Nuck: But Node probably accounts for at least 25-50% of that improvement. [02:33] misterm: Well a lot of it depends on your app and architecture [02:33] Nuck: They say it's not great for heavy data processing tho [02:33] misterm: Node's not just some magic make-things-go-faster machine [02:33] Nuck: Which I can imagine, even if I don't agree. [02:34] Sazpaimon_ has joined the channel [02:34] misterm: but for a lot of applications it's evented model fits really well [02:34] Nuck: misterm: See, I think it is. It forces people into async code. [02:34] sechrist: mobile apps probably have a shitload of connections destroying and recreating [02:34] sechrist: in aggregate anyway [02:34] Nuck: sechrist: They say they did a lot of caching too [02:35] Nuck: I was actually amazed by the 15-to-2 improvement [02:35] Nuck: I mean, I could see a 10-25% improvement being entirely possible [02:35] Nuck: But that just blew my mind. [02:35] misterm: It is impressive, but you also can't underestimate the effect re-writing your app in any language can have [02:36] Nuck: Node's async model forces people to write better code, similar to how Apple's wonderful designs seem to make designers do better designs. [02:36] misterm: If you take any app and move it to another stack, there's a good chance they will do better than the first time around [02:36] dreamdust has joined the channel [02:36] misterm: I'd also disagree that async automatically makes better code [02:36] konobi: misterm: well... except for second system syndrome [02:36] Nuck: misterm: Why not? [02:36] misterm: You can write horrible asynch code [02:36] sechrist: if I have a shitload of race conditions it's not better code [02:37] Nuck: lol well you should never have race conditions [02:37] misterm: I'm not disputing the utility of async [02:37] sechrist: I've seen so much bad crap [02:37] confoocious has joined the channel [02:37] Nuck: sechrist: There is, but it gets buried pretty heavily :P [02:37] misterm: I'm just saying just because you switch to an async stack doesn't make your code magically better, you still need good engineering [02:38] Nuck: misterm: I think of it as a multiplier. Sucky code gets slightly less sucky, but amazing code becomes fucking incredible. [02:38] misterm: konobi: sure it's not a given, I'm just saying people often learn from their mistakes [02:38] Emmanuel` has joined the channel [02:38] kawaz_home has joined the channel [02:38] Nuck: 1x2 is 2, but 15x2 is 30. [02:38] sechrist: I've seen other people's apps become glitchy or fail because they used async code but when they tested it the latencies didn't matter so it worked fine [02:38] Nuck: sechrist: Well that's just shitty code. [02:38] sechrist: used it wrongly, like having one call that depends on another directly after it, not inside the cb [02:38] sechrist: yea [02:39] Nuck: misterm: I rewrite all my code twice. [02:39] dreamdust: That's just shitty code, has nothign to do with async. [02:39] Nuck: dreamdust: agreed. [02:39] misterm: dreamdust: precisely [02:39] Nuck: I write my code once, then sit on it a couple days, and look over it again [02:40] jtsnow has joined the channel [02:40] Nuck: If I immediately want to kill myself at the thought of maintaining the code, I know to rewrite it. [02:40] dreamdust: Ideally, you want someone else running over your code once as well. [02:41] dreamdust: Another trick that helps me write cleaner code, is t o force myself to write out the comments for each function before I write it. [02:41] dreamdust: Helps force me to think about what I'm doing. [02:41] Nuck: dreamdust: I don't comment heavily. [02:41] Nuck: I expect the maintainers to at least be capable of reading JS. [02:41] Nuck: If they can't, then why the fuck did I hire them? [02:41] MUILTFN has joined the channel [02:42] Nexxy: O_o [02:42] Nuck: I *do* comment out parts that get complicated [02:42] Nexxy: "I don't comment heavily" ~ "I don't play well with others" [02:42] dreamdust: Yup. [02:43] Nuck: Nexxy: Not really, I actually play quite well with most people. :) [02:43] dreamdust: Heavily commenting saves a lot of time if someone else has to work with your code. [02:43] misterm: comments aren't to explan the WHAT of code, they explain the WHY [02:43] dreamdust: Doesn't matter how good at JS they are [02:43] Nexxy: even when you look @ your own code 4 years later [02:43] Nuck: misterm: Yeah [02:43] misterm: so as awesome as clean and easily understandable code is, it doesn't negate the need for comments [02:43] Nuck: I agree entirely [02:44] Nuck: Yes, comments are important. [02:44] Nuck: But they should only explain things which aren't already expressed in code [02:44] Nuck: Or things which are not obvious in the code [02:44] misterm: yea exactly [02:44] Nexxy: I don't agree with that [02:44] misterm: Nexxy: how so? [02:44] Nexxy: if your method/block is more than a handful of lines [02:44] jelveh has joined the channel [02:44] jesusabdullah: Something I end up doing is, I start working on something and it's reasonable enough, but then I get to the end and it's a gigantic mess [02:44] Nexxy: you should at least throw in a description of its purpose [02:45] jesusabdullah: I'm not amazing at large-scale structure [02:45] soapyillusions has joined the channel [02:45] Nuck: Nexxy: If your code isn't shit, it should be readable just from the name [02:45] misterm: Nexxy: well that would fall under comments that describe what's not obvious from the code imo [02:45] sechrist: jesusabdullah: that's why you start drawing it out after the prototype or original version is built [02:45] sechrist: and then you see the relationships and how to OO it better [02:45] sechrist: and modularize it [02:45] Nexxy: lol Nuck [02:45] jesusabdullah: drawing, huh? [02:45] Nuck: jesusabdullah: I know that feeling lol [02:45] jesusabdullah: I do that sometimes [02:45] Nexxy: forget it ^-^ [02:46] sechrist: sketch, whiteboard, whatever [02:46] sechrist: looking at a screen all day makes me dumb is what i'm saying [02:46] Nuck: jesusabdullah: I generally print out my code halfway through development and then annotate heavily [02:46] Nuck: Draw arrows when I need to refactor [02:46] jesusabdullah: I like the SubStack approaches of turning part of it into a module, but tsometimes I feel like I'm doina lot for not a lot of gain [02:46] Nuck: Mark areas that should be separated, etc. [02:46] Nuck: jesusabdullah: I have a VERY simple modular system. [02:46] sechrist: I've never printed my code [02:47] Nuck: I can even share variables in this setup [02:47] sechrist: if I did I'd probably go [02:47] sechrist: wow [02:47] jesusabdullah: Yeah, I actually know my code okay, I know where it needs a refactor [02:47] sechrist: wtf [02:47] jesusabdullah: hah XD [02:47] Nuck: sechrist: I did it once, it was BEAUTIFUL. [02:47] Nuck: I plan to do that more often in future lol [02:47] jesusabdullah: I do paper printouts of literature [02:47] sechrist: "I wasted so much printer ink using this.. how many cpu cycles have I wasted?!" [02:47] Nexxy: "generally" > "once" [02:47] Nexxy: lol [02:47] jesusabdullah: i printed my thesis like 20 times [02:47] Nuck: Nexxy: It's gonna be generally [02:47] Nuck: I'm gonna be doing it more now that I'm coding more [02:47] thepatr1ck has joined the channel [02:48] jesusabdullah: hmm [02:48] jesusabdullah: I think maybe I'd better get to citizen space [02:48] Nuck has left the channel [02:48] Nuck has joined the channel [02:48] Nuck: I derped ant accidentally my whole chat. [02:48] Nuck: *and [02:48] jesusabdullah: :O [02:48] jesusabdullah: ;) [02:48] jesusabdullah: You didn't miss nothin' [02:49] Nuck: jesusabdullah: OH GOD NOT A DOUBLE-NEGATIVE I'M NOT SURE IF I MISSED SOMETHING D: [02:49] Nuck: I AM CONFUS [02:49] jesusabdullah: GOOD [02:49] jesusabdullah: ACTION & [02:49] cronopio has joined the channel [02:50] Nuck: I'm proud of some of my little personal utilities and boilerplates I've built for Node. [02:50] thepatr1ck has joined the channel [02:50] Nuck: The async-and-variable-sharing module stuff, plus the simple async error replacement for throw [02:51] Nuck: lol [02:51] Nuck: I just wrote my entire art-view API in... 10 liens. [02:52] zanes has joined the channel [02:52] jamesd: how hard is it to get node to build on Nexenta [02:52] balupton has joined the channel [02:53] djd74 has joined the channel [02:54] McMAGIC--Copy has joined the channel [02:55] boehm has joined the channel [02:55] Nuck: WTF is Nexenta? [02:56] systemfault: Isn't that the debianized version of solaris? (Not sure) [02:56] jamesd: nexenta is solaris kernel + debian/ubuntu userland with a gui for fileserving with ZFS [02:57] misterm: jamesd: I dunno, but I can think of one way to find out :-D [02:58] jamesd: i was hoping it would be pretty easy since joyent uses and joyent uses a solaris distro to work its magic [03:00] meso has joined the channel [03:01] yozgrahame has joined the channel [03:08] ryanfitz has joined the channel [03:12] jamesd: in case anyone asks again the anwser is yet [03:13] ckknight has joined the channel [03:13] caolanm has joined the channel [03:13] jamesd: amesd@amd:~$ uname -av [03:13] jamesd: SunOS amd 5.11 NexentaOS_134f i86pc i386 i86pc Solaris [03:13] jamesd: jamesd@amd:~$ node [03:13] jamesd: > process.platform [03:13] jamesd: 'sunos' [03:13] jamesd: > [03:13] mcluskyd_ has joined the channel [03:14] cronopio has joined the channel [03:14] navaru has joined the channel [03:15] navaru has left the channel [03:16] newy has joined the channel [03:16] piscisaureus has left the channel [03:16] piscisaureus has joined the channel [03:17] rmcastil has joined the channel [03:17] jakehow has joined the channel [03:17] jakehow_ has joined the channel [03:18] kenperkins has joined the channel [03:18] tmzt: anybody know if smartos is solaris based or linux? [03:19] misterm: tmzt: asfaik, both [03:19] jesusabdullah: Maybe it's solaris with gnu tools [03:19] jesusabdullah: That's what I hated about solaris, all its cli tools acted slightly different from the gnu versions [03:19] dshaw_ has joined the channel [03:20] Sazpaimon has joined the channel [03:20] arpunk: jesusabdullah: there is a reason for that [03:20] ceej_ has joined the channel [03:20] jesusabdullah: arpunk: to fuck with me? [03:21] aglemann has joined the channel [03:21] sugyan has joined the channel [03:21] arpunk: jesusabdullah: gnu toolchain doesn't support solaris features, such as ACLs et al [03:21] arpunk: but it's what everyone uses, so gnu comes default [03:22] zeade has joined the channel [03:22] aglemann: newbie question about the right approach/modules to use... i'd like to have a little server where you could browse the file directory.. sorta like what default apache does... and if you click on a file with a certain extension it does some stuff.. so basic routing.. any suggetions? [03:22] JakeyChan has joined the channel [03:24] arpunk: tmzt: smartos is solaris based with gnu userland [03:24] arpunk: and kvm virtualization [03:24] JakeyChan_ has joined the channel [03:24] arpunk: the rest is solaris [03:24] misterm: hydrozen: apparantly it's solarous kernal, some BSD tools, and GNU toolchain [03:24] misterm: bah [03:24] misterm: jesusabdullah: * ^ [03:28] seb_m has joined the channel [03:28] seb_m: nodesters i am confused! i want to make a node package, but i don't know whether to use jasmine or vows for TDD [03:29] seb_m: they both seem really good [03:29] seb_m: what do you guys recommend? [03:29] newy has joined the channel [03:31] tilgovi has joined the channel [03:31] ckknight has joined the channel [03:31] admc has joined the channel [03:31] jesusabdullah: well maybe solaris should've thought of that! [03:32] jesusabdullah: none of the cli tools worked how I expected [03:32] jesusabdullah: they'd diverged too much [03:32] adelgado has joined the channel [03:33] mscdex: aglemann: that's pretty easy, just create an http server and use the path module to ensure the path they're trying to access isn't outside of the base directory [03:33] arpunk: jesusabdullah: i think you are confused, gnu tools diverged, solaris tools are quite the same since solaris 2.x [03:33] mscdex: ACTION shakes a fist at sparc [03:33] jesusabdullah: Well, YEAH [03:34] jesusabdullah: the solaris people failed to keep up with the times [03:34] jesusabdullah: -_-; [03:34] arpunk: yea, like with dtrace and other kickass tech ;) [03:35] Spion_ has joined the channel [03:35] jesusabdullah: ACTION crosses his arms [03:35] jamesd: jerkelens, maybe gnu and linux should of thought of it... solaris predates linux by a decade or more [03:36] k1ttty has joined the channel [03:36] chjj: not a whole decade, is it? [03:37] jesusabdullah: Seriously, though: I don't actually think solaris sucked, but I kinda wish they co-opted the gnu tools [03:37] Lorentz: Maybe if you count SunOS [03:37] jesusabdullah: because it was a large barrier of entry for me [03:38] azeroth_ has joined the channel [03:38] chjj: Lorentz: yeah i assumed that [03:38] jamesd: part of what makes solaris great is the fact that i write something today it will run unmodified 99.999% of the time 10 years from now [03:38] chjj: still dont think its more than a decade though [03:38] arpunk: jesusabdullah: yea, that was the default since opensolaris/opendiana/illumos/smartos, get people familiar with gnu into solaris [03:38] maushu: DAMMIT CHROME. [03:38] Lorentz: jamesd: Well, linux is a very unstable and chaotic thing [03:39] chjj: dont you talk ill about chrome [03:39] maushu: Don't update the websocket version WHILE I'M CODING ON IT. [03:39] Lorentz: which is its advantage as well as disadvantage [03:39] jamesd: Lorentz, i know i have been using both solaris and linux for a very long long time... longer than some of you have been alive [03:39] arpunk: for some people (like me) it was a slap in the face, but its more painful to get gnu software compiled if you dont have the gnu toolchain, sad [03:39] maushu: Wait, since when my chrome is beta? [03:40] MarkMenard has joined the channel [03:40] jesusabdullah: arpunk: re you sure? I could've sworn I got stuck messing with solaris after the opensolaris era [03:40] maushu: Can anyone check their chrome version, please? [03:41] chjj: 13.0.782.107 beta [03:41] jesusabdullah: My chrome on THIS computer is stable [03:41] jesusabdullah: but my old work computer was beta [03:41] chjj: i used to use chrome dev, but it became too unstable for my tastes [03:41] ParadoxQuine has joined the channel [03:42] jamesd: sunos initial release 1982... linux kernel initial release 1991... so 9 years later there was linux [03:43] chjj: yeah [03:43] seb_m: maushu: 14.0.835.94 beta [03:43] chjj: not a decade ! [03:44] jamesd: chjj, it is if you take into the account initially linux was just a kernel and sunos was a full OS [03:48] saikat has joined the channel [03:48] losing has joined the channel [03:51] Lorentz: jamesd: I'm only 24, so yeah, probably [03:52] jamesd: i am 2 + the reverse of 24 or i will be in 1hour and 8minutes. [03:52] edude03: noooo jamesd will be 62 !!!! [03:52] edude03: ;) [03:53] jamesd: no... 44 [03:53] nodokodo: at least you're not 404 jamesd [03:54] nodokodo: then youd have problems [03:54] edude03: jamesd I know I'm just playing :P [03:54] jamesd: ok [03:54] pives has joined the channel [03:54] Lorentz: I won't even know if I'll still be in this business by time I turn 40. [03:55] Lorentz: Hopefully retired by then. I wish. [03:56] Kami_ has joined the channel [03:57] jamesd: nah as you get older it gets more fun because you know more tricks like.. how to write a one line script that solves someones problem that they have been working on for the last 6 hours. [03:59] smus has joined the channel [04:01] vidi has joined the channel [04:02] towski has joined the channel [04:03] jlbribeiro has joined the channel [04:06] Sazpaimon has joined the channel [04:07] kenperkins has joined the channel [04:08] clu3 has joined the channel [04:08] clu3 has left the channel [04:08] jesusabdullah: Ask bingomanatee about his mars simulations fyi [04:09] clu3 has joined the channel [04:10] jasonmog has joined the channel [04:10] jasonmog: unexpected error when passing an argument to the vows JS callback [04:11] clu3_ has joined the channel [04:12] jasonmog: ohh i think i have to pass null first [04:12] davidbanham has joined the channel [04:13] visnup: anyone know how to tell if an ip address is from amazon ec2? [04:13] visnup: like is their IP block published anywhere? [04:14] visnup: ooh found it n/m [04:15] smus has joined the channel [04:16] maushu_ has joined the channel [04:16] JakeyChan has joined the channel [04:16] mike5w3c_ has joined the channel [04:17] shiawuen has joined the channel [04:18] MUILTFN has joined the channel [04:19] indexzero has joined the channel [04:19] srid: (def very-lazy (-> (iterate #(do (print \.) (inc %)) 1) rest rest rest)) [04:20] maushu__ has joined the channel [04:20] srid: I understand what `iterate` does, and even read (doc ->) - but I still cannot understand what the above form does. [04:20] srid: Why is a function (rest) in place of sequences for (2nd, 3rd, 4th) arguments to `->`? [04:20] ckknight has joined the channel [04:20] srid: oops, wrong channel. [04:22] arlolra has joined the channel [04:27] zomgbie has joined the channel [04:28] stagas has joined the channel [04:28] ckknight has joined the channel [04:30] pointlessjon has joined the channel [04:30] pointlessjon has left the channel [04:31] zanes has joined the channel [04:32] sridatta has joined the channel [04:32] sridatta: hey all, is the npm registry down for you? [04:32] torsd has joined the channel [04:33] seb_m: yeah, it's down for me [04:35] luke`_ has joined the channel [04:36] azeroth__ has joined the channel [04:37] newy has joined the channel [04:38] ckknight has joined the channel [04:38] tmzt: arpunk: kvm linux syscalls on solaris? or is kvm used generically (as a term) as it seems to be in the site [04:38] maushu__: thanks seb_m [04:39] tmzt: by the way, the marketing copy makes it look like they intend to take oracle on directly, interesting [04:39] mcluskydodallas has joined the channel [04:40] Peniar has joined the channel [04:40] arpunk: tmzt: yes, kvm ported to solaris generically [04:40] tmzt: I mean hpercalls not syscalls [04:40] JakeyChan: when I do with this command : curl -s http://npmjs.org/install.sh > npm-install-$$.sh [04:41] JakeyChan: error: gzip: stdin: unexpected end of file [04:41] JakeyChan: npm-install-14857.sh: line 92: cd: *: No such file or directory [04:41] JakeyChan: who knows this issue? [04:41] JakeyChan_ has joined the channel [04:41] daithi44 has joined the channel [04:42] tmzt: is it trying to decompress the http output? [04:42] arpunk: tmzt: http://joyeur.com/2011/08/15/kvm-on-illumos/ [04:43] JakeyChan_: tmzt: it seems yes [04:43] kenperkins has joined the channel [04:43] tmzt: I always thought that kvm on btrfs would be interesting, using the raw btrfs extents as a cow backing [04:44] arpunk: now you have kvm on zfs, which is awesome :) [04:44] arpunk: btrfs still segfault on my boxes [04:44] Peniar has joined the channel [04:46] tmzt: I'm hoping somebody will build something to replace cpanel [04:47] tmzt: I can't believe that some people use it for internal infrastructure sometimes [04:47] tmzt: :) [04:47] tmzt: also, nginx module for parsing a limited .htaccess and transparent fastcgi suid support [04:47] tmzt: (since node also has a fastcgi-stream module it would also work) [04:49] tonymilne has joined the channel [04:49] tonymilne has left the channel [04:51] ckknight has joined the channel [04:53] jmoyers: hmm [04:53] jmoyers: i dont suppose npm is like, down? [04:53] jmoyers: npm ERR! Error: ucs {bad_utf8_character_code}: -/all/since [04:53] chjj: ACTION checks [04:54] chjj: npm ERR! Error: ucs {bad_utf8_character_code} [04:54] jmoyers: all commands touching the registry are failing [04:54] jmoyers: ah, good [04:54] jmoyers: at least i'm not alone :P [04:54] maushu__: ... [04:54] maushu__: really, someone give ryah something to do [04:54] jmoyers: im guessing it needs to be kicked? its been this way for 20 minutes or so [04:55] Nexxy: oh my god how am I supposed to use other people's code now!? [04:55] mfncooper has joined the channel [04:55] chjj: lol [04:55] chjj: github? [04:55] chjj: :) [04:56] Nexxy: http://lmgtfy.com/?q=chjj+is+the+devil [04:56] chjj: :( [04:56] Nexxy: what?! ;< [04:57] chjj: well i guess github was going down last night too [04:57] chjj: all is lost [04:57] jadams_ has joined the channel [04:58] jadams_: so anyone else seeing the npm issue atm? can't install anything because registry.npmjs.org has an issue [04:58] mfncooper: Yup. [04:58] Jarrod_ has joined the channel [04:58] tim_smart has joined the channel [04:58] mfncooper: {"error":"ucs","reason":"{bad_utf8_character_code}"} [04:58] mfncooper: for every request [04:59] mikeal has joined the channel [04:59] chjj: im guessing this channel is about to be flooded [04:59] jadams_: yup [04:59] jadams_: heh [04:59] jadams_: i am the iceberg tip? [04:59] jadams_: i waited 15min for it to resolve itself [05:00] unlink has joined the channel [05:00] unlink has joined the channel [05:00] mfncooper: I'm guessing Isaac needs to kick Couch. [05:01] binaryjohn has joined the channel [05:02] yenz: heh [05:02] yenz: ACTION shakes fist at npm [05:03] fangel has joined the channel [05:03] ryah: ryan@mac1234:~/projects/node% find . | grep -v .git | xargs wc -l | tail -1 [05:03] ryah: 1353760 total [05:03] ryah: pretty scary [05:04] mjr_: That bad utf8 thing is nasty [05:04] escii has joined the channel [05:04] tmzt: what is that total blobs? [05:04] neilk_ has joined the channel [05:05] yenz: tmzt: i think it's the # of lines in everything except the .git dir [05:05] ryah: mjr_: bad utf8 thing? [05:05] tmzt: ah [05:06] yenz: ryah: re: npm being down [05:06] jmoyers: ryah npm is down, given a bad utf8 error [05:06] ryah: oh [05:06] ryah: ACTION emails izs [05:06] mjr_: I've wrestled with that thing in CouchDB many times. [05:06] mjr_: It usually happened when a bogus value got replicated in. [05:06] yenz: yikes :/ [05:07] ryah: mjr_: is voxer android out yet? [05:07] mjr_: another week or two [05:07] mjr_: Still need to write the c2dm notification gateway and a few more bugs fixed. [05:07] mjr_: c2dm will be another node process, naturally. [05:07] dshaw_1 has joined the channel [05:09] smus has joined the channel [05:09] iFire` has joined the channel [05:10] amerine has joined the channel [05:10] MUILTFN has joined the channel [05:11] JakeyChan: can you get error when access this site : http://registry.npmjs.org/npm [05:11] JakeyChan: {"error":"ucs","reason":"{bad_utf8_character_code}"} [05:11] JakeyChan: this is the error I got [05:12] chjj: yes [05:12] chjj: npm is broken for now [05:12] mfncooper: Yep, the registry is down right now. [05:12] JakeyChan: oh, I installed it just now :( [05:12] JakeyChan: is it because me ? [05:12] mfncooper: Well, not down exactly, but not functional. :p [05:12] chjj: JakeyChan: maybe ;p [05:13] JakeyChan: :D [05:13] mjr_: need some kind of HA layer in front of the npm registry, I think. [05:13] jtwb has joined the channel [05:14] mjr_: such as, multiple npm registries, and the client will try them all until it gets an answer it is happy with. [05:14] yenz: ryah: maybe set the chan topic to let people know re: npm? [05:14] mfncooper: About that "bogus value replicated in", I know stuff gets replicated _out_ of npmjs.org, but does anything get replicated in? [05:14] zilch has joined the channel [05:14] yenz: <3 [05:14] yenz: heh [05:14] dshaw_ has joined the channel [05:14] seivan has joined the channel [05:14] tonymilne has joined the channel [05:15] mjr_: mfncooper: I dunno if things get replicated in. I just know that couch has an issue where it'll accept invalid UTF-8, but then choke when it reads that back and tries to build a view out of it. [05:15] tmzt: izs? [05:15] ryah: you wouldn't even think that package management is such a big deal [05:15] ryah: but clearly people like it [05:15] mjr_: One way that I've personally seen this happen is from replication, but I'm sure there are others. [05:15] yenz: tmzt: isaac schlueter aka the NPM guy [05:16] mfncooper: ryah: when there's 3000+ to choose from, sure! :) [05:16] tmzt: ah [05:16] mjr_: ryah: yeah, I quite like being able to install packages over the network. It's pretty handy. [05:16] tmzt: cool [05:16] ryah: yeah me too [05:16] mcluskydodallas has joined the channel [05:17] yenz: mjr_: npm definitely needs some upgrades, especially given that it's now an essential component of the node ecosystem [05:17] mfncooper: mjr_: on the HA thing, I've pondered something along the lines of Maven's repo mgrs. Seems like the time is right for something in that vein. [05:17] yenz: hopefully isaac agrees ;) [05:17] ryah: after node knockout npm is getting an overhall [05:17] versicolor has joined the channel [05:18] akshatj has joined the channel [05:18] ryah: i think everyone who has a node PaaS is heads down right now :~( [05:18] tonymilne has left the channel [05:18] yenz: ryah: do oyu know if it'll still be on couch? [05:18] mfncooper: That would make internal registries easier too. [05:18] ryah: i think couch is working quite well for npm [05:18] ritch has joined the channel [05:18] ritch has left the channel [05:19] seivan__ has joined the channel [05:19] visnup: hah [05:20] ryah: has anyone installed http://smartos.org/ yet ? :) [05:20] visnup: ryah: no time! [05:21] Draggor: ryah: looks interesting, and I have a box! [05:21] brainproxy: ryah: no but I'm very interested in burning down my homemade XenServer tower [05:21] mjr_: ryah: did you re-image your thinkpad with smartos? [05:21] brainproxy: and replacing the host OS with SmartOS [05:21] ryah: mjr_: not yet [05:22] ryah: i think laptops with smartos will be pretty painful [05:22] dshaw_1 has joined the channel [05:22] ryah: only meant for servers [05:22] Bogh has joined the channel [05:22] mjr_: But just think how advanced and smart your laptop will be. [05:22] mjr_: Have you seen the marketing around this thing? It's absolutely the best operating system possible. [05:22] unnikrishnan has joined the channel [05:22] brainproxy: ryah: so one thing that wasn't clear to me from reading announcements, does the install give you any sort of gui admin environment for working with it? [05:23] mikey_p: smartos is painful enough on servers [05:23] brainproxy: or is it all shell based utils [05:23] ryah: brainproxy: unlikely [05:23] ryah: :) [05:23] brainproxy: I can deal w/ shell stuff, but XenCenter is kind of nice [05:23] brainproxy: awww [05:23] mjr_: Reading about smartos makes we want to just install illumos instead. [05:23] ryah: it's the smartest os [05:24] jadams_ has joined the channel [05:24] Nuck: Any suggestions on a way to send Emails? [05:24] mikey_p: ACTION hugs debian/ubuntu [05:24] Nuck: ryah: I gathered that from the name :P [05:24] ryah: btw we're going to be renaming node to smart javascript [05:24] brainproxy: is there a pile of docs somewhere that will tell you how to actually use it? [05:24] brainproxy: or does one take to the man pages [05:24] Nexxy: rofl [05:24] chjj: ACTION just hugs debian [05:24] mjr_: Why not rename javascript to smart language? [05:24] Nuck: I know I can just check npm for libs, but do you guys have any favorite libraries for sending emails through Node? [05:24] ryah: oh good idea [05:25] Bonuspunkt: smartscript? [05:25] mjr_: and rename this channel to smartass. [05:25] brainproxy: well i mean right off I'd just want to fire it up and figure out how to store an ubuntu server image and fire up some guests [05:25] shiawuen: SmartJS ! [05:25] ryah: to bad april 1st isn't nearer... [05:25] ryah: smartscript! [05:25] sivy has joined the channel [05:26] Nuck: ryah: Nah, you should decide to make your own JS interpreter in Ruby for that. [05:26] clifton: should ditch v8 and write javascrinius [05:27] mjr_: I actually just want a kernel that is faster, a filesystem that is better, and dtrace. [05:27] jadams_: npm back up, topic irrelevant :) [05:27] mjr_: It's too bad solaris is all crazy [05:27] brainproxy: anyone every experiment w/ node.js on OpenMirage [05:27] Nuck: No suggestions for email-sending in Node? >_> [05:27] ryah: mjr_: did you see bryan's slides about kvm? [05:27] ryah: how via the zfs caching they were able to speed up linux on certain benchmarks [05:28] mfncooper: jadams: thanks! [05:28] ryah: mjr_: http://www.slideshare.net/bcantrill/experiences-porting-kvm-to-smartos [05:28] ryah: looks like the best presentation ever. i wish i was there. [05:28] mjr_: ryah: saw the tweet, but didn't read the slides… until now. [05:29] ryah: the #ifdef XXX thing is so great [05:30] jadams_: smartos sounds awesome [05:30] daithi44 has joined the channel [05:31] mfncooper has left the channel [05:33] ryah: jadams_: it has node installed in /bin ! [05:33] ryah: oh wait - i lied - /usr/bin [05:33] Bonuspunkt: what version? [05:33] ryah: 0.4.9 [05:34] ryah: (assuming our internal builds are the same as they have on smartos.org) [05:36] mjr_: ryah: man, that presentation looks awesome. I wish I could have seen that delivered. [05:36] mjr_: Also, kinda seems like it might end up making linux faster as a result. [05:36] mjr_: Now that you can effectively dtrace linux, ext, etc. [05:36] mjr_: Everybody wins. [05:37] aoberoi has joined the channel [05:37] zilch has joined the channel [05:39] towski has joined the channel [05:41] Xano has joined the channel [05:41] davidbanham has joined the channel [05:46] StepanKuzmin has joined the channel [05:47] MUILTFN has joined the channel [05:48] zilch has joined the channel [05:49] azeroth___ has joined the channel [05:50] isaacs has joined the channel [05:51] isaacs: couch is back up [05:51] langworthy_ has joined the channel [05:51] isaacs: er, npm registry is back up [05:51] Charuru has joined the channel [05:52] k1ttty has joined the channel [05:52] aoberoi has joined the channel [05:52] TheJH has joined the channel [05:52] TheJH has joined the channel [05:53] mosen has joined the channel [05:54] mhausenblas has joined the channel [05:55] mhausenblas_ has joined the channel [05:57] stephank has joined the channel [05:57] jetienne_ has joined the channel [05:57] xAt has joined the channel [06:02] meso has joined the channel [06:02] christkv has joined the channel [06:03] hkjels_ has joined the channel [06:04] infynyxx: hey guys, what's the best way to make multi-part request to remote server [06:05] infynyxx: majority of the examples on the web show how to do with using node for handling upload data by a server [06:06] rchavik has joined the channel [06:06] hkjels_ has joined the channel [06:08] jamonkko has joined the channel [06:08] TheJH: huh? ryah, npm doesn't seem to be down for me [06:08] guidocalvano has joined the channel [06:11] TheJH: :D [06:12] TheJH: ryah, just thought, "what kind of topic will he come up with this time?" :D [06:12] xulien has joined the channel [06:13] depywork: mornin' [06:14] dexter_e has joined the channel [06:14] hkjels has joined the channel [06:14] yozgrahame has joined the channel [06:14] FireFly|n900 has joined the channel [06:14] hkjels has joined the channel [06:15] davidbanham has joined the channel [06:16] jetienne_: morning [06:16] mAritz has joined the channel [06:16] dexter_e: Is it possible to do dynamic routing in node/express ? [06:16] sivy has joined the channel [06:17] mAritz: hey guys, trying to get socket.io to run and getting EADDRINUSE though i've double-checked that there is no application using that port and even changed the port 3 times to try different ones. what could this be? [06:17] dexter_e: As in , eliminate the app.get('route') and just use the /path/to/function/ [06:17] mehlah has joined the channel [06:17] mAritz: starting a normal webserver (like express) on the same port works just fine. [06:19] infynyxx has left the channel [06:20] mAritz: dexter_e: you can use regexps or named params [06:20] mAritz: dexter_e: http://expressjs.com/guide.html#routing [06:22] elijah has joined the channel [06:24] SamuraiJack has joined the channel [06:24] infynyxx has joined the channel [06:26] dexter_e: mAritz: Thanks! So how does the initial route setup for this look? [06:27] dexter_e: Do I just omit all the app.get('route') and use one? [06:27] mAritz: if that's what you want, yes. [06:29] xulien: dexter_e: i dont know if its the best way, but i put all my controller into a directory, and i write into app.js a loop with fs.readdir and require(res_of_readir).route(app) [06:29] unnikrishnan has joined the channel [06:29] dexter_e: But everything doesn't seem to default route to "/" it just triggers the no-path-found error [06:29] dexter_e: I want to have my entire app go through "/" and resolve routes dynamically [06:30] Yoric has joined the channel [06:30] larsemil has joined the channel [06:31] xulien: dexter_e: and in my controller, i use exports.route = function(app) [06:31] elijah|home has joined the channel [06:31] dexter_e: hmm [06:32] xulien: dexter_e: but isnt wath you want ;) [06:32] dexter_e: xulien: sounds like an interesting solution [06:32] marlun has joined the channel [06:32] marlun has joined the channel [06:33] dexter_e: I will give a few more things a try and check back in. mAritz: xulien: Thanks and Cheers! [06:33] jasonmog: why do i get SyntaxError: Unexpected token < when making post requests with http.request? [06:33] xulien: dexter_e: your welcome [06:35] jasonmog: nevermind i have to send content length [06:35] Croms has joined the channel [06:35] Croms has left the channel [06:37] sivy has joined the channel [06:37] Croms has joined the channel [06:37] `3rdEden has joined the channel [06:38] pizthewiz: a platform-specific native extension wouldn't really be much different than any native extension right? i could just specify all the necessary library/framework linking flags in the wscript? [06:40] simenbrekken has joined the channel [06:42] H4ns has joined the channel [06:42] Bogh has joined the channel [06:42] H4ns: hi. anyone here into node extension writing in c++ and low-level threading issues? [06:43] ohtogo has joined the channel [06:44] ryah: H4ns: you can ask me [06:45] H4ns: ryah: ok - i am writing an extension to interface to a library that calls back into numerous callback functions, all with different signatures [06:45] ryah: what library [06:45] H4ns: ryah: that makes it impractical to serialize all callback arguments before signaling node using ev_async [06:45] H4ns: ryah: pjsip, a sip library [06:45] ryah: nice [06:45] ryah: who drives the pjsip event loop? [06:46] groom has joined the channel [06:46] H4ns: ryah: it is using a separate thread which then invokes the callbacks as needed. [06:46] ryah: ok [06:46] H4ns: ryah: changing that would require changing the architecture of pjsip significantly, so i have abandoned that idea. [06:46] ryah: so the callbacks come on a different thread? [06:46] H4ns: ryah: correct. [06:47] DennisRasmussen has joined the channel [06:47] ryah: well the best way would be to integrate pjsip into node's thread [06:47] ryah: that may or may not be possible [06:47] H4ns: ryah: as i said, i have looked into that and it is not practical. [06:47] Bogh has joined the channel [06:48] ryah: H4ns: do you not get a file descriptor from the lib that you can poll on? [06:48] H4ns: ryah: what i now plan is to block nodes thread, then use v8::Locker in the callback to lock v8 and tell it that i'm going to talk to it from another thread, then invoke the node callbacks as needed. [06:48] H4ns: ryah: not really, no. pjsip does its own file descriptor management and talks to multiple file descriptors. [06:49] ryah: i need to double check - this is worth it [06:49] ryah: do you have the header? [06:49] H4ns: ryah: the issue with my plan is that i don't know whether v8::Locker is actually sufficient, or whether i could use setcontext/swapcontext to enter the context of node's thread from the callback. [06:50] H4ns: ryah: there is not "one header file" unfortunately, but hold on. [06:50] zeade has joined the channel [06:50] H4ns: ryah: http://www.pjsip.org/pjsip/docs/html/ [06:50] shiawuen_ has joined the channel [06:50] H4ns: ryah: the thing is pretty dense. [06:51] H4ns: ryah: i'm going to use the pjsua layer of the library. [06:51] ryah: i have to look at v8::Locker now never used it [06:51] mcluskydodallas has joined the channel [06:52] H4ns: ryah: it is in include/v8.h [06:52] ryah: i dont think that's what you want [06:52] H4ns: because? [06:52] shiawuen_ has joined the channel [06:53] ryah: what about queuing up callbacks in the pjsip thread - then syncing them over to node when node exits its current event [06:53] ryah: ev_async can be used [06:54] H4ns: ryah: that is what i've done with other libraries, but the large number of callback functions with different signatures make that impractical [06:54] digitalsabre has joined the channel [06:54] indexzero has joined the channel [06:54] ryah: block the pjsip thread until node can handle it [06:54] H4ns: ryah: that's the plan, exactly. [06:55] vdemedes has joined the channel [06:55] H4ns: ryah: so i'm planning to rendezvous the two threads, but i also need to make sure that i have the right thread context when making v8 calls. [06:55] ryah: so- yes once node services the ev_async you should be fine to call into v8 [06:55] ryah: it will only serve ev_async's callback outside of v8 [06:56] H4ns: ryah: ok. great. so once i'm in my ev_async callback, i can stop processing, lock v8 from the other thread and go ahead. [06:56] saikat has joined the channel [06:56] H4ns: ryah: thanks for the clarification. this is going to be fun :) [06:56] ryah: you dont even have to lock it [06:56] meso has joined the channel [06:56] ryah: you should be able to call directly into v8 [06:56] ryah: you might need Isolate::Enter() ? [06:57] ryah: doubtful [06:57] ryah: since theres only one [06:57] H4ns: ryah: ah, ok. i'll look into that if i have problems. [06:57] ryah: cool - looking forward to a sip module :) [06:58] H4ns: ryah: thanks again. i'll come back if i have further questions. i'll present the stuff on jsconf.eu, probably from a low-level perspective as i've now tried various strategies to interface c and c++ libraries to node. [06:58] garrensmith: what authentication module is everyone using with express to handle simple form logins like devise for rails? [06:58] ryah: sorry - your right - you have to lock the v8 thread if you will continue processing in pjsip stuff [06:58] ryah: it can't exit the ev_async callback [06:59] H4ns: ryah: yes, that's what i think. the ev_async callback will wait for the pjsip callback to be done before returning. [06:59] ryah: yeah sounds good [06:59] topaxi has joined the channel [06:59] ryah: hopefully the pjsip functions will not block [06:59] H4ns: ryah: they won't. [07:00] H4ns: ryah: all this phone stuff is asynchronous, which makes it a good fit for node. [07:00] mcluskyd_ has joined the channel [07:00] H4ns: ryah: i also work on a DECT library, but i don't know whether that is going to be open source. [07:00] Nuck: garrensmith: I rolled my own using connect-session middleware and just setting loggedin on that if they are, ya know, logged in [07:01] H4ns: ryah: but in that library, everything is asynchronous, too. common stuff in the phone world. [07:01] raphdg has joined the channel [07:01] garrensmith: Nuck: what type of encryption? BCrypt? I'm tired of rolling my own for every project though... [07:02] Nuck: garrensmith: Triple-salted SHA-256 hashes . [07:02] Nuck: One constant, one random-per-user, and then the username [07:02] garrensmith: Nuck: ok interesting [07:02] Nuck: garrensmith: Make yours reusable :D [07:03] Nuck: It's what I've done. [07:03] garrensmith: Nuck: have you open sourced yours? [07:03] Nuck: 'fraid not [07:03] Nuck: But it's really simpl [07:03] Nuck: e [07:03] mraleph has joined the channel [07:03] Nuck: I concatenate username.toLower + password + constant salt + salt per-user [07:04] garrensmith: Nuck: Yeah its fun the first time :-) I think I need to refactor and make it re-usable. [07:04] garrensmith: Nuck: Yeah I did one salt I read any interesting article its better to use bcrypt but I need to do some proper research on this [07:04] Nuck: I use Mersenne Twister for the per-user salt, seeded randomly on startup with a mixture of time, Math.random() and a value I grabbed off random.org [07:05] Nuck: garrensmith: Bcrypt is, as I understand, better because it's slower [07:05] Nuck: And it's adjustable [07:05] newy has joined the channel [07:05] aoberoi has joined the channel [07:05] garrensmith: Nuck: yeah thats what I understand. Would you still salt with Bcrypt? [07:05] unnikrishnan has joined the channel [07:05] Nuck: garrensmith: I think it wouldn't hurt [07:06] Nuck: I store the salt in a randomly-named field in the database [07:06] garrensmith: Nuck: agreed, cool let me try a bit today. Might ping you later see what you think [07:06] fangel has joined the channel [07:06] vdemedes has left the channel [07:06] Nuck: garrensmith: Sure, I'd be curious to see what you come up with :D [07:06] garrensmith: Nuck: I wrote a couchdb ODM so I kind of want it to integrate with that as well [07:07] Nuck: I am a Mongo user, and proud of it :P [07:09] Dreamer3 has joined the channel [07:09] garrensmith: Nuck: lol nice :-) no shame in that. [07:09] Margle has joined the channel [07:09] Nuck: I just like the SQL-for-JSON style [07:09] garrensmith: Nuck: I prefer couchdb I like the rest interface idea and its simplicity [07:10] garrensmith: Nuck: Mongodb is great, I just get nervous that might require more administration in production [07:13] ccare has joined the channel [07:13] Nuck: garrensmith: What do you mean? [07:14] foxkid has joined the channel [07:14] garrensmith: Nuck: I only understand a little of mongodb but from what I understand its best practice to have multiple instances running so if any crash you dont loose your data. [07:15] Nuck: It's not that prone to errors [07:15] Nuck: It's not automatically journaling-based [07:15] Nuck: But it can do that [07:15] stonebranch has joined the channel [07:15] Nuck: And you should always have multiple instances anyways [07:16] mehlah has joined the channel [07:16] garrensmith: Nuck: true [07:17] Nuck: I think Mongo will scale better because it's not just JS operations on large sets of data [07:19] bergie has joined the channel [07:20] djcoin has joined the channel [07:22] tomb| has joined the channel [07:22] cosmincx has joined the channel [07:22] ablomen has joined the channel [07:23] temp02 has joined the channel [07:25] cypres has joined the channel [07:25] ttpva has joined the channel [07:26] curtischambers has joined the channel [07:27] mehlah has joined the channel [07:28] StepanKuzmin has joined the channel [07:28] sebastia_ has joined the channel [07:29] ph^ has joined the channel [07:30] narayan82 has joined the channel [07:31] Hodgestar has joined the channel [07:32] testid has joined the channel [07:33] emattias has joined the channel [07:36] christkv has joined the channel [07:37] [AD]Turbo has joined the channel [07:40] tomb has joined the channel [07:41] akshatj has joined the channel [07:41] uchuff has joined the channel [07:42] DrMcKay has joined the channel [07:43] robhawkes has joined the channel [07:43] CIA-65: libuv: 03Ryan Dahl 07master * red11883 10/ include/uv.h : Improve docs - http://bit.ly/oygeNE [07:47] tbassetto has joined the channel [07:48] andree has joined the channel [07:49] bluesmoon has joined the channel [07:51] whitman has joined the channel [07:52] devdrinker has joined the channel [07:53] louissmit has joined the channel [07:53] devdrinker has left the channel [07:53] Nexxy has joined the channel [07:54] testid has joined the channel [07:54] testid: like node.js [07:55] Nexxy: very wise of you [07:56] Margle has joined the channel [07:57] toth3max has left the channel [07:58] Xano has joined the channel [07:59] pickels has joined the channel [07:59] mscdex: hex yeah! [07:59] jhurliman has joined the channel [07:59] MUILTFN has joined the channel [08:01] unnikrishnan has joined the channel [08:02] jmoyers: hmm [08:02] jmoyers: is there a utility method somewhere to turn an object into a POST serialized string? [08:02] meso has joined the channel [08:02] jmoyers: like jquery.serialize() for arbitrary json [08:02] chjj: you mean to url encode it? [08:03] jmoyers: yes [08:03] mscdex: jmoyers: querystring.stringify? [08:03] mscdex: or something like that [08:03] jmoyers: that sounds right [08:03] jmoyers: let me check, thanks [08:04] jmoyers: indeed, thanks a bunch [08:05] chjj: this is boring, this channel needs more bikeshedding [08:05] chjj: so about that logo ... [08:05] shapeshed has joined the channel [08:05] mscdex: ! [08:05] jbpros has joined the channel [08:11] hekkwan has joined the channel [08:11] jmoyers: im pretty sure [08:11] jmoyers: bikeshed [08:11] jmoyers: is the node communities favorite word [08:11] jmoyers: y's [08:12] mscdex: possibly [08:12] bluesmoon: what's a bikeshed? [08:12] bluesmoon: I keep my bike in my living room [08:13] SubStack: fuckin' bikes [08:13] SubStack: somebody stole my bike seat tonight :( [08:13] SubStack: and cut my cable lock but didn't even steal my front tire [08:13] jmoyers: thaaats oakland [08:13] DrMcKay: hey, a bit of meta question, if I write a test or fix an issue, and reference this issue from my commit message (so that github shows it on issue page), should I wait for a review or do a pull request? [08:13] SubStack: that's macarthur bart [08:14] SubStack: first and only time I've locked it up there [08:14] jmoyers: yuck [08:14] SubStack: just ordered a replacement seat on amazon [08:15] jmoyers: i try not to leave my bike outside anymore [08:15] jmoyers: unless its like, a really busy street, and not at night [08:15] jmoyers: or, you could be that guy [08:15] jmoyers: you know, carrying around a bike seat and a front tire [08:16] SubStack: I just ordered another ulock so I can bolt the front tire to the frame [08:16] dgathright has joined the channel [08:16] [[zz]] has joined the channel [08:17] SubStack: really I should just build my own bike seat from shit I find and make it look so shitty that nobody would steal it [08:17] SubStack: also, node. what's up with that [08:17] stonebranch has joined the channel [08:19] jelveh has joined the channel [08:20] cronopio has joined the channel [08:20] slickplaid has joined the channel [08:21] thalll has joined the channel [08:21] bicranial_ has joined the channel [08:22] narayan82 has joined the channel [08:22] Margle has joined the channel [08:23] framlin: are there any ways to bulid "native apps" only with html css and (node)js ? [08:23] framlin: for Desktop-Apps [08:23] ttpva: app titanium [08:23] DrMcKay: framlin: Windows 8 is trying [08:23] framlin: not mobile [08:23] framlin: on lunix [08:23] framlin: ;) [08:23] DrMcKay: GNOME 3 [08:24] framlin: lInUx [08:24] garrensmith: what is a good example of a secret for sessions in express? A simple sentence? [08:24] DrMcKay: but it doesn't use node [08:24] pdm_ has joined the channel [08:24] framlin: ah [08:24] TheJH: garrensmith, random, long string [08:24] framlin: no way only to use any Widgets from an JS you want? [08:25] garrensmith: TheJH: can it be a constant? [08:25] TheJH: garrensmith, I'd at least use 64 hex chars [08:25] DrMcKay: garrensmith: I use something like dd if=/dev/urandom bs=1 count=32 | base64 [08:25] DrMcKay: framlin: no that I know of :( [08:25] framlin: :( but thanks! [08:25] TheJH: DrMcKay, you really should take /dev/random for one-time generation of important keys [08:26] devaholic has joined the channel [08:26] garrensmith: If I store all the session info on the server side using something like redis and just the id on the client, is that what most people are doing? [08:26] TomY has joined the channel [08:26] DrMcKay: TheJH: why? [08:26] random123 has joined the channel [08:27] hellp has joined the channel [08:27] TheJH: DrMcKay, uhm... because it may have higer entropy? or am I mistaken about that? [08:27] TheJH: *higher [08:28] DrMcKay: TheJH: oh, true. thanks :) [08:28] simenbrekken has joined the channel [08:29] shiawuen has joined the channel [08:32] fangel has joined the channel [08:33] mc_greeny has joined the channel [08:37] Vivek has joined the channel [08:38] markwubben has joined the channel [08:40] sebastia_ has joined the channel [08:41] __doc__ has joined the channel [08:41] DrMcKay: framlin: you got me thinking, writing this kind of widget library would be cool as hell [08:42] framlin: DrMcKay: indeed ;) [08:43] derferman has joined the channel [08:43] Kami_ has joined the channel [08:43] nickbruun has joined the channel [08:44] DrMcKay: framlin: this guy seems to have started something, but I can't find that project anywhere: http://blackdog66.wordpress.com/2010/04/21/node-js-gtk-hxgtk2/ [08:44] nephics has joined the channel [08:46] DrMcKay: framlin: it's here, I think, but it's API doesn't look nice https://github.com/blackdog66/bdog-gtk [08:48] nephics has left the channel [08:49] framlin: but they use callbcks ;) [08:49] hekkwan has joined the channel [08:49] framlin: I will have a closer look after doing my money-earning-work ... [08:49] DrMcKay: it that's what count :D [08:50] DrMcKay: *counts [08:51] nephics has joined the channel [08:52] akshatj has joined the channel [08:54] AvianFlu has joined the channel [08:54] zilch has joined the channel [08:55] framlin: DrMcKay: but the idea to "communicates to gtk over either tcp or stdin" seems to be feasible [08:55] mscdex: DrMcKay: framlin: creationix has done some work in this area [08:56] larsemil has joined the channel [08:56] DrMcKay: mscdex: oh, node-sdl? [08:56] mscdex: no [08:56] mscdex: gtk stuff [08:56] abraxas: Has anyone here ever looked into utf8, human readable replacements for JSON that are more memory efficient? [08:56] mscdex: and webkit stuff [08:56] mscdex: tim_smart has done gtk stuff as well [08:56] DrMcKay: yes, I see [08:57] replore has joined the channel [08:57] replore_ has joined the channel [08:57] DrMcKay: looks promising [08:58] robotmay has joined the channel [08:58] DrMcKay: oh, node has 999 forks now :D [08:58] mscdex: DrMcKay: framlin: FWIW https://github.com/Tim-Smart/node-gtk https://github.com/creationix/topcube [09:00] DrMcKay: mscdex: thanks, I will check it out [09:00] framlin: this node-gtk - forks? [09:01] DrMcKay: framlin: yes [09:01] AvianFlu has joined the channel [09:01] framlin: mscdex: tnanks! [09:02] ablomen has left the channel [09:02] meso has joined the channel [09:03] ablomen has joined the channel [09:03] DrMcKay: node is at 1000 forks, 24 to go ;) [09:04] mscdex: i bet someone just forked it just so it'd be 1000 [09:04] mscdex: ;-) [09:04] dimituri has joined the channel [09:04] DrMcKay: possibly :) [09:05] blup has joined the channel [09:05] hybsch has joined the channel [09:05] bzinger has joined the channel [09:07] DrMcKay: umm... should I wait for review of my tests or just do the pull request (this: https://github.com/joyent/node/issues/1531 , last referenced commit)? [09:07] jetienne_ has joined the channel [09:07] Margle has joined the channel [09:08] jbpros has joined the channel [09:08] nephics has left the channel [09:09] dimituri has left the channel [09:09] dimituri has joined the channel [09:14] alek_br has joined the channel [09:16] adambeynon has joined the channel [09:17] jamonkko has joined the channel [09:18] adambeynon has joined the channel [09:20] pdelgallego has joined the channel [09:24] jma has joined the channel [09:25] ttpva_ has joined the channel [09:25] sylvinus has joined the channel [09:26] CStumph has joined the channel [09:26] bzinger has joined the channel [09:26] xulien has joined the channel [09:26] micheil has joined the channel [09:27] mc_greeny has joined the channel [09:30] DennisRasmussen: http://stackoverflow.com/questions/7090582/how-do-i-use-node-exe-with-node-mysql-on-windows [09:30] markwubben has joined the channel [09:34] abbakym has joined the channel [09:40] abbakym: (starter question) why does npm install modules into the current dir's node_modules/ subdir? can it be configured to install them to node directory? [09:40] Emmanuel`: npm -g ? [09:40] Emmanuel`: but read why on the doc, it actually make sense [09:40] Deebster: yup, -g is the global flag [09:40] abbakym: thx [09:41] kulor-uk has joined the channel [09:41] Deebster: although if you're on nix you might need to fiddle a bit [09:42] Deebster: ACTION looks for link [09:42] poop has joined the channel [09:43] abbakym: -g worked, thanks. I thought it to be the default behavior. [09:43] Emmanuel`: use to be [09:43] Emmanuel`: then I guess some people realise that node module are actually pretty small [09:43] Emmanuel`: and you might as well embed them with your program [09:43] Emmanuel`: so you can distribute the whole thing easily, without external dependencies [09:44] TheJH: abbakym, use -g only for console apps, you can't require globally installed stuff [09:44] Deebster: You might need to look at http://stackoverflow.com/questions/5919629/express-module-not-found-when-installed-with-npm [09:44] TheJH: Emmanuel`, it's also because of dependency hell [09:44] rfay has joined the channel [09:46] TheJH: guys, please upvote isaacs answer on http://stackoverflow.com/questions/5919629/express-module-not-found-when-installed-with-npm/6946888#6946888 [09:48] Margle has joined the channel [09:48] bluesmoon: there are several other reasons why -g isn't default... for example, shared hosting, user not having sudo privs, etc. [09:49] abbakym has joined the channel [09:51] mcluskydodallas has joined the channel [09:51] altamic has joined the channel [09:54] jomoho has joined the channel [09:58] ttpva has joined the channel [09:58] Cromulent has joined the channel [09:59] larsemil has joined the channel [10:00] ph^_ has joined the channel [10:00] andrewfff has joined the channel [10:01] eldar has joined the channel [10:01] fdenbow has joined the channel [10:02] NetRoY has joined the channel [10:05] havenn has joined the channel [10:06] Yoric has joined the channel [10:06] ph^ has joined the channel [10:06] Bogh has joined the channel [10:09] davidbanham has joined the channel [10:10] ttpva_ has joined the channel [10:12] sylvinus has joined the channel [10:13] fermion has joined the channel [10:16] toxico has joined the channel [10:16] mike5w3c_ has joined the channel [10:22] footyfish has joined the channel [10:23] CoinOpeBoy has joined the channel [10:24] shinuza has joined the channel [10:25] TheJH: would it be ok to call a library that counts the bytes that flow through a pipe "manometer"? [10:26] blup: hmmm.. any idea why firefox keeps changing versions?.. [10:26] TheJH: blup, don't worry, soon, you'll not see the version anymore :D [10:26] navaru has joined the channel [10:26] TheJH: blup, did you see the "bug" ticket about firefox versions in the about dialog? [10:27] blup: yea, when it reaches triple digits (at this rate, about a year...) [10:27] blup: nope [10:27] stride: about a year? isn't it at one major version per month or something right now? [10:28] blup: i was exagerating [10:28] TheJH: https://bugzilla.mozilla.org/show_bug.cgi?id=678775 "Bug 678775 - Remove version from About window" [10:28] TheJH: "If a user needs the full version information they can get it from about:support." [10:29] TheJH: "This feature is a priority of the Firefox UX lead and the Firefox Product lead. It is part of the phasing out of version numbers in Firefox that's already well under way (though still incomplete.)" [10:29] StepanKuzmin has joined the channel [10:29] TheJH: that Asa Dotzler is insane [10:29] DrMcKay: they have pretty weird priorities [10:30] akshatj has joined the channel [10:30] blup: yea... just bothers me i have to check add-on updates every month or so [10:30] Fabryz has joined the channel [10:30] DrMcKay: what pisses me of is that distros (or at least Fedora) can't keep up [10:31] blup: with other distros? [10:31] DrMcKay: no, with FF versions [10:31] DrMcKay: I'm currently running FF5 here [10:32] blup: ubuntu keeps up rather well ;) [10:33] DrMcKay: oh, good for you :) [10:34] Kami_ has joined the channel [10:34] DrMcKay: but I liked FF3.5. better than FF x where x => infinity [10:35] louissmit has joined the channel [10:37] cjroebuck has joined the channel [10:37] jetienne_ has joined the channel [10:37] isufy has joined the channel [10:39] sebasti__ has joined the channel [10:40] TheJH: just saw https://github.com/isaacs/npm/issues/1276 - does Darwin have a weird sudo or something selinux-alike? [10:40] boehm has joined the channel [10:45] TheJH: don't mind, looks like a path issue or so [10:49] sechrist: If I made all of my property keys in couchdb crc32 hashes, would that reduce space on disk significantly? or is there some sort of paging size that makes it pointless? [10:50] ttpva has joined the channel [10:52] christkv has joined the channel [10:52] pen has joined the channel [10:53] bzinger has joined the channel [10:54] adambeynon has joined the channel [10:54] unlink has joined the channel [10:54] unlink has joined the channel [10:56] i42n has joined the channel [10:56] Fabryz: package.json has sense to be done only if I intend to make and publish a npm package, not for other apps right? [10:56] DrMcKay: Fabryz: no [10:56] H4ns` has joined the channel [10:57] akshatj has joined the channel [10:57] DrMcKay: with package.json you can make npm install all dependecies for you [10:58] DrMcKay: Fabryz: http://howtonode.org/introduction-to-npm , development section [10:59] kriszyp has joined the channel [10:59] japj has joined the channel [10:59] Fabryz: ah right [10:59] Fabryz: where do I find all the usable fields? [11:00] TheJH: sechrist, which couch version are you using? [11:00] TheJH: sechrist, they recently added googles snappy compression stuff, that should help somewhat [11:00] sechrist: The one i'm playing with is hosted by cloudant, but what's the difference? [11:00] DrMcKay: Fabryz: do `npm init` in your app directory, it will create a template for you [11:00] sechrist: ah neat [11:01] sechrist: I was thinking about just hacking up cradle/couch-client to pass all of the properties through a crcer before hitting the server [11:01] TheJH: sechrist, couchdb has some kind of paging, yes. but I think (not sure) that it will only affect you if you do many single.inserts or single-updates or so [11:01] sechrist: 4 bytes across the board has to be better than full length.. unless couch already hashes them in the btree? [11:01] TheJH: sechrist, I think that you should try to do batch inserts or so if you want smaller db size [11:02] Fabryz: DrMcKay thanks [11:02] TheJH: sechrist, no, in the btree, they aren't hashed, I think [11:02] __class__ has joined the channel [11:03] sechrist: so wait if I have an two docs like {_id: "...", blah: "foo", hah: "bar"}, {_id: "...", blah: "foo", hah: "bar"} there will be instances of each property for each object? [11:03] sechrist: baaaah [11:03] sechrist: yeah ok [11:04] TheJH: sechrist, how much do you know about couchs storage? e.g. do you know the reason for bulk-inserts being less disk-consuming? I'd be happy to tell you [11:04] sechrist: Nope I don't, enlighten me! [11:05] TheJH: sechrist, did you know that couch is append-only? really. ONLY. even the header gets rewritten after each insert, at the end of the db file [11:05] TheJH: and all relevant parts of the btree [11:05] TheJH: sechrist, that means, if you update one character in a document, that results in the document, a few btree nodes and the header being rewritten [11:06] TheJH: :D [11:06] TheJH: also, each header write requires to happen at a 4k-boundary [11:06] TheJH: s/requires/is required/ [11:07] sechrist: ah ok [11:07] TheJH: if I'm not mistaken, that means that every change will at least add 4k to your DB file :D [11:07] yorick has joined the channel [11:07] sechrist: yeah [11:07] sechrist: so, my idea won't work [11:07] GlynnR has joined the channel [11:08] Bogh has joined the channel [11:08] TheJH: sechrist, actually, it might. because couch regularily rewrites its entire db file, and then it doesn't have 4k per update anymore [11:10] sechrist: hmm, okay. I'll have to just take a control dataset, and just test it [11:10] shapeshed has joined the channel [11:11] sechrist: crc32ing every index accessed in js sounds expensive now that I think about it [11:11] sechrist: unless the getters aren't used that much [11:11] sechrist: oh f it.. there's physics engines now [11:13] hellp has joined the channel [11:13] jamonkko has joined the channel [11:14] jackbrown has joined the channel [11:14] jackbrown: hi, i'm having difficulties installing node on windows is anyone available to help? [11:15] stonebranch has joined the channel [11:16] jackbrown has left the channel [11:16] tedeh has joined the channel [11:17] ttpva has joined the channel [11:18] GlynnR2 has joined the channel [11:18] i42n has left the channel [11:18] i42n has joined the channel [11:19] ttpva has joined the channel [11:20] Fabryz: jackbrown are you following https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows)? [11:20] Bwen has joined the channel [11:23] skm has joined the channel [11:23] pives has joined the channel [11:25] andree has joined the channel [11:26] metaverse has joined the channel [11:26] jetienne_: why joyent doesnt provide a window build ? [11:26] jetienne_: or somebody external to maintain it [11:26] jetienne_: it will help the community i think [11:26] ttpva has joined the channel [11:26] japj: there is a node windows build [11:27] oskude has joined the channel [11:27] jetienne_: japj: ah ? where [11:27] japj: that is one of the things that they are focusing on with the 0.5.x development [11:27] saasaa has joined the channel [11:27] jetienne_: japj: i see at least 10 people per day looking for it [11:27] japj: 0.5.x is 'unstable' though, but it is at http://nodejs.org/#download [11:28] Raynos has joined the channel [11:28] jetienne_: here we go. thanks [11:28] japj: 0.5.x is unstable, 0.6 will be stable again [11:28] Raynos: What's the correct way to convert a string to hex in node? [11:28] japj: so you might hit some bumps on the way using it [11:28] Raynos: Should I run it through a buffer? [11:28] Bogh has joined the channel [11:28] jetienne_: Raynos: "".toString(16) [11:29] Raynos: That works in ES or just in node? [11:29] jetienne_: this is javascript [11:29] jetienne_: where is the v8 build ? [11:29] jetienne_: bot i meant [11:29] Nexxy has joined the channel [11:29] TheJH: ah, hello Raynos [11:29] Nexxy has joined the channel [11:29] japj: jetienne: also note that npm doesn't run on windows yet, but there are some alternatives if you really need it [11:29] Raynos: v8: "lulz".toString(16) [11:30] Raynos: Ehm this doesnt work for me [11:30] Raynos: Unless I'm stupid [11:30] TheJH: Raynos, did you see my comment about the http agent thing on stackoverflow? you seemed to be confused about requests going on serially [11:30] Raynos: TheJH: yes I did see it [11:30] Raynos: there is indeed a limit [11:31] Raynos: but the answer implied the limit was 1 instead of 5 [11:31] TheJH: Raynos, v8bot isn't here, try catb0t [11:31] catb0t: Raynos , v8bot ew v8bot v8bot [11:31] TheJH: .. "foo" [11:31] catb0t: 'foo' [11:31] jetienne_: Raynos: gimme the hex number you use [11:31] thalll has joined the channel [11:31] Raynos: catb0t "foo".toString(16) [11:31] catb0t: footoString16 [11:31] Raynos: ;_; [11:31] TheJH: Raynos, ".. " [11:31] halfhalo has joined the channel [11:31] Raynos: .. "foo".toString(16) [11:31] catb0t: 'foo' [11:32] jetienne_: catb0t: d [11:32] catb0t: d jango is [11:32] Raynos: .. "32".toString(16) [11:32] catb0t: '32' [11:32] TheJH: Raynos, you'll need a buffer, I think. new Buffer(str).toString("hex") [11:32] Raynos: see it does nothing of value [11:32] jetienne_: hehe those bots writter should really learn about tab completion :) [11:32] Raynos: Yes i thought I need a buffer [11:32] goshakkk has joined the channel [11:32] Raynos: It just seems a buffer is overkill. [11:32] jetienne_: Raynos: gimme the hex number [11:32] pita has joined the channel [11:32] Raynos: the hex number is a uuid [11:33] Raynos: that im storing in hex format in couchdb [11:33] TheJH: Raynos, you can also do it without buffer, one sec... [11:33] pita: hi, anyone knows how to catch a sigint with node.js? [11:34] DrMcKay: pita: http://nodejs.org/docs/v0.5.4/api/process.html [11:34] oskude: pita: http://nodejs.org/docs/v0.4.10/api/process.html#signal_Events [11:34] jetienne_: pita: this is in process.on('SIGINT', function(){ mongoose.disconnect(); }); [11:34] TheJH: .. Array.slice.call("foo").map(function(char){char.charCodeAt(0).toString(16)}).join("") [11:34] catb0t: TypeError: Cannot call method 'call' of undefined [11:34] pita: ok thx :D [11:34] TheJH: .. [].slice.call("foo").map(function(char){char.charCodeAt(0).toString(16)}).join("") [11:34] catb0t: '' [11:34] TheJH: :( [11:34] adnam has joined the channel [11:34] Bogdan__ has joined the channel [11:35] TheJH: .. str="foo"; hex=""; for (var i=0; i' with "node" : "" [13:49] DrMcKay: yes, exactly [13:49] jtsnow has joined the channel [13:51] arthurdebert has joined the channel [13:51] DrMcKay: Fabryz: "console.log('Error while drawing map: '+ err);" - does this fail with TypeError? [13:51] Fabryz: updated the repo [13:51] Fabryz: yes [13:51] jbpros has joined the channel [13:51] tbassetto has joined the channel [13:52] smus has joined the channel [13:52] pen has joined the channel [13:52] Fabryz: but I still to give it a look [13:52] shipit has joined the channel [13:52] bradleymeck has joined the channel [13:52] DrMcKay: it seems like you can't simply do string + error type [13:53] eee_c has joined the channel [13:53] sylvinus has joined the channel [13:54] DrMcKay: use console.log('Error...' + err.message); [13:55] poop has joined the channel [13:59] kulor-uk has joined the channel [13:59] bosky101 has joined the channel [13:59] zilch has joined the channel [13:59] Insanity5902 has joined the channel [14:00] DrMcKay: Fabryz: did that work? [14:00] Fabryz: Not [14:00] DrMcKay: you're still getting a TypeError? [14:01] Fabryz: yes [14:01] Fabryz: skipping that part for later, I want to figure out why it's not logging anything when I create a new istance of Map [14:01] cjroebuck has joined the channel [14:01] Fabryz: If I put something like AEGJOSBJZGTFJSDFVK anywhere on that code, the console.log works, the hell [14:02] hl7Guy: Hi all. I'm still new to node. I'm playing around with restify and the node-postgres driver. I'm able to call a web service, query the db, and return json from to the caller. I'm not quite sure how to abstract my db call out of my restify service code though. Can anyone recommend and example that could show me how to abstract my db query code to a seperate module or something? [14:02] davidbanham: console.log('Error...' + err.message); often has issues for me in node. It doesn't seem to toString the object properly unless it's console.log("Error is:"); console.log(error); [14:02] maushu has joined the channel [14:02] tbassetto has joined the channel [14:02] mcluskydodallas has joined the channel [14:02] bosky101: i sometimes do console.log ( 'some str' + sys.inspect ( obj ) ); [14:04] mc_greeny has joined the channel [14:04] DrMcKay: anything else works? process.stdout.write, console.error? [14:05] aconbere has joined the channel [14:06] Fabryz: used the double console.log, Chrome is crashing [14:06] Fabryz: haha [14:07] DrMcKay: oh, right, this works client-side [14:07] bosky101 has joined the channel [14:07] DrMcKay: which Chrome are you using? [14:08] Fabryz: my whole virtual machine froze [14:08] DrMcKay: because of two subsequent console.log? [14:09] DrMcKay: wow. [14:09] Clex: Fabryz: this is why you should avoid to run stuff as root. ;-) [14:09] cronopio has joined the channel [14:09] Fabryz: I guess because of that + infinite loop in the draw [14:10] Fabryz: trying to regain control of virtualbox [14:10] softdrink: someone needs to make some node vinyl decals [14:10] DrMcKay: you will possibly have to kill it's process, happened to me as well [14:11] Fabryz: we require node.js stickers from moo.com [14:11] Fabryz: :p [14:11] bnoordhuis has joined the channel [14:12] Fabryz: regained control of the VM [14:12] softdrink: but… i want cut vinyl hehe [14:13] anatoo has joined the channel [14:14] kevwil has joined the channel [14:14] junkee[] has joined the channel [14:15] Fabryz: tell it to ryah: tshirts, lithographies and all sort of (useless?) gadgets. WE NEED THEM [14:15] jetienne_ has joined the channel [14:15] mscdex: i want a node.js coffee cup [14:15] zilch has joined the channel [14:15] mscdex: you know, for when i'm multitasking in the morning [14:16] DrMcKay: if they had tshirts or coffee cups, I would be like "shut up and take my money!" [14:16] mscdex: a nice asynchronous blend [14:16] softdrink: what about a coffeekup coffee cup? hurrr [14:16] mscdex: if anyone calls while i'm drinking out of my node.js coffee cup, i'll tell them to callback [14:16] yept has joined the channel [14:16] srid has joined the channel [14:16] srid has joined the channel [14:17] DrMcKay: mscdex: lol'd :D [14:17] softdrink: haha [14:17] i42n has joined the channel [14:17] luke` has joined the channel [14:17] bosky101 has joined the channel [14:17] Yuffster has joined the channel [14:18] DrMcKay: also, is it only me to think "callback" when my coffee is done? [14:18] ryanfitz has joined the channel [14:19] gmonnerat has joined the channel [14:19] boehm has joined the channel [14:19] Glenjamin: Hi guys, I"m trying to set up a remote repl into a long running process. I've got this going pretty easily with net.createSocket + repl, but I'm wondering how I can get the readline-like tab completion behaviour [14:20] FuzzYspo0N has joined the channel [14:20] baudehlo has joined the channel [14:20] progme has joined the channel [14:21] baudehlo has left the channel [14:21] baudehlo has joined the channel [14:21] nibblebot has joined the channel [14:22] arpunk has joined the channel [14:22] vipaca has joined the channel [14:22] vipaca has joined the channel [14:23] DrMcKay: Glenjamin: maybe this can help you somehow: http://groups.google.com/group/nodejs/browse_thread/thread/96a42e0335ecd614/5785805785ea5a46 [14:23] eastender has joined the channel [14:23] JJMalina has joined the channel [14:24] dnjaramba has joined the channel [14:24] smus has joined the channel [14:25] geetarista has joined the channel [14:26] garrensmith: FuzzYspo0N: Yo :-) [14:26] voodootikigod has joined the channel [14:26] MaSch: Does someone else have problems with nodejs vs. PaX?? [14:27] devongovett has joined the channel [14:27] FuzzYspo0N: alo [14:28] shinuza has joined the channel [14:28] Poetro has joined the channel [14:28] EyePulp has joined the channel [14:29] ryanfitz has joined the channel [14:31] malkomalko has joined the channel [14:31] igl1 has joined the channel [14:32] tjholowaychuk has joined the channel [14:32] FireFly has joined the channel [14:33] eee_c has joined the channel [14:34] jbpros has joined the channel [14:35] bassui has left the channel [14:35] fatjonny has joined the channel [14:36] raidfive has joined the channel [14:37] mscdex: Glenjamin: probably not without monkey patching node's readline implementation [14:37] mcluskyd_ has joined the channel [14:37] robertfw has joined the channel [14:39] jadams_ has joined the channel [14:41] EvRide has joined the channel [14:41] bnoordhuis: MaSch: what issues are you running into? [14:42] temp01 has joined the channel [14:42] sivy has joined the channel [14:42] FireFly|n900 has joined the channel [14:44] MaSch: PaX kills my node processes because of issues in v8. I know how to fix it (paxctl -m /usr/bin/node) but i wonder if this get fixed some day.. [14:45] liquidproof has joined the channel [14:46] tristanseifert has joined the channel [14:47] constexpr has joined the channel [14:48] Grepsyk has joined the channel [14:49] BillyBreen has joined the channel [14:49] nordicdyno has joined the channel [14:49] mc_greeny has joined the channel [14:49] halfhalo has joined the channel [14:50] Grepsyk: Question: when using fs.readFileSync on Windows, I can't get it to accept absolute paths. Node concats the specified path to the cwd. Is this a bug, or am I doing sth wrong? [14:50] DrMcKay: Grepsyk: try with '/' at the beginning [14:51] losing has joined the channel [14:51] japj: Grepsyk: are you using a cygwin (0.4.x) build? [14:51] Grepsyk: Like "/C:\Home\..." ? [14:51] Insanity5902 has left the channel [14:51] DrMcKay: "/Home/..." [14:52] DrMcKay: I've seen this kind of issue somwhere [14:52] jetienne_ has joined the channel [14:52] Grepsyk: I'm using v0.5.4, windows binary. [14:53] binaryjohn has joined the channel [14:54] junkee[]: this is not node specific but how can I lock a mutex without blocking (c++ addon)? I found the pthread_mutex_trylock function but I don't want to call it every few milliseconds I would rather like a callback or something like that. Any ideas? [14:54] Grepsyk: DrMcKay: doesn't work neither, node still converts the separators to '\' and prepends cwd. [14:54] charleyd has joined the channel [14:55] DrMcKay: Grepsyk: weird, did you build it yourself? [14:55] Grepsyk: No, downloaded from nodejs.org. [14:55] rurufufuss_ has joined the channel [14:56] colinclark has joined the channel [14:56] jakehow_ has joined the channel [14:56] jakehow has joined the channel [14:57] TheFuzzball has joined the channel [14:57] DrMcKay: Grepsyk: weirdness has just leveled up... [14:57] zeissoctopus has joined the channel [14:57] joelio: what's the current best practice for HTTP 1.1 virtual hosting? [14:57] Grepsyk: I'm not sure where to go from here, the javascript source of node doens't really do any path mangling, guess this happens in the C++ part. No? [14:57] DrMcKay: Grepsyk: maybe this helps: http://stackoverflow.com/questions/6737824/how-to-run-a-hello-js-file-in-node-js-on-windows [14:59] DrMcKay: No, that's a different issue [14:59] Grepsyk: Yeah, it's with the path to the js. [15:00] Poetro has joined the channel [15:00] Poetro has joined the channel [15:01] DrMcKay: Grepsyk: source code? [15:01] newy has joined the channel [15:02] gazumps has joined the channel [15:02] skyler_brungardt has joined the channel [15:02] Grepsyk: DrMcKay: Well, I'm trying to run a CSSLinter(csslint.net) from a build script. The build script passes absolute paths. When I run manually using relative paths everything runs well. [15:03] Grepsyk: Hm... [15:04] Grepsyk: Think I've found the problem, looking through the source of said CSSlint. [15:04] Grepsyk: Thanks for your help man! [15:05] DrMcKay: don't forget to open an issue for CSSLint if it's their fault [15:05] pjacobs has joined the channel [15:07] Grepsyk: I'll fix it and send a pull request, thanks. [15:07] DrMcKay: ok :) [15:10] maushu_ has joined the channel [15:10] ph^ has joined the channel [15:11] c4milo has joined the channel [15:11] c4milo has joined the channel [15:11] TheJH: argh! so many stackoverflow answerers don't know anything about node! http://stackoverflow.com/questions/7094615/nodejs-convert-string-to-buffer/7095059 "[...]you might want to change[...]toString()[...]to[...]toString("binary")" [15:12] Fabryz has joined the channel [15:12] Fabryz: damn, sometimes the webchat doesn't update [15:13] TheJH: we need a bot here that polls stackoverflow for node questions so that we can give good answers and the node universe doesn't turn into phpiverse. and that might actually be doable. any complaints? If not, I'll write that poller now. [15:13] Fabryz: opened mIRC: "You have been using mIRC for 1000 days, which is *beyond* the evaluation period." [15:13] TheJH: Good, small, cool project :) [15:13] DrMcKay: TheJH: cool :) [15:13] Fabryz: Write it. [15:13] TheJH: :) [15:14] TheJH: oh, and btw, please upvode my answer to that stackoverflow question. [15:14] TheJH: *upvote [15:14] DrMcKay: I did :) [15:14] aglemann has joined the channel [15:14] stride has joined the channel [15:14] TheJH: DrMcKay, huh? I see no upvote [15:14] FearTheCowboy has joined the channel [15:14] FearTheCowboy has joined the channel [15:15] aglemann: is it possible to do a synch http get request? [15:15] TheJH: ah, now I see it [15:15] TheJH: aglemann, no, and it's probably a bad idea [15:15] TheJH: aglemann, what do you want it for? [15:16] aglemann: so i have a function that returns a value... but in order to return that value i need data from a server... if i go async then i'd have to go async all the way up the chain right? [15:16] kenperkins has joined the channel [15:16] ph^ has joined the channel [15:16] DrMcKay: aglemann: yes [15:16] aheckmann has joined the channel [15:17] TheJH: aglemann, yes [15:17] zanes has joined the channel [15:17] maushu__ has joined the channel [15:17] altamic has joined the channel [15:17] DrMcKay: TheJH: what commands does your bot accept? [15:17] aglemann: it's just one request and the way this app works if that request timed out it would be ok for the app to time out... which is why i was hoping there would be a cheap, easy synchronous fix ;) [15:17] RORgasm has joined the channel [15:18] TheJH: DrMcKay, write "help" in query, it will send you one line every two seconds for half a minute or so :) [15:18] DrMcKay: can I msg him? [15:19] TheJH: DrMcKay, yes [15:19] wadey has joined the channel [15:19] DrMcKay: OK, thanks :) [15:19] rurufufuss has joined the channel [15:19] shipit has joined the channel [15:20] luke`_ has joined the channel [15:20] maushu has joined the channel [15:21] sub_pop has joined the channel [15:22] Glenjamin has joined the channel [15:22] eresair has joined the channel [15:23] halfhalo-work has joined the channel [15:24] smtlaissezfaire has joined the channel [15:24] matyr has joined the channel [15:25] Glenjamin: hi guys, I was in here earlier asking about readline and remote repls, someone mentioned monkeypatching then I accidentally closed my irc client [15:27] Tobsn has joined the channel [15:27] butu5 has joined the channel [15:28] Tidwell has joined the channel [15:28] guillermo has joined the channel [15:28] ryanfitz has joined the channel [15:29] Tobsn: ah lion update. [15:29] Tobsn: finally. [15:29] Tidwell: Anyone else having a problem with npm installing socket.io? I just updated node to 0.4.9 with nvm and am reinstalling modules with npm, but socket.io fails during unpacking [15:30] nodokodo has joined the channel [15:31] kevwil has joined the channel [15:31] cjroebuck has joined the channel [15:32] TheJH: Tidwell, could you gist the error? [15:32] hybsch has joined the channel [15:32] nibblebo_ has joined the channel [15:32] TheJH: what do you think, what would be a good polling interval for stackoverflow? 1 minute? [15:32] Glenjamin: api or scraping? [15:33] `3rdEden: Tidwell if you are using cent os try updating your tar installation [15:33] `3rdEden: apt-get install tar :$? [15:33] DrMcKay: 1 minute should be fine [15:33] TheJH: Glenjamin, API [15:33] DrMcKay: `3rdEden: yum update tar [15:33] `3rdEden: https://github.com/LearnBoost/socket.io/issues/456 [15:33] `3rdEden: oh :p [15:34] Glenjamin: TheJH: anything between 10 and 30 secs should be fine [15:34] moree has joined the channel [15:34] moree: is there anyway to define global getter setter in js? [15:35] Raynos has joined the channel [15:35] DrMcKay: moree: global? [15:35] Raynos: I'm using mikael's request. [15:35] Spion has joined the channel [15:35] moree: for example, myojb.fun('awdawd') [15:35] Raynos: and it seems to just return no error and an empty body on every 5th or so request [15:35] Raynos: Which is really annoying, why does it do that? [15:36] Ginlock has joined the channel [15:36] Glenjamin: Object.defineProperty(myobj.prototype, 'fun', .... [15:36] TheJH: whoah... "The API will cut you off if you make more than 30 requests over 5 seconds to any single endpoint." [15:37] mcluskydodallas has joined the channel [15:37] JKarsrud: how would you downgrade node from 0.5-pre to 0.4.10? Just reconfigure and remake the install? [15:37] TheJH: JKarsrud, I'd do it that way [15:38] Raynos: cant you also "make uninstall" ? [15:38] DennisRasmussen: Is it possbible to intercept all custom events emitted by socket.io ? like socket.on('all_events', ...) [15:38] DennisRasmussen: wrong channel :) [15:38] Croms has joined the channel [15:38] guidocalvano_ has joined the channel [15:40] Poetro has joined the channel [15:40] clifton has joined the channel [15:41] r1tz has joined the channel [15:41] matyr_ has joined the channel [15:41] r1tz has left the channel [15:43] materialdesigner has joined the channel [15:44] heavysixer has joined the channel [15:44] FuzzYspo0N has joined the channel [15:46] stephank has joined the channel [15:48] garrensmith has joined the channel [15:48] tomtomaso has joined the channel [15:49] tomtomaso has joined the channel [15:50] TheJH: this feels weird... `new StackOverflow()` [15:50] pizthewiz has joined the channel [15:51] torsd has joined the channel [15:51] amerine has joined the channel [15:52] matyr has joined the channel [15:52] TheJH: i need a good json request lib that can handle gzipped responses, do you know one? [15:52] brianc has joined the channel [15:52] context: thejh: the browser handles the gzipping. [15:53] Glenjamin: what browser? [15:53] TheJH: context, uhm... what browser? there's only a node script and a JSON API on the other side [15:53] TheJH: context, my node script is the client [15:54] mundanity has joined the channel [15:54] _sorensen_: wow, how did i go so long without knowing what the ~ did in JS [15:54] zeissoctopus has joined the channel [15:54] chapel: lol [15:55] chapel: not laughing at you btw [15:55] Glenjamin: wait what [15:55] _sorensen_: wouldnt mind if you did [15:55] _sorensen_: lol [15:55] Glenjamin: there's a ~ operator? [15:55] _sorensen_: yeaaaaaa [15:55] TheJH: Glenjamin, the only thing it's really useful for is indexOf stuff :D [15:55] shinuza has joined the channel [15:55] _sorensen_: yep [15:55] _sorensen_: checking anything that JS would return a -1 for false [15:56] TheJH: _sorensen_, it returns a number, not a boolean [15:56] TheJH: _sorensen_, -1 -> 0 [15:56] sivy has joined the channel [15:56] _sorensen_: i realize [15:56] Glenjamin: oooh [15:56] JKarsrud: TheJH: aight =) [15:56] Glenjamin: bitwise not [15:56] Glenjamin: yeah, ofc [15:56] Glenjamin: only usually see it when combining bitmasks [15:57] _sorensen_: just didn't word that well [15:57] _sorensen_: lol [15:57] wookiehangover has joined the channel [15:57] Fabryz: is there some advanced tutorial for 2D tile engines on HTML5 I can use? I start getting tired [15:57] DrMcKay: TheJH: why would a JSON lib need to decode gzip? [15:57] AvianFlu has joined the channel [15:57] TheJH: DrMcKay, the stackoverflow api just assumes that I can handle gzipped responses [15:58] Glenjamin: A = 1; B = 2; C = 4; ALL = A&B&C; ALL_WITHOUT_C = ALL & ~C; [15:58] TheJH: probably on purpose [15:58] _sorensen_: is there an equivilant to ~ in python? [15:59] jj0hns0n has joined the channel [15:59] Glenjamin: yeah, ~ [15:59] Bogh has joined the channel [15:59] _sorensen_: ah seriously? [15:59] _sorensen_: >.< [16:00] Glenjamin: TheJH: looks like you'll have to do it manually, i'd imagine a generic api consumer with support for gzip et al would be fairly good to have available [16:00] Yuffster_work has joined the channel [16:01] _sorensen_: so... [16:01] _sorensen_: not not ~somethign [16:01] blueadept2: would anyone be able to tell me why the waterfall pattern has null as the first callback argument? https://github.com/caolan/async#waterfall [16:02] blueadept has joined the channel [16:02] joshthecoder has joined the channel [16:02] Glenjamin: blueadept2: because it's a nodejs convention to have the error as argument 1 [16:02] blueadept: ah thats right [16:02] GlynnR has joined the channel [16:03] matyr_ has joined the channel [16:03] nibblebot has joined the channel [16:04] DrMcKay: Glanjamin: I may have some spare time to write something like that [16:04] TheJH: bnoordhuis, about sendfile, I think that gatling uses it, I don't know enough about the topic, but could you have a look at http://code.google.com/p/linux-scalability-benchmarks/source/browse/gatling/README.performance ? [16:05] TheJH: bnoordhuis, I think that server works without forking or multithreading, but I could be mistaken [16:06] cccaldas has joined the channel [16:07] ksheurs has joined the channel [16:08] ekryski has joined the channel [16:08] Fabryz: AHAHAHAHA the map is working now. Rendering at 5 FIVE fps, but it works. http://www.youtube.com/watch?v=P3ALwKeSEYs [16:09] DrMcKay: Fabryz: gz :) [16:09] langworthy has joined the channel [16:09] rmcastil has joined the channel [16:09] Glenjamin: There seems to be loads of node libs for doing http servers, but very few high level things for clients [16:10] Fabryz: now time for that type error [16:10] Fabryz: it's still there [16:10] tjholowaychuk: Glenjamin i plan on porting this to node http://visionmedia.github.com/superagent/ [16:11] mikeal has joined the channel [16:11] Glenjamin: tjholowaychuk: some place to put pre-processing of responses would be good, so you can drop in gzip support or similar [16:12] DrMcKay: Fabryz: that one with console.log? [16:12] Fabryz: yes [16:12] zomgbie has joined the channel [16:12] bosky101 has joined the channel [16:12] Poetro has joined the channel [16:13] guidocalvano has joined the channel [16:13] DrMcKay: I don't quite understand, why would it complain about str + str? [16:14] TheJH: bnoordhuis, ping [16:14] Fabryz: i'll git push the new changes and see that [16:16] butu5: I am getting failed to load tests in ./test error while running expresso in mac [16:16] butu5: same test working fine with ubuntu [16:16] caolanm has joined the channel [16:16] bosky101 has left the channel [16:16] butu5: https://github.com/butu5/node-hnstream/blob/master/test/hn.test.coffee [16:17] ronnieboy has joined the channel [16:17] dob_ has joined the channel [16:18] zanes has joined the channel [16:21] vikstrous has joined the channel [16:22] matyr has joined the channel [16:23] vikstrous_ has joined the channel [16:23] al3xnull_ has joined the channel [16:23] jtsnow_ has joined the channel [16:24] butu5: using expresso I am able to run the coffee script directly.... not after changing to .js file then only it seems to be working [16:24] butu5: anyone hv any experience here? [16:25] eignerchris has joined the channel [16:25] Fabryz: still have to try coffee script [16:26] thalll_ has joined the channel [16:26] nibblebot has joined the channel [16:26] matyr_ has joined the channel [16:27] mike5w3c has joined the channel [16:27] Sembiance: muhahaha! [16:27] spasquali has joined the channel [16:28] spasquali has left the channel [16:28] garrensmith has joined the channel [16:28] dnjaramba has joined the channel [16:29] dshaw_ has joined the channel [16:31] m14t has joined the channel [16:31] vikstrous has joined the channel [16:32] vidi has joined the channel [16:32] zomgbie has joined the channel [16:32] greg has joined the channel [16:32] vidi has joined the channel [16:34] TruPpp has joined the channel [16:34] dandean has joined the channel [16:34] TruPpp: hello guys, do you know an active channel here on freenode for cascading stylesheets? [16:35] sirdancealot has joined the channel [16:35] EyePulp: mmm… #css? [16:35] gkmngrgn has joined the channel [16:35] TruPpp: lol yes... my userlist didnt load [16:35] TruPpp: thank you [16:35] TruPpp: =) [16:36] patrickgamer1 has joined the channel [16:38] eee_c has joined the channel [16:38] teadict: "Since node is all about non-blocking I/O, functions generally return their results using callbacks. The convention used by the node core is to reserve the first parameter of any callback for an optional error object." <- who can give me example of this error object parameter reservation? (yes, I too read "nerd core") [16:38] BrianTheCoder has joined the channel [16:40] chjj: teadict: callback(null, 'hello world') [16:40] japj: teadict: do you mean for example http://nodejs.org/docs/v0.4.10/api/fs.html#fs.open "The callback gets two arguments (err, fd)." [16:40] chjj: teadict: or `callback(new Error('Fail'))` [16:41] teadict: mmm [16:41] teadict: thanks [16:42] matomesc has joined the channel [16:42] teadict: although I don't see the why in the big picture of it [16:42] teadict: I read why in that sentence I pasted.. [16:42] teadict: but I don't understand it fully [16:43] chjj: its the only way to do error handling asynchronously [16:43] teadict: oh, because how parameters work in JS [16:43] perezd has joined the channel [16:43] teadict: this way is safe [16:43] chjj: if you were to wrap a try/catch around an fs.readFile in node or something [16:43] chjj: it wouldnt work, because readFile is async [16:44] teadict: ach so.. [16:44] chjj: and your stack would be gone by the time readFile finishes executing [16:44] chjj: so the try/catch would be gone [16:44] chjj: the only way to handle errors is by passing an error to the callback [16:44] jbpros has joined the channel [16:44] DrMcKay: and things like GetLastError also don't make any sense [16:45] teadict: alright.. [16:46] chjj: i mean, the other option is just letting the async functions throw an error, but it would either drop your process, or get caught by your onUncaughtException handler [16:46] srid has joined the channel [16:46] srid has joined the channel [16:46] chjj: neither of which are very useful [16:47] chjj: the error that gets thrown in that async function is absolutely uncatchable from the outside [16:47] teadict: I'll finish understanding when I get some code read [16:47] teadict: right [16:47] chjj: the code inside that function would need to do the try/catch for you, and pass in an error if it needs to [16:48] chjj: youll get used to it [16:49] teadict: well, yes, I must... [16:49] teadict: I got this project approved with a 6-8 months development period and I chose node [16:49] DrMcKay: teadict: you will, believe me. I also use Tornado in my daily work and I can't imagine doing things fully synchronous now [16:50] teadict: DrMcKay: that's the goal [16:50] teadict: indeed [16:50] DrMcKay: teadict: very wise :). any details on this project? [16:50] bengrue has joined the channel [16:50] teadict: it's a company that does mechanical maintainance for industrial machinery such as for a refinery [16:51] chjj: teadict: if you want to see a module that might help your understanding, you could look at tim caswell's Step module [16:51] kevwil has joined the channel [16:51] chjj: https://github.com/creationix/step/blob/master/lib/step.js [16:51] teadict: the application core is a main process of tasks.. done to this machiniery [16:51] teadict: the tasks are concurrent and distributed over several computers around the facility [16:51] jetienne_ has joined the channel [16:51] DrMcKay: oh... your job seems to be cool :) [16:51] teadict: I really look forward to this app yes! [16:51] teadict: it sounds fun as hell [16:51] jspiros has joined the channel [16:51] maushu_ has joined the channel [16:51] teadict: more now that I realized node would be a perfect fit (right? :P) [16:52] teadict: chjj: noted [16:52] teadict: chjj: thanks :) [16:52] DrMcKay: it seems like your app is very event-driven, so, yes :) [16:52] teadict: DrMcKay: so you have a messaging system of course [16:52] teadict: yeah [16:54] teadict: I have concerns about if embracing node for this will delay some parts of the project... [16:54] teadict: but those are common I guess [16:54] DrMcKay: at the beginning, yes, don't worry [16:54] jhbot has joined the channel [16:54] DrMcKay: generally, asynchronous programming requires a bit different state of mind [16:54] seebees has left the channel [16:55] seebees has joined the channel [16:55] TheJH: so, coded the stackoverflow polling stuff, now it just needs testing... [16:55] teadict: well, yeah, I've been doing async js for some time now.. but you know? now there are servers... and requests... all handled async as well.. *-* [16:56] teadict: it'll be fun [16:56] Beldur has joined the channel [16:56] DrMcKay: teadict: cool to see that attitude :) [16:57] yumike has joined the channel [16:57] towski has joined the channel [16:57] teadict: ^_^ [16:57] DrMcKay: TheJH: would you mind putting it on GitHub? [16:58] smus has joined the channel [16:58] CrabDude has joined the channel [16:58] TheJH: DrMcKay, which part? A version from a few days or so is in a gist. The problem is that I couldn't yet figure out how to give my app running on nodester a config that's not in the repo [16:58] mc_greeny has joined the channel [16:59] mpavel has left the channel [16:59] zemanel has joined the channel [16:59] chjj: TheJH: are you optimizing startup time again? we need to get you in optimizers anonymous [16:59] nordicdyno has joined the channel [16:59] chjj: ;p [16:59] metamind: I just noticed that the new version of node_mailer is failing. how do I specify which one I want to use in the require statement [17:00] TheJH: chjj, "optimizers anonymous"? [17:00] DrMcKay: chjj: lol [17:00] chjj: just a joke [17:00] DrMcKay: oh, man, this reminds me of my old OS code [17:00] brianloveswords has joined the channel [17:00] TheJH: metamind, select the version with npm: `npm install whatever@x.y.z` should work [17:00] DrMcKay: I wrote memcpy using SSE, that was fast [17:01] zeade has joined the channel [17:01] metamind: Thanks TheJH [17:02] TheJH: I want somebody to post a node.js stackoverflow question - if nobody writes one in the next few minutes, I'll invent one myself :/ [17:02] ptlo: hi guys - would you know if there's already a web server log monitor service written in node that'd show realtime web logs (ie. new referers, number of pageviews, number of uniques)? i'm hacking a small app that does this (by parsing access.log as it comes), but if there's already a tool for that, don't want to NIH it [17:02] chjj: yeah i wish node were more popular on SO, the "javascript" tag is almost exclusively jquery questions [17:02] DrMcKay: TheJH: inventing questions is hard! [17:03] bluesmoon has joined the channel [17:03] TheJH: ptlo, access.log? as in apache? [17:03] ptlo: TheJH: apache, nginx, etc, yeah [17:03] dandean has joined the channel [17:03] TheJH: ptlo, you want to make node a slave of evil apache? [17:03] TheJH: :P [17:03] DrMcKay: ACTION checks IRC logs to find interesting problem [17:03] chjj: i dont think he means that [17:03] ptlo: i'm aware of log.io, but what i want is sort of realtime stats [17:03] TheJH: ptlo, I don't really know one [17:03] teadict: hey, apache is not evil [17:04] chjj: or maybe he does? [17:04] teadict: it just sucks with its threading [17:04] chjj: uhoh [17:04] dshaw_1 has joined the channel [17:04] chjj: another case of "node as a side-dish" [17:04] ptlo: TheJH: heh, i've got a hybrid setup, nginx in front, a couple of python apps, a couple of node ones, etc :) [17:04] chjj: as i like to call it [17:04] ptlo: and thinking of writing something a bit nicer-looking than tail -f /var/log/nginx/site.log | grep -v static [17:05] DrMcKay: TheJH: "How do I implement tab completion in node.js shell?" - is it fine? [17:05] daithi44 has joined the channel [17:05] aoberoi has joined the channel [17:05] simenbrekken: Is there a shorthand for this anywhere? console.log(util.inspect(results, false, 999)); [17:06] TheJH: DrMcKay, yes, just be sure to put node.js in the taglist [17:06] metamind: not sure what version I had installed before. how do i find out? [17:06] simenbrekken: going nuts having to spam it everywhere I have large data-sets to look at [17:06] DrMcKay: OK, give me a second [17:08] TheJH: simenbrekken, console.dir is not sufficient? [17:08] mnaser has joined the channel [17:08] bluesmoon: simenbrekken: what kind of stats are you looking to do? [17:09] patrickgamer1 has left the channel [17:09] jhurliman has joined the channel [17:09] bluesmoon: I wrote a fast-stats module that can analyse data as it streams in [17:09] simenbrekken: TheJH: there we go, thanks a bunch :) [17:10] DrMcKay: TheJH: posted [17:10] bluesmoon: but you could also write your logs to couchdb and use the changes API to stream it, or use zeromq to PUB it to an analysis module. [17:10] sweetd has joined the channel [17:10] robotmay has joined the channel [17:10] DrMcKay: http://stackoverflow.com/questions/7096772/how-do-i-implement-tab-completion-in-node-js-shell [17:10] simenbrekken: bluesmoon: basically I have a ton of data which I take snapshots of every hour, right now I'm just doing a mapReduce and reducing it into a collection key'ed by Date.now()/1000*60*60 but I was wondering if there's better approaches [17:11] TheJH: DrMcKay, give it a minute... [17:11] broofa has joined the channel [17:11] jhbot: http://stackoverflow.com/questions/7096772 How do I implement tab completion in node.js shell? [17:11] newy has joined the channel [17:11] TheJH: YAAAAAY!!!!!! [17:11] DrMcKay: oh, wow! :D [17:11] jadams_ has joined the channel [17:11] visnup: is there actually an easy way in the repl to get control after a callback? [17:11] TheJH: It is beink worky :) [17:12] visnup: like http.request(options, repl) [17:12] DrMcKay: TheJH: good job :) [17:12] TheJH: DrMcKay, thanks :) [17:12] jhbot: http://stackoverflow.com/questions/7096772 How do I implement tab completion in node.js shell? [17:12] visnup: and then have it resume when `repl` is caled? [17:12] TheJH: uhm... [17:12] DrMcKay: did you make him check for duplicates? [17:12] ryah: jhbot: take a look at lib/repl.js [17:12] bluesmoon: simenbrekken: then faststats should be good for you. I wrote it for something just like that. It looks like an array, you keep pushing data to it, once it grows larger than N items, you also start popping data from it [17:12] ryah: jhurliman: it's rather undocumented [17:13] TheJH: yes, but I know where I forgot it [17:13] TheJH: ryah, you just talked to my bot :D [17:13] simenbrekken: bluesmoon: I sort of need to aggregate all the data that's been collected so far, is it incremental? [17:13] DrMcKay: ryah: it's a bot [17:13] bluesmoon: at any point of time (eg, once a minute, once an hour) you can ask it for a snapshot of mean, median, percentiles, etc. [17:13] ryah: oh [17:13] ryah: silly me [17:13] bluesmoon: simenbrekken: yes, it's incremental [17:14] bluesmoon: to save memory you could use buckets, but you lose some accuracy at that point [17:14] TooTallNate has joined the channel [17:14] jetienne_ has joined the channel [17:14] bluesmoon: the version on github is a little further ahead of the one on npmjs.org [17:14] bluesmoon: simenbrekken: https://github.com/bluesmoon/node-faststats [17:15] simenbrekken: bluesmoon: "fast-stats is completely synchronous" shouldn't that be a ? :) [17:15] jhbot has joined the channel [17:15] TheJH: DrMcKay, fixed it :) [17:15] bluesmoon: nope :) [17:15] bluesmoon: you call it, and it returns a value [17:15] bluesmoon: no callbacks, no events [17:15] bluesmoon: because there's nothing to block on [17:15] simenbrekken: oh I see, sorry jumped the gun there [17:16] DrMcKay: TheJH: cool :). let's see how quality of answers rises :) [17:16] TheJH: :) [17:16] visnup: TheJH: I thought ryah was correcting it for later [17:16] pandeiro has joined the channel [17:17] TheJH: visnup, correcting what? [17:17] bluesmoon: simenbrekken: send me a github message if you have questions. I'm going offline now, back online in an hour or so. [17:17] simenbrekken: bluesmoon: alright, I'll check it out! [17:17] nordicdy_ has joined the channel [17:17] visnup: TheJH: like jhbot was answering me based on the keyword 'repl' and then you could tell it 'jhbot: xyz' to have it answer differently next time [17:18] simenbrekken: bluesmoon: I'm compiling stuff like this: https://gist.github.com/1152060 [17:18] TheJH: visnup, no, the only way you can store things and retrieve things as user is "!remember " and "!mem " [17:18] simenbrekken: bluesmoon: but I guess I can still do map reduce and have fast-stats compute the final results [17:18] towski has joined the channel [17:19] none_ has joined the channel [17:19] rhizmoe has joined the channel [17:20] bluesmoon: simenbrekken: depending on what you want out of your final data, you may or may not need fast-stats, and if you think there's just a single feature that you need, feel free to rip out the code and reuse it under the Apache 2.0 license ;) [17:20] DrMcKay: ACTION wonders if TheJH's bot can make us a coffee [17:21] TheJH: !@DrMcKay coffee compile console.log n for n in [0..10] [17:21] jhbot: DrMcKay, var n; for (n = 0; n <= 10; n++) { console.log(n); } [17:21] TheJH: :D [17:21] bluesmoon: going offline. ttyl [17:21] DrMcKay: wat. [17:21] TheJH: not coffee, but coffeescript :D [17:21] simenbrekken: bluesmoon: basically my first task is computing the growth rate of my data based on how much it grew during the current hour last week and computing a diff of that [17:21] DrMcKay: oh, lol :D [17:22] mehlah has joined the channel [17:22] visnup: TheJH: ah, cool. way more explicit. [17:23] aoberoi has joined the channel [17:24] augustl: simenbrekken: o/ [17:24] jspiros has joined the channel [17:24] simenbrekken: augustl: argh my nemesis! [17:24] bosky101 has joined the channel [17:26] technoweenie has joined the channel [17:26] TheJH: DrMcKay, you've got an answer :D [17:26] DrMcKay: TheJH, thank's for an answer :) [17:27] NetRoY has joined the channel [17:27] nibblebo_ has joined the channel [17:28] TheJH: hmm... crap. the http client library I'm using won't run on nodester. :/ [17:28] apipkin has joined the channel [17:29] apipkin: is there a specific room for socket.io help, or can i get help here? I'm getting an error when i try to start the app [17:29] TheJH: any other good free node hosters? [17:29] stonebranch has joined the channel [17:29] micheil: hmm.. no [17:29] DrMcKay: TheJH: not that I know of [17:29] micheil: not that I know of. [17:30] kevwil: what's a good resource for learning about Connect middleware? as in creating middleware, not using it ... [17:30] DrMcKay: TheJH, I got fed up with hostings and bought myself a VPS [17:30] tjholowaychuk: kevwil isnt much right now but looking at the middleware packaged with connect would be a good start [17:30] tjholowaychuk: it's literally just a function that takes (req,res,next) [17:31] tjholowaychuk: anything you do in there is up to you [17:31] teknopaul has left the channel [17:31] tjholowaychuk: and by convention you return a function to provide enclosed options foo(options) => Function [17:32] Fabryz: TheJH there's no.de [17:32] jspiros has joined the channel [17:32] Fabryz: and heroku [17:32] Fabryz: and bejes.us [17:32] TheJH: Fabryz, are they free? [17:33] kevwil: tjholowaychuk: I'm having worlds of trouble with callbacks not getting to the intended receiver, and with middleware ordering [17:33] Fabryz: and duostack [17:33] TheJH: Fabryz, as in "pay no money for a small, always running node bot" [17:33] tjholowaychuk: kevwil they just receive the request/response in the order that you use() them [17:33] kevwil: tjholowaychuk: I've been trying to step through with node-inspector, but ... the request flow still gets lost somewhere [17:33] spasquali has joined the channel [17:33] Fabryz: there was a free option, like nodester. I'm using that too atm [17:33] spasquali has left the channel [17:33] fatjonny: Fabryz: duostack was bought out by dotcloud [17:34] Fabryz: for no.de you need a coupon [17:34] kevwil: tjholowaychuk: do the callbacks go in reverse order? they seem somewhat random [17:35] CoinOpeBoy has joined the channel [17:35] tjholowaychuk: kevwil no, app.use(logger), app.use(bodyParser), app.use(session) [17:35] tjholowaychuk: logger -> bodyParser -> session [17:35] tjholowaychuk: you lay them out in the same way the request passes through [17:36] bnoordhuis: TheJH: pong [17:36] TheJH: bnoordhuis, I'm not an expert, but what do you think about that link I gave you? [17:36] yozgrahame has joined the channel [17:36] langworthy has joined the channel [17:36] apipkin: should you run node app.js as sudo? that's the only way i'm getting socket.io to have permissions [17:37] bnoordhuis: TheJH: i think that google code has issues again :/ [17:37] TheJH: bnoordhuis, ah, ok :( [17:37] bnoordhuis: TheJH: okay, works now [17:38] DrMcKay: apipkin: are you running server? [17:38] bnoordhuis: so... what's your point? [17:38] DrMcKay: apipkin: if yes, you need root privileges to open ports < 1024 [17:38] kevwil: tjholowaychuk: the req is working that way for me, but next() is hiding in a wormhole somewhere [17:39] tjholowaychuk: lol [17:39] apipkin: DrMcKay: i'm just running it locally on my mac. just playing around with it [17:39] kevwil: tjholowaychuk: I'm trying to write some in-house auth* that should happen before the connect-form req.form.complete callback, but req.form.complete never gets its callback [17:39] dnjaramba has joined the channel [17:39] tjholowaychuk: kevwil that's because you're losing "data" events [17:39] DrMcKay: apipkin: so you are running server. use ports higher then 1024, like 8080 [17:39] spasquali has joined the channel [17:39] tjholowaychuk: look at what session() does during the async calls [17:40] spasquali has left the channel [17:40] zpao_ has joined the channel [17:40] tjholowaychuk: you need to essentially buffer/pause that incoming data otherwise it's lost in limbo [17:40] apipkin: DrMcKay: so in app.listen() use a different port number? [17:40] DrMcKay: yes [17:40] TheJH: bnoordhuis, as far as I can remember, that server is asynchronous, and it sems to be able to do it... you said that it would be blocking [17:40] apipkin: cool thanks :) [17:40] TheJH: bnoordhuis, but maybe I'm wrong about that. I fit sounds weird or wrong, forget it :D [17:41] TheJH: *If it [17:41] brolin has joined the channel [17:41] apipkin: works like a charm :) [17:41] StanlySoManly has joined the channel [17:41] TheJH: how long does it take to receive a Joyent SmartMachine Coupon Code? [17:42] Fabryz: I waited like a week, but that was months ago [17:42] bosky101 has left the channel [17:42] StanlySoManly: TheJH: a little while back it used to be a manual process that they batched. [17:43] kevwil: tjholowaychuk: ok, I'll check that out ... still confused why the connect-form example doesn't worry about 'data' events but I need to? [17:43] spasquali has joined the channel [17:43] Fabryz: wish I could attach a github repo to joyent server, I messed too many times pushing there [17:43] spasquali has left the channel [17:43] tjholowaychuk: kevwil: because while your code is off doing async things the "data" events are still emitting, connect-form is just not listening because it hasn't been hit yet [17:44] tjholowaychuk: a better thing to do [17:44] alex__ has joined the channel [17:44] tjholowaychuk: more complex but better, would be to have connect-form as two middleware [17:45] tjholowaychuk: one use()d early on to start parsing as the rest of the middleware do their thing [17:45] bnoordhuis: TheJH: it's a broad subject but search the lkml for sendfile or asynchronous file i/o related posts [17:45] kevwil: tjholowaychuk: ahhh ... yeah that's starting to make sense [17:45] tjholowaychuk: and one before the router to postpone executing the routes until it's done [17:45] tjholowaychuk: or just hit the route but the route would have to work with the streaming data [17:45] bnoordhuis: TheJH: in short, async file i/o is a mess and sendfile is limited [17:45] hlindset_ has joined the channel [17:46] TheJH: bnoordhuis, hmm, ok... so it isn't as easy as I thought :( [17:46] dgathright has joined the channel [17:46] robotmay has joined the channel [17:46] bluesmoon has joined the channel [17:47] kmiyashiro has joined the channel [17:48] jerrysv has joined the channel [17:48] kevwil: tjholowaychuk: thanks! I'll go check this out and see if I can find the inner peace I seek. [17:49] bluesmoon: ACTION is back online [17:49] spasquali has joined the channel [17:49] tjholowaychuk: kevwil https://github.com/visionmedia/connect-form/issues/19 [17:50] mikeal has joined the channel [17:50] riven has joined the channel [17:50] simenbrekken: tjholowaychuk: would be cool if one could overwrite the storage part as well, e.g storing incoming files in a db or similar [17:50] tjholowaychuk: simenbrekken not sure if formidable lets you do that [17:50] tjholowaychuk: i dont think so [17:50] simenbrekken: tjholowaychuk: it sort of does via onPart but it's very messy. [17:51] tjholowaychuk: iirc it'll buffer to disk regardless [17:52] simenbrekken: not if you overwrite onPart, you'll just get a reference to the part do do on('data/end') but the multipart decoding is mashed in there so there's no real easy way no [17:52] simenbrekken: do do/to do* [17:53] simenbrekken: Anyone know an efficient way of merging two structurally identical objects? I'd like to compute the numerical difference of numerous properties in various levels of an object [17:53] vns has joined the channel [17:57] jspiros has joined the channel [17:57] AvianFlu has joined the channel [17:58] vns has joined the channel [18:00] ronniebo_ has joined the channel [18:00] mjr_ has joined the channel [18:02] jspiros has joined the channel [18:02] markdaws has joined the channel [18:02] liquidproof has joined the channel [18:03] ronnieboy has joined the channel [18:03] dshaw_ has joined the channel [18:04] markdaws: hi - http.request seems to use a connection pool below the hood (I think), is there some way to set the max number of simultaneous connections? Thanks [18:04] heavysixer has joined the channel [18:07] riven has joined the channel [18:08] nibblebot has joined the channel [18:09] Sazpaimon_ has joined the channel [18:09] CIA-65: libuv: 03Ryan Dahl 07multiplicity2 * r3461acc 10/ (35 files in 3 dirs): multiplicity unix attempt 2 - http://bit.ly/oCRKv7 [18:09] TheJH: markdaws, http.globalAgent.maxSockets, i think [18:09] Sazpaimon_ has joined the channel [18:10] Destos has joined the channel [18:12] apipkin has left the channel [18:12] mehtryx has left the channel [18:12] alek_br has joined the channel [18:13] tomtomaso has joined the channel [18:13] `3rdEden has joined the channel [18:14] cronopio has joined the channel [18:15] mehtryx has joined the channel [18:15] mehtryx has left the channel [18:15] McMAGIC--Copy has joined the channel [18:16] Vertice has joined the channel [18:17] bluesmoon: simenbrekken: I think you could use the node module of yui to merge objects. [18:17] kraft has joined the channel [18:18] reid has joined the channel [18:18] davro has joined the channel [18:19] Margle has joined the channel [18:20] bluesmoon: i think either YUI.merge or YUI.mix would work. davglass would know for sure [18:20] jspiros has joined the channel [18:22] euforic has joined the channel [18:22] whitman has joined the channel [18:22] ohtogo has joined the channel [18:22] blup has joined the channel [18:22] heavysixer has joined the channel [18:23] euforic: What is the best way to tunnel in to a server for mysql access with node ? [18:24] vns_ has joined the channel [18:25] eboyjr has joined the channel [18:25] nibblebo_ has joined the channel [18:25] TomY has joined the channel [18:25] vns has joined the channel [18:26] charleyd has joined the channel [18:26] edude03 has joined the channel [18:26] losing has joined the channel [18:26] jelveh has joined the channel [18:27] Margle: euforic: tunnel? [18:27] dans has joined the channel [18:28] euforic: like i need to ssh in to the server before i can access the mysql db sorry [18:29] smus_ has joined the channel [18:29] shinuza has joined the channel [18:29] zilch has joined the channel [18:29] hlindset has joined the channel [18:29] hlindset has joined the channel [18:30] murvin has joined the channel [18:32] Margle: euforic: and you want an api that does that in node? [18:33] euforic: yes or an idea on how to go about it [18:33] Margle: euforic: can't you just tunnel on the box itsefl? [18:33] Nuck has joined the channel [18:34] euforic: yeah I was looking for a more contained method but i could just implement a bash script to start node though I guess [18:35] Margle: euforic: you could call the command's from node. [18:36] dgathright_ has joined the channel [18:36] mcluskydodallas has joined the channel [18:36] Margle: euforic: http://nodejs.org/docs/latest/api/child_processes.html [18:37] aelien27 has joined the channel [18:37] euforic: awesome thanks Margie [18:37] euforic: Margie [18:37] euforic: Margle [18:37] euforic: sorry looked like an i haha [18:37] Margle: euforic: :) [18:38] Margle: euforic: also, check this out: https://github.com/FlashFan/NodeSSH [18:38] mcluskydodallas has joined the channel [18:39] Dreamer3 has joined the channel [18:39] CIA-65: node: 03Ben Noordhuis 07master * rd72c694 10/ benchmark/http_simple.js : bench: make http_simple send chunked encoding if requested - http://bit.ly/rs9zvR [18:40] vns has joined the channel [18:40] mcluskydodallas has joined the channel [18:41] jbrokc has joined the channel [18:42] shipit has joined the channel [18:42] pickels has joined the channel [18:43] ryanfitz_ has joined the channel [18:43] fcambus has joined the channel [18:43] samir has joined the channel [18:43] Wa has joined the channel [18:45] matyr has joined the channel [18:45] teadict: what was that? is there a bot announcing comits to the master branch? [18:45] teadict: are you serious? hah [18:45] dans has joined the channel [18:45] teadict: that is awesome [18:46] colinclark has joined the channel [18:46] teadict: think of how dynamic it makes it for the open source paradigm.. anyone with time in that particular moment can review the commit! [18:46] teadict: between the 500 people in here [18:46] teadict: nice [18:48] koo5 has joined the channel [18:48] dreamdust has joined the channel [18:48] DrMcKay: teadict: I like this bot as well [18:49] mjr__ has joined the channel [18:49] teadict: DrMcKay: :) [18:50] Renegade001 has joined the channel [18:50] jhbot has joined the channel [18:52] zastaph has joined the channel [18:53] coffeecup_ has joined the channel [18:54] tilgovi has joined the channel [18:54] stbuehler has joined the channel [18:54] tilgovi has joined the channel [18:54] stbuehler has joined the channel [18:55] nail_ has joined the channel [18:55] guybrush has joined the channel [18:55] mrtazz has joined the channel [18:55] tomtomaso has joined the channel [18:56] mehtryx has joined the channel [18:56] bluesmoon: euforic: you can just configure ssh to forward port 3306 and then connect to local port 3306 [18:56] fdenbow has joined the channel [18:57] euforic: yeah but we are working on restricting access due to sensitive data [18:57] euforic: I personally want to go with mongodb but there db is about 130 tables of mess so we have no choice [18:58] teadict: you mean their? [18:58] euforic: this is just mainly for accessing via a bootleg desktop app I made with titanium appcelerator [18:58] mokane has joined the channel [18:58] euforic: yes sorry I'm on lion so it does my auto correcting [18:58] teadict: heh [18:58] Drakonite has joined the channel [18:59] jetienne_ has joined the channel [18:59] softdrink: yayyyy published my first npm module… *feels special* [19:00] DrMcKay: softdrink: congratulations :). what is it? [19:00] softdrink: a lib that creates repeatable random information [19:00] Leonidas has joined the channel [19:00] brianloveswords has joined the channel [19:01] softdrink: http://search.npmjs.org/#/Nonsense [19:01] teadict: wait.. [19:01] ckknight has joined the channel [19:01] arthurdebert has joined the channel [19:01] teadict: repetable random? [19:01] softdrink: for a given seed, the same randomness will be produced [19:01] teadict: oh you name it nonsense.. then it's okey? [19:01] softdrink: since Math.random() can't be seeded :( [19:01] necromancer: oh yeah..that makes sense [19:02] softdrink: var ns = new Nonsense(234234); ns.words(3); [19:02] necromancer: in a lot of languages you can just do rand() [19:02] DrMcKay: softdrink: may get useful sometimes :) [19:02] AvianFlu: do Math.floor(Math.random() * 17) [19:02] teadict: oh I see what you did there [19:02] AvianFlu: or whatever [19:02] necromancer: that's cool teadict, does it do sentences & paragraphs too? [19:03] necromancer: err not teadict [19:03] necromancer: softdrink [19:03] teadict: tea is a softdrink [19:03] DrMcKay: :D [19:03] Wizek has joined the channel [19:03] zilch has joined the channel [19:03] softdrink: different kinds of numbers, lipsum words/sentences, timestamps, first/last names, guids, buzzphrases [19:04] softdrink: still a work-in-progress... [19:04] unlink has joined the channel [19:04] unlink has joined the channel [19:05] nibblebot has joined the channel [19:05] DrMcKay: softdrink: so, you say that you've coded a copy-writer? [19:05] softdrink: lol [19:05] EyePulp has joined the channel [19:05] teadict: what lacks support in node? [19:06] teadict: like I looked at NodeSSH just now.. so ssh has support.. [19:06] TheJH: teadict, you didn't look close enough [19:06] teadict: what other resourecs of that kind lack it? [19:06] mcluskyd_ has joined the channel [19:06] teadict: TheJH: you saying the module sucks? [19:07] TheJH: teadict, I think SubStack said it doesn't work... /cc SubStack [19:07] teadict: "/cc"? [19:07] AphelionZ has joined the channel [19:07] AphelionZ: QUick question for everybody - what's the best way to do a curl type call with node? [19:07] AphelionZ: I'm querying the twitter api [19:07] creationix has joined the channel [19:08] guidocalvano has joined the channel [19:08] TheJH: AphelionZ, uhm, mikeals request or so? [19:08] DrMcKay: AphelionZ: http and https modules [19:08] TheJH: teadict, I tell him to look at our conversation... in case he's here [19:08] teadict: what does cc stand for? [19:09] AphelionZ: DrMcKay: cool, sounds easy enough [19:09] teadict: come closer? [19:09] DrMcKay: teadict: Carbon Copy [19:09] teadict: right [19:09] teadict: well, anywho, back to main question, what things lack support? [19:09] creationix has left the channel [19:09] DrMcKay: teadict: you mean, like, what features need some love? [19:10] teadict: that's another way of putting it [19:10] teadict: since I guess everything has support but maybe some are very immature [19:11] teadict: I'm trying to make a list of what things I can forget about and stop worrying for this app I'll be doing.. [19:11] teadict: like I know databases have modules, mysql for example [19:11] ph^ has joined the channel [19:11] teadict: I know file uploading has nice support.. due to those dudes [19:11] sylvinus has joined the channel [19:12] teadict: you know, stupid worries consequence of comparing node to current already set up libraries for the server [19:12] airportyh has joined the channel [19:12] DrMcKay: teadict: it's hard to say, we would probably need to compare with more mature language like Python [19:13] teadict: I guess looking at the modules list will clear my doubts [19:13] teadict: ACTION browses [19:13] DrMcKay: native GUI support [19:13] teadict: lawl [19:13] teadict: that's on the making? [19:14] DrMcKay: well, some guys tried (we discussed it earlier today) [19:14] pt_tr has joined the channel [19:14] DrMcKay: do you want some links? [19:14] teadict: what about Gnome3? [19:14] reid has joined the channel [19:14] teadict: DrMcKay: nah, I'm good [19:15] DrMcKay: GNOME3 uses JS, but not node [19:15] DrMcKay: (they are stopping us from dominating the world) [19:16] teadict: but couldn't their work be adapted or learnt from some how, I'm just shouting sillyness [19:16] teadict: lawl [19:16] dob_ has joined the channel [19:16] stepheneb has joined the channel [19:16] DrMcKay: teadict: I don't know yet [19:17] DrMcKay: this would be useful: https://launchpad.net/adisp [19:17] tomtomaso has joined the channel [19:17] stonebranch has joined the channel [19:17] JasonSmith has joined the channel [19:17] DrMcKay: it lets you to use asynchronous callback in similar way you would write synchronous code [19:18] DrMcKay: oh, JS supports generators... [19:19] alex__: what version of npm works with node 5+? [19:19] DrMcKay: teadict: better explanation of adisp: http://truemped.github.com/tornadotools/adisp.html [19:19] teadict: well, I guess I'll have no needs that don't get met [19:20] neilk_ has joined the channel [19:20] DrMcKay: alex__: use the newest one, 1.0.25 [19:20] alex__: i keep geting a non-compatible error when trying to install express [19:20] mjr__ has joined the channel [19:20] alex__: (i hv 1.0.25 [19:20] alex__: ) [19:21] DrMcKay: which node version? [19:21] alex__: v0.5.0 [19:21] jerrysv: alex__ are you on windows? [19:21] DrMcKay: express seems to support only < 0.5.0 [19:21] alex__: well, it's ubuntu. it's an ec2 ami [19:22] tjholowaychuk: alex__ why are you using 0.5.x [19:22] fly-away has joined the channel [19:22] AvianFlu: 0.5.x is unstable, use 0.4.10 unless you want to be doing testing [19:22] tjholowaychuk: yeah unless you're on windows or just want to mess around use 0.4.x [19:22] NARKOZ has joined the channel [19:22] ckknight has joined the channel [19:23] CoinOpeBoy has joined the channel [19:23] jspiros has joined the channel [19:23] alex__: i just went back a few versions (and overlooked that "<" is not "<="). the error said Required: {"node":">= 0.4.1 < 0.5.0"} [19:24] DrMcKay: which version you habe now? [19:24] DrMcKay: *have [19:24] alex__: i had been running 0.5.5-pre [19:25] alex__: Sorry... so i was running 0.5.5-pre, and express@2.4.4 needed between 4.1 and 0.5.0. so i went back to .5.0. [19:25] stisti has joined the channel [19:26] AvianFlu: alex__: yeah, that's a <, it needs to be less than 0.5.0, i.e. 0.4.x [19:26] blissdev has joined the channel [19:26] dscape has joined the channel [19:26] alex__: so i don't get why the latest npm (1.0.25) won't work with the latest version of node (0.5.5-pre) [19:26] indexzero has joined the channel [19:26] ryan0x2 has joined the channel [19:26] tjholowaychuk: alex__ 0.5.x is unstable [19:26] tjholowaychuk: aka dont use it [19:26] context: cause 0.5.5-pre is NOT the latest version of node [19:27] context: thus the -pre [19:27] rmcastil has joined the channel [19:27] alex__: ok. so if i'm just starting with node, do you suggest 0.4.10? [19:27] tjholowaychuk: we need something more obvious lol [19:27] dob_ has joined the channel [19:27] tjholowaychuk: 0.5.3-UNSTABLE [19:27] cdepauw has joined the channel [19:27] NARKOZ has left the channel [19:27] tjholowaychuk: 0.5.3-dontuseme [19:28] tjholowaychuk: 0.5.3-dontuseme-unless-you-are-testing-or-on-windows [19:28] tom-tomaso has joined the channel [19:28] DrMcKay: or 0.5.3-UNSTABLE-HERE-BE-DRAGONS-NO-SERIOUSLY-THINK-OF-KITTENS maybe? [19:28] cdepauw: what would be the best way to remove 'file*.js' with node? [19:28] cdepauw: using exec? [19:29] krh: here be kittens [19:29] tjholowaychuk: cdepauw readdir/regexp/fs.unlink [19:29] bnoordhuis: cdepauw: fs.unlink() [19:29] cdepauw: thanks [19:29] bnoordhuis: oh wildcards [19:29] cdepauw: unlink breaks on wildcard [19:29] tjholowaychuk: readdir/regexp/fs.unlink [19:30] tjholowaychuk: once you have the list from readdir you can filter them however you like [19:30] cdepauw: ok i'll do that [19:30] cdepauw: ok [19:30] tjholowaychuk: i think isaac wrote some globbing thing a while back [19:30] tjholowaychuk: not sure [19:30] ckknight has joined the channel [19:30] brianloveswords has joined the channel [19:31] slifty has joined the channel [19:32] jerrysv: tjholowaychuk: he did - https://github.com/isaacs/node-glob [19:32] DrMcKay: tjholowaychuk: he did https://github.com/isaacs/node-glob [19:32] tjholowaychuk: cdepauw ^ [19:33] jerrysv: ^ ^ [19:33] jerrysv: or, npm install glob [19:33] sirdancealot has joined the channel [19:34] cdepauw: tjholowaychuk: thanks [19:34] zilch has joined the channel [19:35] FuzzYspo0N has joined the channel [19:35] jspiros has joined the channel [19:35] indexzero has joined the channel [19:37] DrMcKay: aw, come on, we're stuck on 1002 forks, just 22 to go ;) [19:38] rmcastil has joined the channel [19:38] liar has joined the channel [19:39] teadict: what happens on 1024? [19:39] DrMcKay: anniversary ;) [19:39] ParadoxQuine has joined the channel [19:39] teadict: hehe [19:39] zilch has joined the channel [19:40] jamesd: is it possible to do non buffering output in child_process.exec [19:40] nibblebo_ has joined the channel [19:41] ckknight has joined the channel [19:42] mscdex: jamesd: what child process are you having an issue with? [19:43] matomesc has joined the channel [19:43] beawesomeinstead has joined the channel [19:43] indutny has joined the channel [19:43] AvianFlu: jamesd: use child_process.spawn and use the stdout and stderr streams [19:44] jamesd: AvianFlu, okay thanks..... try to write a simple web page that just displays tail -f /var/log/messages [19:45] bradleymeck: good ole tail, not as simple as one might think [19:46] patcito has joined the channel [19:46] AvianFlu: you honestly might have better luck making an fs.ReadStream to /var/log/messages [19:46] dgathright_ has joined the channel [19:46] AvianFlu: you can specify start and end points in the file [19:46] beawesomeinstead has joined the channel [19:47] mscdex: yeah [19:47] Raynos: I'm using mikael's request. [19:47] Raynos: And the body is an empty string (the error is null). What does this mean? [19:47] mscdex: i don't think there's currently an unbuffered setting for tail [19:47] Raynos: Did the HTTP request come back with an empty body? [19:47] bradleymeck: Raynos that what it sounds like [19:47] zilch has joined the channel [19:48] Raynos: Gah. Why would it do that. [19:48] Raynos: Its useless [19:49] daleharvey has joined the channel [19:49] ckknight has joined the channel [19:49] parshap has joined the channel [19:50] dreamdust has joined the channel [19:51] AvianFlu: I mean, what are you requesting? [19:52] mehlah has joined the channel [19:52] Raynos: ugh it's a problem with the json flag [19:52] Raynos: The json input is fine [19:52] Raynos: it's just that request's internal json parsing must be screwing up somewhere [19:53] Raynos: OS node modules, why don't you work out of the box without bugs [19:54] mscdex: ? [19:54] mscdex: what module? [19:54] mscdex: request? [19:54] arnee has joined the channel [19:55] JKarsrud has joined the channel [19:55] indutny has joined the channel [19:56] voodootikigod: what is the recommended way to load a javascript (non module) file into the current context? [19:56] JacobSingh has joined the channel [19:56] DrMcKay: voodootikigod: you mean, without exports, etc.? [19:56] jj0hns0n has joined the channel [19:57] voodootikigod: currently doing: eval(require("fs").readFileSync("../nonmodule.js")); [19:57] voodootikigod: yea [19:57] voodootikigod: without exports [19:57] edude03 has joined the channel [19:57] voodootikigod: cause I am concatenating "nonmodule.js" with other files to produce a client side bundle [19:57] mscdex: voodootikigod: vm.runInThisContext? [19:57] voodootikigod: still reading off file system [19:57] stride: ACTION shivers [19:57] voodootikigod: and isn't that just veal under covers [19:57] voodootikigod: err [19:58] voodootikigod: veal == eval to lion [19:58] voodootikigod: sorry [19:58] mscdex: heh [19:58] mscdex: no [19:58] AvianFlu: voodootikigod: save yourself trouble and use browserify [19:58] AvianFlu: !npm search browserify [19:58] AvianFlu: bah, bot's down [19:58] voodootikigod: AvianFlu: thanks, but that doesn't help with what I am doing [19:58] DrMcKay: AvianFlu: jhbot left [19:59] voodootikigod: i am wrapping backbone models with a new base that connects up the SQL components at the higher prototype [19:59] teadict: so you are making a application... you have a bunch of servers serving different stuff, like web pages, uploading files, etc.. but interface to your web app is only the http port 80.. how do you call the appropiate server when you need to do what that servers does in any given part of the web app? [19:59] voodootikigod: so it can be swapped on load depending on where loaded [19:59] teadict: diffrente servers will be listenning different ports, right? [19:59] teadict: what? you use nginx to redirect or what? I don't get that part [20:00] mscdex: teadict: there's node-http-proxy [20:00] teadict: mscdex: oh, and how would it work? [20:00] mscdex: teadict: a connection comes in and you proxy it to some other server [20:00] dob_ has joined the channel [20:00] teadict: I'm asking about the default way of structuring a app, i'm not being fancy or anything [20:00] teadict: I see [20:00] Raynos: mscdex: most modules I try. [20:01] mscdex: Raynos: well, that can vary. there are node modules that have been pretty much abandoned [20:02] teadict: mscdex: so you basically do: nginx:80 > node-http-proxy:80 > whichever internal server in whichever port depending on the route requested ? [20:02] mscdex: Raynos: or at least the main repo has, while forks continue to work on it [20:02] mscdex: teadict: you're better off putting node-http-proxy in front imho [20:02] AvianFlu: teadict: I agree: you don't need nginx [20:02] TheJH: AvianFlu, bot is only shortly down (until I got it on nodejitsu) [20:02] mscdex: teadict: especially if you care about things like http 1.1 and websockets [20:03] teadict: I don't understand, no web server? [20:03] amiller has joined the channel [20:03] jhbot has joined the channel [20:03] AvianFlu: no web server [20:03] teadict: just v8, running node http's proxy? [20:03] AvianFlu: and your other services listening for the proxied connections [20:03] teadict: is that okey for production too? [20:03] mscdex: teadict: you don't need nginx unless you're still serving files with it [20:03] AvianFlu: node's HTTP lib is just that cool. [20:03] teadict: mscdex: well, it'll be a full production application... [20:04] mscdex: teadict: in which case, it's just: node-http-proxy:80 > nginx:80 / internal server [20:04] AvianFlu: blog.nodejitsu.com and nodejitsu.com run node-http-proxy in front [20:04] teadict: oh [20:04] mscdex: well, i mean nginx would listen on a different port obviously, but you get the idea [20:04] AvianFlu: our whole stack is node top to bottom, except for the OSes and the bits that are C++ [20:04] teadict: depending on the logic for the request, you proxy to nginx if you need to server some static content or to any other internal server.. [20:05] mscdex: teadict: right, but you could serve static content with node also [20:05] teadict: I was waiting for you to say that lol [20:05] mscdex: :-) [20:05] mscdex: teadict: have you seen express? [20:05] teadict: but that worries me a bit.. [20:05] teadict: (yes) [20:05] AvianFlu: http://github.com/nodejitsu/http-server for static content too [20:05] teadict: see, it's a big client this one.. [20:05] ryanfitz has joined the channel [20:05] yozgrahame has joined the channel [20:05] mscdex: express has a static file middleware [20:05] teadict: I don't want too much risks (that how I see everything from now on because I'm new to node) [20:05] teadict: sorry about that [20:06] teadict: so the question is ... [20:06] teadict: not using nginx is the proper way to do this? [20:06] mscdex: teadict: at least not in front [20:07] teadict: wow, this will be a whole different platform [20:07] zilch has joined the channel [20:07] teadict: no web server overlording everything that comes and goes.. [20:07] teadict: but anyway, everything still gets in to the server through 80.. [20:08] mscdex: teadict: it's a common scenario, especially when you do load balancing and such [20:08] teadict: only difference is that you put the proxy in that door [20:08] mscdex: teadict: yes [20:08] teadict: mscdex: yeah, well, thing is I'm just a web(mainly) developer [20:09] teadict: so some things, like 15 different servers all separated, kind of moves my boat for now [20:09] teadict: *shakes [20:09] teadict: but I'm getting there.. [20:09] fangel has joined the channel [20:11] teadict: okey, I read the node-http-proxy's doc on hub [20:11] teadict: I understand [20:11] teadict: looks strong enough to calm me down :P [20:12] AvianFlu: teadict: node-http-proxy supports connect-style middlewares, now, too [20:12] tjholowaychuk: AvianFlu how does it perform for websockets? [20:12] maqr has joined the channel [20:12] teadict: AvianFlu: meanning? [20:12] tjholowaychuk: i was playing with it for vhost type stuff [20:12] tjholowaychuk: and it doesnt matter for these sites [20:12] tjholowaychuk: but [20:12] AvianFlu: I'm told it's gangster at proxying websockets, tj, but I don't have any data on that for you [20:12] tjholowaychuk: i was getting maybe %15 of what I get without it [20:13] teadict: mscdex: sidequestion if you don't mind: how was all done before this proxy? [20:13] apipkin has joined the channel [20:13] tjholowaychuk: ~3k rps vs ~17k [20:13] tjholowaychuk: (http not ws) [20:13] jvduf has joined the channel [20:13] apipkin: where can i put files so they are available like css? [20:13] AvianFlu: so you're saying the routing table slowed it down, tj? [20:14] apipkin: i tried a directory next to app.js called "css" but that just brings me back to the root [20:14] killfill: what was that cool node app, that compress/uncompress js files? [20:14] killfill: ugly-something? [20:14] FuzzYspo0N has joined the channel [20:14] tjholowaychuk: AvianFlu didn't look into it much, just did a quick ab run with[out] it [20:15] gkatsev: I'm getting an error "process.nextTick error, or 'error' event on first tick" and it's pointing at a line that isn't in my file while showing the last line in the file. The script just randomly stopped working. Any ideas on how to track down the problem? [20:15] tjholowaychuk: wanted to avoid nginx due to the whole http 1.0 thing [20:15] AvianFlu: yeah, that routing table is contributed code [20:16] AvianFlu: i.e. it came from a pull request [20:16] AvianFlu: might be worth some looking into [20:16] teadict: mscdex: how does express work? (related to proxying stuff) now that I think of it [20:16] lukegalea: killfill: uglifyjs [20:16] tjholowaychuk: teadict it doesnt deal with that [20:16] lukegalea: https://github.com/mishoo/UglifyJS [20:16] zilch has joined the channel [20:16] killfill: aah greate! [20:16] tjholowaychuk: you're on your own to implement a reverse proxy if you need it etc [20:17] teadict: tjholowaychuk: so it's based on one single http server? and does whatever according to route? [20:17] tjholowaychuk: yeah [20:17] teadict: I see.. [20:17] teadict: that's probably a more for-me solution maybe [20:17] teadict: nginx:80 > express > stuff [20:18] tjholowaychuk: it would be awkward to enforce some kind of proxy thing in express [20:18] tjholowaychuk: yeah exactly [20:18] tjholowaychuk: or node-http-proxy > express > stuff [20:18] tjholowaychuk: whatever works [20:18] teadict: but what needs could I not suffice with that? [20:18] teadict: oh [20:18] aheckmann has joined the channel [20:18] teadict: that way I prevent problems [20:18] tjholowaychuk: or if you are hosting just one [20:18] tjholowaychuk: cluster > express [20:18] topaxi has joined the channel [20:18] teadict: it'll be a one server, 25 clients webapp [20:18] tjholowaychuk: ah [20:19] tjholowaychuk: yeah better of with a proxy then [20:19] teadict: mostly administrative.. but with lots of messaging between clients [20:19] tjholowaychuk: or proxy > cluster > express [20:19] tjholowaychuk: haha [20:19] tjholowaychuk: but that could be a lot of processes [20:19] teadict: so node-http-proxy > (express > stuff) / other internal servers for doing other specific stuff [20:20] teadict: nginx if I want for serving static content [20:20] teadict: that's a normal structure? [20:20] tjholowaychuk: well you can serve statics with node [20:20] teadict: I will be okey with it? me so scared [20:20] DrMcKay: TheJH: ping? [20:20] teadict: tjholowaychuk: yes [20:20] apipkin has left the channel [20:20] tjholowaychuk: which should be fine if you're hosting that many apps i assume performance is not priority [20:20] tjholowaychuk: so skip nginx in that case i suppose [20:20] teadict: tjholowaychuk: and after taking away the fear of noobness, I will probably will ditch nginx.. [20:21] teadict: tjholowaychuk: but let's go simple frst :P [20:21] tjholowaychuk: haha yeah sure [20:21] teadict: why do you say "many apps"? [20:21] teadict: you mean many proxyations? [20:21] tjholowaychuk: you said you have ~25 [20:21] teadict: 25 clients for this server.. [20:21] CIA-65: node: 03Ryan Dahl 07v0.4 * r9cd5108 10/ lib/http.js : Fixes #1546. Remove expensive debug call. - http://bit.ly/nlxZfz [20:21] teadict: 25 pcs distributed across a facility [20:21] teadict: didn't mean servers [20:21] teadict: serving diff stuff [20:23] teadict: what? Ryan commits and the channels comes to a full stop? hehe [20:23] mcluskydodallas has joined the channel [20:25] gazumps has joined the channel [20:25] MUILTFN has joined the channel [20:25] tim_smart has joined the channel [20:26] TheJH: DrMcKay, pong [20:26] gkatsev: everyone is off to check out the commit, or something ^͜^ [20:26] teadict: guessed so [20:26] zilch has joined the channel [20:27] gkatsev: ugh, so frustrating. [20:27] killfill: :S uglifycss doesnt have a -b switch to butify :S [20:27] tmslnz has joined the channel [20:27] bnoordhuis: that commit speeds up the http_simple with 10-15%! [20:27] gkatsev: one minute my script works, the next it's giving me an error [20:27] hellp has joined the channel [20:27] jesusabdullah: butify? [20:27] gkatsev: and pointing to a line that doesn't exist in my script [20:27] bnoordhuis: the http_simple bench, for context [20:27] killfill: beautify.. (sorry me english is bad.. :P) [20:27] killfill: like butter.. :P [20:27] fumanchu182 has joined the channel [20:28] gkatsev: butify. Makes everything butter (like better but butter). [20:28] mscdex: nothing says butter better [20:28] CIA-65: node: 03Ryan Dahl 07master * r9cd5108 10/ lib/http.js : Fixes #1546. Remove expensive debug call. - http://bit.ly/nlxZfz [20:28] CIA-65: node: 03Ryan Dahl 07master * r8320af7 10/ (4 files in 2 dirs): [20:28] CIA-65: node: Merge remote branch 'origin/v0.4' [20:28] CIA-65: node: Conflicts: [20:28] CIA-65: node: doc/api/tls.markdown - http://bit.ly/re9WEV [20:30] zilch has joined the channel [20:30] mikeal has joined the channel [20:30] teadict: tjholowaychuk: this is a big change for me indeed [20:31] apipkin has joined the channel [20:31] wbw72 has joined the channel [20:31] apipkin: i think i should just stay in the room... [20:31] bartmax has joined the channel [20:31] isaacs has joined the channel [20:31] ekryski: teadict: if you only have 25 computers hitting your server at a modest rate you probably don't need all the nginx jazz. Express can handle that no problem [20:32] teadict: ekryski: yeah [20:32] isaacs: When I read things like this it just makes me so happy to be in the node community: http://mattt.me/2011/08/empathy-and-open-source [20:32] AvianFlu: YES. [20:32] apipkin: i'm trying to create a new express app. when i run `npm install express`, the page says it will add it to ./node_modules, but that is not happening. am i doing something wrong? [20:32] AvianFlu: having never written a line of ruby in my life, isaacs, stuff like that makes me lulz super hard. [20:32] guillermo has joined the channel [20:32] isaacs: if nave, nvm, and n can all live in the same universe, and tj and me and tim can all be friendly, wtf. [20:32] sivy has joined the channel [20:33] isaacs: why isn't there room in ruby for rbenv and rvm? [20:33] isaacs: i don't get it. [20:33] teadict: ekryski: so I guess it's just a browser:80 > node-http-proxy:80 > [express:9000 | whatever:9001 | something:9002 | ...] and that's all there's to it [20:33] teadict: this will freaking fun [20:33] jerrysv: isaacs: ego, ego, ego [20:33] isaacs: apipkin: gist the output? [20:33] fumanchu182 has joined the channel [20:33] AvianFlu: teadict: in that situation you can use the routing table stuff no problem, too [20:33] jerrysv: isaacs: don't worry, it will come here too [20:34] ekryski: teadict: ya but you said you only have 25 pc's hitting your single sever? So you probably don't even need a proxy. [20:34] isaacs: jerrysv: bullshit. me and tjholowaychuk both have monstrous egos. [20:34] ts__ has joined the channel [20:34] AvianFlu: it's a reverse proxy [20:34] AvianFlu: think vhosts [20:34] teadict: ekryski: wouldn't the proxy organize stuff? [20:34] apipkin: isaacs: https://gist.github.com/1152539 [20:34] tjholowaychuk: haha [20:34] tjholowaychuk: it's been done [20:34] AvianFlu: rather, he needs a reverse proxy [20:34] jerrysv: isaacs: yes, but an ego by itself is not enough [20:34] tilgovi has joined the channel [20:34] tilgovi has joined the channel [20:34] tjholowaychuk: i dont have an ego, i'm humble, i know im not good [20:34] tjholowaychuk: what i do know [20:34] teadict: AvianFlu: what routing table? [20:34] tjholowaychuk: is that i'm opinionated [20:34] isaacs: tjholowaychuk: that's hilarious. [20:34] AvianFlu: teadict: you're after the routing table feature in node-http-proxy, it's very easy for what you're doing [20:34] AvianFlu: I'll link you, hang on [20:34] teadict: oh [20:34] whoops has joined the channel [20:35] jerrysv: projects aren't people, people aren't projects [20:35] isaacs: tjholowaychuk: you've earned some ego. express is the rails/django/sinatra of node [20:35] tjholowaychuk: i dont think you can progress as a software engineer without thinking you suck [20:35] MUILTFN has joined the channel [20:35] jerrysv: i really dislike express, but love stylus -- neither have anything to do with tj as a person [20:35] isaacs: tjholowaychuk: yeah, but also, i've found that something like 90% of making something good is just not stopping working on it. [20:35] AvianFlu: teadict: http://blog.nodejitsu.com/http-proxy-intro has some good code samples in it [20:35] teadict: AvianFlu: but still, it's not bad for me to use node-http-proxy even if there are just 25 clients.. right? it will be cleaner [20:35] isaacs: tjholowaychuk: if you just keep walking forward, eventually you'll get *somewhere* [20:35] tjholowaychuk: haha yup [20:35] tjholowaychuk: just keep refining [20:36] cdepauw has left the channel [20:36] teadict: AvianFlu: thanks [20:36] AvianFlu: that's not bad at all, especially since you're using it to route stuff to different ports behind the scenes [20:36] teadict: exactly.. [20:36] isaacs: tjholowaychuk: not so long ago, i had a middleware framework comparable with where express was at the time, and you had a package manager that was on par with npm. [20:36] isaacs: tjholowaychuk: but express kept growing at the expense of kiwi, and npm kept growing at the expense of sns and ejsgi [20:36] tjholowaychuk: haha i still see the odd lingering seed.yml and i laugh a little [20:36] ekryski: teadict: it depends on what your clients are doing. If you are just pushing and pulling data from the server you shouldn't need a proxy. You only need a proxy if you have multiple servers (ie. node processes) running. [20:36] isaacs: :) [20:37] teadict: AvianFlu: I clean the connection to the app interface (i.e. browser) and then organize everything whichever way I want, and serve all I want in different ports and all is a party [20:37] AvianFlu: that's the basic idea [20:37] ekryski: teadict: unless you are reverse proxying like AvianFlu said [20:37] teadict: ekryski: won't I probably have multiple servers? and if I won't.. wouldn't it be wiser if the cost is just write some lines of proxy? [20:37] apipkin: isaacs: any thoughts? [20:38] AvianFlu: ekryski: so I guess it's just a browser:80 > node-http-proxy:80 > [express:9000 | whatever:9001 | something:9002 | ...] and that's all there's to it [20:38] jhbot has joined the channel [20:38] AvianFlu: that would be a reverse proxy [20:38] zilch has joined the channel [20:38] isaacs: apipkin: you're apparently already within a package [20:38] isaacs: apipkin: it's installing to ../../../node_modules/express [20:38] AvianFlu: if you don't have more than one thing on the back, you don't need a reverse proxy [20:38] isaacs: apipkin: npm walks up the tree until it finds a "node_modules" folder or a "package.json" file [20:38] jhurliman has joined the channel [20:38] teadict: AvianFlu: I don't know what I'll be needing, I see it as a investment to put the proxy there [20:38] ekryski: teadict: for only 25 clients you wouldn't need more than one node process but if you are looking to scale to more than that then yes you'll want to have a proxy up front. [20:39] apipkin: so should i create a folder called "node_modules" ? [20:39] ekryski: because then you can add more processes at will [20:39] teadict: I'm thinking of serving more stuff in a more organized way... [20:39] teadict: it won't scale [20:39] isaacs: apipkin: so you can either a) rm -rf ../../../node_modules, if it's not actually a package that you're in, or b) create a package.json file (npm init can get you started) [20:39] isaacs: apipkin: or `mkdir node_modules` but that's not as awesome :) [20:39] teadict: the clients won't grow a lot , not a chance [20:39] teadict: it's a internal network app [20:39] zemanel has joined the channel [20:40] teadict: this has cleared many stuff out for me [20:40] teadict: AvianFlu, ekryski: thanks a bunch [20:40] AvianFlu: no problem [20:40] teadict: now I see the whole structure working [20:40] teadict: I'm calmed [20:40] teadict: the app will be a hit! [20:40] ekryski: teadict: well, I'm not sure what you mean by organized but go ahead and play around. That's kinda how you'll really find out what you need. [20:41] teadict: ekryski: well said, thanks [20:41] ekryski: np. good luck! [20:41] teadict: I mean, it doesn't harm the proxy being in the middle [20:41] teadict: and if tomorrow I need to... [20:41] apipkin: isaacs: so when you npm install something you create a "package"? [20:41] teadict: emm [20:41] teadict: whatever [20:41] teadict: I just add to the table and go on [20:41] ekryski: not really. just adds a bit of complexity. [20:41] apipkin: ACTION probably did something wrong :P [20:42] teadict: ekryski: how? [20:42] teadict: ekryski: won't it just redirect everything to express? [20:42] ekryski: just one more piece to the puzzle. node-proxy isn't really that complicated. It's not a big deal. You'll be fine :-) [20:43] teadict: exactly, it's just a step [20:43] CIA-65: node: 03isaacs 07master * r711a356 10/ doc/api/url.markdown : Close #1544 Document slashesDenoteHost flag in url.parse - http://bit.ly/o9OuLF [20:43] teadict: yay [20:43] isaacs: apipkin: yeah. [20:44] jelveh has joined the channel [20:44] isaacs: apipkin: you create a "local space" [20:44] isaacs: apipkin: usually that little oddity happens when you do a local install accidentally in ~ or something [20:44] isaacs: apipkin: it's sort of like how git walks up to find a .git/ folder [20:44] apipkin: yeah that's what i did :( [20:44] ekryski: Anyone know how I can get a hold of Curtis Chambers from Uber??? [20:44] isaacs: apipkin: if you `git init` in your home dir, then git will always think that that's your project root [20:45] isaacs: ekryski: twitter? http://twitter.com/@curtischambers [20:45] mikeal has joined the channel [20:45] isaacs: er, http://twitter.com/curtischambers [20:45] ekryski: ya I tried but he ignored me :-D [20:45] isaacs: oh, he's probably busy :) [20:45] ekryski: I'll try again but I don't want to be creepy ha ha [20:46] isaacs: heh [20:46] CIA-65: node: 03isaacs 07v0.4 * r307a95f 10/ doc/api/url.markdown : Close #1544 Document slashesDenoteHost flag in url.parse - http://bit.ly/r8PZ7i [20:46] ekryski: I saw his talk on Aug. 4th and I wanted to chat more about their stack. Ours is very similar [20:46] apipkin: isaacs: you're my hero :) [20:47] isaacs: aww, thanks :) [20:47] zilch has joined the channel [20:48] cjm has joined the channel [20:49] GlynnR has joined the channel [20:49] blup has joined the channel [20:49] versicolor has joined the channel [20:51] robotmay_ has joined the channel [20:52] pkrumins: guys [20:52] pkrumins: just published this goodness: http://catonmat.net/blog/announcing-ssh-tunnels-for-browserling/ [20:52] pkrumins: announcing ssh tunnels for browserling [20:52] pkrumins: 100% node.js! [20:52] pkrumins: would love an upvote at hacker news! http://news.ycombinator.com/item?id=2896905 [20:52] ekryski: aheckmann just set up a #mongoosejs channel for anyone that is interested [20:52] tbranyen: interesting pkrumins [20:53] pkrumins: tbranyen: our startup is 95% node.js! [20:53] pkrumins: tbranyen: mine and substacks [20:54] CIA-65: node: 03Ben Noordhuis 07master * r8e8f36f 10/ lib/http2.js : Fix #1546 some more. Remove expensive debug call. - http://bit.ly/nn4e1E [20:54] tbranyen: pkrumins: yeah i've tried using browserling a few times, but the queue is always full [20:54] tbranyen: i got in once when it first started [20:54] tbranyen: worked well [20:54] pkrumins: i jsut booted up 5 ec2 instances [20:55] zilch has joined the channel [20:55] asabil has joined the channel [20:55] balaa has joined the channel [20:56] CIA-65: libuv: 03Igor Zinkovsky 07zero_reads * r4898d40 10/ (include/uv-win.h src/win/internal.h src/win/tcp.c): Windows: Pre-allocate buffers for overlapped WSARecv if the number of active tcp streams is below 50. - http://bit.ly/r1EKQp [20:58] jamesd: if anyone is bored here is my http://pastebin.com/8UPy4b0L second node.js program it shows the tail -f of a file... [20:59] topaxi has joined the channel [21:00] markdaws: is there an upper limit of the number of maxSockets allowed from one process to a single server endpoint? I am changing the maxSockets value, from 0 to around 5 it makes a difference on how long it takes to request a number of network requests, but setting to 100 takes the same time as setting to 5, just wondering if there is a max limit? See this code example: https://gist.github.com/1152609 [21:00] zilch has joined the channel [21:00] jbrokc has joined the channel [21:01] MUILTFN has joined the channel [21:01] jga023 has joined the channel [21:02] geetarista has joined the channel [21:02] bnoordhuis: markdaws: the max is what you can get away with without the site's admin blocking you [21:02] bnoordhuis: markdaws: iow, node doesn't cap it :) [21:02] versicolor has joined the channel [21:02] oceanspray_: markdaws: yes that's probably a server side limit [21:03] markdaws: hmm, I see the same behaviour hitting a site I control, which doesn't limit :) unless there is something inbetween that is [21:03] jtrudeau has joined the channel [21:04] harthur has joined the channel [21:05] bnoordhuis: markdaws: what version of node are you testing it with? [21:05] markdaws: 0.4.8 [21:06] DrMcKay has left the channel [21:06] bnoordhuis: markdaws: try it with 0.4.10 - i think there was a bug in the agent code [21:06] DrMcKay has joined the channel [21:06] CStumph has joined the channel [21:08] augustl has joined the channel [21:08] ceej has joined the channel [21:08] Sazpaimon_ has joined the channel [21:09] DrMcKay has left the channel [21:09] steffan_ has joined the channel [21:09] zilch has joined the channel [21:09] ryanfitz_ has joined the channel [21:11] zeissoctopus has joined the channel [21:11] zilch has joined the channel [21:11] DrMcKay has joined the channel [21:13] ckknight has joined the channel [21:13] aglemann has joined the channel [21:14] DrMcKay: mikeal: ping? [21:14] apipkin has left the channel [21:14] mikeal: pong [21:14] DrMcKay: mikeal, could you please review: https://github.com/joyent/node/issues/1531 ? [21:15] mikeal: looks good [21:15] mikeal: commented [21:16] DrMcKay: thank you :) [21:16] DrMcKay: oh, I feel so unsure with every first submission to a project [21:16] pizthewiz has joined the channel [21:16] galaxywatcher has joined the channel [21:19] zeade has joined the channel [21:19] vidi has joined the channel [21:20] dob_ has joined the channel [21:20] steffan__ has joined the channel [21:21] jvduf has joined the channel [21:24] bentkus: in C# i can write something like " [21:24] bentkus: "\xFF\xFF" [21:24] tomtomaso has joined the channel [21:24] GlynnR has joined the channel [21:24] bentkus: is there some similar functionality in javascript? [21:25] AvianFlu: you're talking about a hex literal? [21:25] Bonuspunkt: yes the same [21:25] jeedey has joined the channel [21:25] `3rdEden: is there a way to use a async helper function in jade? [21:25] tim_smart has joined the channel [21:26] mscdex: bentkus: 0xFF [21:27] bluesmoon: bentkus: try first. if it doesn't work, then ask :) [21:27] mscdex: bentkus: just like c++ [21:27] AvianFlu: and leading zeros are for octal literals [21:27] CIA-65: node: 03Ben Noordhuis 07master * r63607a0 10/ benchmark/http_simple.js : bench: make number of response body chunks configurable in http_simple - http://bit.ly/nLX7kh [21:27] nibblebo_: should i be worried if node's make test is not passing on my servers? [21:27] bentkus: i swear to god it didnt work :D [21:27] zilch has joined the channel [21:27] mscdex: nibblebo_: which tests and what node version? [21:27] bentkus: ok sry [21:28] bnoordhuis: bentkus: it doesn't work in strings [21:28] bnoordhuis: or not quite anyway [21:28] nibblebo_: mscdex: just tried 0.4.9 and .4.10 on sunos, test-dgram-multicast and test-process-env [21:28] mscdex: sunos? :o [21:28] nibblebo_: smartOS rather [21:28] mscdex: lol [21:28] nibblebo_: ? [21:28] mscdex: i dunno about smartos [21:28] knowtheory has joined the channel [21:29] `3rdEden: tjholowaychuk is possible to have a async function in jade or express templates? [21:29] nibblebo_: it's joyent's smartmachine [21:29] tjholowaychuk: `3rdEden not right now nope [21:29] zemanel has joined the channel [21:29] mscdex: bentkus: if you want it in a string literal then you embed them the same way as c# "\xFF" [21:29] tjholowaychuk: i dont really want that either but there's an issue opem [21:29] tjholowaychuk: open* [21:29] tjholowaychuk: discussing it [21:29] mscdex: bentkus: but the literal is 0xFF [21:29] bentkus: k, thanks [21:30] jhurliman: anyone here using node.io for web fetching jobs? [21:30] zilch has joined the channel [21:30] `3rdEden: tjholowaychuk: it's just a edge case that I need it for, so I doubt allot people would find it useful :p [21:30] AaronMT has joined the channel [21:32] `3rdEden: but it might be easier if the filters where async [21:32] bnoordhuis: mscdex bentkus: it doesn't quite work the same, i think [21:32] bnoordhuis: .. "\x80" [21:32] catb0t: '€' [21:32] footyfish has joined the channel [21:33] bnoordhuis: hah, i think catb0t is running an old version of node [21:33] catb0t: running into issues of issuing authority [21:33] YouLostThaGame_ has joined the channel [21:33] vidi_ has joined the channel [21:33] YouLostThaGame_: sup [21:33] bnoordhuis: .. "\xff" [21:33] catb0t: 'ÿ' [21:33] bnoordhuis: .. "\x00" [21:33] catb0t: ' [21:34] bnoordhuis: .. "\x1f" [21:34] catb0t: '\037' [21:34] jerrysv: .. "\x666" [21:34] catb0t: 'f6' [21:34] YouLostThaGame_: .. "\x41" [21:34] catb0t: 'A' [21:34] YouLostThaGame_: .. "\x41\x42" [21:34] catb0t: 'AB' [21:34] slifty has joined the channel [21:34] tristanseifert_ has joined the channel [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65\x1f" [21:35] catb0t: 'the game\037' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] YouLostThaGame_: .. "\x74\x68\x65\x20\x67\x61\x6d\x65" [21:35] catb0t: 'the game' [21:35] andrewvos has joined the channel [21:36] YouLostThaGame_ has joined the channel [21:36] jvduf_ has joined the channel [21:37] vidi_ has left the channel [21:39] dguttman has joined the channel [21:40] ultrageek28 has joined the channel [21:40] vikstrous_ has joined the channel [21:40] ultrageek28: Ho [21:40] ultrageek28: Hi* [21:41] cjm has joined the channel [21:41] ultrageek28: qwertyuiop is a fun game [21:41] ultrageek28 has left the channel [21:42] jellosea has joined the channel [21:43] jellosea: http://pastie.org/2388041 is there a way to get the keyname inside one of tehse functions? [21:43] jellosea: so for example, inside the Photo function, is it possible for me to get it's own keyname? [21:43] jmoyers has joined the channel [21:44] bnoordhuis: jellosea: no [21:44] jellosea: k thanks [21:44] bnoordhuis: jellosea: unless you want to walk the hash and check if value === this [21:45] jellosea: so i want to pull some config, stored in another file, which corresponds to the key/function name [21:45] jellosea: is there a good way to do this? [21:46] bengrue has joined the channel [21:46] krh: pass it into the function? [21:46] jellosea: yeah but how do i get the name of it? [21:46] dob_: I want to get about 1000 json entries via get from a server. If i fire up the http client process in a for loop. It seems to connect, but the response is not coming up immediately. Is there a kind of buffer. If i loop only a few. I get the response after the last element in the loop. The conenctions seems to get opened. On the server side i see a FIN_WAIT. [21:47] balaa has joined the channel [21:47] dob_: can i do something to fire the request up immediately? [21:47] jellosea: so im calling these functions like Global.Photo(blah), but the config is somewhere ielse [21:47] krh: jellosea: from where you call it [21:47] jellosea: krh: i want that to be transparent [21:47] jellosea: so that the caller doesn't have to pull up the config [21:49] jellosea: no way to do this? [21:51] pizthewiz has joined the channel [21:51] jbpros has joined the channel [21:51] zilch has joined the channel [21:52] DrMcKay: is there any site gathering documentation for node.js and it's packages? [21:52] jeromegn has joined the channel [21:52] krh: jellosea: you can do something like Global[name] = function () { var d = reguire('./' + name) ... } [21:53] krh: make a helper function to do that and then call it for SimpleUserData, Photos etc [21:53] jellosea: oh awesome [21:55] jellosea: what do you mean by make a helper function to do that [21:55] krh: jellosea: function(name) { Global[name] = ... } [21:55] zilch has joined the channel [21:55] vikstrous has joined the channel [21:56] jellosea: so the thing is that i dont call the getinstance method the same for each 'name' [21:56] jellosea: so if i just make a generinc global[name] it wont work right [21:56] jellosea: *generic [21:56] krh: ah [21:56] krh: I dunno then... pass in the name of the getinstance method as well? [21:57] jellosea: i think i can do global[name], and then do a case switch on name: right? [21:57] krh: sure [21:57] jellosea: cool thanks [21:58] markwubben has joined the channel [21:58] jellosea: how do declare the global object though [21:59] jellosea: so that i can do global[name] = { switch name { case 'photo': etc ... [21:59] krh: var Global = {} [21:59] iFire has joined the channel [21:59] jellosea: and then the next line is just global[name] = ... [22:00] jellosea: yeah that makes sense [22:01] dob_: isn't it possible to create a http request fire it up get the response and fire the next request insted of firing up every request and then get all the responses or not if too many sockets are open? [22:02] ryah: dob_: rephrase your question [22:03] jellosea: krh: that doesn't work [22:03] ryah: you want all outbound http requests to be dispatched only after the previous one has completed? [22:03] mscdex: dob_: you have an http server and are issuing an http request every time a request comes into your server? [22:03] jellosea: if i do global[name] = function (name ) { ... [22:03] jellosea: it says name isn't defined [22:03] markdaws: bnoordhuis: thanks, 0.4.10 does seem to work better [22:04] markdaws: but there seems to be an upper limit of around 10 to get best performance, setting higher than that actually makes executing all the requests slower to complete [22:04] dob_: i have about 2000 entries in my database. A want to grab informations about every entry from a remote http server. Node.js is the client. If i create the request in the for loop. I get the response only if every request has been created and not request, response. [22:04] newy has joined the channel [22:05] CStumph has joined the channel [22:05] dob_: So node.js does request, request...... response, response (error as too many sockets are open) [22:05] dob_: i want a synchronous request, response. [22:05] krh: jellosea: http://pastie.org/2388126 [22:06] markdaws: dob_ , set maxSockets to 1 in the agent, see http getAgent [22:06] saikat has joined the channel [22:06] brianloveswords has joined the channel [22:06] markdaws: e.g. var agent = http.getAgent(host, 80); agent.maxSockets = 1; that will limit to only one request at a time, I think that is what you are asking. [22:07] jellosea: oh right, krh the thing is that i dont want to set the globals [22:08] jellosea: i dont mind writing out the globals, i just want to write them more efficiently, so that i dont have to like constnatly have to type out the object name [22:08] jellosea: liek pulling config, object instantiation [22:09] DrMcKay has joined the channel [22:10] sonnym has joined the channel [22:11] DrMcKay has left the channel [22:11] DrMcKay has joined the channel [22:12] ryan0x2 has joined the channel [22:12] mehlah has joined the channel [22:13] dob_: markdaws: No, does not seem to work for me. [22:13] markdaws: dob: what are you trying to do, you want to make 2000 network requests serially? [22:13] dob_: yes [22:14] zilch has joined the channel [22:14] dob_: i create the client, then go into the for loop and create the requests. request.on is also in the function called in the foor loop. [22:15] dob_: the request.on function gets only called after ALL requests have been created. [22:16] chilts: can you paste some code so we can see it? [22:17] cha0s has joined the channel [22:18] markdaws: dob_: still a bit unclear on what exactly you want, but look at: https://gist.github.com/1152609 you can change maxSockets to 1 and it will only do one request at a time [22:18] tomtomaso has joined the channel [22:19] BillyBreen has joined the channel [22:19] Nuck: God I wish Cygwin's shell were more like PuTTY [22:19] markdaws: dob_: remember that in a for loop if you are calling http.request, then that is just sticking network requests in an internal queue in node.js, which will then be processed, so your loop will finish before any requests start to get pulled of the queue, if that makes sense [22:19] zilch has joined the channel [22:19] dob_: chilts: http://pastebin.com/qNqhmmRX [22:20] jellosea: in a javascript object, does the keyname have to be wrapped with quotes if its a string? [22:20] jellosea: or is it fine to do var x = { string1: 'cat', string2: 'meow' } ; [22:20] dob_: markdaws: That's my problem. I want to process the requests immediatly. [22:22] mrryanjohnston: jellosea: you can do that in node. it can cause problems in browser side javascript [22:22] jellosea: kk thaks [22:22] cjroebuck has joined the channel [22:23] SubStack: bareword keys work browser-side too [22:23] SubStack: except for certain keywords [22:23] markdaws: dob_: do you really want to process them immediately or you just want to know when all requests have completed? [22:24] kevwil: why do I get this error? => https://gist.github.com/1152798 [22:24] franck34: hi guys, what's the best http client library which support https ? [22:24] Sazpaimon_ has joined the channel [22:25] franck34: any suggestion ? [22:25] clifton: franck34: npm install request [22:25] dob_: the problem is that if all 2000 requests will be fired up without a sleep after ending the for loop. I will get a problem with the remote system. That's the main reason why i wanted to process them immediately. After that i want to add a sleep for a few seconds before processing the next one. [22:25] mike5w3c has joined the channel [22:25] franck34: clifton: testing, ths [22:25] franck34: thx [22:26] tomtomaso has joined the channel [22:26] tomtomaso has joined the channel [22:27] markdaws: dob_: even though you have sent 2000 network requests to node, 2000 requests are not sent immediately to the remote server, by default there are 5 sockets open in parallel, so remote end will only get amx of 5 requests at once [22:27] jellosea: how can i call a function with a dynamic number of params? for example if i =2, call func{param[0], param[1], callback), if i = 0, call func(param[0], callback) [22:27] markdaws: you can control the rate by setting the maxSockets property on the Agent object from http.getAgent [22:28] jellosea: or rather, can i call another function with the "arguments" object of a previous function? [22:30] fcambus has joined the channel [22:32] dob_: markdaws: I think the connections are to fast. After a few seconds i get this: Error: socket hang up [22:33] neilk_ has joined the channel [22:33] storrgie has joined the channel [22:34] zilch has joined the channel [22:36] ceej_ has joined the channel [22:36] markdaws: dob_: here is an example of some code that calls a network request N times, once at a time, you can change the setTimeout to a different value to wait between network calls: https://gist.github.com/1152822 [22:37] markdaws: instead of a for loop, just call a function, that calls itself once the previous network request complets [22:37] zilch has joined the channel [22:38] tprice has joined the channel [22:40] zilch has joined the channel [22:40] mnaser has joined the channel [22:41] tprice: hey can someone give a hand. im trying to create a clustered vhost with cluster and express. this is the main server:https://gist.github.com/1152826 and the vhost app:https://gist.github.com/1152828 [22:41] tprice: im trying to server static file on the vhost app [22:42] McMAGIC--Copy has joined the channel [22:42] BillyBreen has joined the channel [22:45] ajpiaNOU has joined the channel [22:46] MUILTFN has joined the channel [22:46] dob_: markdaws: Thank u i will try that! [22:47] tprice: hah never mind i found it [22:47] Sna4x8 has joined the channel [22:47] matyr_ has joined the channel [22:49] Sna4x8 has left the channel [22:49] DrMcKay: I'm bored and it's almost 1 AM, is an IRC bot for looking up node.js docs a good thing to write? [22:50] skm has joined the channel [22:50] tmzt: tprice: what are you using vhost for [22:51] tmzt: I tried something like this before I was informed that cluster was not designed for it [22:51] jellosea: how do i print out a function object in node? [22:52] zilch has joined the channel [22:53] Sorella has joined the channel [22:53] tprice: tmzt> im only useing it to serve static files [22:53] tprice: does cluster under perform when doing something like such? [22:53] tmzt: use nginx for static :) [22:53] tmzt: also use nginx for vhost determination [22:55] pixel13 has joined the channel [22:55] mraleph has joined the channel [22:55] zilch has joined the channel [22:56] tprice: but with ease of development with just node [22:56] tprice: would much rather keep things in node [22:56] tjholowaychuk: you can still use the vhost thing, it just mightn ot work like you expect [22:56] tjholowaychuk: since it's not a reverse proxy [22:56] tjholowaychuk: (it == cluster) [22:57] tbranyen: node for everything [22:57] sfoster has joined the channel [22:57] tbranyen: if you get enough traffic to make static asset serving a problem use a cdn [22:57] tjholowaychuk: tprice if you open an issue for cluster I'll add an example [22:57] Aphelion has joined the channel [22:58] tjholowaychuk: tprice https://github.com/LearnBoost/cluster/issues/144 [22:58] Mark___ has joined the channel [22:58] zilch has joined the channel [22:58] tjholowaychuk: not sure if github lets you watch an issue [22:58] AvianFlu: jellosea: fn.toString() works, believe it or not [22:58] jellosea: hhaha yeah just tried that [22:58] jellosea: thanks [22:59] mscdex: tprice: you could always put node-http-proxy in front [23:00] secoif has joined the channel [23:00] nibblebo_: npm link still the best way to build a package's dependencies? what i if i don't want a global symlink? [23:00] kmiyashiro: npm install? [23:01] nibblebo_: will that upgrade [23:01] nibblebo_: for some reason i remember that not ugrading things [23:01] mnaser has joined the channel [23:01] FearOfMusic has joined the channel [23:02] nibblebo_: hmm, upgrade and downgrade both work with npm install [23:03] markdaws: So after upgrading from 0.4.8 to 0.4.10 I can change the Agent.maxSockets value and it has the effect I would expect of allowing more simultaneous network connections, however, setting to a value like 10 works and is fast, however putting it to something larger like 50 is actually slower to process the requests and somtimes it looks like node loses some of the responses and all the connections don't return, is this possibly [23:03] markdaws: a bug or am I musunderstanding something? See https://gist.github.com/1152865, setting maxSockets to 10 is good, set to 50 and sometimes it doesn't return all requests and is slower than setting to 10 [23:03] nibblebo_: what about cleaning dependencies that were removed from package.json? [23:03] jellosea: can i get javascript to programmatically write a function? [23:03] jellosea: like i want to write some code that generate functions [23:03] tprice: tjholowaychuk> yes done. [23:03] ttpva has joined the channel [23:04] nibblebo_: jellosea: sure, you can eval arbitrary strings as javascript [23:04] FuzzYspo0N has joined the channel [23:04] jellosea: so i have to write the function as a string [23:04] tprice: the load would never be crazy and the app is on a 16 core server such i liked cluster [23:04] pixel13 has left the channel [23:04] nibblebo_: jellosea: well that is the most flexible [23:05] nibblebo_: or you could make a function that returns new functions based on your inputs [23:05] jellosea: yeah that second one makes more sense [23:05] unlink has joined the channel [23:05] tjholowaychuk: tprice yeah regardless of proxying I'd use cluster anyways even if you were just using say nginx for the vhost stuff [23:05] tjholowaychuk: but i'll write an example soonish [23:05] nibblebo_: jellosea: one sec [23:06] tprice: tjholowaychuk> yeah take your time. i have it working but i would like to know. [23:06] hippich has joined the channel [23:06] hippich has joined the channel [23:06] fmeyer has joined the channel [23:06] Skola has joined the channel [23:07] Skola: lulz was watching some Dutch retarded late night poker show [23:07] Skola: and all went smooth until someone's score went "NaN" [23:07] jellosea: thanks nibblebo_ [23:08] slifty has joined the channel [23:08] skm has joined the channel [23:09] springmeyer has joined the channel [23:09] baoist has joined the channel [23:09] zilch has joined the channel [23:09] AvianFlu: Skola: LOL [23:09] Skola: the host is rather good at improv [23:09] Skola: so he joked about rebooting [23:09] nibblebo_: jellosea: http://pastebin.com/RF36Jp0t [23:10] Skola: gonna keep watching because the odds of that shit happening again should be pretty good [23:10] nibblebo_: the 'multiple' function can create new functions like 'double' or 'triple' that do what you would expect them to [23:10] AvianFlu: yeah, cause they clearly forgot to call Number() somewhere lol [23:11] DrMcKay has joined the channel [23:11] ale has joined the channel [23:13] EvRide has joined the channel [23:14] nibblebo_: jellosea: that help? [23:14] rmcastil has joined the channel [23:15] zilch has joined the channel [23:15] ale: Hello, I am using private chats, but for seeing private messages I use user's ids..now, the thing is that the message is sent with io.sockets.emit(..), but I check if(userId == thatUserId) then show the message. Now my question is, will this crash the app? Will this consume higher amount of bandwith [23:15] Knifed has joined the channel [23:16] hydrozen has joined the channel [23:16] jellosea: nibblebo_: actually it doesnt work for what i want to do [23:17] nibblebo_: what are you trying to do? [23:17] jellosea: because it still relies on the original argument being there.. if that makes sense. i want to statically generate the function [23:17] jellosea: like i want to read a list of ('cat', 'dog', 'meow') and then create functions saying var x = {cat: function() { console.log('say cat')}, dog: function() {console.log('woof')} } [23:18] nibblebo_: you would use the pattern above [23:19] ale: please I need help [23:19] tomb has joined the channel [23:19] pives has joined the channel [23:19] zilch has joined the channel [23:19] jesusabdullah: ale: Why not try it and see? [23:19] TheFuzzball has joined the channel [23:20] tomb has joined the channel [23:20] nibblebo_: arg1fn= function() {console.log('say '+arg1)}; arg2fn = ... arg3fn = ...; ret[arg1] = arg1fn; ret[arg2] = arg2fn; ret[arg3] = arg3fn; return ret [23:20] ale: jesusabdullah: Because I don't know how to test it, I do not have 500 users yo test it! [23:20] markdaws: jellosea: var names=['cat', 'dog', 'meow']; var x = {}; x[names[0]] = function() { console.log('say' + names[0]); }; [23:20] zilch has joined the channel [23:22] pongwon has joined the channel [23:22] ale: jesusabdullah: Please I will be glad if you just tell me "yes" or "no" [23:22] elijah has joined the channel [23:22] kriszyp has joined the channel [23:22] tprice: so node-http-proxy would be better then cluster for routing subdomain and many "apps" with express? [23:23] tprice: for like lower level simplicity [23:23] hybsch has joined the channel [23:23] matyr has joined the channel [23:26] elijah|home has joined the channel [23:26] kmiyashiro: ale: why do you think it would crash the app? [23:27] ale: Maybe because of bandwidth excess [23:27] kmiyashiro: because of an if statement? [23:27] tjholowaychuk: tprice I think they are really completely different things [23:27] tjholowaychuk: in a sense [23:28] tjholowaychuk: for example I dont think node-htt-proxy has anything to do with administration or monitoring of the processes [23:28] tjholowaychuk: http* [23:28] elijah|home has joined the channel [23:29] tjholowaychuk: just as nginx doesn't attempt to keep your processes running etc (afaik at least) [23:29] tprice: Sorry i mean to my case of routing domains with static file through express [23:30] tjholowaychuk: you would have better isolation, but if you only have one process per app via node-http-proxy that's not necessarily a good thing [23:30] brianseeders has joined the channel [23:31] sridatta has joined the channel [23:34] tjholowaychuk: tprice https://github.com/LearnBoost/cluster/commit/c5c883dd28e852b855159aebb8e32186521ad1bd [23:35] tjholowaychuk: each "vhost" could be handled by any worker at random [23:35] tjholowaychuk: but you gain some stability from that obviously [23:35] tmzt: node-app-router has workers? [23:35] tmzt: or proxy [23:35] tjholowaychuk: huh [23:35] tjholowaychuk: node-app-router? [23:35] tjholowaychuk: lol [23:35] tjholowaychuk: what's that [23:35] tmzt: oops [23:35] tmzt: node-http-proxy [23:36] tjholowaychuk: no [23:36] tjholowaychuk: but if you had proxy -> foo-process, bar-process [23:36] tjholowaychuk: it's pretty fragile [23:36] tjholowaychuk: so why not do cluster -> N:{foo/bar processes} [23:37] tjholowaychuk: the downside being that you have to manage them as a whole [23:37] tjholowaychuk: which could also be an upside haha, it really depends on the situation [23:37] ale: kmiyashiro: No, not because of an if statetamente, but because it is being sent to everyone with io.sockets.emit!! [23:38] ale: kmiyashiro: would't that create a huge amount of bandwidth? [23:38] hippich has joined the channel [23:38] hippich has joined the channel [23:38] anti has joined the channel [23:38] tprice: i did like the idea of braking them up [23:39] tprice: having dedicated hardware per app i think would bo better with node-htt-proxy [23:39] tjholowaychuk: then yeah you should probably go with node-http-proxy, just make sure you have some redundancy [23:39] jesusabdullah: ale: build first, ask questions later. ;) I don't actually *know* if that would cause you problems or not, but it sounds like a premature optimization to me. [23:39] skm has joined the channel [23:40] jesusabdullah: ale: Sorry I didn't get back to you earlier, I'm @work [23:40] tjholowaychuk: tprice if that's the case I would use them both [23:40] ale: jesusabdullah: no problem, but what do you mean with a premature optimization? [23:40] tprice: yeah just thinking having cluster/s behind node-htt-proxy [23:41] tjholowaychuk: might be a little weird to configure, can't say I've tried [23:41] JoshC1 has joined the channel [23:42] pifantastic has joined the channel [23:43] tprice: can cluster do clustering across the network? [23:43] tjholowaychuk: nope just local sockets [23:44] insin has joined the channel [23:44] tjholowaychuk: i'd like to eventually expand its reach at least monitoring-wise etc [23:46] zilch has joined the channel [23:47] jtsnow has joined the channel [23:48] tprice: yeah that would be cool [23:50] jeromegn has joined the channel [23:51] SvenDowideit has joined the channel [23:52] AvianFlu has joined the channel [23:52] euforic: is it better to populate a form with data on the server side with jade and then pass it to the client to append or do all the dom manipulation on the client side ? [23:52] Hosh has joined the channel [23:54] endian7000 has joined the channel [23:54] elijah|home has joined the channel [23:55] zilch has joined the channel [23:55] ronnieboy has joined the channel [23:56] trotter has joined the channel [23:59] zilch has joined the channel [23:59] kmiyashiro has joined the channel [23:59] elijah|home has joined the channel