[00:00] nerdEd has joined the channel [00:01] _announcer: Twitter: "Just landed in SFO, checked in and grabbing a bite. Anyone up for drinks tonight? #nodejs #joyent" -- Rob Ellis. http://twitter.com/rob_ellis/status/27684867301 [00:04] banjiewen has joined the channel [00:05] paulr has joined the channel [00:09] yrashk has joined the channel [00:11] mAritz has joined the channel [00:13] jpld: Hadaka: i hit the same "delete: method.call(this, 'delete')" issue when deploying to heroku [00:14] jpld: stepped back to connect@0.2.5/express@1.0.0rc3 and it worked again [00:15] xla has joined the channel [00:16] SubStack: ACTION wonders how typeof works [00:17] bpadalino: maybe it calls magic() ? [00:17] SubStack: could be [00:18] _announcer: Twitter: "#Erlang .vs. node.js http://is.gd/g63f2 and @uwiger says: http://www.infoq.com/presentations/Death-by-Accidental-Complexity" -- Kenji Rikitake. http://twitter.com/kenji_rikitake/status/27686194727 [00:21] xla has joined the channel [00:24] ngw has joined the channel [00:30] _announcer: Twitter: "http://is.gd/g63f2 "No other system that I know of [other than Erlang] has such a focus on being non-blocking, and node.js is no exception."" -- Michael(tm) Smith. http://twitter.com/sideshowbarker/status/27687177265 [00:33] _announcer: Twitter: "http://is.gd/g63f2 «"Good enough" concurrency, combined with [large popularity] and a fast runtime, combined with ease of use» = node.js" -- Michael(tm) Smith. http://twitter.com/sideshowbarker/status/27687482975 [00:34] mikew3c: man, that announcer bot is split-second fast [00:35] _announcer: Twitter: "Server-side JavaScript's "node.js" I tried: Ashiaruburogu http://ow.ly/19uTrI" [ja] -- Javascript News. http://twitter.com/del_javascript/status/27687627063 [00:38] _announcer: Twitter: "Erlang may just be >= nodejs for concurrency, but having one code base and one language makes node the winner for me @sideshowbarker" -- Insain design. http://twitter.com/insaindesign/status/27687884105 [00:38] tekky: not quite sure that non-blocking tweet comes across as the author intended heh... [00:39] mikew3c: tekky: I blame Twitter [00:39] tekky: mikew3c: i blame the 'and node.js is no exception' at the end of it :P [00:40] mikew3c: ah, I see what you mean [00:41] tekky: no other vegetable is quite like a cumber [other than the zuchinni], and the cucumber is no exception [00:41] tekky: heh [00:41] tekky: doesnt quite read right [00:46] noonat has joined the channel [00:53] c4milo has joined the channel [00:53] tisba_ has joined the channel [00:55] benburkert has joined the channel [00:56] c4milo has joined the channel [00:56] c4milo has joined the channel [00:57] c4milo has joined the channel [00:58] c4milo has joined the channel [00:59] c4milo has joined the channel [01:00] c4milo has joined the channel [01:00] c4milo has joined the channel [01:01] _announcer: Twitter: "erlang and node.js story. Their own, separate from both good (hard to learn), I, and many people (especially when considering the operation) is very strong node.js are inclined. I also think the cost of education http://bit.ly/apPSA6" [ja] -- Muddy Dixon. http://twitter.com/muddydixon/status/27689751948 [01:01] c4milo has joined the channel [01:01] c4milo has joined the channel [01:02] amerine has joined the channel [01:02] c4milo has joined the channel [01:02] hzin has joined the channel [01:03] hzin has joined the channel [01:03] c4milo has joined the channel [01:03] c4milo has joined the channel [01:04] c4milo has joined the channel [01:05] c4milo has joined the channel [01:05] nteon has joined the channel [01:05] c4milo has joined the channel [01:05] galaxywatcher has joined the channel [01:06] c4milo has joined the channel [01:07] ossareh has joined the channel [01:07] c4milo has joined the channel [01:08] TheEmpath_ has joined the channel [01:08] c4milo has joined the channel [01:09] c4milo1 has joined the channel [01:09] c4milo has joined the channel [01:10] HAITI has joined the channel [01:11] c4milo has joined the channel [01:11] c4milo has joined the channel [01:11] c4milo has joined the channel [01:12] skohorn has joined the channel [01:12] stephenjudkins has joined the channel [01:21] Evet: do you serve node.js apps directly? or proxy_pass from nginx? or haproxy-> node.js for dynamic content + nginx for static files? [01:24] Tim_Smart: Evet: I almost always have either nginx or haproxy in front. [01:24] _announcer: Twitter: "[Javascript] read later / node.js http://htn.to/DGqjo6" [ja] -- toshifusa. http://twitter.com/toshifusa/status/27691692954 [01:24] Tim_Smart: For small stuff nginx is fine, otherwise look into haproxy. [01:24] hushfool has joined the channel [01:31] gf3 has joined the channel [01:32] WM has joined the channel [01:32] hushfool: trying to run kurokikaze's spider example, but I'm getting an error -- is this the right place to ask questions about the error? [01:32] _announcer: Twitter: "If you write a single Ibentodoribunsaba @ muddydixon erlang than purely nodejs How would it be fast, but I feel that because of a simple membrane." [ja] -- 廣木 大地 [01:32] _announcer: . http://twitter.com/hiroki_daichi/status/27692380768 [01:33] Evet: Tim_Smart: will nginx affect redis's PUB/SUB throught node_redis? [01:34] Tim_Smart: Evet: Generally redis isn't on port 80/ [01:37] seen- has joined the channel [01:38] _announcer: Twitter: "# Node.js but can display only html, apache + node.js feel that is more comfortable. The server websocket node.js / AP Maybe better as a server assigned banged up soaked. Na not very clear" [ja] -- syuta.nakamura. http://twitter.com/syuta/status/27692801553 [01:38] __mn__ has joined the channel [01:39] visnup has joined the channel [01:39] __mn__: I have a problem where if I create a new directory and then inside the callback function create a new file... it doesn't work. I get a permission denied, even though I have the directory set to 777. [01:42] onar has joined the channel [01:42] _announcer: Twitter: "Someone please package up Objective-J into a requirable module for node.js." -- Steve Streza. http://twitter.com/SteveStreza/status/27693144082 [01:43] fjakobs_ has joined the channel [01:43] hzin has joined the channel [01:44] softdrink has joined the channel [01:44] jameshome has joined the channel [01:48] tksohishi has joined the channel [01:49] saikat has joined the channel [01:50] _announcer: Twitter: "Thanks for the great node.js auth suggestions... think I'm going to try http://bit.ly/9TPPv4." -- mcantelon. http://twitter.com/mcantelon/status/27693781625 [01:54] noonat has joined the channel [01:55] mbrochh has joined the channel [01:57] Evet: it returns "/usr/bin/env: python: No such file or directory" when i try to ./configure [01:57] Tim_Smart: You need python to build node. [01:57] Evet: node.js depends on python? [01:57] Tim_Smart: Yeah. [01:58] pquerna: Evet: v8 depends on python to build [01:59] pquerna: Evet: node.js also depends on it at this point because v8 does. (would be very hard to remove dep from v8) [02:00] _announcer: Twitter: "I know this used to be my job, but having to work on the #dotnet stack is so tedious and painful. ... can't wait to get back to #nodejs :-D" -- Charlie Robbins. http://twitter.com/indexzero/status/27694526841 [02:04] Evet: node.js doesnt like ccache [02:04] __mn__: does anybody know why I get permission denied error while writing a file inside the callback function of a new directory? [02:04] __mn__: the permission is set to 777. [02:05] Eber has joined the channel [02:05] Tim_Smart: What is the permission for your user / group? [02:05] Eber: Guys, does anyone here knows any script that unifies Web SQL and IndexedDB into one API alone? [02:05] fjakobs_ has joined the channel [02:06] __mn__: fs.mkdir(path, 777, function (err) { fs.writeFileSync(path + '/file', 777); }); [02:07] mjr_: you should check the err argument first in the mkdir callback [02:07] mjr_: It's probably the case that mkdir is failing, which makes writeFileSync also fail [02:07] __mn__: mjr_: the directory is created, there is no error on mkdir. [02:07] __mn__: but I do get an error on writeFileSync "permission denied" [02:07] c4milo1 has joined the channel [02:08] c4milo2 has joined the channel [02:08] Tim_Smart: __mn__: Put a if (err) throw err; in there as well. [02:08] __mn__: if the directory already exists... writeFileSync works [02:08] Tim_Smart: Could have already been created by another user. [02:09] Tim_Smart: Hm ok. [02:10] Evet: would you use lighttpd instead of nginx front of node? [02:10] __mn__: note... it does exist withinside of an fs.readFile(path + '/file', 'utf8', function(err, data) { if (err) { mkdir { writefile } } [02:10] __mn__: is that valid? [02:11] __mn__: to have if (err) { code here } [02:12] jpld has joined the channel [02:12] strmpnk has joined the channel [02:13] a_meteorite has joined the channel [02:13] paulr has joined the channel [02:15] davidascher has joined the channel [02:15] a_meteorite has joined the channel [02:17] tisba has joined the channel [02:19] mbrochh has joined the channel [02:20] mtodd has joined the channel [02:21] mjr_: looks like the node installer doesn't properly copy ev.h and eio.h anymore [02:23] isaacs: mjr_: that's lame [02:24] isaacs: hm, they all show up in /usr/local/include/node for me? [02:24] mjr_: yeah, so if your addon does #include , that'll try to include ev.h, and then break [02:24] mjr_: try from a fresh install [02:24] mjr_: I have ev.h and eio.h on older machines, but I just installed node on a brand new machine. [02:24] mjr_: A Linux machine, so maybe that matters. [02:25] isaacs: ahh.. [02:25] isaacs: yes. that's broke [02:26] mjr_: I'd guess it is related to the fix for this warning [02:26] mjr_: /usr/local/include/node/eio.h:166: warning: comma at end of enumerator list [02:27] slashxr has joined the channel [02:30] saikat has joined the channel [02:33] noahcampbell has joined the channel [02:34] isaacs: that should be fine, thoguh [02:34] isaacs: c doesn't mind about commas after enums [02:35] isaacs: i mean, that warning is telling you to use a comma-first style, which is of course objectively better in every way, but it'sjust a style thing [02:36] bpadalino: what do you mean by comma-first ? [02:36] mikew3c_ has joined the channel [02:36] mjr_: ha [02:37] bpadalino: oh i think i see an example .. [02:39] pquerna: not looking good for the giants :( [02:40] pquerna: isaacs: old c compilers on like AIX cared i thought :) [02:40] _announcer: Twitter: "@haruki_zaemon what ruby mistakes are people porting to node.js?" -- Sean T Allen. http://twitter.com/SeanTAllen/status/27697472577 [02:40] isaacs: pquerna: oh, i see. [02:40] isaacs: pquerna: then i guess you ought to use comma-first, then, huh? [02:40] isaacs: :) [02:41] pquerna: hah [02:42] _announcer: Twitter: "hack on node.js or continue the #sfgaints #torture session, I can't decide." -- Paul Querna. http://twitter.com/pquerna/status/27697636483 [02:43] isaacs: bpadalino: http://github.com/ry/node/blob/master/deps/http_parser/http_parser.h#L72-95 [02:43] _announcer: Twitter: "@pquerna Node.js is my suggestion. It's a fun stack." -- Jeremy Whitlock. http://twitter.com/jcscoobyrs/status/27697668454 [02:43] davidascher has joined the channel [02:43] bpadalino: isaacs: thanks very much [02:44] seen- has joined the channel [02:47] Tim_Smart: ACTION is not a fan of comma first [02:47] sonnym: Tim_Smart: why not? [02:48] Tim_Smart: sonnym: I find it ugly. [02:49] sonnym: touche. [02:49] Tim_Smart: I like my punctuation at the end of my sentences. [02:50] Tim_Smart: .Period [02:50] Tim_Smart: Oh wait... [02:50] sonnym: whatever works for you is basically the attitude I take on most things style [02:50] Tim_Smart: Pretty much. I don't very strong feelings for either. [02:50] Tim_Smart: *have very [02:50] _announcer: Twitter: "My weekend project is complete! Wrote a node.js client module for the Dropbox API: http://bit.ly/anMkYI" -- Evan Meagher. http://twitter.com/evanmeagher/status/27698212323 [02:51] evanmeagher: woot [02:52] Evet: can node.js work with python3? [02:53] sonnym: depending on what you're trying to do, presumably yes? [02:53] jakehow has joined the channel [02:53] jpld has joined the channel [02:53] Tim_Smart: The question is probably more: Can scons and waf work with python 3? [02:55] tekky has joined the channel [02:55] Twelve-60 has joined the channel [02:56] c4milo has joined the channel [02:56] c4milo has joined the channel [02:56] c4milo has joined the channel [02:57] c4milo has joined the channel [03:00] Evet: answer: node.js can't work with python3 [03:03] amerine has joined the channel [03:04] _announcer: Twitter: "@liammclennan There was a node.js "like" rumble recently. http://nodeknockout.com/" -- Hernan Garcia. http://twitter.com/theprogrammer/status/27699159560 [03:06] ajsie: is there a way to get an online file with node api [03:06] ajsie: or do i have to use "wget"? [03:06] ehaas: ajsie look into httpClient [03:07] SubStack: http://nodejs.org/api.html#http-client-183 [03:07] ehaas: http.Client [03:08] ajsie: okay thanks [03:12] ajsie: could someone show me how to save a file to the harddrive? [03:12] ajsie: i cant get the API [03:12] Tprice: whats the bast way to debug node? [03:12] ajsie: so many methods [03:14] Yuffster has joined the channel [03:14] Tprice: if you have ever used the web inspector in chrome [03:14] Tprice: you can inject code into the page through the console [03:14] Tprice: is there a way to do that with node? [03:15] sonnym: you can add a repl [03:15] sonnym: then you have access to anything in the global namespace [03:16] mikeal: http://github.com/mikeal/watch [03:16] mikeal: I need to write better tests [03:17] Tprice: sonnym: you mean node-repl? [03:17] sonnym: Tprice: https://gist.github.com/a3d0bbbff196af633995 [03:17] sonnym: like the last 2 lines of that [03:21] meatmanek has joined the channel [03:21] patbam has joined the channel [03:22] smtlaissezfaire has joined the channel [03:28] polotek has joined the channel [03:32] _announcer: Twitter: "Flash poll: semicolons in JS/node.js?" -- Evan Meagher. http://twitter.com/evanmeagher/status/27701172884 [03:33] meatmanek: ACTION semicolons. [03:33] evanmeagher: my friend is giving me shit for not using them in a recently-finished module :-\ [03:33] meatmanek: though I've used Go and its very liberal automatic semicolon insertion was nice. [03:34] Tprice: sonnym: thanks! [03:34] evanmeagher: what are the origins of the anti-semicolon regime in modern js? [03:34] polotek: evanmeagher: it always bothers me that you would bother to give someone crap for something like that [03:34] evanmeagher: wanting to pretend to be rubyists? [03:35] sonnym: Tprice: no problem [03:35] stephenjudkins has joined the channel [03:35] evanmeagher: polotek: yeah, it seems trivial. much like any programmer religious issue. [03:35] polotek: some people find it cleaner and easier to read [03:35] meatmanek: javascript predates ruby [03:35] meatmanek: so I doubt it's that [03:35] polotek: it's definitely one of reasons people tell me they like ruby [03:35] polotek: personally I find ruby hard to read without the punctuation [03:36] polotek: one good thing that has come out of it is that there's now good knowledge out there about it [03:36] stephenjudkins_ has joined the channel [03:36] meatmanek: I think it's more likely that it's to allow more javascript to run without errors [03:36] polotek: I guess it's important to know that they really aren't necessary in most scenarios if you write your code properly [03:36] polotek: but as soon as something becomes a personal aesthetic choice, you get the zealots [03:37] mitchellh has joined the channel [03:38] evanmeagher: interesting [03:38] evanmeagher: i'm new to node, so thanks for the input [03:38] polotek: evanmeagher: I've had a few arguments with people pushing that no-semi kool-aid [03:38] meatmanek: I guess what scares me about automatic semicolon insertion is that it's not terribly well-understood [03:39] meatmanek: and that different implementations might do it differently [03:39] polotek: if you like it, do it, if not, don't let people make you feel like you should like it [03:39] meatmanek: so code that compiles fine on one JS interpreter might not work on another [03:39] polotek: meatmanek: that's what I mean by education [03:39] polotek: apparently the semi-colon insertion is pretty standard and works the same across all the popular engines [03:39] polotek: you just have to know the rules [03:40] polotek: ask isaacs, he'll give you an earful [03:40] evanmeagher: might it be , as one who doesn't know the rules yet, best to just use them for the time being? [03:40] polotek: evanmeagher: you won't go wrong using htem [03:40] polotek: them [03:40] mikeal: semi-colon insertion works everywhere [03:40] mikeal: it's part of the spec [03:40] mikeal: it works in IE6 :) [03:41] smtlaissezfaire has joined the channel [03:41] mjr_: it works everywhere except for the classic crockford examples [03:41] evanmeagher: yeah, i see that: http://bclary.com/2004/11/07/#a-7.9 [03:41] antono has joined the channel [03:41] evanmeagher: ty mitchellh for the link [03:45] fizx has joined the channel [03:48] dlc has joined the channel [03:49] davidascher has joined the channel [03:49] konobi: hey davidascher, how goes? [03:50] mjr_: Is there a node module for serving static files that maps / to /index.html? [03:50] mjr_: I've looked at many, and none of them seem to have handled this. [03:52] konobi: if(path.match('/$')){ path = path + 'index.html'; } [03:53] unomi has joined the channel [03:53] mitchellh has left the channel [03:53] mjr_: I could just write my own, but I figured that surely somebody must have done this already [03:53] konobi: a whole library just for that? [03:53] konobi: or do you mean some express middleware? [03:54] mjr_: yeah, something for connect or whatever [03:54] mjr_: that logs, caches, hopefully gzips, etc [03:54] mjr_: I want to serve mostly static files with node, much like an existing site currently does with apache. [03:55] mikeal: i kinda started it [03:55] mjr_: Connect looks like it is almost there, but staticProvider only maps directly to filenames. [03:56] mjr_: mikeal: did you add something for connect or a standalone thing? [03:56] mikeal: it was a standalone thing [03:56] mikeal: i didn't get far enough to use it tho [03:56] konobi: mjr_: patch the middleware? [03:56] mikeal: it was a little grand [03:56] _announcer: Twitter: "Cool stuff discussed at October #altnetseattle: Pex, Sinatra, Rack, Rails, ZeroMQ, Autofac, node.js, NoPIA, and something called MEF?" -- woan. http://twitter.com/woan/status/27702779559 [03:57] konobi: mjr_: staticProvider does support it [03:57] mjr_: konobi: I guess that's what I'll do, or just add something to the stack. [03:57] mikeal: it was meant to be an apache replacement [03:57] mikeal: will the bells and whistles [03:57] konobi: http://github.com/senchalabs/connect/blob/master/lib/connect/middleware/staticProvider.js#L77-80 [03:57] mjr_: sure [03:57] mjr_: but what is? [03:57] mikeal: i'll get back to it some day [03:57] mikeal: i don't remember how much of it worked [03:57] mjr_: oh sorry, you meant your thing [03:58] mjr_: konobi: oh, interesting. [03:58] mjr_: I wonder why it doesn't work then [03:58] patbam: JimBastard: are you perchance around? [03:59] meatmanek has left the channel [03:59] konobi: mjr_: are you definitely putting the slash at the end? [03:59] mjr_: I dunno. I'll go back to connect and see [04:02] mde has joined the channel [04:03] Me1000 has joined the channel [04:03] badaxx has joined the channel [04:04] davidascher has joined the channel [04:04] _announcer: Twitter: "[HTML5] [nodejs] Web Socket test Chrome Extension ...: ... "Are you OK with this source?" And I, my purpose is the development of tests now use Web Socket ... http : / / bit.ly/99wyHv" [ja] -- Chrome Japan. http://twitter.com/chrome_jp/status/27703284790 [04:05] SvenDowideit has joined the channel [04:08] sugardave has joined the channel [04:09] HAITI has joined the channel [04:09] HAITI has joined the channel [04:12] polotek: this is a stupid question, but it's late and I'm afraid I'm doing something stupid [04:12] polotek: if you make a v8 persistent handle weak, it'll get GC'ed [04:12] polotek: but only if there are no javascript references to it right? [04:13] mjr_: that's some deep magic [04:13] mjr_: it looks like iOS 4.2 beta supports WebSocket again. Hopefully they'll leave it in this time. [04:13] polotek: if it has a reference in js space then it won't trigger gc [04:14] pquerna: sounds about right [04:14] pquerna: we have seen some issues with things like that not working very well though, with Buffers for example [04:14] pquerna: they don't seem to get GC'ed nearly as well as native JS objects [04:15] pquerna: mad men over, giants lost.. time for more ssl i think. [04:16] mjr_: that will assuage your grief over baseball [04:16] polotek: pquerna: actually it seems like my object is getting collected even though there's a js reference [04:16] hassox has joined the channel [04:18] throughnothing_ has joined the channel [04:19] ajsie: JimBastard: you there? [04:19] mbrochh has joined the channel [04:19] SvenDowideit has joined the channel [04:20] _announcer: Twitter: "Helpful tried bdotdub's nodejs-chat at master - GitHub stumbled out error because the older. The server side>> 5 based 書Ki換Etara, worked. http://j.mp/bDiqcq # twittaw" [ja] -- YungSang. http://twitter.com/yungsang/status/27704284605 [04:21] sugardave has joined the channel [04:26] _announcer: Twitter: "Working on a prototype with node.js, express.js and redis. Lightning-fast." -- Eneko. http://twitter.com/eneko/status/27704602466 [04:26] _announcer: Twitter: "Today, Node.JS and was studying WebSocket. Enjoyed a long time. http://j.mp/bDiqcq # twittaw" [ja] -- YungSang. http://twitter.com/yungsang/status/27704633740 [04:28] evanmeagher: npm question: how do you push package updates? do you run `npm publish` again? [04:28] mikeal has joined the channel [04:28] micheil: digitalspaghetti: ahem. You're the one stalking me, I was hear first, remember? :P [04:28] mjr_: evanmeagher: yep [04:28] mjr_: evanmeagher: make sure you increment the version number in package.json [04:29] evanmeagher: even if you're only updating package.json? [04:29] mjr_: I believe so, yes [04:29] evanmeagher: mk, thanks [04:30] Arro has joined the channel [04:31] davidascher has joined the channel [04:34] themiddleman has joined the channel [04:35] saikat has joined the channel [04:36] saikat_ has joined the channel [04:38] evanmeagher: does npm clean up the >n latest packages? [04:38] Tim_Smar1 has joined the channel [04:38] evanmeagher: as in, for when you publish 30 version of your module, `npm ls` doesn't list all 30? [04:39] mjr_: I think you have to manually "unpublish" them if you want [04:39] mjr_: The issue is that somebody might have written something else that has a dependency to your published version [04:39] mjr_: One of the neat things about npm is that it can sort out specific dependencies and even have multiple versions of the same lib installed. [04:40] bent_ruyman has joined the channel [04:41] breccan_ has joined the channel [04:41] evanmeagher: cool. so is it best practice to leave older versions alone? it seems like their number could get out of hand eventually. [04:43] bent_ruyman has joined the channel [04:43] bent_ruyman has left the channel [04:43] bentruyman has joined the channel [04:44] bentruyman has joined the channel [04:45] pedrobelo has joined the channel [04:46] mikew3c has joined the channel [04:51] bentruyman has joined the channel [04:52] sivy: evening. I'm working my way through my first node app, going off of the app described in howtonode's express+mongodb article [04:52] sivy: (http://howtonode.org/express-mongodb) [04:53] sivy: so I setup my storage provider code very similar to the ArticleProvider in the sample [04:54] sivy: but now I want to add support for another... model? [04:54] sivy: and I'm running into mystery errors [04:55] sivy: anyone familiar with the code? [04:55] murphy has joined the channel [04:56] sivy: the first version of my "provider" code worked fine [04:56] sivy: with a single exported Provider object [04:56] sivy: but then I wanted to add a second kind of Provider [04:56] sivy: in the same file [04:57] sivy: and I'm getting errors that don't make sense [04:57] dandean has joined the channel [04:58] SvenDowideit has joined the channel [04:58] dandean: Can anybody recommend any of these over the other --> node-couchdb, couch-client or cradle ? [05:00] Evet has joined the channel [05:00] JimBastard_ has joined the channel [05:01] JimBastard: patbam ajsie yeah [05:01] ajsie: JimBastard: http://www.cloud9ide.com/ [05:01] ajsie: have you seen this? [05:01] __mn__ has joined the channel [05:02] JimBastard_: aye [05:02] ajsie: maybe that could help you in the future? [05:02] ajsie: node/chrome/javascript integrated [05:02] ajsie: im definitely using it :D [05:02] JimBastard_: yeah...we'll see [05:02] __mn__: asjie: I just came into the chat - what about node/chrome/js ? [05:03] ajsie: so exciting to live on the edge [05:03] ajsie: __mn__: http://www.cloud9ide.com/ [05:03] __mn__: thanks [05:03] ajsie: uw [05:09] benburkert has joined the channel [05:11] overra has joined the channel [05:16] __mn__: what is the proper way to test to see if a directory exists... if (fs.readdir(dir)) throws errors rather than answering. [05:16] cjheath: In a fresh git clone of node.js on OSX 10.5.8, the "../configure script" fails on "Checking for library dl" with an exception in wafadmin/Node.py: AttributeError: 'module' object has no attribute 'h_file' [05:16] cjheath: how do I get past that? [05:18] sonnym: _mn_: you could spawn [ -d /tmp ] [05:18] sonnym: where /tmp is the directory name [05:19] __mn__: ... I thought spawn was for child processes? [05:19] sonnym: not very clean though. have you tried fs.stat(path) ?] [05:20] __mn__: yeah I tried doing fs.stat(path).isDirectory() but if the directory doesn't exist it errors rather than true false. [05:20] sonnym: this works fine: require("fs").readdir("/nonexistent", function(err, files) { console.log(err) }) [05:20] cjheath: No thoughts? [05:20] Tim_Smar1: __mn__: Do whatever you are trying to do, and check for errors. [05:21] __mn__: is it okay to put code inside the if (err) { code here } ? cause I still can't solve the problem I'm getting from way back when about making a file right after making the directory (and the directory creation is successful) [05:23] sonnym: are you chaining your callbacks? [05:23] sonnym: could be that the async directory creation isn't happening before you attempt to create the file [05:23] sonnym: and you should be able to handle errors in that way [05:23] __mn__: I am creating the file inside of the callback, yes. [05:24] sonnym: err looks like: { message: 'ENOENT, No such file or directory', stack: [Getter/Setter], errno: 2 } [05:24] Tim_Smart: __mn__: You can check for the errno: if (constants.EEXIST === error.errno) { ... } [05:24] __mn__: I have the permission set to 777, but I get a "permission denied" when I do it.... IF the directory already exists then the file will be created (even though its inside the mkdir) [05:25] sveimac has joined the channel [05:25] __mn__: fs.mkdir('data/' + message.email, 777, function(err) { [05:26] __mn__: oops, IRC preserves tabs. [05:26] dgathright has joined the channel [05:26] __mn__: fs.mkdir('data/' + message.email, 777, function(err) { [05:27] Tim_Smart: http://pastie.org/ | http://gist.github.com/ :) [05:29] __mn__: http://pastie.org/1229211 [05:29] __mn__: I run the code and the directory gets created, but I get a write error [05:29] sonnym: what's the error? [05:30] Tim_Smart: ENOENT [05:30] Tim_Smart: __mn__: Are you trying to write '777' to a file? [05:30] polotek: anybody know offhand when --expose_gc was added to node? [05:30] __mn__: no... anything else wasn't working, so I was just trying different CHMODs (that pasties doesn't have the data parameter, note) [05:30] Tim_Smart: polotek: It is a V8 flag [05:31] admc_ has joined the channel [05:31] admc has joined the channel [05:31] polotek: Tim_Smart: ah, was it added there recently? [05:31] Tim_Smart: polotek: Nope. I don't think so. [05:31] Tim_Smart: polotek: Try node -help for v8 options. Note the - instead of -- [05:32] __mn__: I get an EACCESS permission denied error [05:32] sonnym: it's a bit strange that you're reading from a subdirectory and then trying to create a directory [05:32] polotek: Tim_Smart: I'm trying to figure out when the feature became available in node [05:32] jacoblyles has joined the channel [05:33] __mn__: note... if the directory already exists... the file gets written. If it doesn't already exist, then I get an error -- EVEN THOUGH its inside the mkdir calback [05:33] Tim_Smart: polotek: You will have to ask the V8 team that one. [05:33] polotek: not a big deal, thanks [05:33] __mn__: sonnym: because how else do I detect if a directory/file exists without using an error? [05:33] __mn__: thats what I asked about before [05:34] __mn__: if (fs.readdirSync(dir)) doesn't work ... or fs.stat().isDirectory() etc. [05:34] __mn__: they all throw errors [05:34] CIA-36: node: 03Ben Noordhuis 07makefile * ra5bb9dc 10/ Makefile : Make project compile on linux. - http://bit.ly/c4MCuv [05:34] CIA-36: node: 03Ben Noordhuis 07makefile * r3f38c51 10/ (Makefile wscript): Create and install nodejs pkg-config descriptor. - http://bit.ly/anKNTf [05:35] __mn__: but you guys said to determine that based off of the errors, so the if (err) statement basically means "this directory and file doesn't exist, so then create it" [05:35] __mn__: the directory gets created, and inside it's callback the file gets created -- but the file won't create, unless the directory already exists (before the mkdir) even though the callback is suppose to mean the directory exists. [05:36] __mn__: the permission error? its set to 777 (not that I like that) but even with that... it still doesn't have permission. [05:36] __mn__: I've been trying to figure this out for like 2 hours now, call me stupid. but its really annoying [05:36] sonnym: try 0777 in the mkdir call [05:37] sonnym: drwxr-xr-x 4096 2010-10-18 01:37 data0777 [05:37] sonnym: dr----x--t 4096 2010-10-18 01:37 data777 [05:38] __mn__: got a this.utf8Write "offset is out of bounds" error. [05:38] chapel has joined the channel [05:38] sonnym: probably on writeFileSync [05:38] sonnym: second parameter is the data you want [05:39] __mn__: fs.writeFileSync('data/' + message.email + '/pc', 'greetings', 0777); ... right [05:39] __mn__: 0777 and 777 don't work [05:40] sonnym: third parameter is an encoding. there's no way to set permissions with writeFile, looks like [05:41] __mn__: doesn't matter... still get Permission denied error [05:41] __mn__: fs.writeFileSync('data/' + message.email + '/pc', 'greetings', encoding='utf8'); with that [05:41] sonnym: are you calling mkdir with 0777? [05:42] sonnym: you may have to chmod the directory, but 777 looks like it will result in a more or less unusable directory [05:42] __mn__: 777 ... [05:42] __mn__: okay 0777 is now working. [05:43] sonnym: nice [05:43] __mn__: thank you, very much. 2 hours for that, ugh. [05:43] cjheath: Fixed my build problem: need python26 not 25 to build [05:43] sonnym: no problem [05:44] sonnym: I haven't written code in a few days, so it's good to be able to contribute in some way :) [05:44] __mn__: sonnym: so are all chmod 4 digits? all chmod stuff I've done have been 3 digits. Owner-Group-Public. [05:44] ryah_: isaacs: you should wrap your git commit messages [05:44] __mn__: whether its been FTP... ubuntu shell, etc. [05:45] mjr_: ryah_: did you notice that ev.h and eio.h don't get installed by default anymore? [05:45] sonnym: _mn_: I'm not entirely sure. it technically uses a hex number, but I think bash chmod is nice about interpreting a regular int as a hex [05:45] ryah_: mjr_: i saw the bug report [05:45] ryah_: mjr_: strange, since i thought modules were using it [05:45] __mn__: sonnym: thanks. [05:45] mjr_: OK, cool. I didn't know if it had been reported. [05:46] mjr_: modules are using it, and they break badly [05:46] mjr_: But only on a fresh install [05:46] mjr_: If you've had an older version before the bug, things keep working. [05:47] illver has joined the channel [05:48] ryah_: oh hm okay [05:49] matjas has joined the channel [05:51] jacoblyles has joined the channel [05:58] CIA-36: node: 03isaacs 07makefile * rd3acfaf 10/ test/pummel/test-base64-bigfile.js : [05:58] CIA-36: node: A big base64 file encoding/decoding test [05:58] CIA-36: node: Originally written to try to track down this bug report: http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/13924 [05:58] CIA-36: node: As it turns out, it's showing a completely different kind of failure. When the [05:58] CIA-36: node: file is base64 encoded with the native program, then decoded with node, it [05:58] CIA-36: node: doesn't match the original. Something's fishy. - http://bit.ly/9pK5EF [05:58] CIA-36: node: 03Ryan Dahl 07master * rccf2a04 10/ (deps/libeio/wscript deps/libev/wscript): Install ev.h and eio.h - http://bit.ly/9ooqYt [05:58] mjr_: nice [05:59] Blink7 has joined the channel [06:01] mjr_: Comcast is sustaining 20mbits/sec over a single TCP between Dreamhost and my house. Pretty nice for US broadband. [06:12] mytrile has joined the channel [06:15] HAITI has joined the channel [06:17] pquerna: o [06:17] pquerna: so. [06:19] mbrochh has joined the channel [06:23] jesusabdullah: so? [06:24] jesusabdullah: Rails Rumble apps: Boring, or boring? [06:24] jesusabdullah: (and not just because I don't know ruby or use rails) [06:24] sonnym: I've seen a few that looked interesting [06:26] sonnym: and even then, those are just the ones about the fold on hn [06:26] jesusabdullah: huh? [06:27] jesusabdullah: the fold? [06:27] sonnym: the ones I can see without scrolling. [06:27] sonnym: really just splendid bacon and tldr.it [06:28] sonnym: nothing seems to be really pushing boundaries like node knockout entries, a lot of which used websockets [06:30] jesusabdullah: Yeah, exactly [06:30] jesusabdullah: tldr.it looks alright, but none of them are doing anything that hasn't been done before, if with a slightly different theme [06:31] jesusabdullah: what's splendid bacon? [06:31] sonnym: I don't know. I think (hope) the rails fad is on the way out [06:31] sonnym: it's just a time tracking/agile project management utility [06:31] ph^ has joined the channel [06:31] jesusabdullah: ah [06:32] jesusabdullah: There were a lot of those for some reason [06:32] jesusabdullah: I don't really *mind* rails or anything [06:32] jesusabdullah: I was just surprised to see how little variation or envelope-pushing there was [06:32] jesusabdullah: especially since, in my mind, most ruby users feel like they're envelope-pushers [06:32] sonnym: I've been using it at work recently and have been unimpressed [06:33] jesusabdullah: orly [06:33] jesusabdullah: Any web stuff I do is side projects, so [06:33] jesusabdullah: node is actually the only web platform I'm really familiar with [06:33] jesusabdullah: "platform" [06:33] jesusabdullah: :) [06:34] cjheath: Not a very god basis for criticising then, eh? [06:34] SubStack: speaking of which, I'm disillusioned with web frameworks again [06:34] cjheath: *good [06:34] sonnym: yeah, I fell in love with node immediately. really powerful and I like being in control. [06:35] jesusabdullah: cjheath: I'll be the first to admit that. [06:35] V1 has joined the channel [06:35] jesusabdullah: cjheath: Like I said, I'm not criticizing rails proper--I'll leave that to others more capable [06:35] sonnym: I think that's the big thing, rails seems to rely on testing and an enormous (slow) stack to get anything done. I prefer understanding what's going on and being able to do anything I feel like [06:35] SubStack: something about express pissed me off but I can't remember what it was [06:36] jesusabdullah: It uses activerecord doesn't it? >:D [06:36] cjheath: I know a lot of Rails folk, and most f them are also using a lot of other tech (incl node)... no fanbois around here [06:36] cjheath: rails uses activerecord by deault, but there are 2 alternatives that are credible [06:36] cjheath: datamapper is pretty good [06:37] jesusabdullah: the ability to easily swap it out is new-ish to rails 3, isn't it? I know that's one of the selling points [06:37] cjheath: Yeah, almost everything is pluggable in R3 [06:38] jesusabdullah: One of these days I might give Rails 3 a shot [06:38] jesusabdullah: if only so I can have a legit opinion on it [06:38] cjheath: I like Sinatra for simple things [06:38] jesusabdullah: Should probably learn some ruby first [06:38] jesusabdullah: since, well [06:38] SubStack: oh right I don't like how stateful express is [06:38] jesusabdullah: idk ruby [06:38] sonnym: I also don't like ruby from my experience haha [06:38] SubStack: descriptive semantics! [06:38] jesusabdullah: Your MOM is a descriptive semantic [06:38] jesusabdullah: erm [06:38] jesusabdullah: I mean [06:38] jesusabdullah: :) [06:39] SubStack: ruby would be super awesome if the scoping wasn't so fucked [06:39] jesusabdullah: is it as fucked as....python? :v [06:39] jesusabdullah: ACTION knows (a significant subset of) python [06:39] SubStack: moreso [06:39] jesusabdullah: orly? [06:39] SubStack: class scope, instance scope [06:39] jesusabdullah: Oh, that whole thing [06:39] jesusabdullah: Yeah, tbh threw me for a loop [06:40] SubStack: nested classes don't close under their container blocks :( [06:40] trochala has joined the channel [06:40] cjheath: idk what you're talking about and I've been doing Ruby for 8 years [06:40] cjheath: There are some small strangenesses, but nothing major [06:40] SubStack: ! [06:41] cjheath: example? [06:41] SubStack: creating [06:41] jesusabdullah: I don't think I've ever nested classes [06:41] jesusabdullah: Hmm [06:42] Draggor1 has joined the channel [06:43] jesusabdullah: At least it's not matlab? :) [06:43] jesusabdullah: Just wait, someday I'll get around to writing dnode-matlab [06:43] jesusabdullah: and then you'll be sorry [06:43] cjheath: Still don;t know what the complaint is [06:43] cjheath: SubStack: gist it? [06:44] HAITI has joined the channel [06:44] SubStack: beh can't think of it [06:44] SubStack: anyways it was a huge pain while writing dnode-ruby [06:45] cjheath: The only thing I know that;s a bit odd about Ruby's scoping is that when you have a variable used inside a lambda block [06:45] SubStack: since eventmachine takes a class to listen on a port [06:45] cjheath: if it existed outside the block, it;s a reference to that, else it's localto the block [06:45] cjheath: which is exactly what you would expect [06:45] cjheath: RUb 0.8.4 was a bit different/broken [06:45] SubStack: and you can't just Foo.bind() like you can in javascript [06:45] cjheath: but that's years ago now [06:45] SubStack: also I don't really like classical inheritence [06:46] SubStack: closures are much simpler [06:46] cjheath: Yeah, JS is pretty sweet, but its inheritance is fsck'd [06:46] SubStack: disagree [06:46] SubStack: JS realizes that you shouldn't use inheritance much anyways [06:46] jesusabdullah: if inheritance is what I think it is (I'm not good with programming jargon), I actually kinda like JS's model [06:47] cjheath: It's a good model... badly implemented [06:47] pquerna: Exception::Error [06:47] SubStack: well it would be nice if __proto__ was native to the object so you could mutate it [06:48] SubStack: without having those changes show up in every other instance [06:48] SubStack: like how ruby has eigenclasses [06:48] polotek: SubStack: I don't know about eigenclasses [06:48] polotek: but if you need to change the instance, why not just do it? why do you need __proto__ [06:48] cjheath: Ruby is a little *too* funky in my opinion [06:49] jesusabdullah: This is why I don't use classes. Ever. >:| [06:49] jesusabdullah: Or functions. [06:49] SubStack: polotek: for crazy tricks [06:49] cjheath: it would be nice if you could just "object.class = SomeClass" [06:50] cjheath: Though with Ruby you can do mixins, which gives you almost unlimited multi-classing [06:50] simme has joined the channel [06:50] SubStack: oh builtin classes are annoying in JS too [06:50] polotek: SubStack: you can change the instance, or you can change the proto chain with __proto__, not sure what 3rd option you're thinking of [06:50] SubStack: v8bot: 5 instanceof Number // this [06:50] v8bot: SubStack: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [06:50] SubStack: beh [06:50] SubStack: v8: 5 instanceof Number // this [06:50] v8bot: SubStack: false [06:51] jacoblyles has joined the channel [06:51] jesusabdullah: SubStack: Isn't 5 a Number though? :( [06:52] SubStack: nope! [06:52] polotek: v8: typeof 5 [06:52] v8bot: polotek: "number" [06:52] jesusabdullah: Oh, I forgot to mention: Matlab's classes/objects are worse than anything you've seen elsewhere, I almost promise. [06:52] jesusabdullah: v8: 5 instanceof number [06:52] v8bot: jesusabdullah: ReferenceError: number is not defined [06:52] polotek: typeof is for primitives, instanceof is for objects [06:52] SubStack: v8: 5..__proto__ == Number.prototype [06:52] v8bot: SubStack: true [06:52] SubStack: but it's not a number! [06:52] jesusabdullah: gurl you is whack [06:53] jesusabdullah: That's it, I'm gonna program in FORTRAN for the rest of my days! [06:53] jesusabdullah: FORTRAN doesn't have any of this weird crap! [06:53] jesusabdullah: (don't worry, I won't be rocking fixed. Fixed is for fogeys!) [06:53] cjheath: or you could try to get an education instead [06:54] cjheath: ACTION ducks [06:54] polotek has left the channel [06:54] jesusabdullah: Dawg I'm getting a MASTERS degree [06:54] jesusabdullah: aight? [06:54] SubStack: v8: typeof(new Number(5) + new Number(3)) [06:54] v8bot: SubStack: "number" [06:54] jesusabdullah: I study heat transfer though, not programming language snafus [06:55] cjheath: in what, maths? Engineering? not computer science, for sure [06:55] cjheath: right [06:55] jesusabdullah: engineering [06:55] jesusabdullah: of the mechanical kind [06:55] cjheath: good on you, my son is doing that too [06:55] jesusabdullah: orly? Right on! [06:55] backinnam: is there a socket.io irc that anyone knows of? [06:55] cjheath: he's doing materials though [06:55] jesusabdullah: materials is respectable [06:55] jesusabdullah: Lotta cool stuff in materials [06:55] jesusabdullah: unfortunately, our materials guy is a douchebag [06:55] cjheath: double degree actually, with science [06:56] jesusabdullah: (small school) [06:56] cjheath: he's been foing funky stem-cell stuff [06:56] jesusabdullah: Nice [06:56] jesusabdullah: My girlfriend wants to do biomed research [06:56] jesusabdullah: She's an EE major [06:56] jesusabdullah: already did some brain cell studies a few years back at V-Tech [06:56] jesusabdullah: She might go back there, depending [06:56] hellp has joined the channel [06:56] jesusabdullah: I'm kinda hoping for U-Mad though [06:57] cjheath: Her, I have a friend teaching high school in Fairbanks [06:57] cjheath: Small world, huh? [06:57] jesusabdullah: West Valley or Lathrop? [06:58] jesusabdullah: if you know [06:58] jesusabdullah: If not, 'sall good [06:58] jesusabdullah: Yeah, small world :D [06:58] cjheath: Dunno, I've never been there :( [06:58] jesusabdullah: Hah :D [06:58] jesusabdullah: West Valley is on the, well [06:58] jesusabdullah: west side of town [06:58] jesusabdullah: Lathrop is downtown [06:58] cjheath: Met her on the boat ti Juneau [06:58] cjheath: she's from XT [06:58] jesusabdullah: Ah! [06:58] cjheath: TX [06:58] cjheath: I;m from Australia [06:58] jesusabdullah: I was in Austin once [06:58] jesusabdullah: Too humid for my tastes, and too much urban sprawl [06:59] jesusabdullah: and definitely not enough coffee shop density [06:59] cjheath: How big is Fairbanks? [06:59] jesusabdullah: Not sure [06:59] jesusabdullah: by people [06:59] cjheath: Well, say Hi to Christine if you run into her ;-) [07:00] jesusabdullah: 100,000 in the greater Fbx area [07:00] jesusabdullah: 35k in the City Of [07:00] jesusabdullah: according to wikipedia [07:00] cjheath: fair enough [07:01] cjheath: gtg, bbl [07:02] jesusabdullah: toodles [07:03] pquerna: in master; is ctrl+c not working anymore for anyone else? [07:05] Anti-X has joined the channel [07:07] saikat has joined the channel [07:07] ivanfi has left the channel [07:09] ph^_ has joined the channel [07:10] stephank has joined the channel [07:11] matjas has joined the channel [07:11] russell_h: whats the best way to show what is preventing an app from exiting? [07:14] ryah_: pquerna: how so? [07:15] ryah_: pquerna: did f61b110cf6d77044e813499ec6ce667813a697cd break it? [07:15] spetrea: rainy day in bucharest [07:26] ivanfi has joined the channel [07:28] ph^ has joined the channel [07:30] svnlto has joined the channel [07:31] digitalspaghetti: hmm, this ssl fix fork from the node-dev list just isn't working for me at all [07:32] backinnam: anyone using socket.io have a problem with it disconnecting right after connecting [07:33] pquerna: ryah_: yeah, i locally reverted f61b110cf6d77044e813499ec6ce667813a697cd and I can ctrl+c again [07:33] pquerna: ryah_: i'd guess i have a dirty event loop or some crap :-/ [07:36] SamuraiJack has joined the channel [07:42] d0k has joined the channel [07:44] markwubben has joined the channel [07:47] virtuo_ has joined the channel [07:50] sschuermann: re [07:58] Druid_ has joined the channel [08:00] svnlto has joined the channel [08:01] viktors has joined the channel [08:03] themiddleman has joined the channel [08:04] ntelford has joined the channel [08:06] fbits has joined the channel [08:13] aubergine_ has joined the channel [08:13] mikeal has joined the channel [08:15] mikew3c has joined the channel [08:16] ryah_: pquerna: how do you repeat? the repl ^c seems fine to me [08:18] pquerna: ryah_: https server :) [08:19] mbrochh has joined the channel [08:20] pquerna: ryah_: tbh, its only on a script where somehow i'm polluting the loop with somehting [08:20] pquerna: ryah_: but it was nice when sigint actually killed it, i'm having to ctrl+z + kill 9 now [08:20] pquerna: which is just annoying [08:20] hassox has joined the channel [08:22] JCS0 has joined the channel [08:23] digitalspaghetti: oh hay pquerna :D (it's tane piper here) [08:23] pquerna: digitalspaghetti: hiya [08:23] digitalspaghetti: thanks for working on the SSL stuff! [08:24] pquerna: yeah. server stuff... not seeing why its not working. its getting the reader activated, so dunno [08:24] pquerna: (on the current ssl-fix branch thingy0 [08:24] pquerna: (even just a plain openssl s_client is failing, so prolly somehting super dumb) [08:24] digitalspaghetti: i'm watcing your fork now anyway, so i'll keep testing it [08:25] digitalspaghetti: https://gist.github.com/1cef016f7f802e6f17ac is how i am trying to initialise SSL, so should be a good test for using express as well [08:26] ooooPsss has joined the channel [08:30] TomY_ has joined the channel [08:30] stalled has joined the channel [08:34] TomY_ has joined the channel [08:34] ctp has joined the channel [08:38] caolanm has joined the channel [08:40] saikat has joined the channel [08:42] aubergine has joined the channel [08:45] svnlto has joined the channel [08:47] cnu has joined the channel [08:47] teemow has joined the channel [08:50] micheil: pquerna: hey, openSSL & AES, what's your thoughts? [08:53] Arro has joined the channel [08:55] omarkj has joined the channel [09:00] delapouite has joined the channel [09:01] Anti-X: if i send a SIGTERM which my app interprets to stop listening (server.close()), and i start a new process which is set to listen on that same port, is there a guarantee that the port is closed before the new process picks it up? [09:02] digitalspaghetti: could you not just do a setInterval and wait x seconds? [09:02] Anti-X: no the new process is started externally [09:02] Anti-X: like i stop the node server but i don't want to kill any existing connections, i want them to die out in their own time [09:03] Anti-X: i could just kill the server, but that would kill the connections [09:03] Anti-X: and i restart with modified code [09:03] Anti-X: so any new connections will use that [09:04] Anti-X: do you follow? [09:05] Anti-X: proc1: srv1.listen(80) ... bash: kill proc1 ... proc1: on term srv1.close() ... bash: srv2 ... proc2: srv2.listen(80) [09:06] delapouite_ has joined the channel [09:07] fbits has joined the channel [09:07] Anti-X: so does the third action in that chain happen before the fourth always, or is there even a small chance that it might not [09:14] digitalspaghetti: hmm, not sure [09:14] Tim_Smart has joined the channel [09:17] konobi: Anti-X: i would believe the new process wouldn't be able to bind to that port until the other process was dead [09:18] Anti-X: no it can bind as long as it stops listening on the port [09:18] Anti-X: it's the listening that is limited to 1 [09:18] Anti-X: existing connections still exist [09:18] Anti-X: (weird sentence) [09:19] konobi: ah, so they'd queue until something else went into accept() ? [09:19] Anti-X: no [09:19] Anti-X: if there is no listener, the connection is refused [09:19] Anti-X: which is why i need the listener to start again as soon as possible [09:19] Anti-X: in the new process [09:20] sth: How does one find the path node of the NPM modules in Node? [09:21] Anti-X: /usr/local/lib/node/ [09:22] sth: Sure, but how does node know? [09:22] sth: I have modules installed, but node isn't finding them [09:22] Anti-X: npm makes an include file [09:22] Anti-X: which module? [09:22] sth: I know, but it's like node isn't even looking in the correct directory [09:22] sth: Any, it's not being picky :) [09:23] Anti-X: try reinstalling npm [09:23] aubergine has joined the channel [09:23] Anti-X: also which node version [09:23] sth: 0.2.3 [09:25] Anti-X: there is a path thing [09:25] Anti-X: that node uses [09:25] Anti-X: but i can't remember what it was [09:28] TomsB has joined the channel [09:39] sideshowcoder has joined the channel [09:50] aliem has joined the channel [09:52] digitalspaghetti: heh: http://enterprise-js.com/ [09:52] aubergine has joined the channel [09:53] hellp has joined the channel [09:55] agnat has joined the channel [10:01] tksohishi has joined the channel [10:07] viktors has joined the channel [10:10] path[l] has joined the channel [10:12] badaxx has joined the channel [10:16] Anti-X: digitalspaghetti, lol. [10:17] Anti-X: that's pretty much how i feel when i'm looking for a job right now.. nobody wants to use the "quick" ways to create software.. it seems that just having a business and the ability to produce lots of paper is the important thing [10:17] xla has joined the channel [10:17] Anti-X: it's like they need to spend a long time doing something because then it seems like it's hard to do [10:18] SubStack: if everybody writes code at the same speed as the slowest person then management can plan milestones a lot more easily [10:19] Anti-X: then management has time to plan milestones ** [10:19] mbrochh has joined the channel [10:19] mbrochh has joined the channel [10:21] rnewson has joined the channel [10:22] Anti-X: the bad thing with sites like that is that someone will see them and not see the sarcasm [10:24] Anti-X: and judging by experience that's a 50/50 chance [10:31] Anti-X: (and then one day you'll have someone who says that you shouldn't use literals because so and so) [10:37] matjas has joined the channel [10:41] vilhonen: are you able to resolve dns names defined in /etc/hosts with node.js 0.2.3 and os X 10.6? [10:41] vilhonen: I'm not [10:41] vilhonen: I get "Domain not found" but my browser and other utilities are able to resolve the name fine [10:43] vilhonen: ubuntu 10.04 returns ENODATA, DNS server returned answer with no data also with node 0.2.3 [10:43] fjakobs has joined the channel [10:46] vilhonen: also happens with os X with node 0.2.0 [10:47] unomi has joined the channel [10:53] Anti-X has joined the channel [10:54] virtuo__ has joined the channel [10:55] fermion has joined the channel [10:57] Nohryb has joined the channel [11:02] lgl has joined the channel [11:04] jansc has joined the channel [11:07] agnat has joined the channel [11:09] zomgbie has joined the channel [11:09] rnewson has joined the channel [11:13] zorzar_ has joined the channel [11:23] Hadaka: hey, I hope there are some browser javascript people here, even tough the question isn't directly about node: browser html template engines - do they work mostly by setting element.innerHTML or what? is that a "good thing"? are there any other DOM based template engines except PURE? [11:24] digitalspaghetti: jquery templates [11:25] jstemmer has joined the channel [11:31] stride: vilhonen: dns.getHostByName('foobar', 4, function(err, domains) { seems to work with /etc/hosts [11:35] vilhonen: stride: thanks, I'll use that one [11:36] vilhonen: Hadaka: I guess the most efficient ones use innerHTML [11:37] vilhonen: jqote2 "precompiles" templates into functions that do simple strings concatenations and insert the result with innerHTML [11:41] Anti-X: yeah innerHTML is way faster than using the DOM [11:42] mikew3c has joined the channel [11:42] V1: depends on what your intentions are with the templates Hadaka. If you want to modify the output again, after the templates are generated, eg, add css styling or attach event handlers. A pure DOM based implementation would be better because you can modify the DOM without having to put it in the browser which is a major speed upgrade. If you have no intentions of doing that what so ever, a plain innerHTML setting template engine would be more than [11:43] V1: Anti-X: Depends on the browser, Safari and Chrome are faster in DOM than in innerHTML. But that is milliseconds ;) [11:43] Anti-X: with DOM it calculates on each single element as you make it and as you insert it into other elements, and one more time when you render it... whereas if you just innerhtml it, it parses it all at once when you insert, and then render it... [11:43] Anti-X: well if you have more than 2 levels of DOM, then innerHTML would be faster [11:43] Anti-X: as in nesting levels [11:44] ph^ has joined the channel [11:44] stride: wasn't there a way to build your element tree and attach it to the page dom afterwards? [11:45] V1: documentFragment [11:45] stride: ah, right :) [11:49] V1: But you can put a string a fragment :) [11:50] V1: In a ideal situation you would create DOM element of the outer, wrapping element, and set innerHTML of that so you have best of both worlds :) [11:50] __mn__ has joined the channel [11:53] Anti-X: how is that better? [11:54] Anti-X: either way it is marginal unless you're writing a game engine where tens and hundreds of elements are removed and inserted simultaneously [11:58] oal has joined the channel [12:03] rkieffer has joined the channel [12:05] mtodd has joined the channel [12:07] ajpiano has joined the channel [12:11] Anti-X: do the readFile encodings fall under the same fate of creating a buffer when it is null and a string when it's 'binary'? [12:11] __mn__: I thought binary got depreciated? [12:12] Anti-X: yeah but it's not easy saying that based on the docs [12:12] Anti-X: where no possible encodings are mentioned under readFile, and finding where the encodings are listed is a whole other project [12:13] __mn__: oh. I've avoided buffers and anything other than UTF8 cause they all scare me. :P Sorry. [12:13] Anti-X: well sending image files as utf8 is sort of a problem :p [12:13] Gruni has joined the channel [12:14] unomi has joined the channel [12:15] __mn__: all the examples I have (and thus used) don't define encoding - but I haven't had any problems sending images (but then again, I'm not doing anything complicated). [12:15] Sembiance: good morning :) [12:15] __mn__: Sembiance: good morning. [12:16] Anti-X: i used to have problems not specifying the encoding when sending images [12:16] Anti-X: but i'm still on 0.2.0 [12:16] Anti-X: locally [12:16] Anti-X: so could be it [12:17] __mn__: Anti-X: out of curiousity, may I ask why you would need things other than fs.readFile(filename, funciton(err, data) { res.writeHead(200, {'Content-Type':'image'}); res.write(data, 'binary'); res.end(); } });? [12:17] __mn__: ah... I'm using v0.2.3 [12:18] __mn__: don't want to upgrade to v0.3.0-pre because all 'sys' are redone as 'utils' :( [12:18] Anti-X: i don't have any sys in my app [12:18] bentruyman has joined the channel [12:18] Anti-X: also in 0.3 sys points to util [12:18] Anti-X: so it's no problem for now [12:18] __mn__: it messed up my app :P [12:19] Anti-X: orly [12:19] __mn__: yeah "soft migration problems" or something like that, can't remember exactly. [12:19] coffeecup: is there something in nodejs like pack // unpack in php? [12:19] Anti-X: JSON.stringify? [12:20] coffeecup: this can convert a buffer to dec value? [12:20] Anti-X: trying to load the pack doc, but my net is slow [12:20] Anti-X: hang on [12:21] hoodow has joined the channel [12:21] Anti-X: oh right [12:21] Anti-X: not the same [12:21] coffeecup: ive a buffer with binary data in it and i would like to read uint16, uint32... and some datatypes [12:21] onar has joined the channel [12:21] Anti-X: well you could convert it to base64 instead of putting it in a buffer [12:22] mif86 has joined the channel [12:23] cnu has joined the channel [12:25] yviktorov has joined the channel [12:27] deoxxa: is there a way to remove data from the start of a buffer? basically i want to use the buffer object as... well, a buffer. if i use buffer.slice, is the memory that's no longer used freed? [12:27] rwaldron__ has joined the channel [12:27] deoxxa: i.e. if i do: buffer = buffer.slice(50, buffer.length); [12:27] deoxxa: after a while, will that end up eating a lot of memory? [12:28] Anti-X: i think there is a project to optimise buffer.slice atm [12:28] Anti-X: micheil is/was working on that [12:28] Anti-X: as with everything else that matters, he seems to be the guy [12:29] deoxxa: so as it stands now, i'd be better off creating a new buffer object every few hundred iterations or something? [12:29] cognominal has joined the channel [12:29] deoxxa: (and getting rid of the old one) [12:29] Anti-X: no idea [12:29] Anti-X: but that would at least be pretty safe [12:29] deoxxa: yeah [12:29] Anti-X: i don't think buffer was designed to be a stream [12:29] Anti-X: if that's what you mean [12:30] deoxxa: exactly [12:30] deoxxa: heh [12:30] Anti-X: if you want to stream stuff directly you should look at sys.pump (or util.pump from 0.3) [12:30] deoxxa: hmm [12:30] Anti-X: pretty nifty feature [12:31] deoxxa: yeah, but i need to mess with the data before it gets sent on its merry way [12:31] Anti-X: it takes a read stream (file, another client, whatever) and hooks it up to a write stream (file, another client, whatever) and just pumps stuff through [12:31] svnlto has joined the channel [12:31] Anti-X: right [12:31] deoxxa: basically i'm dealing with a horrid network protocol that has its own "packets", which are actually fragmented over multiple network packets [12:32] deoxxa: and i can't guarantee that the data sitting in the stream ready to be read is actually a whole packet [12:32] Anti-X: so basically you have a system where you directly program with the 'data' event? [12:32] deoxxa: yeah [12:32] svnlto has joined the channel [12:32] deoxxa: is there a better way to do it? [12:32] deoxxa: << very much a node.js beginner [12:33] Anti-X: how do you know you have a full packet? [12:34] Anti-X: and how big are they [12:34] deoxxa: luckily it's encoded in a somewhat sane way, it has integers prepending the fields in the packet that denote the length of each field [12:34] Connorhd has joined the channel [12:34] deoxxa: and they can range from a few bytes to thirty or fourty kilobytes [12:34] skampler: deoxxa: maybe you want a circular buffer? [12:35] deoxxa: skampler: that sounds about right, yeah [12:36] herbySk has joined the channel [12:37] deoxxa: http://gist.github.com/632134 << this is the general premise [12:37] deoxxa: (i haven't actually run that code) [12:37] mytrile has joined the channel [12:38] deoxxa: if there was a way to discard data from the start of a buffer, that'd be ideal [12:38] deoxxa: ACTION reads up on circular buffers [12:38] femtoo has joined the channel [12:39] deoxxa: ah yes skampler this looks perfect [12:39] skampler: nice [12:40] JCS0 has joined the channel [12:41] dylang has joined the channel [12:43] bruse has joined the channel [12:43] V1: Anti-X: on the template stuff, DOM wrap is better if you need to modify the template after it's created. Because the template isn't added the Browser DOM yet you will not trigger any repaints or reflows.. ( sry for the late response, was lunching ) [12:45] EvanDotPro has joined the channel [12:59] jansc_ has joined the channel [13:00] prettyrobots has joined the channel [13:03] Anti-X has joined the channel [13:04] philhawksworth has joined the channel [13:05] mbrochh has joined the channel [13:05] mbrochh has joined the channel [13:06] ben_alman has joined the channel [13:07] Athox has joined the channel [13:07] rasputnik has joined the channel [13:09] boaz has joined the channel [13:09] wink_ has joined the channel [13:11] dnolen has joined the channel [13:12] ajpiano has joined the channel [13:12] boaz has joined the channel [13:16] hellp has joined the channel [13:18] pgriess has joined the channel [13:24] matt_c has joined the channel [13:27] jakehow has joined the channel [13:31] bradleymeck has joined the channel [13:34] vilhonen: I see lots of javascript code like if(function(){return a == null;}()), what's the purpose of the wrapping function definition? [13:35] spetrea: vilhonen: please show some context [13:35] zmbmartin has joined the channel [13:36] zmbmartin: is upstart and monit one of the preferred methods to deploy nodejs or is there something better? [13:36] vilhonen: I have a function generated by wicket web framework for element's onclick handler: if (function(){return Wicket.$('searchButton') != null;}()) { Wicket.showIncrementally('searchButton--ajax-indicator');}var wcall=wicketAjaxGet('../;jsessionid=s6octujm9afuxq79r0mm4i3i?wicket:interface=:0:searchPanel:searchForm:submitButton::IBehaviorListener:2:1',function() { ;Wicket.hideIncrementally('searchButton--ajax-indicator');}.bind(this),function() { ;Wicket.hid [13:37] vilhonen: the condition in the if statement, why is it wrapped in a function? [13:39] Hadaka: question: process.mixin has been removed from node - is there any alternative except hand-coded code? [13:39] saikat has joined the channel [13:41] rwaldron has joined the channel [13:41] bradleymeck: mixin was removed way back, do it manually or pick up a library to do it for you [13:42] danielzilla has joined the channel [13:42] jherdman has joined the channel [13:42] bradleymeck: vilhonen, if it is generated code, i would expect it to be using rather generic code gen techniques, as such it probably uses functions in case the condition can not be a single expression (unlikely but possible) [13:43] path[l] has joined the channel [13:46] bentruyman has joined the channel [13:47] aheckmann has joined the channel [13:48] Nohryb has joined the channel [13:53] xla has joined the channel [13:55] davidwalsh has joined the channel [13:55] hoodow has joined the channel [13:56] path[l] has joined the channel [13:57] c4milo has joined the channel [13:58] maushu has joined the channel [14:01] mtodd has joined the channel [14:03] onar has joined the channel [14:03] cnu has joined the channel [14:04] c4milo has left the channel [14:05] c4milo has joined the channel [14:07] fjakobs has joined the channel [14:07] aubergine has joined the channel [14:09] jetienne has joined the channel [14:09] yhahn has joined the channel [14:11] ceej has joined the channel [14:14] mape: Love using node for the most strange cases, http://mape.me/starcraft2-ipad-map.png [14:15] mape: broadcasting my sc2 minimap to an iPad, 5min to implement [14:15] yhahn: O_o [14:15] vilhonen: is the map an image or what? [14:16] mape: vilhonen: nope, live [14:16] vilhonen: rendering in node.js from some data? [14:16] zmbmartin has left the channel [14:17] mape: nah node just proxys around base64 image data [14:17] mape: vilhonen: http://largemap.mape.me/view [14:18] mape: really easy proof of concept now [14:18] digitalspaghetti: this is live then? [14:18] mape: yeah [14:18] vilhonen: nice :D [14:18] unomi: Poor blue guy :( [14:18] jtsnow has joined the channel [14:18] ceej: map: whoa.... nice :) [14:18] unomi: real nice though [14:18] digitalspaghetti: are you connecting to battlenet via a proxy then and intercepting it? [14:18] unomi: looks like screencapture, no? [14:19] mape: digitalspaghetti: capturing scren -> webcam -> flash -> js api -> canvas -> post ajax [14:19] unomi: so basically you also have a screensharing app, wtf [14:19] unomi: wtg even [14:19] mape: really nasty [14:19] mape: :P [14:19] willwhite has joined the channel [14:19] mape: but works [14:20] mbrochh has joined the channel [14:20] mbrochh has joined the channel [14:20] unomi: dude, blue is kicking your ass [14:20] mape: I know :/ [14:22] stride: mape: wait, webcam? wth? :D [14:23] mape: camtwist for osx captures screen, emulates webcam, flash to js module takes the virtual webcam and moves it to canvas, convert canvas to base64 and send as post to server [14:23] unomi: most likely dumping frames into a dir, no? [14:23] mape: all who watch get that and it uses it [14:23] unomi: ah [14:24] figital has joined the channel [14:24] digitalspaghetti: hmm, i wonder if there is something like camtwist for linux, then i could do the same thing with Minecraft :D [14:24] framlin has joined the channel [14:25] mape: digitalspaghetti: tried it with minecraft at work :P [14:25] mape: the framerate is awful for flash -> canvas though [14:25] digitalspaghetti: lol [14:25] stride: that DOS-style graphics game? [14:25] digitalspaghetti: stride: GET OUT [14:25] digitalspaghetti: :p [14:25] stride: :> [14:25] digitalspaghetti: It's not DOS style, it's awesome [14:26] digitalspaghetti: my current level is just beautiful, and i installed a high-res texture pack [14:26] Anti-X: i still haven't seen any videos showing any gameplay [14:26] Anti-X: just riding carts [14:27] digitalspaghetti: tbh that is what most people do :D [14:27] Anti-X: not particularly amusing [14:27] digitalspaghetti: try to outdo each other on automated minecart stations [14:27] sonnym: lots of people build castles and blow stuff up [14:27] digitalspaghetti: although one guy is builing a 16b computer using the redstone [14:27] sonnym: it's like having a whole world to yourself to do whatever you want [14:27] fbits has joined the channel [14:28] Anti-X: i have lego builder [14:28] stride: oh, the ALU thing, yeah that looked nice in the screenshots on HN [14:28] Anti-X: it's free [14:28] sonnym: sounds awesome to me [14:28] sonnym: touche. the lego analogy does work really well [14:28] stride: sonnym: go outside and play with some rocks. they're awesome! [14:28] stride: :D [14:28] unomi: pretty mad money the guy is making as well [14:28] sonnym: I'd rather stay inside and play with some node :) [14:28] AAA_awright has joined the channel [14:29] Anti-X: i'd rather stay inside and play with myself than be associated with minecrafters [14:29] stride: the reddit post on their 4 server setup serving multiple terabytes a week(?) was pretty interesting [14:29] Anti-X: ACTION undresses and jumps up on the conference table, doing YMCA [14:30] sonnym: this sums up the game pretty well: http://www.halolz.com/wp-content/uploads/2010/10/halolz-dot-com-minecraft-wakeuponisland-punchtrees.jpg [14:30] digitalspaghetti: sonnym: yup :D [14:30] stride: Anti-X: you're sexually harassing the conference table. get off :D [14:30] Anti-X: admit it, it likes it [14:32] stride: Anti-X: yeah.. okay. but it'll sue you nevertheless [14:32] jchris has joined the channel [14:36] sivy has joined the channel [14:36] mikew3c has joined the channel [14:38] mattvermaak has joined the channel [14:38] prettyrobots has joined the channel [14:40] coogle has joined the channel [14:40] coogle: hey everyone.. quick question.. anyone using socket.io? If so, anyone know how you can close a socket connection from the server side? [14:42] marshall_law has joined the channel [14:45] nerdEd has joined the channel [14:45] maushu: coogle: punch the connection in the face. [14:46] DozyPieman has joined the channel [14:46] cferris has joined the channel [14:48] coogle: maushu: Heh. It seems like it'd be an obvious thing to do, but I can't find anything on it. [14:48] maushu: I don't think this is the first time this happened. [14:48] maushu: .close()? [14:48] maushu: Maybe find the socket and close it? [14:48] coogle: maushu: tried .close(), .end(), .disconnect()... [14:48] Anti-X: there is no direct way [14:49] aurynn has joined the channel [14:49] maushu: Find the wrapped socket and then close that? [14:49] coogle: maushu: digging through source now trying to find a reference to something I can destroy [14:49] Anti-X: you can try calling client._onDisconnect [14:49] coogle: i'm just concerned with non-authenticated clients never disconnecting. [14:49] teemow has joined the channel [14:49] maushu: Yes, feel the urge of destruction in your soul. [14:50] maushu: If all else fails, destroy the server by throwing it through the window. [14:50] AAA_awright has joined the channel [14:50] maushu: I'm kidding but I think I had the same problem. [14:50] maushu: And other people. [14:51] jakehow has joined the channel [14:51] bjarkih has joined the channel [14:51] Anti-X: announcer clean the motherflippin tubes [14:51] hoodoos: guys, was leak in JSON.stringify approved? Fixed? :) [14:51] Anti-X: announcer clean the tubes [14:51] _announcer: Cleaning the tubes for great justice! [14:52] Anti-X: maushu, i was asking yesterday if announcer uses tim_smart's twitter library [14:52] Anti-X: because i thought about using it but if for some reason it keeps disconnecting.... [14:53] coogle: maushu: so basically you're out of luck if you have a client who doesn't want to disconnect? [14:53] sivy: I'm trying to implement a simple middleware in express, and the middleware function fires, but not the next(). could someone take a peek at http://gist.github.com/632325 and see if there's something fishy? [14:54] zomgbie has joined the channel [14:54] steadicat has joined the channel [14:54] sivy: the browser returns "Cannot GET /" [14:55] aubergine has joined the channel [14:56] Aria has joined the channel [14:56] maushu: Anti-X: Hmmm, don't remember. Ask me again in 4 hours. [14:56] maushu: _announcer: clean the tubes [14:56] _announcer: Cleaning the tubes for great justice! [14:56] jherdman has joined the channel [14:57] Anti-X: coogle i thought the point of using socket.io was to let users stay connected for as long as possible...? [14:57] Anti-X: and you want to kick them out? [14:57] JCS0 has joined the channel [14:58] maushu: coogle: What kind of host are you?! Poor users. [14:58] Anti-X: if you're that afraid of your users then maybe you should just use good old xhr for everyone [14:58] daniellindsley has joined the channel [14:58] maushu: And mace. [14:59] Anti-X: i was thinking more along the lines of stun gun [14:59] Anti-X: "lemonaade, lemonaaade.. 5 cents!" "can i have o... AAAAAAAAAAAAAAGGGGGHHHHHHHHH!!!!!" [15:01] Nevtus has joined the channel [15:04] batasrki has joined the channel [15:05] yhahn: anyone using express [15:05] yhahn: got a quick question about routing [15:05] tekky has joined the channel [15:05] sonnym has joined the channel [15:06] stagas has joined the channel [15:07] cyraxx: i have a node httpserver running with a try/catch around the whole thing. however, sometimes stuff like this happens and node quits: [15:07] cyraxx: Error: Must have start <= end at Stream. (http:775:27) at IOWatcher.callback (net:494:29) at node.js:757:9 [15:07] cyraxx: how can i prevent that from happening? [15:07] cyraxx: (also, why does that happen ;) [15:08] stagas: anyone knows if there's a limit on how big an object can get? [15:08] agnat: stagas: yes, there is a limit [15:09] agnat: stagas: definitley [15:09] Me1000 has joined the channel [15:10] bradleymeck: stagas at around 1.4 million keys the object starts to blow performance to literal hell, like couple min lookups [15:11] stagas: it freezes at 300mb mem usage [15:11] stagas: 0 cpu after that [15:11] stagas: I did obj = {}; while (true) { obj[Math.random() * 1000000000] = 123 } [15:12] Athox has joined the channel [15:12] sonnym has joined the channel [15:12] bradleymeck: interesting, i know creationix had some stuff about that with nstore [15:13] jetienne: same here. linux [15:13] ph^ has joined the channel [15:13] stagas: yeah it freezes at 300mb with a bigger string too [15:13] stagas: so it's a mem limit not a key limit [15:14] jetienne: maybe a safeguard in v8 ? like 'if a page is > 300mbyte' it is bogus stop that [15:14] maushu: Easy to fix, just use more nodes. [15:14] maushu: xD [15:15] mytrile has joined the channel [15:15] jetienne: or find the define :) [15:15] maushu: Then you can also do sharding and replication. [15:15] maushu: jetienne: Do not descomplicate. [15:15] stagas: with 2 objects I get up to 550mb then it freezes but with full cpu usage now [15:16] yviktorov has joined the channel [15:17] stagas: so I need to keep track of an object's memory size and split, but how do I do that [15:17] sivy: yhahn: i'm learning express, if that helps [15:17] jetienne: v8bot is pure v8 ? or is it nodejs behind ? if it is pure v8 we can check [15:17] stagas: manually count lengths of the values I add? [15:17] dnolen has joined the channel [15:17] yhahn: sivy: no worries, i figured out what was going on [15:17] jetienne: stagas: seems ugly, why do you need so much ram ? [15:17] maushu: Lets explode v8. [15:17] yhahn: it looks like the req.param() method was b0rked in beta2, appears fixed in rc4 [15:17] sivy: yhahn: perhaps you can help me then - next() isn't working in my routes [15:18] maushu: jetienne: v8bot is running on a sandbox with memory limits though. [15:18] sivy: yhahn: http://gist.github.com/632325 [15:18] stagas: jetienne: db [15:18] stagas: :) [15:18] jetienne: :) [15:18] sivy: brbcoffee [15:18] jetienne: http://nodejs.org/api.html#process-memoryusage-75 <- maybe this may help [15:18] jetienne: but ultra ugly anyway [15:18] yhahn: sivy: hm, i ran into similar (next() fail), i may try again with the newer release [15:19] tj has joined the channel [15:19] aurynn: So, what's the preferred option for a web framework? :) [15:21] digitalspaghetti: aurynn: how long is a peice of string :D [15:21] Guest33540: aurynn: it depends what you prefer :p [15:21] digitalspaghetti: it depends on your use [15:21] TheEmpath has joined the channel [15:21] cyraxx: to answer my own question from above: process.on('uncaughtException') should help [15:21] aurynn: I prefer REST-ish architectures [15:21] aurynn: I wrote my own dispatcher, but I figure it's probably smarter to just grab something :) [15:22] digitalspaghetti: tjholowaychuk: hello! someone in here late last night (for me anyway) seemed to be having issues with the new express where you are doing Server.prototype.del = Server.prototype.delete; [15:22] digitalspaghetti: something about invalid token 'delete' [15:23] tjholowaychuk: hm, when it is used as a prop name (in v8) it is fine [15:23] tjholowaychuk: and tests all pass with flying colors for me [15:23] digitalspaghetti: it is a reserved keyword in JS though [15:23] sivy: tjholowaychuk: any thoughts on http://gist.github.com/632325? next() is failing [15:23] badaxx: hey, how can I create a package for npm? [15:23] gbot2 has joined the channel [15:23] digitalspaghetti: which is what i was thinking it could be [15:24] isaacs: badaxx: create a package.json file. [15:24] isaacs: badaxx: npm help developers [15:24] Anti-X has joined the channel [15:24] aurynn: isaacs, does npm do dependency resolution? [15:24] mjr_: does it ever [15:24] isaacs: aurynn: oh, yes, very [15:25] badaxx: isaacs: thanks [15:25] tjholowaychuk: digitalspaghetti: looks fine, your stdout shows the user so whats wrong? [15:25] softdrink has joined the channel [15:25] tjholowaychuk: digitalspaghetti: but yeah, for example in the node repl you can { delete: 'something' } [15:25] sivy: ACTION sees that express has been updated... [15:26] tjholowaychuk: sivy: oh sorry that was for you haha, it looks fine [15:26] isaacs: if only this were true... " npm will stubbornly refuse to expose your password in the clear." [15:26] isaacs: reading that man page, it's pretty old, i gues [15:26] sivy: tjholowaychuk: the function() passed to app.get() doesn't get called [15:27] gerred has joined the channel [15:27] sivy: app.get('/', loadUser /* works */, function(){ /* not called */ }); [15:27] tjholowaychuk: sivy: oh i see, you have the log() call twice [15:27] tjholowaychuk: hmmm [15:28] _announcer: Twitter: "Using MongoDB with node.js http://post.ly/15MM9" [fr] -- blognode.fr. http://twitter.com/blognode/status/27744885962 [15:28] sivy: tjholowaychuk: aaah, updating to rc4 fixed it [15:28] tjholowaychuk: sivy: oh weird lol [15:28] tjholowaychuk: ohh [15:28] tjholowaychuk: that feature was introduced just a while ago, so loadUser would have been your regular callback before [15:28] tjholowaychuk: instead of middleware [15:28] digitalspaghetti: tjholowaychuk: personally i wasn't having the issue so i wasn't able to help, but i thought i'd give you a heads up [15:28] tjholowaychuk: digitalspaghetti: weird ! [15:29] coogle: Anti-X: heh. /window 2 [15:29] coogle: opps [15:30] sivy: tjholowaychuk: ah, ok, thanks! [15:31] paulr has joined the channel [15:31] stagas: yeap, ~550mb all objects sum size is the limit. it throws process out of memory after that. http://gist.github.com/632400 [15:33] coogle has left the channel [15:33] jetienne: stagas: maybe asking on #v8 may bring more info [15:34] Ari-Ugwu has joined the channel [15:35] _announcer: Twitter: "Anyone know how I can get nodejs 0.3.0-pre? I can't seem to find it anywhere." -- Rob Hawkes. http://twitter.com/robhawkes/status/27745524625 [15:35] stagas: jetienne: I guess I'll have to figure a way around it [15:35] melgray has joined the channel [15:37] prettyrobots has joined the channel [15:37] antono has joined the channel [15:37] _announcer: Twitter: "AVG says there is a virus in node.js #fun #geek" -- Diego Pacheco. http://twitter.com/diego_pacheco/status/27745768115 [15:37] antono has joined the channel [15:39] _announcer: Twitter: "Flying back from Boston in a few hours.. was great to see everyone! #jqcon It ended up I explained Node.JS's strengths to lots of skeptics." -- Marc Grabanski. http://twitter.com/1Marc/status/27745890529 [15:39] sivy: what's the pattern for letting modules define their own routes? [15:39] yhahn: sivy: see the blog example [15:39] tjholowaychuk: sivy: there are many ways you can go about doing that [15:39] sivy: "the" blog example? link? [15:40] rkieffer has joined the channel [15:40] dmcquay has joined the channel [15:40] yhahn: sivy: http://github.com/visionmedia/express/blob/master/examples/blog/app.js and http://github.com/visionmedia/express/blob/master/examples/blog/contact.js [15:40] tjholowaychuk: you can readdir / loop the files and load them in, or export your app and manually require a bunch of files containing routes [15:40] tjholowaychuk: all sorts of things you can do [15:42] yhahn: tjholowaychuk: quick q re partials in express... i'm using hbs as a render engine (http://github.com/donpark/hbs) and it (and mustache in general) has a somewhat different way of handling partials than express that basically makes them unusable atm [15:43] yhahn: i'm wondering if you see any reconciliation possible there or not really [15:43] tjholowaychuk: yhahn: I cant cater to everything :( but im sure mustache can just utilize partials the way it normally would, why not? [15:43] yhahn: tjholowaychuk: understood : ) [15:43] tjholowaychuk: partials can be ignored all together [15:43] tjholowaychuk: v8 is unfortunately pretty slow, so large collections using partials is pretty slow [15:43] tjholowaychuk: well v8 is not slow [15:44] sivy: yhahn/tjholowaychuk: thanks for the pointers [15:44] yhahn: tjholowaychuk: well one of the issues i've seen so far is express does partials discovery dynamically (e.g. when the partial is called) while a lot of the mustache implementations i've seen expect you to pass all of the possible/usable partials at call time [15:44] yhahn: i'm not really sure how the latter makes much sense [15:44] tjholowaychuk: i might take some time in the future to come up with something more static, coudl help performance [15:45] tjholowaychuk: I am really surprised how badly v8 handles the recursion needed for the partial collections [15:45] yhahn: i c [15:45] tjholowaychuk: but I guess most app work is IO so in comparison doing all the view crunching in-process is far slower [15:45] tjholowaychuk: than doing db calls etc [15:45] _announcer: Twitter: "If anybody has notes from @1Marc's node.js breakout session at #jqcon, I would love to include them at http://goos.es/jqueryboston - ping me" -- K. Adam White. http://twitter.com/kadamwhite/status/27746491194 [15:46] tjholowaychuk: which sucks because there is not much we can cut out functionality-wise [15:46] tjholowaychuk: just need to optimize a bit, or possible come up with a better way to handle partials [15:47] yhahn: cool, well i'll keep an eye on your work there [15:47] yhahn: also thank you for all your work : ) [15:48] tjholowaychuk: np [15:48] edgarallanpoe has joined the channel [15:51] _announcer: Twitter: "@flangy Well there's your problem; don't you know the cool kids want you to crap out JSON and use node.js instead?" -- Nick Farina. http://twitter.com/nfarina/status/27746999027 [15:52] sh1mmer has joined the channel [15:52] sveisvei has joined the channel [15:59] steadicat has joined the channel [16:00] robotarmy has joined the channel [16:02] _announcer: Twitter: "Hotnode - Hot code loading for node.js http://github.com/saschagehlich/hotnode #nodejs #hotloading" -- Sascha Gehlich. http://twitter.com/rattazong/status/27747888975 [16:02] zomgbie has joined the channel [16:03] markwubben has joined the channel [16:04] bradleymeck: tjholowaychuk recursion in v8 is terribly bad because no tail optimizations :/ [16:04] tjholowaychuk: :( [16:05] benburkert has joined the channel [16:05] bradleymeck: give me a weeks worth of pay and i can make the es5 parser we got do it for you? (at a brutal 1 time cost) [16:06] bradleymeck: and then you just have to avoid function.caller [16:07] gent00r has joined the channel [16:07] tjholowaychuk: i need to do some profiling, because 90 partials per request blows right now [16:07] tjholowaychuk: pretty bad [16:07] gent00r: Hi, is there any ORM support for nodejs ? [16:07] tjholowaychuk: gent00r: might wanna check out mongoose [16:07] tjholowaychuk: for mongodb [16:08] gent00r: aw!. i have a mysql db [16:08] bradleymeck: 90 partials ?!?!, dynamic partials or static? [16:08] paulr_ has joined the channel [16:08] tjholowaychuk: gocha [16:08] gent00r: i have some code written in pylons. I would like to use nodejs so i can use Ajax Comet on webapplications. [16:08] tjholowaychuk: bradleymeck: just an example lol because you can pass a collection (array-ish) and have it iterate for you to keep things cleaner [16:09] tjholowaychuk: they are only compiled once, just like anything else but it is still costly [16:09] bradleymeck: yea, code gen is costly to no end comparatively [16:10] tjholowaychuk: so like if you are paginating a page of 15 users instead of iterating directly in your layout or whatever, you can do partial('user', users) [16:10] tjholowaychuk: which is nice for template re-use as well [16:10] tjholowaychuk: and totally not an issue for small hits but if you wanted to display 200 users or something you are fucked [16:11] bradleymeck: mmm that can be optimized pretty nice as long as partial['user'] cant change dynamically (or when it does you can alert the template) [16:11] digitalspaghetti: gent00r: http://github.com/sdepold/sequelize [16:11] tjholowaychuk: but people can still scale out, its still snappy, just not going to give you 20k rps for a single proc [16:11] zemanel has joined the channel [16:11] tjholowaychuk: bradleymeck: ya im going to start putting some effort into optimization there [16:11] tjholowaychuk: soonish [16:12] bradleymeck: document the ast /cry [16:14] softdrink has joined the channel [16:15] gJ|Alex has joined the channel [16:16] evanpro has joined the channel [16:18] _announcer: Twitter: "My node.js server after making small teething problems quite well. The 1,000-degree mark Connections cracked. So at the same time." [de] -- Andreas Reich. http://twitter.com/AndreasReich/status/27749292843 [16:22] _announcer: Twitter: "Excellent lecture on the Node.js @ emerleite http://bit.ly/9VbIst" [pt] -- Igor Musardo. http://twitter.com/IgorMusardo/status/27749566320 [16:22] mytrile has joined the channel [16:24] mikeal has joined the channel [16:29] mytrile has joined the channel [16:30] amerine has joined the channel [16:30] banjiewen has joined the channel [16:30] benburkert has joined the channel [16:31] jbenesch has joined the channel [16:31] paulr has joined the channel [16:32] bartt has joined the channel [16:32] TheEmpath has joined the channel [16:39] rauchg_ has joined the channel [16:42] [[zz]] has joined the channel [16:42] gent00r: is there no kqueue support for node.js ? [16:43] seanouimet has joined the channel [16:43] ajpiano has joined the channel [16:44] davidascher has joined the channel [16:45] davida has joined the channel [16:46] bpot has joined the channel [16:48] aguynamedben has joined the channel [16:48] seen- has joined the channel [16:49] tjholowaychuk: gent00r: should be, it uses libev [16:49] slashxr has joined the channel [16:49] dmcquay has joined the channel [16:49] seanouimet has joined the channel [16:49] BrianTheCoder has joined the channel [16:49] _announcer: Twitter: "Node.js is really cool... installed it on my mac and played around a little. Maybe one day I'll get to really use it." -- Nick Brewer. http://twitter.com/brewern/status/27751767765 [16:50] galaxywatcher has joined the channel [16:51] noahcampbell has joined the channel [16:51] _announcer: Twitter: "Node with pdf (pdf.js) #pdf #node http://bit.ly/c6jpCa" -- Francisco Leite. http://twitter.com/xleitex/status/27751880056 [16:51] slashxr: hello there [16:51] slashxr: is twitter using node js [16:52] saikat has joined the channel [16:53] dmcquay: slashxr - that would be a pretty big win....but i really don't think so ;) [16:54] mikew3c_ has joined the channel [16:54] xla has joined the channel [16:55] _announcer: Twitter: "I've written a colored console appender for log4js-node: http://bit.ly/bPcrlD It's using my version of colored.js (http://bit.ly/9g6IKd)" -- pfleidi. http://twitter.com/pfleidi/status/27752198118 [16:55] deepthawtz has joined the channel [16:57] aho has joined the channel [16:57] daglees has joined the channel [17:00] Me1000 has joined the channel [17:02] _announcer: Twitter: "@qodnfl I work as a #nodejs developer at @storify." -- Daniel Erickson. http://twitter.com/TechWraith/status/27752708202 [17:03] dmcquay has joined the channel [17:07] _announcer: Twitter: "node-ffi (http://github.com/rbranson/node-ffi) is spectacular! It actually can make eio_custom calls! #nodejs" -- Ryan Dahl. http://twitter.com/ryah/status/27753103883 [17:07] path[l] has joined the channel [17:10] rbranson_: pssht, it's an ugly hack :D [17:13] qFox has joined the channel [17:13] _announcer: Twitter: "I do not know the behavior of the signal node.js around." [ja] -- 廣木 大地 [17:13] _announcer: . http://twitter.com/hiroki_daichi/status/27753563865 [17:15] Aria has joined the channel [17:15] stephank has joined the channel [17:15] _announcer: Twitter: "Re: http://j.mp/cwgYMS Blog post is coming soon. #YUIConf #YUI #NodeJS" -- Matthew Taylor. http://twitter.com/rhyolight/status/27753678240 [17:18] ryah_: ACTION waves [17:19] Anti-X: nice, hiroki daichi made announcer insert a newline [17:19] Anti-X: whoever that is [17:19] stride: slashxr: and I guess they'll never use it http://twitter.com/#!/ryah/status/27307002136 [17:20] stride: hey ryah [17:20] bradleymeck: heya ryah [17:20] sideshowcoder has joined the channel [17:21] dylang has joined the channel [17:21] bradleymeck: well slashxr that was more a concern with breaking all client side stuff when determining an id using the same form as the current twitter api [17:21] visnup has joined the channel [17:21] jetienne has joined the channel [17:22] ctp has joined the channel [17:22] cyraxx: i have a node.js httpserver running faye (comet framework, don't know if you're familier with it) with very low traffic, but about 1000 concurrent connections. node is currently using 100% cpu on a 2ghz machine. just as a quick estimate, is that about normal or should that not happen? [17:22] Anti-X: depends what your app does [17:23] bradleymeck: ^ [17:23] cyraxx: most of the time, the clients are idling and waiting for new messages [17:23] cyraxx: it really doesn't do much. accept messages from one client and publish them to the others [17:24] cyraxx: there's currently about one message every few seconds, and each of them only goes to a few clients, not all at once [17:24] path[l] has joined the channel [17:25] stride: bradleymeck: oh, okay, just thought that they were looking at node for something because @rk is an engineer there [17:25] bradleymeck: yep he was in here on friday was it? [17:26] stride: no idea, but my timezone makes me miss a lot of stuff in here [17:27] _announcer: Twitter: "Thinking about using node-dirty (http://bit.ly/9d4ri0) as a metadata storage for our #nodejs projects ..." -- pfleidi. http://twitter.com/pfleidi/status/27754533504 [17:27] dguttman has joined the channel [17:28] edgarallanpoe has joined the channel [17:28] _announcer: Twitter: "@ # Czpodcast Had NodeJS?" [cs] -- Milan Boruvka. http://twitter.com/boruvek/status/27754655505 [17:28] siculars has joined the channel [17:30] benburkert has joined the channel [17:30] nerdEd has joined the channel [17:30] agnat has joined the channel [17:32] tapwater has joined the channel [17:32] benreesman has joined the channel [17:33] DoNaLd` has joined the channel [17:33] DoNaLd`: 44 [17:33] stride: -2 [17:33] DoNaLd`: :) [17:34] mjr_ has joined the channel [17:36] dysinger has joined the channel [17:36] sideshowcoder has joined the channel [17:36] banjiewen has joined the channel [17:39] [[zz]] has joined the channel [17:47] karboh has joined the channel [17:47] _announcer: Twitter: "I need more quotes for this #nodejs site: http://www.nodeisfreelegos.com: Be sure to mention @nodeisfreelegos. :-)" -- Jason Huggins. http://twitter.com/hugs/status/27755958129 [17:47] edgarallanpoe: hi, i'm trying to get into node.js, and i'm in over my head. i'm not even sure if the kinds of questions i have are javascript questions or node.js specific questions. [17:47] edgarallanpoe: this line: response.addListener("data", function(chunk) { responseBody += chunk }); [17:48] ryah_: edgarallanpoe: generally chunk is not a string [17:48] edgarallanpoe: does the fact that you can use a phrase like "response.addListener ..." mean that response objects have an addlistener method? [17:48] ryah_: edgarallanpoe: you need to setEncoding('utf8') if you want t string [17:48] ako has joined the channel [17:48] ryah_: edgarallanpoe: and, yes [17:49] Anti-X: it can be assigned listeners because it's an eventemitter [17:49] ryah_: cyraxx: which version? [17:50] jchris has joined the channel [17:50] ryah_: cyraxx: also, how much memory is it using? [17:50] _announcer: Twitter: "Thinking my own url shortener and API would be a fun way to learn node #nodejs #ownyourdata #diso2" -- Steve Ivy. http://twitter.com/steveivy/status/27756189859 [17:51] HAITI has joined the channel [17:51] edgarallanpoe: thanks ryah_ and Anti-X. ah, i think i see. [17:51] HAITI: cheers [17:51] jansc has joined the channel [17:53] BrianTheCoder has joined the channel [17:55] pyronicide has joined the channel [17:57] sudoer has joined the channel [17:58] mikecsh has joined the channel [17:59] murz has joined the channel [18:01] ajsie has joined the channel [18:01] bradleymeck: interesting, Object.create(null) has faster lookup times on missing properties than {}, makes sense though [18:02] matt_c has joined the channel [18:03] bradleymeck: only on the in operator though it seems... odd [18:04] pyronicide has left the channel [18:05] Aria has joined the channel [18:10] _announcer: Twitter: "#rightjs looks pretty cool and seems to work nicely with #nodejs (unlike ExtJS, prototype and the like). Let's see if it can deliver" -- Raphael Pigulla. http://twitter.com/muddyb0y/status/27757486003 [18:10] _announcer: Twitter: "I'm planning to ditch DreamHost. Who should be my next host? SquareSpace, MT? I need node.js, git, python support." -- Oskar Krawczyk. http://twitter.com/oskar/status/27757494640 [18:11] brianmario has joined the channel [18:11] ossareh has joined the channel [18:12] jtoy has joined the channel [18:12] mikew3c has joined the channel [18:15] davidascher has joined the channel [18:15] gerred has joined the channel [18:15] delapouite has joined the channel [18:17] path[l] has joined the channel [18:18] _announcer: Twitter: "Windows is by now how to develop Web apps A bad choice: Git node.js, CouchDB is ... but somehow, but is complicated." [de] -- Frederic. http://twitter.com/fhemberger/status/27758001117 [18:18] mtodd has joined the channel [18:19] TomsB has joined the channel [18:20] mtodd has joined the channel [18:21] jameshome has joined the channel [18:22] pedrobelo has joined the channel [18:23] gorakhargosh has joined the channel [18:24] femtoo has joined the channel [18:26] alxc1 has joined the channel [18:27] edgarallanpoe: i'm interested in doing a project to learn to use node.js: what i have in mind is plotting realtime stock data by listening to yahoo's stock price feed. what tools would be recommended? [18:27] antono has joined the channel [18:28] bradleymeck: connect, socket.io [18:28] antono has left the channel [18:28] bradleymeck: grab your client side lib of choice to show the graph [18:28] AAA_awright has joined the channel [18:29] edgarallanpoe: thanks bradley [18:31] tjholowaychuk: gotta get on fixing the connect bug [18:31] tjholowaychuk: to little timeeeEEE [18:31] tjholowaychuk: gahhh [18:31] bradleymeck: which one? [18:33] tjholowaychuk: bradleymeck: any middleware (namely session) that is async, needs to buffer there request body so its not lost in limbo [18:33] tjholowaychuk: currently it seems to work fine if you have a fast session store [18:33] tjholowaychuk: but it could/should be an issue [18:34] bradleymeck: i think we all wish we had more time [18:35] tjholowaychuk: i have like 3 more projects i want to get on that i havent even barely started too [18:35] tjholowaychuk: grr [18:36] CIA-36: node: 03Ryan Dahl 07master * rcf1db4f 10/ (lib/buffer.js src/node_buffer.cc test/simple/test-buffer.js): base64 decode should handle whitespace - http://bit.ly/9M7gyP [18:36] CIA-36: node: 03isaacs 07master * r25b5bc0 10/ test/pummel/test-base64-bigfile.js : [18:36] CIA-36: node: A big base64 file encoding/decoding test [18:36] CIA-36: node: Originally written to try to track down this bug report: [18:36] CIA-36: node: http://permalink.gmane.org/gmane.comp.lang.javascript.nodejs/13924 [18:36] CIA-36: node: As it turns out, it's showing a completely different kind of failure. When [18:36] CIA-36: node: the file is base64 encoded with the native program, then decoded with node, [18:36] CIA-36: node: it doesn't match the original. Something's fishy. - http://bit.ly/b4v5VG [18:37] Sembiance: oo, color. [18:38] bradleymeck: trying to wrap my head around how to handle cluster support without making things insane in node, not sharing functions is a bit limiting, but doable [18:39] TomsB_ has joined the channel [18:40] TomsB__ has joined the channel [18:40] CIA-36: node: 03AJ ONeal 07master * r74c8b5f 10/ wscript : ./wscript: allow for cross-compiling of all three supported architectures - http://bit.ly/bI6YC4 [18:40] _announcer: Twitter: "Chat 101: with Node.js and Faye - The SHDHMC 16 showed how to make a very basic chat with Node.js and as Comet Faye ... http://ow.ly/19vFUg" [es] -- Loki Zavala. http://twitter.com/Siedrix/status/27759531631 [18:43] _announcer: Twitter: "My new article in the hacker - Server JAVASSRIRT: Familiar With NODE.JS - http://www.xakep.ru/post/53583/ full version of the blog will soon be" [ru] -- Abrdev Blog. http://twitter.com/abrdev/status/27759692960 [18:45] ajsie: anyone know which one is the cheapest VPS hosting provider? [18:45] rbranson_: probably prgmr [18:45] tekky: morning blowery [18:46] ajsie: rbranson_: wow [18:46] ajsie: very cheap [18:46] cyraxx: ryah_: node version? 0.2.2 [18:46] cyraxx: ryah_: can't say how much memory since i stopped it for now, but it wasn't particularly much [18:47] tekky: wow and its Xen hosting... impressive [18:48] tekky: lmao Please note; this means all plans come with $4/month worth of support. [18:49] AAA_awright has joined the channel [18:53] svnlto has joined the channel [18:54] dmcquay has joined the channel [18:54] bronson has joined the channel [18:55] illver has joined the channel [18:55] rcy has joined the channel [18:55] _announcer: Twitter: "Free idea: Node.js fork which punches the developer in the face any time a method matching the name *Sync is called." -- Steve Streza. http://twitter.com/SteveStreza/status/27760541739 [18:56] daniellindsley has joined the channel [19:00] AAA_awright_ has joined the channel [19:00] hassox has joined the channel [19:00] isaacs has joined the channel [19:01] ph^ has joined the channel [19:02] softdrink: i'm using linode [19:03] chrisoei has joined the channel [19:04] olauzon has joined the channel [19:04] mikecsh has joined the channel [19:04] femtooo has joined the channel [19:04] Anti-X has joined the channel [19:07] kjeldahl has joined the channel [19:08] vnguyen has joined the channel [19:08] _announcer: Twitter: "@technoweenie I use comma first in "enterprise js" so maybe it's true ;-) However, I learned it from reading #nodejs code." -- Richard Nyström. http://twitter.com/richardnystrom/status/27761403169 [19:09] matt_c has joined the channel [19:09] AAA_awright has joined the channel [19:10] Floxxx has joined the channel [19:11] sivy: i [19:11] sivy: heh [19:11] sivy: i've add express.session() to my app config, but req.session always return undef [19:12] rasputnik has joined the channel [19:12] Floxxx: anyone around who can point me to some documentation on the transport options for socket.io? [19:12] dguttman has joined the channel [19:13] hsuh has joined the channel [19:13] bradleymeck: http://socket.io/#transports , implementation is non-issue [19:14] bradleymeck: http://github.com/learnboost/socket.io-node under Options - 'transports' [19:15] Floxxx: yeh, but i was more wondering some documentation on what each option does [19:15] Floxxx: transportOptions <-- this one i meant [19:15] sivy: http://gist.github.com/632835 -- req.session is returning undef with express.session middleware installed [19:16] sivy: (and express.cookieDecoder) [19:16] Anti-X has joined the channel [19:16] Floxxx: thing is, in IE (htmlfile) i lose connection after X amount of time when not sending any messages [19:17] Floxxx: i'm pretty sure that's the closeTimeout option, but no idea what to set it to so it will stay connected [19:17] femtoo has joined the channel [19:18] Floxxx: unfortunately Guillermo didn't provide extensive API documentation :( [19:19] tjholowaychuk: sivy: session needs to be below cookieDecoder [19:19] tjholowaychuk: sivy: actually just above anything that you want to use req.session. the ordering of middleware is important [19:20] bradleymeck: floxxx, all i can get, http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/listener.js#L30-34 , http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/client.js#L12-14 [19:20] Floxxx: yeh [19:20] Floxxx: that's what i found [19:21] strmpnk_ has joined the channel [19:23] topmetric_ has joined the channel [19:23] msilverman2 has joined the channel [19:23] hassox has joined the channel [19:24] sivy: tjholowaychuk: I moved session to just below cookieDecoder, but not getting any love [19:25] mytrile has joined the channel [19:25] topmetric_: If someone has a free sec I could use feedback on my startup (skanr.com), thanks [19:25] aurynn: topmetric_, what's it do? [19:26] topmetric_: lets you upload data from your phone to a web service [19:26] topmetric_: like node [19:26] tjholowaychuk: sivy: should be fine, it is just a memory store by default [19:26] cloudhead has joined the channel [19:26] msilverman2: howdy y'all... quick question... I've written a little node test that writes related objects to a Mongo database as fast as it can. It works great all the way up to 500,000+ records. However, when I try to get it to write 1,000,000+ related records, I see node start to chew up tons of memory, database writes stop, and eventually node dies with a "process out of memory" error. Anyone seen this before? [19:27] sivy: tjholowaychuk: yeah, not sure what's going on. As I read the docs, simply adding cookieDecoder and session should result in a session object getting added to the request, correct? [19:27] msilverman2: for the 500k records, if you inspect the node process the mem used only shoots up to around 48 megs, however with the 1mil try, the memory usage shoots up to 1 gig really quickly.. so the numbers don't seem to be aligned [19:27] msilverman2: any thoughts? [19:27] bradleymeck: you probably arent releasing objects msilverman2, be it from references in js or the module connecting to mongo [19:27] sivy: tjholowaychuk: and by the way, thanks for all the code you've released! huge help for newbies [19:27] tjholowaychuk: sivy: yeah that is correct, you can pass a store to session() (redis, mongo, etc) but by default it should work with the memory store [19:28] EyePulp has joined the channel [19:28] wink_: msilverman2: using the native driver? [19:28] sivy: tjholowaychuk: do i need to install the memorystore manually perhaps? or does it come with Connect? [19:28] msilverman2: yes wink [19:28] EyePulp: yo ho ho [19:28] tjholowaychuk: sivy: the memory store comes with connect [19:28] digitalspaghetti: tjholowaychuk: i take it with another store like redis or node-supermarket, if i restart the app it'll keep the session [19:28] zk has joined the channel [19:28] tjholowaychuk: digitalspaghetti: yup [19:28] msilverman2: even so, it seems weird that 500k is 48 megs of memory used, and 1 million eats up a gig [19:28] msilverman2: no? [19:29] tjholowaychuk: digitalspaghetti: I dont recommend the memory store in production lol [19:29] tjholowaychuk: your process will explode eventually [19:29] digitalspaghetti: yea :D i'm just using memory just now but it's only me [19:29] wink_: msilverman2: probably, but libc is a weird bitch like that :> [19:30] wink_: unfortunately i dont know the native driver well enough to help you much [19:30] thorsteinsson has joined the channel [19:30] fjakobs has joined the channel [19:30] isaacs: anyone finding that node won't build on a clean checkout? [19:30] digitalspaghetti: although i need to think of a way in my extjs client to know if the session is over as well, because i store the current client name for couchdb database access as well [19:31] isaacs: looks like it expects build/default/config.h to be in . instead [19:31] digitalspaghetti: and if the user forgets to log out before the session ends, it breaks [19:31] Floxxx: digitalspaghetti: check if session id is set? [19:31] digitalspaghetti: Floxxx: yes, but how do i then know it's the correct session id in the cookie [19:32] digitalspaghetti: because once the app loads, you never refresh the page [19:32] digitalspaghetti: it's all ajax [19:32] Floxxx: hmm [19:32] Floxxx: do an ajax call [19:33] Floxxx: and pull session from the request [19:33] isaacs has joined the channel [19:36] digitalspaghetti: yea, or maybe just keep an internal app timer that auto logs out after 15m of non activity [19:36] Floxxx: well, you can just set the session timeout to 15 minutes [19:36] Floxxx: and check the session at every ajax call [19:37] hassox has joined the channel [19:38] alxc1 has left the channel [19:38] alxc1 has joined the channel [19:39] sivy: digitalspaghetti: how are you using session right now? i can't seem to get a proper session object in the request [19:39] zk has joined the channel [19:39] digitalspaghetti: having a look at it, the exact same way as you! [19:39] sivy: digitalspaghetti: you're using express, right? [19:39] digitalspaghetti: yea [19:39] sivy: but it's working for you?; [19:40] sivy: have any code you can paste? [19:40] digitalspaghetti: well i looked at yours and compaired it, and really there wasn;t anything differnt [19:41] wink_: msilverman2: i could help you with my fork of node-mongodb if you'd like [19:41] wink_: although it uses more ram during the write of 1m documents [19:41] msilverman2: It'd be nice to just have some validation that a similar thing is happening to someone else [19:41] wink_: it does free it :p [19:41] msilverman2: I think freeing it would be clutch [19:41] msilverman2: I mean only 48 megs for the 500k docs right? [19:42] msilverman2: 1 gig for 1 million sucks [19:42] wink_: just wait until you try to retrieve them using the native driver <3 [19:44] mikeal1 has joined the channel [19:45] path[l] has joined the channel [19:46] sivy: is it possible to fake a request in the node cli? [19:47] tjholowaychuk: sivy: why not use curl? [19:47] tjholowaychuk: you could (with node) [19:47] tjholowaychuk: but it is verbose [19:47] sivy: tjholowaychuk: well, i can use the browser, i was just curious [19:48] tjholowaychuk: sivy: $ curl http://localhost:3000/whatever/page [19:48] sivy: creating a simplified app.js to test this session thing [19:50] tjholowaychuk: sivy: $ express path/to/my/new/app [19:50] tjholowaychuk: will give you a new app with less.js / jade [19:50] arlolra has joined the channel [19:50] sivy: tjholowaychuk: yeah, i just copied my app.js to app-test.js and stripped out some of the logic [19:50] sivy: and it works [19:50] sivy: the session is now there [19:50] tjholowaychuk: sivy: yeah that is a good way to start, people often blame Express before they check their own stuff [19:51] xla has joined the channel [19:51] sivy: yeah i wasn't intending to blame express -- i'm well aware that i'm brand new at this and assume it's my fault [19:51] gerred has joined the channel [19:52] tjholowaychuk: no worries man, just saying that what you are doing now, is a good way to problem solve [19:52] tjholowaychuk: start with something you *know* is stable first [19:53] mellowsoon has joined the channel [19:53] sivy: yeah, i've narrowed it down to a require() [19:54] tjholowaychuk: hm [19:55] sivy: http://gist.github.com/632919 [19:55] dmcquay has joined the channel [19:56] pedrobelo has joined the channel [19:56] sivy: as soon as I add that require() ( admin = require('./admin') ) it stops creating the session [19:56] Me1000 has joined the channel [19:58] tjholowaychuk: where is require('./admin') ? [19:58] tjholowaychuk: i dont see it there [19:59] programble has joined the channel [19:59] programble has joined the channel [20:00] hassox has joined the channel [20:04] sam_: If node.js ever gives a segfault, that's a bug, right? [20:04] rbranson_: yes, but it could be a bug in an extension [20:05] dmcquay has joined the channel [20:06] springmeyer has joined the channel [20:07] shockie has joined the channel [20:08] sam_: I believe something in node-sqlite's query() method is causing it to segfault [20:08] sam_: http://github.com/orlandov/node-sqlite [20:11] sam_: but before I throw around allegations, I should probably confirm :) [20:11] vnguyen_ has joined the channel [20:11] sam_: g 1 [20:12] stride: hm, that node-ffi thingy, wouldn't it awfully slow to make library wrappers for the real world with it? [20:13] sivy: tjholowaychuk: https://gist.github.com/0a925bd44e6d94c926fa [20:13] sivy: that's my set of require's [20:14] tjholowaychuk: what exception do you get [20:14] stride: is there some kind of generator for native node modules? [20:14] tjholowaychuk: oh i see, this is what you are doing to break it into smaller files [20:19] pgriess has left the channel [20:21] hsuh has joined the channel [20:23] bradleymeck: stride, slow execution at the cost of fast dev [20:23] bradleymeck: and nope [20:31] herbySk: hi. anyone know of some proxy/rewrite thing that is able to "rewrite" POST request to GET (that is, putting POST data into GET url)? [20:31] rydgel has joined the channel [20:31] aurynn: a) why ? [20:32] saikat has joined the channel [20:33] herbySk: aurynn: I've got an app written in appjet, which gives me params in arbitrary order, and only lets me see querystring, but not the post data; and I want to accept paypal notifications, which require me to send back the whole data verbatim (with the same order of params) [20:35] sivy: tjholowaychuk: no exception, just... no session object [20:38] nextorlg has joined the channel [20:40] sivy: tjholowaychuk: this is my latest app-test.js [20:40] sivy: http://gist.github.com/633013 [20:41] sivy: pretty simple [20:41] aurynn: herbySk, hmm. Sounds like you need to pick apart appjet to see how to get the post data [20:42] herbySk: aurynn: It is prohibited. [20:42] herbySk: (I would I could) [20:42] tjholowaychuk: sivy: oh i know what it is. its because the first call to app.get() (or the other http verbs) will mount the middleware [20:43] tjholowaychuk: if it has not been already [20:43] tjholowaychuk: via app.use(express.router) [20:43] herbySk: aurynn: but doing proxy_pass thing, but also rewriting POST to GET seems to me as the simplest solution - if such proxy existed [20:43] tjholowaychuk: so you need to move require('./admin') and users below app.configure() [20:43] tjholowaychuk: or move your config into ./config [20:43] tjholowaychuk: and require it above those other two [20:44] jherdman has joined the channel [20:44] sivy: tjholowaychuk: woohooo [20:44] tjholowaychuk: not an obvious one haha [20:44] sivy: it's a gift [20:47] sivy: thanks again [20:47] _announcer: Twitter: ""Whoa. I know @nodejitsu" Nodejitsu co-founder & Node.js/CouchDB/general tech wonk @indexzero is coming to @protovore 2." -- Protovore. http://twitter.com/protovore/status/27767972832 [20:47] CIA-36: node: 03Sami Samhuri 07master * r56df0cb 10/ lib/repl.js : new api for defining repl commands - http://bit.ly/cm7y3d [20:50] nroot7 has joined the channel [20:53] femtooo has joined the channel [20:54] badaxx_ has joined the channel [20:55] bradleymeck: whats a good way to check if something is a valid ip address [20:55] ryan[WIN]: send it a ping? :D [20:56] bradleymeck: lol, i guess, more to know when to do a dns lookup and when to not [20:56] nerdEd has joined the channel [20:56] ryan[WIN]: bradleymeck, i'm assuming you mean see if an ip address is reachable/etc. rather than just parsing out a valid ip [20:57] bradleymeck: nope, just if it is valid [20:57] bradleymeck: for once idc if i can reach it [20:58] ryan[WIN]: http://www.faqs.org/docs/linux_network/x-087-2-issues.ip-addresses.html [20:58] bradleymeck: bleh, thats just ipv4, guess its fine for most things at least, ty [20:59] ryan[WIN]: yeah that's all you can really do [20:59] ryan[WIN]: you have to sort of try to connect to it [20:59] ryan[WIN]: before you get any meaningful information back [21:00] ryan[WIN]: like unreachable, etc. [21:00] ossareh has joined the channel [21:00] wink_: there are probably loads of regex's that'll check whether it might be valid [21:01] jameshome has joined the channel [21:02] tilgovi has joined the channel [21:03] saikat has joined the channel [21:08] bradleymeck: on a side note, what do people think is the fastest way currently to serialize data to child processes [21:08] dysinger has joined the channel [21:08] Kung_Fu_Hamster has joined the channel [21:09] PyroPete1 has joined the channel [21:09] tjholowaychuk: yaml [21:09] tjholowaychuk: haha [21:09] tjholowaychuk: jk [21:09] hassox has joined the channel [21:10] isaacs: bradleymeck: i'd use json [21:10] isaacs: bradleymeck: unless you have some good reason not to, json is usually best. [21:10] rbranson_: use JSON and use a straight eval() [21:10] rbranson_: because you trust it :) [21:10] bradleymeck: json.stringify/parse are slow though, only reason i care is im working on some clustering [21:10] isaacs: bradleymeck: i doubt that that's your bottleneck [21:11] bradleymeck: net/calculations are my bottleneck [21:11] rbranson_: use eval() instead of json.parse() [21:11] bradleymeck: but i cant really optimize those automatically [21:11] isaacs: bradleymeck: imo, the most important consideration in situations like these is to move on to the next problem asap [21:11] mqt` has joined the channel [21:11] isaacs: bradleymeck: json.stringify/parse works. use that. measure it. if it's actually relevant, get something faster in there. [21:11] isaacs: it's easy to swap out later [21:12] bradleymeck: its not, just wondering if there was a more generic easy thing while im writing that serializer [21:12] bradleymeck: well not needing to be generic, just a bit faster [21:12] isaacs: bradleymeck: there are a few binary packing protocol type thigns. but nothing anywhere near as convenient as json [21:13] rbranson_: i'm surprised that json is slow [21:13] rbranson_: the JSON stringifier is written in C afaik [21:14] bradleymeck: i can come close to it in raw js [21:14] bradleymeck: 8~ slower and js is bad at concats [21:14] rbranson_: probably because the C++ code has to do equal amounts of dynamic stuff [21:14] tjholowaychuk: rbranson_: its not C [21:14] tjholowaychuk: its written in js [21:15] wink_: bradleymeck: write a 0mq binding <3 [21:15] rbranson_: so I stand corrected :) [21:15] bradleymeck: wink not my focus right now unless you are payin me [21:15] rbranson_: there is an experimental 0mq binding [21:15] tjholowaychuk: rbranson_: but with their special boot syntax that gives access to bindings n shit [21:15] leeeb_ has joined the channel [21:15] wink_: bradleymeck: it'd be great for node cluster IPC [21:15] gianni has joined the channel [21:16] wink_: rbranson_: i've not seen it, i'll look it up [21:16] bradleymeck: indeed it would, but gotta get my cluster stuff working [21:16] rbranson_: http://github.com/JustinTulloss/zeromq.node [21:16] badaxx has joined the channel [21:17] wink_: rbranson_: nice, it looks pretty well done on the surface [21:18] Aria has joined the channel [21:19] sideshowcoder has joined the channel [21:19] dylang has joined the channel [21:20] Vertice has joined the channel [21:20] Vertice: hey there [21:20] Vertice: is anyone having problems with ndistro fetching node ? [21:21] tjholowaychuk: Vertice: you will want to specify the version for now [21:21] Vertice: i did [21:21] Vertice: curl: (18) transfer closed with 3781016 bytes remaining to read [21:21] tjholowaychuk: since I dont have equal binaries available [21:21] tjholowaychuk: hm [21:21] Vertice: it dies randomly [21:21] Vertice: different places [21:21] tjholowaychuk: they are just fetched from github, so maybe github is failing [21:21] tjholowaychuk: not sure [21:21] Vertice: but acts as if completed [21:21] Vertice: might be [21:22] tjholowaychuk: i wonder if joyent ever started looking into the whole binary thing [21:22] yhahn: Vertice: github's dl's dies once in a while [21:22] Vertice: ah. yhahn , imagine finding you here =) [21:23] yhahn: Vertice: : ) [21:23] Vertice: guess i'll just try again [21:23] strmpnk_ has joined the channel [21:23] mif86 has joined the channel [21:23] breccan_ has joined the channel [21:23] programble has joined the channel [21:24] aheckmann has joined the channel [21:24] figital has joined the channel [21:24] zorzar_ has joined the channel [21:24] LionMadeOfLions has joined the channel [21:24] Draggor1 has joined the channel [21:24] chapel: hrm [21:25] chapel: okay, I had working code where I use .some on an array, and had count = the length of the array, if count was <= 0 I would then write some data I was pushing into an array each iteration [21:26] kkaefer: ACTION waves at Vertice [21:27] chapel: so now my problem is, I needed to add some more data, which required an extra api call, but I needed a variable from the first api call that was only accessible through .some or forEach [21:28] chapel: when I added the api call, I couldn't guarantee that the data was being stored right in the array, fast forward, now when I loop through my array using some, forEach, even for (var i.. it isn't doing it in a predictable manner [21:29] voodootikigod: felixge you here [21:30] Vertice: hey kkaefer [21:30] voodootikigod: hows about anyone else working on the node-mysql project [21:31] chapel: http://gist.github.com/633111 << that is my code atm [21:32] AAA_awright has joined the channel [21:33] paulr has joined the channel [21:34] sivy: when it comes to using mongo, are folks generally using an ORM-like interface or something more flexible? [21:34] chapel: any input, its sloppy code, the current code has been modified quite a few times, it currently writes to the db, but some records will be null, others idk [21:35] tjholowaychuk: sivy: mongo is pretty flexible / nice to use on its own [21:35] tjholowaychuk: but check out mongoose [21:36] sivy: tjholowaychuk: yeah, i'm reading up on that right now, actually; i like mongo as it is, but sometimes i want to be able to define instance methods for stored objects [21:36] sivy: like "add this embedded doc" [21:37] sivy: though i guess in that case it's just assigning a dict value [21:38] digitalspaghetti: ugh [21:38] digitalspaghetti: "I think some of the most horrible JS code I've seen has been from people writing for Node.js. Please go away and let the adults handle this. [21:38] digitalspaghetti: " [21:39] adinardi_: digitalspaghetti: Yeah, what of it? :) [21:39] sivy: digitalspaghetti: i'm assuming the writer linked to their own, shared, "adult-written code"? :-) [21:39] digitalspaghetti: wasn't me that said it, but announcer is down again [21:39] digitalspaghetti: sivy: no, but a good reply [21:39] chapel: lol [21:39] adinardi: I did. I've been writing JS for 5 years now. I've written JS at google [21:39] digitalspaghetti: Bio: Software Engineer, AJAX/Web2.0 connoisseur, gadget lover. Currently employed at a startup in SF. Note: I am opinionated and often offensive. Enjoy. [21:39] pedrobelo has joined the channel [21:39] digitalspaghetti: he's a troll [21:39] chapel: ACTION is new to js [21:40] chapel: at least in this amount [21:40] isaacs: oh, are we dumping resumes? [21:40] isaacs: how fun [21:40] chapel: a few browser scripts here and there really don't count [21:40] chapel: :) [21:40] chapel: anyone have any advice? [21:40] chapel: http://gist.github.com/633111 [21:40] chapel: :( [21:41] isaacs: i think that a mark of a successful platform is that non-experts can be productive writing *severely* shitty code. [21:41] springmeyer_ has joined the channel [21:41] isaacs: not that you should try to encourage bad practices, but i mean, look at any successful platform. [21:42] chapel: I have tried .some .forEach and now a for loop, is there any way to guarantee that the array I am writing too will contain each players data, and that it wont be written to the db until all data has been collected? [21:42] adinardi has left the channel [21:42] themanr has joined the channel [21:42] chapel: isaacs << yeah, php comes to mind [21:42] isaacs: chapel: bingo. [21:42] chapel: not that js is even close to php in badness [21:42] isaacs: chapel: php actually *forces* you to do the wrong thing a lot of the time, i've found. [21:42] chapel: I mean, php is dead simple once you learn the basics [21:42] isaacs: php is like perl's freakier little sister. [21:42] chapel: heh [21:42] isaacs: php will do ANYTHING and not complain about it [21:42] TheEmpath: rofl [21:43] isaacs: php doesn't care if you haven't showered in weeks. [21:43] chapel: but js is just as simple, just has more advanced ways of doing things [21:43] isaacs: yeah [21:43] isaacs: i like js better than php [21:43] isaacs: a lot better. [21:43] isaacs: php is just dirty [21:43] digitalspaghetti: php is the lowest common language of the web [21:43] isaacs: actually, js is the *only* common language of the web. [21:43] isaacs: that and english, i guess [21:43] isaacs: horrible, misspelled, abused english. [21:44] isaacs: the best kind :) [21:44] tekky: lmao [21:44] Tim_Smart has joined the channel [21:46] isaacs: tjholowaychuk: hey, you around? [21:47] tjholowaychuk: yup [21:47] isaacs: tjholowaychuk: http://twitter.com/#!/tjholowaychuk/status/27770714464 [21:47] isaacs: which node binarieks? [21:47] isaacs: *binaries [21:47] tjholowaychuk: a while back I asked if they could expose the binaries from the CI server (or similar) for tools like ndistro [21:48] tjholowaychuk: they said they were looking into it [21:49] isaacs: ah, ok, that's what i thought [21:49] isaacs: i was gonna mention that the node binaries (for solaris) are all in /opt/nodejs//bin on the no.de machines [21:50] tjholowaychuk: i just think it would be really great for people getting started, or deployment in general. one of my buds wanted to try out node [21:50] tjholowaychuk: but we needed xcode [21:50] tjholowaychuk: then git [21:50] tjholowaychuk: blha blah blah [21:52] ryah_: tjholowaychuk: haven't done it yet [21:52] tjholowaychuk: ryah_: cool. no worries, just checking up [21:53] rbranson_: ryah_: curious what you're using the FFI for [21:54] ryah_: rbranson_: orlandov is using it for binding to libzonecfg [21:54] rbranson_: nice... I guess that would be useful for no.de :) [21:54] ryah_: :) [21:55] rbranson_: it is really easy to shoot yourself in the foot right now [21:55] rbranson_: would be nice to find ways to at least safeguard some things [21:57] indexzero has joined the channel [21:57] chapel: hmm, anyone mind helping me, I hate to keep bringing it up http://gist.github.com/633111 [21:58] tekky: pretty gist [21:59] indexzero: jamescarr: you around? [21:59] chapel: sarcasm tekky? [22:00] tekky: chapel: you didnt want to bring up the problem so I commented on something else (short answer, yes) [22:00] chapel: lol [22:01] chapel: yeah, code isn't pretty, or even right in some cases [22:01] wink_: chapel: whats the issue? [22:01] tekky: seenig as how there was no issue mentioned (and scrollback on this web client is horrid) :P [22:01] chapel: but I figure if I can hack at it to get it to do what I want, then I can refine it, since some of it is guess work as far as the api I am using [22:01] chapel: oh [22:02] chapel: well the issue is my for loop, or even if I use array.some or array.forEach, the data written to my db isn't what I am expecting [22:02] tekky: isaacs: btw, your comment was perfect for twitter http://twitter.com/#!/ktiedt/status/27772227819 :P [22:02] chapel: what I expect is 8 records [22:02] CIA-36: node: 03Ryan Dahl 07master * r97255c2 10/ (5 files in 5 dirs): [22:02] CIA-36: node: Fix test harness for Linux [22:02] CIA-36: node: Mostly just upgraded tools/test.py to the latest one that's in V8. But also [22:02] CIA-36: node: fixing the before and after hooks to preserve the test/tmp directory so that [22:02] CIA-36: node: running tests manually usually works. - http://bit.ly/crDWhA [22:02] chapel: 8 data.players [22:02] CIA-36: node: 03Ryan Dahl 07master * r4adadc3 10/ test/pummel/test-base64-bigfile.js : fix test-base64-bigfile for linux - http://bit.ly/acQOet [22:03] isaacs: tekky: :D [22:03] wink_: chapel: what are you seeing? [22:03] chapel: well, some db docs are showing only 1 player and the other 7 null, or a couple, and the rest null [22:03] isaacs: tekky: are you kteidt? [22:03] tekky: chapel: w/o looking at the loop, my bet would be on a closure issue :P [22:03] chapel: I tried to use data.players.push [22:04] tekky: isaacs: I hope so, thats where I posted it :P [22:04] isaacs: tekky: ah, kewl [22:04] isaacs: what's funny is that i just retweeted it [22:04] isaacs: so it's like i'm crediting you for something that you heard me say.. [22:04] chapel: tekky << I have been trying to keep that in mind, but I am not seeing where a closure issue is [22:04] tekky: isaacs: lol yah It was too long so I didnt bother trying to add in #nodejs or anything OH made it fit [22:05] isaacs: yeah [22:05] isaacs: it's cool :) [22:05] Wes- has joined the channel [22:05] wink_: chapel: your problem is the call to getPlayer [22:05] wink_: in that callback you're closing around i, your for loop iterator [22:05] wink_: thats not gonna work in an async world [22:05] chapel: ah, hmm [22:05] chapel: I thought about that, but didn't know an alternative [22:06] tekky: isaacs: and I guess twitter isnt going to show me the retweet, whats your handle on twitter? [22:06] wink_: pass your player data into getPlayer so it can then be passed back to the callback [22:06] isaacs: tekky: http://twitter.com/#!/ktiedt/status/27772227819 [22:06] isaacs: tekky: oh, neat, it links to the originall. [22:06] wink_: or at least the index you're stuffing the player data into [22:06] isaacs: tekky: i'm @izs [22:06] mytrile has joined the channel [22:07] wink_: since it looks like thats all you're using i for [22:07] chapel: well [22:07] chapel: I used array.some [22:07] tekky: isaacs: yah the new RT stuff is a PITA for that [22:07] wink_: basically, in your getPlayer function, where you're closing the for loops variables, rating, standing, gamertag is going to blow up [22:07] chapel: and then count to check if I have gone through 8 iterations [22:07] isaacs: it's nice to be able to RT stuff that's already 140 chars, though [22:08] wink_: since by the time getplayer has returned just once, your for loop has ran its course [22:08] chapel: there I didn't use i to iterate through player [22:08] isaacs: and not seeing the same RT over and over again is nice. [22:08] chapel: and was just using push [22:08] chapel: ah, hmm [22:08] wink_: right, but your closure around i is just as broken as gamertag, rating,standing [22:08] tekky: isaacs: yah that is nice :) [22:08] wink_: all of those variables are going to be changing unpredictably by the time your callback runs [22:08] wink_: unpredictably* [22:09] chapel: ah [22:09] wink_: gotta run, cya <3 [22:09] chapel: well should I just pass the players to getplayer and handle it all there [22:09] tekky: chapel: players.forEach() ? [22:10] chapel: the issue wink_ brought up, I am calling getPlayer inside of a players loop, and it is looping through players while getPlayers isn't being returned [22:10] chapel: so my guess is that I need to move the looping and stuff to getPlayer [22:11] chapel: but eh [22:11] chapel: before I separated the getPlayer code, I was running an httpGet inside the loop, and data wasn't being handled right either [22:12] chapel: so maybe, I should loop through players, get the data I need from it, then send it to getPlayer, which then does its loop for what it needs, and then writes it all? [22:12] richcollins has joined the channel [22:13] CIA-36: node: 03Ryan Dahl 07master * r40f675b 10/ test/simple/test-http-upgrade-client2.js : Fix race conditions in test-http-upgrade-client2 - http://bit.ly/cJ9lJj [22:14] bentruyman has joined the channel [22:15] admc_ has joined the channel [22:15] admc has joined the channel [22:16] nextorlg has left the channel [22:18] gJ|Alex has joined the channel [22:20] dgathright has joined the channel [22:21] bradleymeck: anyone know if node --eval acts any different than a normal module when executing code? [22:24] tjholowaychuk: bradleymeck: shouldnt [22:24] tjholowaychuk: I have it placed after all the bootstrap stuff [22:24] tekky: chapel: well for() doesnt create a closure i believe (and im running on little sleep today) that each iteration of forEach is its own closure since its passing it off to a new function as part of the forEach [22:24] tjholowaychuk: just like a module would [22:25] CIA-36: node: 03Jorge Chamorro Bieling 07master * rc735b46 10/ (src/node_buffer.cc test/simple/test-buffer.js): unbase64 skips over *any* illegal chars - http://bit.ly/bw6WzY [22:25] bradleymeck: tj, thank goodness got me some bootstrap goodness now too [22:26] sonnym has joined the channel [22:26] frodenius: tekky: no [22:26] frodenius: forEach gets one function, that is one closure [22:27] msilverman2 has joined the channel [22:29] robotarmy has joined the channel [22:29] muk_mb has joined the channel [22:30] dylang_ has joined the channel [22:30] Akufen has joined the channel [22:30] Akufen has joined the channel [22:30] robotarmy has joined the channel [22:31] robotarmy has joined the channel [22:34] muk_mb1 has joined the channel [22:35] tekky: ugh... i hate rebooting [22:35] muk_mb has joined the channel [22:36] tjholowaychuk: bradleymeck: works fine? [22:36] deanlandolt: tekky: then why not run windows...that way you'll get used to it and it won't bother you so much ;) [22:36] bradleymeck: tj? yes [22:37] tjholowaychuk: woot [22:38] bpadalino has joined the channel [22:38] amerine has joined the channel [22:38] bradleymeck: cluster abstraction is halfway done [22:38] amerine has joined the channel [22:39] amerine has joined the channel [22:39] ben_alman has joined the channel [22:40] chapel: well what is the best way to iterate through one array, send one variable from each array iteration to a function to make an api call, then with the data from the api call, pass it to a data array that has each of the original data array iterations, and then write it to a db? [22:41] tilgovi_ has joined the channel [22:42] aurynn: er, what? [22:44] jchris has joined the channel [22:44] jchris has joined the channel [22:44] bradleymeck: v8: function api(data,cb){cb(data+1)};var results=[];[1,2,3,4,5,6].forEach(function(data,index){api(data,function(newdata){results.push(newdata)})});results.forEach(function(data){/*db.write(data)*/});results// ???chapel (didnt fully understand the original data array iterations bit) [22:44] v8bot: bradleymeck: [2, 3, 4, 5, 6, 7] [22:45] tekky has joined the channel [22:46] ysynopsis has joined the channel [22:47] aconran_ has joined the channel [22:48] Arro has joined the channel [22:50] tyfighter has joined the channel [22:55] mr_daniel has joined the channel [22:56] tjholowaychuk: technoweenie: can you POST a gist? [22:56] rleeds has joined the channel [22:57] yhahn has left the channel [22:58] reid has joined the channel [23:02] tmpvar has joined the channel [23:02] Floxxx: bradleymeck: in that piece of code, won't the results.forEach be triggered before array.forEach is done? [23:04] bradleymeck: no [23:04] chapel: hmm [23:04] bradleymeck: is there a way to reorder the listing of files in a gist? [23:07] bradleymeck has left the channel [23:07] chapel: hmm [23:11] galaxywatcher has joined the channel [23:12] mytrile has joined the channel [23:13] [[zz]] has joined the channel [23:15] alxc1 has joined the channel [23:19] paulr has joined the channel [23:21] davidwalsh has joined the channel [23:22] TheEmpath: any way to get the server IP in a blocking way through child_process or some other module? [23:22] TheEmpath: i need the server ip before i can populate the applications configuration :( [23:22] hellp has joined the channel [23:23] TheEmpath: hrmmm better question [23:24] TheEmpath: why is a call to child_process.exec('ifconfig -a', callback); not happening at all? [23:24] SubStack: is /sbin in your $PATH? [23:25] TheEmpath: code hur http://gist.github.com/633284 [23:26] CIA-36: node: 03Mark Nottingham 07master * rb14eeb3 10/ lib/http.js : Fix expect/continue keepalive - http://bit.ly/aWzJOa [23:26] TheEmpath: what file would that be in substack? [23:26] TheEmpath: grep "$PATH" ~ shows nothing [23:26] SubStack: oh you can use pkrumins's new node-lazy [23:26] SubStack: one sec [23:27] Anti-X: you need to lick it [23:27] sbellity has joined the channel [23:27] TheEmpath: node-lazy? [23:28] TheEmpath: makes something chainable [23:28] SubStack: var Lazy = require('lazy'); var exec = require('child_process').exec; Lazy(exec('ls -1').stdout).join(function (lines) { console.log(lines.join('\n')) }) [23:28] TheEmpath: while neat, i think thats overkill [23:28] SubStack: not at all [23:29] WM: neat [23:29] rnewson has joined the channel [23:29] pkrumins: awesome use [23:29] SubStack: oh actually exec() doesn't line-buffer [23:29] SubStack: still [23:30] SubStack: just s/lines/bufs/g, doesn't change the semantics [23:31] jakehow has joined the channel [23:32] strmpnk has joined the channel [23:33] mikew3c has joined the channel [23:35] mtodd_ has joined the channel [23:38] saikat has joined the channel [23:38] TheEmpath: im calling the exec via /sbin/ifconfig in hte exec and it makes no difference. the callback never happens [23:39] dmcquay has joined the channel [23:47] nerdEd has joined the channel [23:48] mikenel has joined the channel [23:52] Aria has joined the channel [23:52] dnolen_ has joined the channel [23:53] aheckmann has joined the channel [23:55] HAITI has joined the channel [23:55] jamescarr: indexzero, I'm here now [23:56] reid: What is npm_config_dev? [23:58] isaacs: reid: npm help config [23:58] kordless has joined the channel [23:58] isaacs: reid: tells it to install devDependencies as well as dependencies [23:58] isaacs: reid: set to "true" when doing npm link [23:59] gerred: is there a way in npm to update every installed package? [23:59] Tim_Smart: npm update [23:59] deepthawt has joined the channel