[00:00] russell_h: is there a way to get a real stack trace on errors coming from node's C++? [00:00] AvianFlu has joined the channel [00:00] russell_h: like syscall errors, you get a single line stack trace with no line numbers or anything [00:05] jshaw has joined the channel [00:06] _fat has joined the channel [00:06] rvb has joined the channel [00:07] DTrejo has joined the channel [00:10] koichik has joined the channel [00:11] bene has joined the channel [00:11] pifantastic has joined the channel [00:11] bene has left the channel [00:13] SvenDowideit has joined the channel [00:14] malkomalko has joined the channel [00:19] andrewfff has joined the channel [00:20] gxdssoft has joined the channel [00:23] ryan__ has joined the channel [00:24] geoffeg has joined the channel [00:25] tbranyen has joined the channel [00:26] CIA-110: node: 03Yoshihiro Kikuchi 07v0.4 * r82cfdb8 10/ lib/_debugger.js : [00:26] CIA-110: node: fix an broken question. [00:26] CIA-110: node: Fixes #1274. - http://bit.ly/qxPJ5g [00:26] kmwallio has joined the channel [00:28] springmeyer_ has joined the channel [00:28] mandric has joined the channel [00:32] konobi has joined the channel [00:34] zinkem has joined the channel [00:34] ikaros_daedalos has joined the channel [00:35] ikaros_daedalos: Hey - what's the best way to pass a redis client (or other client) around different node modules? I'm not sure if its a big deal or not but I'd rather not instantiate multiple clients [00:36] DoNaLd` has joined the channel [00:36] [[zz]] has joined the channel [00:38] andrewfff has joined the channel [00:38] smtlaissezfaire has joined the channel [00:39] zivester has joined the channel [00:39] clifton has joined the channel [00:40] al3xnull has joined the channel [00:40] boogyman has joined the channel [00:43] DoNaLd` has joined the channel [00:44] ikaros_daedalos has left the channel [00:46] weezle has joined the channel [00:47] sethetter has joined the channel [00:47] sandstrom has joined the channel [00:47] sandstrom has joined the channel [00:50] avalanche123 has joined the channel [00:51] level09_ has joined the channel [00:52] DoNaLd` has joined the channel [00:55] AvianFlu has joined the channel [00:55] gde33 has joined the channel [00:55] CIA-110: libuv: 03Bert Belder 07master * r49baaa4 10/ (config-unix.mk uv-cygwin.c): [00:55] CIA-110: libuv: Add cygwin support [00:55] CIA-110: libuv: Fails a few tests - http://bit.ly/qK4M0w [00:56] CIA-110: node: 03Bert Belder 07master * ra845bf7 10/ (deps/uv/config-unix.mk deps/uv/uv-cygwin.c): [00:56] CIA-110: node: Libuv: add cygwin support [00:56] CIA-110: node: Fails a few tests - http://bit.ly/qFFkHw [00:57] tk has joined the channel [00:58] BillyBreen has joined the channel [00:58] charleyd has joined the channel [00:59] neoesque has joined the channel [01:03] Poetro has left the channel [01:03] admc has joined the channel [01:03] tekky has joined the channel [01:07] DoNaLd` has joined the channel [01:08] dylang has joined the channel [01:10] abraxas has joined the channel [01:12] k1ttty has joined the channel [01:12] Emmanuel_ has joined the channel [01:15] sethetter has joined the channel [01:15] e6nian has joined the channel [01:15] e6nian: Can you use npm publish? [01:15] e6nian: It's not working here today [01:16] ryan_ has joined the channel [01:16] level09__ has joined the channel [01:16] SubStack: e6nian: seems to be working for other folks http://search.npmjs.org/ [01:16] SubStack: 3 minutes ago [01:16] rhdoenges has joined the channel [01:17] e6nian: SubStack: so when I wanna update my npm package,I just npm publish in my project fold,is that all right? [01:19] stepheneb has joined the channel [01:19] stepheneb has joined the channel [01:20] e6nian: ACTION got the point that~ [01:21] SubStack: e6nian: yep that's all! [01:21] rhdoenges has joined the channel [01:23] Xano has joined the channel [01:25] othiym23 has joined the channel [01:25] sourcode has joined the channel [01:27] Brandonn has joined the channel [01:28] AntelopeSalad has joined the channel [01:29] JasonSmith has joined the channel [01:31] philtor has joined the channel [01:32] CIA-110: node: 03Ryan Dahl 07master * r111305c 10/ (src/platform_sunos.cc wscript): Support SunOS 121. Check for ifaddrs in wscript for SunOS build. - http://bit.ly/oJPRa0 [01:35] ryah has joined the channel [01:38] sub_pop has joined the channel [01:39] ryanj has joined the channel [01:39] te-brian has joined the channel [01:39] tolmasky-macbook has joined the channel [01:39] tolmasky-macbook: does anyone know of any way to run node.js with gc turned off (just to know how much gc pauses are affecting runtime) [01:40] saschagehlich has joined the channel [01:40] kbni has joined the channel [01:43] bnoordhuis: tolmasky-macbook: there isn't any but you can turn on gc profiling with --trace_gc [01:45] muk_mb has joined the channel [01:46] pifantastic has joined the channel [01:46] mendel_ has joined the channel [01:47] mendel_ has joined the channel [01:47] ditesh|cassini has joined the channel [01:47] rhdoenges: for a free hosting solution, is no.de or heroku better? [01:48] mikeal has joined the channel [01:49] steffan has joined the channel [01:50] patrickgamer has joined the channel [01:51] galaxywatcher has joined the channel [01:51] al3xnull has joined the channel [01:53] jesusabdullah: rhdoenges: no.de was better when the last node knockout happened, like last October or something. Heroku may have way improved their offerings since, but I kinda doubt it. [01:53] patrickgamer has left the channel [01:53] caiges has joined the channel [01:53] rhdoenges: the heroku service seems kinda hacky to me. [01:54] rhdoenges: and besides, Joyent runs no.de [01:54] jesusabdullah: rhdoenges: Depending on timing, you might be interested in getting in on some nodejitsu hosting. [01:54] sorensen: beat me to it [01:54] sorensen: lol [01:54] jesusabdullah: From what I've seen, nodejitsu should be very nice [01:54] jesusabdullah: Yeah [01:54] sorensen: just got an invite from them a week or two ago [01:54] sorensen: need to test them out [01:54] sorensen: no.de has been pretty good so far [01:55] jesusabdullah: I didn't get a chance to try the private beta (didn't have the time) but they have a solid team on both front and backend [01:55] jesusabdullah: and my quick overview of jitsu, their cli app, indicates that deployment is way easy [01:55] jesusabdullah: not that no.de isn't also slick, but, yeah [01:55] rhdoenges: I've got a dotCloud invite, I just realized they do nodejs [01:55] jesusabdullah: maybe give them a looksee [01:56] jesusabdullah: hmm! [01:56] rhdoenges: I'll see if I can get in on nodejitsu too [01:56] jesusabdullah: sweet [01:59] rhdoenges: dotcloud's running node 0.4.5, that's not gonna work. [01:59] rhdoenges: just because. [02:00] hij1nx has joined the channel [02:00] hippich has joined the channel [02:00] bartt has joined the channel [02:01] mustakes_ has joined the channel [02:01] JoshC1 has joined the channel [02:01] _Ray_ has joined the channel [02:02] timesink has joined the channel [02:03] mendel_ has joined the channel [02:04] _Ray_: rauchg: ping [02:06] bwinton has joined the channel [02:06] gazumps has joined the channel [02:07] CIA-110: libuv: 03Bert Belder 07master * r6c8d016 10/ (c-ares/ares.h c-ares/ares_setup.h c-ares/config-win32.h): Fix c-ares build with msvc - http://bit.ly/pzbbfF [02:07] Sorella has joined the channel [02:10] kriszyp has joined the channel [02:11] rauchg: _Ray_ [02:11] rauchg: whats up [02:12] _Ray_: what's the talk at glugcen going to be about? [02:13] rauchg: intro to node.js [02:13] harth has joined the channel [02:14] willwhite has joined the channel [02:14] _Ray_: thanks :) [02:16] sethetter has joined the channel [02:17] Me1000 has joined the channel [02:19] e6nian: rhdoenges: how to deploy node app in dotcloud? I can't figure it out with less doc. [02:20] rhdoenges: e6nian: I don't know, I have not tried :/ [02:20] bwinton has joined the channel [02:22] Xano has joined the channel [02:22] mbrevoort has joined the channel [02:24] dgathright has joined the channel [02:25] AvianFlu_ has joined the channel [02:25] devrim has joined the channel [02:27] Swimming_bird has joined the channel [02:27] Prometheus: \o/ [02:27] Nican: Woo! [02:27] e6nian: l0l [02:28] pquerna: Unstable! [02:28] pquerna: needs more !@#!@#!@#!!!!! [02:28] ryah: :) [02:28] rhdoenges: NEW VERSION PARTY [02:28] apanda has joined the channel [02:28] ryah: v0.5 releases will now be weekly [02:28] _Ray_: :D [02:29] Nican: Nodejs now needs a better doc page :P [02:29] tjholowaychuk: the docs are fine [02:29] tjholowaychuk: the home page could use a little love [02:30] sorensen: well, it sure doesnt have any express.js sexyness [02:30] pquerna: no more parties [02:30] Sami_ZzZ has joined the channel [02:30] tjholowaychuk: the express site sucks too i have a designer friend working on some stuff [02:31] sorensen: i like the look [02:31] tjholowaychuk: could be worse [02:32] sorensen: thats true with everything [02:32] rhdoenges: remember when `man node` was helpful and you didn't have to look at the web docs? [02:32] sorensen: dont like designing anymore? [02:32] rhdoenges: remember that, guys? [02:33] rvb has joined the channel [02:33] malkomalko: I like designing, I'm just not that good :) [02:33] tjholowaychuk: we dont have man pages anymore? [02:33] rhdoenges: before these fancy 'htmls' and 'hyperlinkin' [02:33] sorensen: oh the glory days [02:33] Aria: I do remember that, man, I miss it. [02:33] Aria: I still need to write a good system for making sure the docs stay in sync with some manpages. [02:34] jtsnow has joined the channel [02:34] rhdoenges: tjholowaychuk: we have `man node' but it's just an exhaustive list of v8 command line options. [02:34] malkomalko: just launched my product utilizing express tjholowaychuk, so thanks for that :) [02:34] rhdoenges: it used to have the whole api. [02:34] tjholowaychuk: malkomalko nice! [02:34] mjr_ has joined the channel [02:37] AvianFlu has joined the channel [02:37] mustakes has joined the channel [02:37] ajsie: node.js has passed rubyonrails in nr of irc members [02:40] tjholowaychuk: woot [02:40] malkomalko: heh [02:40] _Ray_: i can finally tell my 300 bots to quit [02:40] AvianFlu has joined the channel [02:41] rhdoenges: I'm sorry _Ray_, I can't let you do that. [02:42] _Ray_: What's the problem? [02:43] rhdoenges: I'm sorry Dave [02:44] rhdoenges: you know, bots [02:44] rhdoenges: HAL [02:44] rhdoenges: 2001: A Space Odyssey [02:44] _Ray_: I know, "What's the problem" was the next line ;) [02:45] Prometheus: geeks [02:45] Prometheus: :P [02:45] dylang has joined the channel [02:45] rhdoenges: irc just can't communicate this high humor correctly [02:45] rhdoenges: :) [02:45] Jakwac has joined the channel [02:46] mjr_: Also, perhaps everybody is too old to get that reference. [02:47] rhdoenges: too old? [02:47] tilgovi has joined the channel [02:47] tilgovi has joined the channel [02:47] mrryanjohnston has joined the channel [02:47] mattp_ has joined the channel [02:48] rhdoenges: 2001 came out in 1986 [02:48] mjr_: yeah, kids [02:48] rhdoenges: that's, like, a quarter century ago [02:48] rhdoenges: omg [02:48] skm has joined the channel [02:48] mif86 has joined the channel [02:48] mjr_: You are old, man [02:49] mattp_ has joined the channel [02:49] rhdoenges: I'm not old [02:49] rhdoenges: I'm in high school [02:50] rhdoenges: we had to read 2001 for English [02:50] dittos has joined the channel [02:51] broofa has joined the channel [02:53] Kimichi has joined the channel [02:55] pengwynn has joined the channel [02:56] gavin_huang has joined the channel [02:57] tk has joined the channel [02:57] tk has joined the channel [02:59] cmdrbatguano has joined the channel [03:00] cmdrbatguano: Apparently socket.io doesn't have an irc channel? [03:00] AvianFlu_ has joined the channel [03:00] Qbix2 has joined the channel [03:00] Qbix2: hey guys [03:00] Qbix2: have a question about commonjs [03:00] Qbix2: I have a module Broadcast [03:01] Qbix2: in the module, I define a function Broadcast and then assign Broadcast.Users = require('Broadcast/Users') [03:01] Qbix2: but then, in Broadcast/Users.js, I do [03:01] Qbix2: Broacast = require('Broadcast') [03:01] Qbix2: the thing is, module.exports = Broadcast; hasn't been called yet in the Broadcast module [03:01] Qbix2: so what happens? [03:01] Qbix2: infinite loop? [03:01] mike5w3c has joined the channel [03:03] hippich has joined the channel [03:03] coyo has joined the channel [03:03] coyo has joined the channel [03:03] jbroman: Qbix2: I believe that it will be the default empty object if you haven't assigned anything to it. [03:03] jbroman: http://wiki.commonjs.org/wiki/Modules/1.0 [03:03] Qbix2: how do I properly do it btw [03:03] jbroman: (Have not verified this, but I assume node.js follows the spec.) [03:04] Qbix2: where can I find the spec [03:04] jbroman: Well, what I just linked is the spec for CommonJS modules. [03:04] Aria: It's pretty simple: Imagine the two scripts concatenated together, with the function(require, export, module) { } around each. [03:04] jbroman: Which is the spec node.js' require capability should comply with. [03:07] mjr_ has joined the channel [03:07] Qbix2 has joined the channel [03:07] Qbix2: hi [03:07] Qbix2: disconnected [03:07] Qbix2: so I have a question [03:07] Qbix2: where is the spec [03:07] Aria: It's pretty simple: Imagine the two scripts concatenated together, with the function(require, export, module) { } around each. [03:07] Aria: The spec: [23:03:23] jbroman: http://wiki.commonjs.org/wiki/Modules/1.0 [03:07] Qbix2: and how can I make it that Broadcast.Users = require('Broadcast/Users'), but in the Users module, I do Broadcast = require('Broadcast') [03:08] Aria: Such as it is, don't get caught up in the commonjs hype too much. Node only half pays attention. [03:08] Qbix2: what is the hype? [03:08] Aria: It's just not a huge, perfect standard. And node takes it with a grain of salt. [03:08] Aria: node's the young upstart that happened to get stuff right. [03:09] Aria: So where is this require('Broadcast/Users') ? [03:09] Qbix2: right [03:09] Qbix2: I agree [03:09] Qbix2: so I want to basically end up with [03:09] Qbix2: Users.User [03:09] Qbix2: I mean Broadcast.User [03:10] Qbix2: but User should be aware of Broadcast too [03:10] Qbix2: they should be aware of each other :( [03:10] Aria: Well, perhaps you shouldn't over design ;-) [03:10] Qbix2: And yet I really don't want to pass functions to each other [03:10] Qbix2: I could of course pass Broadcast to require('Broadcast/User') [03:11] Qbix2: just wondering how in commonjs, two modules can know about *each other* [03:11] Aria: But, in Broadcast.js, exports is already there. You can reassign it with module.exports =, but you'd want to do that early in this case. When you require('Broadcast'), it gets _that exports object_. [03:11] Qbix2: it seems like I always have to put the require at the next tick, in one of the modules [03:11] Aria: So you can add properties to it later. [03:11] Qbix2: oh wait, really?? [03:11] Aria: Really. [03:11] Qbix2: when is the module reloaded [03:11] Aria: It's just a reference. [03:11] Qbix2: I thought it was when exports is undefined [03:11] Aria: Modules are never reloaded. [03:12] Qbix2: never? [03:12] Qbix2: even if exports is undefined? [03:12] Aria: Never. [03:12] Qbix2: ohhhh!!! [03:12] Qbix2: that makes it bettar [03:12] Aria: I mean, you can hack it and make node do it. [03:12] Aria: But never. [03:12] Qbix2: u sure? [03:12] Aria: Quite. [03:12] Qbix2: yeah I saw this one guy make an require.unCache(module) thingy [03:12] Qbix2: but I think that was a hack [03:12] Aria: Yeah. That's the hack. [03:12] necrodearia has joined the channel [03:12] Qbix2: yeah he watched files for changes [03:12] Aria: exports comes in as {} [03:12] mjr_: You can even share state through modules. [03:13] Qbix2: so as to make it like the rails thing [03:13] Aria: So if you require something, you get its blank exports, if it hasn't done something else. [03:13] Qbix2: well since modules aren't reloaded, that's awesome [03:13] Qbix2: you mean as soon as I assign module.exports [03:13] Qbix2: it is set, and then if someone does require('that module') it will just return module.exports value? [03:13] abraxas: So.. they release Node 0.5.0, but no new V8? [03:13] Aria: So you can add properties to it. Broadcast = require('Broadcast'); Broadcast.User = {"Magic":"Stuff"} [03:13] Aria: abraxas: 0.5.0 has new V8. 3.4.x, I think. [03:13] avian__ has joined the channel [03:13] tk has joined the channel [03:14] abraxas: That would be sweet! :) [03:14] Aria: IF you're changing module.exports, then you're breaking that association by starting a NEW exports. [03:14] Qbix2: so like this: http://pastie.org/2170457 ? [03:15] febits has joined the channel [03:15] Qbix2: and this: http://pastie.org/2170459 [03:15] Qbix2: right? [03:15] Qbix2: these are my autogenerated base classes for models [03:15] Aria: Kinda. Not quite. [03:15] Qbix2: why not [03:16] Aria: Instead of module.exports=Base, how about Broadcast.Base = Base? [03:16] Qbix2: no. Broadcast.Users [03:16] Qbix2: is the Users class [03:16] Qbix2: which is this: [03:16] Qbix2: I mean Broadcast.Agreement [03:16] Aria: Okay. You didn't paste anything about Users that I saw. (try gist -- it lets you bundle files in a paste so you don't have a dozen URLs going.) [03:17] Aria: In Broadcast/Agreement.js, why not Broadcast.Agreement = Agreement? [03:17] ryah has joined the channel [03:17] Aria: Rather than replacing the exports with it? [03:17] Qbix2: http://pastie.org/2170466 [03:17] Qbix2: that is Broadcast/Agreement [03:17] mike5w3c has joined the channel [03:17] Qbix2: and this is Broadcast.js : http://pastie.org/2170468 [03:18] Qbix2: think Doctrine ORM [03:18] Qbix2: or any other ORM [03:18] Aria: I have no idea what that is. [03:18] Aria: Or what it being an ORM has to do with the structure. [03:18] weaux has joined the channel [03:18] Aria: It's pretty simple: Add to Broadcast, not to exports. [03:18] Qbix2: javascript highlight: http://pastie.org/2170473 [03:18] Qbix2: oh, why not Broadcast.Agreement = Agreement? [03:19] Lorentz has joined the channel [03:19] Qbix2: I guess because I want to be able to include something by just doing [03:19] Qbix2: require('Broadcast') [03:19] Qbix2: and not having to include all the models one by one [03:19] Aria: Right. So do that. [03:19] Qbix2: require('Broadcast/Agreement') [03:19] Qbix2: hence this: [03:19] Qbix2: Broadcast.QPlugin = require('Broadcast/QPlugin'); [03:19] Qbix2: Broadcast.Agreement = require('Broadcast/Agreement'); [03:19] Qbix2: Broadcast.Syndicated = require('Broadcast/Syndicated'); [03:20] Aria: How about Broadcast.js just has require('Broadcast/Agreement'); require('Broadcast/Syndicated') and let the modules add themselves, rather than trying to string it together after the fact like complicated beadwork? [03:20] Qbix2: oh [03:20] Qbix2: sure that is a plan :) [03:20] Aria: (This is, by the way, among the least Javascripty code I've seen in a while -- you're trying really hard to use Classful OOP Best Practices(tm).) [03:20] Qbix2: but all you are really doing is removing one assignment [03:20] Aria: Not removing. Moving. [03:20] jakehow has joined the channel [03:21] Qbix2: yeah hehe, and at the same time I am trying to use Javascript efficiency (TM) and avoid crockford functional OOP "goodness" [03:21] Aria: Instead of having each of these modules return their export, have them build themselves into your object tree. [03:21] AvianFlu has joined the channel [03:21] Qbix2: yeah but why move the assignment [03:21] Qbix2: Broadcast.QPlugin = require('Broadcast/QPlugin'); [03:21] Qbix2: what do you gain [03:21] Qbix2: you still have to require. [03:21] Aria: Because you want them to be circular, and retain the references, rather than overwriting them by changing module.exports to be a different object. [03:22] Aria: Sure, if you have many separate files, you have to require something for each. [03:22] Qbix2: what would the Broadcast.Agreement module export? [03:22] Aria: Who cares? It's not being used. [03:22] Qbix2: if not the constructor function? [03:22] Aria: It could export {} [03:22] Aria: That'd be okay. [03:23] Qbix2: well this way you could do either require('Broadcast') or require('Broadcast/Agreement') [03:23] Qbix2: either one would work [03:23] Aria: I mean, unless you need other parts of the code to do something useful. But you're building a monolith here, it looks like. No point in letting the pieces show. [03:23] Aria: Sure. Is that an interface you need? [03:23] Qbix2: I guess [03:23] Qbix2: not really [03:23] Aria: That interface doesn't match your tightly coupled code. [03:23] Qbix2: I don't NEED it [03:23] Aria: So why do it? [03:23] Qbix2: but I don't see what I have to gain from moving an assignment, either [03:23] Aria: It makes it easy to build your tree of Broadcast.Foo and Broadcast.Bar. [03:23] jbroman: Qbix2: It's a little nicer in cases where you have deeper dependencies, for one. [03:23] Aria: That's why ;-) [03:23] sw8sw8 has joined the channel [03:24] Qbix2: hmm [03:24] Qbix2: I just don't see how it gets any easier, but ok [03:24] Qbix2: Broadcast.QPlugin = require('Broadcast/QPlugin'); vs require('Broadcast/QPlugin') in Broadcast.js [03:24] context: does anyone see an issue with this: http://pastie.org/2170496 [03:24] Aria: Yeah, but _if you reassign module.exports_, you lose the reference. [03:24] context: when i execute it it just sits there. i get the 'waiting' but nothing else [03:25] Qbix2: Aria: whaa? when would I reassign it [03:25] Aria: You are -- module.exports = Foo. [03:25] Qbix2: I don't get your last msg [03:25] Aria: module.exports _is already something_ [03:25] Aria: It's not undefined when your code starts. [03:25] Qbix2: okay.. [03:25] Qbix2: and so? [03:25] Aria: So when you require('Broadcast'), and Broadcast.js is an empty file, you get a reference to that object. [03:26] Qbix2: but it's not an empty file [03:26] Aria: So if you want to build stuff up and have circular references, it helps to not ever trash that reference. You can do it if you're careful about the order of things. [03:26] JasonSmith has joined the channel [03:26] Qbix2: I just want the monolithig "Broadcast" to include some modules and store references to them, that's it. But those modules should also be able to use the monolithic object [03:27] Aria: Right. So make sure that modules.export is assigned before those possibly get loaded, so that require('Broadcast') gets the right object and it doesn't change later. [03:27] context: qbix2: then you need to give said monolithic object (instances im assuming) to each instance you require [03:28] context: if you need to share an instance, give it to what needs it .... [03:28] Qbix2: right, Aria [03:28] Qbix2: that is what I am doing, I think [03:28] Qbix2: context: I did, I had this elaborate thing before [03:28] Aria: Yeah. Just be careful about the order things get required. Know they're cached, permanently. [03:28] Qbix2: require('something')(Monolith) [03:28] Qbix2: but then I changed it all to require('something') [03:29] Qbix2: and had var Monolith = require('Monolith') inside that somehting.js [03:29] Aria: And that require is synchronous. [03:29] dgathright has joined the channel [03:29] context: Monolith would be the object. not the instance. [03:29] Qbix2: right, Aria, that's what I wanted to solve when I came in here, and I think we solved it [03:29] Aria: Hehe. Good! Just complex when you have tentacle code. [03:30] Aria: the actual rules are simple, but it's conceptually a little tangled if you reassign things, since exports is sometimes {} and sometimes what you assigned. [03:30] mykul has joined the channel [03:31] Xano has joined the channel [03:31] Aria: Sorry for the roundabout. [03:31] context: any ideas on my extremely simple https request ? [03:31] Aria: (I went through a couple iterations of this with the html5 parser I wrote.) [03:31] context: :/ [03:31] Qbix2: Broadcast.js does require('Base/Broadcast').apply(Broadcast); Base/Broadcast.js defines [03:32] Qbix2: Base/Broadcast.js then exports a function takes "this" and does stuff to it [03:32] Qbix2: but before it returns, it also requires('Broadcast/Users') [03:32] Qbix2: I mean 'Broadcast/Agreement' [03:33] Qbix2: Broadcast/Agreement defines Broadcast_Agreement function, and does Q.subclass(Broadcast_Agreement, require('Base/Broadcast_Agreement')) [03:33] Aria: ACTION nods. Just make sure Broadcast's module.exports is assigned before that. [03:33] Qbix2: and finally, 'Base/Broadcast_Agreement.js' requires Broadcast... [03:33] Qbix2: but by this point module.exports was set in Broadcast.js, so from what you told me, it should return that object right? [03:33] zeade has joined the channel [03:33] context: wtf [03:34] context: so broadcast requires agreement, agreement requires broadcast :/ [03:34] context: maybe split that out into seperate pieces? [03:34] darshanshankar has joined the channel [03:34] jbroman: context: You don't think he has enough pieces? [03:34] Qbix2: yes, they require each other lol [03:34] Qbix2: I have 4 pieces: [03:34] context: i have no clue what he is doing honestly [03:34] Qbix2: Broadcast, Base/Broadcast, Broadcast/Agreement, Base/Broadcast/Agreement [03:34] Qbix2: lol [03:34] context: :/ [03:34] Qbix2: if you've ever used doctrine orm or any other orm you'll know :) [03:35] steffan has joined the channel [03:35] Qbix2: Base/* are auto-generated from the db [03:35] Qbix2: you are supposed to inherit from them [03:35] Qbix2: in PHP it's mad easy [03:35] context: i use rails. the non-suck orm :p [03:35] jbroman: Yeah, AR looks *nothing* like that. [03:35] Qbix2: I am pretty sure rails has it slaos [03:35] zeade: there is no such thing as non-suck orm. [03:35] Qbix2: also [03:35] context: qbix2: nope. you have app/models/agreement.rb [03:35] Qbix2: something's gotta be autogenerated. typically it's a base class which you don't touch [03:35] jbroman: Qbix2: In ActiveRecord, you just inherit from ActiveRecord::Base. [03:35] context: qbix2: no ugly base files. [03:36] Qbix2: jbroman: fine but how does ActiveRecord::Base know about the details of your table? [03:36] context: qbix2: ruby is a bit more flexible than php, and doesn't need stuff like that. [03:36] context: qbix2: it reads it from the database. [03:36] Qbix2: on every query?? [03:36] context: in development mode yes. [03:36] jbroman: Qbix2: There's a schema file that's generated when you run migrations. But it isn't a class that you have to inherit from, it's simply a Ruby description of the schema. [03:36] context: in production when your app starts up. [03:36] Aria: Rails caches tons, dynamically looks up lots, and does all kinds of crazy hackery. [03:37] Aria: It has relatively huge runtime caches outside the class heirarchy. [03:37] Qbix2: In PHP, you'd also inherit from ActiveRecord::Base or something similar, but your inherited class would be an autogenerated one, i.e. the fields and their types would be specified there [03:37] Qbix2: and then you'd inherit from THAT [03:37] Qbix2: because you don't want your work to be overwritten when a class file is being autogenerated [03:37] Qbix2: :) [03:37] context: yeah i had to deal with base classes when doing flex development [03:37] context: its a huge damn pita. [03:37] Qbix2: yea [03:37] Qbix2: overall it's very simple [03:37] blueadept: anyone here familiar with X-Chat aqua scripting? [03:37] Qbix2: ActiveRecord -> BaseAgreement -> Agreement [03:37] context: qbix2: its still more hassle than pleasure. [03:38] Qbix2: in my php it's quite beautiful [03:38] Zuse_ has joined the channel [03:38] Qbix2: but in js I'm trying to build an equivalent [03:38] temp01 has joined the channel [03:38] context: qbix2: you've never touched rails. ActiveRecord -> Agreement. [03:38] jbroman: Qbix2: Be careful about trying to map your PHP directly into JavaScript. Clean PHP code and clean JavaScript code look very different in practice. [03:38] Qbix2: context: probably because Agreeement isn't sealed [03:38] context: mm. anyway. any chance i can get anyone to look at my https request [03:39] Qbix2: and you extend it somehow [03:39] Qbix2: from anotehr file [03:39] Aria: Hehe. I'd be doing this in a more Javascripty way. Making a second-order function that makes objects to inherit from. [03:39] context: qbix2: nope you can leave it empty. [03:39] simon___ has joined the channel [03:39] Aria: context: I don't know what this 'request' library is, so I can't help too much. [03:39] Qbix2: Otherwise, I don't get what file is autogenerated. ActiveRecord is likely a library file. Agreement is YOUR file. So what is autogenerated?? [03:39] context: qbix2: its /only/ possible cause the things ruby can do that are probably not even possible in php [03:39] Qbix2: Probably rails autogenerates some mixin and caches it and you dont even care about it [03:39] context: aria: ignore request, im not even using it [03:39] Qbix2: context: don't get me wrong, php can do it, it's just an ugly hack [03:40] jbroman: Qbix2: It uses metaprogramming features of Ruby (like method_missing and define_method) to do magic at runtime. [03:40] Qbix2: this is how my classes look in PHP btw: http://pastie.org/private/smkkiavpdqum4jnpdlnvqw [03:40] Qbix2: jbroman: php has all that stuff, it's just ugly [03:40] Qbix2: method_exists, or is_callable [03:41] Qbix2: PHP even has __call [03:41] context: heh [03:41] Qbix2: here you can intercept calls and do stuff [03:41] context: and _ namespace seperators [03:41] Qbix2: s / here/where [03:41] Qbix2: context: no, now it's \ :) [03:41] context: qbix2: exactly ;) even worse [03:41] Qbix2: too bad it's not backward compatible with PHP2 [03:41] Qbix2: too bad it's not backward compatible with PHP5.2 [03:41] awesome_guest has joined the channel [03:41] context: sorry. im bias. i have a dislike for php [03:42] Zuse_: Hi guys, I am trying to install node.js on my machine (Vista x64) but after Cygwin install I tried copying the repo and got an error cannot run index-pack, anybody willing to help? [03:42] Qbix2: yeah php kinda fugly [03:42] Qbix2: javascript is beautiful if you take a subset of it [03:42] Qbix2: but commonjs... heh [03:42] jbroman: Qbix2: JavaScript is much more beautiful than PHP. [03:42] Qbix2: personally I think python, then C, then java [03:42] Qbix2: in terms of beauty [03:42] Qbix2: and simplicity [03:43] sounko: Zuse_: do you actually want to use it in cygwin? or just end up with a node.exe to play with in windows? [03:43] sounko: i threw away cygwin after i compiled the .exe [03:43] sounko: you only need 4-5 dll's [03:43] blueadept: php must be destroyed [03:43] context: grrr [03:43] context: ACTION murders https [03:43] Qbix2: learning ruby is a bit like a#zip | | k /a/ "foo" @moo :koo [03:43] Zuse_: sounko: i was just following instructions https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows) [03:43] jbroman: Qbix2: You're doing it wrong if your Ruby looks like that. [03:43] context: qbix2: no thats perl. [03:44] Qbix2: in javascript it's straightforward. [03:44] jbroman: Ruby has some Perl-isms which don't come up much in practice. [03:44] Qbix2: doSomething(function (a, b) { c } ) [03:44] sounko: Zuse_: yeah but do you want a unix environment in windows [03:44] sounko: or do you want to play with node in windows [03:44] Qbix2: in Ruby it's got ONE callback only: [03:44] koichik_ has joined the channel [03:44] Qbix2: def doSomething|a, b| [03:44] context: qbix2: my_array.each do |item| ...... end is hardly ugly [03:44] Qbix2: in JS I can have > 1 callbacks [03:44] jbroman: Qbix2: Ruby has proc/lambda. [03:45] boehm has joined the channel [03:45] Qbix2: myArray.each(function(item) { } ) [03:45] context: qbix2: yeah you dont know ruby. [03:45] Qbix2: I like it more :) [03:45] jbroman: Not completely equivalent, but still. [03:45] context: do is less typing. [03:45] Qbix2: at least js lets me do [03:45] jbroman: Besides which, typical Ruby does not use callbacks nearly as much as node.js. [03:45] Qbix2: myArray.each(function (item) { }, onError ( something) {else } ) [03:45] Qbix2: instead of the silly |item| [03:45] Qbix2: ACTION likes callbacks :) [03:45] Aria: Huh, context ... it hangs for me, too, and I can't see why. [03:46] Zuse_: sounko: well i think it would be handy, i am using git, vim etc ... i have a mingw running properly, and i am using it quite often [03:46] CIA-110: libuv: 03Paul Querna 07master * r0bf3857 10/ (uv-unix.c uv-unix.h): unix: Don't malloc for each write - http://bit.ly/oY5nXT [03:46] context: aria: the request works fine in the browser. and doesnt say its still sitting there [03:46] Aria: (though the end is duplicate) [03:46] context: aria: haha yeah ive tried with and without [03:46] context: im confused as all hell [03:46] Qbix2: those | | are for example just an unnecessary feature that is like having 1 callback and nothing else [03:46] context: some peopel said put end, some said it looks fine [03:46] Aria: Yeah, end isn't needed for get() [03:47] Aria: Bug in SSL, maybe; OR tarpitting if you don't send a user-agent. [03:47] sounko: Zuse_: ok, well it worked fine for me, so not sure sorry. if you did just want to play with node.exe you can grab it from http://sounko.com/node.zip [03:47] context: hmmm [03:47] context: this is 0.5.0-pre [03:47] vid_ has joined the channel [03:48] context: installing 0.4.9 [03:48] Zuse_: sounko: anyway the real reason i need node now is that i want to use coffee script, so thanks for that [03:48] context: im more of a fan of caffeine than coffee-script [03:48] Aria: In fact, context, I think that's it. Try adding headers: {"User-Agent":"Testing"} [03:49] context: ahh good idea [03:49] context: ACTION waits for 0.4.9 [03:49] Aria: It works for me if I add that. I think mtgox has tarpitting of naive scrapers. [03:49] ShreeKavi has joined the channel [03:49] Eleph has joined the channel [03:49] bradleymeck_ has joined the channel [03:50] mandric has joined the channel [03:50] Xano has joined the channel [03:50] context: aria: makes sense. [03:50] Qbix2: caffeine > CS? why [03:50] context: aria: thnx for that. [03:50] Aria: Sure thing! [03:50] unlink has joined the channel [03:50] unlink has joined the channel [03:50] Aria: .oO(Don't ask me why I thought of that.) [03:50] context: qbix2: its JS with cool features plus backwards compat. take that coffee-script [03:51] rchavik has joined the channel [03:51] context: qbix2: http://weepy.github.com/kaffeine/ [03:51] context: oops. its a k [03:51] dguttman has joined the channel [03:51] ZuseX4 has joined the channel [03:51] context: qbix2: and callback 'unrolling' [03:53] ShreeKavi has left the channel [03:53] isaacs has joined the channel [03:53] context: aria: thnx. you just put my last 2-3 hours to shame :( [03:53] Aria: Aww. [03:53] Aria: You're welcome. [03:54] context: :D [03:54] Qbix2: I don't like it [03:54] Qbix2: I got more powerful shit than this in a javascript library [03:55] Qbix2: Q.pipe(['user', 'item'], function (params, subjects) { do something with user, item (this.fill('tag'), ['item', 'tag'], function () { do something with item, tag } ) [03:55] Qbix2: allowing me to write js code that waits until all required objects are filled, then use them :) [03:55] Qbix2: great for writing web apps [03:56] Qbix2: also I've got Q.getter for having intelligent getters (which queue callbacks if request already sent, which cache results, etc.) [03:56] Qbix2: and Q.batch for batching stuff like requests (and throttling them) [03:56] context: aria: that fixed my request stuff also :D [03:56] Qbix2: allowing me to writ stuff like this: [03:57] Aria: context: Yay! [03:57] Qbix2: Users.get({id: 9284}, function (user) { use this object } ); [03:57] Qbix2: and if the user was already gotten, the cached one is returned ... if the request is out, then I don't send it again [03:57] Qbix2: etc. [03:57] context: uhhh [03:57] context: what [03:57] Qbix2: think about a common problem [03:58] Qbix2: MyDatabase.get({ some criteria }, function ( result ) { use result } ) [03:58] Qbix2: how do you solve it? [03:58] context: what are we comparing this to [03:58] Qbix2: I am comparing this to the trivial and inefficient ways of solving it [03:58] context: ruby/rails? kaffeine? [03:58] Qbix2: anything [03:58] Qbix2: imagine on the CLIENT you have js: [03:58] Aria: Heh, I'm not sure I see the problem there either. [03:59] Qbix2: grabFromServer( { some id }, function (result) { use result } ) [03:59] Qbix2: this is like the most common thing [03:59] Qbix2: e.g. i want to display 100 user avatars [03:59] Qbix2: how do I do it [03:59] Qbix2: given 100 user ids [03:59] context: i query for 100 users, and send the data to the client? [03:59] Qbix2: I could just construct a request with 100 ids and send it to the server, and then get a huge list back. [03:59] Qbix2: right, btu what if your client had previously already got avatars for 95 of the users [04:00] Qbix2: why not cache them? [04:00] Qbix2: and just request the last 5 [04:00] context: so cache them and dont reuqest them again? [04:00] context: i think we just migrating to rambling :/ [04:00] mandric has joined the channel [04:00] Qbix2: okay, and another problem, what if two asynchronous methods want to get the 100 avatars [04:00] Qbix2: so now you send out two requests for the same data? [04:00] Qbix2: or do you recognize that one request is already pending and queue the callbacks? [04:00] Qbix2: see what I mean? this is a common pattern [04:01] alessio_alex has joined the channel [04:01] dittos has left the channel [04:01] Qbix2: imagine if there was a way to take any getter and turn it into a smarter getter, one that could cache results, queue callbacks, throttle requests, and batch requests transparently, all you had to do is call get? [04:01] context: you know what node really needs [04:02] context: string interpolating [04:02] Qbix2: tru [04:02] Qbix2: but once again you can just do it with a function/lib [04:02] harth has joined the channel [04:02] Qbix2: http://phpjs.org/functions/sprintf:522 [04:02] Qbix2: done [04:03] context: your lucky this isnt #c [04:03] Qbix2: heh why [04:03] context: you should use snprintf in c not sprintf [04:03] context: and in the console, is there anyway to 'breakpoint' inside a callback [04:03] Qbix2: oh [04:04] Qbix2: we need debugger; :) [04:04] Qbix2: but you usually don't watch the console [04:04] fattytuna has joined the channel [04:04] Qbix2: in unix there is only stderr, fd0,1 and 2 [04:05] Qbix2: do you propose that node.js write to stdout and read from stdin like the REPL [04:05] Qbix2: basically drop you into the repl? [04:05] context: no im in the repl [04:05] context: but i want to breakpoint back into something i just executed [04:05] context: :p [04:05] context: or, easily get at something inside the callback [04:06] context: nm easy way around that [04:06] Qbix2: I have a question.... what is module.exports by default? [04:06] Qbix2: an empty object? or something else? [04:06] Qbix2: js: module.exports [04:06] gbot2: Qbix2: Error: ReferenceError: module is not defined [04:07] Kimichi has joined the channel [04:07] Qbix2: what is module.exports.constructor [04:07] Qbix2: how can I tias in the repl [04:07] context: nice. i tell request with its neat feature the request is json. it gives me the string :/ [04:07] Qbix2: lol [04:12] pyrotechnick has joined the channel [04:13] mikey_p: is there any node hosting that doesn't suck? [04:13] context: anyway. off to get real work done. this will have to wait till tomorrow [04:14] tilgovi has joined the channel [04:14] tilgovi has joined the channel [04:14] JasonSmith: Is there any hosting that doesn't suck? [04:14] btipling: JasonSmith: I like zerigo [04:14] JasonSmith: (Besides, of course, Linode) [04:14] sounko: i setup a rackspace cloud yesterday [04:14] sounko: so far so good [04:14] btipling: I work at Rackspace :/ [04:14] context: mikey_p: nodejitsu and/or nodester are no good? [04:14] AvianFlu has joined the channel [04:15] sounko: btipling: hahah [04:15] mikey_p: tried joyent and dotcloud today, couldn't get either running [04:15] sounko: well it did everything i needed :P [04:15] mikey_p: would actually really like to try nodejitsu [04:15] btipling: it's out of my price range [04:15] btipling: hence I use zerigo [04:15] sounko: yeah i tried joyent twice, but it hasn't created my server twice [04:15] btipling: I get more ram with zerigo than I would on EC2 [04:15] sounko: and support is "looking into it" [04:16] btipling: I'm running my node.js site on it [04:16] mikey_p: i couldn't even get my app running on joyent, just a basic express app, but everytime I ssh'd in and tried to install dependencies it filled up /tmp after half a second [04:16] btipling: seems to load pretty quickly: http://sphela.com [04:16] btipling: :/ [04:16] mikey_p: no.de is a total joke for being the company behind node.js development [04:16] btipling: idk [04:17] sounko: worked quickly for me [04:17] btipling: joyent is behind node.js isn't it [04:17] sounko: rackspace cloud is cheap for a little box though [04:17] sounko: why do you need something specy for that website? [04:18] mikey_p: yeah, i just thought I'd try some application hosting instead of bare metal this time [04:18] btipling: is it? [04:18] ekryski has joined the channel [04:18] btipling: sounko: it's all redis, so everything needs to fit in memory [04:18] btipling: right now there's not a lot [04:18] mikey_p: I could always try heroky [04:18] sounko: yeah 10.95 a month if you wanna leave a 256mb linux machine running 24x7 [04:18] pyrotechnick: not too bad [04:18] context: i use prgmr.com [04:18] context: rather enjoy it [04:20] context: and way cheap [04:20] btipling: I also host on prgmr but it takes a few days to get a server sometimes [04:20] context: btipling: true. [04:20] btipling: it's definitely cheap [04:20] pquerna: i use prgmr, and zerigo and rackspace cloud and ec2 [04:20] btipling: you use zerigo for what [04:20] ekryski has left the channel [04:20] pquerna: ipv6 box [04:20] btipling: at home or work? [04:20] pquerna: home [04:20] pquerna: so i can test node on ipv6 [04:20] pquerna: important stuff you know. [04:20] btipling: I just think there are better deals than rackspace right now [04:20] mbrevoort has joined the channel [04:20] btipling: and ec2 [04:20] btipling: at least for small pockets [04:20] btipling: if you want a nice sla maybe it's better [04:20] matyr has joined the channel [04:21] sounko: is rackspace big? [04:21] infynyxx has joined the channel [04:21] mikey_p: slightly [04:21] sounko: im in australia and had a phone call within 2 minutes [04:21] sounko: was pretty smooth stuff [04:21] pquerna: f-d: i also work at rackspace. [04:21] pquerna: rackspace is big. [04:21] btipling: rackspace is like a 5bn company [04:21] pyrotechnick: send us some sys admin porn [04:21] btipling: or 3bn [04:21] btipling: I dunno [04:22] btipling: somewhere in there [04:22] ryanfitz has joined the channel [04:22] sounko: give or take [04:22] sounko: :p [04:22] pquerna: ttp://www.google.com/finance?client=ob&q=NYSE:RAX [04:22] pquerna: right :) [04:22] btipling: 5.75bn [04:22] btipling: ok [04:22] pyrotechnick: http://www.angelfire.lycos.com/ > rackspace [04:22] btipling: haha [04:22] ckknight has joined the channel [04:22] pyrotechnick: wow they've actually made it look decent [04:23] sounko: and they have almost 4000 likes [04:23] btipling: https://twitter.com/#!/Angelfire [04:23] btipling: wow angelfire has a twitter [04:23] btipling: with no followers [04:23] btipling: :/ [04:23] sounko: 191, mate [04:23] sounko: give them a break [04:24] pyrotechnick: thats way more than me :( [04:24] btipling: really? [04:24] pyrotechnick: https://twitter.com/#!/pyrotechnick/followers [04:24] btipling: I barely tweet and I have more than that :/ [04:24] pyrotechnick: you're probably a nice person [04:24] btipling: no lol [04:24] ckknight has joined the channel [04:24] pyrotechnick: maybe you're funny [04:24] btipling: well [04:24] wookiehangover has joined the channel [04:24] pyrotechnick: maybe they dig your node [04:24] btipling: I got a bunch when I said something mean about gruber [04:25] btipling: and he retweeted it [04:25] btipling: and all these haters hated on me :/ [04:25] btipling: and some people followed [04:25] pyrotechnick: i never want more followers than tweets [04:25] pyrotechnick: it would feel like i was announcing everything [04:26] pyrotechnick: when i'm merely just trying to murmur it, to tweet per say [04:26] pyrotechnick: with 1000/100 i'm doing an okay job ATM [04:26] btipling: that's not bad [04:28] matyr_ has joined the channel [04:31] jslatts has joined the channel [04:32] ryah has joined the channel [04:36] Madonnaboy has joined the channel [04:37] Plazma has joined the channel [04:37] Madonnaboy: Was NodejsRobberBaron here earlier? [04:38] jmoyers has joined the channel [04:38] pyrotechnick: i think he went to #prison for his crimes [04:40] ambroff_ has joined the channel [04:40] Madonnaboy: We're doing a start-up on node.js for a New York/Michigan market vertical and it is *sick* *sick* so sick we need 911. [04:41] pyrotechnick: wtfs a market vertical? [04:41] Madonnaboy: Node.js just feels a bit spartan sometimes though. [04:42] pyrotechnick: hahaha [04:42] pyrotechnick: what are your troubles? [04:42] materialdesigner has joined the channel [04:44] Madonnaboy: Mostly little things like setting cookies, input validation, etc. [04:44] jamescarr has joined the channel [04:44] jamescarr: doez zombie.js even work? [04:44] jamescarr: I installed it and tried the example on the home page... [04:44] jamescarr: got a bunch of Cannot call method 'toString' of null [04:44] jamescarr: and "socket hang up" [04:44] Tobbe__ has left the channel [04:45] pyrotechnick: i've had alot of trouble with zombie [04:45] pyrotechnick: especially with websockets [04:46] Madonnaboy: But to explain, our market vertical is providing remote business execution ennoblements to people who work in NYC, but want to live in Michigan. [04:46] jamescarr: pyrotechnick, did you get it to just work even? [04:46] e6nian: ?d [04:46] jamescarr: I mean, all I want to do to try it out is navigate to a web page and print the title [04:46] jamescarr: something that is pretty simple with geb [04:46] confoocious has joined the channel [04:47] Madonnaboy: But what I'd really like to see in node.js is a canonical way of splitting up model logic between different "sections." [04:48] Madonnaboy: (Based on URL) [04:48] Madonnaboy: I'm sort of faking it with nginx and multiple node.js servers atnm [04:48] Madonnaboy: *atm [04:49] jamescarr: :( [04:50] fangel has joined the channel [04:51] Aria: Like Express? [04:51] mikeal has joined the channel [04:51] Madonnaboy: How do you best divide server-side logic in node.js when you have a complex, bloated web app? [04:53] Madonnaboy: I've been toying with having different files then using URLs to request them and doing an eval() [04:55] konobi: ryah: http://www.youtube.com/watch?v=Thi8JvGuUm8 [04:55] Viehzeug has joined the channel [04:57] mjr_: Madonnaboy: you'll need some sort of router / load balancer layer [04:58] brimster has joined the channel [04:58] mjr_: Using nginx to do that seems reasonable. Hardware load balancers in some kind of HA cluster might also be a good way to go. [04:58] salamon21 has joined the channel [04:59] Madonnaboy: It's really just that we have so much code it's hard to divy it up [04:59] Chani: blarg. one of my streams is throwing ENOENT at some point, and I can't figure out which or when. there's no backtrace... just.... stream.js:99 throw er; // Unhandled stream error in pipe. [05:00] Chani: one of my error functions is being called... but somehow I still get an error thrown too [05:00] Chani: it makes no sense. [05:01] mjr_: Madonnaboy: do you have so much traffic that one node process cannot handle it? [05:01] Chani: how do I even track this down? [05:01] Madonnaboy: mjr_: It's not the traffic actually. It's how to best separate about 9,000 lines of node.js code [05:02] Madonnaboy: It's soup right now :( [05:02] jamescarr: is there something like zombie.js that actually works? I'd like to just be able to submit a form on a site and get the downloaded file [05:02] louissmit has joined the channel [05:03] mjr_: Madonnaboy: I'm guessing that the solution is highly specialized to your application. [05:03] xhr has joined the channel [05:03] jamescarr: if worse comes to worse I'll probably just use selenium [05:03] tim_smart has joined the channel [05:04] mjr_: We have like 20,000 of code, and it gets spread out across 3 different pools of servers that handle different parts of it. [05:04] Madonnaboy: mjr_: We used to use Java classes [05:04] Madonnaboy: ah [05:04] Chani: wait... [05:04] mjr_: I'm pretty happy with that setup. [05:04] Chani: if (this.listeners('error').length === 1) { [05:04] Chani: throw er; // Unhandled stream error in pipe. [05:05] Chani: ^^^ doesn't that code say "if there is exactly one listener, throw the error"? and shouldn't it say "if there's less than one..."? [05:06] mjr_: Chani: yeah, that seems odd. Shouldn't it just be 0? [05:06] Chani: mjr_: even odder: it's removing all the listeners in the line above. [05:08] Chani: so... hte onerror function removes the error handers. hmm. lovely. [05:08] sounko: http://www.cloudflare.com/overview.html [05:08] Chani: ACTION sees a git commit message that looks relevant... [05:09] Prometheus: sounko: http://amix.dk/blog/post/19627#CloudFlare-review-The-Real-Thing-or-Marketing-Bullshit =) [05:09] zinkem has joined the channel [05:09] Chani: ahh,. yes, this bug is fixed in git. https://github.com/joyent/node/commit/2b91256c6185fbcaaa5fc49a3a541e5ed0ec0e75 [05:09] sounko: thank you [05:09] Chani: ACTION ponders [05:09] devongovett has joined the channel [05:10] Chani: what's less effort... finding a way to work around that in my program, or submitting a patched version of node with my assignment... [05:11] vikstrous1 has joined the channel [05:12] roy_ has joined the channel [05:12] ngs has joined the channel [05:13] Chani: oh lovely, I can't seem to work around it. a try/catch around pipe just isn't enough [05:13] Chani: guess I'm using a patched node then. huh. [05:13] mjr_: That's annoying. [05:14] CIA-110: node: 03Ryan Dahl 07master * rae7ed84 10/ (ChangeLog doc/index.html src/node_version.h wscript): Bump to v0.5.0 - http://bit.ly/pl9VNZ [05:14] CIA-110: node: 03Ryan Dahl 07master * r2dfed9f 10/ src/node_version.h : Now working on version v0.5.1 - http://bit.ly/pAJgXD [05:15] Swizec has joined the channel [05:15] davve: nice [05:15] jtsnow has joined the channel [05:16] clifton: sweet [05:17] jacter has joined the channel [05:18] Madonnaboy: My boss said this... [05:18] Madonnaboy: NODE.JS IS SO SICK WE'RE WEARING STRETCHERS! [05:18] Wa has joined the channel [05:18] kal_ has joined the channel [05:19] Madonnaboy: He raps a lot about "freak Freak Freaky Nginx" too [05:19] googol has joined the channel [05:19] Prometheus: what kind of meds you keep him on [05:20] kal_: Heya, I've got a express related question, should I ask it here or is there a express channel for that? [05:21] Prometheus: I think there's #express but you can ask here too =P [05:21] matwill has joined the channel [05:21] jamesr has joined the channel [05:22] Spion_ has joined the channel [05:22] Chani: hahaha [05:22] Chani: what's express? :) [05:23] Chani: ACTION watches node compile [05:24] admc has joined the channel [05:24] kal_: kk :) The problem is with routing.. I've got a route with two parameters (https://gist.github.com/1066621) but it keeps eating up my /public/stylesheets and /public/javascript ? [05:26] temp02 has joined the channel [05:26] kal_: my entire app.js looks like https://gist.github.com/1066624 [05:27] rhdoenges: so I saw a really cool repo and it was something like an eventemitter, but the events went across the network? does anyone know what I'm talking about? [05:29] matyr has joined the channel [05:30] rhdoenges: it was like dnode, but with events. [05:31] jamesr: hey y'all. can anyone tell me where i might find the implementation of process._needTickCallbacks()? [05:31] e6nian has joined the channel [05:32] Chani: hrm. [05:32] tolmasky-macbook has joined the channel [05:33] dgathright has joined the channel [05:34] darshanshankar: rhdoenges: hook.io by Marak? [05:34] bartt has joined the channel [05:34] Evanlec: Hey, I'm curious, I know that node.js wasn't necessarily designed for system administration type applications, but has anyone found any joy writing such things? cron scripts, admin scripts etc [05:34] jamesr: it seems to all hinge on uv_idle_t [05:34] Chani: so, I have this server, with the slim chance that one connection may try and write to a file at the exact same time as another. I already have it set up to abort one of the transactions if this happens, but, really I'm supposed to have it just wait a bit until the other one finishes. anyone know a nice way of doing that? [05:35] Chani: maybe I could set up some sort of queue of callbacks or something... [05:35] kriskowal has joined the channel [05:36] jamesr: ah, i see. header is https://github.com/joyent/node/blob/master/deps/uv/uv.h, impl is in the same directory [05:36] Evanlec: Chani: yea, that sort of workflow could easily be handled using a closure [05:36] gqlewis has joined the channel [05:36] jamesr has left the channel [05:36] Chani: Evanlec: oh? I'm still new to closures... [05:37] Evanlec: Chani: yea, well basically you pass the callback to write to the file to a queue and the callback function can remember the context it was in [05:37] Chani: oh, that :) [05:38] Evanlec: Chani: i'm new to closures as well, but someone explained to me one use for closures being a queue type workflow [05:38] Chani: I'm already doing that, I think, for all the fs callbacks [05:38] Evanlec: Chani: in this case they were using it to do rate-limiting for an irc bot [05:38] Evanlec: Chani: but it seems like possibly the same type of thing [05:38] Chani: but in this case it's not some node magic calling and managing hte callback stuff, it's my own code... that side of it I'm a bit unsure of [05:38] gqlewis has joined the channel [05:39] Evanlec: Chani: well why not make it so? [05:39] Chani: does node even have a queue structure? [05:39] Chani: make what so? [05:39] Evanlec: Chani: make this process handled through node [05:40] Evanlec: Chani: though you might want to find a module that can give you more realtime access to filesystem events [05:41] gxdssoft has joined the channel [05:41] Chani: umm.. what? [05:41] robhawkes has joined the channel [05:41] Chani: handled through node? [05:42] Evanlec: Chani: callbacks etc [05:42] Evanlec: Chani: what is so confusing [05:42] Chani: damnit, google is giving me weird non-javascript stuff when I look for node.js queues... [05:42] squeese has joined the channel [05:42] Chani: Evanlec: the first problem is, is there a queue implementation or do I have to write my own? [05:43] Evanlec: Chani: I'd be very suprised if there wasnt [05:43] Evanlec: Chani: npm search queue [05:43] Chani: feh, google fail :( [05:44] brainproxy: child_process.fork looks really nice :) [05:44] Evanlec: Chani: plenty of results [05:44] Evanlec: brainproxy: for what? [05:44] Chani: I don't seem to have npm [05:44] kbni has joined the channel [05:44] brainproxy: for offloading stuff from the front end [05:44] Chani: also, if that's some sort of package manager, no. [05:44] Chani: I don't need my assignment getting any more complicated to install... [05:45] tuhoojabotti: npm makes things a breeze [05:45] brainproxy: Chani: npm will likely make your life easier [05:45] brainproxy: also, I like to use it in combo w/ nvm [05:45] tuhoojabotti: What's that? [05:46] Evanlec: Chani: uhm...this is #node.js ... [05:46] matyr_ has joined the channel [05:46] brainproxy: tuhoojabotti: https://github.com/creationix/nvm [05:46] Evanlec: Chani: yea, do yourself a favor and install npm [05:47] caiges: any good std libs compatible with node? Say string concatentation etc. [05:47] dnjaramba has joined the channel [05:47] Jakwac: Anyone have any experience with Sequelize? [05:47] joshthecoder has joined the channel [05:47] Swizec: +1 npm [05:47] Swizec: +1 FOR npm I mean [05:47] Chani: no. I don't want to have to write a script to fetch, compile and install npm for my TA. too many things could go wrong and TAs can NEVER solve their own problems [05:47] tuhoojabotti: Swizec++ [05:47] v8bot: tuhoojabotti has given a beer to Swizec. Swizec now has 1 beers. [05:47] tuhoojabotti: :P [05:48] Chani: and this is due thursday. [05:48] Swizec: tuhoojabotti I love that bot! :O [05:48] brainproxy: Chani: if you use nvm, it compiles node for you, and auto installs npm [05:48] Swizec: why didn't I know about this before [05:48] rhdoenges: darshanshankar: yes! gracias. :D [05:48] Chani: anyways, from reading the code of a higher level "queue" system, it seems what I want is Array.push() and Array.shift() [05:48] Evanlec: Chani: so just package your modules together...or dont use any modules then, same difference [05:48] tuhoojabotti: Chani: I installed easily both node and npm to my home folder of this shared hosting. [05:49] Chani: brainproxy: that sounds very nice, but not two days before an assignment is due :) [05:49] Evanlec: Chani: actually yes, nvm would be a better bet, since it makes your installation portable [05:49] Chani: portable? [05:49] Evanlec: Chani: are you writing nodejs or what? [05:50] tuhoojabotti: :P [05:50] Evanlec: I dont even know what you're writing [05:50] tuhoojabotti: Perhaps he's writing php [05:50] Evanlec: i think that must be it [05:50] Swizec: you could actually use npm to manage php … I think :O [05:50] Swizec: :P * [05:50] Evanlec: Chani: there's a different channel for javascript [05:50] tuhoojabotti: Swizec: Even chuck norris can't manage php [05:50] benjaminRRR has joined the channel [05:51] rhdoenges: even perl can't manage php [05:51] Chani: anyways, this is all moot, because it turned out Array had the functionality I needed :P [05:51] Chani: no modules required [05:51] tuhoojabotti: You're welcome. :) [05:51] tuhoojabotti: I suggest you go rad about some JS basics. :) [05:51] tuhoojabotti: :D [05:51] tuhoojabotti: read* [05:51] xeodox has joined the channel [05:52] Swizec: yes, that [05:52] Swizec: this isn't the PHP community, we like people to have a marginal sense of what they're doing :P [05:53] tuhoojabotti: Oh, I better get going then. :/ [05:53] Evanlec: Chani: okay, thanks for wasting our time [05:53] tuhoojabotti: Evanlec: IRC is never a waste of time. :O) [05:53] brainproxy: i understand the fear of adding complexity when a deadline looms [05:53] Evanlec: tuhoojabotti: lol..right ;) [05:53] seawise has joined the channel [05:54] Chani: Evanlec: np, you wasted plenty of mine too [05:54] brainproxy: but the reality is that nvm/npm will make things simpler, not more complex, so it's a matter of whether or not you (Chani) trust our advice [05:54] Evanlec: Chani: you're in the wrong channel, next time ask in #javascript [05:54] stephank has joined the channel [05:54] Evanlec: Chani: I'm glad [05:55] tuhoojabotti: gladOS [05:55] tuhoojabotti: :O [05:55] Viehzeug has joined the channel [05:55] Evanlec: jees [05:55] tuhoojabotti: Okay I better start programming.. -> [05:55] Evanlec: yea, back to work [05:56] Evanlec: Chani: sorry, no hard feelings, I wish you well on your project [05:56] Chani: brainproxy: oh, I trust your advice, but like I said, time pressure. this is not the time for me to try new things. [05:56] jmoyers: what the fuck are you talking about [05:56] jmoyers: marginal sense of what they're doing? [05:56] jmoyers: this is js dude, we welcome new programmers [05:56] Chani: Evanlec: eh, I was having a bad day anyways [05:56] jmoyers: or new to js [05:56] Chani: jmoyers: thank you. [05:56] jmoyers: don't be a close minded turkey [05:56] Chani: I was actually about to leave :/ [05:56] brainproxy: i agree, noobs are welcome [05:56] Evanlec: Chani: it just suprising to me that you considered npm to be something new ... if you're using nodejs [05:57] Chani: Evanlec: yeah, I've heard npm mentioned once or twice but hadn't looked at it yet [05:57] Swizec: jmoyers lol, it was a joke at php's expense, chillax [05:57] Chani: I only started using node a month ago [05:57] langworthy has joined the channel [05:57] jmoyers: by the way [05:57] jmoyers: you can use npm, and not have anyone using your project have to depend on it [05:57] Chani: and I only started learning (as opposed to blindly writing) js a week before that :) [05:57] Evanlec: Chani: nodejs just by itself I wouldn't think would get you everything [05:58] jmoyers: it uses a folder called "node_modules" to store your dependencies [05:58] jmoyers: in the project root, locally [05:58] jmoyers: its ubiquitous in this community [05:58] Swizec: Chani that's always a good approach ;) [05:58] jmoyers: so, when you package up your project, you take your dependencies with you, generally [05:58] Chani: jmoyers: cool. I'll look into it next week when I'm less stressed :) [05:58] SamuraiJack has joined the channel [05:58] jamescarr has joined the channel [05:58] Evanlec: also a good point [05:58] jamescarr: oh well [05:59] jamescarr: I got zombie.js half way working [05:59] jamescarr: seems to work well for simple pages... blows up when trying to navigate something rough [05:59] Evanlec: Jakwac: hmm, dare I guess what Sequelize module does?? [05:59] fr0stbyte has joined the channel [05:59] Jakwac: Its a ORM for MySQL [06:00] Jakwac: http://www.sequelizejs.com/#installation [06:00] Madonnaboy: I want postgre [06:00] Madonnaboy: Postgresql is gonna freak freak freak freaky freak *freak* you out! [06:00] Chani: ok, I' better get this damn thing over with now :) [06:03] adrianmg has joined the channel [06:03] jamescarr: usnt there a phantomjs module? [06:03] tuhoojabotti: Chani: What are you doing anyways? :3 [06:04] mhauri has joined the channel [06:05] Evanlec: Jakwac: eh..but the name...implies lots of SQL hacking...which is lame [06:05] Evanlec: Jakwac: are you stuck with MySQL I'm guessing? [06:06] Evanlec: Jakwac: I'm in the same boat actually for some of my projects [06:08] kbni: asdasd [06:08] Swizec: ACTION thinks nodejs+sql is a bit weird [06:08] Swizec: but I'm probably wrong [06:09] jmoyers: not weird. [06:09] kbni: definitely weird [06:09] Evanlec: well, they weren't a match made in heaven [06:09] Evanlec: like php and mysql ;p [06:09] cjm has joined the channel [06:10] Chani: tuhoojabotti: I was crazy enough to do my distributed systems homework in node [06:10] tuhoojabotti: Hoho [06:11] brainproxy: Chani: you may want to take a look at Substack's dnode library [06:11] Chani: so here I am with a toy file server that has to be ACID and other such acronyms... [06:11] Chani: brainproxy: oh yeah? what's that? [06:11] jmoyers: rpc framework [06:11] Chani: huh [06:12] Chani: iinteresting [06:12] brainproxy: right, basically RPC/RMI, which is one way to go about doing distributed stuff [06:12] andree has joined the channel [06:12] tuhoojabotti: I like node because I wrote my web server in just a few days and it's working like charm :D [06:13] MrGoodbyte has joined the channel [06:13] tbranyen: tuhoojabotti: :D [06:13] tuhoojabotti: Some might argue I should use express or such :S [06:13] tbranyen: express does have it benefits [06:13] tbranyen: being battle tested and popular and shit [06:13] Jakwac: Evanlec: Kind of [06:14] brainproxy: that, and why reinvent the wheel when it comes to basic stuff like routes and whatnot [06:15] tuhoojabotti: brainproxy: My server is so simple :P [06:15] Jakwac: Evanlec: Mysql is widely use, so I'm hesitent to move to something like mongodb [06:15] syst3mw0rm has joined the channel [06:15] tuhoojabotti: Only thing I hacked up myself was gzipping :D [06:15] brainproxy: Jakwac: but mongodb is web scale [06:15] brainproxy: ACTION ducks [06:15] Evanlec: brainproxy: LOL [06:15] darshanshankar: brainproxy: ... XD [06:15] Evanlec: Jakwac: well mysql is widely used, but so is php... [06:15] Evanlec: Jakwac: if you're going to use node, whats the harm in using mongodb also? [06:15] jmoyers: hehe [06:16] kbni: what are google's public dns servers again? [06:16] Bonuspunk: 8.8.8.8 [06:16] kbni: thanks [06:16] tuhoojabotti: and 8.8.4.4 [06:16] brainproxy: 8.8.4.4 [06:16] tuhoojabotti: I think [06:16] tuhoojabotti: :P [06:16] Bonuspunk: yeah [06:16] tuhoojabotti: Worked like a charm when the ISP at work failed [06:17] tuhoojabotti: ISP's [06:17] tuhoojabotti: I was the only one with access to facebook! ":D" [06:17] fr0stbyte has joined the channel [06:17] Bonuspunk: facebook isnt that a google+ clone? [06:18] tuhoojabotti: I'm using G+ now :P [06:18] brainproxy: ACTION downgrades Bonuspunk to myspace [06:18] Chani: ha [06:18] Jakwac: Evanlec: I think I'm going to, but wanted to check out some good MySQL alternatives. The schema I'm using is fairly simple, basically there is a list of customers, each customer has a domain and each domain has a list of MX records. I essencially have to keep track of those MX records. [06:18] Bonuspunk: oh noes ^^ [06:18] Jakwac: each customer has domains (some up to 50) [06:19] Chani: ACTION hugs the channel [06:19] jmoyers: fits relational just fine [06:19] jmoyers: im sure it also fits into mongo, and some people like the flexibility of schemaless, especially for prototypes [06:19] jmoyers: but it also encourages sloppy ass code [06:19] tuhoojabotti: Bonuspunk: http://userstyles.org/styles/50051/google-facebook :P [06:19] jmoyers: and the scale story is not all roses, as everyone claims [06:20] tuhoojabotti: ACTION hugs Chani ♡ [06:20] Chani: :) [06:20] brainproxy: Chani++ [06:20] v8bot: brainproxy has given a beer to Chani. Chani now has 1 beers. [06:20] Chani: mmm, beer [06:21] Swizec: tuhoojabotti++ [06:21] v8bot: Swizec has given a beer to tuhoojabotti. tuhoojabotti now has 2 beers. [06:21] tuhoojabotti: Oo I had one :D [06:21] tuhoojabotti: I guess I was so drunk I forgot! [06:22] Chani: hmmmm... [06:22] Chani: v8bot++ [06:22] v8bot: Chani has given a beer to v8bot. v8bot now has 31 beers. [06:22] Chani: yay, drunkbot! [06:22] Jakwac: The one thing I like about mongoDB is that there is hardly any database setup. [06:22] tuhoojabotti: v8: console.log("lol") [06:22] v8bot: tuhoojabotti: "lol" [06:22] Jakwac: Which makes deployment extremely easy. [06:22] sechrist has joined the channel [06:23] Swizec: db setup is so 1995 [06:23] tuhoojabotti: Fine I'll take a look at it! [06:24] TomY has joined the channel [06:25] Evanlec: so does anyone know what the status is with the nodejs Web Workers? or is there an alternative implementation now? [06:26] zeade: in 1995 you didn't set up a db, you wrote one. [06:26] Evanlec: Jakwac: yea, mongodb is a snap [06:26] sgimeno has joined the channel [06:26] Evanlec: Jakwac: I want to try redis, but redis has a slightly different scope [06:26] mikedeboer has joined the channel [06:27] jmoyers: web workers will use a process model [06:27] Evanlec: Jakwac: also, Riak looks interesting...couchdb didn't look like anything advantageous over mongo to me [06:27] jmoyers: so you can spawn child processes [06:27] jmoyers: just like packages like Cluster do [06:27] brainproxy: Evanlec: heard of OrientDB? [06:27] Evanlec: brainproxy: ah no I dont think so [06:27] dvv has joined the channel [06:27] brainproxy: Evanlec: might be worth investigating, looked interesting to me [06:28] brainproxy: Evanlec: it runs on a JVM so is highly portable and is supposedly quite fast [06:29] Evanlec: brainproxy: hmm, but jvm means instant memory overhead [06:29] Aaron has joined the channel [06:29] Evanlec: brainproxy: I tend to shy away from java stuff, though not to say this isn't worth looking at [06:30] Evanlec: brainproxy: hmm, I like the SQL fallback for RDBMS people ;p [06:31] langworthy has joined the channel [06:31] brainproxy: Evanlec: yes, and the graph layer looks interesting too .. I just haven't had time to experiment with it [06:32] Jakwac: Never thought I would see a Jersey Shore reference in documentation for a nodejs model [06:32] Jakwac: module* [06:32] sreeix has joined the channel [06:33] sub_pop has joined the channel [06:33] Evanlec: Jakwac: where? [06:33] Jakwac: http://mongoosejs.com/docs/virtuals.html [06:34] Evanlec: Jakwac: haha, nice [06:34] Evanlec: brainproxy: yea...they need to have a native english speaker go over their docs though , eek [06:35] jhurliman has joined the channel [06:36] cosmincx has joined the channel [06:36] brainproxy: Evanlec: the principal author is another one of those crazy Italians [06:36] _Ray_ has left the channel [06:37] matyr has joined the channel [06:37] Evanlec: brainproxy: ah [06:38] madsleejensen has joined the channel [06:39] jacter1 has joined the channel [06:40] jborst has joined the channel [06:40] simenbrekken has joined the channel [06:42] jacter has joined the channel [06:43] TomY has joined the channel [06:43] reenignEesreveR has joined the channel [06:43] reenignEesreveR: whats the difference between "exports" and "module.exports" ??? [06:45] jacter2 has joined the channel [06:47] jmoyers: minor usage differences [06:47] jmoyers: you can't replace exports whole [06:47] jmoyers: you can replace module.exports [06:47] jmoyers: module.exports = function(){} // okay [06:47] JoshC1 has joined the channel [06:47] jmoyers: exports = function(){} // no workie [06:48] reenignEesreveR: ummm... why is that? javascript language barrier or something particular in node? [06:48] apejens: I'm using child_process.spawn, and I was wondering if I could somehow syncronize stdout and stderr (now the order is naturally indetermined), without losing information about what comes from what? [06:49] harth has joined the channel [06:49] temp01 has joined the channel [06:49] jamescarr: given a sessionid from a cookie... any ideas on how I can feed this into express? [06:49] jmoyers: jamescarr feed it in? [06:49] jmoyers: middleware [06:49] jmoyers: parse the http header [06:49] sreeix_ has joined the channel [06:49] tdegrunt has joined the channel [06:50] jensn has joined the channel [06:50] jamescarr: yeah... the latest socket.io exposes the cookie headers from the handshake [06:50] jamescarr: going to use that to associate with the session [06:50] febits has joined the channel [06:50] jmoyers: yeah, so there is a cookie parser in one of express' builtins [06:50] jmoyers: grab the id, stick it on the request [06:51] steffan has joined the channel [06:51] jamescarr: ah [06:51] jmoyers: use(express.cookieParser()) [06:51] jamescarr: yeah... the question is how to use that within a socket.io handler :) [06:52] jamescarr: cookieParser and sessions already work fine in my app [06:52] jmoyers: you want to bind a express session to socket.io? [06:52] jamescarr: yep [06:52] jamescarr: because... [06:52] jmoyers: have a dict, map session id to session id [06:52] jamescarr: ya [06:53] jamescarr: trying to figure out how to access the session since I have the session.id in the socket.io callback [06:53] ph^ has joined the channel [06:55] jmoyers: are you using connects session support? [06:55] jamescarr: ya [06:55] jmoyers: looks like a memory store by id, to me [06:55] gxdssoft has joined the channel [06:55] ph^ has joined the channel [06:56] jmoyers: https://github.com/senchalabs/connect/blob/master/lib/middleware/session/session.js [06:56] jamescarr: express.session [06:56] jamescarr: sessions themselves work FLAWLESSLY :) [06:56] jamescarr: it's just hooking it up with socket.io [06:56] jamescarr: ah ha... [06:57] __doc__ has joined the channel [06:59] jamescarr: maybe I'll just use redis-client and look it up directly :) [07:00] jmoyers: jamescarr https://github.com/senchalabs/connect/blob/master/lib/middleware/session.js#L318 [07:00] jmoyers: it uses an internal store object -- [07:00] jmoyers: doesn't export it [07:00] jamescarr: yep [07:00] jmoyers: probably a trivial modification though [07:00] jamescarr: I dont use the memory store though [07:00] jamescarr: and I am not modifying express... that is the wrong approach [07:00] jamescarr: I'm using RedisStore for the sessions [07:01] jamescarr: ah [07:01] jamescarr: https://github.com/LearnBoost/socket.io/pull/344/files [07:02] jmoyers: its not always the wrong approach to modify a library [07:02] `3rdEden has joined the channel [07:02] jamescarr: not always :) [07:02] jmoyers: especially if you need to key off an already available dictionary [07:02] jmoyers: but anyway, not familiar with redis store, cant say [07:02] jamescarr: `3rdEden, so you just use io.set('authorization' fn) ? [07:03] jamescarr: jmoyers, you should... it's pretty sweet :) [07:03] jamescarr: my app runs with a 5 node cluster. The redisStore keeps the sessions across boxes [07:03] fangel has joined the channel [07:04] nsolsen has joined the channel [07:05] groom has joined the channel [07:06] sreeix has joined the channel [07:07] matyr has joined the channel [07:07] `3rdEden: yes [07:08] mhauri has joined the channel [07:08] jamescarr: cookie-sessions... is part of express? [07:08] radiodario has joined the channel [07:08] `3rdEden: Yes [07:08] `3rdEden: they are part of connect, which Express bundles internallyh [07:09] jamescarr: I couldn't require it... do I get the same handler by calling express.session (I think I do, experimenting) [07:10] sechrist has joined the channel [07:10] mendel_ has joined the channel [07:10] topaxi has joined the channel [07:11] jmoyers: handler? [07:11] jmoyers: express.session returns a function which returns a function [07:11] jmoyers: the second function is the middleware [07:11] jmoyers: the first is the options to pass into the middleware [07:11] jmoyers: store etc [07:13] tbassetto has joined the channel [07:13] markwubben has joined the channel [07:13] `3rdEden: jamescarr its the same thing i guess [07:16] Evanlec: thats a lot of functions returning functions ;) [07:16] Evanlec: I guess thus is the nature of node though ;p [07:17] matyr has joined the channel [07:17] jmoyers: nature of middleware anyway [07:17] JKarsrud has joined the channel [07:18] Evanlec: functions! [07:18] Evanlec: wee [07:19] jmoyers: also, RedisStore appears to work exactly like memorystore with get [07:19] jmoyers: https://github.com/visionmedia/connect-redis/blob/master/lib/connect-redis.js#L72 -- ie, you get(session_id, cb) and you get the session object back [07:19] justjake has joined the channel [07:20] jmoyers: connect session takes this data and uses util.merge to merge it onto the new session object, so presumably it has all the relevant session data.. [07:20] jmoyers: so if you have access to the RedisStore object, you've got the session dictionary [07:21] chjj: its the nature of closure being amazing [07:21] chjj: not just middleware ;) [07:21] fly-away has joined the channel [07:21] jmoyers: i do so enjoy funcitons as a first class object [07:22] jmoyers: i recently discovered boost::bind and boost::function in c++ [07:22] jmoyers: i was like, javascript!... me gusta [07:23] catphive has joined the channel [07:23] xhr has joined the channel [07:23] SubStack: except it's boost so it's terrible [07:23] jmoyers: oooh come on! [07:23] jmoyers: boost isn't so terrible [07:23] jmoyers: its a little slow now and again [07:23] jmoyers: but i was like... partial function argument application!? what the fuck is this [07:23] maxter has joined the channel [07:24] jmoyers: currying is for dynamic languages [07:24] maxter has left the channel [07:25] ph^_ has joined the channel [07:25] maxter has joined the channel [07:25] jamescarr: `3rdEden, hmmm... I keep getting this error [07:26] jamescarr: https://gist.github.com/1066740 [07:26] sandstrom has joined the channel [07:26] sandstrom has joined the channel [07:26] mehlah has joined the channel [07:27] Evanlec: jmoyers: interesting [07:27] jmoyers: ? [07:27] adrianmg has left the channel [07:28] bergie has joined the channel [07:28] jamescarr: https://gist.github.com/1066740 [07:28] jamescarr: oops [07:28] Evanlec: jmoyers: what is this boost you refer to? [07:28] jmoyers: ah [07:28] jmoyers: set of libraries in c++ land [07:29] Evanlec: jmoyers: what does it do? allows you to pass functions as args? [07:29] jmoyers: for common things. string operations, some natural extensions to std, function pointer helpers as per above etc etc [07:29] jmoyers: its wide ranging [07:29] fille has joined the channel [07:29] fille: hello hello [07:29] jmoyers: http://www.boost.org/ [07:29] Evanlec: jmoyers: hm ok [07:30] Evanlec: jmoyers: does it apply to nodejs at all, or just purely c++ [07:30] tuhoojabotti: fille: Hello again. [07:30] jmoyers: purely c++ [07:30] fille: :D [07:30] fille: anyone made a postback with express.js [07:30] jamescarr: `3rdEden, hmmm... what magic do you perform to access cookie-sessions? [07:30] Evanlec: jmoyers: k [07:31] Evanlec: are there any recommended modules for working with the OS/filesystem in node? [07:31] `3rdEden: jamescarr what do you mean? [07:31] jmoyers: hehehe [07:31] jmoyers: os and fs [07:31] jmoyers: respectively [07:31] fille: where is the post variables in a express.js postback [07:31] `3rdEden: You can access the cookie headers through socket.handshake.headers [07:31] Evanlec: jmoyers: builtin? [07:31] jamescarr: well, I have express and connect on my path [07:31] jmoyers: yes [07:31] jamescarr: but cookie-sessions cannot be imported [07:31] Evanlec: jmoyers: neat :) what about something like inotify [07:32] tuhoojabotti: Evanlec: Take a look at the Node api ref! [07:32] tuhoojabotti: :P [07:32] Evanlec: tuhoojabotti: okay okay [07:32] tuhoojabotti: The first thing I did was to read it through. [07:32] jmoyers: Evanlec fs.watchFile [07:32] Evanlec: jmoyers: I could see something like libinotify being really slick with node since its evented [07:32] Evanlec: jmoyers: oh sweet [07:32] jamescarr: Evanlec, I used libnotify in one of my apps [07:32] jmoyers: ie http://nodejs.org/docs/v0.5.0/api/fs.html#fs.watchFile [07:33] jamescarr: one of my node apps [07:33] Evanlec: jamescarr: really? i thought libinotify was a c library, how did you use it directly? [07:33] jmoyers: you can build extensions with c++ [07:33] jamescarr: via the commandline [07:33] jmoyers: build a v8 wrapper [07:33] tuhoojabotti: :P [07:33] jamescarr: but yeah, someone should make a v8 wrapper [07:33] Evanlec: no kidding [07:33] jamescarr: I copped out and just called the commandline app for it [07:34] tdegrunt has joined the channel [07:34] jamescarr: it was quick and dirty and it worked [07:34] [AD]Turbo has joined the channel [07:34] Evanlec: jmoyers: what do you mean by a v8 wrapper? [07:34] jmoyers: what functionality are you actually after? [07:34] jmoyers: v8 is the javascript engine node is built on [07:34] jmoyers: you can build extensions to v8 using the c++ api [07:34] Evanlec: jmoyers: simple stufff, basically just want to watch a file for modification, and then trigger some database imports of data from that file [07:34] Evanlec: jmoyers: i know what v8 is [07:35] ay: What is the best irc-lib out there that is able to reconnect on network errors. [07:35] jmoyers: watchFile probably does the trick [07:35] Evanlec: jmoyers: but i wasnt sure if you meant wrap the v8 engine, or make an extension wrapped by v8 [07:35] Evanlec: maybe wrapper is what confused me [07:35] Skola has joined the channel [07:36] jmoyers: you have an existing c++ library [07:36] fille: got it :D [07:36] hassox has joined the channel [07:36] [AD]Turbo: hi there [07:37] Evanlec: jamescarr: why did you not use fs.watchFile() ? [07:37] jamescarr: Evanlec, you're asking odd questions [07:37] jamescarr: what makes you assume I didn't? [07:37] Evanlec: jamescarr: you said you used libinotify via commandline [07:37] shapeshed has joined the channel [07:37] jamescarr: libnotify was used to show a notification window on the top corner of my screen [07:37] jamescarr: a la growl [07:38] ablomen has joined the channel [07:38] Evanlec: I dont know, is that odd [07:38] jamescarr: basically, I wanted a popup whenever a file changed [07:39] flooose has joined the channel [07:39] Evanlec: what is growl? [07:39] jmoyers: mac notification system [07:39] Evanlec: ooh, mac, ok [07:39] shapeshed: http://growl.info/ [07:39] blkcat: growl <3 [07:39] Evanlec: im on linux [07:39] jmoyers: libnotify has absolutely nothing to do with inotify [07:39] shapeshed: ubuntu's notification system is similar [07:40] Evanlec: jmoyers: oh good point [07:40] Evanlec: jamescarr: sorry, confusion, i thought you meant libinotify [07:42] Swizec: I have an install failing because "node-waf" apparently isn't working [07:42] Swizec: what should I do? [07:42] Swizec: wtf even is node-waf? [07:43] jmoyers: python tool for building modules [07:43] xeodox has joined the channel [07:43] Swizec: and how do I get it? [07:44] jmoyers: you have it [07:44] jmoyers: what version of node are you using? [07:44] jmoyers: if its bleeding edge, roll back to a stable tag [07:44] Swizec: 0.4.9 I think [07:45] xhr has left the channel [07:45] Swizec: but from some "random" ppa because building was taking too long on an amazon micro instance [07:45] jmoyers: https://github.com/joyent/node/tree/master/tools [07:45] jmoyers: you'll notice node-waf is there [07:45] Yoric has joined the channel [07:46] jmoyers: your paths might be fucked [07:46] Swizec: :/ [07:46] xhr has joined the channel [07:46] jmoyers: if you just installed a binary or some such [07:46] TomY has joined the channel [07:46] Swizec: so I have no choice but to do a build and just wait it out? [07:46] jmoyers: i usually build from source... [07:47] jmoyers: you can fool around with your paths, [07:47] jmoyers: depends on the errors, so i have no idea [07:47] Swizec: ok thanks, guess I'll build [07:47] Ramosa has joined the channel [07:52] reenignEesreveR: using node's itneractive shell, can i get help/documetnation for a particular object or fnction? [07:52] liar has joined the channel [07:52] jmoyers: documentation? [07:52] jmoyers: no [07:52] jmoyers: you can introspect [07:52] reenignEesreveR: lets say something like help Array.filter and it tells me how to use filter function [07:52] jmoyers: console.inspect etc [07:52] jmoyers: no -- thats a javascript function, check out the google [07:53] jetienne has joined the channel [07:54] ivanfi has joined the channel [07:57] adambeynon has joined the channel [07:57] davidcoallier has joined the channel [07:57] mikedeboer has joined the channel [07:59] e6nian has joined the channel [08:01] mendel_ has joined the channel [08:04] hassox has joined the channel [08:05] nsolsen has joined the channel [08:06] fille: what did !{} in jade standfore? [08:06] jbpros has joined the channel [08:07] JKarsrud: isn't [08:07] jmoyers: unescaped [08:07] JKarsrud: oops [08:07] JKarsrud: isn't that unescaped or something [08:07] JKarsrud: right [08:07] JKarsrud: lol [08:07] fille: aa okej [08:07] JKarsrud: that's what I get for prematurely returning :P [08:09] djcoin has joined the channel [08:10] jmoyers: ACTION tries to hold back [08:10] jmoyers: thats what she said! [08:10] jmoyers: couldn't do it. [08:10] jmoyers: couldn't hold it in [08:10] JKarsrud: :D [08:10] JKarsrud: I kinda did that on purpose [08:11] Swizec: that's what she said [08:16] akshatj has joined the channel [08:16] matyr has joined the channel [08:17] gozala has joined the channel [08:18] Nuck has joined the channel [08:19] Nuck: So, I herd u liek v0.5.0? [08:19] Nuck: :P [08:22] fille: i really enjoy the jade [08:22] tuhoojabotti: Ye, she's fancy. [08:22] tuhoojabotti: I mean [08:22] fille: :D [08:22] tuhoojabotti: you meant THAT jade. [08:23] asabil has joined the channel [08:23] Nuck: lol tuhoojabotti you so silly [08:23] Nuck: you should be a comedian [08:23] Nuck: Who nobody knows about [08:23] fille: http://www.youtube.com/watch?v=705LEH3j2g0 [08:23] Nuck: Because you're a hipster [08:23] fille: LOL [08:24] Wa has joined the channel [08:24] fille: soon time to go to the beach [08:24] voodootikigod_ has joined the channel [08:25] herbySk has joined the channel [08:25] sourcode has joined the channel [08:25] tuhoojabotti: fille: This video contains content from SME, who has blocked it in your country on copyright grounds. [08:25] tuhoojabotti: :/ [08:25] Nuck: God. [08:26] Nuck: I have a song stuck in my head [08:26] fille: Noooooooooooooooooooooooo [08:26] Nuck: Super nintendo, sega genesis. [08:26] fille: it was Aeronsmith with Jaded [08:26] Nuck: Aeronsmith lolwat [08:27] Mrfloyd has joined the channel [08:27] fille: aerosmith [08:27] fille: ... :D [08:28] mikedeboer has joined the channel [08:29] hassox has joined the channel [08:30] fille: when will the first node.js cms come [08:31] AAA_awright: fille: http://calip.so/ http://magnode.org/ [08:32] jbpros has joined the channel [08:32] fille: nice [08:33] arnee has joined the channel [08:35] blup has joined the channel [08:36] pickels has joined the channel [08:36] aliem has joined the channel [08:36] Swizec: fille please don't say such things [08:36] Swizec: don't call the devil :P [08:37] fille: heheh [08:37] fille: i like express.js becuse i get total controll of everything [08:40] clifton has joined the channel [08:40] jetienne: SubStack: question about seq, how does it findout my sequence is totally defined and that it can start it ? a setTimeout(0) ? something lese ? [08:40] jetienne: else [08:41] sandstrom has joined the channel [08:41] sandstrom has joined the channel [08:41] jetienne: https://github.com/substack/node-seq/blob/master/index.js#L15 this is what i read in this line [08:42] jonaslund has joined the channel [08:43] jetienne: node 0.5.0 is what ? the new stable ? [08:43] FIQ has joined the channel [08:43] bnoordhuis has joined the channel [08:43] markwubben has joined the channel [08:43] jetienne: http://blog.nodejs.org/2011/07/06/node-v0-5-0-unstable/ no :) [08:43] jetienne: ACTION likes talking to himself :) [08:45] JKarsrud: :) [08:46] skm has joined the channel [08:46] e6nian has joined the channel [08:46] xeodox: Hi guys...I submitted a github issue, and the author told me to include a gist + package.json. I uploaded app.js and test.ejs, but still need package.json with the dependencies for him. How can I create package.json? [08:46] Squax has joined the channel [08:48] tuhoojabotti: With a notepad :u [08:49] mc_greeny has joined the channel [08:49] xeodox: what do I do after I create it? how would he run it? [08:51] Waha has joined the channel [08:52] ph^ has joined the channel [08:53] sounko: anyone played with facebook-graph? [08:53] tbassett has joined the channel [08:55] bzinger has joined the channel [08:55] Skola: so much languages to play with: js, python, haskell, racket, go-lang, clojure [08:55] Murvin has joined the channel [08:55] Murvin: hihi [08:55] Skola: embarras de richesseeeee [08:55] Murvin: just notice there is v0.5 doc. so is 0.5 out yet? [08:55] Skola: not stable I don't think [08:55] JKarsrud: Murvin: yes, it's out, but not stable [08:55] Murvin: ooo.. see that.. unstable version... [08:55] Murvin: hehe [08:55] Murvin: ic ic [08:57] matyr_ has joined the channel [08:57] jomoho has joined the channel [09:08] hookio has joined the channel [09:08] matyr has joined the channel [09:09] micheil has joined the channel [09:10] kulor-uk has joined the channel [09:10] herbySk74 has joined the channel [09:10] sreeix has joined the channel [09:13] ion- has joined the channel [09:14] shapeshed has joined the channel [09:15] matyr has joined the channel [09:16] eldios has joined the channel [09:17] mikl has joined the channel [09:17] mikl has joined the channel [09:18] SubStack: jetienne: yes seq uses process.nextTick() to execute the actions after you register all the handlers [09:24] sreeix_ has joined the channel [09:24] dekz has joined the channel [09:25] Squax has joined the channel [09:26] tbassetto has joined the channel [09:28] fille: is it possible to use [1,2,3].forEache(function()) [09:28] fille: in jade? [09:28] matyr_ has joined the channel [09:28] shinuza has joined the channel [09:28] sreeix has joined the channel [09:29] indutny: - each [09:29] indutny: - each el in arr [09:29] indutny: and then use el [09:30] Skola: anyone nuts enough to write a blog in node without any 3rd party modules? [09:30] Skola: want to read source [09:30] cjm: Does anyone use stylus? http://pastebin.com/ze39Tg56 [09:31] fille: no im using express. [09:31] Skola: you dont use ':' with stylus [09:32] cjm: Skola, you can if you want to tho right? [09:32] Skola: correct, how much did you "outdent" .aclass? [09:32] Skola: did you mean to outdent it? [09:32] jetienne: SubStack: ok thanks [09:32] Ezku\: Skola: you can, but I don't think that's very reasonable to do except for learning purposes [09:32] Skola: Ezku\ agreed, and even then. [09:33] Skola: cjm is .aclass supposed to be outdented 1 space? [09:33] cjm: Skola, yea let me paste the source [09:33] Skola: yesplz [09:34] arnee has joined the channel [09:34] cjm: http://pastebin.com/fQLwukzC [09:34] squeese has joined the channel [09:36] matyr has joined the channel [09:36] mike5w3c has joined the channel [09:36] Skola: I don't know but [09:36] Skola: that compiles just fine here [09:37] cjm: hrrm... I think it's related to the importing [09:37] cjm: becasue i just pasted it into the main and it's fine now [09:37] ph^_ has joined the channel [09:38] wenbert has joined the channel [09:38] Skola: so you're good now? [09:38] __doc__ has joined the channel [09:39] dexter_e has joined the channel [09:39] cjm: well I want it to be in an external .styl but it throws that error when i import it [09:39] andrewfff has joined the channel [09:40] sreeix has joined the channel [09:41] arnee_ has joined the channel [09:42] dexter_e: Doesn't properly implemented exception handling and Upstart PID based respawning sort of negate the need for Monit? [09:42] cosmincx has joined the channel [09:42] DoNaLd`: hi .. i use expressj and i have one form with two different submit button for this one form .. and i need in post methode in nodejs detect with which submit button was submited my form .. exist some methode for this my issue ? [09:46] matyr_ has joined the channel [09:47] hellp has joined the channel [09:48] jbpros has joined the channel [09:49] adrianmg1 has joined the channel [09:49] adrianmg1 has left the channel [09:50] dsirijus has joined the channel [09:50] jborst has joined the channel [09:56] Skola: read the value of the Submit input from req.body? [09:57] matyr has joined the channel [09:58] DoNaLd`: issue is, that submut of form is called over ^[[0K^[[3G1 [10:29] jopython: I dont have the same problem when I run inside the regular Gnome shell [10:29] jopython: I am using the latest Ubuntu [10:31] matyr has joined the channel [10:31] hassox has joined the channel [10:31] RevoOf has joined the channel [10:32] pickels_ has joined the channel [10:33] vpereira has joined the channel [10:37] pickels_ has joined the channel [10:38] Emmanuel_ has joined the channel [10:43] reenignEesreveR has joined the channel [10:44] mc_greeny has joined the channel [10:45] materialdesigner has joined the channel [10:47] clifton has joined the channel [10:47] sethetter has joined the channel [10:48] ullmark has joined the channel [10:49] Mrfloyd has joined the channel [10:51] reenignEesreveR: I''m a newbie and looking at some code examples. Wondering why most of the functions/APIs are designed with callbacks when they could simply be returning a value like true, false or a username etc. [10:52] xerox: reenignEesreveR: design choice [10:52] reenignEesreveR: a little annoying to those coming from C, C++, Java and Python [10:53] reenignEesreveR: i guess even ruby doesn't make so much heavy use of callbacks [10:53] xerox: http://jsconf.eu/2009/video_nodejs_by_ryan_dahl.html [10:53] dekz: reenignEesreveR: it's a feature [10:53] reenignEesreveR: D: [10:53] reenignEesreveR: :D [10:56] skm has joined the channel [10:57] Viehzeug_ has joined the channel [11:01] Nexxy has joined the channel [11:01] Nexxy has joined the channel [11:02] Mrfloyd_ has joined the channel [11:03] dexter_e has joined the channel [11:05] dsirijus has joined the channel [11:08] mc_greeny has joined the channel [11:09] jtrudeau has joined the channel [11:10] matyr has joined the channel [11:11] blup has joined the channel [11:13] Skola: it takes some getting used to for sure [11:13] JKarsrud: I love callbacks [11:13] fdenbow has joined the channel [11:13] vpereira: hi, how can i run a function after my applications boot? [11:14] JKarsrud: but I write a lot of jquery on the frontend, where a lot of functions take callbacks, so I'm kinda used to it. Works the way I want [11:14] mhauri has joined the channel [11:18] jtrudeau has joined the channel [11:19] mikl has joined the channel [11:19] mikl has joined the channel [11:21] eee_c has joined the channel [11:23] skapism has joined the channel [11:24] skapism: Hi, I'm using expressjs and want to test several configurations of my server (development, production) with jasmine-node. Would anyone have an idea on how to stop and start the server in a graceful way from within the test framework? [11:25] saurabhverma has joined the channel [11:25] mikedeboer has joined the channel [11:27] shinuza has joined the channel [11:27] jonaslund has joined the channel [11:27] tayy has joined the channel [11:28] Wizek has joined the channel [11:28] azeroth_ has joined the channel [11:34] JasonSmith has joined the channel [11:35] kbni: what's the state of nodejs on windows? [11:35] Aiden has joined the channel [11:37] JKarsrud: I'm guessing this is as far it has come? http://blog.nodejs.org/2011/06/23/porting-node-to-windows-with-microsoft%E2%80%99s-help/ [11:37] kbni: fair enough [11:37] JKarsrud: could always run on cygwin, but that's not very stable ;) [11:39] jasoet has joined the channel [11:40] jasoet: hello guys [11:40] jasoet: can i ask about jsdom? [11:40] xeodox has joined the channel [11:41] Renegade001 has joined the channel [11:41] jacter has joined the channel [11:42] BulletBob has joined the channel [11:43] tuhoojabotti: jasoet: No. [11:43] tuhoojabotti: :U [11:43] tuhoojabotti: jasoet: Okay, you can ask about jsdom, but you can't ask about asking about jsdom, ok? [11:48] mikedeboer_ has joined the channel [11:50] jasoet: oke :D [11:50] jasoet: i am new here [11:50] jasoet: here is my problem [11:50] jasoet: i cant get a content from a website that generated by JavaScript [11:50] fig32 has joined the channel [11:51] tuhoojabotti: Use zombie.js [11:51] jasoet: actually i create my custom page, just a html file and Inline JavaScript [11:51] jasoet: oh [11:51] jasoet: i'll check it [11:51] jasoet: thanks a lot :D [11:52] fig32: Hi! I got this npm message while installing something... I compiled node.js using git checkout v0.5.0 http://pastebin.com/8LMS2Crt What can I do? :( [11:52] fig32: 0.5.0 == v0.5.0 :D >.> [11:54] jonasen has joined the channel [11:55] jvduf has joined the channel [11:55] stbuehler: whom i have to punch in the face to get my pull request accepted? https://github.com/joyent/node/pull/1027 [11:56] jonaslund_ has joined the channel [11:56] tuhoojabotti: stbuehler: ryan[WIN] [11:56] tuhoojabotti: I guess [11:56] tuhoojabotti: :P [11:58] stbuehler: ryan[WIN]: *slap* 2 months should be enough to fix crypto bugs :) [12:02] MattJ has joined the channel [12:03] level09_ has joined the channel [12:07] mikedeboer has joined the channel [12:07] jbpros has joined the channel [12:09] matyr has joined the channel [12:10] Max-Might has joined the channel [12:14] simenbrekken: Any libraries out there for submitting form-encoded data? [12:15] fangel has joined the channel [12:15] Lorentz has joined the channel [12:15] jshaw has joined the channel [12:17] bnoordhuis: simenbrekken: require('querystring') and require('http') ? [12:18] jbpros has joined the channel [12:21] MattJ has joined the channel [12:24] fumanchu182 has joined the channel [12:24] fumanchu182 has joined the channel [12:26] ianward has joined the channel [12:26] JoESanche_z has joined the channel [12:27] matyr_ has joined the channel [12:28] blup has joined the channel [12:28] okuryu has joined the channel [12:29] eee_c has joined the channel [12:29] saurabhverma has joined the channel [12:30] dexter_e has joined the channel [12:33] secoif has joined the channel [12:33] gozala has joined the channel [12:33] jacter1 has joined the channel [12:36] zinkem has joined the channel [12:36] matyr has joined the channel [12:36] fson_ has joined the channel [12:37] sonnym has joined the channel [12:37] dexter_e has joined the channel [12:38] philhawksworth has joined the channel [12:45] stepheneb has joined the channel [12:46] aheckmann has joined the channel [12:47] matyr_ has joined the channel [12:47] mikl has joined the channel [12:47] mikl has joined the channel [12:49] devrim has joined the channel [12:50] matyr has joined the channel [12:51] brianseeders has joined the channel [12:52] unlink has joined the channel [12:52] unlink has joined the channel [12:53] robhawkes has joined the channel [12:55] thalll has joined the channel [12:56] Poetro has joined the channel [12:56] matyr_ has joined the channel [12:57] robhawkes has joined the channel [12:57] ryanfitz has joined the channel [12:57] bbttxu has joined the channel [12:59] chrischris has left the channel [12:59] AaronMT has joined the channel [13:01] kkaefer: is there a way to tell what causes a node program to stop quitting? [13:01] kkaefer: e.g. how do I get an overview of the pending timeouts/intervals/sockets/filesystem events? [13:02] tdegrunt: kkaefer: you could use the 'uncaughtException' event of process [13:03] kkaefer: tdegrunt: how would I use that? [13:03] sounko has joined the channel [13:03] boaz has joined the channel [13:03] kkaefer: (my program isn't crashing, it's /not/ quitting) [13:03] andrewfff has joined the channel [13:03] tdegrunt: ah, misread your question [13:03] tdegrunt: i thought you wanted it to stop quitting ... ;) [13:03] kriszyp has joined the channel [13:04] tdegrunt: so you mean it doesn't respond to ctrl-c or the like? [13:04] kkaefer: it responds perfectly fine [13:04] kkaefer: there are just some pending I/O actions or timeouts [13:04] kkaefer: which prevent it from quitting by itself [13:05] kkaefer: and I want to find out which [13:06] tdegrunt: ah gotcha [13:08] tdegrunt: sorry can't help you there [13:08] terite has joined the channel [13:10] fangel has joined the channel [13:10] AAA_awright_ has joined the channel [13:13] madsleejensen has joined the channel [13:13] stelcheck has joined the channel [13:14] Viehzeug_: hi.. anybody here with good knowledge of eventemitter? [13:15] davidwalsh has joined the channel [13:16] Viehzeug_: got a problem with setMaximumListeners(0) [13:16] taf2: this is awesome: http://nodejs.org/docs/v0.5.0/api/child_processes.html#child_process.fork [13:16] taf2: w00t w00t [13:16] Yoric has joined the channel [13:17] mikedeboer has joined the channel [13:17] davidsklar has joined the channel [13:17] MooGoo: lol [13:17] MooGoo: that is nice [13:18] MooGoo: little late [13:18] MooGoo: been writing stuff like that for awhile [13:18] taf2: in 0.5.0 node.h:35:17: fatal error: eio.h: No such file or directory [13:18] sourcode has joined the channel [13:18] Xano has joined the channel [13:18] taf2: isn't eio packaged with node? [13:18] MooGoo: eh [13:19] MooGoo: how are you compiling node [13:19] taf2: node-waf [13:19] MooGoo: straight from the source? [13:19] taf2: do we need to not include node.h in modules anymore? [13:19] MooGoo: get libeio-dev from your package manager [13:19] taf2: yeah... [13:20] taf2: think this is a bug in how node is built now... in v0.5 [13:20] Andreas has joined the channel [13:20] taf2: my system version might be different from what's bundled with node when node is compiled [13:20] taf2: still could cause bustage [13:21] shinuza_ has joined the channel [13:22] taf2: so in my module i need to detect libev or libuv now? and make sure to depend on the correct symbols? [13:22] taf2: anyone handled this yet? [13:22] matyr has joined the channel [13:24] Andreas: Hey I have a problem with a UNIX datagram I can not solve, I have isolated it down to https://gist.github.com/1067197 where it stops when i try send something [13:26] kmiyashiro has joined the channel [13:26] sub_pop has joined the channel [13:26] matyr has joined the channel [13:26] mikedeboer has joined the channel [13:28] thomblake has joined the channel [13:29] taf2: just want to make sure i understand child_process.fork... so it's not a *real* fork it's more like an fork/exec of a separate node.js script [13:29] taf2: maybe more like the interface provided in browser land with Worker [13:29] leoju has joined the channel [13:30] Lorentz_ has joined the channel [13:30] mjr_ has joined the channel [13:30] Naked has joined the channel [13:30] softdrink has joined the channel [13:30] mediacoder has joined the channel [13:30] zeade has joined the channel [13:30] Andreas: I feel like I am talking intro the void it self [13:31] taf2: me too it's okay you'll get used to it :) [13:31] Will|- has joined the channel [13:32] JasonSmith has joined the channel [13:32] Andreas: Well it is my second time, last time was month ago there I got the same felling. Do you know when people gets online? [13:33] taf2: i think maybe most are west coast [13:33] ceej has joined the channel [13:33] softdrink: v8 void.itself [13:33] adelgado has left the channel [13:34] maushu has joined the channel [13:34] mjr_: I somehow only just learned recently that "void" actually means and does something in JavaScript. [13:34] squeese_ has joined the channel [13:34] taf2: if i knew more about dgram, i'd help really sorry [13:34] madsleejensen1 has joined the channel [13:35] mjr_: what's going on with dgram? [13:35] eresair has joined the channel [13:35] Andreas: replay: Hey I have a problem with a UNIX datagram I can not solve, I have isolated it down to https://gist.github.com/1067197 where it stops when i try send something [13:35] taf2: mjr_, see Andreas post [13:35] paznicul has joined the channel [13:35] mjr_: lemme look [13:35] Andreas: well I am just happy that there is someone here now. [13:36] rfay has joined the channel [13:38] trotter has joined the channel [13:38] brolin has joined the channel [13:38] MrNibbles has joined the channel [13:38] djcoin has joined the channel [13:39] steffan has joined the channel [13:39] mjr_: wow, that program wedges up my node process bigtime. [13:40] mbrevoort has joined the channel [13:40] Andreas: Did you node process go to 70% CPU use? [13:40] pietern has joined the channel [13:40] philhawksworth has left the channel [13:40] mike5w3c has joined the channel [13:41] mjr_: no, but it became unkillable [13:41] aabt has joined the channel [13:41] Sebastien_L has joined the channel [13:41] akshat has joined the channel [13:41] Andreas: Oh yes my do to [13:41] stepheneb has joined the channel [13:41] matbee has joined the channel [13:42] Qbix2 has joined the channel [13:42] taf2: ACTION wonders is it best to put my module.exports at the top of the js file or at the bottom? [13:43] Viehzeug_: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. [13:43] zeade: there any node projects out there that work with p2p or nat traversal? e.g. i'm a node server behind a nat, i'd like to engage in a socket.io convo with a client also behind a nat [13:43] Viehzeug_: where to use the setMaxListeners() when using sys.inherit [13:43] keikubo has joined the channel [13:44] maru_cc_ has joined the channel [13:44] mjr_: Andreas: oh, you need another socket [13:45] Andreas: I can't send someting to it self? [13:45] mjr_: Andreas: I don't believe you can, no. [13:46] stepheneb has joined the channel [13:46] AaronMT has joined the channel [13:46] unvamp has joined the channel [13:46] mjr_: I can't remember what the limitation on that is, but if you look at the tests, they all use two sockets. [13:46] softdrink: there's an experimental p2p api in chrome, but i don't know anything about it. [13:46] hij1nx has joined the channel [13:46] mjr_: Not sure if that's just how unix dgram sockets work, of if this is a limitation of the node API. [13:46] mjr_: But either way, get yourself a sending socket. [13:47] cccaldas has joined the channel [13:47] ksheurs has joined the channel [13:47] mjr_: Might also be good to update the documentation to reflect this. [13:48] Andreas: mjr_: Well when I really have a problem since I don't know how to isolate the original problem where I am not sending somthing to my self. [13:48] kmiyashiro: documentation is for babbies [13:49] Andreas has joined the channel [13:50] Andreas: sorry if I missed somthing I just killed my self [13:51] blueadept has joined the channel [13:53] mjr_: Andreas: what's your original problem then? [13:55] Andreas: I am about to create it in a small scale, but the original is https://github.com/AndreasMadsen/WebNodes/tree/daemontalk_bug, where the UDP server don't resive any data at all. But you might wan't to waint 5 min. [13:55] mjr_: I need to get going actually, sorry I couldn't help with your real issue. [13:56] ph^ has joined the channel [13:56] ivanfi has joined the channel [13:57] febits has joined the channel [13:57] skapism has joined the channel [13:57] yonatan-xchat has joined the channel [13:58] JakeyChan has joined the channel [13:58] skapism: If I'm inside a module, and I have something like 'for (var plugin in plugins) ;', how could I create a local var with the names of all the plugins subobjects? [13:59] skapism: probably module.plugin, no? [13:59] JakeyChan: hi, I always misunderstand the "this" pointer [13:59] JakeyChan: can you help me / [13:59] systemfault_ has joined the channel [14:00] mraleph has joined the channel [14:00] systemfault has joined the channel [14:00] systemfault has joined the channel [14:01] springmeyer has joined the channel [14:02] smtlaissezfaire has joined the channel [14:02] Prometheus: ? [14:03] JakeyChan: so, [14:03] kersny: JakeyChan: http://howtonode.org/what-is-this [14:03] JakeyChan: module.js : module.exports = exports = function () {// this point to ??} [14:04] Andreas: mjr_: thank you anyway [14:06] Swimming_bird has joined the channel [14:06] RevoOf has left the channel [14:06] bogomips2_ has joined the channel [14:06] seawise has joined the channel [14:09] http402 has joined the channel [14:11] theCole has joined the channel [14:11] carmony has joined the channel [14:12] jbroman: jakeskik: What "this" is depends on how your function is called. [14:12] gde33 has joined the channel [14:12] c4milo has joined the channel [14:13] liorkesos has joined the channel [14:14] brianc has joined the channel [14:15] JakeyChan: I read this : The magic is that the value of "this" changes depending on what context your executing in. [14:15] BillyBreen has joined the channel [14:15] JakeyChan: how to understand the "your executing in "?? [14:16] matyr_ has joined the channel [14:16] fumanchu182 has joined the channel [14:16] JakeyChan: hey, guys, can you give me example ? [14:16] jbroman: JakeyChan: If you assign function f as a property of object o, then if you call o.f(), "this" is o. But if you assign it to a local variable, "this" is the global object. [14:16] jbroman: The linked article is actually fairly nice (it gives several examples). [14:16] gxdssoft has joined the channel [14:17] jslatts has joined the channel [14:17] skapism: so, can I access a module's local variabels as an array from within the module? [14:17] EyePulp has joined the channel [14:17] JakeyChan: jbroman: hey , [14:17] Destos has joined the channel [14:17] JakeyChan: look that exmaple : [14:19] JakeyChan: module.js: [14:19] JakeyChan: module.exports = exports = function () { [14:19] JakeyChan: // this point to ? [14:19] JakeyChan: } [14:19] JakeyChan: server.js : [14:19] JakeyChan: var module = require('module')(); // the module "this " point to ? [14:20] killfill: hi, i have a problem with scope: http://pastebin.com/tyERQt8d [14:20] JakeyChan: maybe this example is complex [14:21] jbroman: JakeyChan: require will return the function, so it is called like you did (function() { ... } )(). [14:21] jbroman: As a result, "this" will be the global object. [14:21] killfill: why do i get this.its_me = undefined when connecting a client to the http server? [14:21] fdenbow has joined the channel [14:22] devongovett has joined the channel [14:22] jbroman: JakeyChan: You can call .bind(something) if you want to force "this" to be something in particular. [14:22] jakehow has joined the channel [14:23] JakeyChan: jbroman: thanks ! [14:23] jbroman: You can also make "this" something else by either calling the function as an object property, or by using .call or .apply, both of which allow you to specify "This". [14:23] jbroman: e.g. module.exports = (function() { ... }).bind(new_this); [14:24] dexter_e: Whats this 'exports' thing all about? :) [14:24] radiodario has joined the channel [14:24] jbroman: dexter_e: With CommonJS modules (include ones in node.js), a module only exposes a single thing to the outside world: module.exports. [14:24] JakeyChan: jbroman: good code! [14:24] jbroman: dexter_e: It's typically an object (but can be something else). [14:25] dexter_e: so does it function sort of like prototype ? [14:25] jbroman: dexter_e: In what way? [14:26] stepheneb has joined the channel [14:26] dexter_e: If I'm understanding you correctly, its the only public property of a class , right? [14:26] JakeyChan: jbroman: thank you, man :D [14:26] sub_pop has joined the channel [14:27] jbroman: dexter_e: A module is not a class; it's simply a JavaScript file. [14:27] Esteb has joined the channel [14:27] jbroman: So when your module runs, its local variables are not exposed. [14:27] jtsnow has joined the channel [14:27] jbroman: To make things in your module (functions, variables, etc.) available to the outside world, you attach them to module.exports. [14:28] dexter_e: I see [14:28] dexter_e: This is a feature of CommonJS ? [14:28] KingJamool has joined the channel [14:28] jbroman: dexter_e: CommonJS modules is the spec that specifies how these modules work. [14:29] bradleymeck_ has joined the channel [14:29] dexter_e: I see [14:29] mbrevoort has joined the channel [14:29] Skola has joined the channel [14:29] dexter_e: Thank you. [14:30] dexter_e: So if one wishes to prepare modules for use in node.js any functionality they wish to expose must be in the exports property... [14:30] jbroman: dexter_e: Yes. Otherwise they are inaccessible (by design). [14:31] bergie has joined the channel [14:31] AlexTi has joined the channel [14:31] mAritz has joined the channel [14:31] jbroman: dexter_e: https://gist.github.com/1067360 [14:31] yhahn has joined the channel [14:32] JoshC1 has joined the channel [14:33] fson_ has joined the channel [14:34] klaustsen has joined the channel [14:37] dexter_e: jbroman: Mega Thanks. [14:37] dexter_e: that link is worth a thousand searches [14:37] jbroman: dexter_e: There are typos in that, but you get the idea. [14:37] dexter_e: yes indeed. [14:38] pietern has joined the channel [14:38] jbroman: (i.e. the function calls should be "mymodule.getNumber()") [14:38] jbroman: It's actually really cool how simple the idea of CommonJS modules is, yet it's really powerful. [14:38] dexter_e: so in that way it functions similarily to the prototype property in that any methods that you want available in instances of the Class get defined on the prototype eh? [14:38] hookdump has joined the channel [14:38] ph^ has joined the channel [14:39] jbroman: dexter_e: Sure, I suppose so. [14:39] fille has joined the channel [14:39] Poetro_ has joined the channel [14:39] fille: hello [14:40] radiodario has joined the channel [14:40] Poetro_ has joined the channel [14:40] Poetro_ has joined the channel [14:40] colinclark has joined the channel [14:40] joeyjoe has joined the channel [14:41] joeyjoe: howdy. any libev/eio gurus about? [14:42] joeyjoe: i'm writing a c++ node module that wraps a library using a background thread... the bg thread is long running and periodically fires off events that need to make it back onto the main node event loop [14:43] joeyjoe: is there a safe way to push events onto the main ev loop from another thread? [14:45] liorkesos: Hi, I'm trying to mimick a working curl post request to my web service with node. [14:45] liorkesos: This is my curl request.. [14:45] liorkesos: curl --data 'method="system.connect"' http://www.goworkit.com/?q=services/json [14:45] joeyjoe: for example, is it safe to call eio_nop() from another thread? [14:45] liorkesos: This is my my javascript - http://jsfiddle.net/SFWrb/ [14:45] MrTopf_ has joined the channel [14:46] d0k has joined the channel [14:47] jslatts: joeyjoe: I am not an expert, but I would have thought it was safe to add events to the queue from any thread [14:47] jslatts: joeyjoe: I have certainly done so [14:48] balaa has joined the channel [14:48] joeyjoe: thanks jslatts. how did you do it? eio_nop? [14:48] jbroman: liorkesos: Your curl command encodes the data as application/x-www-form-urlencoded; your JavaScript encodes it as JSON. [14:48] hornairs has joined the channel [14:48] kriszyp has joined the channel [14:49] ryanfitz has joined the channel [14:49] trotter_ has joined the channel [14:49] bbrandon has joined the channel [14:49] jbroman: liorkesos: Also you need to say "function() {", not simply "function {". [14:50] liorkesos: so all i need to do is change the content-type: to application/x-www-form-urlencoded ? [14:50] pifantastic has joined the channel [14:50] antlong has joined the channel [14:51] liorkesos: Whats the content-type for this type? [14:51] jslatts: joeyjoe: I'm trawling through my code. I haven't touched it in months [14:51] brolin has joined the channel [14:52] dtan has joined the channel [14:52] jbroman: liorkesos: If you read the manpage for curl, you'll see that --data makes the Content-Type application/x-www-form-urlencoded. [14:52] pHcF has joined the channel [14:52] liorkesos: yeah I see that also here - http://en.wikipedia.org/wiki/POST_(HTTP) [14:52] wookiehangover has joined the channel [14:52] liorkesos: but I need to mimic it in javascript [14:53] joeyjoe: jslatts: thanks, i appreciate it [14:53] jbroman: So you want to set the content-Type to that, and encode your request body accordingly. [14:53] jbroman: For your simple example, you could simply do "req.end('method=system.connect');" [14:53] sbisbee has joined the channel [14:54] vpereira: like the function readFile from 'fs'. what is the best way to get the returned valued? [14:54] Skola: for serving static files over http, is readStream preferable over readFile? [14:55] vpereira: if i do foo = fs.readFile(file,'utf8',function(err,data){ data }); the foo is always undefined [14:55] jbroman: vpereira: That's intentional. [14:55] Skola: that's because it's async [14:55] jbroman: vpereira: The results are not known until it actually runs (which happens at some point in the future). [14:55] jbroman: Your callback gets the information about the results as its arguments. [14:55] matwill has joined the channel [14:55] joeyjoe: liorkesos: to help debug such things, wireshark is really handy. fire it up listening on your network interface and a port of 'tcp.port == 80', and 'follow tcp stream' for the appropriate packets. you can compare the raw bytes of your client vs node [14:56] jbroman: If you really want to do it synchronously, you can (readFileSync), but you should simply put whatever logic needs the results of that in your callback. [14:57] vpereira: jbroman: ok but how can i assign the value from data to a variable? [14:57] patcoll has joined the channel [14:57] vpereira: like i define a variable outside of the blog [14:57] vpereira: block [14:57] jtsnow has joined the channel [14:57] Skola: you don't afaik [14:57] Skola: you use the values within the callback [14:57] vpereira: and then inside of my block i do myvariable = data [14:57] jbroman: vpereira: You can assign it to a variable, but it won't be populated until later so you usually don't do it in the way you're thinking. [14:57] mapleman has joined the channel [14:57] jbroman: Asynchronous code often looks very different from synchronous code. [14:58] vpereira: jbroman: its ok, im used with blocks in ruby.. but i can actually get the 'returned value' from a block [14:58] infynyxx has joined the channel [14:58] jslatts: joeyjoe: So I guess what I did was set a manual reference to the ev loop and a timer to callback and check for completion, then I removed the reference [14:58] jbroman: vpereira: Blocks in Ruby are still usually used for synchronous things. [14:58] unvamp has joined the channel [14:59] vpereira: jbroman: so i should keep working with this data just inside of the callback, right? [14:59] hybsch has joined the channel [14:59] jbroman: vpereira: Yeah. Anything that depends on the data should either be in the callback, or in a function called from there. [14:59] mandric has joined the channel [14:59] vpereira: jbroman: ok, thanks [14:59] jbroman: This lets you do other things while the OS tries to read the file, but it does affect your coding style. [14:59] jslatts: joeyjoe: but later, I went to a multi-process setup, so now i just set a watcher for the child process and callback when it sends me a sigterm [15:00] klovadis has joined the channel [15:00] mandric has joined the channel [15:00] pifantastic has joined the channel [15:01] Skola: jbroman, do you know by-chance whether I should use a readStream or a readFile for serving static files over http? [15:01] jslatts: joeyjoe: i don't even include libeio [15:02] brolin_ has joined the channel [15:02] jbroman: Skola: Sorry, not sure what's preferred. [15:02] Skola: ok no problem [15:02] joeyjoe: jslatts: makes sense [15:02] mange has joined the channel [15:02] joeyjoe: jslatts: thanks [15:03] gazumps has joined the channel [15:04] jbroman: liorkesos: Off the top of my head, this may be closer to what you want: https://gist.github.com/1067452 [15:05] sivy has joined the channel [15:05] matwill_ has joined the channel [15:07] Skola: oh it seems readFile uses readStream internally [15:08] Poetro_ has joined the channel [15:09] liorkesos: jbroman: thanks - yet i get an "invalid method" [15:09] liorkesos: and my curl work ok. [15:09] jbroman: liorkesos: Try changing that to { method: '"system.connect"' } [15:10] jbroman: Since your curl command includes an extra set of quotation marks. [15:11] sw8sw8 has joined the channel [15:11] sw8sw8 has left the channel [15:12] isaacs has joined the channel [15:13] liorkesos: nope :( [15:13] jbroman: liorkesos: Your curl command also used a different URI, I think. So you might try changing that to /?q=services/json or whatever it was [15:13] liorkesos: thanks so much for your time and help [15:13] liorkesos: I'll check it [15:13] jbroman: liorkesos: You can also use "curl -v" to see what curl is actually sending to the server. [15:14] jbroman: This may help determine which aspects are different. [15:14] gxdssoft has joined the channel [15:14] liorkesos: thanks [15:15] dexter_e: jbroman: Thanks again for that gist. [15:15] jbroman: dexter_e: You're welcome. [15:17] mattp_ has joined the channel [15:18] briznad has joined the channel [15:19] coyo has left the channel [15:21] pplante has joined the channel [15:22] apanda has joined the channel [15:22] Andreas has joined the channel [15:22] eee_c1 has joined the channel [15:23] smtlaissezfaire has joined the channel [15:23] dexter_e: I notice that when I deliberately process.exit() upon exceptions to test Upstart Respawn and verify the new PID it takes a while to respond as upstart is restarting the service. Anyone know a way around this? [15:23] liorkesos: jbroman: YOU ROCK! [15:23] liorkesos: it works [15:23] Andreas: does anyone know how to add multiply lisenter to a the same unix datagram path? [15:23] dexter_e: runtime exceptions [15:24] liorkesos: jbroman: the issue was that we needed to pass it this way - method: '"system.connect"' [15:24] ditesh|cassini has joined the channel [15:26] tjholowaychuk has joined the channel [15:26] Viehzeug has joined the channel [15:26] jakehow has joined the channel [15:28] jbroman: liorkesos: Yeah, I missed the extra quotation marks the first time. It's a little weird, but if that's what your API needs, that's what it needs. :P [15:29] _sorensen_ has joined the channel [15:30] mange has joined the channel [15:30] smtlaissezfaire has joined the channel [15:31] samsonjs has joined the channel [15:32] mustakes has joined the channel [15:33] smtlaissezfaire has joined the channel [15:34] Swizec has joined the channel [15:35] confoocious has joined the channel [15:35] confoocious has joined the channel [15:36] mjr_: isaacs: you around? [15:36] isaacs: yo [15:36] mjr_: Hey, I have published module whose tarball includes a node_modules dir, unintentionally. [15:36] mjr_: But I have this: [15:36] mjr_: ignore = node_modules v8.log [15:36] mjr_: in .npmrc [15:37] mjr_: Is that the way to do it? [15:37] isaacs: mjr_: node_modules is goverened by a different set of ignore/include rules [15:37] isaacs: mjr_: anything in there that is a) not a listed dependency or b) on the "bundledDependencies" list, will be included. [15:38] isaacs: mjr_: the idea being that you've installed a dep, but it won't be automatically installed when your app is installed, so it'd better get bundled. [15:38] mjr_: I see [15:38] mjr_: Is there an option to turn this off? [15:38] isaacs: mjr_: not at the moment [15:38] mjr_: OK, that's fine. I can just remove the dir before publishing. [15:38] mjr_: I was just surprised that it didn't ignore what I told it to ignore. [15:38] jobim has joined the channel [15:39] isaacs: yeah, that include/ignore logic is hard to get right [15:40] isaacs: i think if you tell it to ignore node_modules, you're right, it should skip over that whole thing [15:40] mjr_: Hard to manage intersecting sets of magic. [15:40] isaacs: yep [15:40] charlenopires has joined the channel [15:41] mjr_: Normally it would be fine, except in this case the module is hiredis, and the tarball gets made after running "waf configure" in the dir. This ends up not working if you try to install on a machine of a different type than my laptop. [15:41] Hansy_ has joined the channel [15:41] mjr_: Linux is all, WTF? [15:42] jonaslund: 32/64 bit ? [15:42] halfhalo: stupid linux [15:42] mjr_: jonaslund: in this case, waf selects "gmake" on OSX, and that doesn't work on my Ubuntu Linux machine. [15:42] Yoric has joined the channel [15:43] mjr_: It'd probably be fine if it re-ran the configure, but for some reason, it does not. [15:44] zemanel_ has joined the channel [15:44] harth has joined the channel [15:45] unvamp has joined the channel [15:46] Yuffster_work has joined the channel [15:47] caolanm has joined the channel [15:48] gxdssoft has joined the channel [15:48] slajax has joined the channel [15:49] stephank has joined the channel [15:51] Rob has joined the channel [15:52] Spion_ has joined the channel [15:52] al3xnull_ has joined the channel [15:54] eee_c has joined the channel [15:54] pickels has joined the channel [15:55] steffkes has joined the channel [15:55] aliem has joined the channel [15:55] Charuru has joined the channel [15:55] Determinist has joined the channel [15:56] context-: Skola: pretty sure stream, then most of the work gets handled in the backend [15:56] context-: streams might be fairly new thogh [15:57] davidsklar has joined the channel [15:57] context-: Skola: but from checking out request yesterday, using streams and pipe() seem to be the new thing [15:57] andrewfff has joined the channel [15:58] dmcquay has joined the channel [15:58] Skola: ok, streams do seem to take a bit more low-level management though [15:59] rworth has joined the channel [16:00] dexter_e: Are there tools that automatically spawn a new processes if the original process has corrupted itself somehow and doesn't respond ? [16:00] Marcin3 has joined the channel [16:00] RORgasm has joined the channel [16:01] unlink has joined the channel [16:01] unlink has joined the channel [16:01] shinuza has joined the channel [16:02] vipaca has joined the channel [16:02] Skola: I will read the source some more context- [16:03] dexter_e: I sounds like the 'overhead' of thread based blocking systems is spawning a whole new instance of your app to process each request... but how does node deal with responding if that original thread has somehow corrupted its own state? [16:03] mendel_ has joined the channel [16:04] context: node is NOT multi-threaded [16:05] Kingdutch has joined the channel [16:05] mundanity has joined the channel [16:05] pquerna: dexter_e: forever.js or runit [16:05] pquerna: or cluster will do this too i think [16:06] mendel_ has joined the channel [16:06] mikeal has joined the channel [16:07] rendez has joined the channel [16:08] dgathright has joined the channel [16:08] context: or was he asking to have multiple :/ [16:08] caiges has joined the channel [16:10] ph^ has joined the channel [16:10] vnaren has joined the channel [16:11] mendel__ has joined the channel [16:11] willwhite has joined the channel [16:11] ph^ has joined the channel [16:11] bradleymeck_: dexter_e if your program has corrupted state it acts the same as any other environment (unpredictably) [16:12] bradleymeck_: you will need to use some sort of monitoring system if you want to make sure its fine [16:13] tjholowaychuk: pquerna https://github.com/senchalabs/connect/commit/48fe5cd6c08ce3ecebfd782ba0c309b57eca244d [16:13] tjholowaychuk: much more extensible now [16:13] minimalist has joined the channel [16:13] philhawksworth has joined the channel [16:13] creationix has joined the channel [16:13] tjholowaychuk: the only downside is :response-timems isn't valid now you need :response-time ms, but meh [16:13] tjholowaychuk: tokens could be {response-time} etc but i'd rather have backwards compat for now [16:15] saurabhverma has joined the channel [16:15] robertfw has joined the channel [16:15] robertfw: ola [16:16] tdegrunt has joined the channel [16:16] pquerna: tjholowaychuk: awesome [16:16] mendel__ has joined the channel [16:16] infynyxx1 has joined the channel [16:16] Corren has joined the channel [16:16] ukd1_ has joined the channel [16:17] infynyxx1 has joined the channel [16:17] langworthy has joined the channel [16:17] tobiassjosten has joined the channel [16:17] flippyhead has joined the channel [16:18] infynyxx1 has joined the channel [16:18] Poetro_ has joined the channel [16:18] Poetro_ has joined the channel [16:18] ukd1_ has joined the channel [16:20] joshthecoder has joined the channel [16:20] infynyxx has joined the channel [16:20] ambroff has joined the channel [16:21] elliottcable has joined the channel [16:21] spasquali has joined the channel [16:22] pjacobs has joined the channel [16:22] te-brian has joined the channel [16:23] Aria has joined the channel [16:23] spasquali has left the channel [16:24] dshaw_ has joined the channel [16:24] robhawkes has joined the channel [16:25] mikeal has joined the channel [16:26] adelgado has joined the channel [16:26] minimalist has left the channel [16:26] TooTallNate has joined the channel [16:29] cccaldas has joined the channel [16:29] towski has joined the channel [16:30] rpflo has joined the channel [16:31] jgv has joined the channel [16:31] supster has joined the channel [16:32] sfragis has joined the channel [16:32] hij1nx has joined the channel [16:34] pietern has joined the channel [16:34] dshaw_ has joined the channel [16:35] eddanger has joined the channel [16:35] dguttman has joined the channel [16:37] TooTallNate has joined the channel [16:41] reenignEesreveR has joined the channel [16:41] jtsnow has joined the channel [16:42] TroyMG has joined the channel [16:45] fattytuna has joined the channel [16:46] TheJH has joined the channel [16:47] samsonjs has joined the channel [16:47] smtlaissezfaire has joined the channel [16:47] TheJH: Hello, I've got a problem building node v0.4.9 on a debian squeeze, anyone here who can help? "g++ -o obj/release/accessors.o..." fails. full output of `make`: https://gist.github.com/1067716 [16:48] yozgrahame has joined the channel [16:48] mendel__ has joined the channel [16:49] _sorensen_: anyone familiar with joyent smartmachines? having troubles updating submodules [16:50] mendel_ has joined the channel [16:50] wadey has joined the channel [16:50] bene has joined the channel [16:51] bene has left the channel [16:52] mraleph: TheJH: your compiler crashed [16:52] dgathright has joined the channel [16:52] mraleph: TheJH: gcc might be old, or you don't have enough memory on the box to run gcc or something like that [16:53] yhahn1 has joined the channel [16:53] TheJH: mraleph, ouch. gcc version is 4.4.5, is that old? [16:53] reenignEesreveR has joined the channel [16:53] `3rdEden has joined the channel [16:54] tbranyen: i'm on 4.6 [16:54] mraleph: TheJH: well then it other possibilities. what happens if you just execute g++ -o obj/release/accessors.o -c -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -fno-rtti -fno-exceptions -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -DV8_TARGET_ARCH_IA32 -DENABLE_VMSTATE_TRACKING -DENABLE_L [16:54] mraleph: OGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/home/jann/gitty/node/deps/v8/src /home/jann/gitty/node/deps/v8/src/accessors.cc [16:54] mraleph: I mean just try this single line and see what happens [16:54] mraleph: it probably segfaults [16:54] TheJH: mraleph, in which folder? [16:55] embwbam has joined the channel [16:55] mraleph: TheJH: try current folder [16:55] mraleph: like node source root [16:55] mustakes has joined the channel [16:56] TheJH: mraleph, fails with "Assembler messages: Fatal error: can't create obj/release/accessors.o: No such file or directory" [16:56] mraleph: mkdir -p obj/release [16:56] mraleph: then retry [16:57] embwbam: For NPM: Is there a way to have several modules or apps, each with their own package.json? Could the parent package.json link to them so npm installs all dependencies? [16:57] eee_c has joined the channel [16:58] radiodario_ has joined the channel [16:59] TheJH: mraleph, no output, $? is 0, obj/release/accessors.o was created with a size of 25k [16:59] mraleph: hmm strange. [16:59] mikegerwitz: embwbam: $ man npm-json [16:59] blup has joined the channel [17:00] isaacs: embwbam: sure. then each of those modules are packages, and the parent depends on them [17:00] isaacs: embwbam: pretty normal :) [17:00] mraleph: TheJH what happens if you cd deps/v8 and try to scons there? [17:00] embwbam: cool, reading man npm-json now. Silly me, trying the web first [17:00] embwbam: :) [17:00] TheJH: mraleph, fails, too [17:00] isaacs: embwbam: `npm help` is very helpful, too :) [17:00] TheJH: with 127 [17:01] mraleph: weird. [17:02] TheJH: mraleph, you mentioned memory size - I have only 80MB free RAM but 3GB free swap, and swap is sufficient for that, right? [17:03] AvianFlu has joined the channel [17:04] unvamp has joined the channel [17:04] embwbam: mikegerwitz: read through man npm-json, and still not sure how to do it. Do I put my sub-apps in the folders section? the dependencies? [17:04] isaacs: embwbam: your "sub-apps" are dependencies [17:05] isaacs: embwbam: develop them as standalone packages, then install them (or link them) into your "main" app [17:05] embwbam: I've tried {"dependencies: {"subapp":"./app/subapp"}, but it didn't work [17:05] isaacs: embwbam: no, it doesn't support folders in teh dependenceis hash [17:05] TheJH: mraleph, building master from git://github.com/v8/v8.git fails with the same error [17:05] isaacs: embwbam: but you can do "dependencies": {"subapp":"1.2.3"} and then do `npm link ../subapp` [17:06] embwbam: isaacs: ah, perfect. Npm link is what I was missing [17:06] isaacs: embwbam: it's super handy :) [17:06] isaacs: embwbam: if you depend on some local things, and some published things (express, etc), then youc an link, and then do `npm install` to grab everythign that's left. [17:07] yhahn1 has left the channel [17:07] embwbam: isaacs: awesome [17:07] mraleph: TheJH: try scons env="PATH:$PATH" [17:08] TheJH: mraleph, fails with the same error [17:09] mraleph: btw did obj dir appear in v8 folder after you tried scons for the first time? [17:09] vid_ has joined the channel [17:11] butu5 has joined the channel [17:11] embwbam: isaacs: "npm link app/subapp" totally worked. How can I make it explicit? We don't check node_modules into our repository, we require you to clone the repo, then run npm install to be up and running. Is there a way to have "npm install" put the link in? Or should I just commit the link to the repo? [17:12] perezd has joined the channel [17:12] isaacs: embwbam: the way i usually do that is to have each "subapp" be separate git repos. [17:12] isaacs: embwbam: if something is generally useful, then it's a good idea to be a separate repo. if it's not, then why go through the bother of giving it a package.json file? [17:12] isaacs: embwbam: ie, why not just do require("./subapp")? [17:13] bartt has joined the channel [17:13] isaacs: embwbam: if it's a separate git repo in a parallel folder, then you can either `npm link ../foo`, or you can do a git submodule [17:13] embwbam: isaacs: you can do require("./subapp"), but since you only ran "npm install" on the root, the dependencies of subapp haven't been installed, unless you went into subapp and did npm install again [17:13] isaacs: embwbam: right, so... you make it one app :) [17:14] isaacs: embwbam: or you make it multiple side-by-side git repos [17:14] tisba has joined the channel [17:14] jaket has joined the channel [17:14] Poetro__ has joined the channel [17:14] isaacs: embwbam: example: https://github.com/isaacs/node-tap [17:14] skawful has joined the channel [17:15] embwbam: isaacs: i think maybe our repo setup is strange... I'll have to think about it more. Thanks for the help! [17:15] isaacs: np [17:15] skawful has left the channel [17:16] zeade has joined the channel [17:16] jborst has joined the channel [17:17] nickabusey has joined the channel [17:18] cccaldas_ has joined the channel [17:18] Cleer has joined the channel [17:19] infynyxx has joined the channel [17:22] vipaca: Is there a way to make npm ignore dependencies? [17:22] isaacs: vipaca: um... no? [17:22] vipaca: I want to install persistentjs, but it specifies sqlite and mysql [17:22] isaacs: vipaca: why do you want it to ignore dependencies? that's about all it does. [17:22] vipaca: I've tried to remove the dependency for sqlite from the package.json file [17:23] vipaca: but I [17:23] vipaca: get a dns error [17:23] reenignEesreveR has joined the channel [17:23] isaacs: vipaca: npm view persistentjs dist.tarball | curl -s | tar zx --strip 1 -C node_modules/persistentjs [17:23] vipaca: I'm not 100% sure they are related [17:24] TroyMG has joined the channel [17:24] isaacs: oh, it's persistencejs, not persistentjs [17:25] vipaca: nod [17:26] vipaca: isaacs so this will copy the library strait into node_modules? [17:26] isaacs: vipaca: yeah [17:26] Marcin3 has left the channel [17:26] isaacs: vipaca: it's just folders and stuff :) [17:26] vipaca: nod [17:27] brainproxy: has execScript been deprecated entirely? [17:27] dipser has joined the channel [17:27] vipaca: qq does npm proxy the load of modules for node or is it strictly module version control and download tool? [17:27] isaacs: brainproxy: it's called "fork" now i think [17:28] dshaw_ has joined the channel [17:28] isaacs: vipaca: strictly version control and downloading [17:28] vipaca: k thx [17:28] isaacs: vipaca: all the module-loading logic is in node-core [17:28] rworth has joined the channel [17:28] vipaca: ACTION nod [17:28] isaacs: brainproxy: exports.fork = function(modulePath, args, options) { [17:28] isaacs: brainproxy: in child_proxy [17:28] robhawkes has joined the channel [17:29] brainproxy: isaacs: thanks [17:29] ryah has joined the channel [17:29] isaacs: brainproxy: it returns the forked child process, which has a "send" method you can use to send objects to it [17:30] brainproxy: isaacs: is that for 0.5? [17:30] isaacs: brainproxy: i think so [17:30] minimalist has joined the channel [17:30] isaacs: yeah [17:30] brainproxy: isaacs: ah okay, i'm using some code which still relied on the old, old process.bind('evals') stuff [17:30] brainproxy: rather than require('vm') [17:30] isaacs: yikes [17:30] brainproxy: and the scope object associated with it had .execScript available [17:31] brainproxy: or something like that, kind of convoluted [17:31] isaacs: process.binding("evals") is still there [17:31] ajsie has left the channel [17:31] ajsie has joined the channel [17:31] isaacs: but process.binding shouldn't really be used outside of core [17:31] brainproxy: isaacs: well stuff done broke after bump to 0.4.9 [17:31] ajsie has left the channel [17:31] brainproxy: though it works in 0.4.8 [17:31] isaacs: right. that's why :) [17:31] TroyMG has joined the channel [17:31] Andreas has joined the channel [17:31] isaacs: oh, execScript disappeared in 0.4.9? [17:31] isaacs: that seems wrong. [17:31] minimalist has left the channel [17:32] Poetro_ has joined the channel [17:32] pandeiro has joined the channel [17:32] brainproxy: isaacs: that seems to be the case, but I'm not sure i 100% understand the logic in the code base I'm using [17:32] isaacs: k [17:32] isaacs: hm... there's execFile, but that's a different thing [17:32] jborst has left the channel [17:32] brainproxy: in any case, rewriting to use the child fork stuff is probably the way to go [17:33] brainproxy: will talk to the original author [17:33] perlmonkey2 has joined the channel [17:35] TheJH: mraleph, ended up installing node from the debian repo [17:36] FireFly|n900 has joined the channel [17:37] butu5 has joined the channel [17:37] jtsnow_ has joined the channel [17:38] Andreas: Can someone tell me how I connect multiply UDP lisenters (not the same script), to the same port? [17:38] dguttman has joined the channel [17:39] salamon21 has joined the channel [17:40] tolmasky-macbook has joined the channel [17:40] rauchg_ has joined the channel [17:41] robhawkes has joined the channel [17:41] jerrysv has joined the channel [17:43] jerrysv: wow. #node.js, now with no ops? [17:44] halfhalo-tp: ops cost extra [17:44] fdenbow has joined the channel [17:44] langworthy has joined the channel [17:45] madsleejensen has joined the channel [17:45] fdenbow_ has joined the channel [17:46] pkrumins: jerrysv: ops $20 a piece [17:46] eee_c1 has joined the channel [17:47] telemachus has joined the channel [17:47] drudge: half-ops 2 for 1? [17:48] DTrejo has joined the channel [17:48] sechrist has joined the channel [17:48] clifton has joined the channel [17:51] mercer has joined the channel [17:51] tayy has joined the channel [17:52] vipaca: isaacs: so persistentjs builds db adapters using gcc, so there's more than just a copy here [17:53] isaacs: vipaca: k [17:53] ckknight_ has joined the channel [17:53] isaacs: vipaca: npm build $PWD/node_modules/persistencejs [17:53] vipaca: there are two problems I'm having 1. Dependencies on sqlite in package.json 2. DNS error [17:53] yhahn1 has joined the channel [17:53] greg has joined the channel [17:53] isaacs: vipaca: the dep on sqlite is not something i can fix. [17:53] isaacs: vipaca: what's the DNS error? [17:54] broofa has joined the channel [17:54] mcluskydodallas has joined the channel [17:54] bogomips2__ has joined the channel [17:54] AlexTi_ has joined the channel [17:56] vipaca: npm ERR! error installing persistencejs@0.2.5 Error: ECONNREFUSED, Could not contact DNS servers [17:56] vipaca: npm ERR! error installing persistencejs@0.2.5 at IOWatcher.callback (dns.js:74:15) [17:56] mcluskydodallas has joined the channel [17:58] ajp has joined the channel [17:58] chrischris has joined the channel [17:59] jtsnow: trying to write some connect middleware, but running into some async problems. The response finishes before my middleware: http://codr.cc/472e05/javascript [18:00] fly-away has joined the channel [18:00] Andreas: Can someone tell me how I connect multiply UDP lisenters (not the same script), to the same port? [18:00] jtsnow: is there a way to prevent other connect middleware from ending the http response? [18:03] bradleymeck_: Andreas a load balancer [18:03] bradleymeck_: jtsnow, never call next on the endpoint? [18:04] TheJH: Andreas, do you want them to receive the same information? or to balance the load? [18:04] caiges has joined the channel [18:04] Andreas: I want them to receive the same information. [18:04] Murvin has joined the channel [18:05] mikeal has joined the channel [18:05] TheJH: Andreas, you have to run one script that acts as a master-listener and relays the received messages to all the other listeners - at least that's what I'd do, don't know whether there's another way [18:06] jtsnow: bradleymeck_: hmm... I don't think that will work in my case [18:06] altamic has joined the channel [18:06] mandric has joined the channel [18:07] TheJH: Andreas, maybe you could also achieve the same effect with some weird iptables (firewall) magic [18:07] Andreas: I am i [18:07] Andreas: I am a pure Web guy so iptabels is wtf [18:08] TheJH: Andreas, then I think that you have to write some relay script [18:08] dshaw_1 has joined the channel [18:08] Andreas_ has joined the channel [18:09] Andreas: What about this addMembership function [18:09] Murvin: bnoordhuis: are v0.4.9 and v0.5 using net.js or netuv.js? [18:10] broofa has joined the channel [18:10] Andreas: TheJH : What about this addMembership function [18:11] bnoordhuis: Murvin: 0.4.9 uses legacy, 0.5.0 does too unless --use-uv is given on the command line [18:11] TheJH: Andreas, I'm not an expert for networking stuff, but I think that it only is for telling the network card to listen on a specified multicast address [18:11] TheJH: ACTION is away now [18:11] bogomips2__: hi, when i use exec('myprogram', function callback(error, stdout, stderr), can i pass stdin data at myprogram ? [18:11] AvianFlu has joined the channel [18:11] seawise has joined the channel [18:11] Murvin: bnoordhuis: thanks.. :) [18:13] wink_: Andreas: if you're not network saavy, you probably want to avoid multicast if you can [18:13] wink_: there are dragons in there :p [18:14] topaxi has joined the channel [18:14] Andreas: Then it seams I have to do it the hard way. I am thinking about using unix_gram and have them all in the same folder, and then the master scripts job is to relay to all this files. What do you think about that? [18:14] klovadis has joined the channel [18:15] wink_: Andreas: what exactly are you trying to do? [18:15] Viehzeug has joined the channel [18:15] wink_: im a little late to the party [18:16] Andreas: I don't think you are but it takes som time to write :) [18:16] havenn has joined the channel [18:16] wink_: fair enough [18:17] MrTopf has joined the channel [18:17] Murvin has joined the channel [18:18] Squax has left the channel [18:18] vipaca: isaacs any idea why I would be seeing the above DNS error [18:19] isaacs: vipaca: what os? [18:19] embwbam has joined the channel [18:20] vipaca: System Linux 2.6.13 [18:20] isaacs: vipaca: what's in your /etc/resolv.conf? [18:20] embwbam: isaacs: we're restructuring our repo now, thanks to you :) If we have a module with several useful libraries in it, then an app that uses it - Do you install the module as an npm dependency, and use npm link to make development easier, or do you install the module as a git submodule? [18:21] schell has joined the channel [18:21] isaacs: embwbam: it's up to you :) [18:21] isaacs: embwbam: i usually try to avoid git submodules if i can [18:21] vipaca: There is no resolv.conf file this box does not have connectivity to internet [18:21] isaacs: they're kinda klunky, imo [18:21] isaacs: vipaca: ... [18:21] isaacs: vipaca: if you're not connected to the internet, then you can't get things from the internet... including dns... [18:22] vipaca: true. [18:22] vipaca: so I'm trying to install a tarball [18:22] isaacs: vipaca: so... there's your problem [18:22] vipaca: i.e. offline [18:22] isaacs: vipaca: please share more. [18:22] isaacs: vipaca: the whole error log. gist it [18:22] embwbam: isaacs: yeah, git submodules have been a pain for me in the past too, which is why I've avoided them. I'm not even sure how npm would work, given that this is private application code (I can't publish it to npm.. I'd have to get a tarball url or something?) [18:22] al3xnul__ has joined the channel [18:22] embwbam: isaacs: I mean, the npm strategy mentioned - installing them as npm dependencies and using npm link [18:23] schell: is anyone else unable to build node (master) on mac 10.6? [18:23] embwbam: isaacs: I guess we could switch to a paid github account :) [18:23] isaacs: embwbam: npm link can just hit a folder without going online [18:23] Andreas: I am trying to create a browser based site manager. So when I go a url in the browser I can se what site there is running and also listen to the output from them. I do that by executing new scripts as a daemon, but because they are daemons i do not have a direct acess (child_process output). I also need to know when they are started, I can tell that because the daemons are sending a UDP... [18:23] Andreas: ...datagram with a startupCode. But now i have the problem that the logger and the startup lisenter – listen to the same port or unix_path. [18:24] embwbam: isaacs: right, but for production - I thought you said npm link was only for development... like a shortcut. What's the long-cut? [18:24] isaacs: ah [18:24] isaacs: add those things to the bundledDependencies array in your package.json file [18:24] emacsen has joined the channel [18:24] emacsen: do people have thoughs on step vs streamline.js? [18:24] isaacs: "bundledDependencies":["subapp1", "subapp2"], "dependencies":{"subapp1":"1.2.3", "subapp2":"2.3.4"} [18:24] embwbam: isaacs: ooh, thanks (goes off to read some more) [18:25] isaacs: embwbam: then when you make the package tarball, it'll include them [18:25] gozala has joined the channel [18:25] wink_: Andreas: so fundamentally what you're looking for is an IPC mechanism [18:25] embwbam: if they're currently linked on the local machine, you mean? [18:25] wink_: so your children can communicate with each other / the parent? [18:25] isaacs: embwbam: yeah, or if they're installed [18:25] embwbam: does npm have a tarballing feature too? [18:25] isaacs: embwbam: not super handy, but you can use npm cache add at the moment [18:26] Andreas: Yes, I needed to wiki that word (IPC) [18:26] vipaca: isaacs https://gist.github.com/1067962 [18:26] isaacs: embwbam: i'm gonna add `npm pack ` soon [18:26] isaacs: embwbam: and that'll just dump out a foo-1.2.3.tgz file [18:26] wink_: Andreas: check out node-webworker, it'll make your IPC problems disappear, and its actually pretty straightforward to implement [18:26] embwbam: isaacs: cool, that would be super handy [18:27] kuya: SubStack: awake? [18:27] wink_: Andreas: https://github.com/pgriess/node-webworker [18:27] Andreas: tanks I will take a look at it [18:27] tmpvar has joined the channel [18:28] colinclark has joined the channel [18:28] wink_: Andreas: it works great, i've been using it in production for a couple months now [18:29] Andreas: will I am familiar with web-workers, But what will happen when the master script exit? [18:29] Andreas: well I am ... [18:29] wink_: Andreas: dont let the master script exit, use the master to proxy the messages coming out of the workers [18:30] isaacs: vipaca: so, if you download that tarball, and then install it, it's going to try to also install its dependencies. [18:30] isaacs: vipaca: because persistencejs depends on sqlite and mysql [18:30] bradleymeck_: emacsen they are very different things once you produce a lot of code, i prefer to be explicit about when control is changing / my stack is being clobbered so i tend to do callbacks instead of trying to emulate sync [18:30] ryah has joined the channel [18:30] isaacs: vipaca: and you don't have those installed already [18:30] wink_: keep a list of all your workers, when the master receives a messages from a worker, iterate over the list passing the message back down to your children [18:30] isaacs: vipaca: so npm will try to install them. [18:30] unvamp has joined the channel [18:30] kkaefer: any insight on why npm would always install devDependencies? [18:31] kkaefer: npm config list doesn't show a dev flag set [18:31] emacsen: bradleymeck_, step and streamline are very different? I also undertand your perspective, but I'm going to end up making a lot of database calls and so it's going to get very deep [18:31] kkaefer: and it's not a linked dependency either [18:31] Andreas: But then if the master script crash all the sites will do the same, and exactly what I have been trying to prevent. [18:31] isaacs: vipaca: also, looks like persistencejs contains an old version of npm inside it? that's odd. [18:31] sreeix has joined the channel [18:32] bradleymeck_: emacsen separating out the logic into components generally removes the possibility of that, makes you code like "Clean Code" talked about to some extent really, which is a nice side effect [18:32] vipaca: isaacs I think there might be some bad info in there that env is corrupt [18:32] infynyxx has joined the channel [18:32] vipaca: let me give you the debug logs now [18:32] febits has joined the channel [18:32] wink_: emacsen: fwiw, i went through your exact situation, step seemed like a good idea at first, but it gets messier than you think. you're better off adopting the paradigm instead of fighting it imo [18:32] Andreas: But then if the master script crash all the sites will do the same, and ..that is.. exactly what I have been trying to prevent. [18:33] emacsen: bradleymeck_, can you elaborate? [18:33] seawise has joined the channel [18:33] nibblebot has joined the channel [18:33] wink_: Andreas: so you dont want to be forking at all then, you're wanting independent daemons communicating? [18:33] emacsen: wink_, the thing is I'm going to make 4 db calls. so that's now 4 levels in depth... [18:33] d0k has joined the channel [18:33] Andreas: wink_ : yes [18:34] wink_: emacsen: if you only get 4 deep, you're way better off than i was ;> [18:34] vipaca: isaacs: This is what I'm seeing now [18:34] vipaca: isaacs: This is with mysql npm installed [18:34] nibblebot: what is the mechanism for removing defunct packages from the npm registry? [18:34] emacsen: wink_, so you just ended up making deeply nested code? [18:34] isaacs: nibblebot: npm unpublish [18:34] wink_: emacsen: it really seems awful at first, but i ended ditching step pretty quickly once my head adjusted [18:34] numb has joined the channel [18:35] isaacs: emacsen: why nest the functions? just name them, and then they can be spread out [18:35] isaacs: emacsen: not every single-use function has to be anonymous [18:35] nibblebot: isaacs: but that depends on the owner unpublishing it. what if it just is not updated slash not functional [18:35] wink_: emacsen: sort of, i was typing and isaacs answered what i was going to say [18:35] isaacs: nibblebot: email the user and cc me. give them a month to respond. if they don't respond, let me know. [18:35] emacsen: isaacs and wink_ okay, that's fair. They're still nested, but I see what you mean [18:36] wink_: wrap each query in a function, then just call them in the order you want from the callbacks [18:36] vid___ has joined the channel [18:36] emacsen: let me ask you another question. Is there a good guide to organizing a project? [18:36] dshaw_ has joined the channel [18:36] unvamp has joined the channel [18:36] nibblebot: isaacs: cool, any plan to make the package namespace more restricted? [18:36] isaacs: nibblebot: the principle is: try to resolve it with the owner. if that's not possible after an honest attempt, then lmk. [18:36] Andreas: wink_ : Do you know a way to make independent daemons communicating? [18:36] isaacs: nibblebot: nope. [18:36] isaacs: nibblebot: you can prefix your packages with your name if you like that style :) [18:37] nibblebot: isaacs: ok sounds good [18:37] mcluskydodallas has joined the channel [18:37] isaacs: nibblebot: npm install nibblebot-this nibblebot-that [18:37] wink_: Andreas: there are lots, unfortunately they're going to require a little work, especially if you're trying to avoid a 'master' to proxy communications [18:37] isaacs: emacsen: http://howto.no.de/how-to-module [18:37] wink_: your daemons are going to have to be able to be aware of all the others [18:39] ropes has joined the channel [18:39] Twitter has joined the channel [18:39] Andreas: well it not that complex, there is a master logger, a startup script, and some site servers. the startup script and the master logger need to know that the site servers are doing, but the sites servers just send datagram they don't resive them. [18:40] wink_: Andreas: if they're just sending, you should just have your master listen on a port and your children just send data to it? [18:41] Andreas: wink_: yes but both the master looger and the startup script need to resive data from the same source (site daemons). [18:42] addisonj has joined the channel [18:42] bradleymeck_: emacsen, when doing many nested callbacks, you are generally trying to group tasks that are not related (ie: logging in and getting private data from a db and then sending off a response from the private data). That is 3 different things: logging into a db, getting data from a db, sending a response. Instead of nesting huge callbacks (and for the love of god if you dont put a name on the damn things) try splitting appart t [18:42] bradleymeck_: he tasks. Then you end up with things like login(x,y,getData('x of y',sendResponse)) where getData just returns a function that will check for an err or result from a db call [18:42] wink_: Andreas: have the master listen on 2 ports, have your site daemons send their heartbeats to one, have your startup script connect to the other. when the master receives data on one port, just send it out the other? [18:43] amerine has joined the channel [18:43] fdenbow has joined the channel [18:44] emacsen: bradleymeck_, yeah , I get it... some of it makes sense now... a little extra work but I get it [18:45] emacsen: bradleymeck_, thanks [18:45] wink_: Andreas: if that doesnt work you can look into udp broadcasts and SO_REUSEADDR, what better time to shine up those networking skills though right? ;> [18:46] Andreas: wink_: that sounds almost simple, but it is sad that it have to be so hard. [18:46] steffan has joined the channel [18:46] Andreas: wink_: I have never owned any protocol skilles other that http. [18:46] wink_: Andreas: udp broadcasting is probably what you want to do, once you understand the gotchas, you'll make quick work of it [18:47] bradleymeck_: emacsen its extra work on small projects, on very large ones it saves a lot of time and effort [18:48] emacsen: bradleymeck_, yeah. I'm just using redis, so there's a lot of queries to get the data I need :) [18:48] Andreas: wink_: where can i read about it the node.js - UDP - setBroadcast documentation don't give me any hint? [18:48] AddZero has joined the channel [18:49] wink_: Andreas: you'll want to call setbroadcast, gotta see if there is a way to set SO_REUSEADDR though [18:49] wink_: that might actually be a little tricky (reading through the docs) [18:49] sweetd has joined the channel [18:49] wink_: i've got a meeting to goto, if you're around in a bit i'll help you dig if you need [18:49] seb_m has joined the channel [18:50] seb_m: hey, does anybody have any experience getting node / mongo to work on heroku? [18:50] Andreas: I am online the next hour [18:50] dmcquay has joined the channel [18:50] seb_m: i am at wit's end trying to get it to work [18:50] TroyMG has joined the channel [18:50] wink_: ok, hopefully it wont take that long :p [18:50] gkmngrgn has joined the channel [18:53] _aron has joined the channel [18:54] postwait has joined the channel [18:55] markwubben has joined the channel [18:55] towski has joined the channel [18:56] jonaslund has joined the channel [18:57] drudge: seb_m: try dotcloud ;) [18:58] sechrist_ has joined the channel [18:58] mercer has joined the channel [18:58] seb_m: drudge: hah, yeah i'm also trying dotcloud [18:58] seb_m: but i don't want to give up on heroku :-p [18:58] mercer: hi all [18:58] patcito has joined the channel [18:58] broofa: tmpvar: Is there an example of how to use jsdom to fetch a page w/ a form in it, populate and submit the form, and load the resulting page in jsdom? [18:58] drudge: broofa: check out zombie [18:58] sechrist_ has joined the channel [18:59] broofa: drudge will do, thx [18:59] tmpvar: broofa, what drudge said :) [18:59] colinclark has joined the channel [19:00] broofa: ACTION straps chainsaw to his wrist and heads off to http://zombie.labnotes.org/ [19:00] colinclark_ has joined the channel [19:00] CrabDude has joined the channel [19:00] MrSuperAA has joined the channel [19:01] chjj has joined the channel [19:04] eee_c has joined the channel [19:04] pjacobs has joined the channel [19:05] ajsie has joined the channel [19:05] mjr_: Andreas: just skimmed the scrollback a little. A long time ago, somebody did a binding to mdns. That may or may not be useful to you. [19:05] jerrysv: oh, hey tmpvar [19:05] ajsie: anyone here is using cloud9ide? [19:05] jerrysv: thanks for getting some more exposure on that [19:07] Andreas: mjr_: I have to look that up ... [19:07] MrSuperAA: anyone got time to help a complete node.js newbie with a question about dns resolutions and proxies? [19:07] odyniec has joined the channel [19:07] mjr_: Andreas: mdns is pretty neat. If that doesn't work, unfortunately the best documentation on how node dgram really works is lib/dgram.js and the tests. [19:08] springify has joined the channel [19:08] jhurliman has joined the channel [19:08] tomtomaso has joined the channel [19:09] stash1 has joined the channel [19:09] royh has joined the channel [19:09] Andreas: mjr_: well I am beginning to get used to it - But i didn't really understod mdns, maybe it is because a don't know much about DNS [19:10] unvamp has joined the channel [19:10] ajsie: how do i specify which ip and port to listen to with express? [19:10] flou has joined the channel [19:10] bartt has joined the channel [19:11] ajsie: like this app.listen('0.0.0.0:80') ? [19:11] tjholowaychuk: ajsie .listen() takes the same args as node's http.Server [19:11] tmpvar has joined the channel [19:12] tjholowaychuk: INADDR_ANY is the default so listen(80) should be fine [19:12] tjholowaychuk: i think host is the second arg, i never really use it [19:12] tjholowaychuk: or listen(socketPath) [19:12] MrSuperAA: I'm trying to make some changes to the proxy scripts at http://www.catonmat.net/http-proxy-in-nodejs/ and the proxy scripts there all crash when a client tries to proxy to a bad hostname… [19:15] tac-tics has joined the channel [19:16] mc_greeny has joined the channel [19:16] ajsie: i have no idea what socket is 09 [19:16] ajsie: =) [19:16] tuhoojabotti: ajsie: Educate yourself! [19:17] bene1 has joined the channel [19:18] Skola: I always use a .spec extension for my plaintext specs [19:18] Skola: but vim automagically syntax-highlights several wordsss [19:18] TomY has joined the channel [19:20] softdrink: ACTION prods jsperf.com [19:20] CIA-110: node: 03Ryan Dahl 07master * r08a334f 10/ (12 files in 3 dirs): Upgrade libuv to 0bf38570e8c7837bd830388f7b57f138aebb3395 - http://bit.ly/nveqZ4 [19:20] tac-tics has left the channel [19:21] ajsie: tjholowaychuk: it worked thanks [19:21] ajsie: tjholowaychuk: did you work for sencha before? [19:21] Skola: anyone know which filetype this is? [19:21] tjholowaychuk: yup i did [19:22] Skola: nvm found it [19:23] al3xnul__ has joined the channel [19:24] chjj has joined the channel [19:25] zemanel has joined the channel [19:27] puffpio has joined the channel [19:28] yozgrahame has joined the channel [19:30] seb_m: bump, has anybody here used mongo and node together on heroku? [19:30] ajsie: tjholowaychuk: why did you switch job? sencha needs you! [19:30] ajsie: to make extjs node compatible .. they are really slow with it [19:30] mike5w3c has joined the channel [19:31] jarek has joined the channel [19:31] jarek has joined the channel [19:31] simenbrekken has joined the channel [19:31] ajsie: how am i supposed to install packages .. "npm install ejs -g && cd my_app && npm link ejs" ? [19:31] isaacs: ajsie: you could just do `cd my_app && npm link ejs` [19:31] ajsie: or just "cd my_app && npm install ejs"? [19:31] isaacs: ajsie: or that :) [19:32] ajsie: link and install is the same thing? [19:32] isaacs: ajsie: depends on whether you want it linked, or just plain-locally-installed :) [19:32] isaacs: no [19:32] isaacs: ajsie: install just installs it there. [19:32] isaacs: link makes a symlink to the global one [19:32] ajsie: but you said: `cd my_app && npm link ejs` [19:32] isaacs: ajsie: sure [19:32] ajsie: i guess i have to istall it first [19:32] ajsie: "npm install ejs -g && cd my_app && npm link ejs" ? [19:32] isaacs: ajsie: no need to install globally first. it'll do it if necessary for you [19:32] ajsie: okay [19:32] isaacs: ajsie: link will do that for you [19:32] isaacs: ajsie: if necessary [19:32] ajsie: ah [19:33] ajsie: it shouldn't! [19:33] ajsie: so confusing [19:33] ajsie: cause it says "link" [19:33] isaacs: ajsie: observe the difference in `ls -laF node_modules` after each [19:33] isaacs: ajsie: you can also do `npm link ../foo` [19:33] isaacs: ajsie: to link to a folder. [19:33] ajsie: okay [19:33] ajsie: how does my node app search for the dependencies? [19:34] pjacobs2 has joined the channel [19:34] ajsie: eg.. if i have an app.js that is requiring a package .. how will it search for it? [19:34] thalll has joined the channel [19:34] ajsie: it will search for node_modules in the current folder i guess? then if its not there, will it search for node_modules in the parent and then parent parent and so on? [19:34] isaacs: ajsie: http://nodejs.org/docs/v0.4.9/api/modules.html [19:34] isaacs: ajsie: yep [19:34] isaacs: ajsie: that's just built into node [19:34] isaacs: . [19:35] superjudge has joined the channel [19:35] ajsie: that was weird .. i just installed it with npm install ejs .. but it couldn't find it [19:35] ajsie: then i did "npm install ejs -g && cd my_app && npm link ejs" ? [19:35] ajsie: and it found it [19:35] TroyMG_ has joined the channel [19:36] mikey_p: node will still fall back on the NODE_PATH env variable or whatever for global packages [19:37] ajsie: is it better to install it in the folder directly or link it? [19:37] mikey_p: keep in mind that it might find your packages via their global as well if you do it that way [19:37] ajsie: if i install it into my git repo then its there right when i save it into github [19:37] ajsie: isn't that more preferred than linking it? [19:37] altamic has joined the channel [19:37] mikey_p: you probably want a package.json file then [19:37] FIQ has joined the channel [19:38] tdegrunt has joined the channel [19:38] ajsie: when its in the package.json will it be installed globally or locally? [19:38] tdegrunt has joined the channel [19:38] mikey_p: locally, when you run npm install [19:38] seawise has joined the channel [19:38] gwark has joined the channel [19:39] mikey_p: isaacs: is there a way to use npm link with a package.json? [19:39] isaacs: mikey_p: there's no way to insist that a dep be linked, no [19:39] saurabhverma has joined the channel [19:40] isaacs: mikey_p: that would be presumptuous [19:40] isaacs: mikey_p: maybe i don't want your deps installed globally. [19:40] mikey_p: i.e. npm install --use-linked-if-available-else-install-local or some such [19:40] WrErase has joined the channel [19:41] yhahn1: isaacs: is there help or docs for the syntax of .npmignore? [19:41] isaacs: yhahn1: it's the same as gitignore [19:41] mikey_p: isaacs: not meant as a option in the packages, but as a flag for running install [19:41] yhahn1: isaacs: cool, thx [19:41] isaacs: mikey_p: npm install express --link [19:41] pifantastic_ has joined the channel [19:41] isaacs: mikey_p: links it if it's already global, otherwise installs it fresh [19:41] isaacs: mikey_p: but that's kinda rare. mostly, if you want link, you should just link. [19:41] mikey_p: izz_: does that work if install is reading from a package file? [19:41] jborst has joined the channel [19:42] isaacs: mikey_p: yeah. `npm install --link` [19:42] mikey_p: oh [19:42] mikey_p: ACTION shuts up [19:42] isaacs: mikey_p: anything already global will be linked, otherwise installed locally [19:42] unvamp has joined the channel [19:42] seawise has joined the channel [19:43] Swizec: anyone know how to make socket.io listen on a particular domain? [19:43] Rob has joined the channel [19:43] seawise has joined the channel [19:44] schell has joined the channel [19:44] st0ned___ has joined the channel [19:45] st0ned___ has left the channel [19:45] mikl has joined the channel [19:45] mikl has joined the channel [19:45] schell: i can't seem to compile node v0.4 nor v0.5 on mac 10.6 [19:45] tjholowaychuk has joined the channel [19:45] schell: seems to be a problem with libssl [19:46] bnoordhuis: schell: what's the problem? can you gist the build log? [19:46] schell: sure thing [19:46] matbee has joined the channel [19:47] wookiehangover has joined the channel [19:47] schell: https://gist.github.com/1068166 [19:48] schell: i had previously ran ./configure and make, so it skipped a lot [19:48] theCole has joined the channel [19:48] schell: i'm guessing i have to recompile libssl? [19:48] zmbmartin has joined the channel [19:49] seawise has joined the channel [19:49] epopt37 has joined the channel [19:50] bnoordhuis: schell: possibly, try a `./configure && make distclean && make` first [19:50] bnoordhuis: (and save the output) [19:51] harth has joined the channel [19:51] Gregor: schell: It looks like you have the iPhone devkit in your $PATH or something, confusing the build. I'm guessing that /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++ is not the compiler you want. [19:51] schell: oh shoot, why is it grabbing that one? [19:51] pdonald has joined the channel [19:51] schell: gosh i didn't see that at all [19:52] Gregor: I can't tell you why it did that, I have no idea, but I'm betting that's a problem :P [19:52] schell: right on :) [19:52] schell: i should have seen that after configuring [19:54] seawise has joined the channel [19:54] jbpros has joined the channel [19:54] mehtryx has joined the channel [19:55] schell: all good guys, thanks! ;) [19:55] Andreas has joined the channel [19:56] tilgovi has joined the channel [19:56] tilgovi has joined the channel [19:57] kristsk has joined the channel [19:57] AvianFlu has joined the channel [19:58] isaacs has joined the channel [19:58] _sorensen_ has joined the channel [19:58] jmoyers has joined the channel [19:59] schell: success! great [20:00] te-brian has joined the channel [20:02] dall has joined the channel [20:03] dall: hello everybody [20:03] fly-away has joined the channel [20:04] bnoordhuis: hi dall [20:04] louissmit has joined the channel [20:04] _sorensen_: afternoon` [20:04] pplante has joined the channel [20:04] antlong has left the channel [20:05] admc has joined the channel [20:05] mange has joined the channel [20:05] dall: Hi bnoordhuis! how is it going? [20:05] scoates: is the user who goes by "livelycode" on github here somewhere? [20:05] igl1 has joined the channel [20:05] bnoordhuis: dall: i'm fine, thank you :) [20:06] chrischris has left the channel [20:07] dall: bnoordhuis, i'm tring to understand if i node a db like mongo or other like mysql [20:08] dall: *if i NEED a db like... [20:08] tbassetto has joined the channel [20:09] mattp_ has joined the channel [20:10] bnoordhuis: dall: i'm not a big nosql fan so my answer would be biased [20:10] dall: bnoordhuis, my too.... i was looking for sqlite [20:11] meat_popsicle has joined the channel [20:11] dall: did you use it? [20:11] meat_popsicle: quick q about node Addons (C/C++ style): once i have my .node file, where do i copy that to? [20:11] kkaefer: meat_popsicle: you don't have to copy it anywhere [20:12] kkaefer: meat_popsicle: e.g. if you use npm [20:12] kkaefer: you can write a package.json file that points to your .node file using a relative path [20:12] meat_popsicle: not using npm [20:12] meat_popsicle: hrm [20:12] bnoordhuis: meat_popsicle: $HOME/.node_libraries [20:12] kkaefer: you can still use package.json, it's in node directly [20:12] bnoordhuis: dall: not with node [20:12] meat_popsicle: ok [20:12] kkaefer: didn't that get removed? [20:13] kkaefer: dall: shameless plug: https://github.com/developmentseed/node-sqlite3 [20:13] dall: bnoordhuis, is there no module to use sqlite wuth node? [20:13] Twitter has joined the channel [20:13] Twitter: Meeeh [20:13] Twitter: Matthewfl uses twitter on this server [20:13] bnoordhuis: kkaefer: no, it still exists in 0.5.0 [20:13] Twitter: I'm sade : ( [20:13] bnoordhuis: s/exists/works/ [20:14] dall: kkaefer, wow....did you create it [20:14] dall: right? [20:14] sreeix has joined the channel [20:14] kkaefer: yes [20:14] dall: kkaefer, work with the last version of sqlite ? [20:14] Kingdutch has joined the channel [20:14] jonasen has left the channel [20:14] kkaefer: yes [20:15] dall: kkaefer, async ? [20:15] wink_: Andreas: ping? [20:15] kkaefer: yes, look at the API [20:15] Andreas: pong [20:15] Nuck has joined the channel [20:16] kkaefer: https://github.com/developmentseed/node-sqlite3/wiki/API [20:16] Andreas: wink_: pong [20:16] dall: thanks...i'm seeing it [20:16] wink_: Andreas: it looks like so_reuseaddr gets set on the sockets for free, so udp broadcasts are probably the way you want to approach [20:18] wink_: Andreas: give me a sec and i'll show you an example [20:18] Andreas: wink_: yes I have allready done it using the example: https://github.com/joyent/node/blob/master/test/simple/test-dgram-multicast.js but my firewall wasn't happy about accessing the 224.0.0.1 adress. But when i forced it througe it worked. [20:18] CIA-110: node: 03isaacs 07master * r87900b1 10/ lib/url.js : url: Don't swallow punycode errors - http://bit.ly/oCrGDd [20:18] CIA-110: node: 03isaacs 07master * r8475e15 10/ lib/punycode.js : punycode: Test for integer overflow - http://bit.ly/oulUHe [20:18] CIA-110: node: 03Jeremy Selier 07master * r2a848fa 10/ (5 files in 3 dirs): [20:18] CIA-110: node: Close #1149 IDNA and Punycode support in url.parse [20:18] CIA-110: node: Using @bnoordhuis's punycode lib. [20:18] CIA-110: node: Close #1174 also - http://bit.ly/pDEhIY [20:18] wink_: Andreas: oh, perfect <3 [20:18] edbaffei_ has joined the channel [20:19] hellp has joined the channel [20:20] Andreas: wink_: Yes it works perfect, but I it is not optimal for me that it have to force my firewall. ( and i have also made my firefall go crasy so i need to reset it :) ) [20:20] dall: kkaefer, could qlite hold a big database? [20:20] mikeal has joined the channel [20:20] dall: kkaefer, i mean...millions of rows [20:20] edbaffei_: hi.. i'm trying to figure out how exports works i have this http://dpaste.com/563993/ [20:20] softdrink: zepto.js anim, y u no working for me? [20:20] edbaffei_: how do i use eg. the find function [20:21] broofa has joined the channel [20:21] kkaefer: dall: http://www.sqlite.org/whentouse.html [20:21] srz has joined the channel [20:22] srz: hi. anybody with some express experience here? i'm trying this: app.post(/^\/tiles\/save\/([A-Za-z0-9]+)?/, function(req, res) { [20:22] srz: var id = req.params(1); [20:22] srz: but req.params is empty. same approach works for get requests via app.get. what am i doing wrong? [20:24] tjholowaychuk: srz hop in #express [20:24] herbySk has joined the channel [20:24] srz: thx, was in expressjs already [20:24] tjholowaychuk: oh :D [20:24] tjholowaychuk: i dont see you [20:25] srz: nos [20:25] srz: i spelled it expressjs [20:25] tjholowaychuk: ah [20:25] srz: going to ask there thank you [20:27] Fuu has joined the channel [20:27] sandstrom has joined the channel [20:27] sandstrom has joined the channel [20:27] skapism has joined the channel [20:28] skapism: Do I have a global variable within a module that I can access in an arraylike fashion? (I'm loading plugins and want to give them global-local scope within a module, as if they were declared like var amqp) [20:29] tbranyen: skapism: not really... [20:29] xeodox has joined the channel [20:29] jerrysv: tbranyen disagree :) [20:30] tbranyen: jerrysv: there is no variable available globally that acts like an array [20:30] tbranyen: that you can use to store a global state and then declare locally to a module [20:30] jerrysv: not immediately, but you can require what is essentially an empty module and have it behave as a global [20:31] jerrysv: so, can require the same module multiple places, it's namespaced, but it works [20:31] Sami_ZzZ has joined the channel [20:31] skapism: well, I just think it's kind of annoying to access my plugins like plugins.amqp.etc instead of amqp.etc [20:31] jerrysv: skapism: var amqp = require('./myglobals'); [20:31] jerrysv: amqp.foo.push('abc'); [20:31] tbranyen: jerrysv: thats not a bad idea [20:32] tbranyen: so long as foo is an array [20:32] jerrysv: tbranyen: discovered that one by accident, hence my quick to disagree :) [20:32] tbranyen: might as well define it in the module [20:32] jerrysv: exactly [20:32] mahna has joined the channel [20:32] andrewfff has joined the channel [20:32] pigmej has joined the channel [20:33] skapism: jerrysv: but you see, the point is I don't want to define amqp or any other plugin manually. I read it from a configuration file and load the external module. or am I getting you wrong? [20:33] jerrysv: skapism: exports.foo = new Array(); [20:33] seawise has joined the channel [20:33] jerrysv: skapism: make your configuration file be a module you read in [20:33] ryan_ has joined the channel [20:33] skapism: it is a module I read in [20:33] jerrysv: https://github.com/JerrySievert/temperature/blob/master/settings.js [20:33] skapism: and then I loop over its plugins subobject [20:34] jerrysv: then simply: var settings = require('./settings'); [20:34] jerrysv: settings.port = 3000; [20:34] meat_popsicle: Checking for node path : not found [20:34] meat_popsicle: what's the env var that i need to set for that? [20:34] skapism: how would you load the amqp module from such a config script into var amqp? [20:35] jerrysv: skapism: var amqp = require('./settings'); [20:35] meat_popsicle: that's from a node-waf configure build [20:35] skapism: but then you declare it manually [20:35] jerrysv: https://github.com/JerrySievert/temperature/blob/master/server.js#L15 [20:36] skapism: I want the line var amqp = require('amqp'); to be generated by my loop [20:36] jerrysv: can you point to a gist of what you *want* to do then? [20:36] broofa: anyone know how to get node-inspector to refresh it's display of loaded scripts? [20:36] skapism: jerrysv: sure, I'll upload something [20:37] broofa: I frequently step into a function that I know is loaded, but node-inspector doesn't show the source (because it doesn't know about the source file yet?) [20:38] yozgrahame has joined the channel [20:39] skapism: jerrysv: http://pastebin.com/cpLEd4Em [20:39] skapism: jerrysv: var plugins is in an external files, I typed it like that for simplicity's sake [20:39] skapism: jerrysv: now I want to replace global in this example in something global just to the function, so I can access amqp [20:39] jerrysv: skapism: let me pop something together in a gist for you [20:39] skapism: just to the module* [20:40] bene1 has left the channel [20:40] towski has joined the channel [20:41] seawise has joined the channel [20:42] jerrysv: skapism: http://pastebin.com/EYE0EdLU [20:43] seawise_ has joined the channel [20:44] jerrysv: skapism: essentially, you're creating a namespaced "global" [20:45] seawise_ has joined the channel [20:46] skapism: jerrysv: looking [20:47] eee_c has joined the channel [20:47] seb_m has joined the channel [20:47] CIA-110: libuv: 03Ryan Dahl 07master * r66ef54e 10/ uv-unix.c : unix: implement uv_connect6 - http://bit.ly/ovtaTZ [20:48] numb has joined the channel [20:48] dall: hello guys.... on the package.json i have something like: [20:48] dall: "dependencies": { [20:48] dall: "express": ">= 2.4.0", [20:48] dall: etc etc [20:48] Nican has joined the channel [20:48] dall: is the version required? [20:48] dall: i would like to have the last version of all [20:48] FireFly|n900 has joined the channel [20:48] fuentesjr has joined the channel [20:48] dall: can i only set the name of the module? [20:49] mikey_p: dall: you probably want to use something like "2.4.x" [20:49] mikey_p: most node modules follow semantic versioning [20:49] wadey: dall: if you really want to, you can do "express": "*" [20:49] ajsie: how do you guys serve files on node.js? [20:49] mikey_p: so switch from 2.4.x to 2.5.x could break some API changes [20:49] dall: ok [20:50] mikey_p: dall: here's everything you need to know: http://blog.nodejitsu.com/package-dependencies-done-right [20:50] dall: thanks [20:51] t|f: Hi all. Can someone point me to a working example of connecting to a node-websocket-server using websocket-client? I keep getting Socket not writable errors even with trivial example. [20:52] wookiehang0ver has joined the channel [20:52] catshirt has joined the channel [20:52] mikey_p: dall: see also: http://semver.org/ [20:53] chjj has joined the channel [20:53] CIA-110: libuv: 03Ben Noordhuis 07master * r9a5b47d 10/ test/runner-unix.c : uv_sleep() takes milliseconds, usleep() microseconds. Convert argument. - http://bit.ly/qbpSwy [20:53] dall: mikey_p, thank you! [20:53] creationix has left the channel [20:53] seawise has joined the channel [20:53] dall: 0.0.x it's perfect [20:53] dall: oook [20:54] dall: then i only have to do npm update [20:54] dtan: hey, i'm trying to read a file directory: fs.readdir(path, function(err, files) {}); [20:54] dall: right? [20:54] dtan: but the files array returned is empty [20:54] dtan: even though I know there is one file in there [20:54] dtan: has anyone experienced this type of behavior before? [20:56] robot_jesus has joined the channel [20:56] dans has joined the channel [20:57] dans: does anyone know of an example app using express/now.js ? [20:57] darshanshankar: dans: check github, theres an example on the nowjs repo [20:57] Twitter has joined the channel [20:57] darshanshankar: dans: https://github.com/Flotype/now/tree/master/examples/express_example [20:57] augustl: dtan: nope.. [20:58] seawise has joined the channel [20:58] chrischris has joined the channel [20:58] dans: thanks [20:59] gazumps has joined the channel [20:59] darshanshankar: dtan: me neither, are you sure you're on the right path? [21:00] dtan: i'm pretty sure, let me doulbe check [21:00] A_Nub has joined the channel [21:00] seawise has joined the channel [21:00] A_Nub has left the channel [21:00] dtan: ya it's the correct path [21:00] Kingdutch has joined the channel [21:00] dtan: there is no default filter of file types to ignore, right? [21:00] darshanshankar: whats err? [21:01] dtan: ha, nm, i was trying to .splice out my .DS_Store file [21:01] dtan: and it messed up the array [21:01] dtan: but thanks, dars [21:01] darshanshankar: np [21:01] dtan: didn't even think about that [21:01] skawful has joined the channel [21:02] tdegrunt has joined the channel [21:03] pquerna: Kami_: ps, nice debugger patch [21:03] tayy has joined the channel [21:04] maushu has joined the channel [21:05] TomY has joined the channel [21:05] jvduf has joined the channel [21:06] Tobsn has joined the channel [21:06] dshaw_ has joined the channel [21:08] Tobsn has joined the channel [21:10] cjm has joined the channel [21:12] Kami_: pquerna: yeah, still need to add tests, just looked at the debugger test file and it's pretty ghetto :P [21:12] robertfw has joined the channel [21:13] captain_morgan has joined the channel [21:13] materialdesigner has joined the channel [21:15] joshontheweb has joined the channel [21:17] seb_m has joined the channel [21:18] pifantastic has joined the channel [21:18] nitram_macair has joined the channel [21:19] mendel_ has joined the channel [21:20] seb_m: drudge: your suggestion to use dotcloud instead of heroku was a good one [21:20] socketio\test\88 has joined the channel [21:20] mendel__ has joined the channel [21:21] al3xnull has joined the channel [21:21] ajsie: i wanna serve files using connect static .. but i dont get how it all works [21:21] ajsie: app.get('/', express.static(__dirname + '/client'), function(req, res){}); [21:21] tjholowaychuk: ajsie: app.use(express.static(path)) [21:21] ajsie: that will make GET / serve the index.html in client folder .. [21:22] tjholowaychuk: for specifics you can use res.sendfile() [21:22] larsvegas has joined the channel [21:22] jshaw has joined the channel [21:22] ajsie: but in the index.html i have [21:23] ajsie: also [21:23] Bwen has joined the channel [21:23] ajsie: so how should i setup connect static to allow index.html to fetch files from different folders? [21:23] herbySk74 has joined the channel [21:24] AvianFlu has joined the channel [21:24] tjholowaychuk: like i showed you [21:24] tjholowaychuk: it supports index.html already [21:25] ajsie: tjholowaychuk: you mean i have to setup a route for each file and then use res.sendfile() ? [21:25] blup has joined the channel [21:26] tjholowaychuk: no [21:26] tjholowaychuk: just do app.use() [21:27] socketio\test\20 has joined the channel [21:27] Wa has joined the channel [21:29] deedubs has joined the channel [21:29] ajsie: app.use(express.static(__dirname + '/public')); [21:29] ajsie: app.use(express.static(__dirname + '/client')); [21:29] ajsie: app.use(express.static(__dirname + '/../')); [21:30] Swizec has joined the channel [21:30] ajsie: so if i have it like that it will first search for that file in the first location, then if its not there it will continue to the others? [21:30] tjholowaychuk: yup [21:30] tjholowaychuk: GET /javascripts/foo.js will go through each until it's found [21:30] ajsie: cool [21:30] ajsie: thanks [21:31] ajsie: is connect static better than node-static? [21:31] softdrink: tjholowaychuk: is there something like coffee-watcher but for stylus? [21:31] ajsie: and this one: https://github.com/felixge/node-paperboy [21:31] tjholowaychuk: softdrink there's a --watch flag [21:31] ajsie: https://github.com/cloudhead/node-static [21:31] tjholowaychuk: define "better"? [21:31] tjholowaychuk: it has more features [21:31] mehtryx has joined the channel [21:31] ajsie: node-static has more features? [21:31] tjholowaychuk: connect's static() [21:32] ajsie: it has caching? [21:32] softdrink: does it watch recursively or what? [21:32] tjholowaychuk: softdrink it should yeah [21:32] tjholowaychuk: i dont really use it, i use the middleware [21:32] softdrink: fair enough [21:33] tjholowaychuk: ajsie: it used to but i removed the caching, in-process caching is kinda useless [21:33] ajsie: I recall you could have namespace for different folders [21:33] softdrink: my current projects are built to be as static as possible… i just really really like the convenience of some of the shorthand languages [21:33] tjholowaychuk: assets are almost always transferred to a cdn [21:33] tjholowaychuk: at least they should be [21:33] ajsie: tjholowaychuk: even the index.html? [21:33] tjholowaychuk: ajsie app.use('/public', ...) [21:33] tjholowaychuk: for mounting [21:34] tjholowaychuk: unless you're getting more than 6k requests to index.html a second, dont worry about :p [21:34] ajsie: tjholowaychuk: i wanted the index.html to be in a cdn but then you cannot do ajax to node.js server due to same origin policy [21:34] ajsie: why i want to serve it with node.js [21:34] sechrist has joined the channel [21:34] tjholowaychuk: sure [21:34] voodootikigod: ajsie: just use json-p [21:35] tjholowaychuk: serving html wont be a bottleneck though [21:35] softdrink: jsonp ftw [21:35] ajsie: jsonp is simple to use? [21:35] voodootikigod: as simple as JS :) [21:35] ajsie: ill check out how you do that with extjs [21:35] voodootikigod: just wrap it your json in [21:35] voodootikigod: callback({}) [21:35] voodootikigod: and let it late exec [21:36] voodootikigod: on load [21:36] voodootikigod: umm [21:36] jerrysv: tmpvar: thanks! [21:36] voodootikigod: fyi extjs is js [21:36] voodootikigod: :) [21:36] softdrink: mootools and zepto.js both do jsonp quite easily btw. [21:37] gwark has joined the channel [21:37] harth: SubStack: I'm conditionally requiring a module in a file in one of my node packages [21:38] ajsie: wasn't there an effort of making ajax cross domai? [21:38] ajsie: domain [21:38] ajsie: so you wouldn't need the jsonp hack [21:38] herbySk has joined the channel [21:38] harth: SubStack: like if ( // in node ) { var fs = require('fs') }, but browserify complains about not finding 'fs' [21:38] chrisdickinson: ajsie: alternatively, send "Access-Control-Allow-Origin: *" headers with your node.js responses. [21:38] ajsie: chrisdickinson: that will work for all browsers? [21:39] chrisdickinson: noooo. most likely not in execScript // => [Function: execScript] [23:24] Swizec: how can I use socket.io to send a message to all connected clients? [23:25] Swizec: I had it working on an old version, but needed to upgrade [23:25] brainproxy: invoke REPL for v0.4.9 .. > execScript // => ReferenceError.... [23:25] ryah: Swizec: socket.broadcast() [23:26] ajsie: anyone here is using chrome web inspector? [23:26] brianc1 has joined the channel [23:26] ryah: ryan@mac1234:~/projects/node% ./node -v [23:26] ryah: v0.4.8 [23:26] ryah: ryan@mac1234:~/projects/node% ./node [23:26] ryah: > execScript [23:26] ryah: ReferenceError: execScript is not defined [23:26] ajsie: that knows how i can get that little yellow box (when hovering a variable) to be larger? [23:26] xeodox has joined the channel [23:26] Swizec: ryah I get "Object # has no method 'broadcast'" [23:27] ryah: Swizec: oh - i don't know about the new versions... rauchg - what's the API? [23:27] brainproxy: ryah: I've just tried 3 different linux vms with v0.4.8 and it exists for me .. weird [23:27] brainproxy: ryah: granted, I'm using Caswell's nvm [23:27] brainproxy: ryah: but I'm not sure why that would make a difference [23:27] ryah: brainproxy: *shrug* it's not in node [23:28] jerrysv: jerry@Pro:/tmp$ node -v [23:28] jerrysv: v0.4.7 [23:28] jerrysv: jerry@Pro:/tmp$ node [23:28] jerrysv: > execScript [23:28] jerrysv: [Function: execScript] [23:28] brainproxy: but at least it has been, I've been using a library for a year that depended on execScript specifically [23:28] jerrysv: ryah: is for me ? [23:28] jerrysv: os x [23:28] ryah: jerrysv: are you also using nvm? [23:29] ajsie: ryah: you are the Father of Node.js .. how does it feel? [23:29] brainproxy: granted, it needs to be rewritten, but I didn't notice there was an issue utnil I tried to bump from 0.4.5 to 0.4.9 [23:29] jerrysv: ryah: no, compiled myself, os x, off of the node site [23:29] ryah: O_o [23:29] jerrysv: i would not lie to you [23:29] ryah: O_o [23:30] jerrysv: in v0.2.4 as well, ubuntu [23:30] ryah: ryan@mac1234:~/projects/node% grep -R execScript lib [23:30] ryah: -1- ryan@mac1234:~/projects/node% grep -R execScript src [23:30] ryah: -1- ryan@mac1234:~/projects/node% [23:30] mikeal has joined the channel [23:31] Wa has joined the channel [23:31] jerrysv: ryah: clearly one of us is on crack [23:31] brainproxy: I suspect gremlins [23:31] brainproxy: *and* crack [23:31] jerrysv: dunno about the gremlins, but the crack is there regardless [23:31] ryah: ACTION does 'make distclean' [23:31] robot_jesus: not in my .4.9 version [23:31] apanda has joined the channel [23:31] brainproxy: yeah, it's def not in 0.4.9 [23:32] brainproxy: nor 0.5.0 [23:32] rauchg: Swizec [23:32] rauchg: socket.broadcast [23:32] Swizec: think I just tracked down the issue [23:33] jerrysv: jerry@Pro:~/Downloads/node-v0.4.7$ ack execScript [23:33] jerrysv: deps/v8/src/v8natives.js [23:33] jerrysv: 150:// execScript for IE compatibility. [23:33] jerrysv: 181: "execScript", GlobalExecScript [23:33] ryah: ok - now im finding it [23:33] Swizec: my "socket" is actually the manager, not the real socket [23:33] ryah: it disappeared apparently in the latest V8 update [23:33] ryah: strange [23:33] Swizec: if I just loop through the sockets list and do a broadcast on those, that should work right? [23:33] rauchg: socket.broadcast.emit('my event') [23:33] rauchg: will send my event to all the rest of th e sockets [23:33] ryah: between 3.1.8.16 and 3.1.8.24... [23:34] rauchg: socket.broadcast.send is the equivalent to the old socket.broadcast() [23:34] jerrysv: may 19th it seems [23:34] rauchg: `broadcast` is a flag like `volatile` [23:34] Swizec: oh ok [23:34] rauchg: also feel free to join #socket.io [23:36] brainproxy: ryah: long-term I want to rewrite the code in question to use child_process.fork, but at the same time would like to be able to work in the latest ver of the stable branch with code built to 0.4.x's specs [23:37] brainproxy: any chance a point release could make v0.4.9 compat with v0.4.8, in terms of this specific behavior [23:37] brainproxy: or is it a done deal with the v8 upgrade in v0.4.9 [23:37] t4nk411 has joined the channel [23:38] ryah: brainproxy: looking into it [23:38] brainproxy: ryah: cool, thanks man [23:38] unomi has joined the channel [23:39] zachwe has joined the channel [23:39] xeodox has joined the channel [23:39] jerrysv: brainproxy, ryah: the changeset from that merge looks fairly clean, may just be possible to merge the execScript functionality back in [23:40] jerrysv: http://groups.google.com/group/v8-dev/browse_thread/thread/253447acf1c506db/9b20e438b053f06a?show_docid=9b20e438b053f06a&pli=1 [23:40] jerrysv: specifically [23:40] c4milo1 has joined the channel [23:41] zachwe: Does anyone have suggestions or sources for the best way to share a session between node and, say, apache? [23:41] shinuza has joined the channel [23:41] jerrysv: zachwe: what's the environment on the apache side? php? [23:42] zachwe: yes [23:42] jerrysv: zachwe: and you're talking specifically about an actual session, as in php's session_start et al? [23:45] zachwe: jerrysv: I was actually wondering if there was a general best practice for running node in parallel with another server [23:45] mapleman has joined the channel [23:45] zachwe: in terms of redis vs memcached vs whatever [23:45] c4milo2 has joined the channel [23:45] c4milo1 has joined the channel [23:46] skm has joined the channel [23:46] robot_jesus: I dont think sessions are supported in node proper, express handles my sessions for the moment, not sure if you can cluster them or not [23:47] tjholowaychuk: if you dont use the memory store it's fine [23:47] Xano has joined the channel [23:48] stepheneb has joined the channel [23:48] jerrysv: zachwe: store externally, redis or memcache, but on the php side use a json encode instead of the native serialize [23:48] tolmasky-macbook has joined the channel [23:48] CIA-110: libuv: 03Henry Rawas 07master * rafff934 10/ uv-win.c : detect ipv6 support - http://bit.ly/nVHDbV [23:49] ritch has left the channel [23:49] gazumps has joined the channel [23:49] zachwe: thanks guys [23:50] jerrysv: zachwe: and write your own sessioning on the php side, to be more generic, much nicer than writing php style serialize for node :) [23:54] devongovett has joined the channel [23:56] CIA-110: node: 03Ryan Dahl 07v0.4 * r073fbea 10/ (4 files in 3 dirs): [23:56] CIA-110: node: Bring back execScript [23:56] CIA-110: node: Undoing [23:56] CIA-110: node: http://codereview.chromium.org/7060008 [23:56] CIA-110: node: https://groups.google.com/forum/#!topic/v8-dev/JTRHrPHFBts - http://bit.ly/pmbDHf [23:56] ryah: jerrysv: brainproxy: ---^ [23:56] mapleman1 has joined the channel [23:56] jerrysv: ryah: awesome! [23:57] jerrysv: (i don't use it, but appreciate it regardless) [23:57] ryah: brainproxy: this is going away in master - so don't rely on it [23:59] dnunes has joined the channel