[00:00] eee_c1 has joined the channel [00:01] isaacs: so, the issue right now is that a) i don't really want to get too involved in touching the registry requesting stuff right now, because i'd like to port it all to use request instead of my hand-rolled stuff, and b) it actually doesn't do ssl properly anyway, and would fail if it did, since the registry doesn't serve a key with the proper CN value [00:01] davidpadbury has joined the channel [00:01] jaequery: anyone here "not" liking jade as template engine? [00:02] isaacs: jaequery: i use ejs, because i'm an old school asper and phper [00:02] Nexxy: ejs template best template [00:02] odyssey_2001 has joined the channel [00:02] Nexxy: isaacs++ [00:02] catb0t: isaacs now has 1 beer [00:02] v8bot_: Nexxy has given a beer to isaacs. isaacs now has 1 beers. [00:02] tbranyen: aspbergers? [00:02] jaequery: i'm in the same boat, i can deal with ejs, but not, jade.js [00:02] tjholowaychuk: i've been meaning to ask, are there any django-like template engines out there? so I can point django ppl to it [00:02] jaequery: i must be a piece of shet programmer [00:02] Nexxy: tbranyen, aspergers* [00:02] tbranyen: tjholowaychuk: mine is similar [00:02] Nexxy: technically "Asperger's syndrome" [00:03] tbranyen: Nexxy: don't sperg out over it [00:03] tbranyen: jeesh [00:03] Nexxy: oh I've already done sperg'd [00:03] isaacs: Nexxy: Technically it's called "ass pies" [00:03] tbranyen: tjholowaychuk: https://github.com/tbranyen/combyne.js [00:03] tjholowaychuk: ah :) [00:03] greg has joined the channel [00:03] kmiyashiro: jaequery: I don't particularly like it, but that's because I'm used to just html [00:04] Nexxy: did you just wake up from 1997? [00:04] Nexxy: or... [00:04] isaacs: ACTION doesn't trust any templating engine that doesn't use angle braces [00:04] jaequery: also, is node.js good as a reverse proxy? or is nginx still the best at it? [00:04] isaacs: jaequery: nginx is actually a not so good proxy [00:04] Nuck: isaacs: That about sums up my thoughts too :P [00:04] smus has joined the channel [00:04] isaacs: jaequery: check out `npm install http-proxy` from indexzero and the nodejitsu team [00:04] isaacs: jaequery: it's badass. [00:05] tbranyen: bah you can change them in most engines isaacs [00:05] Vertice: isnt varnish the best at 'reverse proxy' specifically [00:05] Nexxy: "the best" [00:05] jaequery: so you ar saying, node > nginx as a rervere proxy? [00:05] isaacs: jaequery: i'm saying, nginx is a shit proxy. [00:05] isaacs: jaequery: nginx is a fabulous file server and mail server. [00:05] Nuck: isaacs: Why is it shit for routing? [00:05] isaacs: jaequery: but for proxying to a backend server, it's an http10sauraus [00:05] Nuck: (proxy-based, that is) [00:05] jaequery: is it shittier than apache proxy? [00:05] tbranyen: seems like everyone has issues with http 1.0 shit [00:05] isaacs: yes. [00:05] isaacs: it doesn't stream [00:06] isaacs: you can't send websockets over it [00:06] Marak has joined the channel [00:06] Nuck: D: [00:06] Nuck: Wai [00:06] Marak: did someone say burgers [00:06] Nuck: NGINX IS HTTP 1.0? [00:06] jesusabdullah: I like burgers :9 [00:06] Nuck: ACTION rages [00:06] tjholowaychuk: isaacs do you know if they are working on 1.1 support? [00:06] isaacs: Nuck: only for proxying [00:06] jesusabdullah: NUCK SIT DOWN [00:06] tjholowaychuk: seems like that's been a complaint for a while [00:06] tbranyen: Marak: do you guys wanna do our first node meetup at the loft? [00:06] isaacs: nginx supports all o fhttp 1.1 for serving files [00:06] tbranyen: i've been meaning to talk to you about it [00:06] isaacs: range requests, everything [00:06] Marak: tbranyen: which coast? [00:06] tbranyen: Marak: east [00:06] tbranyen: bocoup ;-) [00:06] isaacs: it is the best way to serve static files, bar none [00:06] Marak: tbranyen: im not certain, you know im the west coast team right? [00:07] tbranyen: i h8 u [00:07] tbranyen: come to nyc [00:07] tbranyen: and then bounce up to boston [00:07] Marak: tbranyen: indexzero hij1nx is prob the people to talk to [00:07] jesusabdullah: new york?! pffsht [00:07] tbranyen: aight [00:07] Marak: tbranyen: i cant go back to NY for at least 7 years [00:07] jesusabdullah: That's far away [00:07] tbranyen: lol [00:07] TheJH: isaacs, nginx is the best way to server static files? [00:07] isaacs: TheJH: in my experience, yes. [00:07] isaacs: TheJH: it's fabulous. [00:07] jaequery: isaacs: so you'd use node.js to run as proxy over anything else? [00:07] Marak: something about a statue [00:07] Nuck: Marak: You got banned from there? [00:07] AvianFlu: ACTION says `npm install http-server -g` FTW [00:08] isaacs: jaequery: well, depends. i'd use node for that because i know node and can reason about it and extend it easily. [00:08] isaacs: jaequery: but haproxy and varnish are also highly acclaimed [00:08] tbranyen: /mode +b Marak gtfo ny bro [00:08] TheJH: isaacs, I think that in terms of speed, gatling is better, at least I read something like that and the author is a performance-and-security-crazy co-founder of a security company [00:08] Marak has left the channel [00:08] isaacs: jaequery: and apache2 is actually quite nice as a proxy as well. its a known quantity [00:08] isaacs: TheJH: for static files, or proxying [00:08] isaacs: ? [00:09] jaequery: i never heard anything nice about apache before, lol [00:09] jesusabdullah: What is gatling? [00:09] Nuck: Why does Nginx' proxy only support HTTP 1.0? [00:09] Nuck: Is it unsupported and shitty? [00:09] TheJH: isaacs, at least for static files, I don't think that it supports many options for proxying [00:09] jesusabdullah: Well, it's big and unfashionable but people know how to use it and it does its job so [00:09] Nuck: jaequery: Norhave I. [00:09] xtianw has joined the channel [00:09] TheJH: jesusabdullah, http://www.fefe.de/gatling/ [00:09] Nuck: jesusabdullah: Yes, but it's got nasty architecture. [00:10] Nuck: Nginx has a far better architecture [00:10] isaacs: TheJH: i'll have to check it out [00:10] Nuck: Evented by nature. [00:10] Nuck: Just like Node [00:10] Nuck: ACTION hugs NodeJS [00:10] isaacs: Nuck: judge it by its performance. if you're not extending it, who cares? [00:11] jesusabdullah: It's true^^ [00:11] Nuck: Apache's performance isn't all that scalable without heavy modding. [00:11] jesusabdullah: Well, these are bad things about apache, sure [00:11] Nuck: Whereas Nginx is quick and speedy. [00:11] jesusabdullah: but that doesn't change that people already know how to use apache [00:11] Nuck: I will admit that [00:11] jesusabdullah: and that it can serve static content at small-to-medium loads like a boss [00:11] Nuck: But I'm willing to learn Nginx [00:11] Nuck: Especially since the configs look fucking sexy [00:11] jesusabdullah: I'm not :| That's why I'm gonna use node.js for ALL my stack! [00:12] jaequery: i do love nginx for file serving capability though [00:12] AvianFlu: I'm sure as hell never going to miss working on apache configs! [00:12] Nuck: Though I'd definitely prefer JSON [00:12] jesusabdullah: the best configs are custom javascript :v [00:12] Nuck: AvianFlu: Inorite. [00:12] isaacs: serving files over nginx is pretty trivial, and optimized by default. doing much else with it is tricky to get right. [00:12] jaequery: i've witnessed a single nginx on 256mb server replaced 3 apache servers on 1gig memory [00:12] isaacs: it's very efficient [00:12] isaacs: just the streaming/websockets thing that makes it a not so good proxy. [00:12] Nuck: lol fair enough, isaacs. That efficiency is amazing though. [00:13] isaacs: a proxy needs a good client as well as a good server. [00:13] Nuck: I guess it ain't gonna be my proxy though :P [00:13] isaacs: Nuck: that being said, i actually do proxy my website through nginx ;) [00:13] isaacs: this is how i know the pain of dealing with it [00:13] Nuck: lol [00:13] jaequery: ha [00:13] Nuck: Can't go without WebSockets, and streaming is something I really do want. [00:13] isaacs: but it's just talking to php in standalone-fastcgi mode, and i don't stream anything [00:13] isaacs: most of the load is static files. [00:14] Nuck: I'll still use it as my static file server [00:14] TheJH: isaacs, here someone benchmarked nginx vs gatling: http://m.ferdianto.com/2009/09/05/webserver-benchmark-gatling-vs-nginx [00:14] Nuck: Since I'm gonna be hosting large files and such [00:14] [[zz]] has joined the channel [00:14] bbrandon has joined the channel [00:14] jaequery: can i have node.js act as proxy in front of nginx(for files) + apache (php)? [00:14] tbranyen: O_O [00:14] jaequery: or would that negate all performance benefit of nginx [00:14] Nuck: HTTP/1.1 200 Here you go [00:15] Nuck: ... [00:15] Nuck: ACTION facepalms [00:15] TheJH: Nuck, hmm? :D [00:15] Nuck: The benchmark response [00:15] jaequery: btw, whoever said CDN is supposedly much faster is lie. i test on rackspace cdn, is slower than a dedicated box somewhere else. [00:15] TheJH: Nuck, yes, I also laughed the first time I saw it [00:16] gtramont1na has joined the channel [00:16] tjholowaychuk: jaequery geolocation + parallelized downloads [00:17] bjarman has left the channel [00:17] jaequery: i think that's overrated [00:17] Nuck: TheJH: I'm still gonna stick to Nginx simply because it's battle-tested [00:17] tbranyen: internet is overrated [00:17] tjholowaychuk: jaequery think what you like :) [00:17] Nuck: So I can trust it won't crash easily. [00:17] Nuck: And that it's well-debugged [00:17] CIA-65: node: 03Ryan Dahl 07master * re6b06bc 10/ (Makefile src/node.cc test/simple/test-process-env.js): [00:17] CIA-65: node: win: fix test-process-env [00:17] CIA-65: node: Remove support for setting process.env.TZ as it doesn't seem we can do it [00:17] CIA-65: node: x-platform without fixing V8. - http://bit.ly/qG19yp [00:18] Nuck: Whereas Gatling is one guy's code and is so new it's not battle-tested. [00:18] TheJH: Nuck, I think that it's probably very secure because the code is small and the author is an IT security expert. he also uses it on his homepage [00:18] jaequery: is gatling up on apt ? [00:18] Nuck: I trust Node is well-debugged, so I don't mind the lack of battle testing on it. ;) [00:19] Nuck: I mean, we've got some amazing guys. /me points to folks like isaac [00:19] jaequery: im so spoiled now with apt, its not even funny [00:19] jaequery: and npm [00:19] jaequery: :) [00:19] Nuck: jaequery: I'd be dead without apt lol [00:19] Nuck: TheJH: Yes, but it's hard to say how it'll perform in real-world conditions until it's been subjected to such conditions. [00:19] TheJH: jaequery, I think you'll have to compile it yourself because the author even uses his own C library [00:19] Nuck: And I don't exactly plan to be first on that :P [00:20] Nuck: I have one expirimental layer on my stack, and that's Node. I'll have my hands full working with that :P [00:20] jaequery: i got a site that gets about millions of hits a day serving static files, i can test it, i'll do that sometime [00:21] Nuck: jaequery: Damn that's high traffic D: [00:21] Nuck: jaequery: What's your site? [00:21] saschagehlich has joined the channel [00:21] jaequery: its xfire.com [00:21] TheJH: jaequery, please tell us about the results afterwards :) [00:21] jaequery: theres also stiqr.com [00:22] yept has joined the channel [00:22] Nuck: holy shit, xfire? [00:22] tjholowaychuk: ew lol [00:22] jaequery: lol [00:22] Nuck: Damn, I know people who use that. [00:22] jaequery: yea, its pretty old, been around for years [00:24] freewil_ has joined the channel [00:25] freewil_ has joined the channel [00:27] smus has joined the channel [00:28] ditesh|cassini has joined the channel [00:29] davididas has joined the channel [00:31] jtsnow has joined the channel [00:31] dreamdust2 has joined the channel [00:31] neoesque has joined the channel [00:32] al3xnull has joined the channel [00:33] softdrink: tjholowaychuk: what do you suggest i do now that the compiler middleware has been taken out of connect? [00:33] jaequery: do all npms require su privileges? [00:33] tjholowaychuk: you can use it for now, it's not going away until 2.0 [00:33] jaequery: or are there some that doesn't need it [00:33] softdrink: what are your plans? [00:33] tjholowaychuk: or pull it out and use it as third-party [00:38] davididas has joined the channel [00:38] arthurdebert has joined the channel [00:38] TheJH: jaequery, only stuff that globally changes things needs to be sudo'd [00:39] TheJH: jaequery, regular "npm install foo" e.g. works without root rights [00:39] Me1000 has joined the channel [00:39] isaacs: TheJH: local stuff *can* be sudo'ed now, as well, and will be safer (also, should not ever leave root-owned filesin your $HOME) [00:40] isaacs: but most of the time, yeah, for local installs, you probably just wnat to run it as your own user account. [00:42] Gekz has left the channel [00:43] ghost has joined the channel [00:43] Ecce has joined the channel [00:45] TroyMG has left the channel [00:45] CIA-65: libuv: 03Ben Noordhuis 07master * re8497ae 10/ (include/uv.h src/uv-common.c src/uv-unix.c): Add error code UV_EPIPE. - http://bit.ly/nHVCIp [00:46] jacobolus has joined the channel [00:47] WarriorSl has joined the channel [00:48] postwait has joined the channel [00:49] blueadept has joined the channel [00:49] Borgoluzzuo has joined the channel [00:49] blueadept has joined the channel [00:50] AvianFlu has joined the channel [00:51] CIA-65: node: 03Ben Noordhuis 07master * ref496dc 10/ (3 files in 2 dirs): uv: upgrade to e8497ae - http://bit.ly/o78njD [00:51] CIA-65: node: 03Ben Noordhuis 07master * rfcf9cfa 10/ src/node.js : node: propagate --use-uv to child processes - http://bit.ly/qC1Abm [00:54] jtsnow has joined the channel [01:01] davidbanham has joined the channel [01:01] Me1000 has joined the channel [01:02] k1ttty has joined the channel [01:02] ironlad has joined the channel [01:02] AvianFlu has joined the channel [01:02] rfay has joined the channel [01:04] arthurdebert has joined the channel [01:04] balaa has joined the channel [01:08] srid has joined the channel [01:08] srid has joined the channel [01:09] davidban_ has joined the channel [01:10] seivan has joined the channel [01:13] brianseeders has joined the channel [01:14] Cromulent has joined the channel [01:15] losing has joined the channel [01:17] csm_ has left the channel [01:18] temp01 has joined the channel [01:19] zk has joined the channel [01:20] neoesque has joined the channel [01:20] softdrink has joined the channel [01:21] freewil has joined the channel [01:21] freewil has joined the channel [01:21] ericmuyser has joined the channel [01:21] hij1nx has joined the channel [01:23] gerard0 has joined the channel [01:26] eee_c has joined the channel [01:27] abraxas has joined the channel [01:28] e6nian has joined the channel [01:28] e6nian: 1 [01:28] adrianmg: D: [01:28] neilk_ has joined the channel [01:30] JumpMast3r has joined the channel [01:31] ditesh|cassini has joined the channel [01:32] losing has joined the channel [01:32] pdeschen has joined the channel [01:36] CrankyMonkey has joined the channel [01:36] pdeschen has joined the channel [01:37] unlink has joined the channel [01:40] jerrysv has joined the channel [01:41] cjm has joined the channel [01:42] eboyjr has joined the channel [01:43] hlindset has joined the channel [01:43] wangbus1 has left the channel [01:43] boehm has joined the channel [01:44] jacobolus has joined the channel [01:46] jerrysv has joined the channel [01:46] Anton_ has joined the channel [01:46] pdeschen has joined the channel [01:49] Sazpaimon has joined the channel [01:50] jtsnow has joined the channel [01:52] jetienne_ has joined the channel [01:57] dexter_e has joined the channel [01:58] langworthy has joined the channel [01:58] adrianmg: Any front-end developers over here? Just want to share with you a pet project to know your thoughts about it [02:00] mikeal has joined the channel [02:02] hlindset has joined the channel [02:03] broofa_ has joined the channel [02:05] soapy_illusions has joined the channel [02:05] jakehow has joined the channel [02:06] odie5533: Is there a standard for commeting JavaScript? [02:06] mscdex: not really [02:06] mscdex: as long as they're syntactically correct :-) [02:08] soapy_illusions: Hey, I am using mikeal 's request library and running into a weird socket issue ( I think I am using the API wrong ) can anyone help clear this up, http://pastebin.com/kMwPMBas [02:09] odie5533: soapy_illusions: I think the library does some pause resumes to throttle and the other end has closed the socket. [02:09] soapy_illusions: odie5533: should I be listening for a different event [02:09] soapy_illusions: I tried 'close' but it also did not work [02:10] toxico has joined the channel [02:10] odie5533: What are you doing in your event receiver? [02:10] soapy_illusions: I am then reading and modifying the file which is then supposed to be written to disk [02:11] ns5 has joined the channel [02:11] ns5: Can anyone resolve octobot.taco.cat? [02:12] ns5: It's a really cool work queue but the domain can't be resolved, weird [02:13] yuroyoro has joined the channel [02:13] mscdex: ns5: looks like it wasn't reliable enough :p [02:13] danmactough has joined the channel [02:13] Murugaratham has joined the channel [02:14] mscdex: it's Java-based anyway [02:14] mscdex: ns5: here's the github repo for it fwiw: https://github.com/cscotta/octobot [02:14] Wa has joined the channel [02:14] odie5533: soapy_illusions: Does it work without your req end method? [02:14] Emmanuel` has joined the channel [02:15] ns5: mscdex: oh thanks! [02:15] soapy_illusions: odie5533: I will check in a sec, I am currently trying to listen on the fs events instead and will see if that works [02:15] steffan_ has joined the channel [02:17] escii has joined the channel [02:17] jvdev has joined the channel [02:18] odie5533: soapy_illusions: I think you are supposed to do response.on('end', ...) isntead of request.on('end', ...) [02:19] soapy_illusions: good point, i just don't know how to get the response object when streaming, the docs for Request were not clear on that [02:19] yuroyoro has joined the channel [02:20] odie5533: so it would be like request({uri: url}, function(err, res, body) { res.pip(...); res.on('end', function(){console.log('end!');}); }); [02:20] CIA-65: libuv: 03Bert Belder 07master * ra894104 10/ src/win/pipe.c : Whitespace - http://bit.ly/qjzsZM [02:20] CIA-65: libuv: 03Bert Belder 07master * rca63392 10/ (src/win/pipe.c src/win/req.c): Windows: fix pipe shutdown - http://bit.ly/nW50JL [02:21] soapy_illusions: odie5533: will try that [02:21] odie5533: soapy_illusions: It works using http. Not sure about his library though. [02:22] cafesofie has joined the channel [02:23] jacobolus has joined the channel [02:24] diesel has joined the channel [02:25] mikeal has joined the channel [02:26] tk has joined the channel [02:26] jtsnow has joined the channel [02:27] maru_cc_ has joined the channel [02:27] ceej has joined the channel [02:30] jetienne_ has joined the channel [02:31] Peniar has joined the channel [02:31] febits has joined the channel [02:31] smtlaissezfaire has joined the channel [02:31] jacobolu_ has joined the channel [02:32] ank has joined the channel [02:32] bwinton has joined the channel [02:33] d0k has joined the channel [02:33] Drakonite has joined the channel [02:33] soapy_illusions: odie5533: ohh well guess I will go back to just using plain http [02:34] odie5533: you could always send mikeal a msg [02:35] mikeal: what [02:36] pandeiro has joined the channel [02:36] aoberoi has joined the channel [02:37] dgathright has joined the channel [02:37] zilch has joined the channel [02:39] soapy_illusions: mikeal I was using your request library and think I'm doing something wrong http://pastebin.com/kMwPMBas any help would be appreciated [02:39] blueadept has joined the channel [02:40] CIA-65: node: 03Bert Belder 07master * r74e8fa2 10/ (deps/uv/src/win/pipe.c deps/uv/src/win/req.c): Upgrade libuv to ca633920f564167158d0bb82989d842a47c27d56 - http://bit.ly/q6Ekjh [02:40] AvianFlu has joined the channel [02:40] jj0hns0n has joined the channel [02:42] maru_cc_ has joined the channel [02:44] jj0hns0n has joined the channel [02:45] larro has joined the channel [02:45] zeade has joined the channel [02:46] kriszyp has joined the channel [02:47] odie5533: heh, see he's right in IRC :) [02:47] odie5533: I like open source projects like that. Hop in IRC and chat with the guys that made everything [02:49] materialdesigner has joined the channel [02:49] temp01 has joined the channel [02:50] mynyml has joined the channel [02:51] CrankyMonkey has joined the channel [02:52] craigpetchell has joined the channel [02:53] michaelrice has joined the channel [02:54] ank has joined the channel [02:56] hippich has joined the channel [02:56] larro has joined the channel [02:57] larro: anybody here? [02:57] odie5533: yes [02:57] larro: ha, thanks you, [02:57] odie5533: np [02:57] odie5533: glad i could help [02:58] iammerrick has joined the channel [02:59] larro: thank you ,i am starting learn the node.js,and i com from china,my english is poor [02:59] CIA-65: node: 03Peter Bright 07master * rb9d7777 10/ (generate-projects.bat node.gyp src/node.cc tools/gyp_node): Fix MSVS building. - http://bit.ly/rqoieK [03:00] Hodgestar has joined the channel [03:01] pdeschen has joined the channel [03:03] Emmanuel`: larro: it's alright, I live in China and my Chinese is poor [03:03] Emmanuel`: so is my English actually [03:04] odie5533: I live in america and my chinese in poor. [03:05] hij1nx has joined the channel [03:07] AvianFlu: Emmanuel` what's your first language then? I'm just curious [03:09] jesusabdullah: Oh I'm sorry I thought this was america! [03:09] odie5533: lol ^ [03:09] jesusabdullah: I kid, I kid [03:09] jesusabdullah: welcome, larro! [03:11] jtsnow has joined the channel [03:12] larro: thank all of you,i'm install the node.js on ubuntu now ,but is to slowly [03:12] jesusabdullah: it's taking a while? [03:13] e6nian: larro: hi [03:13] escii: it performs very well here on ubuntu, aswell on debian.. [03:13] e6nian: larro: from +8 CST [03:16] jesusabdullah: no, to install escii, it's taking a while to compile [03:16] jesusabdullah: I think [03:16] Emmanuel`: AvianFlu: French [03:16] larro: e6nian: what's your country, the chinese brandwidth is very poor, the speed i download the source just about 10 KB/s [03:17] jetienne_: Emmanuel`: not sleeping either ? [03:17] Emmanuel`: no, it's 11 am for me :) [03:17] jetienne_: oh quebec guy :) [03:18] Emmanuel`: ahah, I just said I was in China :) [03:18] larro: Emmanuel,ni hao !! :) [03:18] jetienne_: ok i guess the middle of the night hit my brain too hard :) [03:18] aoberoi has joined the channel [03:18] Emmanuel`: (and it's 11pm in Montreal :) [03:19] Emmanuel`: larro: ne hao ! (i'm in a Cantonese speaking area :) [03:19] jesusabdullah: ohhh, slow to download [03:19] jesusabdullah: that's painful larro, my condolences [03:20] e6nian: larro: 不用这样吧 [03:20] larro: yes, chinese people is always painful [03:20] larro: 哈哈 [03:20] e6nian: larro: 不要丢份子 [03:20] iammerrick has joined the channel [03:21] e6nian: larro: 成熟点 [03:21] ank has joined the channel [03:21] e6nian: Emmanuel`: where are you ? +8 CST? [03:21] larro: 哦,懂了 [03:21] e6nian: larro: 得体 [03:21] e6nian: :) [03:22] jesusabdullah: I like to imagine what those characters sound like [03:22] Nuck: Okay, I need to crawl a chain of dependencies [03:22] e6nian: jesusabdullah: lol [03:22] Nuck: So basically I need to grab a row from the database, then go through each dependency and check their dependencies [03:22] Emmanuel`: e6nian: Hong Kogn [03:22] Nuck: But I need to be able to do this asynchronously. [03:23] Nuck: And then have a single callback for when they've all been crawled [03:23] e6nian: Nuck: aysnc.forEach [03:23] e6nian: Nuck: async.forEach [03:23] Nuck: I can handle a for loop [03:23] Nuck: That's EASY. [03:23] AvianFlu: or async.series [03:23] Nuck: The problem is detecting when the process of getting them all is done. [03:24] e6nian: Nuck: https://github.com/caolan/async#forEach [03:24] e6nian: Nuck: there is a callback [03:24] Nuck: I'd rather not resort to a lib : [03:24] Nuck: :/ [03:24] e6nian: forEach(arr, iterator, callback) [03:24] jesusabdullah: Nuck: Why not look at how async did it then? [03:24] Draggor: Nuck: it's one of those things that a lot of noders write themselves [03:25] mikeal has joined the channel [03:26] Nuck: I see, it stores the length of the array it's iterating over, then counts each callback... [03:28] odie5533: async lib is very good [03:29] odie5533: I used it initially just for it's queue. I only need one worker, but his queue is a great implementation even for a 1 worker queue. [03:29] odie5533: Then I realized I needed his series method too for init function. Works great as well :) [03:29] e6nian: odie5533: agree [03:29] mekwall has joined the channel [03:31] yhahn has joined the channel [03:31] mykul has joined the channel [03:31] Nuck: I can actually see some other uses I could have for async [03:31] Nuck: I might add this to my requires and see if I use it [03:32] odie5533: I am finding that I need lots of external libs for node.js, which is apparently the developer's plan: only include basic stuff in the standard library. Compared to Python, where I only EVER used two libraries for anything (Twisted and lxml). [03:32] tomb_ has joined the channel [03:33] mikeal has joined the channel [03:33] Draggor: odie5533: You only ever get what you ask for, which is how I like it [03:34] Nuck: Wow, this is also really lightweight [03:34] fostah has joined the channel [03:34] dexter_e has joined the channel [03:34] Nuck: It's not as heavy as the average flow control lib [03:34] odie5533: Nuck: the guy is a really good coder :) [03:34] Nuck: I can deal with this [03:34] jetienne_: Nuck: gowiththeflow.js is 20lines, it handle the control flow callbacks stuff par/seq. does it qualify as lib ? [03:34] odie5533: I enjoyed reading through async. the thing is beautiful. [03:34] odie5533 has left the channel [03:34] odie5533 has joined the channel [03:34] Nuck: odie5533: Yeah, it's really elegant. [03:35] jetienne_: async is 30 time larger than gowiththeflow :) [03:35] Nuck: Wonderful solutions. [03:35] jetienne_: just saying :) [03:35] Nuck: jetienne_: I don't want the flow control so much as the foreach and other async things :P [03:35] odie5533: Draggor: I... prefer the other way around. And I'll say why. I am on Windows, so any native compiled modules don't work. NPM doesn't work. And this current state, while not permanent, highlights the importance of a standard library. [03:35] jetienne_: Nuck: you got the foreEAch already in js you know :) [03:36] Nuck: jetienne_: This is an async foreach loop [03:36] jetienne_: Nuck: but i respect your choise, just making sure it was a knowledgable one :) [03:36] Nuck: It provides a callback for when all iterations are done, and a callback is thrown to each iteration for when it's done. [03:36] odie5533: Draggor: If you work on other platforms, you will need to recompile any module as well as Node.js itself. With Python, you just get Python working and most everything else is portable. I know Node.js is younger, but for Python just about everything is portable, and a huge standard library really helps achieve that. [03:37] Draggor: odie5533: Very true, and I won't deny how nice that is. [03:37] jesusabdullah: but python's standard library also sucks [03:37] Nuck: odie5533: Don't expect a hude standard library. [03:37] jetienne_: Nuck: i could argue, but i wont. just wanted you to let you know the alternatives :) [03:38] odie5533: jesusabdullah: uh, no? [03:38] Nuck: jetienne_: Not really an alternative in this case ;) [03:38] jesusabdullah: uh, yeah? [03:38] Nuck: Except writing it myself [03:38] jetienne_: not arguing :) [03:38] jesusabdullah: It has a lot of stuff, but not a lot of iteration [03:38] jesusabdullah: a lot of things grow stale there [03:38] odie5533: It has never bothered me. [03:39] jesusabdullah: I've seen some pretty annoying crap in the standard library :( [03:39] jesusabdullah: I might just be acting picky though [03:39] odie5533: The only two things I couldn't get the library to do were decent and easy async io (I use Twisted) and decent HTML parsing (I use lxml) [03:39] jetienne_: +1 for a well maintained, well documented standard lib for node.js [03:39] odie5533: I dont even understand how you can be picky jesusabdullah [03:39] odie5533: jesusabdullah: go program C and complain about stale std libraries. [03:40] jesusabdullah: Maybe I will! [03:40] dherman has joined the channel [03:40] odie5533: I think python has better docs... more examples. [03:40] jesusabdullah: They *do* have docs [03:40] jesusabdullah: what I don't like are the interfaces a lot of the time [03:40] odie5533: but thats not a reason to use Python over node.js. node has plenty of docs to use [03:41] jetienne_: odie5533: ? [03:41] jesusabdullah: it's not like it's a truly shitty standard library [03:41] jetienne_: odie5533: currently there is not even a standard lib [03:41] jesusabdullah: it's just kinda mediocre [03:41] jesusabdullah: jetienne_: What there's totally standard libs [03:41] jesusabdullah: http, fs, path [03:41] jesusabdullah: etc [03:41] jesusabdullah: those are all standard libs [03:41] jetienne_: jesusabdullah: i would qualify that as node-core [03:42] jesusabdullah: It's just a bare-bones stdlib [03:42] ns5 has left the channel [03:42] jesusabdullah: Well, it's developed by the core but it's definitely a set of libraries for the javascript platform [03:42] jetienne_: jesusabdullah: request kindof lib would be the libraries [03:43] odie5533: core library, standard library, whatever [03:43] e6nian: jesusabdullah: we need a rating in npm [03:43] odie5533: the only stuff I'd consider core is the stuff I can get from the web browser [03:43] odie5533: like Date, String, Array [03:43] jetienne_: nah we need people writing good doc, and maintaining libs [03:43] odie5533: anything other than that I'd say is node.js standard library [03:43] odie5533: like fs and http [03:43] jesusabdullah: We have that---I mean, people writing and maintaining libs [03:44] jacter has left the channel [03:44] jetienne_: lets say other language got a MUCH larger, more documented, mor maintained libraries :) [03:44] csanz has joined the channel [03:44] jetienne_: jesusabdullah: nothing of constant quality [03:44] odie5533: you mean 3rd party libs jetienne? [03:44] tristanseifert has joined the channel [03:44] jetienne_: like ruby/php/python lib are [03:44] ank_ has joined the channel [03:45] jetienne_: odie5533: currently we got node core, and bunch of 3rd party libs [03:45] jesusabdullah: well no, you can't guarantee everything that comes out of npm is well-maintained [03:45] jetienne_: 3rd parties library are ogf various quality. bug wise, maintenance, documentation [03:45] jesusabdullah: but it's not hard to figure out which ones are well-maintained [03:45] odie5533: but you said other languages have larger documented more maintained libs. were you referring to 3rd party libs? [03:46] jesusabdullah: odie5533: Think python [03:46] jetienne_: jesusabdullah: ah ? i would love to know you can estimate this [03:46] jesusabdullah: odie5533: python comes with migs and megs of stuff bundled in with the standard library [03:46] odie5533: Node.js is very, VERY maintained right now [03:46] jetienne_: odie5533: no im refering to ruby/python/php libraries, those are part of the languages, not 3rd parties lib [03:46] jesusabdullah: jetienne_: git logs, web page activity, people in irc saying, "hey man check this out" [03:46] mekwall has joined the channel [03:47] jesusabdullah: My process is, "npm info library", get the url, check out the github [03:47] jzacsh_ has joined the channel [03:47] jetienne_: jesusabdullah: so very unrealiable info here :) [03:47] jesusabdullah: Really? Because, I mean, I have a pretty good feeling for which shops put out code I like, what to expect, etc [03:47] jetienne_: jesusabdullah: how doyou know if you like it ? i mean you cant [03:48] jetienne_: jesusabdullah: you would need to look and understand the whole lib [03:48] Nuck: Having to think recursively for this function. [03:48] jesusabdullah: How would I know if it were in the standard library? [03:48] ceej has joined the channel [03:48] jetienne_: jesusabdullah: to study it in depth to see how bugy it is [03:48] reid has joined the channel [03:48] jetienne_: jesusabdullah: to monitor the schedule of the author to see if they are available for maintenant [03:48] jesusabdullah: Think of it like this, jetienne_: If I see a module written by SubStack, I know he's a pretty good and prolific coder, and that he uses most of the things he ends up writing [03:48] jetienne_: maintenance [03:49] jesusabdullah: If I see a module is associated with LearnBoost or Nodejitsu, I know that they're gonna be solid and being used in the real world [03:49] aoberoi has joined the channel [03:49] jesusabdullah: or, I know isaacs puts out good software [03:49] jetienne_: jesusabdullah: standard lib got several maintener, got people to write docs, people all gathered around a single goal [03:49] jesusabdullah: and a few other names [03:49] odie5533: nodejitsu's kyuri is kinda unmaintained [03:50] jesusabdullah: That's true, odie5533 [03:50] jetienne_: jesusabdullah: here you assume all those people are available to fix the bugs when you need it [03:50] jesusabdullah: fair enough [03:50] jesusabdullah: well yeah---in fact, if they're using it themselves they may catch the bug before me [03:50] odie5533: jesusabdullah: What if you are new, and don't know names? I've learned the names fast as you have, but there is no list of Good Libraries (TM). [03:50] jetienne_: jesusabdullah: and are able to write good docs. btw being able to code, is not being good at writing doc [03:50] jesusabdullah: That's true, you have to sit around [03:50] davidbanham has joined the channel [03:51] odie5533: There is only a list of libraries. Most of which were written by Some Guy over the course of a month back in 2010 and haven't been touched since. And they sit there right next to Async, Vows, and Express on the list of libraries [03:51] jesusabdullah: Also, you gotta hit up the docs anyway, you might as well read enough to tell if you like where it's going [03:51] jesusabdullah: It'd be cool to arrange by last published [03:51] odie5533: I was thinking of adding it to the wiki [03:51] jesusabdullah: or number of downloads, though that way is self-reinforcing [03:51] jetienne_: or to get a bunch of lib which are well maintained and well documented :): [03:52] jesusabdullah: But we *have* those libraries, they're just not being curated by anybody [03:52] jetienne_: because this is the goal [03:52] jesusabdullah: or rather, by a common group [03:52] jetienne_: jesusabdullah: no we dont. hence me pushing for it :) [03:52] jesusabdullah: What? [03:52] jetienne_: jesusabdullah: ah yep i agree. we dont have this common group maintaining the libraries to get a constant good quality [03:52] jesusabdullah: I rarely have issues with documentation with a library [03:53] AvianFlu has joined the channel [03:53] jetienne_: lucky you [03:53] jesusabdullah: or if I do I find a different one [03:53] jesusabdullah: or if it's someone I know, I tell them to do more betters [03:53] jetienne_: dont use core then :) [03:53] jetienne_: node core doc is so so at the moment [03:53] jetienne_: undocumented features all over the places [03:53] SubStack: the problem with putting more modules in core is that it's very very difficult to take the modules out [03:53] SubStack: if something doesn't pan out or is a bad idea it just stays there [03:54] SubStack: or if better alternatives emerge on npm [03:54] odie5533: SubStack: why is that? [03:54] jesusabdullah: or someone tries to take the banner later [03:54] dmwuw has joined the channel [03:54] jetienne_: i do not want more in node-core, i want node-libs, a set of well doc, well maintained lib [03:54] odie5533: Why is it hard to take them out [03:54] SubStack: putting a lib in core is like a massive state subsidty [03:54] jesusabdullah: odie5533: Probably because you made a promise/commitment to keep something in the standard library [03:54] jetienne_: odie5533: because people depends on it [03:54] SubStack: s/ty$/y [03:54] e6nian: jesusabdullah: agree [03:54] odie5533: ah [03:54] e6nian: jetienne_: agreee [03:54] odie5533: Well, we should have a community vote [03:54] jesusabdullah: Nooooo [03:54] odie5533: All in favor of adding Async to the core lib say I. [03:55] e6nian: odie5533: yes! vote and rating [03:55] jesusabdullah: Too many cooks in the kitchen [03:55] SubStack: better community rankings and voting is a much better direction to go [03:55] SubStack: keep core out of it [03:55] jetienne_: +1 to keep core out of it [03:55] jesusabdullah: Even if I thought there should be a standard library I would probably still push for not-so-community-votes [03:55] e6nian: jesusabdullah: vote and rating for libs, not for node core [03:55] jetienne_: +1 for a set of well maintained, well documented set of libs [03:55] random123: Are there any people that decide using CoffeeScript is a bad idea, because the majority of people and companies use ECMA? So if you should focus on being most productive in that? [03:55] odie5533: The problem I encounter is that stuff not in the std lib tends to not be as portable. [03:55] SubStack: I meant voting about which modules were best, not what belongs in core [03:55] jesusabdullah: oh, e6nian that sounds cool [03:56] odie5533: Especially right now, when you CANT use compiled modules on Windows. But even when you can, I need to recompile every module for windows. IT's portable, but it isn't fun. [03:56] jesusabdullah: Oh, that'd be cool, every year you could do a new poll [03:56] jetienne_: voting wont give good doc, or good maintenance [03:56] SubStack: I would be more happy moving libs like http and path out into userspace personally [03:56] dexter_e has joined the channel [03:56] odie5533: jesusabdullah: Python does PEPs [03:56] chilts: yeah, a kind of 'suggested' set of modules which are well maintained and work well would be good [03:56] jetienne_: SubStack: node is all userspace you know :) [03:56] CStumph has joined the channel [03:56] chilts: though that just takes someone to set up a web page [03:56] chilts: :) [03:56] odie5533: I want more stuff in std lib... they are portable! and maintained by core devs so you know they are good [03:56] SubStack: jetienne_: I mean http and path are "blessed" by being bundled with the node binary [03:56] jesusabdullah: Maybe that's python's problem, odie5533 ;) [03:57] odie5533: stuff in userspace is and always will be a crapshoot [03:57] jetienne_: SubStack: i understood, it was more a joke or close [03:57] chilts: also, don't put things in core for the reason jetienne_ said above ... just look at Perl ... recently debating to thin down core and put it on CPAN instead [03:57] e6nian: do you know https://aur.archlinux.org/ ? there have a rating for libs, and the core is stable and kissy. [03:57] chilts: makes more sense [03:57] chilts: and things can move faster then :) [03:57] SubStack: chilts: yep, python and ruby have the same problems [03:57] chilts: right :) [03:57] perezd has joined the channel [03:58] SubStack: because it's very easy to add something to core but very hard to remove something [03:58] SubStack: that is a recipe for accumulating a very large core if you're not really disciplined [03:58] e6nian: we need KISS [03:58] jetienne_: this is why node-core should be clean and minimal [03:58] e6nian: less is more [03:59] SubStack: we can have complicated modules, they just belong on npm [03:59] SubStack: where there is more evolutionary pressure [03:59] jesusabdullah: I like the community vote idea [03:59] jetienne_: npm is just packaging system [03:59] jesusabdullah: Someone should build that for nko [03:59] jetienne_: nothing on documentation quality [03:59] SubStack: jesusabdullah: well perhaps not a vote but as "I use this" button [03:59] jesusabdullah: or of code quality, for that matter [03:59] SubStack: to supplement the actual dependency graphs [03:59] jetienne_: nor maintainance quality, how buggy it is [03:59] jesusabdullah: SubStack: Or that :P [03:59] tmzt: v8bot is back??? :) [04:00] jetienne_: +1 for a set of library well maintained, well documented [04:00] jetienne_: -1 for 3rd party library which are weekend project, and orphaned after a month [04:01] SubStack: and then somebody can just hack up a quick and dirty linear equation summing github watchers, forks, depended upon counts, and "I use this" votes [04:01] SubStack: would be nice for search.npmjs.org [04:01] ditesh|cassini has joined the channel [04:01] jetienne_: this wont give maintenance, nor doc tho [04:01] AvianFlu: a set of well-maintained libraries for everyday things? gee, that makes me think of those nodejitsu guys... XD [04:01] jesusabdullah: That's what I'm sayin' AvianFlu ! [04:02] SubStack: AvianFlu: the doc project could use "I use this" vote aggregation :p [04:02] AvianFlu: that's really not a bad idea [04:02] rfay has joined the channel [04:02] SubStack: just to get a rough ordering of which modules are being used more [04:02] jetienne_: just wont give maintanance, nor doc [04:03] SubStack: to supplement github stats and dependency counts [04:03] jetienne_: and btw code quality is different from author popularity :) [04:03] SubStack: somebody should write that for node-ko [04:03] jesusabdullah: Yeah [04:03] SubStack: github sign-in for "I use this" voting [04:03] seivan has joined the channel [04:03] jesusabdullah: I kinda wanna work on an npm visualization now [04:04] jesusabdullah: like something based on dependency graphs and change activity [04:04] jetienne_: symfony plugin has a i use this [04:04] jetienne_: this works ok for 3rd party lib [04:04] JakeyChan has joined the channel [04:04] jetienne_: change activity as a plus ? so stable unbuggy lib will be penalized [04:04] SubStack: jesusabdullah: like npmdep? :p [04:05] jetienne_: ok i will try again later :) [04:05] jetienne_: im trying to get this from last sep :) [04:05] JakeyChan_ has joined the channel [04:05] jesusabdullah: SubStack: Yeah, very similar [04:05] jesusabdullah: SubStack: Or, at least, you could build up on that [04:06] meso_ has joined the channel [04:06] jetienne_: how many npm package got their github referenced ? [04:06] jesusabdullah: Maybe you can graph "number depended on" vs "updates/month" or something [04:06] jesusabdullah: most, jetienne_, from what i've seen [04:07] jetienne_: jesusabdullah: it would be cool [04:07] jetienne_: but good idea for ko [04:10] jetienne_: when is it ? end of aug no ? [04:10] jesusabdullah: Oh, you could also pull github watchers data from that project [04:10] jesusabdullah: Something like that jetienne_ [04:10] jetienne_: 27 29 aug [04:10] eee_c1 has joined the channel [04:10] dherman has joined the channel [04:10] jetienne_: ok going back to webgl [04:10] jesusabdullah: gogogo :D [04:10] jetienne_: webgl is fun too :) lorenz strange attactor particules :) [04:10] heavysixer has joined the channel [04:11] Lorentz: Only if my laptop did webgl proper, sigh. [04:11] jacobolus has joined the channel [04:12] jesusabdullah: hold on, I have a thing people might like if chaos theory is your thing [04:12] jetienne_: http://cake23.de/progressive-fractal-fullscreen.html for julia attractor [04:13] wookiehangover has joined the channel [04:13] jesusabdullah: http://www.youtube.com/watch?v=o0mho63pJDA&list=UUorxc-zH_sDg [04:13] jesusabdullah: i made this in school [04:14] AvianFlu_ has joined the channel [04:14] vid__ has joined the channel [04:15] luke` has joined the channel [04:15] techwraith has joined the channel [04:15] jetienne_: nice but you need to work on colors :) [04:16] odie5533: jesusabdullah: why does it look so angry?! [04:16] temp02 has joined the channel [04:16] digitaltoad has joined the channel [04:18] jesusabdullah: odie5533: It looks angry? XD [04:18] jesusabdullah: odie5533: It was generated with MATLAB, which has a *terrible* plot toolbox [04:18] jesusabdullah: like, decent math frontend and, well, the api was pretty good too tbh [04:19] jesusabdullah: but the graphics on the backside of it were just horrible [04:19] jesusabdullah: matlab-based plots look like shit [04:21] SubStack: jesusabdullah: oh gods what is this http://www.youtube.com/watch?v=9Dr_R2UuT68 [04:22] temp01 has joined the channel [04:22] jesusabdullah: SubStack: It is the best thing [04:23] jesusabdullah: My brother, best friend and I all made it back in like 2003 with lego studios [04:23] jesusabdullah: we had no idea how long it took to get movements down, and kids are all ADD y'know? [04:23] jetienne_: how long to take the picture ? [04:23] jesusabdullah: I don't remember [04:23] odie5533: jesusabdullah:I love how its you and your BIG brother [04:23] jetienne_: i did this with barbies and it was 4days fulltime :) [04:24] jesusabdullah: "Do you hear that that's ORRKS" became an inside joke with my bro and I [04:24] jesusabdullah: odie5533: I was the old one [04:24] odie5533: mhmm [04:24] jesusabdullah: I was a freshman or sophomore, my friend was a year behind me in school, and my brother was like 3 grades back [04:25] odie5533: and you were all 12. [04:25] cpetzold has joined the channel [04:26] SubStack: jesusabdullah: you should buy a video camera so I can borrow it all the time and make wacky videos [04:26] jesusabdullah: no, my brother was 12, I was like 14 [04:26] jesusabdullah: Hah! That'd be fun [04:30] butu5 has joined the channel [04:30] davidbanham has joined the channel [04:33] Cros79_ has joined the channel [04:35] mscdex: wacky videos about labview! [04:36] jetienne_ has left the channel [04:38] ank has joined the channel [04:38] bbrandon has joined the channel [04:39] ericmuyser has joined the channel [04:39] CrankyMonkey has joined the channel [04:40] necrodearia has joined the channel [04:40] e6nian has joined the channel [04:42] __class__ has joined the channel [04:43] muk_mb has left the channel [04:43] piscisaureus has joined the channel [04:43] balaa has joined the channel [04:48] socketio\test\14 has joined the channel [04:49] cying has joined the channel [04:53] seivan has joined the channel [04:59] saikat_ has joined the channel [05:01] wojohowitz has joined the channel [05:05] Jakwac has joined the channel [05:06] CStumph has joined the channel [05:07] Swizec has joined the channel [05:07] jzacsh has joined the channel [05:07] jzacsh has joined the channel [05:08] random123: What is the most popular DB to use with Node? Mongo? [05:08] odie5533: mongo and redis [05:08] Nexxy: RIAK~! [05:08] Nexxy: >_>; [05:08] random123: What do you recommend odie? [05:09] odie5533: heh, I'm not one to recommend either [05:09] odie5533: for my uses of node thus far, I am not using external databases. [05:11] odie5533: mongo looks more robust, redis looks more hip [05:11] odie5533: but I could be wrong [05:11] mikeal has joined the channel [05:12] djbell has joined the channel [05:12] danArbaugh has joined the channel [05:12] radiodario has joined the channel [05:13] saikat_ has joined the channel [05:13] zilch has joined the channel [05:14] copongcopong has joined the channel [05:14] dgathright has joined the channel [05:15] k1ttty has joined the channel [05:16] unlink has joined the channel [05:16] unlink has joined the channel [05:18] Nuck: Hmmm I've gotta pull some interesting tricks to make my code work here :D [05:18] m0s has joined the channel [05:19] AvianFlu: is that unusual for you, Nuck? XD [05:20] Spion_ has joined the channel [05:23] jhurliman has joined the channel [05:23] Nuck: AvianFlu: Well, in this case, I've got some crazy recursive shit to deal with, climbing up two inheritance chains at the same time, then combining the two into one chain. [05:23] Nuck: So I've gotta think recursively in two directions at once. [05:24] odie5533: sounds like you have a bad case of javascript [05:24] Nuck: Not really [05:24] supster has joined the channel [05:24] Nuck: Just a case where I'm gonna hafta figure out a plan before I code the final beast. [05:24] Nuck: I've done one semi-working version already [05:24] Nuck: async is gonna make this a lot easier, too [05:25] AvianFlu: async FTW [05:25] Nuck: Because I can async.parallel the resolvers, then async.forEach to iterate over their inherits, recursing and calling the function to handle the next layer [05:25] AvianFlu: so... what, exactly, are you trying to make? [05:26] Nuck: It's secret, but it involves inheritance from the bottom up. [05:27] Nuck: That is, foobar inherits foo and bar [05:27] Nuck: It's child-parent instead of parent-child. [05:27] Nuck: The parent has no references to the child [05:27] AvianFlu: interesting [05:28] mscdex: hax [05:28] Nuck: I'm climbing inheritance up from child to parent to grandparent, then flattening down so I can use the array of inherited results. [05:29] Nuck: climbing is using recursing, but it has to split in two directions for each inheritance. [05:30] Nuck: The hardest part is resolving the differences between the two inheritance sets into one elegant result :/ [05:30] e6nian: `async.forEach(arr, iterator, callback)`, which the callback won't be called. my code is here http://pastebin.com/KA2Aa0iz [05:30] jed_ has joined the channel [05:31] sechrist_ has joined the channel [05:31] m0s_ has joined the channel [05:32] AvianFlu: is that one of the ones that only calls the callback on error? [05:32] AvianFlu: it's not, nevermind [05:33] e6nian: AvianFlu: due to the document, it says both finish forEach,and an error ocurred would call the callback [05:33] AvianFlu: yeah, I just checked that too [05:34] jed_ has joined the channel [05:37] AvianFlu: e6nian: you have to pass the callback to your iterator too! [05:37] AvianFlu: so say the docs, anyway [05:37] e6nian: AvianFlu: even I don't wanna do anything? [05:37] temp01 has joined the channel [05:38] AvianFlu: the docs make it seem like it calls it when it's done [05:38] e6nian: AvianFlu: I'll try,thanks [05:40] Circlefusion has joined the channel [05:40] mscdex: hrmm i wonder if hp is waiting for node 0.6 to be released before they upgrade from 0.2.x :/ [05:43] zilch has joined the channel [05:43] AvianFlu: mscdex: I saw creationix demo a webos device that he put a debian chroot on that was running node v0.4.latest at the time :) [05:44] Nexxy: is there anything but the pixi? [05:44] Nexxy: lol [05:44] mscdex: yeah i thought about that, but then existing apps get messed up, unless you provide a shim [05:44] mscdex: Nexxy: i have the touchpad :-) [05:44] halfhalo: mscdex: good man. [05:44] Nexxy: what processor does it have? [05:44] mscdex: some dual core qualcomm chip [05:45] halfhalo: 1.2GHz dual core [05:45] halfhalo: well, mine is overclocked to 1.8 :p [05:45] jakeg has joined the channel [05:45] Nexxy: I want node on something with a tegra 2 [05:45] Nexxy: ... or something [05:45] mscdex: heh [05:45] e6nian: AvianFlu: that works [05:45] mscdex: i think you can get node on android... but you have to be rooted and set everything up [05:46] mscdex: with webos, it's built-in, which was one the major factors in my purchase [05:46] AvianFlu: e6nian: nice! [05:46] Nuck: Jeebus async recursion is headachy. [05:46] AvianFlu: mscdex: I love that they used the contra code for that [05:46] halfhalo: mscdex: you can build node for arm and run the executable on device fine, but you can't upgrade the exisiting one without breaking stuff [05:46] mscdex: yeah for developer mode, there's another code that opens that too, some date or something [05:47] halfhalo: webos20090606 [05:47] mscdex: halfhalo: exactly, which is kinda useless unless you don't mind just using it yourself [05:47] halfhalo: ACTION should point out he is interning at palm working on nodey stuff. [05:48] mscdex: i find it funny how they think 0.4.x is unstable compared to 0.2.3, considered 0.2.3 was on the of the 0.2.x versions where the repl crashes during exit [05:48] hippich has joined the channel [05:48] hippich has joined the channel [05:48] clifton has joined the channel [05:48] tmzt: is debugger working any better? [05:49] mscdex: maybe i'll give compiling 0.4.x on it a go [05:49] tmzt: mscdex: you woldn't need root to run node on android [05:49] halfhalo: ACTION has done it before [05:49] liquidproof has joined the channel [05:50] mscdex: i'm guessing i'd have to cross-compile or something right? [05:50] konobi: mscdex: yeah... it pretty easy though [05:50] jetienne_ has joined the channel [05:50] halfhalo: howtonode has an article on setting up an ubuntu chroot on device, then you could build it on device [05:50] konobi: http://fastr.github.com/articles/cross-compiling-node.js-for-arm.html [05:51] mscdex: holy moley, that's "easy" ? :-p [05:51] mscdex: that's for an old version of node.... hopefully things are better now, with cmake ? [05:52] konobi: it's old as well... but should be updatable [05:52] halfhalo: ACTION votes ubuntu chroot. then its as easy as "./configure;make" inside it [05:53] mscdex: halfhalo: i don't see the article for setting up an ubuntu chroot on howtonode :S [05:54] halfhalo: http://howtonode.org/arm-chroot-fun [05:54] pen has joined the channel [05:54] konobi: http://d.hatena.ne.jp/forest1040/20110318/1300460817 [05:55] Generic_Dumbass has joined the channel [05:56] odie5533: I am getting screwed by the this keyword in javascript. [05:56] AvianFlu: odie5533: are you losing scope? [05:56] odie5533: constantly =/ [05:57] xat- has joined the channel [05:57] AvianFlu: so at the top do a var self = this and then refer to self the rest of the way down [05:57] odie5533: I have my main file. Which has a function () {}. I always want that function's scope [05:57] SamuraiJack has joined the channel [05:57] odie5533: I did that and it's still getting messed up [05:57] AvianFlu: or anything else besides 'self' [05:57] confoocious has joined the channel [05:57] confoocious has joined the channel [05:57] odie5533: I always want that one function's scope. It's like my main class [05:58] odie5533: So in that function I have one var, which is a constant. then all the other variables I have as this.var = ...; and then for functions I have this.name = function() { //using this in the function}; [05:58] odie5533: Is this the correct method to use? [05:59] AvianFlu: you need to do a var self = this, and then everything else needs to be self.property self.method whatever [05:59] AvianFlu: that keeps the scope [05:59] odie5533: for the entire class? [05:59] odie5533: and I use the term class loosely =/ [05:59] AvianFlu: yeah [06:00] odie5533: Is there an example somewhere I can follow? [06:00] tmzt: mscdex: ubuntu chroot with qemu-arm-static [06:00] tmzt: :) [06:00] odie5533: most of the stuff I looked at are libraries which use a different scheme since they have to expose everything [06:00] AvianFlu: I can show you a few [06:00] AvianFlu: http://github.com/hookio/irc is set up like that [06:01] ogopogo has joined the channel [06:01] AvianFlu: basically 'this' is a keyword that always refers to the current scope, but you can set it whenever you want, and normal variables persist [06:02] AvianFlu: rather, you can assign it [06:02] AvianFlu: I used the wrong word [06:02] cconstantine_ has joined the channel [06:02] odie5533: Why do you use IRC.prototype.functionName instead of var IRC = function() { this.functionName = function() {} };? [06:03] ruprict has joined the channel [06:04] davidbanham has joined the channel [06:04] simenbrekken has joined the channel [06:04] cconstantine_: could someone try installing and using the 'pam' module in npm? I'm having a hard time using it and don't really understand the problem [06:04] ogopogo has joined the channel [06:04] AvianFlu: odie5533: simpler example: https://gist.github.com/1139004 [06:05] AvianFlu: odie5533: hook.io convention [06:05] AvianFlu: also, one giant function is bad moho [06:05] AvianFlu: s/moho/mojo/ [06:05] odie5533: uh... why? [06:06] AvianFlu: preference [06:06] AvianFlu: I like prototypical inheritance; I dislike extra levels of nesting [06:06] mosen: I got caught out by util.inherits, expecting the prototype to be merged but it got replaced :) [06:06] odie5533: AvianFlu: Most languages the standard is nesting, right? [06:07] odie5533: I like nesting because it makes sense. It makes sense to the compiler too. Otherwise all your objects are dynamic, like in JavaScript.. [06:07] AvianFlu: ...which is what we're currently talking about, no? [06:07] mscdex: odie5533: the reason is that the first way, using prototype, allows you to share one copy of the functions among all instances, whereas with the second method, it will make a copy of each function for each instance [06:08] cconstantine_: nevermind, I figured it out. Turns out I can't read :-/ [06:08] odie5533: oh that makes sense [06:08] mscdex: odie5533: sharing functions is better [06:08] odie5533: Is there other 'good' code I could look at? [06:09] mosen: I was reading vows.js the other day and it was alien to me, but very smart :) [06:10] odie5533: https://github.com/caolan/async/blob/master/lib/async.js uses var async = {}, and then assigns to it using async.functioName = function(){...};. How does this compare to using prototype? [06:10] SamuraiJack has joined the channel [06:12] mscdex: odie5533: i haven't used that module, but my guess from just looking at that file is that it's a singleton [06:12] JakeyChan_ has joined the channel [06:12] JakeyChan_ has left the channel [06:13] mscdex: odie5533: so `async` isn't a class that's meant to be instantiated [06:13] AvianFlu: it's also dual-sided, which might be part of it [06:13] AvianFlu: but yeah, some libs you only need one of, some you need to instantiate [06:13] AvianFlu: that's a big part of when to use prototypes [06:14] dmwuw has joined the channel [06:16] jetienne_ has joined the channel [06:16] davidascher has joined the channel [06:17] JakeyChan_ has joined the channel [06:17] zilch has joined the channel [06:17] loob2 has joined the channel [06:18] davidban_ has joined the channel [06:21] raidfive has joined the channel [06:21] bobbi2004 has joined the channel [06:21] dnjaramba has joined the channel [06:23] blueadept: anyone know how i can get a listing of forever processes once they are initated by this function? http://pastie.org/private/uiwxg4tbcj9ptogqrv08a [06:24] robotmay has joined the channel [06:24] AvianFlu: try child.list()? [06:24] AvianFlu: also, `child` won't be visible outside that function, in your pastie [06:25] AvianFlu: oh wait, hang on [06:25] liar has joined the channel [06:25] blueadept: well the processes still exist outside of the function [06:25] blueadept: it's just starting them up from there [06:26] AvianFlu: yeah I misread the pastie [06:27] AvianFlu: for one thing, it looks like forever.list() can take a callback [06:27] blueadept: yeah i tried that i thought, hm let me try again [06:27] Emmanuel`: anyone tried Forrst ? [06:27] AvianFlu: the docs also say "Only processes which have invoked forever.startServer() will be available from forever.list()" [06:27] meso has joined the channel [06:28] AvianFlu: ACTION usually uses forever via CLI : / [06:28] blueadept: hmm yeah i saw that [06:28] blueadept: hm [06:28] blueadept: let me rework this [06:29] blueadept: "has no method 'startServer' [06:29] AvianFlu: must be old docs [06:29] AvianFlu: give me a moment [06:29] blueadept: maybe it's startDaemon [06:30] blueadept: doesn't work either [06:30] AvianFlu: if you use forever.monitor, you can listen for the child process exit events yourself [06:30] AvianFlu: for one thing [06:33] AvianFlu: I think programmatically, the events may be your best bet [06:33] apanda has joined the channel [06:33] blueadept: looking at the function right now, i think i got it [06:33] yozgrahame has joined the channel [06:35] garrensmith has joined the channel [06:36] garrensmith: morning all [06:37] shapeshed has joined the channel [06:38] blueadept: AvianFlu: got it! [06:38] AvianFlu: what solved it? [06:38] blueadept: child.on('start', function(callback?.. [06:38] blueadept: had to put that before child.start [06:38] AvianFlu: nice [06:39] groom has joined the channel [06:39] jetienne_: cluster is simpler no ? [06:39] jetienne_: just wondering [06:41] ironlad has joined the channel [06:41] zilch has joined the channel [06:42] JakeyChan_ has joined the channel [06:42] Murugaratham has joined the channel [06:43] davidbanham has joined the channel [06:43] andrewfff has joined the channel [06:44] jetienne_: (it take a while to learn all the key shortcut on macoxs) [06:45] davidbanham: Is there a canonical way to filter an array so it only contains unique values? It just feels like the kind of thing that there's an obvious way to do it, but I'm missing it. [06:46] jetienne_: davidbanham: look at Array reduce [06:46] Emmanuel`: map the value to keys [06:46] jetienne_: oh i misunderstood the question [06:48] Emmanuel`: davidbanham: create an associative array using the values of your original array as key [06:48] bbrandon has joined the channel [06:48] Emmanuel`: then retrieve the keys [06:48] Emmanuel`: there is prolly a better way, but that should work [06:48] ccare has joined the channel [06:48] AvianFlu: there are always a few ways :) [06:48] davidbanham: Emmanuel`: Thanks, I think I get what you mean. I'll hack at it and see what comes out. [06:49] jetienne_: Object.keys() can do the Object to Array back [06:49] yhahn has left the channel [06:51] pyrotechnick has joined the channel [06:51] Generic_Dumbass has left the channel [06:53] `3rdEden has joined the channel [06:53] blueadept: AvianFlu: hey i found the section of code here, http://pastie.org/private/uiwxg4tbcj9ptogqrv08a , when it says list ( format, procs) , what exactly does it mean? [06:54] zilch has joined the channel [06:54] mikeal has joined the channel [06:55] davidbanham: Emmanuel`: This is what you were suggesting, correct? Seems to work great, thanks. [06:55] Nexxy_ has joined the channel [06:55] Nexxy_ has joined the channel [06:55] davidbanham: https://gist.github.com/1139047 [06:56] AvianFlu: I'm pretty sure you don't need to worry about the format stuff [06:57] AvianFlu: but let me have a look [06:57] AvianFlu: (it' s probably for the cli tool) [06:58] AvianFlu: yeah, if you don't want to format it it just returns the procs [06:58] `3rdEden has joined the channel [06:59] rc1140 has joined the channel [06:59] clifton has joined the channel [06:59] blueadept: hm [06:59] AvianFlu: so yeah, that's a docco misprint [06:59] AvianFlu: forever.list(true, cb) [06:59] AvianFlu: WHOOPS [06:59] AvianFlu: forever.list(false, cb) [07:00] AvianFlu: you don't want pretty-printed output lol [07:00] AvianFlu: the first arg is a boolean, set it to false so you just get the procs back in your callback [07:00] AvianFlu: although it returns... [07:00] ttpva has joined the channel [07:00] blueadept: getting null [07:01] AvianFlu: that's the err arg [07:01] AvianFlu: it's err, procs [07:01] Charuru has joined the channel [07:01] JakeyChan: hi, I want to create REST sever but never did it . [07:01] JakeyChan: :) [07:01] blueadept: ah [07:01] JakeyChan: do you have any document or example how me ? [07:02] sechrist has joined the channel [07:02] JakeyChan: show [07:02] AvianFlu: http://nodejs.org/docs/v0.4.10/api/http.html#http.Server [07:03] blueadept: AvianFlu: so shouldn't this show me the processes? http://pastie.org/private/uiwxg4tbcj9ptogqrv08a [07:03] raphdg has joined the channel [07:03] mraleph has joined the channel [07:04] AvianFlu: that looks good, is it undefined? [07:04] blueadept: null [07:04] blueadept: if i do child.on('start', function(err,ok){ console.log(ok) it'll show me the processes [07:05] blueadept: but that's from within the child function [07:05] blueadept: hm [07:05] Emmanuel`: davidbanham: I'm actually surprise it is that simple [07:05] uchuff has joined the channel [07:05] fille has joined the channel [07:06] davidbanham: Emmanuel`: Yeah so was I. I'm waiting to find out how it's broken :p [07:06] blueadept: http://pastie.org/private/uiwxg4tbcj9ptogqrv08a this is what i have [07:06] fille: alloha [07:06] Nexxy_: fille, that spells "aholla" backwards [07:07] blueadept: ah wait a minute [07:07] blueadept: i think i'm calling the function too early [07:07] Emmanuel`: your code is better than what I said, you didn't use an associative array, just a regular array [07:08] Emmanuel`: problem is, if you have value 2090 in your list [07:08] Emmanuel`: you will get an array of length 2091 [07:08] Emmanuel`: and [07:09] mscdex: ACTION shakes a fist at Windows for using CRLF in cmd.exe instead of LF! [07:09] AvianFlu: blueadept: that's not your whole file, is it? [07:09] Emmanuel`: that works differently if your indices are not integer (but it still works) [07:09] blueadept: nope, but wait i think i got it [07:10] blueadept: damn, i guess not [07:10] blueadept: i even set the forever.list in a setinterval of 5 seconds, and it still came back null [07:10] blueadept: let me post all the code [07:11] ogopogo has joined the channel [07:11] blueadept: http://pastie.org/private/uiwxg4tbcj9ptogqrv08a [07:11] AvianFlu: advice: don't time stuff for stuff like this [07:11] ablomen has joined the channel [07:11] AvianFlu: the clock and real-world events have a habit of not lining up how you'd like [07:11] AvianFlu: finding the right event or the right callback is usually better [07:12] blueadept: i see [07:12] AvianFlu: yeah, I think you're trying to list before the processes are spawned [07:12] blueadept: yep [07:13] Nuck: God this code is gonna take a few days to do [07:14] blueadept: so i should create a listener to catch the callback? [07:14] davidbanham: Emmanuel`: Yeah, I see what you mean. I'll keep fiddling with it. In this application my indicies should always be integers, and having a super-long array length shouldn't actually matter, but it feels wrong. [07:14] blueadept: then post it to console [07:14] CStumph has joined the channel [07:14] Nuck: Coding recursion always gives me headaches :P [07:14] idefine: any reason why namedscopes should not be visible to the query object in mongoose? [07:14] zilch has joined the channel [07:14] ogopogo has left the channel [07:14] topaxi has joined the channel [07:16] AvianFlu: blueadept: you need to figure out a way to wait until all your children spawn [07:17] blueadept: right, like call it from a post function or something like that [07:17] blueadept: or a remote function perhaps [07:17] AvianFlu: you can count them if you want to, or use the async lib for one of the methods with a final callback [07:17] AvianFlu: there are a bunch of approaches, depending on what you need [07:18] AvianFlu: I'm pretty sure async.forEach would let you do that [07:18] blueadept: cool, ty for the help [07:18] mscdex: yay, compiling node in ubuntu chroot :D [07:19] AvianFlu: async.forEach(array, function(item, cb) {}, function cb(err) {} ) [07:19] AvianFlu: mscdex++ [07:19] catb0t: mscdex now has 1 beer [07:19] v8bot_: AvianFlu has given a beer to mscdex. mscdex now has 4 beers. [07:24] aperiodic has joined the channel [07:24] random123: If you had a high volumn, would it be preferable to use Node.js to serve pages (server side part not static css, etc.), or just Comet type functionality? [07:24] simenbrekken has joined the channel [07:26] TomY has joined the channel [07:26] hybsch has joined the channel [07:28] __tosh has joined the channel [07:32] hlindset has joined the channel [07:32] e6nian: `npm update socket.io` not working ? the version still stay old [07:32] `3rdEden: npm install socket.io [07:32] `3rdEden: it should override the current installation :) [07:33] CIA-65: node: 03Christopher Wright 07v0.4 * r0d8d04e 10/ doc/api/fs.markdown : [07:33] CIA-65: node: Correct code span [07:33] CIA-65: node: Fixes #1489. - http://bit.ly/ptlB5H [07:33] booo has joined the channel [07:33] e6nian: `3rdEden: the npm help said update can update.. [07:33] `3rdEden: ;D [07:34] e6nian: `3rdEden: any good pattern on the socket.io client to check connection state and reconnect ? [07:35] CoverSli1e has joined the channel [07:36] e6nian: `3rdEden: the server debug log : transport end, and the reconnection in the client begin automatic,but it stay pendding on server respons [07:36] cognominal has joined the channel [07:38] `3rdEden: e6nian which transport are we talking about? [07:38] zilch has joined the channel [07:38] e6nian: `3rdEden: I don't know, I use socket.io in chrome. [07:38] `3rdEden: Also a pending state isn't that bad, as it could be that the server holds the requests untill it has data to send [07:39] e6nian: `3rdEden: I've try to update the socket.io version to test more. thank you for explain this [07:40] e6nian: `3rdEden: info - transport end [07:40] e6nian: set close timeout for client 933531982295685741 [07:40] e6nian: cleared close timeout for client 93***** [07:40] e6nian: cleared heartbeat interval for client 93 [07:41] damiano has joined the channel [07:41] damiano: hello everybody [07:41] damiano: i'm tring to organize my pages.... i'm doing something like: [07:42] damiano: app.get('/', pages.index()); [07:42] damiano: app.all('/contact', pages.contact()); [07:42] damiano: etc etc... [07:42] venom00 has joined the channel [07:42] venom00 has joined the channel [07:42] damiano: ooops wrong chan [07:42] damiano: sorry :) [07:43] hellp has joined the channel [07:43] Nuck: God [07:43] Nuck: My code is behaving really oddly. [07:44] StepanKuzmin has joined the channel [07:44] thirtysevenwasp has joined the channel [07:44] `3rdEden: e6nian that is normal-ish [07:44] Nuck: https://gist.github.com/cce78075d01034481b93 [07:44] `3rdEden: but if you get odd errors when reconnecting, that is been worked on atm [07:44] Nuck: Both the console.logs are the same :V [07:45] `3rdEden: as im rewriting it at [07:45] `3rdEden: atm* [07:45] Nuck: It's like obj isn't being changed somehow [07:45] industrial: Anyone here use flow-js ? I have trouble converting my code to flow-js. [07:45] industrial: https://gist.github.com/fa354eb0a779c5e41a48 [07:45] industrial: line 42-43 isn't going to work, since the user save needs to happen after every monster save, and it is a callback [07:46] industrial: also, line 15 and 47 nee to return the new user instead of action on the response (which isnt available in that function) [07:46] industrial: acting* [07:46] industrial: I have no idea how to do these things :\ [07:46] bripkens has joined the channel [07:46] aperiodic has joined the channel [07:51] e6nian: `3rdEden: I got the key point ! the default reconnection just reconnect the server,but not reconnect the namespaces? [07:51] Nuck: Can somebody help explain this odd behavior in JS> [07:52] idefine: would it make sense to expose the namedScopes to the query object (not only the model) in mongoose? [07:52] smtlaissezfaire has joined the channel [07:52] AvianFlu: Nuck: for the sake of argument, change them to console.error [07:52] Croms has joined the channel [07:54] AvianFlu: also, nuck, I think you're trying to do too much at once here [07:54] cosmincx has joined the channel [07:54] Nuck: http://jsfiddle.net/Hqp4S/2/ [07:54] Nuck: What do you mean? [07:55] Nuck: This is an inheritance system I'm trying to build :/ [07:55] AvianFlu: the recursion with an async.forEach inside of it [07:55] Nuck: And yes, that is an emulation of mongo :P [07:55] AvianFlu: it just seems like it has a lot of potential to spin out of control [07:55] Nuck: AvianFlu: It does, I know. [07:55] Aiden has joined the channel [07:56] AvianFlu: I feel like you could spread some of it out a little, conceptually speaking [07:56] AvianFlu: and have an easier time with it [07:56] Nuck: Huh? [07:56] Nuck: It recursively climbs up the inheritance tree [07:56] Nuck: But a might inherit 5 things. [07:56] Nuck: So I need to check what they all inherit [07:57] Nuck: AvianFlu: I don't see how I could split it up or anything. [07:57] cpetzold has joined the channel [07:58] lamlam has joined the channel [07:58] jetienne_: industrial: use a simpler library [07:58] _bat has joined the channel [07:59] _bat: wow, node-gitteh rocks https://github.com/libgit2/node-gitteh [07:59] jetienne_: _bat: just curious, what is your usecase for it ? [07:59] _bat: I was able to pull out package.json from .git after only a couple of minutes of playing with it in a repl, while looking at an example [08:00] curtischambers has joined the channel [08:00] temp01 has joined the channel [08:00] _bat: jetienne_: versioning json data [08:00] NetRoY has joined the channel [08:01] jetienne_: _bat: why not use the cmdline for that ? [08:01] industrial: jetienne_: such as? [08:01] _bat: jetienne_: the command line is a pain [08:01] jetienne_: _bat: no need for binding, no special version of node with a native extension which can core [08:01] _bat: jetienne_: not because of unix, because of git [08:02] jetienne_: _bat: ok [08:02] _bat: jetienne_: node isn't java, at least not the way I use it [08:02] jetienne_: industrial: node-seq for example [08:02] _bat: jetienne_: it's only the same type of extension that gets installed with expresso [08:03] jetienne_: _bat: what do you mean node is not java ? [08:03] _bat: people have complained about it but the fact it's still popular shows it isn't that big of a deal [08:03] damiano: excuse me guys, i get this error: https://gist.github.com/1139137 but i don't understand WHERE is the error :) [08:03] _bat: no 100% pure dogma [08:03] larssmit has joined the channel [08:03] jetienne_: _bat: personnaly i dont like package which can make node core, just because when it cores, you dont know which extensions did it [08:04] lamlam has joined the channel [08:04] jetienne_: _bat: this is why i asked. but i respect your choise [08:04] ttpva: hi. is there a good list of Node.js tutorials? [08:04] _bat: jetienne_ that's why I run things like this in a separate worker process [08:04] lamlam: do any of you remember litropy? [08:05] jetienne_: _bat: oh ok, good idea [08:05] _bat: jetienne_ it's a lot like running the git command line in a child process [08:05] whitman has joined the channel [08:05] damiano: fixed :) [08:06] jetienne_: _bat: indeed [08:06] Nuck: No matter how hard I look at this code I can't find how it's breaking :V [08:06] altamic has joined the channel [08:06] AvianFlu: nuck: try to break out the nested callbacks and simplify the recursion [08:06] Nuck: It looks like an overwrite but it isn't one :/ [08:06] jetienne_: ttpva: howtonode, nodebeginner, dailyjs are the 3 coming to mind [08:06] _bat: here's the expresso/jscoverage issue https://github.com/visionmedia/expresso/issues/110 [08:07] ttpva: jetienne_: thanks [08:07] Nuck: AvianFlu: I don't do anything but nested callbacks and there's no way to simplify recursion. [08:07] Nuck: I need to recurse for it to work. [08:07] Nuck: And that's not a lot of callbacks, it's only 3 in. [08:08] blueadept: AvianFlu: would you know why this doesn't work either? http://pastie.org/private/uiwxg4tbcj9ptogqrv08a [08:08] damiano: how to print all the error with express? [08:08] blueadept: i'm calling it from get but still get null [08:08] jetienne_: damiano: look in the doc, there is a logger for that [08:08] damiano: logger? [08:08] damiano: express logger? [08:08] larssmit has left the channel [08:08] fcambus has joined the channel [08:08] ttpva: one more question, how to keep updates of what's new on node? [08:09] mattp_ has joined the channel [08:09] jetienne_: damiano: yep something usual done in dev env. i dont remember exactly [08:09] smtlaissezfaire has joined the channel [08:09] AvianFlu: blueadept: second arg again? [08:09] blueadept: ahh [08:10] Murugaratham has joined the channel [08:10] damiano: i mean....when new Error() is called i get this with a function but i only print INTERNAL SERVER ERROR...but i need to know what error......express logger shown http logs [08:10] jetienne_: ttpva: nodeup is a podcast, dailyjs or the one from github [08:10] fly-away has joined the channel [08:11] jetienne_: damiano: dunno [08:11] damiano: a printestack o something similar [08:11] AvianFlu: damiano error.stack maybe? [08:11] AvianFlu: i.e. console.log(error.stack) [08:11] damiano: ok [08:11] damiano: i see [08:11] damiano: :) [08:12] _bat: ttpva http://www.planetnodejs.com/ [08:12] idoru has joined the channel [08:12] jetienne_: nice i wasnt aware of this one [08:12] ttpva: thanks [08:12] damiano: AvianFlu, no [08:13] damiano: i done err.stack where err is the Error instance (Express.js) [08:13] damiano: i don't see nothing [08:13] industrial: jetienne_: I will try again now using seq [08:14] AvianFlu: are you trying to see this error in the browser? [08:14] AvianFlu: or on your console [08:14] idefine: Nuck, what is the issue that you're seeing? [08:14] pen has joined the channel [08:14] jetienne_: industrial: it has a nice simple API. so nice, i copied it for my own lib [08:14] damiano: no [08:15] damiano: console.log(err.stack) [08:15] damiano: wow [08:15] damiano: i done [08:15] damiano: -stack() [08:15] damiano: and it works [08:15] damiano: and i see this error on the browser �_� [08:16] damiano: console.log(err.stack()); [08:16] damiano: why on the browser? [08:16] idefine: Nuck: take your var obj = {} out of the function [08:18] idefine: Nuck: here you go: http://jsfiddle.net/dGq6j/ [08:18] Nuck: idefine: That makes no sense. [08:18] Net_RoY has joined the channel [08:19] _bat: jetienne_ I never got around to mentioning why I was looking at node-gitteh *now*: http://stackoverflow.com/questions/7017712/using-git-to-release-to-node-js/ [08:19] mpavel has joined the channel [08:19] jetienne_: looking [08:19] idefine: Nuck: what is the result suppose to look like? [08:19] booo: hi, i want to generate events from an async c++ binding. are there any good examples how to do this? [08:19] Nuck: idefine: That fixes it, but not properly :/ [08:19] _bat: Malvolio (the stack overflow user) seems to have an interesting use case for git [08:19] Nuck: Since I'm gonna be calling on resolveDependencies repeatedly [08:19] Nuck: idefine: That's the proper result [08:19] augustl: shelling out to the rescue [08:19] Nuck: But the wrong way to get to it :V [08:20] Nuck: And that ought not to change anything. [08:20] _bat: I don't *quite* understand it, but it sounds cool. I think there might be a UI involved that's omitted from the post. [08:20] odie5533: can anyone exaplin what the purpose of this.Suite.prototype = new(function () { }); is? [08:20] odie5533: from https://github.com/cloudhead/vows/blob/master/lib/vows/suite.js [08:20] AvianFlu: that's a constructor [08:20] thalll has joined the channel [08:21] jetienne_: _bat: you got that many releases that you can keep it on disk ? [08:21] odie5533: Why would vows use that instead of the prototype method like this.Suite.prototype.reset ? [08:21] jetienne_: _bat: i mean why doing the git dynamically [08:21] shinuza has joined the channel [08:22] jetienne_: maybe i dont understand your case at all ;) [08:22] shinuza has joined the channel [08:22] _bat: jetienne_ for my versioning json data use case, or for the use case in the post? that isn't me asking the question; I'm answering it [08:22] clifton: i can "nc [host] [port]" and it works, but if i use net.createConnection its throwing "Error: EADDRNOTAVAIL, Can't assign requested address" [08:22] jetienne_: _bat: ah ok [08:22] clifton: anyone have an idea why that might be [08:22] _bat: _bat is an abbreviation of Ben Atkin [08:22] odie5533: AvianFlu: any thoughts? [08:24] jetienne_: coffee time [08:24] AvianFlu_ has joined the channel [08:24] mikedeboer has joined the channel [08:25] AvianFlu: goddamn internet [08:25] odie5533: AvianFlu: Why would vows use that instead of the prototype method like this.Suite.prototype.reset ? [08:25] AvianFlu: cause it's not a method, it's the constructor [08:26] odie5533: all the details are in that constructor [08:26] odie5533: all the methods I mean [08:26] odie5533: I thought it's a bad idea to have one giant method [08:26] _bat: odie5533 it's just a different class definition pattern [08:26] odie5533: does it create copies of the methods for every object created? [08:27] AvianFlu: you're looking at a prototype defined as an object literal [08:27] AvianFlu: and it's not always bad to have one giant object, I just said it was bad mojo before cause I write differently [08:27] _bat: odie5533 I would use util.base and util.inherits if I wanted to support inheritance [08:28] AvianFlu: you can either define method prototypes or one object prototype with methods in it, I'm not sure if there's much of a difference [08:28] luke` has joined the channel [08:28] AvianFlu: the biggest difference is just instantiation vs. one singleton object [08:29] mikeal has joined the channel [08:29] AvianFlu: var obj = {} is a singleton that would get copied, as opposed to a prototyped object, which is really closer to a class definition [08:29] AvianFlu: although prototypes aren't really classes [08:31] zilch has joined the channel [08:31] sebastianedwards has joined the channel [08:31] odie5533: Did they sit down at a table and think "How can we make this as confusing as possible" [08:32] AvianFlu: it's just different, you'll get used to it [08:32] benvds has joined the channel [08:32] Yuffster_work has joined the channel [08:32] AvianFlu: javascript is very flexible, which makes it confusing [08:32] AvianFlu: until you get used to being able to do all sorts of weird shit, then it's cool [08:32] dnjaramba has joined the channel [08:33] sebastianedwards has joined the channel [08:35] _bat: odie5533 it's not that confusing to me. what you wind up with is an object that has properties. try new(function(){this.x=0;}) [08:36] AvianFlu: exactly. 'new' is a way to make a copy of the imaginary 'prototype', which is only really a blueprint [08:36] AvianFlu: {} is an empty blueprint [08:36] _bat: it also has a unique __proto__ [08:36] _bat: ({x:0}) has a not-so-unique __proto__ [08:36] sebastianedwards has joined the channel [08:36] mendel_ has joined the channel [08:37] sebastianedwards has joined the channel [08:37] temp02 has joined the channel [08:37] odie5533: is there a difference between this.Foo = function() { }, function Foo() { }, and var Foo = function() { }? [08:38] Emmanuel`: I assume the first one will make Foo a method of your class [08:38] konobi: odie5533: http://ejohn.org/apps/learn/ [08:38] odie5533: oo it's advanced :) [08:38] AvianFlu: the first is an object method, the second is a regular function definition, and the third is a closure. :) [08:38] konobi: that's a great resource to learn a lot of this sort of stuff [08:39] robhawkes has joined the channel [08:39] _bat: it reminds me of self-executing anonymous functions. I like the style of https://github.com/substack/js-traverse/blob/master/index.js and would toss in util.base() and util.inherits() if I wanted an object hierarchy but I certainly don't mind the new(function() {}) pattern [08:41] _bat: I don't see module.exports at the top much but it works. even on IE6 (wrapped with browserify). [08:41] AvianFlu: If you start acting like IE6 doesn't exist, it will go away. [08:41] Lorentz: What IE6 [08:42] _bat: haha [08:42] industrial: jetienne: pm [08:42] sebastianedwards has joined the channel [08:42] smtlaissezfaire has joined the channel [08:43] odie5533: IE6 is an internet browser. Standards are irrelevant. All I want to do is browse the internet. [08:43] liquidproof has joined the channel [08:44] Net_RoY has joined the channel [08:45] blup has joined the channel [08:46] Nuck: ooh watching the video of ryan talking about 0.5's roadmap at jsconf/nodeconf [08:46] konobi: odie5533: I'm sorry odie553, did you just tell me to go fuck myself!? [08:46] Nuck: I like the idea of what's after Windows compatibility [08:46] damiano: guys is useful to have a .js file with the configuration like mysql user, password then email ecc ecc [08:46] odie5533: konobi: can you read minds? =P [08:46] kulor-uk has joined the channel [08:46] markwubben has joined the channel [08:46] damiano: or i only should add this information using app.set('mysql host', '127.0.0.1') etc etc [08:46] damiano: ? [08:47] sebastianedwards has joined the channel [08:47] Nuck: ACTION plops down and watches odie5533 and konobi try to kill each other. [08:47] fyskij has joined the channel [08:47] odie5533: konobi: I'm reading the advanced stuff still. Planning for a minor world takeover. [08:47] konobi: odie5533: http://browsertoolkit.com/fault-tolerance.png [08:48] industrial: hehehe [08:48] Nuck: konobi: lol that's awesome [08:48] AvianFlu: damiano maybe look at http://github.com/indexzero/nconf [08:48] damiano: i see [08:48] damiano: thanks [08:49] Nuck: I hate that idea of "Query? Noooo, you map-reduce!" [08:49] Marak has joined the channel [08:49] odie5533: nodeconf: a configuration library named after a conference. [08:49] Nuck: And that's why I use Mongo :D [08:49] Marak: Hi, I'm here for my refund. [08:49] Marak: AvianFlu? [08:49] Nuck: Marak: ... WAT [08:49] AvianFlu: odie, it's not nodeconf, it's nconf [08:50] damiano: AvianFlu, something strange... why this? nconf.use('file', { file: 'path/to/your/config.json' }); [08:50] odie5533: i demand it be renamed [08:50] Matt_ has joined the channel [08:50] damiano: i need to store the values ONE time [08:50] Marak: damiano: why not? [08:50] damiano: not all time time i launch the script [08:50] Marak: damiano: use once, you cool [08:50] damiano: because i need a file to store variables [08:50] __doc__ has joined the channel [08:50] Marak: damiano: load once, then require('nconf'), you cool [08:51] damiano: Marak, do you mean i hve to remove this row after the first time ? [08:51] Marak: damiano: yeah totally [08:51] jetienne_ has joined the channel [08:51] damiano: Marak, also this [08:51] damiano: nconf.save(function (err) { [08:51] damiano: i dont have to use it [08:51] Marak: damiano: that is async save [08:52] Marak: .save only if you want to go to disk [08:52] Marak: in memory, ok [08:52] AvianFlu: damiano if you don't do the file stuff it's in-memory only [08:52] damiano: the code under USAGE [08:53] damiano: if i put that code in a .js file [08:53] damiano: it mean that each time save these variables on the file i choose ? [08:53] Marak: damiano: if you want to save to disk [08:53] zilch has joined the channel [08:53] pickels has joined the channel [08:53] Marak: damiano: or else it wont save to disk [08:53] Marak: damiano: not a database, configuration manager [08:53] Guest80212: Hi all! I've a problem an i'd like to ask to you. I'm trying to install node on Windows 7 x64, but when i try to install it I stack when I try to "./configure" the make. I got the Unable to Remap to Same Address as Parent error, so I have tryied to reinstall rebaseall from cygwin setup, but the error still caming up when i try to "./configure". Can someone help me please? [08:53] damiano: ok [08:54] jbpros has joined the channel [08:54] Marak: damiano: also, can work with redis [08:54] Nuck: Guest18468: You didn't run rebaseall [08:54] Nuck: Guest18468: You need to go into c:\cygwin\bin, and run zsh [08:55] Nuck: Then from that console, you run rebaseall [08:55] Guest80212: Nuck: When I try to run it from bin\ash.exe typeing "/bin/rebaseall -v" it says that rebaseall could'nt be found [08:55] benvds has joined the channel [08:56] AvianFlu: I keep reading that as 'rebaseball' [08:56] __tosh has joined the channel [08:57] damiano: Marak, redis for very few variables seems to be too much [08:57] damiano: no? [08:57] matyr has joined the channel [08:57] Marak: damiano: yes, for most case, file is good. [08:57] Marak: damiano: i use nconf for hook.io, works very well [08:57] hlindset has joined the channel [08:57] Guest80212: Nuck; I have no zsh.exe or config file inside the bin folder [08:57] Marak: damiano: also use nconf for entire @nodejitsu stack, works good [08:57] hlindset has joined the channel [08:58] damiano: perfect [08:58] damiano: i will use it [08:58] damiano: for express.js [08:58] Marak: good luck! [08:58] Marak: if issue, open up Github issue [08:59] Marak: refunds are available at /dev/null [08:59] Nuck: hmmm [08:59] Nuck: O [09:00] Nuck: I'm just gonna sleep on this code and see if I come up with something. [09:00] damiano: Marak, i will load the variable on memory [09:00] Marak: codesmosis [09:00] damiano: i only have max 10 variables [09:00] damiano: i don't think i will burn all the memory [09:00] damiano: :D [09:00] Marak: damiano: should work great [09:01] astropirate has joined the channel [09:04] Guest80212: Ok, it seems that I've solved my problem [09:04] bzinger has joined the channel [09:05] TomY has joined the channel [09:06] StepanKuzmin has joined the channel [09:07] mendel_ has joined the channel [09:08] damiano: Marak, if i use "memory" when i require nconf in another .js file the variabile will always be visible [09:08] damiano: right? [09:08] bergie has joined the channel [09:10] Marak: damiano: sure [09:11] damiano: k [09:11] damiano: so i can create config.js [09:11] damiano: with nconf object [09:11] damiano: and for other .js i can export this object [09:11] damiano: correct? [09:11] Guest80212: Ok, new problem: When i run configure when installing node.js it succeed without errors, But when I run "make" it throws and task failed (err #2): {task: libv8.a SConstruct -> libv8.a}, so as the wiki says i've run "export SHELL=/bin/bash", I've closed and reopened the cygwin bash console and retryied to "make", But it throws the same error anyway. Cananyone help me? ç.ç [09:11] andrewfff has joined the channel [09:13] Guest80212: In particular, g++ says that he cannot found obj/release/snapshot.c [09:13] shapeshe1 has joined the channel [09:14] ceej has joined the channel [09:14] damiano: Marak, i mean: https://gist.github.com/1139222 [09:14] damiano: right ? [09:14] Marak: damiano: naah [09:14] Marak: damiano: no need to export [09:15] Marak: just require('nconf') again i think [09:15] Marak: .set() is scoped to module [09:15] Marak: so require module, get scope? [09:15] damiano: really? [09:15] damiano: good! [09:15] damiano: ok i remove exports.conf = nconf; [09:15] fyskij has joined the channel [09:15] Marak: yes [09:16] Marak: damiano: also #nodejitsu is good for nodejitsu projects [09:16] Marak: less noise in there for halp [09:17] hellp has joined the channel [09:18] thalll has joined the channel [09:19] saikat has joined the channel [09:19] Guest80212: Ok, new problem: When i run configure when installing node.js it succeed without errors, But when I run "make" it throws and task failed (err #2): {task: libv8.a SConstruct -> libv8.a}, so as the wiki says i've run "export SHELL=/bin/bash", I've closed and reopened the cygwin bash console and retryied to "make", But it throws the same error anyway. Cananyone help me? ç.ç [09:19] zilch has joined the channel [09:22] simenbrekken has joined the channel [09:25] icebox has joined the channel [09:26] Emmanuel`: you have to export SHELL=/bin/bash before running make [09:26] Emmanuel`: you can even do [09:26] Emmanuel`: export SHELL=/bin/bash make [09:26] Emmanuel`: wait [09:26] markwubben has joined the channel [09:26] Emmanuel`: SHELL=/bin/bash make [09:27] Guest80212: does the build have a cache? [09:27] Emmanuel`: yes [09:27] robotmay has joined the channel [09:27] Emmanuel`: you can make clean if you want to get rid of it [09:27] Emmanuel`: but you probably don't have too [09:27] Emmanuel`: it keeps track of what has been properly compiled before [09:27] Emmanuel`: so you don't compile that again on failure, or on minor modifications [09:28] andrewfff has joined the channel [09:28] Guest80212: Mh... so i am trying to make [09:28] Guest80212: it seems ok [09:28] zilch has joined the channel [09:28] deepredsky has joined the channel [09:28] Guest80212: I've run: [09:28] Guest80212: make clean [09:29] Guest80212: export SHELL=/bin/bash [09:29] Guest80212: make [09:29] Guest80212: it seems ok, but "never say cat before it's in the trap" [09:29] Wizek has joined the channel [09:30] Guest80212: No, same error :S [09:30] copongcopong has left the channel [09:30] Guest80212: No I will try SHELL=/bin/bash make [09:31] Guest80212: Same error also by running "SHELL=/bin/bash make" [09:31] Emmanuel`: you're trying to compile it for windows ? [09:31] Emmanuel`: (if yes, I have no idea how to help you) [09:32] Guest80212: g++: obj/release/snapshot.cc: No such file or directory [09:32] Emmanuel`: (because I haven't ever been developing under windows, because I cherish my sanity) [09:32] versicolor has joined the channel [09:32] Guest80212: Yeah, I am on windows because I don't care about my (in)sanity. xD [09:32] andrewfff has left the channel [09:32] dexter_e has joined the channel [09:33] temp01 has joined the channel [09:33] Guest80212: But I also have a Linux environment installed with grub on this PC [09:34] Emmanuel`: do you have all the -dev things require ? [09:34] Guest80212: Wich -dev= [09:34] Guest80212: -dev? [09:34] Guest80212: I've installed gcc4-core [09:34] Guest80212: gcc4-g++ [09:34] v8bot_: Guest80212 has given a beer to gcc4-g. gcc4-g now has 1 beers. [09:35] |Freeman| has joined the channel [09:35] Guest80212: Using setup.exe from Cygwin (1), install the following packages required to compile node.js: devel → gcc4-g++ [Builds v0.4.2 and earlier use gcc-g++] devel → git devel → make net → openssl libs → openssl-devel devel → pkg-config devel → zlib-devel python → python You may also want to install the following: * editors → vim or editors → nano for (4) below * web → curl if you wi [09:35] Guest80212: I've installed what the wiki says. [09:36] Guest80212: including curl [09:37] industrial: cygwin? really? didnt that die with open source virtual machines like .. 6-7 years ago? [09:37] clifton: okay so i got a pretty nice log tailer, but im creating a new readstream then piping on every time watchfile is called from a log [09:37] industrial: Just run virtualbox with linux, done. [09:37] clifton: its like 3 lines of control logic because im just taking advantage of pipe [09:37] balupton has joined the channel [09:38] Guest80212: If I have to emulate linux, I'll just move to my linux partition and check how to emulate Dreamweaver... if possible. xD [09:38] clifton: i assume i should just look at rys implementation of pipe and do something else with i [09:38] Guest80212: Or, is there any good html-php-javascrip editor opensource? [09:38] Guest80212: (don't tell me eclipse or maybe i'll kill you). xD [09:39] shapeshed has joined the channel [09:39] zilch has joined the channel [09:43] AvianFlu_ has joined the channel [09:44] mikeal has joined the channel [09:44] guybrush: http://blip.tv/jsconf/nodeconf-2011-elijah-insua-5456413 has been marked private? [09:45] guybrush: :/ [09:47] zilch has joined the channel [09:48] muhqu has joined the channel [09:49] yorick has joined the channel [09:50] StepanKuzmin has joined the channel [09:51] Marak: guybrush: odd [09:51] guybrush: would love to see MOAR about jsdom [09:52] guybrush: its way too awesome to be private :D [09:52] damiano: is there a captcha system in express.js ? [09:54] booo has joined the channel [09:55] StepanKuzmin has joined the channel [10:00] level09 has joined the channel [10:00] jaequery has joined the channel [10:02] FireyFly has joined the channel [10:02] matyr has joined the channel [10:03] clifton: wrote first command line tool [10:03] TomY has joined the channel [10:03] clifton: https://github.com/clifton/beaver/blob/master/bin/beaver [10:04] blueadept: anyone know how to invoke forever.startServer() with forever? [10:04] clifton: heh, next step for me is using forever's lib to daemonize it [10:04] clifton: when it receives -d [10:04] Marak: blueadept: i probably do [10:05] damiano: no? [10:05] blueadept: Marak: i'm trying this, and not getting anything: http://pastie.org/private/nhkqrz2dubvup41y00n9a [10:05] blueadept: this is what my entire call stack looks like: http://pastie.org/private/uiwxg4tbcj9ptogqrv08a [10:05] adambeynon has joined the channel [10:06] luke`_ has joined the channel [10:06] Marak: blueadept: that doesnt look right based on the docs [10:07] Marak: var child = new (forever.Monitor)('your-filename.js', { max: 3, silent: true, options: [] }); child.on('exit', this.callback); child.start(); [10:07] Marak: orr [10:07] Marak: just do forever.startServer(child); [10:07] Marak: instead of child.start(), i think [10:07] Marak: maybe both [10:07] blueadept: hm [10:07] Marak: either way, it looks like you need to pass in the monitor class [10:07] rurufufuss has joined the channel [10:07] Marak: make a new monitor instance [10:08] Marak: thats what the docs say anyway [10:08] Marak: yeah? [10:08] blueadept: hm, i've been trying different ways [10:08] blueadept: let me just post what i have now after i test [10:09] blueadept: http://pastie.org/private/nhkqrz2dubvup41y00n9a [10:09] JakeyChan has joined the channel [10:09] blueadept: i have the forever.startServer(child) at the end now [10:10] blueadept: still getting null return on forever.list [10:10] clu3 has joined the channel [10:10] arpunk has joined the channel [10:10] Marak: blueadept: did you try, child.on('exit', this.callback); child.start(); [10:11] Marak: you should def catch the error [10:11] Marak: and the exit [10:11] Marak: and log [10:11] blueadept: ah and the exit [10:11] Marak: and maybe you still need to call, child.start() [10:12] Country has joined the channel [10:13] seivan has joined the channel [10:13] dexter_e has joined the channel [10:14] fyskij has joined the channel [10:14] jj0hns0n has joined the channel [10:14] blueadept: hm [10:15] blueadept: http://pastie.org/private/nhkqrz2dubvup41y00n9a this look correct? [10:15] davidcoallier has joined the channel [10:16] blueadept: still getting null return on list [10:16] Marak: blueadept: maybe, y u no catch exit and error [10:16] seivan has joined the channel [10:16] Marak: blueadept: how do you know its not throwing? [10:17] blueadept: i see [10:17] Marak: everytime i fuck up forever, its because i passed in bad args [10:17] Marak: indexzero's code tends not to break [10:19] blueadept: no error thrown [10:19] Marak: blueadept: what happens when you: ps -ax | grep node [10:19] Marak: or whatever it is for your os [10:19] Marak: search for running node procs [10:20] Marak: do you see your proc? [10:20] blueadept: oh the processes start [10:20] zilch has joined the channel [10:20] blueadept: yeah i see them, tested the ports, they're running [10:20] Marak: i dont know then, you should file an issue [10:20] Marak: it should just work [10:20] blueadept: just trying to get a list of them from within the app itself [10:20] blueadept: ah [10:20] Marak: i use that all over the place with hook.io i think [10:20] Marak: so i'd prob notice if it wasnt working [10:20] Marak: maybe bad version or args [10:20] Marak: maybe something else [10:21] blueadept: http://pastie.org/private/nhkqrz2dubvup41y00n9a this is the write way to call list right? [10:21] blueadept: right* [10:22] AvianFlu: it should be false unless you want the formatted output, I believe, but it looks right otherwise [10:23] blueadept: yeah i was trying both there i remember what you said [10:23] Marak: blueadept: hard to say, appears so [10:23] blueadept: shucks [10:23] Marak: blueadept: what is in the error there? [10:23] Marak: you really should like, catch all errors at all times [10:24] Marak: at least i do [10:24] |Freeman| has joined the channel [10:24] blueadept: no err thrown [10:25] Marak: i'd create a simple gist then showing what you are doing and post that as an issue [10:25] blueadept: cool [10:25] Marak: all that stuff should work though, id keep hacking on it [10:25] kulor-uk_ has joined the channel [10:26] zilch has joined the channel [10:26] blueadept: maybe its because i'm using node 4.1? [10:26] fly-away has joined the channel [10:26] blueadept: i think i'm went down a versions for some reason [10:27] blueadept: well wait i have 4.9 [10:27] Marak: blueadept: very possible [10:27] Marak: blueadept: and what version of forever? [10:27] blueadept: 0.6.3 [10:27] Marak: ( then prove to me this number ) [10:27] TomY has joined the channel [10:28] deepredsky has joined the channel [10:28] Marak: maybe you are using old version in global [10:28] blueadept: let me upgrade node here then see [10:28] zilch has joined the channel [10:28] blueadept: hm [10:29] eirikb has joined the channel [10:29] eirikb: Hello. What logging framework do people use? I basically want tee and colors. I tried ain but it does not print to stdout, and nlogger but nlogger does not support string formatting and color for logger.info is black so I can't read it [10:30] StepanKuzmin has joined the channel [10:30] AvianFlu: eirikb: http://github.com/indexzero/winston [10:30] eirikb: AvianFlu: Isn't that for client to server logging? [10:30] zastaph has joined the channel [10:31] Marak: eirikb: its a multi-transport logger, you can use multiple transports at once. you can just use the Console transport, no server required [10:31] eirikb: Ah maybe not, I just read the description and took it for granted [10:31] Marak: eirikb: then for fun, you can add File, or Loggly, etc [10:31] Marak: we use winston literally on every piece of our stack at nodejitsu [10:31] Marak: :-) [10:32] eirikb: "multi-transport async" fooled me. I will give it a try, thanks [10:32] aoberoi has joined the channel [10:32] jetienne_ has joined the channel [10:35] TomY has joined the channel [10:35] seivan has joined the channel [10:36] clu3 has joined the channel [10:37] doki_pen has joined the channel [10:38] ralphholzmann has joined the channel [10:38] mendel_ has joined the channel [10:39] blueadept: oh snap, upgraded node now everything is breaking [10:39] socketio\test\29 has joined the channel [10:40] socketio\test\77 has joined the channel [10:41] socketio\test\44 has joined the channel [10:41] blueadept: reserved_word [10:41] blueadept: hm [10:41] CStumph has joined the channel [10:41] freewil has joined the channel [10:41] freewil has joined the channel [10:42] Marak: blueadept: did you get into the 0.5.x branch of node? [10:42] bpwnr has joined the channel [10:42] eirikb: Marak: How should I use winston over several modules? I surely don't want to initialize it will all options in each module, but I also don't want to put it on the global object [10:42] blueadept: not much [10:43] socketio\test\29 has joined the channel [10:43] blueadept: well, now i am [10:43] Marak: eirikb: you gottta like, structure your application correctly [10:43] Marak: eirikb: theres no special way to do it specific to winston [10:43] dantalizing has joined the channel [10:44] Marak: eirikb: initialize it once when your app starts and then scope the .log or .info method to your application scope [10:44] Marak: eirikb: haibu is prob a good example of a well designed app [10:44] Marak: eirikb: maybe jitsu too [10:44] Marak: people tend to structure their apps as , "node app.js", thats fucked [10:45] eirikb: Marak: Haibu seems to require winston in each module, and then require another module for the colors [10:45] Marak: eirikb: that doesnt seem right [10:45] tmm1 has joined the channel [10:45] eirikb: Maybe not [10:46] steadicat has joined the channel [10:46] eirikb: It's and approach to have a module just doing configuration and returning an instance of winston, does not seem right to me [10:46] eirikb: nlogger used a configuration file, that is another approach [10:47] blueadept: meh [10:47] eirikb: I guess having a init-like function in exports would also work, another strange apporach [10:47] blueadept: i'll put some code together and file something [10:47] azeroth_ has joined the channel [10:47] Marak: eirikb: you dont think your application should creates instances of stuff it needs to start before it starts? [10:48] eirikb: Marak: Yes? [10:48] Marak: what about the actions of stuff that need to happen when the app starts up? [10:48] Marak: like making a database connection [10:48] seivan has joined the channel [10:49] eirikb: I don't understand what you mean [10:49] Marak: i see [10:49] eirikb: You see? [10:51] CStumph has joined the channel [10:52] eirikb: I can't even see where winston is configured in listu :( It also seems that colors-module is used for colors in stdout (not winston) [10:52] eirikb: jitsu* [10:52] Marak: winston uses colors [10:52] Marak: i thought maybe they would have good examples, maybe not [10:53] Marak: winston has custom styles for console [10:53] eirikb: winston depends on colors, but you still have to require it? And by just require colors you get colors? [10:53] Marak: thats not how logic works [10:53] jetienne_ has left the channel [10:53] liar has joined the channel [10:54] zilch has joined the channel [10:54] eirikb: That would probably work, but it does not make sense to me [10:54] christkv has joined the channel [10:54] eirikb: It's also not mentioned in winston readme [10:54] Marak: what isnt mentioned [10:54] odie5533: I hate closures. [10:55] Marak: Using Custom Logging Levels In addition to the predefined npm and syslog levels available in Winston, you can also choose to define your own: [10:55] eirikb: To require colors to get colors [10:55] eirikb: Like here: https://github.com/nodejitsu/jitsu/blob/master/lib/jitsu.js#L59 [10:55] jetienne_ has joined the channel [10:55] Marak: eirikb: i told you MAYBE those are good examples I GUESS THEY ARENT [10:55] Marak: eirikb: Using Custom Logging Levels In addition to the predefined npm and syslog levels available in Winston, you can also choose to define your own: [10:55] Marak: eirikb: RTFM [10:55] Marak: var customLevelLogger = new (winston.Logger)({ levels: myCustomLevels.levels }); customLevelLogger.foobar('some foobar level-ed message'); [10:55] eirikb: Marak: And I only have to do that the first time I require winston, or in every module? [10:56] Marak: As of 0.2.0, winston supports customizable logging levels, defaulting to npm style logging levels. Changing logging levels is easy: [10:56] Marak: RTFM [10:56] Marak: im not helping you until you actually read the docs [10:56] eirikb: I don't think what I'm asking is mentioned in the readme, as of why I ask you [10:56] Marak: well read again [10:56] metamind: I'm using socket.io and have a single browswer pointing at the server. It seems to disconnect and reconnect a lot (every 10s or so). Is this normal? [10:57] Marak: Using Logging Levels Setting the level for your logging message can be accomplished in one of two ways. You can pass a string representing the logging level to the log() method or use the level specified methods defined on every winston Logger. [10:57] Sironfoot has joined the channel [10:57] eirikb: Marak: What does logging level have to do with configuration by module? [10:57] Marak has left the channel [11:01] metamind: with jade templates, is there a way to specify that i want a page to not use the layout.jade template? [11:02] jetienne_: metamind: in express.js ? there is a render({layout:false}) or close [11:03] malletjo has joined the channel [11:03] metamind: jetienne: cool. thanks. I will try that. [11:03] Yoric has joined the channel [11:03] Drakonite2 has joined the channel [11:04] markwubb_ has joined the channel [11:04] descipher has joined the channel [11:04] zilch has joined the channel [11:09] dnjaramba has joined the channel [11:09] yept has joined the channel [11:10] ph^ has joined the channel [11:10] zilch has joined the channel [11:11] linyows has joined the channel [11:11] linyows has left the channel [11:11] zilch: would it be good idea to use run cluster with forever ? [11:12] zilch: That is to monitor the cluster master process using forver ? [11:12] jetienne_: zilch: seems kludgy. why not only cluster or only forever [11:13] zilch: jetienne, forever don't have worker process ... [11:13] mike5w3c_ has joined the channel [11:13] jetienne_: zilch: so why not cluster all the way ? [11:13] zilch: jetienne, what if cluster master process fails ? [11:14] zilch: if there is a surety that cluster master process would not fail ... and keep spawning worker process as and when they die ... I am in bliss !! [11:15] jetienne_: zilch: this is an endless loop, it is always possible to have the monitor to crash [11:15] jetienne_: zilch: but cluster is MUCH simpler that your code, so much less likely to crash [11:17] StepanKuzmin has joined the channel [11:18] zilch has joined the channel [11:19] zilch: I think the right question to ask would be what are the scenarios where even the master process would also crash in cluster ... and what are chances of those scenario taking place ... [11:19] odie5533: Can someone explain this one to me? =/ http://ejohn.org/apps/learn/#62 [11:20] Lorentz: And if it does happen, are you going to be worried about your processes, vs data you have on the same machines it's happening? [11:20] jetienne_: zilch: if the monitor crashes, you are in trouble. it cant be fixed [11:20] liquidproof has joined the channel [11:20] jetienne_: zilch: the likelyhod is super small according to me [11:20] adambeynon has joined the channel [11:21] AvianFlu has joined the channel [11:22] jetienne_: odie5533: this is because i isnt clone in the closure, so it is the same variable for all settimerout [11:22] jetienne_: odie5533: so i == 4 all the time, because i == 4 after the loop [11:22] ditesh|cassini has joined the channel [11:23] jetienne_: (function(){ .... })() [11:23] jetienne_: put the settimeout in there to force a closure [11:23] jetienne_: with a var j = i [11:23] damiano: nobody use captcha with express? [11:23] odie5533: ah, I get it. thank you jetienne_ [11:25] fairwinds has joined the channel [11:25] zilch: damiano, have you search the module list at npm.org [11:25] odie5533: I am finally starting to understand javascript. It is both a great and terrible feeling. [11:25] zilch: http://search.npmjs.org/ [11:25] damiano: zilch, no [11:25] damiano: k [11:26] odie5533: I hope the developers of Node realize what they've done: forced countless programmers to actually use javascript. [11:26] zilch: damiano, that is the first place to see if you don't want reinvent the wheel !!! [11:26] materialdesigner has joined the channel [11:27] jetienne_: odie5533: the language is crap but you get used to it after a while. it got nice part [11:27] brianseeders has joined the channel [11:27] AvianFlu: odie5533: congratulations! [11:27] zilch: it looks there are two modules for you [11:27] AvianFlu: I'm glad you took the time [11:28] tmedema has joined the channel [11:28] eldar has joined the channel [11:29] radiodario has joined the channel [11:30] andree has joined the channel [11:31] tmedema: How do I create an empty buffer, and then add chunks of data (which are also buffers) to this buffer? The original buffer's memory allocation should increase as needed. [11:31] huskyr has joined the channel [11:31] SubStack: buffers are statically allocated [11:31] SubStack: use one of the many buffer concatenation modules on npm [11:32] SubStack: like http://github.com/substack/node-buffers [11:37] versicolor has joined the channel [11:38] xandrews has joined the channel [11:39] Aiden_ has joined the channel [11:39] tmedema: SubStack: node-buffers looks promising, but can I pass the object it returns just like normal buffers? Eg. to a writable stream? [11:40] SubStack: tmedema: you should be passing the chunks to a writeable stream, not the concatenation [11:40] SubStack: and no, buffers is a collection [11:41] SubStack: if you want the whole thing as a buffer you can bufs.slice() it [11:41] tmedema: SubStack: ah well I might as well use an array in that case [11:41] SubStack: but what are you actually trying to accomplish? [11:42] tmedema: SubStack: I need to create a buffer in which I store buffers I receive from clients. At a certain point I either remove these buffers or use them. [11:42] damiano: hmm [11:42] tmedema: sounds like instead of creating a buffer I need to create an array in which I store incoming buffers [11:42] SubStack: line buffering? [11:43] andrewfff has joined the channel [11:43] damiano: there is not a module to manage captcha [11:43] damiano: grr [11:43] tmedema: SubStack: line? I'm not working with strings no, binary audio data [11:43] SubStack: http://github.com/substack/node-binary [11:43] SubStack: asynchronous binary stream parsing is really hard to get right, use a module [11:44] zilch has joined the channel [11:44] booo has joined the channel [11:45] SubStack: 892 lines of tests in node-binary [11:45] tmedema: SubStack: I'm afraid you misunderstand, I am not parsing anything.. only proxying from one client to another. Sometimes though, I need to resend earlier audio data, thus I need to store a part of the audio file in memory (only the headers actually) [11:45] tmedema: I guess I need to store the buffers in an array [11:45] SubStack: windowing then? [11:46] SubStack: node-buffers is good for that [11:46] tmedema: SubStack: not sure what you are suggesting ;) Buffers (node.js) work fine [11:46] SubStack: you can just .slice() the collection and it will be fast ;) [11:46] fyskij has joined the channel [11:46] tmedema: Ah you're saying the .slice will be faster than iterating over the array? [11:47] Aiden_ has joined the channel [11:47] SubStack: no I'm saying .slice() will just work and you won't have to worry about chunks that span boundaries [11:47] fermion has joined the channel [11:48] AvianFlu_ has joined the channel [11:48] SubStack: and it's using an array internally so it's not making needless copies [11:48] SubStack: tmedema: how specifically do you handle the earlier audio case? [11:49] tmedema: SubStack: I route the audio data through ffmpeg and then send it back to another socket [11:49] SubStack: oh you say just the headers [11:49] tmedema: SubStack: does node-buffers have a .length property? [11:49] clu3: hello all, fairly new to node.js and event programming here. Some body please help me on this ? http://pastebin.com/EEhJLb8u [11:49] clu3: line number 14 ? [11:49] SubStack: yep [11:49] tmedema: I'd need the total length of the concatenated buffer [11:50] clu3: how should i design the functions? [11:50] tmedema: SubStack: ah cool, I guess it's not in the readme though [11:51] SubStack: clu3: instead of returning you would pass in a callback as an argument at line 4 [11:51] jakehow has joined the channel [11:51] SubStack: var getData = function(options, cb) [11:52] clu3: SubStack, oh, i see :) [11:52] clu3: thank you very much [11:52] SubStack: clu3: then on line 26 instead of ret = getData(options) [11:52] SubStack: you do getData(options, function (ret) { ... }) [11:53] clu3: yes , that's wonder wonderful [11:53] SubStack: and on line 14, cb(body) of course [11:53] clu3: was just gonna ask you taht question ^^ [11:54] level09 has joined the channel [11:54] navaru has joined the channel [11:54] SubStack: clu3: also if you want to handle errors later it's customary to use the first parameter of the callback [11:55] SubStack: if (err) cb(err) else cb(null, body) [11:55] okuryu has joined the channel [11:56] clu3: right, thanks [11:58] zilch has joined the channel [12:00] prettyrobots has joined the channel [12:03] tshpaper has joined the channel [12:03] level09 has joined the channel [12:04] thalll has joined the channel [12:04] Aiden_ has joined the channel [12:04] bergie has joined the channel [12:05] level09 has joined the channel [12:05] altamic has joined the channel [12:06] Cromulent has joined the channel [12:07] radiodario has joined the channel [12:08] zilch has joined the channel [12:08] seivan has joined the channel [12:09] jshaw has joined the channel [12:09] versicolor has joined the channel [12:10] level09 has joined the channel [12:11] TheFuzzball has joined the channel [12:12] descipher_ has joined the channel [12:13] DrLou has joined the channel [12:13] scott_gonzalez has joined the channel [12:14] unlink has joined the channel [12:14] unlink has joined the channel [12:14] CStumph has joined the channel [12:19] ditesh|cassini has joined the channel [12:19] __tosh has joined the channel [12:21] xtianw has joined the channel [12:23] thalll has joined the channel [12:23] mehtryx has joined the channel [12:24] arthurdebert has joined the channel [12:28] bripkens has joined the channel [12:30] shapeshed has joined the channel [12:30] TheJH_phone has joined the channel [12:32] fumanchu182 has joined the channel [12:33] ts__ has joined the channel [12:35] zilch has joined the channel [12:36] seivan has joined the channel [12:37] jbpros has joined the channel [12:38] zilch: I encountered the same issue ... one of the service is down out of 4 and I can't ssh !!! [12:38] loveshine has joined the channel [12:40] zilch: how come possibly a break down in https server (based on express.js) has anything to do with my ability to login using ssh ? [12:40] JoshC1 has joined the channel [12:40] brianc has joined the channel [12:41] zilch: It is on ec2 free tier [12:41] zilch: I could see CPU usage spike to 65% ... noramlly it remains under 10 % [12:42] zilch: and not like all the services are down [12:43] jtsnow has joined the channel [12:43] zilch: only one or two service will be affected.. [12:45] fyskij has joined the channel [12:45] damiano: someone use mysql-pool? [12:45] matomesc has joined the channel [12:46] agnat has joined the channel [12:46] sivy has joined the channel [12:47] Poetro has joined the channel [12:47] TomY has joined the channel [12:47] ghostwriter has joined the channel [12:48] xandrews has joined the channel [12:49] seivan has joined the channel [12:52] CrisO has joined the channel [12:52] damiano: can I block the execution of a script? like exit() in php [12:54] cesutherland has joined the channel [12:54] CrisO: damiano: process.exit() should work [12:54] damiano: ook [12:55] CrisO: to exit with failure do process.exit(1) [12:57] StepanKuzmin has joined the channel [12:58] AaronMT has joined the channel [12:58] piscisaureus has joined the channel [12:59] zilch has joined the channel [13:00] random123: Anyone have an opinion on the best DB to use with node? [13:00] damiano: thanks CrisO [13:00] raphdg has joined the channel [13:00] SubStack: I want to write a database. I'll call it nodb [13:01] Matt_ has joined the channel [13:01] SubStack: mikeal will hate it [13:02] damiano: nodb sounds familiar :) [13:02] Sironfoot: random123: NoSQL or RDBMS? [13:02] damiano: i use mysql [13:02] random123: Sironfoot: I heard that NoSQL is a better DB, is that true? [13:02] Sironfoot: random123: Nope [13:02] damiano: no [13:02] damiano: depends [13:02] Sironfoot: Nor is RDBMS better than NoSQL [13:03] Sironfoot: Yep, it depends on your needs [13:03] damiano: i tried to use mongodb, it is good, but is not for me at the moment [13:03] random123: In terms of if you feel more comfortable using SQL syntax or performance? [13:03] damiano: i prefer mysql [13:03] cphr: besides, using nosql and rdbms together might be a better choice than using either one exlusively [13:04] random123: Why? [13:04] damiano: random123, if you want to use nosql forgot about tbl1.id = tbl2.id [13:04] damiano: :-D [13:04] Sironfoot: random123: if you feel more confortable with Relational DB appraoch, and it fits your data model better, than use that [13:04] random123: Can MySQL scale well across servers? [13:05] random123: Compared to alternatives? [13:05] Sironfoot: MySQL and PostgreSQL are both very well supported in node.js [13:05] damiano: random123, mysql is widely used [13:05] damiano: take a llok at "mysql" module [13:05] Sironfoot: In NoSQL land: MongoDB and CouchDB have good support in node.js [13:05] zilch has joined the channel [13:06] benvds has joined the channel [13:06] jetienne: industrial: arf i just discovered your pm from this mornining :) [13:06] Guest25821: Hi all! I am trying to build node.js on windows 7 x64, i followed the guide in the wiki, but i stuck in the "task failed (err #2): {task: libv8.a SConstruct -> libv8.a}" error when i try to "make". I've tryed to exec also "SHELL=/bin/bash make", but the error still coming. I've just noticed a warning when i start the Cygwin bash console. It says: "MS-DOS style path detected: C:\Shared\ruby\bin\ruby.exe". Is this the problem? Can a [13:06] jetienne: industrial: you see i was jetienne_ and you sent to jetienne [13:06] damiano: i have to go....see you ssooon guys! bye! [13:07] Guest25821: Note that "configure" command says that it looks all ok. [13:08] hotspants has joined the channel [13:08] random123: Guest I built it on a VM, seems a lot better, you can just use Shared folders and bridged adapter to give it an ip [13:09] Guest25821: Wich virtual machine have you used? Can you help me configure it please? [13:09] random123: yes, you should use Arch imo [13:10] Sironfoot: Guest: Better it to run on Windows is trouble, for now, though they're working on it. Try running a *nix VM [13:10] Sironfoot: Getting it to run* [13:10] random123: I recommend a distro with the GUI stipped out, like Arch, or if you prefer all distros have it without the de/wm [13:11] dipser has joined the channel [13:11] random123: arch is popular good lightweight linux distro and comes without a de/wm [13:11] ts__ has joined the channel [13:11] random123: go to distro watch in google to see most popular tho [13:11] Guest25821: One question, I have already a partition with ubuntu linux 10.10 in my PC, But i'd prefer to use windows. Can I emulate on a window (or start in a windows window) my linux partition? [13:12] random123: VM is what does that but unfortunately you cant run 2 OS native on the same computer [13:12] Guest25821: Or it's better (and less trouble) to use a VM? [13:12] kriszyp has joined the channel [13:12] Guest25821: Ok, so it's better to use only a VM [13:12] random123: I use Windows 7, and run Arch in VirtualBox [13:13] random123: Because I need to work with Adobe CS [13:13] random123: And I am not a fan of KVMs [13:13] Guest25821: Me too. I need to use Adobe Dreamweaver [13:14] industrial: jetienne: yeah, jetienne_ was gone so :3 [13:14] random123: I would say its well worth it to learn how to install and set up a barebones linux distro with no gui and set up your whole system and use the CLI for a couple years for all your server stuff [13:14] replore has joined the channel [13:14] replore_ has joined the channel [13:14] Guest25821: http://www.archlinux.org/download/ Just a question, what does it means for dual architecture? I've got an esa-core CPU, [13:14] random123: Every web dev should [13:15] zilch: my forever is attempting to restart the express.js server when it break down immediately ... and since the port has not been released .. it goes into that deadly loop [13:15] zilch: warn: Forever restarting script for 97 time [13:15] zilch: is message on error console !! [13:15] industrial: jetienne: I still have problems understanding (whichever async lib) how to pass scope. for example, I am getting and setting things from the database that I need in variables, not in the call stack/arguments for the next sequential function because i need them later [13:16] zilch: jetienne, that issue struct me once again !! [13:16] aheckmann has joined the channel [13:16] aheckmann_ has joined the channel [13:16] random123: I never heard of an esa-core is that foreign? [13:17] brianc: industrial: try using closures to pass scope [13:17] industrial: jetienne: for example I have three functions, one does something with the db, gets a var, two does something with that data and at the end gets another var and then three does something with both the first function's db result and the second. I need to save the result from the first one scope higher and then use it in the third, knowing it will be available because its a sequential action and it already has been set by the callback. [13:17] random123: You probably have a 64bit cpu guest [13:17] gtramont1na has joined the channel [13:18] bergie has joined the channel [13:18] Guest25821: Sorry, It's a term used only between italian IT. I mean this http://www.intel.com/it_it/consumer/products/processors/corei5.htm [13:18] random123: yes, get x64 [13:19] sniper506th has joined the channel [13:19] random123: x86-64 [13:19] Guest25821: Ok, so i've guessed the right version. xD [13:20] Croms has joined the channel [13:20] random123: ill msg you pacman packages u need for node to compile [13:20] broofa has joined the channel [13:21] bripkens has joined the channel [13:21] baoist has joined the channel [13:22] fyskij has joined the channel [13:22] random123: Guest25821: I sent you PM [13:23] adambeynon has joined the channel [13:23] IWasMatt has joined the channel [13:24] IWasMatt: Ok, I am come back. VirtualBox setup stopped my internet connection. xD [13:24] hippich has left the channel [13:24] random123: IWasMatt: did you get me msgs in PM? [13:25] IWasMatt: No, Unfortunatly :S [13:25] navaru has joined the channel [13:25] dnjaramba has joined the channel [13:27] jetienne: industrial: various possibility, either you use variables external to the control flow closures, thus available in all functions, or you pass it as result to the next callback [13:27] versicolor has joined the channel [13:27] ksheurs has joined the channel [13:27] jetienne: industrial: with gowiththeflow.js, you would do next(myresult) and the next sequential function will receive it as parameters [13:28] jetienne: industrial: it is quite doable, i do those quite a bit when doing database [13:28] eyesUnclouded has joined the channel [13:28] jetienne: ACTION going back to tremulous http://tremulous.net/screenshots/ :) [13:32] thomblake has joined the channel [13:32] zilch has joined the channel [13:32] industrial: heh, k [13:32] odie5533: what do you mean by that jetienne? [13:33] jetienne: odie5533: ? [13:33] jetienne: (after all tremulous game wasnt too funny :) [13:33] albertosh has joined the channel [13:34] thomblake has left the channel [13:34] jetienne: industrial: http://pastebin.com/RM28uEyh somecode doing stuff similar to yours [13:34] seivan has joined the channel [13:35] ryanfitz has joined the channel [13:36] gmonnerat has joined the channel [13:36] DavidElias has joined the channel [13:36] gmonnerat has left the channel [13:36] bshumate has joined the channel [13:38] CrankyMonkey has joined the channel [13:39] CrankyMonkey has left the channel [13:40] edude03 has joined the channel [13:43] febits has joined the channel [13:43] sivy has joined the channel [13:43] `3rdEden: jetienne mongoosex? wtf [13:46] Cromulent has joined the channel [13:47] colinclark has joined the channel [13:47] seivan has joined the channel [13:49] RightLegRed has joined the channel [13:52] jakehow has joined the channel [13:52] rfay has joined the channel [13:52] balaa has joined the channel [13:53] RightLegRed: Can only help me with a problem? I have a node.js script on www.mydomain.com, it does this - http://pastebin.com/DAu5MrQ0 [13:54] RightLegRed: Now, I'm making a scriptish script (pretty much greasemonkey) and I want to grab the output from my node.js script on my domain, without having to navigate the user to that page [13:54] RightLegRed: Is that possible? [13:54] zdzolton has joined the channel [13:54] Aiden_ has joined the channel [13:54] random123 has joined the channel [13:55] losing has joined the channel [13:55] davidsklar has joined the channel [13:55] jscheel has joined the channel [13:56] temp02 has joined the channel [13:56] JumpMast3r has joined the channel [13:57] bnoordhuis has joined the channel [13:58] FleetFox has joined the channel [13:59] FleetFox: Hello. I fail to compile on debian. [13:59] FleetFox: error: variable '_qzz_res' set but not used [-Werror=unused-but-set-variable] [13:59] FleetFox: something related to http://code.google.com/p/v8/issues/detail?id=1291 i suppose [13:59] blup has joined the channel [14:01] bradleymeck has joined the channel [14:02] eee_c has joined the channel [14:03] brianloveswords has joined the channel [14:04] zilch has joined the channel [14:04] temp01 has joined the channel [14:06] TheJH has joined the channel [14:06] geetarista has joined the channel [14:07] Aiden_ has joined the channel [14:09] jbpros has joined the channel [14:09] zilch has joined the channel [14:09] cying has joined the channel [14:09] liquidproof has joined the channel [14:13] bnoordhuis: FleetFox: clang or gcc 4.6? [14:13] SoulRaven has joined the channel [14:14] bnoordhuis: FleetFox: compile with gcc <= 4.5 or strip the -Werrors from deps/v8/SConstruct [14:14] versicolor has joined the channel [14:15] thinkt4nk_ has joined the channel [14:15] mehlah has joined the channel [14:17] mynyml has joined the channel [14:17] renatenga has joined the channel [14:18] huskyr_ has joined the channel [14:20] adambeynon has joined the channel [14:20] zilch has joined the channel [14:21] baudehlo has joined the channel [14:21] huskyr has joined the channel [14:22] AvianFlu has joined the channel [14:23] hij1nx has joined the channel [14:23] softdrink has joined the channel [14:24] ryanfitz has joined the channel [14:24] JJMalina has joined the channel [14:25] vipaca has joined the channel [14:25] vipaca has joined the channel [14:25] charleyd has joined the channel [14:25] jscheel has left the channel [14:26] baudehlo has left the channel [14:26] baudehlo has joined the channel [14:26] k1ttty has joined the channel [14:27] kulor-uk has joined the channel [14:27] yhahn has joined the channel [14:27] Country has joined the channel [14:29] FleetFox: bnoordhuis: thanks [14:29] edude03 has joined the channel [14:30] montylounge has joined the channel [14:31] ricklon has joined the channel [14:32] zilch has joined the channel [14:33] damiano has joined the channel [14:33] damiano: hi [14:33] openpercept has joined the channel [14:33] madhums has joined the channel [14:33] damiano: do you know a module to create a pool of mysql connections? [14:34] damiano: i get Error: deprecated: use mysql.createClient() instead using -> mysql-pool [14:34] jbpros has joined the channel [14:35] pjacobs has joined the channel [14:35] Wizek: Hi! Is there someone here using expresso/or other unittest framework? How do you make sure callbacks are called without explicit `expect(\d)` and `done()` functions? [14:35] carmony has joined the channel [14:36] jj0hns0n has joined the channel [14:36] renatenga has joined the channel [14:37] springmeyer has joined the channel [14:37] ironlad has joined the channel [14:38] renatenga has left the channel [14:38] robertfw has joined the channel [14:39] tuhoojabotti: lol. [14:39] Wizek: think of the simplest example: `function bar(cb){}` and you want to test it with `bar(function(){assert.ok(false)})` [14:39] Wizek: ok(false) should clearly fail [14:39] Swimming_bird has joined the channel [14:39] pixel13 has joined the channel [14:39] ryan0x2 has joined the channel [14:39] Wizek: but tests will passbecause cb is never called [14:39] jscheel has joined the channel [14:39] thiessenp has joined the channel [14:41] pixel13 has left the channel [14:41] jj0hns0n has joined the channel [14:42] seawise: I need to code multiplayer real-time 3D game network model [14:42] jscheel: hi all, anyone have any experience with cluster? I telling it to reload when a view is updated ".use(cluster.reload('./views'))" but it doesn't seem to want to reload. Any ideas? [14:42] losing has joined the channel [14:42] seawise: can it be done with Node.js? [14:42] larsemil has joined the channel [14:43] larsemil: so, npm install package just stays clear, nothing happens. anything to do about this? [14:43] seawise: or I should choose Smartfox, ElectroServer, Photon and other stuff like this? [14:43] larsemil: i dont get any error or anything [14:44] thiessenp has left the channel [14:44] TheJH: larsemil, run npm with "--loglevel info" [14:44] jscheel: seawise: sure, node would be great for this. However, unless you really know what you are doing when it comes to multiplayer client-server architecture, it might be better to not try re-inventing the wheen [14:44] jscheel: weel [14:44] jscheel: wheel [14:44] jscheel: can't type today [14:45] ajpiano: ralphholzmann: i didn't yet, i should do dat shit asap, just arrived in bos [14:45] ralphholzmann: oh hi ajpiano [14:45] seawise: jscheel: can you point me to good muliplayer client-server tutorials? [14:45] ralphholzmann: welcome to Node.js [14:45] pietern has joined the channel [14:46] seawise: I'm rather new to network programming [14:46] jscheel: seawise: I would search on gamasutra [14:46] febits has joined the channel [14:47] seawise: jscheel: looking into it [14:47] ajpiano: wow sorry folks, wrong channel... don't try to type during buffer playback. [14:47] seawise: can you advise more good resources? [14:47] rfay has joined the channel [14:47] sub_pop has joined the channel [14:47] jscheel: seawise: not really, I haven't done much in that arena besides reading a few articles here an there [14:48] larsemil: TheJH: worked when i manually downloaded the .tgz files and installed. thanks for the help [14:48] seawise: actually I need to program pub/sub, notifying all users connected about other users position in 3D space, right? [14:48] TheJH: larsemil, what OS/distro on what version are you using? ubuntu? [14:49] jscheel: hmm, technically, cluster might not be the source of my problems. I'm using express and just updating some templates. I shouldn't have to restart my node process for that anyways, right? [14:49] christkv: who is going to JSConf Berlin ? [14:49] gazumps has joined the channel [14:49] Swimming_bird has joined the channel [14:50] Wizek: Can I use `should` with NodeUnit? [14:50] Fodi69 has joined the channel [14:51] zilch has joined the channel [14:52] kulor-uk has joined the channel [14:53] kmiyashiro has joined the channel [14:54] iamzack has joined the channel [14:56] smus has joined the channel [14:56] gf3: tmpvar: hola [14:56] kevwil has joined the channel [14:57] hybsch has joined the channel [14:57] hornairs has joined the channel [14:57] hybsch has left the channel [14:58] BillyBreen has joined the channel [14:59] odie5533: Using closures, how can I maintain the correct this context when calling functions using async.series? https://github.com/caolan/async#series [15:00] joeytwiddle has joined the channel [15:00] mynyml: odie5533: var that = this; ? [15:00] odie5533: I did that, but it doesn't seem to work. [15:01] ryanfitz has joined the channel [15:01] ttpva has joined the channel [15:02] jakehow has joined the channel [15:02] cdmwebs has joined the channel [15:03] arpunk has joined the channel [15:03] _jhs has joined the channel [15:03] heavysixer has joined the channel [15:03] Wizek: Is there anyone here using NodeUnit? [15:03] Wizek: Or Expresso? [15:04] odie5533: my code is async.series([ self.loadList, ...]) [15:04] StepanKuzmin has joined the channel [15:06] dexter_e has joined the channel [15:06] bosphorus has joined the channel [15:07] digitaltoad has joined the channel [15:07] bosphorus has joined the channel [15:07] CIA-65: node: 03Ben Noordhuis 07master * rf52a8db 10/ test/simple/test-net-remote-address-port.js : [15:07] CIA-65: node: test: fix logic error in test-net-remote-address-port.js [15:07] CIA-65: node: The test intended to register an 'at exit' listener [15:07] CIA-65: node: but called `process.exit()` instead. - http://bit.ly/pbj4cH [15:07] yokoe has joined the channel [15:08] robhawkes has joined the channel [15:09] sonnym has joined the channel [15:10] BoarK has joined the channel [15:11] montylounge has joined the channel [15:11] Wizek: Is there anyone here doing UnitTests, guys? Any kind of? [15:11] cdmwebs: probably stupid question, but why would $ be undefined using backbone with node? [15:11] brianc: Wizek: yes [15:12] Wizek: brianc, Do you use any framework? [15:12] avalanche123 has joined the channel [15:12] brianc: Wizek: I've used a few [15:13] shajith has joined the channel [15:13] brianc: expresso, nodeunit, unit.js [15:13] matt_c has joined the channel [15:13] Wizek: brianc, very good [15:13] brianc: Often times the assert module itself is all you need [15:13] groom has joined the channel [15:13] Wizek: brianc, And how about Should? [15:14] isaacs has joined the channel [15:14] tjholowaychuk has joined the channel [15:14] brianc: Wizek: should is cool, it's not a test framework, it just allows you to use assertions in a more 'human readable' way [15:14] brianc: Wizek: so you can use 'should' in any test framework [15:15] Wizek: brianc, Apparantly I can not with NodeUnit sadly [15:15] Wizek: but that's what I'd like [15:16] zanes has joined the channel [15:16] Wizek: because it gives it's separate 'test' object [15:16] Wizek: so when I run it, it says no assertions run [15:16] davidascher has joined the channel [15:17] brianc: Wizek: that's true, can't use it in nodeunit [15:17] brianc: Wizek: nodeunit does some weirdness w/ the assert module [15:17] binaryjohn has joined the channel [15:17] ricklon: express has a nice command line template project generator can that be run from the intrepreter? [15:18] matomesc has joined the channel [15:18] smtlaissezfaire has joined the channel [15:18] Wizek: brianc, But I'd be fine with expresso too, but it gives me false positives for no-callback-callings [15:18] bripkens has joined the channel [15:18] Wizek: so all tests seem to pass [15:18] Wizek: I'd love to have expect() and done() there [15:18] zilch has joined the channel [15:18] Wizek: but it seems I can not. [15:19] brianc: Wizek: I think expresso actually does have a "done()" method [15:19] heavysixer has joined the channel [15:19] tjholowaychuk: it does but it's not as automatic [15:19] hornairs: Wizek yeah expresso is kind of lame, you have to assert that all your callbacks are called with a count method or something of the likes [15:19] tjholowaychuk: you have to assert counts etc [15:19] brianc: Wizek: though pretty sure it doesn't have an "expect()" because it doesn't count assertions [15:19] hornairs: test.done is mega handy [15:19] tjholowaychuk: to make a test framework that doesnt suck we need to combine ideas from all of the existing ones [15:19] ianward has joined the channel [15:19] fatjonny has joined the channel [15:20] hornairs: tjholowaychuk just out of curiosity why didn't you build that in? [15:20] tjholowaychuk: nodeunit == slow, expresso == hard to work with at times, vows == verbose / awkward / nice output [15:20] tjholowaychuk: hornairs because i hate writing test frameworks [15:20] hornairs: tjholowaychuk: ps big fan [15:20] hornairs: ah yes. [15:20] tjholowaychuk: i needed it for connect/express at the time [15:20] tjholowaychuk: but that was it really [15:20] brianc: I just prefer to not use module.exports to declare tests [15:20] sh1mmer has joined the channel [15:20] jscheel: aaah, found my problem [15:21] jscheel: if any of you are using express and jqtpl: https://github.com/kof/node-jqtpl/pull/34 [15:21] tjholowaychuk: lately i've been doing similar to node with a few test cases per file [15:21] tjholowaychuk: depending on the size [15:21] jscheel: basically, jqtpl's caching and express's view caching collide [15:21] tjholowaychuk: it's a lot slower but meh [15:21] heavysixer has joined the channel [15:21] jj0hns0n has joined the channel [15:21] brianc: tjholowaychuk: yeah, same. [15:22] progme has joined the channel [15:22] tjholowaychuk: https://gist.github.com/1139927 [15:22] tjholowaychuk: brianc ^ that's what I use now haha [15:23] tjholowaychuk: nodeunit will be slow and serial like that [15:23] tjholowaychuk: so i figured why use node at all [15:23] jscheel: hey tjholowaychuk: if I disable view caching in app.configure(), will that also extend to production, or do I have to explicitly declare a production configuration with it disabled? [15:24] Wizek: tjholowaychuk, Okay, so I have to do manual counting. That'd work, but isn't ideal. Any hope for done() function to be implemented in Expresso in the near future? [15:24] tjholowaychuk: jscheel that should disable it for prod as well [15:24] jscheel: tjholowaychuk: awesome, graze [15:24] brianc: haha yeah, tjholowaychuk I use this: https://gist.github.com/1139932 [15:24] jscheel: gazie [15:24] tjholowaychuk: Wizek: I agree, it's awkward [15:24] tjholowaychuk: brianc nice :D haha very similar [15:24] smus_ has joined the channel [15:24] brianc: i just drop it in the teest directory [15:24] brianc: and end up doing node test/ [15:24] brianc: `node test/` [15:25] tjholowaychuk: there's something to be said about going with something so simple [15:25] tjholowaychuk: and then it's easy to adapt to your needs [15:25] brianc: i agree [15:25] tjholowaychuk: instead of "damnit expresso doesn't do this, it's lame" [15:25] brianc: I tried a bunch of test frameworks and appreciate them all but at the end of the day end up fiddling w/ them more than just testing what i'm working on [15:26] tjholowaychuk: yeah same [15:26] tjholowaychuk: after ruby i was done with the fancy test stuff [15:26] zilch has joined the channel [15:26] tjholowaychuk: i just want something that .. has assertions [15:26] brianc: That being said, so far I've found "tobi" to be absolutely indispensable for functional tests [15:26] damiano: tjholowaychuk, do you know how implement captcha system with Express? [15:27] tjholowaychuk: damiano maybe http://www.google.com/recaptcha [15:27] tjholowaychuk: ? [15:27] tjholowaychuk: or you could use node-canvas to generate them [15:27] damiano: i have seen it [15:27] damiano: so [15:27] damiano: image and session [15:27] brianc: I was like "man, I wish there was a way to get a url from my running server and check the html without writing a shit load of regexes or something...oh wait, tj already did this perfectly" [15:27] brianc: like a boss [15:28] tjholowaychuk: i like things of those three main test frameworks but them being combined would be nice [15:28] tjholowaychuk: i like that with vows you can nest things [15:28] tjholowaychuk: but at the same time it's way too verbose for me [15:28] brianc: yup [15:28] brianc: i like nesting [15:28] brianc: and signaling "done" [15:29] brianc: I dont' really like assertion counting [15:29] JKarsrud has joined the channel [15:29] mattly has joined the channel [15:29] brianc: and sometimes signaling done sucks [15:29] bradleymeck: anyone know of a way to test if stdout is drained beyond the drain event? seems sometimes it takes a while for drain to fire... [15:29] brianc: like for non-async tests [15:29] niftylettuce has joined the channel [15:29] tjholowaychuk: brianc yeah that's why i think an expect() would be nice [15:29] tjholowaychuk: instead of var pending = 3; --pending || done() [15:29] tjholowaychuk: expect(3); done() done() done() [15:29] brianc: bradleymeck: does "write" return true/false if it was immediately written? [15:29] tjholowaychuk: if you have a bunch of parallel stuff [15:30] cjm has joined the channel [15:30] bradleymeck: brianc, i am not at the point which write is called, thats in another module :/ [15:30] Wizek: Does Vows work with Should? [15:30] brianc: Wizek: probably. i don't think vows counts assertions [15:31] tjholowaychuk: Wizek i think so [15:31] bksf has joined the channel [15:31] tjholowaychuk: pretty sure i've seen people use it [15:31] heavysixer has joined the channel [15:31] brianc: bradleymeck: maybe you could fork the other module and have it accept a stream instead of it automatically opting for stdout? But that might be way more work than is worth it [15:32] akshatj has joined the channel [15:32] bradwright has joined the channel [15:32] bradleymeck: brianc, even then it wouldnt solve the fact im not at a point of origin for the write, so i cant be sure [15:32] brianc: bradleymeck: curses! [15:33] murugaratham has joined the channel [15:33] murugaratham: anyone can enlighten me on how module loading in node works [15:35] halfhalo-work has joined the channel [15:36] jakehow has joined the channel [15:39] broofa has joined the channel [15:39] srikanth has joined the channel [15:39] temp01 has joined the channel [15:40] hornairs: is there a way to install a local npm package globally so my dev version of a binary is available everywhere [15:40] TheJH has joined the channel [15:40] TheJH has joined the channel [15:41] jtsnow has joined the channel [15:41] cbiscardi: have you tried installing with -g? [15:42] murugaratham: node.exe doesn't work with socket.io 0.7? [15:42] bradleymeck: hornairs look at npm link [15:42] webben has joined the channel [15:43] gazumps has joined the channel [15:43] hornairs: cbiscardi npm install -g . fails [15:43] hornairs: bradleymeck that just links it so you can link to it in other projects i thought [15:44] sandropadin has joined the channel [15:44] maqr has joined the channel [15:44] bradleymeck: it puts the live dev binary in the same path as other npm binaries [15:44] hornairs: awwww isaacs, so smart [15:45] zilch has joined the channel [15:45] hornairs: thanks bradleymeck [15:46] butu5 has joined the channel [15:46] madsleejensen has joined the channel [15:47] alvaro_o has joined the channel [15:47] pixel13 has joined the channel [15:47] pixel13 has left the channel [15:47] tomb| has joined the channel [15:48] alvaro_o has joined the channel [15:48] wookiehangover has joined the channel [15:48] ph^ has joined the channel [15:50] alvaro_o has left the channel [15:51] eee_c has joined the channel [15:51] CIA-65: node: 03Ben Noordhuis 07master * r79f064f 10/ (3 files in 2 dirs): [15:51] CIA-65: node: net: properly export remoteAddress to user land [15:51] CIA-65: node: Fixes failing test: [15:51] CIA-65: node: test/simple/test-net-remote-address-port.js - http://bit.ly/npFbfv [15:51] damiano: guys i have to use mysql-pool, but a function is deprecated [15:51] markdaws has joined the channel [15:51] damiano: someone fixed it: https://github.com/Kijewski/node-mysql-pool/pull/3 [15:51] damiano: how can i use this fix? [15:52] guidocalvano has joined the channel [15:52] markdaws has joined the channel [15:52] damiano: because it seem the mantainer of the module didnt update his code [15:52] balaa has joined the channel [15:52] guidocalvano: what is the code to unregister an event listener? [15:52] stephank has joined the channel [15:52] guidocalvano: if I want to listen I do obj.on( 'methodname', function() {...} ) ; [15:52] guidocalvano: what if I want to stop listening? [15:53] bradleymeck: removeListener [15:53] guidocalvano: * 'methodname' -> 'eventname') ; [15:53] mrsrikanth has joined the channel [15:53] guidocalvano: and you use the address of the function as an argument? [15:54] bradleymeck: mikeal is there a way to abort request before the callback is fired? [15:54] kenperkins has joined the channel [15:54] bradleymeck: guidocalvano same arguments as on [15:54] guidocalvano: k [15:54] guidocalvano: tnx [15:54] willwhite has joined the channel [15:54] brolin has joined the channel [15:55] ekryski has joined the channel [15:56] guillermo has joined the channel [15:56] TheJH: why do I have to give joyent my telephone number in the "Contributor License Agreement"? [15:57] igl has joined the channel [15:57] balupton has joined the channel [15:57] bnoordhuis: TheJH: so we can sell it to telemarketers [15:58] bnoordhuis: the money for my hourly rate has to come from somewhere [15:58] TheJH: :/ [15:58] bnoordhuis: i kid obviously [15:58] bnoordhuis: it's one of those legalese things [15:59] bnoordhuis: people should be contactable [15:59] mikeal: bnoordhuis: if you're streaming, yes [15:59] mikeal: you can call abort on the resp [15:59] mikeal: but if you're buffer the body for the callback, no [15:59] bnoordhuis: mikeal: ? [15:59] mikeal: sorry [15:59] mikeal: bradleymeck: i meant [16:00] bradleymeck: mikeal we are using a buffered response :/, i still want it dead [16:00] bnoordhuis: people calling out my name unwittingly, it happens often [16:00] bnoordhuis: but usually it's women [16:01] mikeal: then you can check for req and resp on the return value, Request instance, and call abort [16:01] brianc: kind of a silly question here, but you know the cURL output table showing download speeds & so on? Would it be possible to do something similar w/ node's process.stdout? [16:01] smus has joined the channel [16:01] bnoordhuis: brianc: yes - why not? [16:01] TheJH: brianc, there are multiple modules on npm for that [16:02] christkv has joined the channel [16:02] brianc: well i guess more as a general question then...how would one write the same area of the console over & over? As in going backwards in the stream, sorta [16:02] brianc: I've been searching for it [16:02] brianc: whatever term it is [16:02] TheJH: !@brianc npm search progress console [16:02] bnoordhuis: brianc: process.stdout.write("BAM\r") [16:02] jhbot: brianc, package kahve-progress: Simple meter for reporting progress to the console. [16:02] brianc: so i can read up more on it [16:02] bradleymeck: mikeal dont see a handler.req/resp on the return value from var handler = request.get('http://.../') mmm will start looking about [16:02] idefine has joined the channel [16:02] addisonj has joined the channel [16:02] brianc: yeah I figured out the \r part...but how to go up a line? [16:02] bradleymeck: brianc raw mode [16:02] isaacs: bradleymeck: you don't need to go into raw mode to move up a line [16:02] thalll has joined the channel [16:03] isaacs: there's an ansi for that [16:03] idefine: would it make sense to expose the named scopes to the query object (not only the model) in mongoose? [16:03] isaacs: you do need to not use console.log or console.error, though, since they add a \n [16:03] brianc: yeah, just stdout.write. Couldn't find the ansi for going up a line [16:03] isaacs: i don't know it offhand [16:04] isaacs: wikipedia does, i think. [16:04] brianc: no worries [16:04] isaacs: that's where i usually go when i want that :) [16:04] brianc: i was checking wikipedia [16:04] TheJH: brianc, use tty.cursorTo [16:05] TheJH: brianc, or moveCursor [16:05] brianc: okey dokey. thanks y'all [16:05] TheJH: brianc, read https://github.com/joyent/node/blob/master/lib/tty_posix.js from line 326 on [16:06] brianc: TheJH: perfect. thank you [16:07] andrewvos has joined the channel [16:07] explodes has joined the channel [16:08] explodes: I'm looking at process.nextTick, when would I want to use that? [16:08] dgathright has joined the channel [16:08] Draggor: explodes: if you're doing a series of events and want to ensure it's all async and doesn't block [16:09] explodes: oo like have a function run some other stuff while its doing its own thing [16:09] brianc: explodes: it executes the function at the beginning of the next event loop cycle. So if you want to do something "really soon, but not exactly right this instant" [16:10] rick_h_ has joined the channel [16:10] brianc: explodes: if you've ever done browser programming and done something like setTimeout(..., 1) or setTimeout(...,10) or some small milisecond. it's like that, except way faster [16:10] Wizek: tjholowaychuk, (or others) do you know why NodeUnit and Should isn't compatible? I mean, I don't care that it doesn't count my asserts (as it at least watches for done()) but it outputs strnge things. Take a look at this: http://screencast.com/t/qH5cEuML "AssertionError: undefined undefined undefined" [16:11] tjholowaychuk: Wizek no clue i haven't tried it with nodeunit [16:11] zilch has joined the channel [16:11] explodes: Wizek, why are you requiring ../node_modules/should instead of just 'should' ? [16:11] mikeal: bradleymeck: it won't be attached until the future [16:12] willwhite has joined the channel [16:12] Wizek: explodes, does the same [16:12] mikeal: bradleymeck: you can just log an issue to add an abort() method [16:12] Wizek: tjholowaychuk, any ideas/pointers where should I look for those undefined values? [16:12] Wizek: er, variables? [16:12] ghv has joined the channel [16:13] eee_c has joined the channel [16:13] Wizek: Insidde Should, so I could fix it maybe. [16:13] m00p has joined the channel [16:16] dherman has joined the channel [16:17] kersny has left the channel [16:17] smus has joined the channel [16:17] davididas has joined the channel [16:17] unlink has joined the channel [16:18] pyrotechnick has joined the channel [16:19] davididas has joined the channel [16:20] yogurt_truck has joined the channel [16:21] rick_h_ has joined the channel [16:22] srikanth has joined the channel [16:25] ronnieboy has joined the channel [16:25] mrsrikanth has joined the channel [16:25] explodes: Can anyone invite me to /javascript? [16:25] explodes: #javascript* [16:26] explodes: I have JS questions that are unrelated to node.js [16:27] TheJH: explodes, you want ##javascript [16:27] TooTallNate has joined the channel [16:27] explodes: Wow, it says I've been banned from ##javascript. [16:28] explodes: I wonder when that happened. [16:28] a2800276 has joined the channel [16:29] Cleer has joined the channel [16:29] joshthecoder has joined the channel [16:29] explodes: Does anyone have a link to a list of complete javascript operators? I just learned that + is a unary operator as well as a binary operator. (e.g. +new Date() performs valueOf on the new Date, and +'123' === 123) [16:29] bnoordhuis: explodes: check the ecmascript spec, it lays it out in excruciating detail [16:30] TheJH: explodes, google "mdn operators" [16:30] materialdesigner has joined the channel [16:31] dexter_e has joined the channel [16:33] jhurliman has joined the channel [16:33] berryzzz has joined the channel [16:34] rick_h_ has joined the channel [16:34] broofa has joined the channel [16:34] jobim has joined the channel [16:36] berryzz has joined the channel [16:36] skm has joined the channel [16:36] colinclark has joined the channel [16:37] berryzz: $ git clone git://github.com/joyent/node.git Cloning into node... github.com[0: 207.97.227.239]: errno=Connection refused fatal: unable to connect a socket (Connection refused) [16:37] berryzz: Hello all, I get an error msg as shown below while trying to install nodejs on windows [16:37] berryzz: Can anyone help? [16:37] WarriorSl has joined the channel [16:37] garrensmith: berryzz: just download the precompiled binary for windows [16:39] berryzz: Thanks garrensmith I am following the steps one by one in https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows) [16:39] berryzz: Does it work? [16:40] garrensmith: berryzz: http://nodejs.org/#download try the windows one. I use a mac but last time I checked it worked great [16:40] seivan has joined the channel [16:41] spcshpopr8r has joined the channel [16:41] berryzz: Thanks garrensmith I got an exe for Node from the link. Can I add npm to it? [16:41] bnoordhuis: berryzz: npm doesn't work (yet) on windows [16:42] garrensmith: berryzz: I dont think so but you should just be able to clone any node modules into .node_modules in your project folder and node will find them [16:42] berryzz: bnoordhuis Oh! I didnt know that [16:43] berryzz: garrensmith: Thanks I will give a shot at it [16:43] garrensmith: cool else a vm with ubuntu would be a good alternative :-) [16:43] caolanm has joined the channel [16:43] berryzz: Thank you :) [16:43] __sorin__ has joined the channel [16:43] zilch has joined the channel [16:43] yumike has joined the channel [16:45] bengrue has joined the channel [16:45] rick_h_ has joined the channel [16:46] Aiden_ has joined the channel [16:46] smf has joined the channel [16:47] cpetzold has joined the channel [16:48] qbit_ has joined the channel [16:49] eignerchris has joined the channel [16:50] odie5533: with one caveat: you can only use native (javascript-only) modules [16:50] smf: Can anyone tell me how (or better send me an example) of how to generate the length of a string as a 4-byte integer in network order? [16:50] sh1mmer has joined the channel [16:51] odie5533: length? [16:51] odie5533: smf: I don't understand your question. Do you have want the result as a string? [16:52] TheJH: smf, create a 4-byte Buffer and use javascripts byteshifting and binary OR stuff and so on to fill it [16:52] TheJH: (OR is wrong, but AND should help) [16:52] smf: The network protocol that I'm trying to interface with requires - where length is in 4-byte network order [16:52] carmony has joined the channel [16:52] odie5533: smf: okay then you have the length as an integer in javascript, right? [16:53] smf: Yes [16:53] dgathright has joined the channel [16:53] mundanity has joined the channel [16:53] odie5533: String.fromCharCode() I think is the method you want [16:53] jtsnow has joined the channel [16:53] TheJH: odie5533, I really don't think so [16:54] bnoordhuis: smf: check out Buffer.writeInt32() [16:54] odie5533: he wants to send the length over the network [16:54] TheJH: odie5533, he needs numbers, the bitshift operator, the and operator and a buffer [16:54] TheJH: bnoordhuis, is that in the right order? [16:55] odie5533: ooo, undocumented methods! [16:55] bnoordhuis: TheJH: yes and no :) [16:55] bnoordhuis: bit shifting in javascript has some non-obvious quirks [16:55] bradleymeck: weakmaps beta in v8! [16:55] TheJH: bnoordhuis, ? he specified which order he wants [16:55] bradleymeck: /love v8 [16:55] TheJH: bnoordhuis, what kinds of quirks? [16:55] odie5533: TheJH: it doesn't handle unsigned integers for one [16:56] bnoordhuis: v8: 1 << 32 [16:56] v8bot_: bnoordhuis: 1 [16:56] mpavel has left the channel [16:56] bnoordhuis: odie5533: ^ [16:56] odie5533: you have to use a 0xfffff bitmask to account for unsigned integers (I've done it..) [16:56] bnoordhuis: odie5533: no, the problem is that ints are signed 32 bits integers [16:57] bnoordhuis: check the ecmascript on <<, >> and >>> [16:57] bnoordhuis: it's tricky [16:57] TheJH: bnoordhuis, as long as he only needs 31 bits, it should work, right? [16:57] bnoordhuis: TheJH: yes - but 31 bits is never enough! [16:58] bnoordhuis: and really, just use the Buffer methods - they do the right thing [16:58] eyesUnclouded has joined the channel [16:58] TheJH: bnoordhuis, when the double size would not fit into your protocol, you're doing it wrong, I think [16:58] Nuck has joined the channel [16:59] bradleymeck: large enough dbs are sad at non-bignum assistance for slicing [16:59] bnoordhuis: TheJH: we'll recall this conversation in 10 years time and laugh [16:59] TheJH: bnoordhuis, probably [16:59] Cromulent has joined the channel [17:00] reid has joined the channel [17:00] bnoordhuis: i got bitten by this once where i thought a frame would never be larger than 2^16 [17:00] madhums has joined the channel [17:00] TheJH: what do you you guys think, I'm writing a patch for the fs nullbyte check thing at the moment, how much overhead is acceptable for fs methods? would one more level of nesting be ok? [17:00] bnoordhuis: the result was that cable modems in a large part of the netherlands stopped working... [17:00] smf: I'm glad this wasn't simply me missing something in the docs. [17:00] madhums has left the channel [17:00] TheJH: code readability vs speed [17:01] bnoordhuis: TheJH: i'm not a big fan of fixing that in node [17:01] TheJH: bnoordhuis, where do you want it to be? in the kernel? in the users modules? [17:01] sweetd has joined the channel [17:01] bnoordhuis: TheJH: user land [17:01] CIA-65: node: 03koichik 07v0.4 * rd1a2628 10/ doc/api/tls.markdown : [17:01] CIA-65: node: Doc improvements [17:01] CIA-65: node: related to #1472. - http://bit.ly/qRFR4t [17:02] bradleymeck: if you are mixing null terminated strings and js strings you should be checking it anyway [17:02] edude03 has joined the channel [17:02] rick_h_ has joined the channel [17:02] TheJH: bnoordhuis, I think that, for instance, many static-file-serving modules can be tricked into sending stuff with arbitrary mimetypes (just sent a pull request for paperboy yesterday) [17:03] davidwalsh has joined the channel [17:03] Croms has joined the channel [17:03] p6 has joined the channel [17:03] bnoordhuis: TheJH: yes - and they should fix that [17:03] TheJH: bnoordhuis, you'd need one extra check every time you access a user-specified file [17:03] bradleymeck: open, or access? [17:03] TheJH: bradleymeck, open [17:03] TheJH: sorry [17:04] dgathright has joined the channel [17:04] damiano: stupid question: if i do: obj = {a:'324'} and add this object to a list N times, how can i remove one of it? because if i do : delete f[obj] nothing happens [17:04] Aiden_ has joined the channel [17:05] TheJH: damiano, f.pop() if it's the last element, otherwise splice [17:05] explodes: f.splice(f.indexOf(obj), 1) [17:05] cognominal_ has joined the channel [17:05] geetarista has joined the channel [17:05] explodes: That will remove the first occurrance [17:07] explodes: Or even delete f[f.indexOf(obj)] [17:07] damiano: explodes...... it the same object [17:07] damiano: i add the same object N times [17:07] damiano: how JS can know what obj i'm referring to? [17:07] explodes: You want to delete all occurrances of the object? [17:08] explodes: f[obj] means the Object in the array at the index obj. [17:08] explodes: Not all obj's in f. [17:08] damiano: i mean [17:08] damiano: i do an example [17:09] damiano: var a = {text: 'hello'}; [17:09] damiano: then [17:09] explodes: http://pastie.org [17:09] damiano: f.push(a) f.push(a) f.push(a) f.push(a) f.push(a) f.push(a) f.push(a) [17:09] grund has joined the channel [17:10] explodes: If you want to remove one of it, f.splice(f.indexOf(obj), 1) [17:11] damiano: example if i do: f[5] [17:11] damiano: it returns the 5 ft element [17:11] damiano: ok, how can delete it (without know the number of the index) [17:11] damiano: ? [17:11] damiano: is it not possible? [17:11] BillyBreen has joined the channel [17:11] explodes: no. you have to get the number of the index. [17:12] wadey has joined the channel [17:12] damiano: k [17:12] zeade has joined the channel [17:14] damiano: last thing [17:14] damiano: how can i use https://github.com/Kijewski/node-mysql-pool/pull/3 ? [17:14] zeropx has joined the channel [17:14] aoberoi has joined the channel [17:14] greg__ has joined the channel [17:14] damiano: because the mantainer didnt this update [17:14] dshaw_ has joined the channel [17:14] damiano: didnt fix it yet [17:15] rick_h_ has joined the channel [17:15] dmwuw has joined the channel [17:15] explodes: You can clone his pull request into your node_modules folder [17:15] cjm has joined the channel [17:16] jerrysv has joined the channel [17:17] jscript has joined the channel [17:17] jroesslein has joined the channel [17:17] damiano: explodes, yes this is the problem [17:17] damiano: how can i do it? [17:17] blup has joined the channel [17:17] WarriorSl_ has joined the channel [17:17] dannycoates_ has joined the channel [17:17] Nathan__ has joined the channel [17:18] vid__ has joined the channel [17:18] zilch has joined the channel [17:18] damiano: https://github.com/CarnegieLearning/node-mysql-pool/commit/4be5e9f577d269a70e85662245983fa801c6d40c [17:18] damiano: how to update my code with these changes? [17:18] explodes: cd /path/to/node_modules && git clone https://github.com/CarnegieLearning/node-mysql-pool.git [17:18] vid__ has joined the channel [17:18] isaiah_ has joined the channel [17:18] kimico has joined the channel [17:19] hornairs has joined the channel [17:19] thalll_ has joined the channel [17:19] explodes: That commit is on the master branch, so just clone that repo [17:19] unsteadic has joined the channel [17:19] rsterner has joined the channel [17:19] explodes: im taking lunch ~~ [17:19] spcshpop` has joined the channel [17:20] SamuraiJack_ has joined the channel [17:20] damiano: what?? [17:20] damiano: why clone? [17:20] Spion has joined the channel [17:20] Nuck: Can somebody help me figure out what the fuck is going on here? I've never seen JS act this way. [17:20] damiano: i have to update the code with this fix [17:20] Nuck: http://jsfiddle.net/Hqp4S/2/ [17:20] jetienne_ has joined the channel [17:20] BillyBreen1 has joined the channel [17:21] Drakonite2 has left the channel [17:21] gtramont1na_ has joined the channel [17:21] bradleymeck: Nuck define the difference? [17:21] sbisbee has joined the channel [17:21] Nuck: Well, it should be adding a property of `item`'s value to obj [17:21] Nuck: For each iteration [17:21] Nuck: But instead, it resets after each iteration [17:22] Nuck: so it ends up with only the second iteration's change. [17:22] doki_pen` has joined the channel [17:22] NetRoY has joined the channel [17:22] cdmwebs: anybody using backbone with node? [17:22] butu5_ has joined the channel [17:22] tbranyen: cdmwebs: i am [17:22] mcroydon has joined the channel [17:22] tbranyen: whats up? [17:22] Nuck: Moving var out = {} to outside the function solves it, but that isn't what I want (that's what I pass back to the callback) [17:22] anaio has joined the channel [17:22] mizerydearia has joined the channel [17:23] deoxxa_ has joined the channel [17:23] adambeynon has joined the channel [17:23] cdmwebs: tbranyen: having trouble saving anything [17:23] matbee has joined the channel [17:23] cpetzold has joined the channel [17:23] cdmwebs: tbranyen: Cannot call method 'ajax' of undefined on $.ajax [17:23] markeeto has joined the channel [17:24] cdmwebs: tbranyen: probably caused by my lack of understanding re: require/global I think [17:24] halfhalo-work_ has joined the channel [17:24] tbranyen: cdmwebs: you need to override sync [17:24] tbranyen: it'll never work in node [17:24] tbranyen: unless you use jsdom and jquery [17:24] tbranyen: which i mean come on [17:24] cdmwebs: tbranyen: ah ha [17:24] tbranyen: no good [17:25] igl1 has joined the channel [17:25] kawaz_ has joined the channel [17:25] damiano: guys [17:25] cdmwebs: so I thought that was the case, too. Tried using 'backbone-couch' [17:25] damiano: someone could help me with [17:25] damiano: https://github.com/Kijewski/node-mysql-pool [17:25] damiano: https://github.com/CarnegieLearning/node-mysql-pool [17:26] damiano: these project has the same name [17:26] Yuffster__work has joined the channel [17:26] damiano: how can i download the second with npm ?? [17:26] malkomal_ has joined the channel [17:26] SamuraiJack_ has joined the channel [17:26] damiano: the first is not updated yet [17:26] unlink_ has joined the channel [17:26] TheJH: !npm owner mysql-pool [17:26] jhbot: owners: kijewski [17:26] cesutherland_ has joined the channel [17:27] TheJH: damiano, I think that you'll have to download it manually [17:27] TheJH: damiano, download it with git and put it in node_modules [17:27] mikeycgto has joined the channel [17:27] ditesh|cassini has joined the channel [17:27] TheJH: woooah, netsplit! [17:27] damiano: hmm ok [17:27] damiano: thank you [17:27] dnjaramba has joined the channel [17:27] Vertice has joined the channel [17:29] Swizec has joined the channel [17:30] Poetro has joined the channel [17:30] Poetro has joined the channel [17:30] damiano: TheJH just clone and stop ? [17:31] TheJH: damiano, clone it, go into its directory, do "npm install" without arguments [17:31] TheJH: damiano, that should install its dependencies [17:32] whitman has joined the channel [17:32] terite_ has joined the channel [17:32] xtianw has joined the channel [17:32] ditesh has joined the channel [17:32] damiano: TheJH [17:32] albertos_ has joined the channel [17:32] damiano: i have to use it locally [17:33] damiano: so i need to clone it under /node_modules/ ? [17:33] TheJH: damiano, in your project directories "node_modules" folder. e.g. /home/damiano/projects/someproject/node_modules/ [17:34] isaacs: damiano: you can also git clone blah, and then cd somewhere, and npm link ../blah [17:34] hassox_ has joined the channel [17:34] criswell has joined the channel [17:34] tmpvar has joined the channel [17:34] joeytwiddle has joined the channel [17:34] butu5 has joined the channel [17:34] ryan[WIN] has joined the channel [17:34] damiano: i understand all ....but not the last [17:35] damiano: npm link ?? [17:35] isaacs: damiano: npm help link <-- read that [17:35] liquidproof_ has joined the channel [17:35] isaacs: damiano: makes it so that you can make changes to a thing, and have them immediately reflected in the projects that use it [17:36] hij1nx has joined the channel [17:36] damiano: k [17:37] freewil has joined the channel [17:37] freewil has joined the channel [17:37] hornairs: is there an call i can use to flush the buffer to stdout or an 'empty' event i can listen to? my process.exit call is cutting off some output [17:38] ianward1 has joined the channel [17:38] qbit__ has joined the channel [17:38] digitaltoad has joined the channel [17:38] mjr_ has joined the channel [17:39] gr-eg has joined the channel [17:40] bnoordhuis: hornairs: are you using console.log? console.error is non-buffering [17:41] isaacs: hornairs: process.stdout.write returns true if it flushed, or false if it didn't. you can also call process.stdout.flush that returns true or false. if they return false, you can do process.stdout.once("drain", function () { now it's flushed }) [17:42] jhurliman: hornairs, it's a current limitation in node. you have to use console.warn or console.error or just assume your output may or may not ever show up on the console [17:42] kien has joined the channel [17:42] robotmay has joined the channel [17:42] jhurliman: ah, cool trick with process.stdout.write [17:42] isaacs: jhurliman, bnoordhuis: or just do: if (!process.stdout.flush()) process.once("drain", process.exit); else process.exit() [17:43] isaacs: console.log returns undefined. maybe it should return the result of the stdout.write [17:43] jhurliman: i need to make a console.logflush() call that does that [17:43] hornairs: isaacs, bnoordhuis thanks! i knew console.log was async, but awesome the drain event is what i needed [17:44] isaacs: hornairs: watch out, though, if everythign flushed, then drain will never emity [17:44] isaacs: *emit [17:44] isaacs: call process.stdout.flush() to see if there's anything still waiting, and give it a litlte kick [17:45] admc has joined the channel [17:45] hornairs: isaacs ah yes very good, thanks! [17:45] CIA-65: node: 03Ryan Dahl 07master * r3d4ae3a 10/ lib/net_uv.js : net_uv: pipes don't have getsockname - http://bit.ly/ob4P0G [17:45] cpetzold has joined the channel [17:45] bengrue has joined the channel [17:45] dguttman has joined the channel [17:47] nerdfiles1 has joined the channel [17:47] nerdfiles1 has left the channel [17:47] adelcamb1e has joined the channel [17:48] ironlad has joined the channel [17:49] RORgasm has joined the channel [17:49] DTrejo has joined the channel [17:50] ecin has joined the channel [17:51] zastaph has joined the channel [17:51] febits has joined the channel [17:51] Yoric has joined the channel [17:51] garrensmith has joined the channel [17:51] zpao has joined the channel [17:52] shenlok has joined the channel [17:52] openpercept has joined the channel [17:52] Slashbunny has joined the channel [17:52] __tosh has joined the channel [17:54] catb0t has joined the channel [17:54] sh1mmer has joined the channel [17:55] monokrome: Is anyone here able to help me with a small Jade issue? I'm trying to recreate these comments within jade templates: http://goo.gl/cCTZK [17:58] kmiyashiro: /if IE [17:58] kmiyashiro: a(href='http://www.mozilla.com/en-US/firefox/') Get Firefox [17:58] kmiyashiro: sorry, //if IE [17:59] heavysixer has joined the channel [17:59] mynyml has joined the channel [17:59] kmiyashiro: https://github.com/visionmedia/jade [17:59] catb0t has joined the channel [17:59] kmiyashiro: search for conditional-comments [17:59] mcavage has joined the channel [17:59] monokrome: I saw that, but it doesn't generate them the same way [18:00] ditesh has joined the channel [18:00] kmiyashiro: how so [18:00] indexzero has joined the channel [18:01] monokrome: one moment, trying again [18:01] mecablaze has joined the channel [18:02] mikeal has joined the channel [18:02] kmiyashiro: just tried it, worked for me for recreating the boilerplate comments [18:02] mecablaze: Is there a way to prevent console.log from abbreviating outputting deeply nested objects? [18:02] kmiyashiro: mecablaze: util.inspect [18:03] kmiyashiro: http://nodejs.org/docs/v0.4.8/api/util.html#util.inspect\ [18:03] kmiyashiro: http://nodejs.org/docs/v0.4.8/api/util.html#util.inspect [18:03] kmiyashiro: you can control the depth [18:03] monokrome: kmiyashiro: Can you show me what you used? I can't get them to do the last one properly [18:04] clifton has joined the channel [18:04] toddr has joined the channel [18:05] mecablaze: kmiyashiro wonderful. exactly what i was looking for. thank you [18:05] kmiyashiro: oh, didn't do that last one [18:05] toddr: I'm trying to setup a src.rpm for node.js. It depends on a custom python 2.7 for consistency. When I do make install, I get pyc/pyo files on CentOS 5 but not on C4 or C6 [18:05] toddr: Any idea why this might be or where I can look? [18:06] ralphholzmann has joined the channel [18:06] kmiyashiro: monokrome: try using unescaped vars [18:06] maushu has joined the channel [18:07] monokrome: hmm [18:07] p3rsist has joined the channel [18:07] jtsnow has joined the channel [18:07] broofa_ has joined the channel [18:08] Aiden_ has joined the channel [18:09] vipaca has joined the channel [18:09] vipaca has joined the channel [18:10] kmiyashiro: or try this [18:10] kmiyashiro: .// [18:10] kmiyashiro: [if IE8] [19:17] kmiyashiro: err [19:17] kmiyashiro: oh [19:17] kmiyashiro: I know why [19:17] indexzero has joined the channel [19:18] monokrome: So, maybe they need to be inline html [19:18] monokrome: :/ [19:18] kmiyashiro: yeah, you might have to hack it [19:18] xtianw: monokrome: https://gist.github.com/888338 [19:19] monokrome: I did inline: //if lt IE 7 [19:19] monokrome: Same thing though, right? [19:19] kmiyashiro: yep [19:19] kmiyashiro: haha [19:20] kmiyashiro: looks like it was already done [19:20] kmiyashiro: but at least we came to the same solution [19:20] monokrome: Yeah, but it does add an extra: --> [19:22] sechrist_ has joined the channel [19:22] monokrome: Fixed it [19:22] mcavage has joined the channel [19:22] monokrome: https://gist.github.com/1140511 [19:22] monokrome: I think that works [19:22] theRevIsNotDead has joined the channel [19:23] kmiyashiro: // http://stackoverflow.com/questions/7024464/node-js-express-js-connect-accessing-session-from-upgrade-event [21:27] Sironfoot: Sorry to post this here, I'm really stuck on this [21:27] walbert has joined the channel [21:27] tjholowaychuk: Sironfoot connect doesnt dispatch until the request event (callback for http.Server) [21:29] c4milo1: tjholowaychuk: ! [21:29] baudehlo has joined the channel [21:29] c4milo1: tjholowaychuk: did you see https://github.com/senchalabs/connect/issues/321 [21:30] tjholowaychuk: c4milo1 did now haha [21:30] tjholowaychuk: one sec though [21:30] unlink has joined the channel [21:30] robotmay has joined the channel [21:31] bnoordhuis: abourget: somewhere in 2009, i think [21:33] Sironfoot: Soo all middleware is only called through get/post/put/delete methods? [21:33] odie5533: Do many Node.js devs use CoffeeScript? [21:34] tjholowaychuk: Sironfoot no, it's just that the upgrade is special-cased, if you want to open up an issue for connect I'll take a look at what might be possible [21:35] AvianFlu: markdaws: you can do process.stdout.on('drain', function () { process.exit() } ) [21:35] jshaw has joined the channel [21:35] matomesc has joined the channel [21:36] Sironfoot: OK, yeah it would be good to access cookies & session from low level events such as upgrade, all the request header data is there (Connect cookie token etc.) [21:36] EyePulp has joined the channel [21:36] tjholowaychuk: Sironfoot yup, we just need to dispatch there as well [21:37] EyePulp: yo ho ho. Anyone have a clean/appropriate method to determine if mongodb is up and running via mongoose? [21:38] isaacs: with (process) { if (flush()) exit(); else on("drain", exit) } [21:38] eee_c has joined the channel [21:38] Sironfoot: OK, thanks tjholowaychuk I'll create an issue on Github [21:38] isaacs: it's a shame that with(){} is so un-optimizable, really [21:38] isaacs: you can do some nice little oneliners with it [21:38] TooTallNate has joined the channel [21:39] mscdex: anyone know if there are any examples out there showing how to build a node addon using cmake? [21:40] toddr has left the channel [21:40] jarek has joined the channel [21:40] jarek has joined the channel [21:43] CIA-65: node: 03Ben Noordhuis 07master * reb09b06 10/ lib/http2.js : [21:43] CIA-65: node: http: destroy socket on error [21:43] CIA-65: node: Needs further investigation, the test passed without `--use-uv`. [21:43] CIA-65: node: Fixes failing test: [21:43] CIA-65: node: test/simple/test-http-dns-fail.js - http://bit.ly/pHeNzc [21:44] bnoordhuis: ^ nasty bastard [21:45] nhaesler has left the channel [21:46] Wizek: When I use git and npm, should I add and commit the files that NPM puts in my node_modules direcotry into my repo, or is there a gentler way to declare and make NPM handle my dependencies? [21:46] isaacs: Wizek: add them to a package.json file [21:46] gerad: Wizek: you can add them to a package.json [21:46] booo: mscdex, the difference to a wscript should be very small [21:46] gerad: yeah, that [21:47] isaacs: Wizek: npm init, and then `npm install blah --save` [21:48] gerad: Wizek: also https://github.com/nko2/website/blob/master/designs/blog/02-npm-intro.md has a section on it "Specifying project dependencies: package.json" [21:48] gerad: @isaacs though that onliner is pretty hot [21:49] Wizek: isaacsthanks isaacs and gerad, taking a look [21:49] markdaws: hi AvianFlu, isaacs, looks like the combo of your approaches works (no flush() methos on process). Thanks Mark. [21:49] CStumph has joined the channel [21:49] nhaesler has joined the channel [21:49] isaacs: gerad: did you mention the --save switch? [21:49] arpunk has joined the channel [21:50] gerad: isaacs nope, I didn't know about it! [21:50] gerad: (until now) [21:50] isaacs: markdaws: oh, right, that should be with (process) { with (stdout) { if (flush()) exit(); else on("drain", exit) }} [21:50] isaacs: markdaws: (don't use with) [21:51] Wizek: I have another question: when I install something which is not just a module, but has CLI coupled (like node-dev for example) I usually install them globally. Is there an easy way to install it locally and still be able to easily reach the executable? [21:51] Sironfoot: tjholowaychuk I opened up an issue https://github.com/senchalabs/connect/issues/342 [21:52] tjholowaychuk: thanks [21:52] gerad: isaacs i'll add the `--save` switch to the draft, lmk if you won't be able to take a look at it today, and then I'll post on something else instead [21:52] matomesc has joined the channel [21:52] gerad: trying to get one post out a day until the competition [21:52] gerad: Wizek: some people add ./node_modules/.bin to their path [21:53] indexzero has joined the channel [21:53] gerad: though maybe there's a better way now [21:54] brianc: odie5533: I don't think many of the ones writing widely used modules do [21:54] brianc: odie5533: also frowned upon by some to write public modules in coffeescript [21:54] hasta84 has joined the channel [21:54] Fodi69 has joined the channel [21:55] c4milo1: Sironfoot: wow, nice issue report [21:55] jarek_ has joined the channel [21:55] Sironfoot: thanks :-) [21:56] tmpvar has joined the channel [21:56] jarek_ has joined the channel [21:57] isaacs: gerad: also, `npm link` is handy [21:57] depy has joined the channel [22:00] davidascher has joined the channel [22:01] jarek has joined the channel [22:01] jarek has joined the channel [22:01] gerad: @isaacs: yep, left that bit in from your post last year... it's my favorite part of npm, personally :-) [22:01] isaacs: me too. [22:03] hij1nx has joined the channel [22:04] gerad: @isaacs: it's too bad it'll be such a pita to support npm link in windows [22:04] gerad: @isaacs: also updated the post with npm install --save; https://github.com/nko2/website/blob/master/designs/blog/02-npm-intro.md [22:06] Nuck: Hurrah! [22:06] Nuck: Got that beast of a function built [22:06] Nuck: I'll probably accidentally send it in an infinite loop, but I'll add detection later :P [22:06] EyePulp: anyone using mongoose that can recommend a good way to test that the DB is up/running/connected? [22:06] smus has joined the channel [22:09] cying has joined the channel [22:11] hkjels_: I can see that "partial" in jade is not documented. Is there any reason why I should rather use "include"? [22:11] hkjels_: other than the doc-part, heh [22:12] zilch has joined the channel [22:12] mundanity has joined the channel [22:12] tjholowaychuk: hkjels_ it's an express function [22:13] hkjels_: ahh [22:14] sub_pop has joined the channel [22:14] hkjels_: could I use partial to include a markdown-file in jade? [22:14] hkjels_: I've tried, but seems to fail [22:14] hkjels_: but I guess, I'm just doing it wrong [22:15] Qbix1 has joined the channel [22:15] tjholowaychuk: look at the markdown example in the express repo [22:15] Qbix1: hi guys [22:15] tjholowaychuk: to see how you can hook it into the view system [22:15] mikeal has joined the channel [22:15] hkjels_: could off course have the :markdown inside of the included file [22:15] hkjels_: ok, thank you tjholowaychuk [22:17] hlindset has joined the channel [22:19] davidbanham has joined the channel [22:19] kartmetal has joined the channel [22:19] willwhite has joined the channel [22:20] sub_pop has joined the channel [22:21] rabidsnail: socket.setTimeout shouldn't block, should it? [22:21] hoodoos has joined the channel [22:25] sub_pop has joined the channel [22:28] yhahn has left the channel [22:32] mikeal has joined the channel [22:32] Charuru has joined the channel [22:32] sivy has joined the channel [22:35] CIA-65: node: 03isaacs 07v0.4 * r3210809 10/ (lib/querystring.js test/simple/test-querystring.js): Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' - http://bit.ly/rkLT08 [22:36] CIA-65: node: 03isaacs 07master * rac47913 10/ (lib/querystring.js test/simple/test-querystring.js): Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' - http://bit.ly/p4YgL1 [22:36] Shawn has joined the channel [22:37] temp01 has joined the channel [22:38] cbiscardi has joined the channel [22:38] kriskowal has joined the channel [22:41] Shawn: Hi, I am about to setup nodejs on Windows7, which version of nodejs would be best? [22:41] bnoordhuis: Shawn: 0.5.3 [22:41] bnoordhuis: and we're probably releasing 0.5.4 today [22:41] hoodoos has left the channel [22:41] small: I'm getting a stack trace that I think goes down to a core module. I'm not really familiar with the node nor javascript yet, so I was wondering if someone could take a peek at this stack trace: https://gist.github.com/1140990 [22:42] pixel13 has joined the channel [22:42] small: that's on node v 0.4.9 btw [22:42] bnoordhuis: small: could be anything [22:42] bnoordhuis: grep your source for GEL [22:42] small: bummer [22:42] small: not in my source [22:43] BulletBobM has joined the channel [22:43] AvianFlu: small: what's your script doing? it could be from a lib you're requiring [22:43] alnewkirk has joined the channel [22:43] kriskowal: I’m seeking to implement HTTP range requests and partial responses. [22:43] pixel13 has left the channel [22:44] small: yeah, it must be from a lib i'm requiring. the script is html retriever, munger thing, it's requiring mostly good libraries though. mostly just redis and core modules. [22:44] kriskowal: Has another library done this yet? Do we have a way to open a readable stream for a range of a file? [22:44] kriskowal: There appears to have been a discussion on fseek around v0.2, but it sputtered. [22:44] tjholowaychuk: kriskowal you can specify the range [22:44] tjholowaychuk: I think it's { start: n, end: n } [22:44] kriskowal: oh, good, good. [22:45] kriskowal: i'll give it a shot. [22:45] prph has joined the channel [22:45] small: guess i need to find a good way to isolate which dependency it's coming from [22:46] mikeal has joined the channel [22:46] Swizec_ has joined the channel [22:47] Draggor: Anyone here ever try clojurescript? [22:49] Sorella has joined the channel [22:50] reid has joined the channel [22:51] tristanseifert has joined the channel [22:52] tilgovi has joined the channel [22:52] tilgovi has joined the channel [22:53] skm has joined the channel [22:55] EyePulp: argh… anyone have some advice for validating a mongoose/mongo connection? checking the readyState seems dubious, as it's telling me a value of 2 right now, and the db is shut down. [22:58] Shawn: When I installing v0.5.3 on Windows7 using Cygwin, when enter "make" I get the following error: Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a}. I have gcc4-g++ and tried the following command "$ export SHELL=/bin/bash" and still no luck. Any ideas? [22:58] Draggor: Shawn: is there a reason you're not using the windows executable? [22:58] antono has joined the channel [22:59] Shawn: No there isn't. I will try that. [22:59] Shawn: Thanks [23:00] BoarK has joined the channel [23:00] mjr_ has joined the channel [23:01] ttpva has joined the channel [23:01] patrickgamer has joined the channel [23:01] patrickgamer has left the channel [23:02] level09 has joined the channel [23:09] mDraze has joined the channel [23:11] CIA-65: node: 03Ben Noordhuis 07master * r3cd694c 10/ .gitignore : build: .gitignore build/ directory - http://bit.ly/odxgbx [23:12] shinuza has joined the channel [23:14] skm has joined the channel [23:15] mikeal has joined the channel [23:15] alnewkirk has joined the channel [23:20] smus has joined the channel [23:21] Nuck: oAuth 2 + Connect-Session? Is it possible? [23:21] indexzero has joined the channel [23:21] Nuck: I want sessions to be identified either by cookie or by oAuth token [23:22] Nuck: So I can handle sessions as usual [23:22] mikeal has joined the channel [23:22] kmiyashiro: I can't figure out half of what the browserify docs are trying to say [23:23] gazumps has joined the channel [23:23] Nexxy: kmiyashiro, what is your confusion specifically? [23:24] djw_ has joined the channel [23:27] kmiyashiro: pretty much everything from the methods section down [23:27] mehtryx has joined the channel [23:27] mikeal has joined the channel [23:27] skm has joined the channel [23:28] Wizek has left the channel [23:28] AvianFlu has joined the channel [23:29] jetienne has joined the channel [23:30] technoweenie has joined the channel [23:30] soapyillusions has joined the channel [23:34] CIA-65: libuv: 03Ryan Dahl 07master * rf7b4e65 10/ src/uv-unix.c : unix: introduce SPAWN_WAIT_EXEC to turn off poll feature - http://bit.ly/rn1YAQ [23:37] criswell has joined the channel [23:38] willwhite has joined the channel [23:38] k1ttty has joined the channel [23:38] paulwe has joined the channel [23:39] erictj has joined the channel [23:39] azeroth_ has joined the channel [23:39] CIA-65: libuv: 03Ryan Dahl 07master * rb44f9d7 10/ src/uv-unix.c : unix: cloexec stdio streams - http://bit.ly/nqxQaJ [23:41] bradleymeck has joined the channel [23:41] erictj: When using the built-in repl module, is there an easy way to get the prompt to show back up after custom functions attached to the repl context? [23:42] ironlad has joined the channel [23:42] erictj: (…after *calling* custom functions...) [23:43] level09_ has joined the channel [23:43] kraft has joined the channel [23:43] losing has joined the channel [23:44] CIA-65: libuv: 03Ben Noordhuis 07master * rc952352 10/ config-unix.mk : build: use -pthreads, older gccs don't recognize -pthread - http://bit.ly/q44b7Q [23:44] CIA-65: libuv: 03Ben Noordhuis 07master * rd358738 10/ test/benchmark-pound.c : bench: #undef NANOSEC, defined in time.h on solaris - http://bit.ly/pL3mG6 [23:46] Count_0 has joined the channel [23:46] bradleymeck: erictj, .break ? [23:46] Count_0 has left the channel [23:47] isaacs: erictj: control-C [23:47] willwhite has joined the channel [23:47] isaacs: erictj: keep pressing it until the repl exits, then type "node" [23:47] isaacs: :) [23:47] erictj: haha [23:47] erictj: http://pastebin.com/SCb0gz18 [23:47] erictj: just trying to get the prompt back after calling help() [23:48] hlindset has joined the channel [23:49] jerrysv: erictj: process.exit(0) [23:49] erictj: jerrysv: awesome, but that exits the entire repl.. i just want to get the repl prompt back. right now you have to hit return to get it back [23:50] jerrysv: ha, sorry, just saw all the control-c stuff [23:50] erictj: np! [23:50] erictj: seems like it's something simple, but can't get it [23:51] ctide: when i run your script i get the prompt back after calling help() [23:52] erictj: weird, one sec [23:52] erictj: ctide: how about with this one? http://pastebin.com/xca6cjJ2 [23:52] erictj: first one hangs. rest work [23:53] booo has joined the channel [23:54] bradleymeck: erictj myrepl.displayPrompt() where myrepl is the result of .start() [23:56] willwhite has joined the channel [23:57] erictj: bradleymeck: hmm, I must be missing something. Given the pastebin above, my local repl var has no method displayPrompt() [23:57] mikeal has joined the channel [23:58] arthurdebert has joined the channel [23:58] bradleymeck: erictj http://pastebin.com/8A0yM2ra [23:59] bigfooterfella has joined the channel [23:59] spcshpopr8r has joined the channel