[00:04] hdon- has joined the channel [00:05] Bonuspunkt has joined the channel [00:05] thinkt4nk has joined the channel [00:07] zum has joined the channel [00:08] blueadept: what would be the best way to load a node app with config info from a database? load a child process with arguments for variables? [00:08] xerox: blueadept: I like to do bin/app with #!/usr/bin/env node as first line [00:09] sechrist has joined the channel [00:09] xerox: do the messy stuff there, and require my ../lib/app.js [00:09] xerox: and give it all the info it needs to do its job [00:09] blueadept: cool, ty [00:10] xerox: my pleasure [00:10] xerox: (also chmod 755 bin/app) [00:12] piscisaureus has joined the channel [00:16] tobmaster has joined the channel [00:18] eastender2 has joined the channel [00:19] mcluskydodallas has joined the channel [00:20] vid__ has joined the channel [00:22] monokrome has joined the channel [00:27] akshatj has joined the channel [00:28] micheil has joined the channel [00:29] madhums has left the channel [00:30] ditesh|cassini has joined the channel [00:31] willwhite has joined the channel [00:31] [[zz]] has joined the channel [00:33] blup: i need help with node and oauth, anybody know a good doc? [00:33] xandrews has joined the channel [00:34] dherman has joined the channel [00:37] vid__ has joined the channel [00:37] Swimming_bird has joined the channel [00:39] pwk0 has joined the channel [00:39] abraxas has joined the channel [00:40] materialdesigner: blup: what module are you using? [00:40] materialdesigner: I've got some experience with everyauth [00:41] neoesque has joined the channel [00:42] bengrue has joined the channel [00:42] blup: i'm looking into connect-auth and node-oauth [00:43] blup: need to connect to tumblr/twitter/etc [00:44] CIA-65: node: 03Ryan Dahl 07master * r3b0f2ce 10/ (3 files in 2 dirs): Fix dd command tests for Windows - http://bit.ly/pAl18J [00:46] CIA-65: node: 03Ryan Dahl 07master * r501b0b9 10/ Makefile : Add fixed tests to test-uv - http://bit.ly/ow1G5v [00:46] tristanseifert has joined the channel [00:48] thoolihan has joined the channel [00:49] alnewkirk has joined the channel [00:49] gtramont1na has joined the channel [00:50] jvdev has joined the channel [00:52] postwait has joined the channel [00:54] Borgoluzzuo has joined the channel [00:54] Borgoluzzuo has left the channel [00:54] monokrome_ has joined the channel [00:56] Borgoluzzuo has joined the channel [00:56] jacter has joined the channel [00:58] nlsn has joined the channel [00:58] piscisaureus has joined the channel [00:59] ericmuyser has joined the channel [01:00] nlsn: anyone available to help me build nodejs in windows using cygwin? [01:01] ericmuyser has joined the channel [01:01] xerox: nlsn: they are working on a build that doesn't need that [01:01] nlsn: oh, awesome! thanks :D [01:01] xerox: : ) [01:01] materialdesigner: doesn't one already exist? http://blog.nodejs.org/2011/07/14/node-v0-5-1/ [01:02] k1ttty has joined the channel [01:02] xerox: yes but odd-numbered versions are unstable [01:02] seivan has joined the channel [01:02] materialdesigner: http://blog.nodejs.org/2011/07/22/node-v0-5-2/ [01:02] CIA-65: node: 03Ryan Dahl 07master * rb3bc009 10/ (3 files in 2 dirs): [01:02] CIA-65: node: Fix test-net-server-on-fd-0 for windows by removing assert [01:02] CIA-65: node: Rename to regression test for GH-746 as the fd 0 behavior was not what the [01:02] CIA-65: node: bug report was about. - http://bit.ly/n2CNLZ [01:02] xerox: they also change often [01:02] xerox: ^ case in point [01:03] materialdesigner: I mean there's no 0.4.x windows executable AFAIK [01:03] nlsn: yeah it seems like all the 5.x versions are listed as unstable [01:03] xerox: on the plus side, the windows compatibility layer is very much the focus of 0.5 as I am led to believe [01:03] konobi: yup... win32 support will be unstable until 0.6 [01:04] navaru has left the channel [01:04] xerox: instead of building it you can sit back and watch the nodeconf appearance of ryan : ) [01:04] xerox: which will explain in painful detail some of the problems they are encountering and solving [01:05] nlsn: xerox: will do :D.. just really anxious to start playing with nodejs.. guess sadfaces to me for using windows as a developer in the first place :( [01:05] DrLou has joined the channel [01:05] xerox: it will cheer you up [01:06] xerox: if nothing else ( : [01:06] konobi: nlsn: vmware player is free [01:06] konobi: =0) [01:06] xerox: ACTION pokes konobi's nose [01:06] CIA-65: node: 03Ryan Dahl 07master * r3ce4adf 10/ test/common.js : Remove unnecessary line - http://bit.ly/nF3tQn [01:06] materialdesigner: or just play with an unstable 0.5.x version [01:06] monokrome has joined the channel [01:06] nlsn: konobi: i've used vmware for this kind of thing before, but ideally everything would be in windows.. will try that though, thanks! [01:07] konobi: the api shouldn't be that different between them, so to some extent you should be able to pick it up from a vm and plant it down on windows [01:07] Roocyy has joined the channel [01:09] jbrokc has joined the channel [01:10] cafesofie has joined the channel [01:11] EyePulp has joined the channel [01:11] lukegalea_ has joined the channel [01:13] willwhite has joined the channel [01:14] iammerrick has joined the channel [01:15] ekryski1 has joined the channel [01:16] mtsl has joined the channel [01:17] abraxas has joined the channel [01:18] mtsl: hello, I am using node 0.5.3 and I'd like to set a custom user agent when using http.request(). Therefore, I included {'user-agent': 'myuseragent} in the options. When I try to fetch www.whatismyuseragent.com , I nevertheless get the right one. What am I doing wrong? [01:18] Swimming_bird has joined the channel [01:18] mjor has joined the channel [01:18] ryah: mtsl: { headers: { 'user-agent': 'myuseragent' } } [01:19] mtsl: thank you very much [01:20] mtsl: now it works for me. thank you. [01:21] mike5w3c_ has joined the channel [01:21] mjor: Could anyone point me in the right direction when it comes to embedding Node.js in a C++ application? [01:22] mike5w3c__ has joined the channel [01:22] jesusabdullah: mjor: I'd look into embedding v8 into a c++ application first [01:22] jesusabdullah: then see if you can extend that to have the node.js-specific features you desire [01:23] mjor: Sound advice. I'll have a look into that, thanks! [01:24] langworthy has joined the channel [01:25] luke`_ has joined the channel [01:25] Drakonite has joined the channel [01:25] jesusabdullah: \o/ [01:25] jesusabdullah: You see that I gave sound advice you guys [01:25] ParadoxQuine has joined the channel [01:29] jacobolus has joined the channel [01:29] Emmanuel__ has joined the channel [01:30] JumpMast3r has joined the channel [01:31] e6nian has joined the channel [01:32] JCP|2 has joined the channel [01:33] matomesc has joined the channel [01:35] airportyh has joined the channel [01:39] fattytuna has joined the channel [01:39] dexter_e has joined the channel [01:40] eee_c has joined the channel [01:41] tim_smart: I'll be waiting in Wellington NZ [01:41] tim_smart: Wrong channel :/ [01:41] jakehow has joined the channel [01:43] Nuck has joined the channel [01:44] JCP|2: lol [01:46] langworthy has joined the channel [01:46] Anton_ has joined the channel [01:46] TheJH: completely OT, but guess what's the current "sports: Movers and Shakers" bestseller on uk amazon? http://www.amazon.co.uk/gp/movers-and-shakers/sports/ref=zg_bs_tab [01:47] murugaratham has joined the channel [01:47] JoshC1 has joined the channel [01:47] gazumps has joined the channel [01:48] techwraith has joined the channel [01:48] hydrozen has joined the channel [01:49] hydrozen: what does require(".."); do ? [01:49] monokrome has joined the channel [01:49] TheJH: hydrozen, require the index.js of the parent directory, I think [01:50] hydrozen: TheJH: ah [01:50] hydrozen: TheJH: thank you [01:51] JCP|2 has left the channel [01:52] progme` has joined the channel [01:53] tk has joined the channel [01:53] d0k has joined the channel [01:53] dominictarr has joined the channel [01:55] dreamdust has joined the channel [01:56] rfay has joined the channel [01:56] tbranyen: urgh to use with or not to use with [01:56] tbranyen: http://pastie.org/2348099 [01:58] apanda has joined the channel [01:59] addisonj_ has joined the channel [01:59] mike5w3c_ has joined the channel [02:00] TheJH: tbranyen, this.template.engine.template = this.template.contents; is much more readable, I think [02:00] tbranyen: is it? [02:00] tbranyen: kind of verbose :-/ [02:01] TheJH: tbranyen, look at how verbose your code is [02:01] addisonj_: hrm, if you had 10 minutes to do an intro demo of node, what would you show off? [02:01] tbranyen: but i mean with `with` its not verbose at all [02:01] tbranyen: i just don't know man, its been touted as evil [02:02] Nuck: I want moar Node podcasts [02:02] Nuck: Anything more than NodeUp and CurlyBraceCast and YayQuery that I should start watching? [02:02] monokrome has joined the channel [02:02] TheJH: `with (this.template) engine.template = contents;` vs [02:02] gbot2: (CONSIDERED HARMFUL: http://xrl.us/bh6eo) Extends the scope chain for a statement. (http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Statements:with) [02:02] TheJH: `this.template.engine.template = this.template.contents;` [02:03] TheJH: tbranyen, 5 more characters or so [02:03] Nuck: Rule Number One of JavaScript: never use with () [02:03] TheJH: tbranyen, not worth the unclearness "with" creates [02:04] Swimming_bird has joined the channel [02:04] TheJH: Nuck, why? [02:04] Nuck: As nice as with could be, it causes too much unclearness [02:04] willwhite has joined the channel [02:04] Nuck: It was one of the few design flaws inherent in JS. [02:05] arthurdebert has joined the channel [02:05] tbranyen: I don't understand how its unclear? [02:05] Nuck: TheJH: It clouds meanings and gives me headaches. [02:05] TheJH: Nuck, I thought that you were specifically aganist using it with parens or so, I do realize the unclearness it introduces in general [02:05] Nuck: Oh lol [02:05] Nexxy: I don't understand why you're setting so many variables [02:06] Nuck: tbranyen: If you want an in-depth explanation, ask Douglas Crockford. [02:06] TheJH: Nexxy, me too [02:06] Nexxy: I'm with TheJH [02:06] Nexxy: this.template.engine.template = this.template.contents [02:06] jbrokc has joined the channel [02:06] tbranyen: Nuck: his explanation is speed and clarity [02:06] tbranyen: of which the first is not an issue and the second i disagree with [02:06] Nuck: tbranyen: Google Style Guide also gives an explanation. [02:06] tbranyen: do you have a link? [02:06] Nexxy: oh [02:06] Nuck: yeah hold on [02:06] Nexxy: my god [02:06] tbranyen: i'm just curious if theres a real reason [02:07] TheJH: tbranyen, `with (person) age = 5;` leaks in the global scope if person doesn't have an age for whatever reason [02:07] Nuck: tbranyen: My understanding is that it clouds meanings by causing different things to behave oddly in the area [02:07] astropirate has joined the channel [02:07] fr0stbyte has joined the channel [02:07] Nuck: What TheJH said. [02:08] Nuck: That's the best explanation I've seen, in fact. [02:08] TheJH: :) [02:08] mosen has joined the channel [02:08] tbranyen: so that case is non-existent [02:08] tbranyen: thats a hypothetical [02:08] tbranyen: that can apply to a number of things [02:09] TheJH: although it doesn't apply for what tbranyen did, he doesn't assign to simple names in his with-block [02:09] joeytwiddle has joined the channel [02:09] Knife has joined the channel [02:10] brianseeders has joined the channel [02:10] TheJH: aww, I've got to go to bed, it's 04:10 here [02:11] Nexxy: nanight! [02:11] Nuck: TheJH: pussy [02:11] Nexxy: Nuck, dear god get a grip [02:11] Nuck: :P [02:11] Nuck: REAL men don't sleep! [02:12] heavysixer has joined the channel [02:12] Nexxy: you seem to be making the argument that the only real men are those with fatal familial insomnia [02:12] Nuck: Nexxy: Yush. [02:13] Nexxy: I'm sorry I can't quite understand you with all those balls in your mouth [02:13] sechrist: o snap [02:13] Nuck: ... [02:13] Lorentz: Sleep is fine. What you should be doing though, and code while sleeping. [02:13] Nuck: I'm not you. [02:13] Nexxy: that's true, practice makes perfect. [02:13] sechrist: jesus [02:13] mynyml has joined the channel [02:13] Nexxy: just keep at it, you'll get it eventually [02:13] yuroyoro has joined the channel [02:14] sechrist: somebody hasn't been laid in awhile [02:14] Nuck: jesusechrist? [02:14] astropirate: where do i learn to code? i want to be like the hackers in lie free or die hard [02:14] Nexxy: sechrist, he's only 17! [02:14] Nuck: sechrist: Who? [02:14] Nexxy: lol [02:14] Nuck: Me? [02:14] sechrist: ACTION laughs [02:14] Nuck: I'm not grumpy [02:14] Nuck: I'm just sick. [02:14] sechrist: triumph of the ill [02:14] Nexxy: sickening* [02:14] Nuck: And Nexxy's making fun of me, as always. [02:15] blup: materialdesig: ping [02:15] Nexxy: I'm not making fun of you@ [02:15] sechrist: I'm reading about fatal familial insomnia [02:15] Nuck: Nexxy: You just called me sickening. Totally not making fun of me. [02:15] Nuck: Right. [02:15] sechrist: wasn't aware of this [02:15] Nuck: I'm just nocturnal [02:15] Me1000 has joined the channel [02:16] Nuck: I'm not a morning person [02:16] Nexxy: sechrist, http://bit.ly/r5Om4y [02:16] sechrist: I am too, and people try to wish sunlight upon me [02:16] sechrist: and they just get less productivity [02:16] Nuck: sechrist: lol yup [02:16] Borgoluzzuo: If I have something like "client.on('blah', function(){})" is there a way to call that event 'manually'? [02:16] Nuck: My family tells me I need to wake up normal time. [02:16] Nuck: I shrug it off. [02:16] sechrist: my circadian doesn't agree with 9-5ers [02:16] sechrist: oh well if you're still in school you have to [02:16] sechrist: I'm a 'grown man' and I still fight it [02:17] Nexxy: don't fight it [02:17] Nuck: sechrist: I don't have school [02:17] blup: anybody experienced with oauth? [02:17] Nuck: I'll be 18 in 2 months [02:17] Nuck: I'm graduated [02:17] Nuck: Like, 3 months ago [02:17] Nexxy: like a cylinder? [02:17] sechrist: heh, I'm only 19 [02:17] Nuck: Yup, graduated like a cylinder. [02:17] neoesque has joined the channel [02:17] Nexxy: sechrist, and yet you just claimed to be a 'grown man'! [02:17] sechrist: I live 100% independent [02:17] Nuck: Nexxy: More a grown man than you. [02:17] sechrist: so yeah, fuck you [02:18] pquerna: indexzero: hey, on node-cloudfiles [02:18] Nuck: I [02:18] Nuck: Gay fuck [02:18] Nexxy: Nuck, don't you remember? I'm 99.99999% man [02:18] indexzero: pquerna: hey [02:18] Nuck: ... [02:18] Nuck: gah [02:18] Nuck: Not gay [02:18] Nuck: Nexxy: Yes, but did I say grown? [02:18] Nexxy: porhaha [02:18] indexzero: Can someone ban Nuck please? [02:18] Nuck: And you're missing a few nines. [02:18] arthurdebert has left the channel [02:18] arthurdebert has joined the channel [02:18] Nexxy: indexzero, that would be way too easy [02:18] sechrist: indexzero++ [02:18] v8bot_: sechrist has given a beer to indexzero. indexzero now has 1 beers. [02:18] jesusabdullah: Nuck: are you being a dipshit? [02:18] Nexxy: when isn't he? [02:18] Nexxy: lol [02:19] jesusabdullah: Sometimes :( [02:19] Nuck: jesusabdullah: Apparently according to these fine folks. [02:19] Nexxy: jesusabdullah, I've yet to witness it [02:19] jesusabdullah: Well then! [02:19] Nuck: I just keep typoing :( [02:19] jesusabdullah: I think you know better Nuck [02:19] pquerna: indexzero: can i just get an eventemitter with data chunks? [02:19] sechrist: I have to typo pretty hard to type gay fuck instead of what I meant to type :) [02:19] tjholowaychuk has joined the channel [02:19] Nuck: It's one letter off, sechrist [02:19] blup: guys, calm down [02:19] Nuck: H is right below Y [02:19] iammerrick has joined the channel [02:20] sechrist: ahh.. nice alibi [02:20] tbranyen: http://pastie.org/2348099 [02:20] MarkMenard has joined the channel [02:20] tbranyen: i like the "solution" [02:20] Nuck: I will admit, though. I don't know how the fuck I typoed that either. [02:20] sechrist: tbranyen: the solution! is a syntax error [02:20] Nuck: sechrist: As much as I love San Francisco, it isn't for that reason ;) [02:21] tbranyen: how so sechrist ? [02:21] sechrist: but yeah what was the problem you were fighting? [02:21] sechrist: I meant the literal text :P [02:21] reid has joined the channel [02:21] tbranyen: i was just messing with `with` and wasn't sure if it made sense in that function [02:21] tbranyen: which it turns out it didn't [02:21] Nuck: Oi vey [02:22] Nuck: I want to code [02:22] Nuck: But I can't think straight because my mind is clouded with sick :S [02:23] sechrist: Sometimes I like to think at a 90º angle instead of straight. [02:23] Nuck: sechrist: I'm a fan of a 45° angle personally [02:23] Nexxy: I can't do anything straight [02:23] Nuck: Kinky? [02:24] CIA-65: node: 03Ryan Dahl 07gyp * r501b0b9 10/ Makefile : Add fixed tests to test-uv (+19 more commits...) - http://bit.ly/ow1G5v [02:24] CIA-65: node: 03Bert Belder 07master * r764dfbb 10/ src/node_file.cc : Open files in binary mode, on msvc too - http://bit.ly/pDm42d [02:25] emmanuel has joined the channel [02:25] sechrist has left the channel [02:26] dominictarr has joined the channel [02:26] addisonj_: anyone know of an example using socket.io to upload a file? [02:27] e6nian: addisonj_: you can join #socket.io [02:28] eventualbuddha has joined the channel [02:29] jj0hns0n has joined the channel [02:31] CIA-65: node: 03Bert Belder 07master * r27ef0b0 10/ (test/simple/test-sync-fileread.js test/fixtures/x.bin): Make test-sync-fileread pass even when git cr/lf conversion is enabled - http://bit.ly/qmFm8f [02:34] androoid has joined the channel [02:34] xandrews has joined the channel [02:34] androoid has joined the channel [02:38] sebastianedwards has joined the channel [02:42] mendel_ has joined the channel [02:44] seivan has joined the channel [02:44] srid has joined the channel [02:45] fitzgen has joined the channel [02:45] jtsnow has joined the channel [02:46] fitzgen has left the channel [02:50] matomesc has joined the channel [02:51] matomesc_ has joined the channel [02:52] jtsnow has joined the channel [02:52] StepanKuzmin has joined the channel [02:53] JakeyChan has joined the channel [02:53] seivan has joined the channel [02:55] dx_ has joined the channel [02:56] matomesc has joined the channel [02:56] Borgoluzzuo: Does anyone know how to just fire an Event? [02:57] rickharrison has joined the channel [02:58] broofa has joined the channel [02:58] emmanuel: Borgoluzzuo: emitter.emit ? [02:59] Borgoluzzuo: emmanuel: Within the same context though -- not server to client. So for example if i have a listener for "blah" on the server, how to trigger that event server-side. [02:59] mrryanjohnston: Borgoluzzuo: var eventEmitter = new events.EventEmitter(); eventEmitter.emit('commit', req.body); [03:00] mrryanjohnston: eventEmitter.on('commit', function(data) { foo(); }); [03:00] Borgoluzzuo: mrryanjohnston: Doesn't emit have it fire off to all sockets connected to the server? [03:01] Borgoluzzuo: Sorry, I know I'm articulating this well -- I'm quite new with node. [03:01] Borgoluzzuo: I'm not* [03:01] emmanuel: Borgoluzzuo: it will fire it, and all the listener connected to it will trigger [03:01] dipser has joined the channel [03:02] emmanuel: s/connected to/listening [03:03] yhahn has joined the channel [03:03] PawnStar has joined the channel [03:03] clifton has joined the channel [03:04] Borgoluzzuo: https://gist.github.com/2581073638ee566099ca [03:04] Borgoluzzuo: so that should work? [03:04] PawnStar: hi all. i'm trying to write a server that sends custom headers, but i'm stuck. the problem is that only morons use Node.js, and i'm not a moron. can anyone help? [03:05] bnoordhuis: PawnStar: trolling? [03:05] PawnStar: huh? [03:05] Nexxy: lol [03:05] Nexxy: I think he means mormon [03:05] tjholowaychuk: only mormons use node? [03:05] xerox: wow [03:06] tim_smart has joined the channel [03:07] mdz has joined the channel [03:07] Borgoluzzuo: So yeah, that didn't work -- I think the emit is going out to the *clients* but I need it to just fire the server event. [03:07] PawnStar: can anyone help [03:08] Nexxy: PawnStar, what kind of header are you trying to write? [03:09] emmanuel: Borgoluzzuo: what are you trying to do ? [03:09] PawnStar: am i qualified to use Node.js [03:09] eliziario has joined the channel [03:09] hexium has joined the channel [03:10] Borgoluzzuo: So I'm using socket.io to listen for a whole bunch of different events. And in some instances and I want to call those events server-side -- which I cannot figure out what to do. [03:10] Nexxy: PawnStar, you may not be enough of a moron to be honest [03:10] Nexxy: PawnStar, are you trying to write http headers? [03:10] emmanuel: how about socket.on('YourEvent', function(){ spmeEvent.emit('plop [03:10] emmanuel: fuck [03:11] emmanuel: how about socket.on('YourEvent', function(){ someEvent.emit('plop') }); [03:11] Borgoluzzuo: Let me write out a gist of what I'm trying to do. [03:11] Borgoluzzuo: might make more sense [03:11] PawnStar: wait, MORMONS [03:11] PawnStar: only MORMONS [03:12] Nexxy: PawnStar, that's what I thought :) [03:13] Borgoluzzuo: https://gist.github.com/2581073638ee566099ca [03:13] navaru has joined the channel [03:13] hij1nx has joined the channel [03:14] Borgoluzzuo: Any ideas? [03:14] Borgoluzzuo: Besides becoming a mormon? [03:15] djbell has joined the channel [03:16] emmanuel: Borgoluzzuo: did you try socket.emit('bye') ? [03:16] tjholowaychuk: Borgoluzzuo it's the only way [03:16] mrryanjohnston: emmanuel: that'll send it to the client. [03:16] djbell: is there anything I have to require to get process.on('SIGTERM',...) to trigger when I hit control-C ? [03:16] djbell: tried googling for it, no luck [03:17] Borgoluzzuo: Blast -- so I'd have to send to the client -- which would then send back to the server? That seems so unnecessary. [03:17] mrryanjohnston: djbell: isn't that shell specific [03:17] tjholowaychuk: djbell sigint [03:17] djbell: k, thanks [03:17] mrryanjohnston: ^ [03:17] mrryanjohnston: woops [03:17] mrryanjohnston: i'll be quiet now [03:18] some1else has joined the channel [03:18] fmeyer has joined the channel [03:18] jellosea has joined the channel [03:18] jellosea: why am i getting this error? CALL_NON_FUNCTION_AS_CONSTRUCTOR [03:19] Nexxy: cuz you're trying to call something that's not a function... as a constructor ;o [03:19] jellosea: well clearly thats not really the case [03:19] Nexxy: chances are somethign is not what you think it is [03:19] emmanuel: Borgoluzzuo: I'm not sure I understand what you want to do , but it looks like a misuse of events [03:19] Nexxy: jellosea, my first question is; are you using coffeescript? [03:20] jellosea: Nexxy: no [03:20] Borgoluzzuo: emmanuel: I have multiple node processes and want to trigger events which come in through a pub/sub over redis. So for example, node process 1 receives a command, then pushes it over redis to its buddies, and its buddies can act on it as well. [03:20] PawnStar has left the channel [03:20] Nexxy: some context would make it a lot easier to help [03:22] jellosea: well the constructor im triyng to call has a constructor in the file, has module.exports = ClassName ; at the bottom [03:22] jellosea: like what are the other reasons that error msg is outputted other than the oe its stating [03:23] emmanuel: so you have sockets between your node processes ? [03:23] Nexxy: I've only encountered that error once myself [03:23] Nexxy: and it was approriate [03:24] Borgoluzzuo: emmanuel: Yup -- different processes have different sockets. [03:24] Borgoluzzuo: emmanuel: And the processes communicate over redis. [03:25] dominictarr has joined the channel [03:25] emmanuel: but it's a different socket for talking with redis than with the client [03:25] Borgoluzzuo: emmanuel: Correct. [03:25] emmanuel: basically, you want to emit/write 'bye' to redis, and have redis emit/write [03:25] emmanuel: 'bye' to all other instances [03:26] Borgoluzzuo: yes! [03:26] odie5533: I need to walk a directory. [03:26] emmanuel: then your snippet seems alright, just emit 'bye' to the proper socket [03:27] Borgoluzzuo: emmanuel: The processes aren't connected via sockets though -- merely over redis. [03:27] seivan has joined the channel [03:28] Borgoluzzuo: I feel like this should be way more trivial than it actually is. Like, all I want to do is call a function -- is it really that difficult to do? [03:29] emmanuel: everybody is connected to redis, right ? [03:29] odie5533: not me [03:29] emmanuel: you want one to talk to redis, and redis to broadcast to everybody [03:29] Borgoluzzuo: emmanuel: Right. [03:30] emmanuel: then I assume you need sockets between all nodes and the redis [03:30] Nexxy: as long as your other nodes are subscribed, it shouldn't be an issue [03:30] Borgoluzzuo: They are subscribed [03:30] Borgoluzzuo: so I have them subscribed and listening for data [03:30] Nexxy: ACTION scrolls up [03:30] Borgoluzzuo: and i want to take that data [03:31] Borgoluzzuo: and have it fire an event, so a listener can do its thing [03:31] Borgoluzzuo: but calling an event server-side is apparently impossible? [03:31] navaru has left the channel [03:31] Nexxy: not with something like nowjs [03:31] Nexxy: http://nowjs.com/ [03:31] navaru has joined the channel [03:32] Nexxy: that'd be the simplest way to do that IMHO [03:32] Nexxy: or you can always dig into the source and see how it works ;3 [03:32] navaru has left the channel [03:32] eee_c has joined the channel [03:32] Borgoluzzuo: hm, thanks -- appreciated. I really think this should be some trivial one-liner. [03:33] Nexxy: yeah there wouldn't be much to write after you 'npm install now' [03:33] Borgoluzzuo: I don't believe that, but let me read up on it. [03:33] Nexxy: lol k [03:34] Nexxy: it seems quite trivial to me but maybe I'm misunderstanding something [03:34] Borgoluzzuo: It *can't* be this difficult to just fire an event. [03:34] Borgoluzzuo: How is there not something like Event.fire(method, data) [03:35] Borgoluzzuo: like, I'm doing the equivalent of $('#element').click() in jquery [03:35] Borgoluzzuo: or at least trying to. [03:36] elijah has joined the channel [03:38] lupomontero has joined the channel [03:45] jhurliman has joined the channel [03:45] loveshine has joined the channel [03:51] dlp has joined the channel [03:53] dlp has left the channel [03:53] astropirate: How do people here deal with having parts of the application written with a HTTPS server and the other parts with a HTTP server? authentication for example would be https and the rest http [03:54] Nexxy: I don't :| [03:54] davidbanham has joined the channel [03:54] Nexxy: what's the point of authentication if everything is sent in plaintext anyway? [03:54] astropirate: you password is safe :) [03:55] Nexxy: ok but what point is the password [03:55] Nexxy: lol [03:55] Nexxy: everything is still transmitted in the open [03:55] Nexxy: O_o [03:55] astropirate: so is facebook [03:55] astropirate: you want to log into anyones account? [03:55] astropirate: are you trolling? [03:55] astropirate: lol [03:55] Nexxy: not at all [03:56] Nexxy: also ftr facebook has an ssl option [03:56] astropirate: true [03:56] astropirate: but thats besides the point [03:57] Nexxy: I mean I can understand if you're transferring static resources w/o ssl [03:57] Nexxy: but anything that's supposed to be private? [03:57] astropirate: not so much as private but personalized [03:57] Nexxy: then why not just use a cookie [03:57] Nexxy: and save your users the pain of having yet another username/password to remember [03:58] astropirate: it was an example [03:58] Nexxy: or better yet use oath! [03:58] boehm has joined the channel [03:58] astropirate: and cookies get deleted [03:58] Nexxy: so do the "save this password" data files [03:58] Nexxy: lol [03:58] astropirate: thats fine [03:58] astropirate: as long as they can authenticate against the server [03:58] losing has joined the channel [04:00] tmzt: oauth just requires another provider to protect your password [04:00] fattytuna has joined the channel [04:00] astropirate: i know what oauth is :) [04:00] Nexxy: one that knows better than to rely entirely on EC2 [04:00] Nexxy: ;P [04:01] astropirate: so yah back to my question [04:01] Nexxy: all I can say is "don't" ;d [04:01] Nexxy: good luck though ;P [04:01] tmzt: bcrypt in javascript? [04:02] raidfive has joined the channel [04:02] tmzt: or better, pki in js [04:02] jacobolus has joined the channel [04:02] astropirate: no need node comes with TSL capabilities [04:02] astropirate: *TLS [04:02] tmzt: client side :) [04:03] Nexxy: ROT13 is good enough [04:03] astropirate: browser have had that feature for more than a decade :p [04:03] Nexxy: or I mean if you're super concerned with security you could always use ROT26 [04:03] Nexxy: twice as secure! [04:04] astropirate: i'm not REALLY concerned about security [04:04] astropirate: i just dont' want to authenticate over plain text [04:04] odie5533: Is there a good method or module to walk a directory tree? [04:04] mikeal has joined the channel [04:04] slickplaid: i usually double ROT13 my passwords [04:05] Nexxy: slickplaid, good call [04:05] davidbanham has joined the channel [04:05] Nexxy: nothing moar secure than a salted double rot13 [04:05] tmzt: odie5533: there was one recently discussied in here [04:05] astropirate: i really should learn more about encryption [04:05] ekryski has joined the channel [04:05] tmzt: check the logs that used to be in the topic [04:06] jtsnow has joined the channel [04:08] skampler has joined the channel [04:08] madhums has joined the channel [04:08] eliziario has joined the channel [04:09] skampler has left the channel [04:09] madhums has left the channel [04:16] yhahn has left the channel [04:16] bazookatooth has joined the channel [04:17] mrryanjohnston: i'm having issues with mongoose/possible mongodb. I have a model with { count: {type: [Number], default: 0} }; The type is an array because I'm using mongoose-auth and that's the only way it'll work for now; I only store a single number and would otherwise do type: Number. Anywho, I do something like `instance.wins[0]++; instance.save(function(err) { });`, but this increment is not actually saved [04:17] mrryanjohnston: in mongodb. Anyone else able to replicate this/experience similar troubles? [04:17] ritch has joined the channel [04:17] ritch has left the channel [04:18] tmzt: use an update and $inc [04:18] tmzt: it's atomic [04:18] amiller has joined the channel [04:18] tmzt: but you have to bypass mongoose to do it, use Model.collection [04:19] bazookatooth: one thing i loved about mongodb was the query syntax [04:19] bazookatooth: why was that changed in mongoose? [04:19] mrryanjohnston: tmzt: I see. why can't I do what I am trying now? other than it just doesn't work :p [04:19] bazookatooth: i'm a newb to all of these things, LAMP developer that's just learning and is quite interested in trying something [04:19] sub_pop has joined the channel [04:20] tmzt: mrryanjohnston: oh you probably can [04:20] tmzt: the other thing you are probably running into is subdocuemtns [04:20] tbranyen: bazookatooth: then use mongo-db-native or w/e that module is called [04:21] tmzt: if you use mongoose it's already there [04:21] mrryanjohnston: tmzt: embedded docs you mean? [04:21] tmzt: yea, sorry [04:21] bazookatooth: but everyone seems to use mongoose, and i assumed there was a good reason for that [04:23] Nexxy: bazookatooth, mongoose is an ORM... so by nature it alters the syntax [04:23] mrryanjohnston: hmph. I wish I felt comfortable hacking away at mongoose-auth [04:24] arthurdebert has joined the channel [04:24] Swizec has joined the channel [04:24] odie5533: tmzt: can you recommend me a directory walking thing then? [04:24] tmzt: I can't remember what it's called [04:25] jesusabdullah: dictionary? [04:25] tim_smart has joined the channel [04:25] Nexxy: odie5533, have you looked at http://nodejs.org/docs/v0.4.10/api/fs.html#fs.readdir ? [04:25] jesusabdullah: in javascript we don't have dictionaries! [04:25] mscdex: re-add ir [04:26] tmzt: sounds right [04:26] tmzt: we we're talking about wrapping it in a jquery like syntax [04:26] Nexxy: oh boy. [04:26] SubStack: var dict = fs.readFileSync('/usr/share/dict/words').split('\n').reduce(function (acc, word) { acc[word] = true }, {}) [04:26] SubStack: ^ dictionary [04:26] SubStack: oh wait [04:26] Nexxy: lol [04:26] SubStack: var dict = fs.readFileSync('/usr/share/dict/words').split('\n').reduce(function (acc, word) { acc[word] = true; return acc }, {}) [04:26] SubStack: there we go [04:26] davidbanham has joined the channel [04:27] mscdex: SubStack: but they don't have that on windoze! [04:27] bazookatooth: ... [04:28] mrryanjohnston: ah, ok, it works as exp[ected if you specify a model's property as {type: String, default: 'foo'} or something of the like [04:28] mrryanjohnston: woof. such a pain in the behind :p [04:28] tmzt: SubStack: no lazy? [04:28] mrryanjohnston: thanks for the help guys [04:29] eee_c1 has joined the channel [04:29] mrryanjohnston: eh qwell [04:29] mrryanjohnston: I guess that wouldn't be a mongoose-auth problem [04:31] arthurdebert has joined the channel [04:32] piscisaureus has joined the channel [04:33] odie5533: Nexxy: I need to walk all subdirectories [04:33] newy has joined the channel [04:34] mosen: odie5533, Recently i looked at vows and theres a really nice example of a recursive anonymous function there [04:34] mosen: odie5533, in the cli util [04:34] mrryanjohnston: good night [04:35] ncamacho has joined the channel [04:35] jtsnow has joined the channel [04:36] metellus has joined the channel [04:39] small has joined the channel [04:39] small: is it bad to write to a writestream before the drain event has been emitted? [04:39] ncamacho has joined the channel [04:41] fraserkillip has joined the channel [04:42] djbell has joined the channel [04:42] davidbanham has joined the channel [04:42] rchavik has joined the channel [04:42] zeade has joined the channel [04:44] mscdex: small: it'll just push it into user memory [04:45] mscdex: small: if you write to it before 'drain' is emitted when write() is returning false [04:45] andrewfff has joined the channel [04:45] avalanche123 has joined the channel [04:45] small: mscdex: ok i was just making sure that it was just a memory concer. if i'm using to write to a stream that i periodically end, then i think it should be fine. [04:47] small: though my real problem is that i can't seem to clear the queue ever and get drain to trigger an event [04:48] Borgoluzzuo has joined the channel [04:50] apanda has joined the channel [04:50] davidascher has joined the channel [04:51] sivy has joined the channel [04:54] loob2 has joined the channel [04:54] SamuraiJack has joined the channel [04:55] hij1nx has joined the channel [04:55] copongcopong has joined the channel [04:58] avalanche123 has joined the channel [05:00] simb has joined the channel [05:01] simb: is there a channel for socket.io questions or is here good enough. [05:04] zilch has joined the channel [05:04] neilk_ has joined the channel [05:04] neilk_ has joined the channel [05:07] m0s has joined the channel [05:08] astropirate: I think i have perfected the optimal setup for Node Development!!!! :D I shall make a video [05:08] astropirate: on linux [05:09] radiodario has joined the channel [05:11] confoocious has joined the channel [05:11] c4milo1 has joined the channel [05:12] Me1000 has joined the channel [05:12] ronnieboy has joined the channel [05:12] Destos has joined the channel [05:12] te-brian has joined the channel [05:14] dominictarr: astropirate: you have install scripts etc? [05:14] markdaws has joined the channel [05:14] astropirate: a combination of applications and settings actually [05:14] astropirate: my video will explain all [05:17] temp01 has joined the channel [05:17] ronnieboy has joined the channel [05:17] mikeal has joined the channel [05:19] Spion_ has joined the channel [05:23] dguttman has joined the channel [05:23] abraxas: astropirate: how long did it take you to get that far? :) [05:24] meandi has joined the channel [05:24] sivy has joined the channel [05:27] davidascher has joined the channel [05:27] astropirate: abraxas, ver very long actually [05:27] odie5533: How do I perform a function on each element in an array? Or can I loop over an array somehow? [05:27] astropirate: odie5533, array.forEach(function(element) { dos tuff here }); [05:28] odie5533: did Node.JS add that? [05:28] astropirate: abraxas, i is all just trial and error [05:28] astropirate: odie5533, no its standard javascript works on browsers too [05:28] zaller has joined the channel [05:28] Me1000 has joined the channel [05:29] seivan has joined the channel [05:29] eirikb has left the channel [05:30] m0s has joined the channel [05:30] emmanuel has joined the channel [05:30] odie5533: astropirate: is there a way to loop over them as well? [05:31] davidascher has joined the channel [05:31] odie5533: does like for (element in list) {} work? [05:33] ghost has joined the channel [05:34] Nuck: odie5533: for in is for Objects only, because it goes over the prototype chain too IIRC [05:34] nobody1 has joined the channel [05:35] nobody1: i receive an error while trying to compile node v0.5.3 , /usr/bin/ld cannot find -lares .. [05:36] ironlad has joined the channel [05:38] fraserkillip has joined the channel [05:38] fletchowns: i'm trying to do a async.concat(keys, client.hgetall, renderResults); but i'm getting: TypeError: Object # has no method 'send_command' [05:39] fletchowns: client is my redis connection [05:39] ronnieboy has joined the channel [05:39] Kopion has joined the channel [05:39] ryan0x2 has joined the channel [05:40] vid__ has joined the channel [05:41] liquidproof has joined the channel [05:42] aspect has joined the channel [05:42] Kopion has joined the channel [05:43] Me1000 has joined the channel [05:43] ditesh|cassini has joined the channel [05:45] astropirate has joined the channel [05:46] m0s_ has joined the channel [05:46] sfoster has joined the channel [05:47] dsirijus has joined the channel [05:49] abraxas: astropirate: I'd love to see your video, when it's ready :) [05:49] davidbanham: I can't figure out why Jade is rendering this the way it is. Can anyone shed some light? https://gist.github.com/1136212 [05:49] murugaratham has joined the channel [05:50] Borgoluzzuo: Does anyone know if fireEvent is available as a method in node? [05:51] Ginlock has joined the channel [05:53] apanda has joined the channel [05:54] davidbanham: Borgoluzzuo: Not that I'm aware of. Is emit what you're after? http://nodejs.org/docs/v0.4.10/api/events.html#emitter.emit [05:54] k1ttty has joined the channel [05:54] bazookatooth has joined the channel [05:54] ronniebo_ has joined the channel [05:55] Borgoluzzuo: davidbanham: Sadly, no =( -- I asked this question a bit earlier. This is essentially what I'm trying to do: https://gist.github.com/2581073638ee566099ca [05:55] garrensmith: davidbanham: It might be that your spacing is wrong. Is there anything before the p? [05:55] Borgoluzzuo: It is seemingly impossible without "proxying" through the client -- which I want to avoid. [05:56] Borgoluzzuo: I thought i could do socket.fireEvent("bye") -- but sadly, negative. [05:56] garrensmith: Borgoluzzuo: you going to have to wrap that up in another class with its own events that you can fire... [05:56] davidbanham: garrensmith: There is, but I think my spacing is okay. This is the whole fragment - https://gist.github.com/1136219 [05:57] garrensmith: else you need to seperate the function that gets called on bye and call it on 'hi' [05:57] Borgoluzzuo: garrensmith: I'm using socket.io -- I believe it is part of the socker_server class, no? Are you aware of how to accomplish this in the context of socket.io -- if at all? [05:57] garrensmith: Borgoluzzuo: no [05:57] xat- has joined the channel [05:58] Borgoluzzuo: garrensmith: However, any class I wrap them in has the fireEvent method available? [05:58] bazookatooth has joined the channel [05:59] stephank has joined the channel [05:59] Me1000 has joined the channel [06:00] ronnieboy has joined the channel [06:01] garrensmith: Borgoluzzuo: what happens if you do socket.emit('bye') [06:01] Borgoluzzuo: garrensmith: It emits it to the client sockets -- not to the server. [06:03] garrensmith: Borgoluzzuo: a quick hack but would work depending on what you want to do https://gist.github.com/15a80d9aded299ab2599#comments [06:04] Wizek has joined the channel [06:04] Borgoluzzuo: garrensmith: Yeah, that is sort of my last resort. I feel like that is a band-aid and not allowing me to truly abstract out logic as I'd like. [06:04] Borgoluzzuo: I was actually fairly surprised by this problem. I thought it would be somewhat trivial. [06:04] garrensmith: Borgoluzzuo: not really, you are reusing functions [06:04] astropirate: abraxas, aye aye moin capiton [06:05] garrensmith: Borgoluzzuo: if you read the socket.io code you would most likely find out where the server socket and be able to call it, but then you are depending on the internals [06:05] abraxas: By the way, how do you guys 'n girls (if at all) jslint your code? What package and what configuration do you use? I'm playing with nodelint now, but the config seems incomplete.. [06:05] Borgoluzzuo: garrensmith: Right, but for each potential function to call, I'd have to wrap it out into its own function. As it would occur once for each client coming in, and whenever events came in server side as well. [06:06] Borgoluzzuo: garrensmith: That's true. I was investigating the fireEvent method -- I'm just not familiar with js/node to know much about it -- it is available to any object upon instantiation? [06:06] ronniebo_ has joined the channel [06:06] garrensmith: Borgoluzzuo: I think it depends on your use case. I've never heard of the fireEvent what is it? [06:06] admc has joined the channel [06:07] davidbanham: abraxas: This seems to be more actively maintained. - https://github.com/jshint/node-jshint [06:07] Borgoluzzuo: garrensmith: I thought it was something js specific? http://www.java2s.com/Code/JavaScript/HTML/UsingthefireEventMethod.htm [06:07] curtischambers has joined the channel [06:07] Borgoluzzuo: "document.all(objID).fireEvent("onclick", newEvt)" [06:07] abraxas: davidbanham: thanks, i'll have a look [06:08] garrensmith: Borgoluzzuo: in nodejs its object.emit('exit'); [06:09] Borgoluzzuo: garrensmith: I'm searching through socket.io's code to check it out. See if there is anything I can pry to my own use. [06:09] odie5533: How do I keep node running? [06:09] Borgoluzzuo: garrensmith: Appreciate the help, btw. [06:09] odie5533: It seems to close before my callbacks are done. [06:09] garrensmith: Borgoluzzuo: I'm sure .emit is what you are looking for [06:09] garrensmith: Borgoluzzuo: no prob. Good lucj [06:10] garrensmith: *luck [06:10] Borgoluzzuo: garrensmith: The problem is that .emit emits to all *clients* [06:10] Borgoluzzuo: whereas I want it to just call the local function. [06:10] Borgoluzzuo: errr event [06:10] mosen: util.inherit replaces the whole prototype right? so do most people then augment the prototype by setting each property? [06:10] davidbanham: odie5533: It closes as soon as it doesn't have any more jobs to do. [06:10] garrensmith: Borgoluzzuo: you must create your own event [06:11] Borgoluzzuo: garrensmith: Hm, I'm unaware of how to do that -- I'll investigate. [06:11] m0s has joined the channel [06:12] fletchowns: is there a recommended version of redis to use with node_redis? [06:13] garrensmith: Borgoluzzuo: check this nice intro http://howtonode.org/demystifying-events-in-node [06:13] Borgoluzzuo: thanks. [06:13] cjm has joined the channel [06:14] Borgoluzzuo: yes, it seems .emit must be what I want. I just need to determine why its going to clients and not the server. [06:17] abraxas: davidbanham: When I look at jshint's configuration options... it just looks like a subset of jslint. How is it better? [06:17] mosen: abraxas, I think they just added stuff [06:18] davidbanham: abraxas: I don't actually use either of them, so I'm afraid I can't be of much help. It's just a package I remembered seeing and it seems to be under more active development than the jslint package. [06:18] abraxas: I'm looking for a way to enforce curly brace logic... thought jshint/lint could help there. [06:19] abraxas: I love all the other checks it does, but this one check seems to be missing.. a bit unfortunate. [06:20] davidbanham: odie5533: Ryan explains the behaviour here: http://www.youtube.com/watch?feature=player_embedded&v=jo_B4LTHi3I#at=597 [06:22] mosen: abraxas, Do you know of anything that reformats the code style? [06:22] abraxas: mosen: I don't, sorry [06:22] mosen: ok [06:22] luke` has joined the channel [06:22] davidbanham: mosen: You mean clean up whitespace, indenting etc? [06:23] mosen: davidbanham, yep [06:23] davidbanham: mosen: Vim does a pretty great job of that, for me. [06:24] mosen: davidbanham, I knew you were going to say vim or (insert IDE) :) [06:25] davidbanham: mosen: Haha. I don't want to be "that guy" but it does do a really good job! [06:26] Nuck: mosen: jsbeautifier.org [06:26] zackattack has joined the channel [06:26] Nuck: 'tis what I use [06:26] mosen: davidbanham, its cool.. I seem to have crazily inconsistent usage of single vs double quotes [06:26] Xano has joined the channel [06:26] Nuck: Find ", replace with ' [06:26] Nuck: problem solved :P [06:27] avalanche123 has joined the channel [06:27] mosen: haha [06:27] davidbanham: And hope like hell you haven't used any apostrophes in your log messages! [06:27] Nuck: davidbanham: Yup! [06:27] Nuck: I wonder [06:27] Nuck: Could UglifyJS be applied to beautification? [06:28] mosen: well it does parse into an AST [06:28] Nuck: exactly [06:28] mosen: Im sure someone could use that to output stuff [06:28] jacobolus has joined the channel [06:28] ghost has joined the channel [06:28] Nuck: That would be an interesting concept [06:29] m0s has joined the channel [06:29] Nuck: Uglify just has millions of applications :D [06:30] ronnieboy has joined the channel [06:32] ronnieboy has joined the channel [06:32] Nuck: davidbanham: Watching that video, loled at the organizer. [06:32] Nuck: "sfphp" [06:34] Nuck: "Windows is very important. Just like PHP." [06:34] Nuck: ACTION facepalms [06:35] jetienne has joined the channel [06:35] emmanuel: mosen: the worst is to switch from an azerty keyboard to a qwerty one [06:35] jetienne: hey just noticed this is chris lea ppa package in https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager instead of mine, any knows why ? any problem with mine ? [06:36] emmanuel: single quotes are so much easier to reach on a qwerty keyboard, while I always use double quote on azerty [06:36] emmanuel: jetienne: which distro / [06:37] emmanuel: ah, ubuntu [06:37] mosen: emmanuel, luckily I dont have an azerty :) [06:37] jetienne: ubuntu [06:37] EvRide1 has joined the channel [06:37] jetienne: emmanuel, apparently tompata did the change... [06:37] emmanuel: mosen: pretty usefull for accents and stuff [06:37] emmanuel: well, pretty usefull if you want to write in French [06:38] emmanuel: but I reckon qwerty is so much better when programming [06:39] m0s has joined the channel [06:40] jetienne: well apparently his node.js is better than mine [06:40] jetienne: he got multiple distro [06:40] jetienne: maybe time to retire mine [06:43] fletchowns: http://stackoverflow.com/questions/7006829/error-when-trying-to-use-async-concat-to-retrieve-data-from-redis any ideas? [06:47] random123: Is it best to use an Async library or just pass callbacks when indentation gets too far? [06:48] groom has joined the channel [06:48] jetienne: random123: ? [06:48] random123: jetienne: What do you find best? [06:48] random123: jetienne: I know its an opinion [06:48] jetienne: random123: what do you mean by async lib ? [06:49] random123: jetienne: Like Step, Seq, Async, etc. [06:49] jetienne: oh [06:49] Borgoluzzuo: garrensmith: I think I figured it out! [06:49] random123: Yes, that is my major issue with Node so far, I haven't figured out [06:49] jetienne: random123: personnaly i use libraries [06:49] garrensmith: Borgoluzzuo: cool [06:49] random123: jetienne: Which one? [06:49] garrensmith: Borgoluzzuo: what did you decide? [06:50] CoinOpeBoy has joined the channel [06:50] jetienne: random123: gowiththeflow.js 20line works in node and browser [06:50] Borgoluzzuo: garrensmith: the .emit method was overridden -- I found out that I needed to call $emit.apply('name', [args]) -- although this isn't working 100%, I think it is the right way [06:50] garrensmith: Borgoluzzuo: ok cool [06:51] random123: jetienne: I'd like to use that however don't really understand the code very much, there are only about 7 followers, what if there was a bug slowing Node performance I wonder and we didn't know? [06:51] random123: jetienne: Just a week ago someone found a bug in cao's Async lib which has like 800 followers [06:51] zackattack has joined the channel [06:51] Borgoluzzuo: garrensmith: https://github.com/LearnBoost/socket.io/blob/master/lib/namespace.js#L183 [06:51] random123: jetienne: It wasn't implimenting parellel correctly. [06:51] jetienne: random123: this is the point of the 20line :) it is small and obvious [06:52] random123: jetienne: But only 6 followers on github, where is everyone else? [06:52] ttpva has joined the channel [06:53] jetienne: random123: using async ? :) [06:54] garrensmith: Borgoluzzuo: you might be able to do socket.$emit.apply('bye', [stuff]); [06:54] random123: jetienne: Once problem is if you use an Async function, you will never return to that scope again right? So you must continue passing callbacks for the rest of the program? [06:54] jetienne: random123: out of curiosity, async lib is ok for browser ? [06:54] jetienne: random123: do you have an url on the async lib with 800 followers ? [06:54] Borgoluzzuo: garrensmith: That's essentially what I'm trying now, but it isn't quite working. I'm doing it on the .sockets namespace so: socket_server.sockets.$emit.apply('bye', ['1']); [06:55] Borgoluzzuo: It still isn't catching it... [06:55] random123: jetienne: I have seen it but it is quite ugly to be spreading all that across an entire program [06:55] garrensmith: Borgoluzzuo: if you do console.dir(socket_ser.sockets) do you see the $emit function? [06:55] Borgoluzzuo: let me check [06:55] fletchowns: jetienne: https://github.com/caolan/async [06:56] simenbrekken has joined the channel [06:56] Borgoluzzuo: garrensmith: No, I do not [06:56] garrensmith: Borgoluzzuo: ok and on socket_server? [06:57] Borgoluzzuo: garrensmith: However, If call the method incorrectly like "socket_server.sockets.$emit.apply('hey', '1');" -- it throws an error. [06:57] jetienne: random123: nice it is browser too [06:57] garrensmith: Borgoluzzuo: what error [06:57] Borgoluzzuo: TypeError: Function.prototype.apply: Arguments list has wrong type [06:57] Borgoluzzuo: Which tells me it knows that its calling that $emit function. [06:58] deadman87 has joined the channel [06:58] Borgoluzzuo: garrensmith: I do not see the $emit function on socket_server either. [06:59] jetienne: random123: clearly not the same scope as gowiththeflow.js tho. async.js is 600l gotwiththeflow.js is 20l [06:59] garrensmith: Borgoluzzuo: I dont think it knows its calling that it just doesn't like it. [06:59] jetienne: random123: async provide much more. some considere it good, some considere it bad. i am in the second group :) [07:00] Borgoluzzuo: garrensmith: Right, so I just had to put the second param in array form and it "works" in that it is not failing, but isn't actually being picked up by the listener. [07:00] garrensmith: Borgoluzzuo: I wrote this a while ago but it might help https://github.com/garrensmith/BuildMachine it uses socket-io for client communication and then its own events to talk to the server objects. Check server.js [07:01] jetienne: currently i just have trouble installing node on macos :( [07:01] jetienne: no clue how it has been installed... so how can i uninstall it ? [07:02] `3rdEden has joined the channel [07:03] meso_ has joined the channel [07:03] jetienne: ok i will stick to 0.4.8 for now :) [07:03] garrensmith: jetienne: is should be in user/local [07:03] jetienne: garrensmith: it is in /usr/bin/node and it is node 0.4.8 [07:03] mraleph has joined the channel [07:04] jetienne: garrensmith: i tryied to update via port install node. it does install 0.4.10 but doesnt uninstall 0.4.8 [07:04] jetienne: so i dunno :( [07:04] jetienne: and i am new to macos which doesnt help the matter [07:04] meandi2 has joined the channel [07:04] garrensmith: jetienne: Yeah I'm not so good with that stuff either [07:04] Borgoluzzuo: garrensmith: I'm currently trying to build a system that connects multiple node processes together over redis. So when one event occurs on one process, it shoots the event/data over redis to the other processes to run on their own sockets as well. Thus, I just have a pub/sub on each node process waiting to execute the commands with the proper data. All that doesn't work is this dang emit stuff. [07:05] tmzt: Borgoluzzuo: try EventEmitter2 or adapt it to your purposes [07:06] djcoin has joined the channel [07:06] Borgoluzzuo: tmzt: Is that contained within socket.io? [07:06] tmzt: no I believe it's it's own project [07:06] jetienne: nmod works on macos! delighted :) [07:07] pen has joined the channel [07:07] jetienne: brew node install node where ? [07:07] davidascher has joined the channel [07:07] topaxi has joined the channel [07:08] m0s has joined the channel [07:08] Borgoluzzuo: tmzt: I believe this may be beyond my scope of understanding node, sadly. [07:08] tmzt: it's more of a javascript thing [07:09] tmzt: you want to have events that work like normal eventemitters but over redis? [07:09] Nuck: That was beautiful [07:09] Nuck: The audience trying to hack Ryan's server [07:09] Borgoluzzuo: tmzt: More or less. [07:09] Borgoluzzuo: tmzt: Mostly across multiple node processes [07:10] tmzt: not quite sure what socket.io has to do with it [07:10] tmzt: does it have a redis client or something? [07:11] Borgoluzzuo: tmzt: I think its more of just a me-not-knowing-javascript-super-well thing. This is essentially what I'm trying to accomplish: https://gist.github.com/2581073638ee566099ca [07:11] Borgoluzzuo: tmzt: where instead of where CALL BYE is there -- its just coming in over a redis subscription. [07:12] AvianFlu has joined the channel [07:12] tmzt: where is redis in that? [07:13] garrensmith: Borgoluzzuo: I think you need to write your own object that emits its own events for your redis pub/sub part rather then relying on socket.io [07:14] Nexxy: Borgoluzzuo, I put together a little PoC for you but you left before I could show you! [07:14] Borgoluzzuo: Nexxy: Internet went out at the office : / -- had to drive home -- i can haz? [07:14] Nexxy: sure 1 sec, I will PM you [07:14] Borgoluzzuo: Nexxy: Thanks. [07:15] Borgoluzzuo: garrensmith: I really think its something trivial I'm not doing correctly [07:15] tmzt: Nexxy: can you share it? [07:15] Nexxy: sure 1 sec let me gist it [07:15] booo has joined the channel [07:17] astropirate has joined the channel [07:19] jbpros has joined the channel [07:22] __tosh has joined the channel [07:23] cosmincx has joined the channel [07:24] NetRoY has joined the channel [07:24] raphdg has joined the channel [07:25] ablomen has joined the channel [07:27] metamind: hi, how do I set NODE_ENV within a script? [07:27] Nexxy: tmzt, https://gist.github.com/1136302 [07:27] Nexxy: metamind, it's my understanding that it's not changeable [07:28] icebox has joined the channel [07:28] raphdg has joined the channel [07:28] metamind: oh. I had wanted to set the environment using something like "node app.js -e p" rather than "NODE_ENV=production node app.js" [07:29] metamind: I guess I will have to live with it for now.. [07:29] garrensmith: metamind: process.env.NODE_ENV='test' [07:29] ghost has joined the channel [07:29] Nexxy: I thought it was a const or something [07:29] garrensmith: Nexxy: no you can change it [07:29] Nexxy: well then [07:29] garrensmith: I use that in my testing framework to make sure it always runs in test mode [07:29] m0s has joined the channel [07:30] metamind: Thanks garrensmith. still getting process.env.NODE_ENV = undefined [07:31] csm has joined the channel [07:31] Brandonn has joined the channel [07:33] icebox: Hello... an advice... developing a socket client how to create a flow control between multiple write calls? For instance, I have a login call and the result of the login will arrive in the data handler; the other write calls should wait that result. Step module doesn't seem to help me [07:33] Nexxy: icebox, async! [07:34] Nexxy: icebox, https://github.com/caolan/async [07:34] Nexxy: specifically async.parallel [07:34] Nexxy: erm, .series [07:34] Nexxy: lol [07:34] fletchowns: i need help with async.concat [07:34] fletchowns: http://stackoverflow.com/questions/7006829/error-when-trying-to-use-async-concat-to-retrieve-data-from-redis [07:34] Druide_ has joined the channel [07:35] metamind: OK. It looks like by default process.env.NODE_ENV is set to undefined. If you run using NODE_ENV=production node app.js then process.env.NODE_ENV = 'production' [07:35] metamind: thanks. [07:35] uchuff has joined the channel [07:37] icebox: Nexxy: well, async or step work with the callbacks, injecting a next function as callback... with socket.write I have not a callback, because the results arrive in the data handler... If I am not wrong [07:37] garrensmith: metamind: works on my machine [07:37] Nexxy: icebox, I'm afraid I would need to see some code to understand... I'm a bit dense [07:39] Raynos1 has joined the channel [07:40] icebox: Nexxy: I try adding a login call between the connection and sending a command see Rserve_eval in https://github.com/albertosantini/node-rio/blob/master/lib/rio.js [07:40] tyfighter has joined the channel [07:41] luke` has joined the channel [07:41] luke`_ has joined the channel [07:41] slaskis: does anyone know of any good node.js c++ addons tutorials? [07:42] icebox: Nexxy: I have a connect function where I do a net.createConnection and set the handlers... then I do a client.write(mypacket). In the middle I should do another client.write(myCredentials) to login, but I should wait the result before calling client.write(mypacket) [07:44] icebox: Nexxy: I am used to create a flow control with step... but I don't understand with net programming how to manage the write calls and the handler flow [07:44] jetienne: icebox: those are events, not callback [07:44] icebox: jetienne: exactly [07:44] jetienne: icebox: this is closer to DOM events if it rings a bell to you [07:44] Nexxy: I might be able to help if you give me some more code, but from what you're describing it just seems like you need to wait for a data event before more writing [07:45] icebox: Nexxy: correct [07:45] jetienne: icebox: yep so you dont need a library for that, this is usual even emitter [07:45] jetienne: icebox: if you agree with all i say, which issue do you bump into ? [07:45] Nexxy: something like socket.on('data, function(err,dat) { /* handle deciding if proper response has been received and then write */ } [07:45] tshpaper has joined the channel [07:46] klaustsen has joined the channel [07:46] icebox: Nexxy: ok... it is I was thinking on... but is it not ugly to have a write in the data event? [07:46] Nexxy: I'm sure someone will tell you it is [07:47] jetienne: icebox: no, it is the way it is suppose to be [07:47] icebox: jetienne: ah ok... good! :) [07:47] Nexxy: oh, data event has no err param [07:48] radiodario has joined the channel [07:48] icebox: Nexxy: yep... np [07:48] damiano has joined the channel [07:48] damiano: hello [07:49] icebox: Nexxy jetienne: thanks for your time [07:49] Nexxy: any time :) [07:49] m0s has joined the channel [07:49] damiano: http://expressjs.com/guide.html#settings [07:49] damiano: home Application base path used for res.redirect() and transparently handling mounted apps. [07:49] damiano: do i have to add http:// [07:50] damiano: or do i only need to put the host? [07:50] damiano: www.example.com ? [07:50] jetienne: you put the url you want to redirect too [07:51] jetienne: maybe i misundertand redirect [07:52] fly-away has joined the channel [07:52] jetienne: http://expressjs.com/guide.html#res.redirect() no i think i get it [07:52] damiano: yes [07:52] damiano: redirect [07:52] jetienne: damiano: you can do all the choise you proposed [07:52] damiano: without rewrite it all the time [07:53] damiano: jatienne... i think i could have some problems because if i need to redirect to a https page? [07:53] mendel_ has joined the channel [07:53] __doc__ has joined the channel [07:54] jetienne: not that i know of, the browser accepts to read https page [07:55] TomY has joined the channel [07:56] whitman has joined the channel [07:57] andree has joined the channel [07:57] ph^ has joined the channel [07:57] sebastianedwards has joined the channel [07:59] Me1000 has joined the channel [07:59] alnewkirk has joined the channel [08:01] mendel_ has joined the channel [08:04] mamon has joined the channel [08:04] mamon: hello [08:04] farhadi has joined the channel [08:04] astropirate: Greetings [08:04] jetienne: hi [08:06] mpavel has joined the channel [08:10] farhadi has left the channel [08:12] davidascher has joined the channel [08:13] m0s has joined the channel [08:20] venom00 has joined the channel [08:20] venom00 has joined the channel [08:21] jetienne has joined the channel [08:23] random123: Is tabs 2 spaces pretty much the standard in node community? [08:23] SubStack: standards are silly [08:23] SubStack: go with what you like the best [08:23] Emmanuel`: yeah, but if you're doing python [08:24] SubStack: unless you contribute to an existing project, then respect that project's conventions [08:24] Emmanuel`: oh wait, that must be an issue with CoffeeScript [08:24] Emmanuel`: since it relies on indentation [08:24] random123: SubStack: Well, I guess 2 spaces is smart if there are a lot of callbacks, identation can get scary [08:25] random123: SubStack: But you are right [08:25] random123: SubStack: What do you think of TameJS? [08:26] random123: SubStack: It impliments that idea I was talking about, it was made by OkCupid [08:26] pen has joined the channel [08:26] Emmanuel`: that thing looks awesome, somebody tried it ? [08:26] jetienne: man you should talk less and code more :) [08:29] Aiden has joined the channel [08:29] theCode has joined the channel [08:30] hlindset has joined the channel [08:30] AvianFlu: random123: tamejs seems pretty stupid [08:30] hlindset has joined the channel [08:30] Nexxy: AvianFlu++ [08:30] v8bot_: Nexxy has given a beer to AvianFlu. AvianFlu now has 1 beers. [08:30] catb0t: AvianFlu now has 1 beer [08:32] markwubben has joined the channel [08:34] random123: AvianFlu, why? I am asking sincerly [08:35] SubStack: I think the idea of tamejs could be implemented a little more cleanly [08:36] random123: SubStack: It does seem to help OkCupid a lot, they are worth 100 million [08:36] random123: SubStack: They say they couldn't handle all the async code they do with out it [08:36] Nuck: tamejs DOES look nice [08:36] Nuck: I'll give it that [08:36] AvianFlu: basically they wrote their own weird control flow lib because they don't know js, and there's some wonky js parsing involved [08:37] Nexxy: it looks hacky [08:37] Nexxy: extremely hacky [08:37] Nuck: IT does [08:37] eldios has joined the channel [08:37] Nuck: But it looks better than CS [08:37] Nexxy: dear god [08:37] Nuck: Even if it is extremely hacky [08:37] Nexxy: you can't compare everything to cs, nuba [08:37] Nexxy: nuck* [08:37] SubStack: random123: there are other ways to manage nested callbacks [08:37] random123: Well, I tested it out and it runs half as slow as using a different lib [08:37] AvianFlu: like naming and chaining them! [08:37] random123: I think their c++ implimentation must be better [08:37] SubStack: yep [08:38] Nuck: Or, ya know, just USING CALLBACKS [08:38] andrewfff has joined the channel [08:38] Nuck: I find the simplest solution is usually the best [08:38] Nuck: Therefore using callbacks is perfect ;) [08:38] random123: How about GoWithTheFlow? any praise for that? [08:38] jetienne: :) [08:38] SubStack: or building nice interfaces [08:38] jetienne: rai [08:38] AvianFlu: how to not nest callbacks: https://gist.github.com/1131154 [08:38] jetienne: random123: i heard the author is super cool :) [08:39] Nuck: jetienneGonna take a wild guess, say it's you? [08:39] jetienne: Nuck: i, not the only cool guy on the planet, am i ? :) [08:40] Nuck: jetienne: Just sounded like a shameless self-bump there :P [08:40] jetienne: Nuck: i least i stopped the tamejs rambling which was starting ;) [08:40] random123: jetienne, I think your solution is the best out of all [08:41] jetienne: random123: to say the least :) [08:41] bergie has joined the channel [08:42] random123: Well, I will forget TameJS and Stratified, also CoffeeScript, I don't really like things that need to be compiled into JS very much at all at this point [08:42] zilch has joined the channel [08:42] burningdog has joined the channel [08:42] random123: I'll just GoWithTheFlow :) [08:43] kulor-uk has joined the channel [08:43] m0s has joined the channel [08:44] zilch: When running a express.js using forever.js , one of our services went down ... but strangely forever could recover it after a long 15 minute gap .. [08:44] random123: Now maybe someday I could figure out how the hell those 20 lines work [08:45] zilch: what could be the reason that forever couldn't start it immediately ? [08:45] jetienne: random123: dig the git you will find longer version ofthe source. much easier to understand [08:45] jetienne: zilch: it smell like network issue. like a bound port so the server could not be restarted. wild guessing here [08:45] random123: jetienne: Cool [08:46] Nuck: Fuck, Jonathan's Card was viral marketing? Gotta hand it to Starbucks, that's a badass trick. [08:46] jetienne: Nuck: yep i disliked it too. they lied and this is not cool [08:47] Nuck: jetienne: You could get free coffee from it, quitcher bitchin [08:47] davidbanham has joined the channel [08:47] jetienne: Nuck: i think you misunderstood it [08:48] jetienne: the free was other people money [08:48] jetienne: give a penny, leave a penny kindof stuff [08:49] Nuck: I know, that was the goal [08:49] zilch: jetienne, oh ... my service ( give it name ServiceX ) is express.js based HTTPS server listening on port 30105, and I have node-proxy (listening on 443 ) which redirects to this service X whenever a request is matched aginst the path [08:49] Nuck: I'm talking about the nasty reality [08:49] mc_greeny has joined the channel [08:49] zilch: i have other such 3 services running on port 30101, 30102 and 30103 ... [08:50] zilch: they are all https ... [08:50] Nuck: jetienne: Also, it's take a penny, leave a penny. Give a penny, leave a penny implies that you're giving money 24/7 [08:50] zilch: It is all there on ec2 ... and whenever any of this service is down .. I can't even do SSH ... [08:50] jetienne: zilch: i was talking about tcp port binding. like impossible to listen until a timeout [08:52] Mansoor_s: abraxas, here is my node development setup http://mansoorsayed.com/2011/08/10/gnome3-javascript-developement-setup/ [08:52] zilch: jetienne, so you mean to say that port 30105 ( in this case ) was occupied even after crash ... making a restart by forever impossible ? [08:52] jetienne: zilch: exactly, this is my guess at least [08:52] Mansoor_s: zilch, what OS are you on? [08:52] zilch: but , how could it possibly effect my ability ssh ? [08:53] jetienne: zilch: next time it happen do a netstat. it will tell you if my guess is correct or not [08:53] jetienne: Mansoor_s: macos why do you ask [08:53] zilch: Mansoor_s, I am on Ubuntu made for ec2 [08:53] zilch: i am using free tier [08:53] jetienne: zilch: it is irrelevant to ssh access [08:53] zilch: jetienne, I had setup a cronjob to send an output of netstat every 10 mintues [08:54] _ralph has joined the channel [08:54] mendel_: what is the easiets way to change unicode chars to ascii (é to e etc) [08:54] zilch: this was third time I faced this issue [08:55] zilch: and all the three time I couldn't ssh as well !!! for good amount of time !!! [08:55] zilch: mendel_, search for removing diacritical marks .. [08:56] mendel_: found something here: http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/ [08:56] mendel_: but there must be a module for that :p [08:57] mendel_: https://github.com/bnoordhuis/node-iconv [08:57] mendel_: perfect [08:58] random123: jetienne: Do you think GoWithTheFlow could do something like this? http://pastebin.com/vY9v1H9M [08:59] jetienne: random123: nope read again the doc you got the api wrong [09:00] zilch: jetienne, how can I read by log to check if the port was blocked ? [09:01] mika__ has joined the channel [09:02] bzinger has joined the channel [09:02] jetienne: zilch: note sure [09:03] shinuza has joined the channel [09:03] zilch: i have netstat's output available [09:03] meso__ has joined the channel [09:05] temp01 has joined the channel [09:06] dominictarr has joined the channel [09:07] m0s has joined the channel [09:08] CStumph has joined the channel [09:10] garrett has joined the channel [09:11] Guest5566 has left the channel [09:12] tuhoojabotti: Is there a way to require all files from a folder? [09:12] tuhoojabotti: require('./modules/*') [09:12] tuhoojabotti: :P [09:13] Mansoor_s: witchcraft! [09:15] Nuck: tuhoojabottiDoes that actually work? [09:15] tuhoojabotti: Probably not. [09:16] zilch: jetienne, you are right the service logs are not able to proceed just after the .listen() code .... [09:17] Nuck: tuhoojabotti: It'd be cool though [09:17] SubStack: fs.readdirSync(__dirname + '/modules').forEach(require) [09:17] jetienne: zilch: cool glad to be of help [09:17] tuhoojabotti: SubStack: Yes, but that's just boring. [09:17] Nuck: ACTION slaps SubStack for using sync. [09:17] abraxas: Mansoor_s: thanks, I'll have a look! [09:17] SubStack: require is sync [09:18] SubStack: doesn't make sense to put require() behind async code [09:18] zilch: jetienne, thanks a ton .. [09:18] liar has joined the channel [09:18] zilch: I guess forever should be configured to wait a sec or two ... before reattempt ...to avoid port block ... ?!? [09:19] Nuck: So what's the point of requiring a whole directory [09:19] Nuck: When you can't even access exports? [09:19] adambeynon has joined the channel [09:20] murugaratham has joined the channel [09:21] SubStack: oh right [09:22] broofa has joined the channel [09:22] SubStack: var modules = fs.readdirSync(__dirname + '/modules').reduce(function (acc, file) { acc[file] = require(file); return acc }, {}) [09:22] SubStack: there ya go [09:22] SubStack: or better: [09:23] SubStack: var modules = fs.readdirSync(__dirname + '/modules').filter(function (file) { return require.extensions[path.extname(file)] }).reduce(function (acc, file) { acc[file] = require(file); return acc }, {}) [09:23] bbrandon has joined the channel [09:24] Nuck: Well that's just ugly [09:24] Nuck: :P [09:24] SubStack: not with proper indentation [09:25] Nuck: fair enough [09:29] JakeyChan has joined the channel [09:30] markwubben has joined the channel [09:30] cha0s has joined the channel [09:31] slaskis: when writing a c++ addon which requires an event loop, should/can I somehow 'hook onto' node.js' event loop, or would i have to create a new one? [09:32] Nuck: I just did Voice Control on my iPhone, coughed really loudly, and it interpreted that as "play" [09:32] csanz has joined the channel [09:33] VeXii: i made a load module for requring my mongoose models. problem is i dont have a way to make sure that embedet scheams gets loadet first. any ideas? [09:34] VeXii: http://pastebin.com/8AK2vrcg [09:34] ditesh|cassini has joined the channel [09:38] Mansoor_s: abraxas, yay or nay? [09:39] gh3 has joined the channel [09:39] Mansoor_s: for the setup [09:39] meso_ has joined the channel [09:40] m0s has joined the channel [09:41] gh3: hi all, 'm playing with node & mongo for the first time, and 'm trying to translate a common sql query... but with lo luck... SELECT * FROM user WHERE name LIKE "%to" is something like db.connection.find({user:/^to/}) in mongo, isn't it? [09:41] Country has joined the channel [09:42] Nuck: gh3: We don't really do LIKE [09:42] Nuck: We do IS [09:42] Nuck: There is no case-insensitive query, and I've had to work around that [09:42] Nuck: And IDK if it accepts RegExp [09:42] gh3: my problem is that if I try to use a js var instead of using "to", with something like var search = "to" and then I don't know how to that [09:43] k1ttty has joined the channel [09:43] Nuck: gh3: Oh, okay then use RegExp("^" + to) [09:45] V1 has joined the channel [09:45] garrensm_ has joined the channel [09:45] igl1 has joined the channel [09:46] migimunz2 has joined the channel [09:46] mscdex_ has joined the channel [09:46] kulor-uk_ has joined the channel [09:46] gh3: nope Nuck, seems no to work [09:46] Cros79 has joined the channel [09:46] Gekz__ has joined the channel [09:46] mpavel1 has joined the channel [09:46] pradeepto_bhatta has joined the channel [09:46] gh3: cats_collection.find({slug:'^'+cat.slug}).count(function(error, result) { console.log(result); [09:47] mscdex_: ew, a cat slug! [09:47] mscdex_: :-D [09:47] crodas has joined the channel [09:47] versicolor_ has joined the channel [09:47] FMJag has joined the channel [09:47] azend has joined the channel [09:47] zilch: db.user.find({name:}) is correct use [09:47] mendel_: does someone have a solution to this: http://stackoverflow.com/questions/5759817/how-to-encode-decode-charset-encoding-in-nodejs (it's not my question but I have the same problem) [09:47] levi501d has joined the channel [09:47] Nuck: gh3: Did you wrap it in RegExp()? [09:47] mpavel has joined the channel [09:47] mikey_p has joined the channel [09:47] whoops has joined the channel [09:47] keeto has joined the channel [09:47] zilch: gh3, I suggest you to learn basic mongodb ... [09:47] Nuck: zilch: That too [09:47] jakob has joined the channel [09:47] andree has joined the channel [09:47] Nuck: gh3: Mongly.com [09:47] mrkurt has joined the channel [09:47] Nuck: Go there, follow the tutorial, and JESUS FUCK NETSPLITS? [09:48] zilch: gh3, making query etc ... [09:48] chunhao has joined the channel [09:48] zilch: gh3, mongly is excellent [09:48] deoxxa has joined the channel [09:48] mendel_: so is there a way to make a http request with the iso-8859-1 encoding for instance [09:48] Swizec has joined the channel [09:48] PrgmrBill has joined the channel [09:48] booo has joined the channel [09:48] mendel_: http://nodejs.org/docs/v0.4.10/api/http.html#request.setEncoding = utf8 or binary.. [09:48] russell_h has joined the channel [09:48] mscdex: mendel_: use iconv [09:49] mrryanjohnston has joined the channel [09:49] mikeycgto has joined the channel [09:49] freewil has joined the channel [09:49] Gekz has joined the channel [09:49] mscdex: mendel_: "iconv" on npm or node-iconv on github [09:49] mscdex: https://github.com/bnoordhuis/node-iconv [09:49] brainproxy has joined the channel [09:49] doki_pen has joined the channel [09:49] bmaland has joined the channel [09:49] gh3: zilch & Nuck thx for the suggestion, 'll give it a shot... trying to learn something! [09:50] mscdex: mendel_: use that to create a Buffer of your latin-1 data and use that when you go to write [09:50] Nuck: zilch: Mongly taught me Mongo :D [09:50] alnewkirk has joined the channel [09:51] zilch: Nuck, I came to know about it l'll letter !! But is awesome for beginners !! [09:51] industrial: Anyone here use Mongoose? [09:51] industrial: I can't get my middleware to fire on an update [09:51] industrial: only on save [09:51] industrial: there is no handler for mySchema.pre('update', function(next){}); [09:51] industrial: it seems [09:52] mscdex: ACTION shakes a fist at ORMs [09:52] zilch: industrial, I use node-mongo-native driver directly !! [09:52] industrial: i dont! [09:52] zilch: what's reason for using Mongoose ... ? [09:52] zilch: anyway , it is a wrong question at this moment !! [09:52] industrial: schemas, validations, middleware [09:53] TheJH has joined the channel [09:53] TheJH has joined the channel [09:53] sstephenson has joined the channel [09:53] FireFly has joined the channel [09:53] Nuck: zilch: HIGHFIVE FOR MONGO-NATIVE! [09:53] zilch: HERE IT IS .. HIGH FIVE :) [09:54] zilch: validation is better done with JSV [09:54] Nuck: Or via your own shit :P [09:54] zilch: JSV module implements json-schema.org spec [09:54] Nuck: ACTION rolls his own Database stack [09:55] zilch: Nuck, lols [09:55] zilch has joined the channel [09:55] alnewkirk has joined the channel [09:56] industrial: well, i'm not working on open source code so rolling back is no option. I can solve this another way without middleware but that's the place it should live in. [09:56] zilch: as far as I know MongoDB has no schema stuff ... [09:56] Roocy has joined the channel [09:56] industrial: Mongoose does. [09:58] klaustse_ has joined the channel [09:59] Nuck: industrial: I'm not working on open-sourc [09:59] zilch: exactly what usecase demands that in reall app where you want to use MongoDB ? [09:59] Emmanuel`: industrial: which makes it pretty pointless, no ? [09:59] Nuck: But rolling my own is still fine [09:59] Emmanuel`: the cool thing about Mongo was the row-based, schema-less storing shit [09:59] Nuck: Schemas are, I agree, completely silly [09:59] zilch: Emmanuel`, exactly !!! [09:59] Nuck: That's like typing in JS [09:59] Nuck: It's silly [09:59] Nuck: Trying to force dynamic things to be static [09:59] Emmanuel`: I use Mongolian (mongodb for node) which keeps the spirit [10:00] alnewkirk has joined the channel [10:00] Emmanuel`: worked fine as far as I tried [10:00] Emmanuel`: which is : not that much [10:00] Nuck: I also find that Mongoose forces me to plan my shit [10:00] zilch: Emmanuel`, link please !! [10:00] Nuck: And that's something I ain't cool with. [10:00] industrial: I fail to see how having your data conform to a spec is pointless [10:00] industrial: I have to keep in sync with a client object model [10:00] TheJH: can you explain to me (someone who's completely new to nosql) why mongo is better than couch? [10:01] Emmanuel`: https://github.com/marcello3d/node-mongolian [10:01] Nuck: TheJH: We don't suck cocks. [10:01] Nuck: :B [10:01] industrial: Nuck: you do circlejerks tho [10:01] industrial: :V [10:01] zilch: The veryfact you can shape-reshape and hash-rehash your requirement->design->implementation make javascript , json, mongodb so cool [10:01] Nuck: industrial: Only in the Mongoose community [10:01] Nuck: mongo-native is awesome [10:01] Nuck: zilch: It's more dynamic, and grows and adapts organically to changing environs. [10:02] industrial: lunch time! [10:02] Nuck: Which means it's really future friendly. [10:02] Nuck: If you want schemas, go use MySQL [10:02] Emmanuel`: past too [10:02] Nuck: It'll be more efficient to store data where it's not a key for each row [10:02] te-brian has joined the channel [10:02] Shrink has joined the channel [10:03] mscdex: TheJH: fwiw: www.mongodb.org/display/DOCS/Comparing+Mongo+DB+and+Couch+DB [10:03] Nuck: I love Mongo itself for what it is [10:03] TheJH: mscdex, thanks [10:03] Nuck: Queryable JSON [10:03] JakeyChan has joined the channel [10:03] zilch: industrial, I would be interested in knowing why you would MongoDB even though your object has schema !! what make MongoDB your choice ? [10:04] zilch: Nuck, I want it in browser and ... may I say ... on iPhone :) [10:05] ph^ has joined the channel [10:05] zilch: SQLLite is too old to be born with HTML 5 !! [10:05] Nuck: zilch: I agree! [10:05] Guest95383 has joined the channel [10:05] Nuck: Fuck PouchDB, I want Pongo! [10:05] mscdex: hah [10:05] rurufufuss has joined the channel [10:05] mscdex: "sqllite is too old" [10:07] Nuck: mscdex: It's actually pretty new, right? [10:07] adrianmg has joined the channel [10:07] Nuck: Something like 5 years old? [10:08] zilch: mscdex, "too old to be *born* *with* ... " [10:08] mscdex: my point was sqlite is used in a lot of places [10:08] zilch: mscdex, I love SQLLite ... just that it is time for JSON/BSON bases store ... [10:08] jomoho has joined the channel [10:09] mscdex: it makes for a nice portable relational data store [10:09] Nuck: It does [10:09] mscdex: it just depends on your data [10:09] Nuck: But I want a portable document-oriented store [10:09] m0s has joined the channel [10:09] Nuck: mscdex: Object-oriented [10:09] Nuck: 'nuff said. [10:09] mscdex: if you're not going to have relational data, then use something that's built specifically for kv [10:10] Nuck: Building a fake Mongo layer around JSON wouldn't be hard [10:10] Nuck: It'd be inefficient I'm sure [10:10] Nuck: Since it's not directly queryable [10:10] Nuck: But it's feasible. [10:12] zilch has joined the channel [10:12] alnewkirk has joined the channel [10:12] tuhoojabotti: Hmm [10:12] ph^ has joined the channel [10:12] tuhoojabotti: Call me stupid, but I can't think of a way to do stuff in loops with async stuff. :D [10:13] Nuck: tuhoojabotti: stupid. [10:13] Nuck: :B [10:13] tuhoojabotti: ;__; [10:13] zilch: we spend quite a lot developer hours just storing some iOS game data on sql lite ... just to map it to json that are send to API which stores it on mongo [10:13] Nuck: tuhoojabotti: Elaborate on that. [10:13] TheJH: tuhoojabotti, do you want it in parallel or serially? [10:13] tuhoojabotti: TheJH: I guess it doesn't matter. [10:13] tuhoojabotti: ":D" [10:13] zilch: we *have* to store it in relation schema ... at client side ... :( [10:14] TheJH: tuhoojabotti, put a closure in the loop that preserves i, e.g. (function(i){...})(i) [10:14] tuhoojabotti: I have used jquery's when.do [10:14] tuhoojabotti: :P [10:14] zilch: tuhoojabotti, check out howtonode video on same topic !! [10:15] tuhoojabotti: I'm too tired to watch videos [10:15] zilch: tuhoojabotti, sleep !! [10:15] tuhoojabotti: But I already woke up. :/ [10:15] zilch: tuhoojabotti, hmmm [10:15] mscdex: what TheJH said [10:15] tronic_ has joined the channel [10:15] tuhoojabotti: I guess that's what I did before [10:15] tuhoojabotti: because my code worked. [10:16] tuhoojabotti: but it doesn't feel right. :D [10:16] mscdex: well, there isn't really any other way to do it with async [10:16] TheJH: tuhoojabotti, use something like someLibrary.forEach(array, function(e, i){ or so [10:16] TheJH: tuhoojabotti, do you know caolans async? [10:16] tuhoojabotti: No [10:16] tuhoojabotti: I know nothing [10:17] TheJH: tuhoojabotti, https://github.com/caolan/async , look at the README [10:17] tuhoojabotti: Yeah [10:18] tuhoojabotti: I guess I'll just do it like I used to. [10:18] tuhoojabotti: :P [10:19] anaio has joined the channel [10:19] rodasc has joined the channel [10:19] Nuck: TheJH: There's already a forEAch function in JS [10:19] Nuck: It's Array.forEach [10:19] tuhoojabotti: Yes. [10:19] VeXii: i keep getting CALL_NON_FUNCTION_AS_CONSTRUCTOR (native) even thou i followed all the mongoose doc's, looked arund SO and GH but never found a working solution. PasteBin:http://pastebin.com/qCLsz5An [10:20] Nuck: v8: ['a','b','c'].forEach(function(foo){ console.log(foo) }) [10:20] v8bot_: Nuck: CONSOLE: ["a", "b", "c"], OUTPUT: undefined [10:20] TheJH: Nuck, yes, I forgot that :/ [10:20] EvRide has joined the channel [10:20] Nuck: herpaderp [10:20] Nuck: Something like that :P [10:20] tobmastr has joined the channel [10:20] tuhoojabotti: http://paste.servut.us/d7pq I just can't understand how this worked. :D [10:20] andree_ has joined the channel [10:20] Nuck: ACTION just uses a normal for loop [10:20] tuhoojabotti: (ignore the date stuff) [10:21] versicolor has joined the channel [10:21] Nuck: tuhoojabotti: Damn your hipster pastebin [10:21] TheJH: tuhoojabotti, you don't have any callbacks in the loop [10:21] tuhoojabotti: TheJH: dust callback? [10:21] FMJaggy has joined the channel [10:21] TheJH: tuhoojabotti, no functions in general [10:22] tuhoojabotti: It's the sum function [10:22] tuhoojabotti: :u [10:22] Nuck: TheJH: You're seeing the same thing I am :V [10:22] Nuck: Oh wait [10:22] tuhoojabotti: It didn't work if it was anon [10:22] Nuck: Hey, named thingy [10:22] TheJH: tuhoojabotti, that's not in the loop [10:22] tuhoojabotti: Yeah [10:22] tuhoojabotti: I guess so then. [10:22] tuhoojabotti: But I don't see how it changes anything. :D [10:22] rednul_ has joined the channel [10:22] vuliev_ has joined the channel [10:22] tuhoojabotti: But I'm just a noob. :( [10:23] sstephenson_ has joined the channel [10:23] topaxi_ has joined the channel [10:23] Nuck: tuhoojabotti: Haven't you been here longer than I have? [10:23] tuhoojabotti: Dunno. [10:23] DrPizza_ has joined the channel [10:23] dodger_ has joined the channel [10:23] davidbanham has joined the channel [10:23] slsh_ has joined the channel [10:23] ptlo_ has joined the channel [10:23] TheJH: tuhoojabotti, the problem only appears when you use a variable that changes with each loop iteration in a callback inside the loop [10:23] TheJH: e.g. the index [10:23] Nuck: And that's when you pass it into a closure [10:23] tuhoojabotti: I did not understand what you just said. [10:23] vid___ has joined the channel [10:24] mikey_p_ has joined the channel [10:24] tuhoojabotti: TheJH: Can I has fancy yet simple examples? :D [10:24] tuhoojabotti: With comments [10:24] Nuck: tuhoojabotti: Let's say you do something async with the index in a callback in a for loop? [10:24] TheJH: tuhoojabotti, one sec... [10:24] tuhoojabotti: Nuck: You're not helping either. [10:24] tuhoojabotti: :D [10:24] Nuck: By the time that async thing happens and the callback is called, that index has long since changed [10:24] jbpros_ has joined the channel [10:25] VeXii: nvm i worked after i addet a bunch of " and removed em again :D [10:25] Nuck: And so you need to get closure'd inside there [10:25] Nuck: So you create a self-executing anonymous function and pass the index to it [10:25] _class_ has joined the channel [10:25] Nuck: And boom, closure. [10:26] Nuck: And boom, I suddenly know JS :D [10:26] tuhoojabotti: Hipster [10:26] Nuck: tuhoojabotti: It's for hte IRONY [10:26] Nuck: Damnit [10:27] Nuck: ACTION goes back to his underground music [10:27] TheJH: tuhoojabotti, https://gist.github.com/5df4bdd7122225a0be61 [10:27] keeto has joined the channel [10:27] brianc has joined the channel [10:27] deoxxa has joined the channel [10:27] iFire has joined the channel [10:27] jbpros has joined the channel [10:27] TheJH: whoah [10:28] Nuck: fucking netsplits tonight D: [10:28] cosmincx has joined the channel [10:28] TheJH: netsplit looks different, I think [10:28] Nuck: Usually [10:28] TheJH: maybe the internet went down somewhere? [10:28] Nuck: But I'm pretty sure these are other types of netsplits [10:28] Nuck: Nah, they're all various IPs [10:28] Nuck: Nothing in common, really [10:29] mpavel has joined the channel [10:29] tomb_ has joined the channel [10:30] tuhoojabotti: TheJH: I didn't see what you did there. :P [10:30] TheJH: tuhoojabotti, ? [10:30] Nuck: TheJH: He's doing an anti-iswydt [10:31] ivan has joined the channel [10:31] TheJH: ah, ok [10:31] fermion has joined the channel [10:31] tuhoojabotti: Hmm [10:32] m0s has joined the channel [10:32] TheJH: tuhoojabotti, the "i" in the callback references the "i" in the outer scope, and there, "i" is 5 when the loop is over [10:32] Ginlock has joined the channel [10:33] tuhoojabotti: Hmm [10:34] tuhoojabotti: You're just confusing me now. :P [10:34] tuhoojabotti: I don't need the index. [10:34] zilch has joined the channel [10:34] terite_ has joined the channel [10:34] alek_br has joined the channel [10:34] zivester has joined the channel [10:34] damiano has joined the channel [10:35] joeytwiddle has joined the channel [10:35] mikeycgto has joined the channel [10:35] tuhoojabotti: I just need to make sure all the dust rendering is done before I call the callback with the content [10:35] TheJH: tuhoojabotti, `console.log(i+":"+result);` needs the i (in my example) [10:35] necrodearia has joined the channel [10:35] mrryanjohnston has joined the channel [10:35] cpets has joined the channel [10:35] freewil has joined the channel [10:35] freewil has joined the channel [10:35] tuhoojabotti: Your example is useless to me. :P [10:35] Mansoor_s has joined the channel [10:35] damiano: not possible? [10:35] TheJH: tuhoojabotti, ah... damn. [10:35] Slashbunny has joined the channel [10:35] TheJH: :/ [10:35] JakeyChan has joined the channel [10:35] tuhoojabotti: TheJH: Look at my code [10:35] tuhoojabotti: TheJH: it works, I just need to know why. :D [10:36] hasta84 has joined the channel [10:36] tuhoojabotti: Because I am currently rewriting it, and can't do it exactly like that anymore. :P [10:36] tanepiper has joined the channel [10:37] TheJH: tuhoojabotti, because you don't use p in any function defined inside the loop [10:37] tuhoojabotti: Why is this so hard. :E [10:37] TheJH: tuhoojabotti, and not d, and not off, ... [10:38] mendel_: mscdex: can't get it to work.. I'm using https://github.com/mikeal/request to get the body of a page [10:38] TheJH: tuhoojabotti, could you show me your changed code that doesn't work? [10:38] tuhoojabotti: TheJH: It's not written yet. [10:38] tuhoojabotti: :D [10:38] footyfish has joined the channel [10:38] tuhoojabotti: But let's see [10:38] mendel_: mscdex: the page is in iso, I set the encoding of request to utf8 and I'm using iconv to convert the utf8 to iso [10:39] davidbanham has joined the channel [10:40] TheJH: mendel_, sounds like you should read it as a buffer and directly decode the buffer as iso [10:40] bradwright has joined the channel [10:40] TheJH: mendel_, (just a comment without having any context available) [10:40] tuhoojabotti: TheJH: http://paste.servut.us/jn4w [10:40] tuhoojabotti: Something like that. :P [10:42] metadaddy_ has joined the channel [10:42] Xano has joined the channel [10:42] TheJH: tuhoojabotti, can't spot any obvious mistakes or so :( [10:43] Generic_Dumbass has joined the channel [10:43] tuhoojabotti: TheJH: So if I just do content.push(); and call the cb it should work? :u [10:43] mendel_: TheJH: yeah tried that.. I set the encoding to null (the default = buffer) and then body.toString('iso-8859-1') on the request result [10:43] TheJH: tuhoojabotti, I think that it should work [10:44] mendel_: TheJH: but still: EénVandaag = E?nVandaag [10:44] tuhoojabotti: TheJH: We shall see. :P [10:44] TheJH: mendel_, put the buffer into iconv [10:45] pghalliday has joined the channel [10:45] indutny has joined the channel [10:45] robhawkes has joined the channel [10:46] TheJH: mendel_, var iconv = new Iconv('ISO-8859-1', 'UTF-8'); var str = iconv.convert(inBuffer).toString(); [10:46] TheJH: or something like that [10:46] zilch has joined the channel [10:46] mendel_: TheJH: E�nVandaag [10:47] tuhoojabotti: TheJH: It seems to work. :O [10:49] tuhoojabotti: TheJH: The part I don't understand is how does the content variable have all the content when the cb is called, as the loop and the dust are called async. :u [10:49] hassox has joined the channel [10:50] H4ns has joined the channel [10:52] TheJH: mendel_, just tried it [10:52] TheJH: mendel_, E�nVandaag is the result when you convert it to a string before converting it to utf9 [10:53] knirhs has joined the channel [10:53] TheJH: mendel_, iconv.convert(buf).toString()->'EénVandaag' iconv.convert(buf.toString()).toString()->'E�nVandaag' [10:53] jetienne_: using mongoose, how can i know if the connection working ? like is there a event or callback ? [10:53] tuhoojabotti: I guess I'm born to write js as it just works, even though I have no idea how. [10:53] tuhoojabotti: :D [10:53] alnewkirk has joined the channel [10:54] TheJH: heh [10:55] mendel_: TheJH: Ok that means request isn't giving the body as a buffer, will take a look [10:55] okuryu has joined the channel [10:56] H4ns` has joined the channel [10:57] jetienne_: using mongoose, how can i know if the connection working ? like is there a event or callback ? [10:57] jetienne_: error [10:57] jetienne_: please ignore [10:59] sfoster has joined the channel [11:00] materialdesigner has joined the channel [11:00] Joelio has joined the channel [11:01] anubhaw has joined the channel [11:03] m0s has joined the channel [11:03] Shrink has joined the channel [11:03] markwubben has joined the channel [11:04] mikedeboer has joined the channel [11:04] davidbanham has joined the channel [11:06] liquidproof has joined the channel [11:07] klaustsen has joined the channel [11:09] zilch has joined the channel [11:10] lukegalea_ has joined the channel [11:13] odie5533: When does Node.JS exit? [11:13] Nexxy: when there is nothing left to do [11:13] okuryu has joined the channel [11:13] odie5533: How does it know when that is true? [11:14] Nexxy: under the hood I'm sure it has something to do with nothing on the stack but [11:14] scott_gonzalez has joined the channel [11:14] Nexxy: if you have no listeners and no pending callbacks [11:14] Nexxy: etc [11:15] odie5533: I'm getting an error [11:15] StepanKuzmin has joined the channel [11:15] odie5533: "This application has requested the Runtime to terminate it in an unusual way ... terminate called after throwing an instance of 'std::bad_alloc'" [11:15] garrensm_: odie5533: no callbacks in the queue [11:15] garrensm_: or I think thats when it exits [11:15] rurufufuss has joined the channel [11:15] Nexxy: what version are you using? [11:15] odie5533: 0.5.3 [11:15] odie5533: on windows [11:16] Nexxy: oh dear [11:16] Nexxy: I have no clue [11:16] Nexxy: ;< [11:16] madhums has joined the channel [11:16] Nexxy: ACTION cannot into windows [11:18] zilch has joined the channel [11:20] odie5533: and to top it off, it only happens sometimes [11:21] odie5533: Tried using debug. I think perhaps the debugger is not ported to Windows yet? [11:22] ditesh|cassini has joined the channel [11:22] odyniec has joined the channel [11:23] garrensmith has joined the channel [11:23] sbrekken has joined the channel [11:24] odie5533: Well I know where the problem is at least. It's caused by child.spawn. [11:25] m0s has joined the channel [11:25] jakeg has joined the channel [11:26] sbrekken: I'm trying to store files POSTed via multipart/form-data in mongodb GridFS but I can't seem to find any multipart handler that doesn't temporarily store the file [11:28] adrianmg: amazing happens! https://github.com/substack/node-video [11:28] odie5533: sbrekken: not sure if they fit the bill, but Google says https://github.com/TooTallNate/node-multipart-stack http://onteria.wordpress.com/2011/05/30/multipartform-data-uploads-using-node-js-and-http-request/ [11:29] CrypticSwarm_ has joined the channel [11:29] odie5533: adrianmg: heh, that is pretty cool [11:29] adrianmg: amazing [11:29] adrianmg: cann't wait to try it out [11:30] sbrekken: odie5533: thanks, will check that out [11:30] adrianmg: so we can escape from flash tu streaming / capturing [11:30] mendel_: TheJH: I found where it goes wrong.. each data event is a buffer, but when I do data += chuck and console.log(data); in the end event it's a string [11:31] frankblizzard has joined the channel [11:31] TheJH: mendel_, yes, you have to concat buffers in another way: create a new buffer whose length is the length of the source buffers combined, copy their data in the target buffer [11:32] mendel_: ah... [11:32] bnoordhuis has joined the channel [11:32] klaustse_ has joined the channel [11:33] SubStack: adrianmg: you mean this? https://github.com/pkrumins/node-video [11:33] SubStack: mine is just a fork [11:33] adrianmg: oops, yes! [11:33] adrianmg: but both amazing [11:34] adrianmg: good job by the way [11:34] DrLou has joined the channel [11:35] jetienne_: SubStack: just curious, why not just call ffmpeg ? [11:35] SubStack: jetienne_: I didn't write it, I don't know [11:35] jetienne_: oik [11:36] mike5w3c_ has joined the channel [11:36] SubStack: it's for streaming encoding though [11:36] SubStack: probably that's why [11:36] odie5533: Who needs WebM or H264 anyways, stuff already supports Ogg/Theora :) [11:36] jetienne_: odie5533: you dont want theora :) [11:36] dexter_e has joined the channel [11:36] odie5533: eh? [11:36] jetienne_: odie5533: aim for webm if you can [11:37] TheJH: jetienne_, because of quality or of support? [11:37] klaustsen has joined the channel [11:37] jetienne_: TheJH: on image quality and on software quality too [11:37] booo has joined the channel [11:37] odie5533: image quality is a myth [11:37] jetienne_: yeah sure [11:38] jetienne_: i did 3year of video streaming and no :) [11:38] hasta84: Hello! Can anyone help me with how to override node modules? Like http or dgram, to add own functionality to the API? [11:38] SubStack: hasta84: don't do that [11:38] hasta84: SubStack: why? [11:38] jetienne_: odie5533: lets assume it was, which i completely disagree, the sw is so buggy, and ogg is so bad, those will be sufficient to stear away [11:38] odie5533: jetienne_: then I'm sure you've seen this page: ar of vid [11:38] odie5533: http://people.xiph.org/~greg/video/ytcompare/comparison.html [11:39] TheJH: hasta84, what do you want to add? [11:39] jetienne_: odie5533: then im sure you know the domain of this url [11:39] SubStack: hasta84: why do you think you need to monkey patch the core libs? [11:39] odie5533: jetienne_: but ofc! [11:39] jetienne_: odie5533: as being the same domain as ogg/theora people [11:39] pen has joined the channel [11:39] odie5533: jetienne_: most product research is done by the company attempting to sell the product. [11:40] hasta84: no, but I am thinking about a scaling possibility, where the same API is usable, but the main process manages the in/out and spreads it over the child processes [11:40] odie5533: like 95% or something. [11:40] odie5533: I made that number up. [11:40] jetienne_: odie5533: i know :) im just talking about bias [11:40] jetienne_: odie5533: you talk to mpeg la, they tell you h264 is the best [11:41] TheJH: hasta84, ehm... you want to relay the requests to other processes on the same machine? [11:41] jetienne_: odie5533: xiph is even promoting ogg... this give info on their reliability :) [11:41] hasta84: TheJH: That was the plan. I want to test that [11:42] mpavel has left the channel [11:42] TheJH: hasta84, your first cpu currently gets 100% load? or why? [11:43] garrensmith: hasta84: why dont you write a wrapper library over the core libs [11:43] yumatov has joined the channel [11:43] TheJH: garrensmith++ [11:43] v8bot_: TheJH has given a beer to garrensmith. garrensmith now has 1 beers. [11:43] garrensmith: hasta84: rather than monkey patching [11:43] hasta84: garrensmith: that's exactly what I want to, could have just said that :) [11:44] garrensmith: hasta84: panic over then :-) [11:44] hasta84: TheJH: There are cases, yes [11:44] TheJH: hasta84, what kind of cpu expensive stuff does your node server do? [11:44] yumatov has joined the channel [11:44] andrewff1 has joined the channel [11:45] hasta84: TheJH: encrypting/decrypting [11:45] TheJH: hasta84, as in "https"? [11:47] hasta84: TheJH: not exactly https in that particular case, but OpenSSL functionality is used. ssl is expensive and for high load high availability I don't want to waste mutlitple cores and CPUs [11:47] yumike has joined the channel [11:48] TheJH: hasta84, may I ask what you're using the crypto for? [11:49] hasta84: TheJH: In that one case for RTMFP packet encryption/decryption [11:49] fairwinds has joined the channel [11:49] eee_c has joined the channel [11:51] TheJH: hasta84, could you just spawn a few workers when the process starts up and loop the data through them? And let the main process handle everything but the crypto? [11:52] hasta84: garrensmith: can you tipp me off to a good resource on wrapping the core functionality? [11:52] hasta84: TheJH: Yes, that's what I am heading for, but I don't want to reproduce that in the future for other projects [11:53] TheJH: hasta84, there are worker libraries for such stuff [11:53] TheJH: !@hasta84 npm search worker [11:53] garrensmith: hasta84: have you looked at cluster https://github.com/LearnBoost/cluster [11:53] jhbot: hasta84, packages (short format): beanstalk_worker, worker, resque, jjw, worker-pool, spawn, gearman, q-comm, webworker, gearnode, factory-worker, cluster-isolatable, kue, fibers [11:54] garrensmith: jhbot [11:54] seivan has joined the channel [11:54] hasta84: Thank you all :) I'll have a look! [11:55] jhbot: garrensmith, hmm? [11:55] garrensmith: what is jhbot? [11:56] jhbot: garrensmith, I am a bot and TheJH is my owner [11:56] tuhoojabotti: It's a stupid bot by TheJH. [11:56] garrensmith: lol [11:56] jhbot: tuhoojabotti, that's mean [11:56] tuhoojabotti: Don't say !help, it'll spam your query [11:56] tuhoojabotti: :P [11:57] TheJH: just a little bit :P [11:57] tuhoojabotti: A little too much. [11:59] Mansoor_s has joined the channel [12:00] ralphholzmann has joined the channel [12:00] mendel_: TheJH: thanks, got it working with https://github.com/bnoordhuis/node-buffertools/ [12:00] TheJH: mendel_, :) [12:00] TheJH: ah, buffertools, didn't know that one [12:01] zilch has joined the channel [12:03] mhauri has joined the channel [12:06] odie5533: I am trying to use child_process.spawn, but I can't seem to get spaces to work in command arguments. [12:06] ditesh|cassini has joined the channel [12:07] bnoordhuis: odie5533: what platform? [12:07] odie5533: Windows [12:07] bnoordhuis: right, there are some issues with that [12:07] bnoordhuis: might be fixed in the latest master [12:07] indutny: hey nodejs devs, ryah [12:07] indutny: how are you doing? [12:07] jetienne_: :) [12:07] m0s has joined the channel [12:07] odie5533: bnoordhuis: so it is already documented then? [12:08] bnoordhuis: odie5533: documented? no. known broken? yes. :) [12:08] bnoordhuis: and possibly fixed - i know our windows guys did some work on it [12:08] random123 has joined the channel [12:09] odie5533: How do I grab the latest master branch? git checkout master && git pull ? [12:09] bnoordhuis: DrPizza_: ^ [12:09] bnoordhuis: odie5533: yes [12:09] DrPizza_: hm? [12:09] DrPizza_: oic [12:10] DrPizza_: odie5533: which version? [12:10] jshaw has joined the channel [12:10] odie5533: I was using 0.5.3 [12:10] DrPizza_: hmmm [12:10] farhadi has joined the channel [12:10] odie5533: spaces cause Node to crash. [12:10] madhums has joined the channel [12:11] DrPizza_: let me take a look at when the fixes were added [12:11] ttpva has joined the channel [12:11] DrPizza_: grr [12:12] farhadi: does any body know how can I change length of a buffer? [12:12] DrPizza_: bnoordhuis: there's no tag for 0.5.3; do you know when it was made? [12:12] DrPizza_: oh wait [12:12] icebox: farhadi: you cannot change the size [12:12] odie5533: August 2nd. there is a tag for it [12:12] TheJH: farhadi, you can't [12:12] DrPizza_: sorry [12:12] DrPizza_: was looking at the wrong repo [12:12] DrPizza_: doh [12:13] bnoordhuis: DrPizza_: libuv in node was upgraded yesterday [12:13] bnoordhuis: so if the fixes are in libuv, odie5533 can just upgrade to the latest master [12:13] icebox: farhadi: from the doc: Raw data is stored in instances of the Buffer class. A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized. [12:13] DrPizza_: odie5533: yes I see the tag now, I was looking at a fork by accident [12:14] DrPizza_: odie5533: yes, 0.5.3 doesn't include the fixes I made to handling of parameters for spawned and execed commands [12:14] farhadi: icebox: thanks, So I think I should create a new buffer and then copy the contents over to the new one [12:14] TheJH: farhadi, correct [12:14] zilch has joined the channel [12:14] postwait has joined the channel [12:14] farhadi: TheJH thanks [12:14] bnoordhuis: farhadi: is the new buffer bigger or smaller? in the second case, you can .slice() it [12:14] DrPizza_: odie5533: so either build from the master branch, or wait for 0.5.4 [12:15] icebox: farhadi: correct... http://nodejs.org/docs/v0.4.10/api/buffers.html#buffer.copy [12:15] odie5533: DrPizza_: just built the master. Seems to be working! :) [12:15] farhadi: bnoordhuis: no the new one is bigger [12:15] DrPizza_: odie5533: good good [12:15] bnoordhuis: farhadi: okay, .copy() it is then :) [12:17] garrensmith: can you render partials in jade? [12:17] heavysixer has joined the channel [12:17] brianseeders has joined the channel [12:17] farhadi: So how to free up memory used by the old buffer? [12:18] DrPizza: odie5533: however there are some other fixes around win32 process spawning that don't look to have been merged into master yet [12:19] odie5533: hmm. I guess I can only hope I don't run into them then [12:19] DrPizza: odie5533: if you want to use custom environments, don't [12:19] DrPizza: the fixes are made to libuv, but haven't been merged into node yet. [12:21] odie5533: Why is libuv work done in libuv instead of in the node repo? [12:21] DrPizza: because libuv is useful in its own right [12:21] DrPizza: it makes sense for its development to be separate [12:22] hellp has joined the channel [12:22] ceej has joined the channel [12:23] Poetro has joined the channel [12:23] Poetro has joined the channel [12:23] xandrews has joined the channel [12:23] icebox: farhadi: assigning null to that variable... generally speaking you can looking for "garbage collector nodejs" [12:23] farhadi: icebox: thanks [12:24] farhadi: may by "delete buffer;" do the same [12:24] madhums has left the channel [12:26] zilch has joined the channel [12:27] fumanchu182 has joined the channel [12:27] shapeshed has joined the channel [12:28] kdng-tr7 has joined the channel [12:28] seivan has joined the channel [12:29] kdng-tr7 has joined the channel [12:31] prettyrobots has joined the channel [12:33] jakeg has joined the channel [12:36] farhadi has left the channel [12:38] lupomontero has joined the channel [12:38] jbpros has joined the channel [12:40] bryn__ has joined the channel [12:40] JoshC1 has joined the channel [12:41] nielsbusch has joined the channel [12:42] mhausenblas has joined the channel [12:42] nielsbusch: I am trying to get the eco template commandline working. I did npm install eco, but I don't have the command... Anything else I need to do? [12:43] eyesUnclouded has joined the channel [12:44] nielsbusch: npm ls gives me: [12:44] nielsbusch: └─┬ eco@1.1.0-rc-1 [12:44] nielsbusch: ├── coffee-script@1.1.2 [12:44] nielsbusch: └── strscan@1.0.1 [12:45] damiano has joined the channel [12:45] zastaph has joined the channel [12:45] damiano: hello [12:46] damiano: back [12:46] jwayong has joined the channel [12:46] damiano: i was talking about express, how can avoid to restart node many times if i change a pages? [12:46] zilch has joined the channel [12:47] jetienne has joined the channel [12:48] thomblake has joined the channel [12:48] jwayong has joined the channel [12:48] thomblake has left the channel [12:48] frankblizzard has joined the channel [12:48] ttpva has joined the channel [12:50] zilch has joined the channel [12:52] m0s has joined the channel [12:58] AaronMT has joined the channel [12:59] kdng-tr7 has joined the channel [12:59] davidsklar has joined the channel [13:00] xandrews has joined the channel [13:00] kdng-tr7 has joined the channel [13:00] madhums has joined the channel [13:00] okuryu has joined the channel [13:00] madhums has left the channel [13:01] xtianw has joined the channel [13:02] lukegalea_ has left the channel [13:03] jtsnow has joined the channel [13:03] Sazpaimon has joined the channel [13:04] bzinger has joined the channel [13:07] klovadis has joined the channel [13:07] zilch has joined the channel [13:12] shinuza has joined the channel [13:13] iaincarsberg has joined the channel [13:13] TheJH: nielsbusch, "npm install -g eco" [13:13] TheJH: nielsbusch, "npm install " for use with require(), "npm install -g " for command-line use [13:14] unlink has joined the channel [13:14] m0s has joined the channel [13:14] rurufufuss has joined the channel [13:16] ianward has joined the channel [13:17] kriszyp has joined the channel [13:18] zackattack has joined the channel [13:18] kdng-tr7 has joined the channel [13:18] Generic_Dumbass has joined the channel [13:19] copongcopong has joined the channel [13:19] xtianw has joined the channel [13:19] frankblizzard has joined the channel [13:20] kdng-tr7 has joined the channel [13:20] sniper506th has joined the channel [13:20] meso_ has joined the channel [13:20] kdng-tr7 has joined the channel [13:22] zilch: what would you suggest for setting up failover for express.js bases server ? I am already using forever.js ... but sometime it fails to keep up .. [13:22] versicolor has joined the channel [13:22] zilch: Oh .. and load balancing with it !! :P [13:23] zilch: if that's possible [13:24] igl has joined the channel [13:24] garrensmith: zilch: have you looked at cluster https://github.com/LearnBoost/cluster [13:25] zilch: garrensmith, was looking at just that [13:25] postwait has joined the channel [13:25] malkomalko has joined the channel [13:25] garrensmith: zilch: haven't used it myself but I think it can do what you are looking for [13:27] Country has joined the channel [13:28] adambeynon has joined the channel [13:29] eyesUnclouded has joined the channel [13:30] kdng-tr7 has joined the channel [13:30] heavysixer has joined the channel [13:31] arnorhs has joined the channel [13:31] astropirate has joined the channel [13:32] descipher has joined the channel [13:32] kdng-tr7 has joined the channel [13:33] kdng-tr7 has joined the channel [13:33] hdon- has joined the channel [13:33] mike5w3c_ has joined the channel [13:34] kdng-tr7 has joined the channel [13:34] TheJH: could someone have a look at https://gist.github.com/1136807 ? There must be a shorter way to do this... and also, please look for ways to make the code error out or so, assuming that the input is unvalidated JSON. [13:34] TheJH: or to trick it [13:36] kdng-tr7 has joined the channel [13:37] kdng-tr7 has joined the channel [13:37] kdng-tr7 has left the channel [13:38] sivy has joined the channel [13:38] pandeiro has joined the channel [13:38] colinclark has joined the channel [13:41] robotmay has joined the channel [13:42] zilch has joined the channel [13:42] Emmanuel`: TheJH: we're willing to help, but it's a bit rude to paste a big chunk of uncommented code and ask for people to fix it for your [13:42] Emmanuel`: you * [13:42] m0s has joined the channel [13:43] TheJH: Emmanuel`, sorry, I'll add some comments [13:43] alnewkirk has joined the channel [13:43] mehtryx has joined the channel [13:43] Sazpaimon_ has joined the channel [13:43] ryanfitz has joined the channel [13:44] neorab has joined the channel [13:50] ksheurs has joined the channel [13:50] ksheurs has left the channel [13:51] dnjaramba has joined the channel [13:51] willwhite has joined the channel [13:52] brolin has joined the channel [13:54] TheJH: Emmanuel`, added comments: https://gist.github.com/1136807 [13:55] edude03 has joined the channel [13:56] piscisaureus has joined the channel [13:56] Emmanuel` has joined the channel [13:56] pibi has joined the channel [13:57] TheJH: Emmanuel`, did you get my message? [13:57] bshumate has joined the channel [13:57] bshumate has joined the channel [13:57] TheJH: (just asking because you reconnected) [13:57] Poetro has joined the channel [13:57] Poetro has joined the channel [13:57] Emmanuel`: (sorry, gotta go, it's super late here :/ [13:57] TheJH: :( [13:58] TheJH: anyone else who could take a look? https://gist.github.com/1136807 [13:58] pibi has left the channel [14:00] cosmincx has joined the channel [14:01] jomoho has joined the channel [14:01] tonnie has joined the channel [14:01] kdng-tr7 has joined the channel [14:02] springmeyer has joined the channel [14:02] Swimming_bird has joined the channel [14:02] nielsbusch: TheJH: Thanks a lot [14:02] blup: ive never worked with proxies. ive installed polipo(:8123) + Tor(:9050), and would like to know if its possible to use node's request with this proxy.. [14:04] linyows has joined the channel [14:05] jbrokc has joined the channel [14:06] gmonnerat has joined the channel [14:06] gmonnerat has left the channel [14:06] baudehlo has joined the channel [14:07] jomoho2 has joined the channel [14:07] zilch has joined the channel [14:07] hidinginabunker has joined the channel [14:07] dmmalam has joined the channel [14:08] dharmesh has joined the channel [14:08] kdng-tr7 has joined the channel [14:09] dharmesh: Hey, I'm trying to write a cakefile which basically exec's 'nodemon server.coffee'. This works but I don't get any output on the console as the exec blocks [14:10] cjroebuck has joined the channel [14:10] dharmesh: task 'start', 'Start the development environment', -> [14:10] dharmesh: exec 'nodemon server.coffee', (err, stdout, stderr) -> [14:10] dharmesh: throw err if err [14:10] dharmesh: console.log stdout + stderr [14:10] explodes has joined the channel [14:10] dharmesh: any ideas on how to make the output of nodemon appear on the console [14:10] dharmesh: ? [14:11] TheJH: dharmesh, use swawn, not exec, that'll give you streams [14:11] TheJH: *spawn [14:11] TheJH: looka t the docs [14:11] TheJH: *look at [14:11] bazookatooth has joined the channel [14:11] dharmesh: TheJH: thanks [14:12] micheil has joined the channel [14:12] madsleejensen has joined the channel [14:13] StepanKuzmin has joined the channel [14:13] ironlad has joined the channel [14:13] stalled has joined the channel [14:13] lapdis has joined the channel [14:14] lapdis has left the channel [14:14] bbrandon has joined the channel [14:15] dominictarr has joined the channel [14:16] pjacobs has joined the channel [14:17] yhahn has joined the channel [14:20] bergie has joined the channel [14:21] micheil has joined the channel [14:24] replore has joined the channel [14:24] replore_ has joined the channel [14:24] aconbere has joined the channel [14:25] deedubs has joined the channel [14:25] loveshine: is there a way to indexOf() a buffer? [14:25] colinclark has joined the channel [14:25] micheil has joined the channel [14:26] loveshine: nevermind. i got it [14:27] bradleymeck has joined the channel [14:28] joost_ has joined the channel [14:28] csanz has joined the channel [14:30] halfhalo-work has joined the channel [14:30] kdng-tr7 has left the channel [14:30] lupomontero has joined the channel [14:31] aconbere has joined the channel [14:31] pixel13 has joined the channel [14:31] pixel13 has left the channel [14:31] liquidproof has joined the channel [14:31] JonWood has joined the channel [14:32] rfay has joined the channel [14:33] kraft has joined the channel [14:34] zilch has joined the channel [14:34] deedubs: what are people using to monitor there boxes [14:34] cronopio has joined the channel [14:34] deedubs: *their [14:36] dharmesh has joined the channel [14:37] scas_ has joined the channel [14:37] sandropadin has joined the channel [14:38] stalled has joined the channel [14:39] smtlaissezfaire has joined the channel [14:40] jakehow has joined the channel [14:40] m0s has joined the channel [14:41] shapeshe1 has joined the channel [14:43] kdng-tr7 has joined the channel [14:43] losing has joined the channel [14:43] TheJH: deedubs, I'm not using it myself, but do you know nagios/icinga? [14:44] deedubs: yeah [14:44] clifton has joined the channel [14:44] TheJH: deedubs, what are your requirements? one or two little services? or more like a bunch of servers with a bunch of deamons? [14:44] mynyml has joined the channel [14:45] deedubs: starting with 5 servers [14:46] ksheurs has joined the channel [14:47] dharmesh_ has joined the channel [14:47] zilch has joined the channel [14:48] TheJH: deedubs, I think I'd either code something myself or use icinga [14:48] jj0hns0n has joined the channel [14:49] kdng-tr7 has left the channel [14:51] softdrink has joined the channel [14:58] bergie has joined the channel [15:01] JumpMast3r has joined the channel [15:02] zilch has joined the channel [15:02] butu5 has joined the channel [15:03] pjacobs2 has joined the channel [15:04] geetarista has joined the channel [15:05] stalled has joined the channel [15:06] RORgasm has joined the channel [15:07] sub_pop has joined the channel [15:07] aheckmann has joined the channel [15:08] jtsnow has joined the channel [15:08] BillyBreen has joined the channel [15:08] hij1nx has joined the channel [15:08] liar has joined the channel [15:08] adambeynon has joined the channel [15:09] kmiyashiro has joined the channel [15:09] zanes has joined the channel [15:10] KellyM has joined the channel [15:10] tristanseifert has joined the channel [15:10] loveshine_ has joined the channel [15:11] tristanseifert has joined the channel [15:12] tristanseifert has joined the channel [15:12] kriszyp has joined the channel [15:13] m00p has joined the channel [15:14] CoverSlide has joined the channel [15:14] zilch has joined the channel [15:15] rfay has joined the channel [15:15] andree has joined the channel [15:17] carmony has joined the channel [15:18] andree has joined the channel [15:18] gazumps has joined the channel [15:19] kulor-uk has joined the channel [15:19] matomesc has joined the channel [15:19] fatjonny has joined the channel [15:20] andree has joined the channel [15:20] raphdg has joined the channel [15:20] Borgoluzzuo has joined the channel [15:22] csanz has joined the channel [15:22] stutter has joined the channel [15:25] fattytuna has joined the channel [15:28] tjholowaychuk has joined the channel [15:30] ryanfitz has joined the channel [15:32] hidinginabunker has joined the channel [15:33] smtlaissezfaire has joined the channel [15:35] gxdssoft has joined the channel [15:35] eguest309 has joined the channel [15:36] materialdesigner has joined the channel [15:36] Poetro has joined the channel [15:36] eguest309: hello guys. [15:37] CoverSlide: hello [15:37] TheJH: hello [15:37] eguest309: hope u are cool.had a question i needed some help with . [15:37] TheJH: eguest309, just ask [15:38] eguest309: i wnated ot be able to create a socket connections using node.js using a particualr virtual adaptor i have created [15:38] eguest309: and i wnat the socket connection to be binded to that particuar virtual adaptor [15:38] eguest309: is that possible ? [15:38] TheJH: eguest309, you can bind to a specific IP [15:39] fostah has joined the channel [15:39] stalled has joined the channel [15:39] jshaw has joined the channel [15:39] TheJH: eguest309, is your node program the client or ther server? [15:39] TheJH: *the server [15:39] eguest309: the client [15:39] eguest309: not hte server [15:39] eguest309: :) [15:40] odie5533: Does anyone know a date/time module for Node.JS that works? [15:40] eguest309: so lets say i have eth1,eeth2,eth3 and i want to use eth1 for the client side and be able to dynamaically change them and use those ones for the socekt connecions [15:40] eguest309: is that possible? [15:40] odie5533: I need to offset a timezone and parse a timestamp. Date.JS's timezone stuff doesn't work. [15:42] jbpros has joined the channel [15:42] TheJH: eguest309, I don't think so, but you could set up a firewall to do that if you're root [15:43] stephank has joined the channel [15:43] seawise has joined the channel [15:43] segfault has joined the channel [15:43] segfault has left the channel [15:43] eguest309: okay TheJH [15:44] navaru has joined the channel [15:45] kenperkins has joined the channel [15:45] eguest309: will try that.so how would i use the firewall to do that?i have to set up rules? cuz i want toe other connections to be still persistant [15:47] TheJH: eguest309, set up a rule like "reject if incoming and dstport is 8080 and interface isnt eth0" or so [15:47] rfay has joined the channel [15:48] TheJH: eguest309, you might want to ask in ##unix or so [15:51] Eastender has joined the channel [15:53] mynyml has joined the channel [15:55] guillermo has joined the channel [15:55] dnjaramba has joined the channel [15:56] fdenbow has joined the channel [15:56] shinuza has joined the channel [15:56] hl7Guy has joined the channel [15:57] mikaX:  [15:57] mikaX:  [15:57] kevwil has joined the channel [15:57] tomb_ has joined the channel [15:58] ccare has joined the channel [15:58] hl7Guy: Hi All. I'm looking for a framework to develop a restful api for some software I'm developing. I'm aware of geddy. Is there any other options out there? [15:59] broofa has joined the channel [16:00] thinkt4nk has joined the channel [16:00] alvaro_o has joined the channel [16:00] JP| has joined the channel [16:01] CoverSlide: hl7Guy: geddy sucks, more mvc than rest [16:02] CoverSlide: restify is designed for rest [16:02] alvaro_o has left the channel [16:02] CoverSlide: or express, which is most common, but has some extra stuff for templates / etc [16:02] yumatov has joined the channel [16:03] hl7Guy: Nice. I'm going to check it out. Thanks for the advise. [16:03] dguttman has joined the channel [16:04] NetRoY has joined the channel [16:04] odie5533: I called new Date().toLocaleString() and it doesn't work in Node.JS. [16:04] harthur has joined the channel [16:04] odie5533: It gives me the time in GMT, followed by GMT+0000 (Central Standard Time), although the time it outputs it GMT and not CST. [16:05] kenperkins has joined the channel [16:06] sa_ has joined the channel [16:06] ironlad has joined the channel [16:06] sa_: does windows users for node expect something for Node in Window? [16:07] odie5533: sa_ wat [16:07] sa_: ^^ [16:08] sa_: @odie5533 i was asking, if should i expect something good using node in windows. [16:08] odie5533: sa_: I use node on windows. [16:08] criswell has joined the channel [16:09] sa_: odie5533: Is it fine good or what? [16:09] odie5533: it works for the most part [16:09] odie5533: modules that require being compiled do not work [16:09] odie5533: which is a big drawback. [16:10] sa_: odie5533: how about sockets? [16:10] odie5533: they work fine of course [16:10] odie5533: most of the popular frameworks work fine too [16:10] colinclark has joined the channel [16:10] sa_: thats nice [16:11] sa_: 0.5.4 this month? [16:11] odie5533: week [16:11] sa_: lulz.. very nice [16:13] caolanm has joined the channel [16:13] jetienne has joined the channel [16:13] c4milo1 has joined the channel [16:14] sa_: any heads-up expectation about the release? if the team dont mind me askin' [16:14] robertfw has joined the channel [16:15] Borgoluzzuo has joined the channel [16:15] odie5533: what release [16:15] CoverSlide: less breakage [16:15] CoverSlide: like from 99% down to 98% [16:15] luke` has joined the channel [16:16] sa_: CoverSlide: ow thats a start.. 1% is alot actually [16:16] davidascher has joined the channel [16:16] sa_: odie5533: to be.. 0.5.4 release [16:16] sa_: npm on windows too? [16:16] abraxas has joined the channel [16:16] Gekz has joined the channel [16:16] markdaws has joined the channel [16:17] sa_: am i repeating this questions? did this questions asked today? [16:17] luke`_ has joined the channel [16:17] CoverSlide: npm on windows will take much longer [16:18] CoverSlide: it's on the roadmap [16:18] sa_: CoverSlide: Can u point me to that link? [16:19] hornairs has joined the channel [16:19] kdng-tr7 has joined the channel [16:20] sbisbee has joined the channel [16:20] CoverSlide: sa_: http://groups.google.com/group/nodejs/browse_thread/thread/4b8c8485ba1b5ee9/a1f260920099862b?lnk=gst&q=npm+windows#a1f260920099862b [16:22] WarriorSl has joined the channel [16:23] dherman has joined the channel [16:23] kdng-tr7 has left the channel [16:23] eastender has joined the channel [16:23] kdng-tr71 has joined the channel [16:24] dgathright has joined the channel [16:24] sa_: CoverSlide: tnx for the link.. [16:25] Stythys has joined the channel [16:25] sa_ has left the channel [16:26] nielsbusch has joined the channel [16:26] burningdog has joined the channel [16:27] nhaesler has joined the channel [16:27] niels_ has joined the channel [16:28] TooTallNate has joined the channel [16:28] necrodearia has joined the channel [16:29] tomb| has joined the channel [16:29] cying has joined the channel [16:29] mundanity has joined the channel [16:32] TheFuzzball has joined the channel [16:33] jbrokc has joined the channel [16:33] hybsch has joined the channel [16:34] yozgrahame has joined the channel [16:35] Anon2815 has joined the channel [16:35] bengrue has joined the channel [16:35] Anon2815: lol [16:35] maushu has joined the channel [16:35] eguest309 has joined the channel [16:36] Newbie: lol [16:36] Guest44439 has left the channel [16:36] icebox has joined the channel [16:36] ksheurs has joined the channel [16:36] tuhoojabotti: How can I postpone render function call until onload has been called? :D [16:37] kdng-tr7 has joined the channel [16:37] CoverSlide: onload? [16:38] icebox: Hello... I have been trying to call a socket write in a data event handler, but I get an error: Socket is not writable ... Any idea? [16:38] CoverSlide: from the browser? [16:39] CoverSlide: icebox: perhaps the socket is closed? [16:39] icebox: icebox: no... I don't think so [16:39] dexter_e has joined the channel [16:39] klovadis: icebox: perhaps you're sending data beefore the socket is fully opened? [16:40] icebox: klovadis: no... I am in the data event, after the connect event [16:40] Destos has joined the channel [16:41] kdng-tr7 has joined the channel [16:41] icebox: Generally speaking, is it possible to make a write in the data event handler? [16:41] joshthecoder has joined the channel [16:41] klovadis: that should not be a problem in general [16:41] icebox: klovadis: ok... [16:41] klovadis: reading and writing are two different streams afaik [16:42] icebox: klovadis: I think it is not a race condition because I tried to call mysocket.write... in the debugger and I get the same error [16:44] klovadis: icebox: it does sound as if there is another problem concerning your socket, not related to the data sending. try and get a stripped down version working with some dummy data beforehand [16:44] CoverSlide: icebox: are you trying to write from an asynchronous call? [16:44] wookiehangover has joined the channel [16:44] icebox: I need to make a write call in the data event handle, because I need to serialize (like callbacks in async or step modules) a few writes after the first one [16:44] MarkMenard has joined the channel [16:44] icebox: CoverSlide: well... yes [16:44] CoverSlide: icebox: maybe some code will help [16:45] ronnieboy has joined the channel [16:45] CoverSlide: possibility of the socket being closed before getting to that write [16:45] Aikar: !nuke showing [16:45] icebox: CoverSlide: sure but I have not a simple snippet [16:45] Aikar: wrong chan [16:45] CIA-65: node: 03Fedor Indutny 07master * r942f8b5 10/ (doc/api/tls.markdown lib/tls.js): [16:45] CIA-65: node: Add NPN and SNI documentation. [16:45] CIA-65: node: Fixes #1420. [16:45] CIA-65: node: Fixes #1426. - http://bit.ly/n5qWlY [16:45] CoverSlide: icebox: try to isolate the issue as much as possible [16:46] icebox: CoverSlide: I don't think so... if the socket is closed there is the end event handler and it is not called [16:46] chapel: Has anyone load balanced socket.io, if so, with what, and what about fallbacks? [16:46] indutny: yeah [16:46] icebox: CoverSlide: sadly the client is parsing a binary protocol... if I delete that logic, there is the classic client example [16:47] hippich has joined the channel [16:47] hippich has joined the channel [16:47] spcshpopr8r has joined the channel [16:47] dguttman has joined the channel [16:48] icebox: I will give look in-depth again... thanks for the suggestions [16:49] Roocy has joined the channel [16:49] jomoho has joined the channel [16:51] jshaw has joined the channel [16:55] JumpMast3r has joined the channel [16:56] robi42 has joined the channel [16:56] robi42 has joined the channel [16:56] jerrysv has joined the channel [16:57] harthur: mikeal: can you publish a new npm:couchapp with that loadFiles() [16:58] ericmuyser has joined the channel [16:58] davidwalsh has joined the channel [16:59] eguest309 has joined the channel [17:00] jtsnow has joined the channel [17:01] colinclark has joined the channel [17:01] kdng-tr7 has left the channel [17:03] yozgrahame1 has joined the channel [17:03] yozgrahame2 has joined the channel [17:04] towski has joined the channel [17:04] kdng-tr7 has joined the channel [17:04] yozgrahame1 has joined the channel [17:05] yozgrahame3 has joined the channel [17:05] Me1000 has joined the channel [17:05] cjroebuck has left the channel [17:05] zilch has joined the channel [17:05] yozgrahame1 has joined the channel [17:06] rickharrison has joined the channel [17:06] kdng-tr7 has left the channel [17:07] towski has joined the channel [17:08] jscheel has joined the channel [17:08] ericmuyser has joined the channel [17:10] jtrudeau has joined the channel [17:10] eyesUnclouded has joined the channel [17:10] curtischambers has joined the channel [17:11] Wa has joined the channel [17:13] madsleejensen has joined the channel [17:13] booo has joined the channel [17:15] Cleer has joined the channel [17:16] AvianFlu has joined the channel [17:16] hidinginabunker has joined the channel [17:16] DavidElias has joined the channel [17:17] kdng-tr7 has joined the channel [17:18] astropirate has joined the channel [17:19] dshaw_ has joined the channel [17:19] nhaesler has joined the channel [17:19] Spion has joined the channel [17:20] JonWood has left the channel [17:21] Murvin has joined the channel [17:24] margle has joined the channel [17:24] heavysixer has joined the channel [17:26] dipser_ has joined the channel [17:26] sweetd has joined the channel [17:26] robotmay has joined the channel [17:26] cconstantine has joined the channel [17:26] cconstantine: has anyone gotten the 'pam' module in npm to work? [17:27] isaacs has joined the channel [17:27] jbrokc has joined the channel [17:28] scott_gonzalez has joined the channel [17:29] eignerchris has joined the channel [17:31] dherman has joined the channel [17:31] topaxi has joined the channel [17:31] vid__ has joined the channel [17:32] seivan has joined the channel [17:32] vid__ has joined the channel [17:32] adambeynon has joined the channel [17:32] e6nian has joined the channel [17:33] unlink has joined the channel [17:33] unlink has joined the channel [17:33] robi42 has joined the channel [17:34] e6nian: if I use ` try{ async.forEach(...)}catch(e){callback(e)}`, would the callback stay sync with async.forEach done? [17:35] maushu: Dammit. ssh is hard [17:36] astropirate: maushu, using ssh? [17:36] tuhoojabotti: I use telnet to irc. [17:36] jesusabdullah: <_> [17:36] chapel: indutny: mind sharing? [17:36] maushu: I want to make a sshd with my own authentication. [17:37] indutny: chapel: yep, I'm happy that NPN and SNI docs landed [17:37] chapel: cool [17:37] indutny: chapel: you can try to balance it with node--http-proxy [17:37] cying has joined the channel [17:37] chapel: yeah, just not sure how it handles connection failures and fallback methods [17:37] indutny: s/node--http-proxy/node-http-proxy [17:37] chapel: lets say a server goes down [17:37] e6nian: ACTION sleepy [17:38] indutny: it should handle it correctly [17:38] indutny: it's designed to handle it correctly [17:38] indutny: because it's part of our opensource production stack [17:38] CoverSlide: indutny: you [17:38] indutny: CoverSlide: you [17:39] CoverSlide: 're a jitsu dude? [17:39] chapel: :) [17:39] chapel: well thanks indutny [17:39] indutny: CoverSlide: yes [17:39] tilgovi has joined the channel [17:39] tilgovi has joined the channel [17:41] nerdfiles1 has joined the channel [17:41] yumike has joined the channel [17:41] nerdfiles1 has left the channel [17:42] heavysixer has joined the channel [17:43] davemo has joined the channel [17:43] maushu: Ok, got another sshd running on 2222. [17:44] CoverSlide: someone in #javascript got ssh working in the browser via websockets [17:44] CoverSlide: was a few months back though, can't remember the username [17:45] meandi has joined the channel [17:46] maushu: CoverSlide: Hmmm, websockets? [17:46] maushu: Well, they probably proxied it into sshd. [17:46] maushu: Since the protocols are completely different. [17:47] CoverSlide: most likely [17:47] csm_ has joined the channel [17:47] maushu: Doesn't matter though, its running. RUNNING. [17:47] cconstantine: has anyone gotten the 'pam' module in npm to work? [17:48] CoverSlide: cconstantine: seems the guy only tested on Fedora 15 [17:48] cronopio has joined the channel [17:48] CoverSlide: haven't looked at the code [17:48] cconstantine: CoverSlide, yeah, I don't understand native node plugins so the code is fairly meaningless to me [17:48] Stythys has joined the channel [17:49] cconstantine: it 'require's all right, but the only module level method (PAM) fails the assertion "handle->InternalFieldCount() > 0" [17:50] bryn_ has joined the channel [17:50] charleyd has joined the channel [17:50] loob2 has joined the channel [17:52] dgathright has joined the channel [17:53] indexzero has joined the channel [17:53] hidinginabunker has joined the channel [17:55] progme has joined the channel [17:56] catb0t has joined the channel [17:58] geetaris_ has joined the channel [17:59] Murvin: I've a node server running and going to production soon. and now, I've to think about how to change the server in maintenance mode. should I store a flag in DB and every call will check this. Then change a global variable and make all http request return "Maintenance Mode" [17:59] rfay has joined the channel [17:59] Murvin: or make a app.get('/setMaintenance'). that set the server in maintnenace mode [17:59] CIA-65: node: 03Bert Belder 07master * rc96ef84 10/ (test/simple/test-sync-fileread.js test/fixtures/x.bin): [17:59] CIA-65: node: Revert "Make test-sync-fileread pass even when git cr/lf conversion is enabled" [17:59] CIA-65: node: We'll solve this problem with a .gitattributes file. [17:59] CIA-65: node: This reverts commit 27ef0b0903e348cc10d0c5d2ee2ef25aa1676440. - http://bit.ly/p1vRBG [17:59] CIA-65: node: 03Bert Belder 07master * r43da0e6 10/ .gitattributes : [17:59] CIA-65: node: Explicitly disable cr/lf conversion for test fixtures [17:59] CIA-65: node: Otherwise git's autocrlf feature makes test fail on windows. - http://bit.ly/rdyz1T [17:59] ianward has joined the channel [17:59] Murvin: or is there other simpler and secure way to do it? I 've direct access to the server. [18:00] ParadoxQuine has joined the channel [18:00] saikat has joined the channel [18:01] jacobolus has joined the channel [18:01] aheckmann has joined the channel [18:02] tauren has joined the channel [18:02] CoverSlide: Murvin: easy way is to add a middleware that checks that variable, and throws up that page if true [18:02] hugh has joined the channel [18:02] CoverSlide: at the top of the stack [18:02] CoverSlide: before all routing calls [18:02] gde33 has joined the channel [18:03] zilch has joined the channel [18:03] Murvin: CoverSlide: but, which way is the good way to set the variable while the server is running. [18:03] TheFuzzball has joined the channel [18:04] balaa has joined the channel [18:04] CoverSlide: don't know if there is a "the" good way [18:04] jhurliman has joined the channel [18:05] CoverSlide: "a" good way is to have some interface that is only exposed to localhost [18:05] CoverSlide: connected to the process, or the database if you want to go that route [18:06] softdrink: add a signal handler to sigusr1 or something? [18:06] CoverSlide: if you want to be able to access it remotely, make sure to use ssl [18:07] CoverSlide: softdrink: ooh that works [18:08] stisti has joined the channel [18:09] explodes has joined the channel [18:10] __tosh has joined the channel [18:12] fille has joined the channel [18:12] fille: yo oy [18:13] CoverSlide: oy [18:14] plov has left the channel [18:15] dnjaramba has joined the channel [18:16] bradleymeck: anyone know marcel's irc handle? [18:18] Isaiah has joined the channel [18:18] Roocyy has joined the channel [18:20] draginx1 has joined the channel [18:20] Generic_Dumbass has joined the channel [18:21] draginx1: Is there a way for my to see information on all socket "actions" (including connect) with socket.io? [18:21] draginx1: s/see/set [18:21] bradleymeck: override .emit [18:22] draginx1: override.. same manner as I would with lets say.. ruby? [18:22] reid has joined the channel [18:22] bradleymeck: socket = ...; oldemit = socket.emit; socket.emit = function emit() {preemit(...);oldemit.apply(this, arguments);postemit(...)} [18:22] bradleymeck: draginx1 ^ [18:22] mikeal has joined the channel [18:23] draginx1: hmm interesting [18:23] CoverSlide: another argument for .onAny [18:23] bradleymeck: i guess, hook is a better term than override [18:23] mscdex: bradleymeck: marcel who? [18:23] bradleymeck: node-fibers dude [18:23] perezd has joined the channel [18:23] mscdex: oh [18:23] draginx1: bradleymeck: the problem with this is.. I mean would this technically send the additional info to the server? [18:24] draginx1: this just seems ot give me the ability to add functions [18:24] draginx1: let me see :) thanks [18:24] CIA-65: node: 03Ryan Dahl 07master * r4983bd3 10/ (3 files in 2 dirs): [18:24] CIA-65: node: x-platform func for spawning pwd in tests [18:24] CIA-65: node: Fixes test-child-process-buffering - http://bit.ly/nzXOzV [18:24] mscdex: i'm not sure they come in here? [18:24] bradleymeck: coverslide dont have onany always [18:24] bradleymeck: mscdex he does on occasion [18:24] mscdex: ah [18:25] mscdex: he must be in a different stack right now ;-) [18:25] Fuu`` has joined the channel [18:27] adrianolaru has joined the channel [18:27] Draggor: Whee, forking webcl for node, making some fixes, and hopefully pushing it to npm this week [18:28] Draggor: Or rather forking fifield's node-webcl and fixing things in there [18:28] CrankyMonkey has joined the channel [18:29] CrankyMonkey: Anyone working on a YAML compliant module using libyaml? [18:30] dgathright_ has joined the channel [18:31] ekryski has joined the channel [18:31] ryanfitz has joined the channel [18:32] markwubben has joined the channel [18:32] agnat_ has joined the channel [18:33] odie5533: Is there a way to get the local time zone in node.js? [18:33] threecreepio has joined the channel [18:33] CrankyMonkey: nevermind… found this [18:33] CrankyMonkey: https://github.com/stephank/yaml.node [18:33] CIA-65: node: 03Ryan Dahl 07master * r35d0df9 10/ test/common.js : test: Allow common.ddCommand to be run in presence of existing file - http://bit.ly/oCfDUT [18:33] CoverSlide: tj has a yaml module [18:34] saikat has joined the channel [18:34] CoverSlide: but i think it's native, and doesn't use libyaml [18:34] CrankyMonkey: is it js-yaml? [18:34] CoverSlide: i personally prefer native modules when I can [18:34] kawaz has joined the channel [18:34] odie5533: Me too. because compiled modules dont work on windows xD [18:35] hlindset has joined the channel [18:35] CoverSlide: i think js-yaml is it [18:35] CrankyMonkey: yeah but js-yaml won't work. [18:35] ryanfitz_ has joined the channel [18:35] tbranyen: there is no good js yaml :( [18:35] tbranyen: ~someday~ [18:35] CrankyMonkey: We have a bunch of yaml files [18:36] draginx1: Any idea why socket.io will not work when i try to connect to localhost:15509 and im listen(ing) on 15509 and node chat.js works fine? =/ [18:36] CrankyMonkey: and js-yaml throws exceptions on most of our files [18:36] CoverSlide: report it: https://github.com/visionmedia/js-yaml/issues [18:36] tjholowaychuk: my yaml lib isn't really maintained [18:36] tjholowaychuk: i'll accept patches but i dont put much effort into it [18:36] tjholowaychuk: i dont use yaml for anything [18:37] CrankyMonkey: It's a bunch of legacy stuff done in YAML [18:37] CoverSlide: no reason to outside of python [18:37] CoverSlide: .json ftw! [18:37] CrankyMonkey: it's unavoidable for us. [18:37] `3rdEden has joined the channel [18:37] pita has joined the channel [18:38] pita: does someone know if the crypto functions are avaible with node 0.5 under windows? [18:40] zilch has joined the channel [18:40] odie5533: pita: some are [18:40] nrajlich has joined the channel [18:40] pita: odie5533: whats about the hash function ? [18:40] odie5533: yes [18:40] odie5533: md5, sha1 [18:40] pita: odie5533: great, thx [18:40] pita: odie5533: or wait, whats about sha256 ? [18:41] odie5533: dno [18:41] odie5533: yes [18:41] odie5533: sha256 works on windows [18:42] pita: oldie5533: ok, thx [18:42] kavla has joined the channel [18:42] odie5533: np [18:43] dshaw_: SubStack: ? [18:46] ts__ has joined the channel [18:46] ts__ has joined the channel [18:47] mquin has joined the channel [18:47] AvianFlu has joined the channel [18:48] balaa has joined the channel [18:49] odie5533: Is there anyway to get the local time zone in Node.js? [18:50] creationix has joined the channel [18:50] jetienne has joined the channel [18:50] davidascher has joined the channel [18:50] Aikar: any idea why Chrome 14 is blowing up with Socket.IO ? [18:50] Aikar: It uses XHR-Polling and constantly fires disconnect [18:50] `3rdEden: Aikar because it uses a different websocket specification [18:50] dshaw_: hybi-10 is not supported [18:51] kevwil has joined the channel [18:51] Aikar: `3rdEden: what does socket.io use? is chrome using some newer spec? [18:51] CoverSlide: jesus it's using hybi-10? [18:51] dshaw_: Chrome dev channel [18:52] `3rdEden: Aikar socket.io has support for Draft 75 & 76 [18:52] `3rdEden: so yes, chrome has now implemented a new spec [18:52] CoverSlide: node-websocket-server uses -07 [18:52] CoverSlide: iirc [18:52] CoverSlide: s/uses/supports [18:52] CoverSlide: not sure what the differences in spec are [18:53] CoverSlide: i can't stand reading ietf drafts [18:53] dshaw_: lol [18:53] dshaw_: yeah [18:53] temp02 has joined the channel [18:53] dshaw_: OAuth used to have handy diff views [18:53] jakeg has joined the channel [18:53] thalll has joined the channel [18:54] dshaw_: Not sure if that exists in for ws specs [18:54] `3rdEden: Guest61903: (rauchg) can comment on the whole hybi-10 thing for sockeet.io! [18:54] CoverSlide: oh wait no it doesnt [18:54] `3rdEden: :$ [18:54] `3rdEden: You can hide under guest names all you want rauchg but we know you are here ;) [18:55] CoverSlide: nvm something else was using -07 [18:55] patcito has joined the channel [18:55] dshaw_: Last time I checked, my Chrome dev channel is actually reporting −08. [18:56] blup: ive never worked with proxies. ive installed polipo(:8123) + Tor(:9050), and would like to know if its possible to use node's request with this proxy.. [18:56] Aikar: so, does firefox5 ubuntu package happen to turn websockets back on? [18:56] Aikar: cause it works for me on firefox 5 in ubuntu [18:56] Aikar: but seeing it blow up in chrome 14, and blows up on firefox 5 on mac [18:56] CoverSlide: they might have enabled the flag [18:56] CoverSlide: in ubuntu [18:57] isaacs has joined the channel [18:57] Aikar: is there a reason socket.io doesnt support the new specs yet? [18:57] jscheel has left the channel [18:57] `3rdEden: Aikar time [18:57] `3rdEden: because we don't have enought of that [18:57] neilk_ has joined the channel [18:57] hlindset has joined the channel [18:57] `3rdEden: But it's open source, feel free to fork and add it ;) [18:58] Aikar: hmm, so is it normal for XHR Polling to fire disconnect events? [18:58] `3rdEden: ofc not :) [18:58] eyesUnclouded has joined the channel [18:58] `3rdEden: But I already fixed that [18:58] `3rdEden: and should be ready soon-ish [18:59] Aikar: oh ok... cause was gonna say thats what i mean by "blowing up" [18:59] `3rdEden: Aikar still got to write a shit load of tests cases before I'm going to release another batch of changes [19:00] Aikar: I set it to reload the page on a disconnect event, and so on every browser except the one i tested it on its just slow loading and refreshing lol... :( [19:00] garrensmith has joined the channel [19:00] indexzero has joined the channel [19:00] `3rdEden: Aikar you shouldn't be doing that... [19:00] Aikar: for what im doing yeah thats what i want [19:00] `3rdEden: Mobile devices with allot of latency or network issues... [19:00] Aikar: its just a dashboard [19:00] Aikar: this wont be on a mobile device [19:01] Aikar: very specific use case [19:01] `3rdEden: on disconnect just do another connect [19:01] Aikar: for internal use [19:01] Aikar: i use that as a way to make clients refresh anytime i push a new version of server [19:01] Aikar: for the way im using it, its fine [19:02] Stythys has joined the channel [19:04] draginx1: http://pastie.org/private/eah5nlpbukskgrke0ld84a why is node_redis cimplaining about pub/sub only resource? I *am* doing that =/ [19:04] tilgovi_ has joined the channel [19:04] tilgovi_ has joined the channel [19:05] lukstr: isaacs: nodeup: I can only see the dates through the RSS feed -- any chance in putting those in the show notes? [19:05] isaacs: lukstr: talk to cjm [19:06] lukstr: will do [19:06] lukstr: cjm: hullo [19:06] draginx has joined the channel [19:06] draginx has joined the channel [19:07] mikeal has joined the channel [19:07] baudehlo has joined the channel [19:07] techwraith has joined the channel [19:08] Destos has joined the channel [19:09] admc has joined the channel [19:10] whitman has joined the channel [19:11] tim_smart has joined the channel [19:11] kevwil: hello all [19:11] kevwil: I'm looking for help with formidable [19:12] zilch has joined the channel [19:12] joaosilva has joined the channel [19:12] temp01 has joined the channel [19:13] tim_smart has joined the channel [19:13] draginx: http://pastie.org/private/eah5nlpbukskgrke0ld84a why is node_redis ciomplaining about pub/sub only resource? I *am* doing that [19:13] eldar has joined the channel [19:14] broofa has joined the channel [19:14] maushu has joined the channel [19:14] hellp has joined the channel [19:15] tim_smart has joined the channel [19:15] cce: ACTION suggests anyone porting YAML to Javascript should do a trans-coding of PyYAML (rather than working from the spec) [19:16] tbranyen: lol the spec [19:16] tbranyen: is ridic [19:16] tbranyen: i looked into it [19:17] gr-eg has joined the channel [19:18] Aiden has joined the channel [19:18] madsleejensen has joined the channel [19:18] pixel13 has joined the channel [19:19] c4milo1 has joined the channel [19:19] joaosilva has joined the channel [19:19] MarkMenard has joined the channel [19:19] kevwil: has anyone in here successfully used node-formidable before? [19:20] pixel13 has left the channel [19:20] CoverSlide: kevwil: what's your question? [19:20] kevwil: CoverSlide: I've been having trouble with it hanging for the last few days ... not sure what question to ask [19:21] kevwil: I saw an issue about conflicts with the 'request' module, so I refactored that out of my app, but it still won't take uploads [19:21] kevwil: this used to work six months ago, but I don't know what version of Node or node-formidable I was using [19:22] hidinginabunker_ has joined the channel [19:22] CoverSlide: hangs on every request? [19:22] cjm: luksrt: will do [19:22] dreamdust1 has joined the channel [19:23] Juan77 has joined the channel [19:23] Juan77 has left the channel [19:23] jetienne has joined the channel [19:23] kevwil: CoverSlide: yes ... form.parse(req, function(err,fields,files){}) never arrives in the callback function [19:23] kevwil: it appears the browser re-tries the request once before quitting [19:24] AvianFlu has joined the channel [19:26] Newton has joined the channel [19:26] mikeal has joined the channel [19:27] balaa has joined the channel [19:27] matyr has joined the channel [19:29] sveisvei has joined the channel [19:30] kevwil: CoverSlide: since I'm working in an express.js app, perhaps I should use connect-form instead of node-formidable? [19:30] fcambus has joined the channel [19:30] CoverSlide: as long as you've got the callbacks working correctly it shouldn't be necessary to switch [19:31] CoverSlide: if you had it working before, then I dunno [19:31] kevwil: oh, nevermind, that just uses node-formidable underneath [19:32] jscheel has joined the channel [19:32] jscheel has left the channel [19:32] mikeal has joined the channel [19:33] heavysixer has joined the channel [19:33] wilmoore has joined the channel [19:34] draginx: http://pastie.org/private/mcnt1irh6kawhw8oc9elrq how do I get the publish.on('message') to only message those who are subscribed to the guild_1 chatroom? O-o [19:37] _JSilva has left the channel [19:38] _JSilva has joined the channel [19:40] adrianmg has joined the channel [19:40] Sazpaimon__ has joined the channel [19:42] TheLifelessOne has joined the channel [19:42] tilgovi has joined the channel [19:42] tilgovi has joined the channel [19:43] kavla: Got a socket.io question and #socket.io is rather silent. Anyone here using socket.io rooms successfully? [19:43] TheLifelessOne: is there any way to do a command-line interface with a JavaScript app written for node? [19:44] kavla: Lifeless: look into the docs around process [19:44] AvianFlu: TheLifelessOne: of course, you should check out http://github.com/nodejitsu/node-prompt and http://github.com/substack/node-optimist [19:44] AvianFlu: the first for using STDIN, the second for ARGV stuff [19:44] AvianFlu: or you can look at the process module and do it by hand :) [19:45] TheLifelessOne: Thanks. [19:45] aconbere has joined the channel [19:45] kavla: It's not that hard to do by hand [19:45] Aikar: `3rdEden: is there a test version of socket.io i can use to fix that bug? [19:45] AvianFlu: it's not hard to do it by hand until you have to get fancy [19:45] CoverSlide: depending on how complex you want it [19:45] AvianFlu: optimist in particular can be a godsend [19:45] kavla: true ture [19:45] bazookatooth has left the channel [19:46] mikedeboer has joined the channel [19:46] maqr has joined the channel [19:47] TheLifelessOne: Do either of those modules support reading from and wiritng to a stdin and stdout? [19:47] TheLifelessOne: Kinda like the cin and cout C++ objects. [19:47] jamund has joined the channel [19:47] tjholowaychuk: process.stdout.write() / console.log() etc [19:48] TheLifelessOne: Alright [19:48] TheLifelessOne: I'll give that a try. [19:48] AvianFlu: or process.stdin.on('data', fn () {} ); [19:48] tjholowaychuk: it's all in the node docs [19:48] CoverSlide: process.stdin.resume() [19:48] tbranyen: node has docs? [19:48] AvianFlu: reading the code counts as docs, doesn't it? XD [19:48] tbranyen: i've just been console.log'ing everything [19:48] TheLifelessOne: Does the ondata event pass any arguments? [19:49] tjholowaychuk: would help if node's code was readable [19:49] AvianFlu: yeah, data [19:49] AvianFlu: I forgot that [19:49] CoverSlide: data is a Buffer, btw. you'd have to toString it [19:49] TheLifelessOne: Alright [19:49] AvianFlu: I find node-core quite readable, aside from the v8 templates [19:49] tjholowaychuk: the c++ is a lot cleaner than the js [19:49] tbranyen: tjholowaychuk: heh i've wanted to go in there and start cleaning up the JavaScript, but :( [19:49] dreamdust1 has joined the channel [19:49] `3rdEden: Aikar it's not ready yet [19:49] D3Vito has joined the channel [19:50] `3rdEden: As it doesn't pass my test suites [19:50] jamund: I have a production server node/express server running using cluster (8 instances) that seems to have a memory leak presumably from bad code. After a few days we get up to 2GB of combined memory usage and the server gets sad, so we restart it. I've tried to use node-inspect locally to see what's going on, but am not able to reproduce the problem on a local box with apachebench and/or a limited number of fake connections. Any sugge [19:50] jamund: on debugging memory usage on a production box? [19:51] `3rdEden: Aikar but like always, i'm spending all my free time on socket.io so it will be done, soon-ish [19:52] zilch has joined the channel [19:52] Aikar: `3rdEden: alright, didnt know if you had it in a 'commited-and-works' state that you simply wasnt ready to release as a ver update [19:53] rc1140 has joined the channel [19:53] `3rdEden: Aikar the bug fix is commited and works, but the rest of the branch isn't :p [19:53] `3rdEden: Because it's a major refactor of the handshake, connect and reconnect [19:54] tjholowaychuk: AvianFlu you guys have a config module right? does it automagically support env vars/flags? like conf.set('some setting', val), --some-setting val, and process.env.SOME_SETTING would be equiv? [19:54] AvianFlu: we have nconf, but I don't believe there's magic env support [19:55] tjholowaychuk: alright thanks [19:55] CoverSlide: ewww [19:55] CoverSlide: why would someone want that [19:56] tjholowaychuk: haha [19:56] lukstr: cjm: thanks :) I couldn't remember the last one I listened to [19:56] tjholowaychuk: because process.env.FOO || 'bar' all over gets pretty nasty [19:56] tjholowaychuk: for something that could easily be automated [19:56] jesusabdullah: I think the question is, why would somebody do configuration through environment vars? [19:56] AvianFlu: you could probably do that pretty easy with nconf + optimist(or just process.argv stuff) and process.env [19:57] jesusabdullah: It's kinda crummy :( [19:57] CoverSlide: seems to be the learnboost way [19:57] tjholowaychuk: jesusabdullah: we have several that are personal to us for testing emails etc in the app [19:57] jesusabdullah: tjholowaychuk: You could write a thin wrapper of some kind for process.env [19:57] TheLifelessOne has left the channel [19:57] jesusabdullah: Yeah, I get that tj, it's just not how I roll when it comes to configs [19:58] jesusabdullah: I like dot-files [19:58] jesusabdullah: not env vars [19:58] tjholowaychuk: sure, it could be anything [19:58] hlindset has joined the channel [19:58] hlindset has joined the channel [19:58] charleyd has joined the channel [20:00] jesusabdullah: tjholowaychuk: You could also probably add some env behavior to optimist as well [20:00] tjholowaychuk: meh [20:00] jesusabdullah: such that certain env flags register into your .argv if they're there [20:00] jesusabdullah: meh? [20:00] jesusabdullah: pffsht I have the BEST ideas [20:00] tjholowaychuk: i dont like option parsers [20:00] tjholowaychuk: switch() [20:01] jesusabdullah: Have you looked at optimist? It's actually pretty boss [20:01] tjholowaychuk: yeah i've seen it [20:01] jesusabdullah: I should add that feature to optimist, that'd rock [20:02] whitman has joined the channel [20:03] sivy has joined the channel [20:03] rfay has joined the channel [20:03] CoverSlide: wtf [20:03] CoverSlide: subby is doing a python parser now? [20:03] fly-away has joined the channel [20:03] jesusabdullah: Who's subby? [20:03] CoverSlide: dude's insane [20:03] jesusabdullah: and I will never ever ever write a song about the subby [20:04] pNstK has joined the channel [20:04] jesusabdullah: Next up is Cover Slide with his hit single, "I frickin' hate Subby" [20:05] TheFuzzb_ has joined the channel [20:06] jetienne: https://docs.google.com/present/view?id=d4wf4t2_251g4kjtwgs slide about webgl but very interesting about data compression between client/server. it may interest some people i think [20:06] odyssey_2001 has joined the channel [20:06] srid has joined the channel [20:06] srid has joined the channel [20:06] CoverSlide: data compression from the client? [20:07] Yuffster has joined the channel [20:07] sivy has joined the channel [20:08] Determinist has joined the channel [20:08] ironlad has joined the channel [20:09] al3xnull_ has joined the channel [20:09] CoverSlide: hmm interesting [20:11] jetienne: CoverSlide: utf8 apparently makes it... the good part is that string are utf8 so it may work for websocket ? [20:12] CoverSlide: yeah i was thinking that [20:12] saikat has joined the channel [20:12] jetienne: if you are the hidden person i think you are, you may be interested :) [20:12] CoverSlide: beats using Buffer.toString("base64") [20:12] jetienne: surely [20:12] CoverSlide: im no hidden person [20:13] jetienne: ok then im wrong [20:13] CoverSlide: who did you think i was? [20:13] jetienne: CoverSlide: note tho that in this case this is about 3D model, so bunch of coord which are close to each other [20:14] jetienne: so it may be cool for general case, but not as much as 3D model which are a very specific case [20:14] whitman has joined the channel [20:15] Generic_Dumbass: My node.js and npm installs are disappearing every time I close the terminal. [20:16] Generic_Dumbass: I used npm to install coffeescript, then next time I called npm it claimed not to be there. [20:16] c4milo1 has joined the channel [20:16] isaacs: Generic_Dumbass: "claimed not to be there"? [20:16] isaacs: what does that mean? [20:16] Generic_Dumbass: sudo:npm: command not found [20:17] Generic_Dumbass: (ubuntu) [20:17] CoverSlide: there's your problem [20:17] isaacs: Generic_Dumbass: sudo perhaps doesn't have the same path? can you do `npm -v` as your own user? what about `which npm1? [20:17] CoverSlide: (not really) [20:17] isaacs: `which npm` [20:17] explodes has joined the channel [20:17] CoverSlide: or use sudo -E [20:17] isaacs: or man sudo [20:17] isaacs: ;P [20:17] Draggor has joined the channel [20:17] Generic_Dumbass: I installed node.js through git, then npm through curl [20:17] chjj: CoverSlide: why so mean? [20:18] isaacs: Generic_Dumbass: ok. that's normal. [20:18] CoverSlide: ACTION looks around [20:18] Generic_Dumbass: sudo and without sudo were the same. [20:18] CoverSlide: what did I do? [20:18] isaacs: Generic_Dumbass: what does `which npm` output? [20:18] chjj: var fn = arguments.callee; [20:18] chjj: while (fn = fn.caller) { [20:18] chjj: if (fn === res.error) return; [20:18] Generic_Dumbass: isaacs: nothing. [20:18] chjj: hmm [20:18] chjj: that was a mistake [20:18] isaacs: Generic_Dumbass: what about `which node`? [20:19] isaacs: Generic_Dumbass: did you do anything to your PATH between now and then? note that changes to environment variables have to be done in .bashrc or .profile files to be picked up on each login. [20:19] chjj: good thing i didnt have anything worthwhile to accidentally paste [20:20] digitaltoad has joined the channel [20:20] digitaltoad has joined the channel [20:20] Generic_Dumbass: which node is the same, nothing. I did nothing to the path except installing [20:20] Generic_Dumbass: Well, thanks. I'll try some other methods [20:20] isaacs: Generic_Dumbass: I know your problem. [20:21] isaacs: Generic_Dumbass: you did `export PATH=blahblahblah` in the shell, which told it how to find node, and then npm picked up the same value to figure out where to install. [20:21] isaacs: Generic_Dumbass: you have to put that export command in your ~/.bashrc file [20:21] CoverSlide: wow [20:21] yozgrahame has joined the channel [20:21] CoverSlide: psychic much? [20:22] Generic_Dumbass: Mmmm. Sweet, sweet knowledge. [20:22] isaacs: CoverSlide: just an educated guess based on past correlation and presented evidence. [20:22] isaacs: been doing this a little while now :) [20:22] CoverSlide: just like any psychic [20:22] CoverSlide: :p [20:22] isaacs: i mean, it's magic powers. i have magic powers. [20:23] isaacs: give me money. [20:23] liquidproof has joined the channel [20:23] isaacs: Generic_Dumbass: is that the answer? did i win the prize? [20:24] chjj: "give me money" rofl [20:24] Roocy has joined the channel [20:27] CIA-65: node: 03Ryan Dahl 07master * r4f03f1b 10/ lib/net_uv.js : net_uv: fix test/simple/test-pipe-file-to-http.js - http://bit.ly/pSTI7R [20:28] explodes has joined the channel [20:28] explodes: What do I do if I want to do a setTimeout inside of a prototype function to recall that function? [20:29] chjj: explodes: what do you mean "recall"? [20:29] chjj: explodes: if you mean return, no, you cant [20:29] chjj: you can execute a callback instead [20:30] margle has joined the channel [20:30] R4md4c has joined the channel [20:30] CoverSlide: explodes: function(){var self = this;setTimeout(self.fn,1000)} [20:30] adrianolaru has left the channel [20:31] explodes: http://pastie.org/2352171 Something like this... [20:31] R4md4c: Hello, How can I get the length of JSON.stringify(object) so that I could set the 'content-length' header properly ? [20:31] CoverSlide: R4md4c: have you tried .length ? [20:31] explodes: When the timer executes the function again, it is executed under the context of the timer... [20:31] chjj: Buffer.byteLength(JSON.stringify(obj)); [20:31] simb has joined the channel [20:32] R4md4c: chjj, Thanks [20:32] CoverSlide: ?? [20:32] simb: Does socket.io have a generic configure that is not dependent on environment/ [20:32] simb: ? [20:32] hidinginabunker has joined the channel [20:32] chjj: oh, explodes, i see what youre saying, theres two things you can do [20:33] CoverSlide: fucking a [20:33] chjj: you can either do `var self = this; setTimeout(function() { self.getDatabase(callback); })` [20:33] chjj: or you can do this.getDatabase.bind(this) [20:33] CIA-65: node: 03Ryan Dahl 07master * rc171a08 10/ Makefile : Add test-pipe-file-to-http to test-uv - http://bit.ly/qHojcQ [20:33] chjj: the former method is usually the preferred way of doing it [20:33] explodes: chjj: that doesnt work because when getDatabase is called again, it is as if it was called like: timer.getDatabase [20:34] CoverSlide: i've sworn off facebook for the past few years, i end up having to make an account for a job interview, now I want to delete it, but already family members are trying to add me [20:34] explodes: Oooh what is bind. [20:34] odie5533: I am doing a forEach on an array and the function performs an async operation on each element. How can I know when they are ALL done? [20:34] chjj: bind essentially wraps the function to give it a specific context [20:34] CoverSlide: odie5533: use a counter in the callback [20:35] Martin___ has joined the channel [20:35] simb: CoverSlide [20:35] mikl has joined the channel [20:35] R4md4c: chjj, Still the length is short than the actual object(The object contains integer numbers BTW) [20:35] simb: CoverSlide I feel the same way about Google+ [20:35] explodes: chjj: So I would want to bind the function in that object's constructor? [20:35] odie5533: CoverSlide: how would I return the counter? [20:35] chjj: odie5533: `var len = a.length; a.forEach(function() { if (!--len) done(); })` [20:35] chjj: something like that [20:35] CoverSlide: the counter would be set outside the callback [20:36] chjj: explodes: it binds to a context, it forces the value of `this` [20:36] chjj: usually the other method i showed you is the preferred way though [20:36] explodes: The other way, i've tried, it doesn't quite work [20:36] chjj: well, it does work [20:36] chjj: try it again [20:37] explodes: Ok i'll try it again [20:37] CoverSlide: it's craziness setTimeout has a different context [20:37] ekryski1 has joined the channel [20:38] explodes: chjj: it DOES work. [20:38] explodes: CoverSlide: true story. [20:38] k1ttty has joined the channel [20:38] CoverSlide: i know i've come up against it myself [20:39] explodes: timers.js explicitly sets the context, too. callback.apply(timer, args); [20:39] chjj: explodes: :) [20:39] explodes: Someone must've thought it was a great idea for some reason [20:39] eyesUnclouded has joined the channel [20:39] whitman has joined the channel [20:40] necrodearia has joined the channel [20:41] `3rdEden: simb if you just do io.configure(function(){}) it will not use any environment flags [20:44] TheJH has joined the channel [20:44] TheJH has joined the channel [20:45] materialdesigner has joined the channel [20:46] explodes: This is complete garbage. I took a smoke break and was thinking there has to be a better way. Turns out, the way I have doesn't actually work. [20:47] Swimming_bird has joined the channel [20:48] hlindset has joined the channel [20:49] curtischambers has joined the channel [20:50] explodes: http://pastie.org/2352171 When this object is constructed, if settings tells it to use a test database, it starts up the test database asynchronously. When that operation is complete, it sets dbServerReady to true. When I do server.getDatabase(function(err, db) {...}), dbServerReady is always false, even though this.dbServerReady = true is executed. [20:50] explodes: Note line 35 and 51 [20:50] levi501d has joined the channel [20:50] idefine has joined the channel [20:51] metamind: hi. i am probably being dense but I'm not sure where to get the client socket.io.js script from. [20:51] ecin has joined the channel [20:51] mrryanjohnston: metamind: you can get it via npm [20:52] explodes: metamind: Follow the instructions on http://npmjs.org/ [20:52] explodes: npm is like PyPi but for Node.js, not python! [20:52] simb has left the channel [20:53] CoverSlide: it should install it as a dep in the latest version at least [20:53] balaa has joined the channel [20:53] metamind: I have done npm install socket.io. but i'm not sure where the client side script ends up. I have a node_modules directory but isn't that server side code? [20:53] `3rdEden: metamind https://github.com/LearnBoost/Socket.IO/wiki/How-do-I-serve-the-client [20:53] geetarista has joined the channel [20:54] idefine: with mongoose how do I get the length of the results when performing a find? [20:54] metamind: oh. ok. thatnks 3rd. [20:56] explodes: Anyone? [20:56] CoverSlide: explodes: you have the same problem [20:56] CoverSlide: on line 36 , make it: }.bind(this)); [20:56] Tobsn has joined the channel [20:57] ceej has joined the channel [20:59] Martin___ has joined the channel [20:59] CIA-65: libuv: 03Bert Belder 07master * rd3cc9a3 10/ (7 files in 2 dirs): Move gyp files to root - http://bit.ly/pJetbX [20:59] CIA-65: libuv: 03Bert Belder 07master * r71396f6 10/ create-msvs-files.bat : Polish create-msvs-files script - http://bit.ly/nS2DmS [20:59] CIA-65: libuv: 03Bert Belder 07master * r9a127af 10/ all.gyp : [20:59] CIA-65: libuv: Add header files to gyp script [20:59] CIA-65: libuv: This makes generated project files more convenient to work with. - http://bit.ly/qZSCAg [20:59] isaacs: explodes: line 52, setTimeout(this.getDatabase, 100, callback); [21:00] isaacs: explodes: that should be setTimeout(this.getDatabase.bind(this, callback), 100) [21:00] isaacs: explodes: otherwise it executes without a "this" reference [21:00] isaacs: explodes: or, var self = this; setTimeout(function () { self.getDatabase(callback) }, 100) [21:02] digitalsabre has joined the channel [21:02] asabil has joined the channel [21:02] caolanm has joined the channel [21:04] fcambus has joined the channel [21:04] metamind: I can't set socket.io.js to be served. http://n4.craft-e.com:3000 is running but it won't serve: http://n4.craft-e.com:3000/socket.io/socket.io.js [21:05] metamind: Have I got the wrong end of the stick> [21:05] wbw72 has joined the channel [21:05] akshatj has joined the channel [21:07] CoverSlide: metamind: have you done io.listen(httpServer)? [21:07] metamind: OK. I've got it. I was, indeed being dense. I had socket.io running on 8081 rather than 3000 (the main server) [21:08] fille: my mud clients have hotkeys [21:08] gazumps has joined the channel [21:09] damiano has joined the channel [21:09] skampler has joined the channel [21:09] fille: sl [21:09] damiano: hello [21:09] CIA-65: node: 03Ryan Dahl 07master * r72c4127 10/ lib/net_uv.js : net_uv: Handle failed shutdown req - http://bit.ly/q7rIbE [21:10] fille: so you are not allowed to have break inside an [].forEach [21:10] CoverSlide: fille: foreach is not a loop [21:10] fille: iteration? [21:11] CoverSlide: there are ways to do it, but forEach is not one of them [21:11] fille: so just use a while then ? [21:11] fille: if i whant to break it? [21:12] robotmay has joined the channel [21:12] joshthecoder has joined the channel [21:12] CoverSlide: you could use [].some and return true when you want to break [21:12] fille: okej [21:13] fille: but i need to return an object [21:13] CrabDude has joined the channel [21:13] CoverSlide: how were you expecting to get that from forEach? [21:14] fille: https://github.com/fille/node-mume/blob/master/js/client.js [21:14] fille: line 47 [21:14] fille: its jquery :( [21:14] hlindset has joined the channel [21:14] 13WAALIRI has joined the channel [21:14] niels_ has joined the channel [21:15] jaequery has joined the channel [21:15] jaequery: hola! [21:15] CoverSlide: basically do the exact same thing, but with a return true on line 54 [21:15] jaequery: anyone alive? [21:15] vid___ has joined the channel [21:16] shapeshed has joined the channel [21:16] balaa_ has joined the channel [21:16] fille: thanks coverslide [21:17] jaequery: anyone know how node.js compares to nginx on serving just static files? [21:17] yhahn has left the channel [21:18] CoverSlide: nginx is better, since javascript doesn't natively support binary data [21:18] RORgasm has joined the channel [21:19] wbw72: hi [21:20] wbw72: any1 using everyauth? [21:20] CoverSlide: although you might also want to look at http://trustleap.com/ [21:20] zanes has joined the channel [21:21] jshaw has joined the channel [21:21] jaequery: G-WAN is a tool made by an engineer who felt that it was easier to write a new application server than to learn how to use any of the existing solutions. [21:21] jaequery: lol [21:21] jaequery: he must've been really lazy or something [21:22] wbw72: i'm trying to use the 'openid' part of it to login with a hyves openid, cant seem to get it to work… it seems to work with the stackexchange openid… any ideas? trying to use 'hyves.nl' as the openid url [21:22] eguest309 has joined the channel [21:22] CIA-65: libuv: 03Ryan Dahl 07master * rb8fe56d 10/ src/uv-unix.c : Remove unnecessary casts - http://bit.ly/ntqfpF [21:22] CIA-65: libuv: 03Ryan Dahl 07master * rdb190c7 10/ src/uv-unix.c : unix: uv_pipe_connect should call uv__stream_open - http://bit.ly/pEdJ68 [21:24] vid__ has joined the channel [21:24] CIA-65: node: 03Ryan Dahl 07master * r46b0654 10/ (17 files in 7 dirs): Upgrade libuv to db190c7 - http://bit.ly/qXHxu3 [21:24] digitalsabre has joined the channel [21:24] explodes: isaacs: CoverSlide: Whoops, i forgot to paste updated code, i have the same problem as i last described but with this code: http://pastie.org/2352171 [21:24] explodes: s/i/I/g [21:24] kevwil has joined the channel [21:25] euforic has joined the channel [21:25] explodes: s/\si\s/I/g* if you want to be really technical [21:25] isaacs: explodes: this.isDbServerReady() is not defined in this code. what is that function? [21:26] explodes: blah, its a getter for this.dbServerReady. [21:26] eguest309: hello.needed some help some socket stuff.i want to create a socekt connection to a remote host but i want to use a specific interface on teh client end.so lets say i have two network interfaces i want to use a specific one .is there a way to do this directly using node.js or do is there a way of creating a socket directly using a shell command then linking to that socket connection somehow in node [21:26] vid___ has joined the channel [21:26] ecin has joined the channel [21:26] CoverSlide: well, line 35 is still your problem [21:27] CoverSlide: this gets reassigned within the initTestServer callback [21:28] CoverSlide: use the self trick, or bind(this) at the end of the function expression [21:28] CoverSlide: (line 36) [21:28] explodes: Oh duh [21:28] explodes: I knew that. [21:28] jaequery: CoverSlide: do you think node.js file server is atleast better than apache? [21:28] jaequery: or worse? [21:28] ts__: hello everybody [21:29] CoverSlide: haven't had the chance to test it, but I believe it's better [21:29] balaa has left the channel [21:29] bengrue has joined the channel [21:29] jaequery: bah [21:30] Nexxy has joined the channel [21:30] CrabDude has joined the channel [21:30] vid__ has joined the channel [21:31] eguest309: any help? [21:31] navaru: I have a question, how come 1 < 2 < 3 // true ,BUT... 1 > 2 > 3 // false (i get that here 1 > 2 // true --> true > 3 // false.. ) but why only the second case? [21:32] CoverSlide: v8: true == 1 [21:32] v8bot_: CoverSlide: true [21:32] navaru: 3 > 2 > 1 , sorry! [21:32] CoverSlide: b8: true > 1 [21:32] CoverSlide: v8: true > 1 [21:32] v8bot_: CoverSlide: false [21:32] CoverSlide: navaru: 1 is not greater than 1 [21:33] dharmesh has joined the channel [21:33] digitalsabre: v8: 1 > 1 [21:33] v8bot_: digitalsabre: false [21:33] navaru: got it! ;) [21:33] navaru: thanks! [21:33] digitalsabre: Wait… is this an IRC bot running V8? [21:34] topaxi: yep [21:34] CoverSlide: no, this is an irc channel [21:34] wbw72: any1 with everyauth openid knowledge? [21:34] CoverSlide: v8bot is an irc bot [21:34] digitalsabre: CoverSlide, you're being way too literal. When I said "this" I meant v8bot_ [21:35] dharmesh has joined the channel [21:37] creationix: v8: Object.getOwnPropertyNames(Object.prototype) [21:37] v8bot_: creationix: ["toString", "__lookupGetter__", "__defineGetter__", "toLocaleString", "hasOwnProperty", "valueOf", "__defineSetter__", "constructor", "propertyIsEnumerable", "isPrototypeOf", "__lookupSetter__"] [21:38] creationix: v8: (function () { Object.getOwnPropertynames(this)}()) [21:38] v8bot_: creationix: TypeError: Object function Object() { [native code] } has no method 'getOwnPropertynames' [21:38] creationix: v8: (function () { Object.getOwnPropertyNames(this)}()) [21:38] v8bot_: creationix: undefined [21:38] arnee has joined the channel [21:38] creationix: interesting [21:38] creationix: I wonder what scope it's running in [21:38] softdrink: didn't return anything there [21:38] digitalsabre: creationix: It seems it's not self-aware? [21:39] pquerna has joined the channel [21:39] creationix: normally, "this" would be the global scope in that example [21:39] CoverSlide: v8: this [21:39] v8bot_: CoverSlide: {} [21:39] digitalsabre: Parent? [21:39] CoverSlide: v8: Object.getOwnPropertyNames(this) [21:39] v8bot_: CoverSlide: ["TypeError", "decodeURI", "print", "parseFloat", "Number", "URIError", "encodeURIComponent", "RangeError", "ReferenceError", "RegExp", "Array", "isNaN", "console", "Date", "Infinity", "Boolean", "Error", "NaN", "execScript", "String", "Function", "Math", "undefined", "encodeURI", "escape", "unescape", "decodeURIComponent", "EvalError", "SyntaxError", "Object", "eval", "parseInt", "JSON", "isFinit [Output truncated...] [21:40] creationix: CoverSlide: that's usually different, you need to call a function without no explicit scope to get the real global [21:40] mikedeboer has joined the channel [21:41] CIA-65: libuv: 03Ryan Dahl 07master * r5dc8037 10/ src/win/process.c : Fix mingw build by using preprocessor correctly. - http://bit.ly/p68AuI [21:41] creationix: heh, "undefined" is a property of "this" [21:41] creationix: v8: ({}).foo === this.undefined [21:41] v8bot_: creationix: true [21:42] Sazpaimon has joined the channel [21:42] creationix: v8: this.hasOwnProperty("undefined") [21:42] v8bot_: creationix: true [21:42] CoverSlide: who owns v8bot? [21:43] Sazpaimon has joined the channel [21:44] dominictarr: how come some github repo's do not have 'issues' pages? [21:45] CoverSlide: maybe you can set it with a non-free plan [21:45] Sazpaimon has joined the channel [21:45] softdrink: you can disable wiki and issues in your repo's admin section [21:46] Sazpaimon has joined the channel [21:46] dominictarr: ah okay. [21:46] Sazpaimon has joined the channel [21:46] Sazpaimon has joined the channel [21:47] dominictarr: maybe i'll just write my issue on a brick and throw it through his window. [21:47] Sazpaimon has joined the channel [21:47] wangbus1 has joined the channel [21:48] AvianFlu: LOL! [21:48] clifton: if i want to pipe the tail -f of a log to a TCP socket, best to use child_process.spawn('tail', ['-f']) or best to fs.createReadStream starting at the end of the file [21:52] hl7Guy has joined the channel [21:52] krh: readstream certainly [21:52] krh: don't create a process just to read from a file [21:53] hl7Guy: Hi all. Any recommendation on a node https server that could act as a reverse proxy? [21:53] creationix: krh: won't the readstream end when it hits eof? [21:53] topaxi has joined the channel [21:54] zilch has joined the channel [21:54] hasta84_ has joined the channel [21:54] krh: creationix: yeah, so you'd have to keep reading periodically or something... [21:54] clifton: yeah it will end [21:54] clifton: so it will be a little less trivial [21:54] krh: true [21:54] clifton: will have to have a watchfile with the last known filesize [21:55] krh: ah, tail -f uses inotify on linux [21:55] krh: (strace ftw) [21:55] sctb has joined the channel [21:56] CIA-65: libuv: 03Ryan Dahl 07master * rdac30a1 10/ src/win/process.c : More preprocessor fixes - http://bit.ly/pDksLd [21:56] hij1nx_ has joined the channel [21:57] sctb: Hi all, how can I prevent Node from exiting if I'm loading a file that doesn't register any pending callbacks? (I'd like to attach the remote debugger) [21:58] gf3: tmpvar: oh hai! [21:58] ryah: sctb: process.on('SIGINT', function() { console.log("ctrl c") }) [21:59] robotmay has joined the channel [21:59] cafesofie has joined the channel [21:59] gde33 has joined the channel [21:59] Bonuspunkt: sctb https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger ? [22:02] CIA-65: libuv: 03Ryan Dahl 07master * r06623d1 10/ src/win/process.c : More preprocessor fixes... - http://bit.ly/n9h8qB [22:02] sctb: ryah: Node still exits with that line included in the file [22:02] sh1mmer has joined the channel [22:02] ryah: sctb: setTimeout(function() { }, 10000000000) [22:02] ryah: :) [22:03] mraleph has joined the channel [22:03] sctb: Bonuspunkt: ahh -- I didn't realize --debug-brk was a Node switch. That might do. [22:06] sctb: Bonuspunkt: well, I suppose I don't even want to exit after I've attached the debugger (and instructed the program to continue) [22:07] mike5w3c has joined the channel [22:07] AvianFlu has joined the channel [22:07] blup has joined the channel [22:10] sctb: ryah: thanks :) [22:10] cafesofie has joined the channel [22:10] eguest309: is there any way to create a new net.socket in nodejs using a specific network interface [22:10] bradleymeck has joined the channel [22:11] davidbanham has joined the channel [22:11] temp02 has joined the channel [22:12] robhawkes has joined the channel [22:12] CoverSlide: eguest309: why do you need it to do this? [22:13] maushu: SubStack, any success with ssh? [22:14] eguest309: well actually its to use to test a production application.but we need to make a simulation of htat production application.the production application accepts socket connections from diffrent network machines [22:14] eguest309: so this is a simulation and this needs to be run from one machine .thats why this is necessary [22:20] zeade has joined the channel [22:23] mike5w3c_ has joined the channel [22:25] cpetzold has joined the channel [22:25] mcluskydodallas has joined the channel [22:25] CrabDude has joined the channel [22:26] tristanseifert has joined the channel [22:29] ryanfitz has joined the channel [22:30] tristanseifert_ has joined the channel [22:31] tristanseifert_ has joined the channel [22:31] sechrist has joined the channel [22:32] tristanseifert_ has joined the channel [22:32] brianseeders has joined the channel [22:33] digitalsabre has joined the channel [22:33] tristanseifert has joined the channel [22:33] alvaro_o has joined the channel [22:33] CIA-65: libuv: 03Ben Noordhuis 07master * rafb1859 10/ src/uv-unix.c : uv-unix: remove dead code - http://bit.ly/nAE8hr [22:33] CIA-65: libuv: 03Ben Noordhuis 07master * rb6b97f3 10/ src/uv-unix.c : [22:33] CIA-65: libuv: uv-unix: guard against self-close by connection_cb [22:33] CIA-65: libuv: connection_cb may close the server socket inside the accept loop, handle it. [22:33] CIA-65: libuv: Fixes failing node.js tests: [22:33] CIA-65: libuv: test/simple/test-net-connect-buffer.js [22:33] CIA-65: libuv: test/simple/test-net-create-connection.js - http://bit.ly/phLiRW [22:33] Sironfoot has joined the channel [22:34] tristanseifert has joined the channel [22:34] Sironfoot: Any Express.js or Connect experts here? [22:34] alvaro_o has left the channel [22:34] tjholowaychuk: Sironfoot #express [22:34] CoverSlide: just ask away [22:34] eboyjr has joined the channel [22:35] Sironfoot: I'm trying to access the session object from an 'upgrade' event eg... [22:35] Sironfoot: app.on('upgrade', function(req, res) { [22:35] Sironfoot: then... [22:35] Sironfoot: req.session [22:35] Croms has joined the channel [22:36] Sironfoot: app.get('/', function(req, res){ req.session // works fine though [22:36] sechrist has joined the channel [22:36] tjholowaychuk: Sironfoot req.session is assigned in the session middleware so you would have to get that in there some how [22:37] tjholowaychuk: var session = express.session(options here); .on(.... session(req, res, .. [22:38] CIA-65: node: 03Ben Noordhuis 07master * r4606141 10/ (lib/net_uv.js src/tcp_wrap.cc): tcp: propagate libuv tcp accept() errors to net_uv.js - http://bit.ly/r07dm2 [22:38] CIA-65: node: 03Ben Noordhuis 07master * rc4549b8 10/ (deps/uv/src/uv-unix.c deps/uv/src/win/process.c): uv: upgrade to b6b97f3 - http://bit.ly/pe08zH [22:39] ecin has joined the channel [22:40] mcluskydodallas has joined the channel [22:40] Sironfoot: OK thanks tjholowaychuk, I'll look into that [22:41] blueadept has joined the channel [22:43] wookiehang0ver has joined the channel [22:44] ryan[WIN] has joined the channel [22:46] reid has joined the channel [22:48] gtramont1na has joined the channel [22:49] kavla1 has joined the channel [22:49] maushu: Wait, what happened to binary enconding in the socket? [22:50] Poetro has joined the channel [22:51] eguest309 has joined the channel [22:53] vid__ has joined the channel [22:55] Destos has joined the channel [22:55] Cromulent has joined the channel [22:58] xandrews has joined the channel [22:58] RightLegRed has joined the channel [22:59] Sazpaimon_ has joined the channel [22:59] kavla has joined the channel [23:01] xtianw has joined the channel [23:01] muk_mb has joined the channel [23:05] mcluskydodallas has joined the channel [23:09] scott_gonzalez has joined the channel [23:09] fairwinds has joined the channel [23:10] langworthy has joined the channel [23:11] rope has joined the channel [23:12] rope has joined the channel [23:12] Sorella has joined the channel [23:13] jyu322 has joined the channel [23:13] c4milo1 has joined the channel [23:14] RightLegRed has joined the channel [23:14] zeade has joined the channel [23:14] vid___ has joined the channel [23:15] thinkt4nk has joined the channel [23:16] mikedeboer has joined the channel [23:17] CIA-65: libuv: 03Ryan Dahl 07master * ree2027d 10/ src/win/process.c : fix preprocessor again - http://bit.ly/q8aNCz [23:17] euforic has joined the channel [23:17] jshaw has joined the channel [23:17] draginx has left the channel [23:19] dgathright has joined the channel [23:19] c4milo1 has joined the channel [23:20] eguest309 has left the channel [23:22] blub_ has joined the channel [23:22] blub_: hey, i run "npm install websocket-server" and it hangs, no output whatsoever. does anybody know how to resolve this? [23:23] TheJH: blub_, sure that it hangs? it just silently downloads stuff without saying anything. [23:23] vid__ has joined the channel [23:23] blub_: oh, any guess how long it should take? order of magnitude [23:24] TheJH: blub_, downloaded and installed here in 13 seconds [23:25] blub_: hmm... going on a couple of minutes here with no output [23:25] TheJH: blub_, what does "netstat -n --tcp -p" say? [23:25] tech2 has joined the channel [23:26] tech2: Hi all, using npm how do I install a package if I'm behind an authenticated firewall? I'm trying to install jslint but the firewall keeps giving me grief :/ [23:26] isaacs: tech2: you are behind a proxy, you mean? [23:27] isaacs: tech2: npm config set proxy http://username:password@host:port/ <-- fill in with details [23:27] blub_: theJH, there is an entry while npm runs: 50.16.186.4:443 ESTABLISHED 665/node [23:27] blub_: i wonder if i'm blocking incoming traffic on 443 [23:27] tech2: isaacs: thanks, will try [23:28] TheJH: blub_, I'm nearly sure that's not the case [23:28] TheJH: blub_, could you install "iftop" and then run "sudo iftop -i eth0" or so? It's like top, but for network [23:29] AvianFlu: blub_: if you don't like seeing it hang with no output, I recommend `npm config set loglevel info`. You may have other issues, but that one gives you more output to look at. [23:29] AvianFlu: in the case of slow internet, I vastly prefer it to nothing [23:29] TheJH: blub_, then look whether there's 50.16.186.4 somewhere [23:30] TheJH: actually, a progressbar would be a good feature for npm, I think [23:30] tech2: isaacs: is there a way I can use npm locally, assuming I can download things by other means? [23:30] isaacs: TheJH: yeah, it's hard to do though, since it downloads and unpacks everything in parallel [23:30] mehtryx has joined the channel [23:31] tech2: bother :( [23:31] isaacs: TheJH: i tried writing something like that in npm, and then realized it's really odd and confusing if you have more than one [23:31] TheJH: isaacs, really? can't you just display the progress for all files in summary? [23:31] blub_: trying out these things, thanks. one sec [23:32] TheJH: tech2, I think you can "npm install file.tar" [23:32] tech2: failing that is there a reason the registry is behind SSL rather than just regular http? [23:32] isaacs: TheJH: well, i don't know how big they are, or how many there will be. [23:32] tech2: looks like it's trying to reach https://registry.npmjs.org/nopt [23:33] jyu322 has left the channel [23:33] isaacs: TheJH: it's exploring a tree in parallel [23:33] blub_: okay i turned on logging, found the URL of the tar file, wgetted it and installed it with npm install tarfile [23:33] blub_: all good, thanks [23:33] mosen has joined the channel [23:33] isaacs: blub_: are you behind a proxy or something? [23:34] blub_: something like that. using ec2 [23:34] TheJH: isaacs, so the progress may decrease or so, right? there are other programs that behave that way, too [23:34] blub_: so it is restrictive about incoming traffic [23:34] towski has joined the channel [23:35] TheJH: isaacs, also, you could first show exploration progress (one more dot per fetched file or so) and then download progress [23:36] isaacs: TheJH: yeah, the point is, it's a bit more tricky than just `curl -#` stye bar when it's downloading stuff. [23:36] TheJH: mhm... [23:36] isaacs: TheJH: i mean, it *could* be done, and would benice. [23:37] sfoster has joined the channel [23:37] tech2 has left the channel [23:37] neilk_ has joined the channel [23:37] tech2 has joined the channel [23:37] gde33 has joined the channel [23:38] CIA-65: libuv: 03Ben Noordhuis 07master * rb328e4c 10/ src/uv-unix.c : (log message trimmed) [23:38] CIA-65: libuv: uv-unix: fd 0 is valid file descriptor [23:38] CIA-65: libuv: uv__bind() and uv_tcp_listen() created a new socket [23:38] CIA-65: libuv: if tcp->fd <= 0 but 0 is a valid file descriptor. [23:38] CIA-65: libuv: The second bug was that the newly created socket [23:38] CIA-65: libuv: wasn't actually assigned to tcp->fd. [23:38] CIA-65: libuv: Fixes failing node.js test: [23:38] Nuck has joined the channel [23:39] TheJH: isaacs, wow, npm install over http is a lot faster than over https [23:40] TheJH: isaacs, another feature idea: store file hashes in the registry, download files over http and then verify them using the metadata fetched via https [23:40] CIA-65: node: 03Ben Noordhuis 07master * re62cdd0 10/ (deps/uv/src/uv-unix.c deps/uv/src/win/process.c): uv: upgrade to b328e4c - http://bit.ly/nYK1X3 [23:41] yozgrahame has joined the channel [23:41] eguest309 has joined the channel [23:41] eguest309 has left the channel [23:42] zpao has joined the channel [23:42] traph has joined the channel [23:45] dgathright has joined the channel [23:45] mDraze has joined the channel [23:46] Sazpaimon has joined the channel [23:46] dharmesh has joined the channel [23:47] colinclark has joined the channel [23:49] carmony_ has joined the channel [23:51] spcshpopr8r has left the channel [23:52] isaacs: TheJH: yeah, a mixed http/https plan would be good. [23:52] CStumph has joined the channel [23:53] isaacs: TheJH: originally, if the registry was https, it'd still use http for tarballs. [23:53] isaacs: TheJH: however, if what you want is to force auth, and never expose your code to the wild internet (ie,if it's some internal registry) then that doesn't work so well. but that could be a config or something. [23:53] TheJH: hmm, yes, right [23:54] isaacs: TheJH: it already does verify shasums against what's in the registry metadata [23:54] mynyml has joined the channel [23:54] isaacs: TheJH: now that couch sends a Content-MD5 header, i can also check that [23:55] isaacs: TheJH: then you'll have validation (checking against the https metadata) as well as corruption detection (checking against the advertised md5) [23:55] TheJH: isaacs, so it would be sufficient to add some parameter for "always-https" and to make the tarball download protocol depend on that? [23:55] isaacs: TheJH: yeah, probably. [23:55] isaacs: TheJH: but that'd fall down if you had a registry that is actually only https [23:56] cying has joined the channel [23:56] jtsnow has joined the channel [23:56] mikeal has joined the channel [23:56] TheJH: isaacs, how about setting the default for "https for tarball" to "only if the registry was set manually"? [23:56] hippich has joined the channel [23:57] isaacs: hrm. that seems wrong... [23:57] TheJH: :D [23:57] isaacs: TheJH: or we can just require that if you're using an https-only registry, you have to set --always-https [23:57] piscisaureus: DrPizza+=10 [23:58] dharmesh has joined the channel [23:58] piscisaureus: DrPizza++ [23:58] catb0t: DrPizza now has 1 beer [23:58] v8bot_: piscisaureus has given a beer to DrPizza. DrPizza now has 1 beers. [23:58] TheJH: isaacs, people who don't know about this change might complain that it should be all-https by default for private registries [23:58] jtsnow has joined the channel [23:59] isaacs: TheJH: then they should make their registries not respond on :80 [23:59] Nexxy: osnap [23:59] isaacs: TheJH: they'll complain about getting 404s [23:59] isaacs: TheJH: and then we can tell them to set always-https :) [23:59] TheJH: isaacs, mmhm, ok