[00:01] scoates: (-: [00:11] robmason has joined the channel [00:13] langworthy has joined the channel [00:19] kayue has joined the channel [00:22] [[zz]] has joined the channel [00:26] _1marc has joined the channel [00:31] Tim_Smart has joined the channel [00:37] galaxywatcher has joined the channel [00:37] admc has joined the channel [00:37] jdalton has left the channel [00:47] entp has joined the channel [00:51] langworthy has joined the channel [00:55] aho has joined the channel [00:57] ryah_: ACTION just did child.stderr.pipe(process.stdout); [00:57] ryah_: and it worked [00:57] ryah_: and i was happy [00:59] CIA-94: node: 03Ryan Dahl 07dumper * r33044e9 10/ (3 files in 3 dirs): Make test-dumper2 fail - so we see the problem - http://bit.ly/aVu9XI [01:01] skampler: ryah_: does that in some sense better than sys.pump(child.stderr, process.stdout) ? [01:01] ryah_: skampler: it's the new api for sys.pump [01:02] skampler: okay [01:06] [[zz]] has joined the channel [01:08] jesusabdroolah has joined the channel [01:08] jesusabdroolah: Just noticed node uses make now--how long ago did that happen? [01:08] jesusabdroolah: ACTION really needs to pay more attention [01:10] ryah_: jesusabdroolah: did it this week.. still under development [01:11] jesusabdroolah: Ah, cool beans [01:11] jesusabdroolah: I miss the colors :( but no biggy [01:11] ben_alman_ has joined the channel [01:12] jesusabdroolah: I decided I'm sick of not having node on my laptop, so I'm installing it now [01:12] jesusabdroolah: and I'll figure out how to free up space later >_< [01:12] ben_alman_ has joined the channel [01:13] zentoooo has joined the channel [01:13] jesusabdroolah: ryah_: One thing I'd suggest: I didn't have openssl-devel installed, but configure didn't complain--I'm guessing it didn't double-check the existence of headers [01:16] jesusabdroolah: Also, getting a lot of warnings---is that normal? [01:18] deepthawtz has joined the channel [01:21] ryah_: jesusabdroolah: yes, it needs to check for openssl [01:21] ryah_: warnings are normal [01:23] jesusabdroolah: Awesome [01:23] jesusabdroolah: Glad to be a guinea pig :v [01:24] mtodd has joined the channel [01:25] sarmiena has joined the channel [01:27] sarmiena has left the channel [01:36] MikhX has joined the channel [01:43] seen- has joined the channel [01:45] nerdEd has joined the channel [01:47] Aria has joined the channel [01:47] jesusabdroolah: ryah_: Installed like a boss, fyi [01:50] aho has joined the channel [01:57] pydroid has joined the channel [02:01] nolkyan has joined the channel [02:02] dpritchett has joined the channel [02:04] jvolkman_ has joined the channel [02:07] Twelve-60 has joined the channel [02:13] softdrink has joined the channel [02:19] nerdEd has joined the channel [02:20] AAA_awright: Is it just me or can make never make configure? [02:22] ryah_: AAA_awright: ? [02:22] AAA_awright: Eh I think I'm being stupid... Shouldn't make be able to see that ./configure hasn't been run (as a preresiquite) and run that? [02:24] ryah_: AAA_awright: i suppose [02:24] AAA_awright: ./configure is what makes the Makefile though so it would be overwriting itself... idk maybe it would work [02:25] inimino has joined the channel [02:25] AAA_awright: Just autotools in general. [02:25] ryah_: the makefile is made by hand [02:25] ryah_: we're not using automake [02:28] AAA_awright: Ah, just autoconf I see [02:28] keeran has joined the channel [02:29] joshpeek_ has joined the channel [02:29] sstephenson has joined the channel [02:29] rbranson has joined the channel [02:29] inimino` has joined the channel [02:29] zz_foca has joined the channel [02:31] vhost- has joined the channel [02:33] cataska has joined the channel [02:33] CIA-94: node: 03Ryan Dahl 07master * r2fa260c 10/ (Makefile config.mak.in): Clean up 'make clean' - http://bit.ly/aeFSRG [02:33] CIA-94: node: 03Ryan Dahl 07dumper * r30dea75 10/ (3 files in 3 dirs): more work (+11 more commits...) - http://bit.ly/b3IfRZ [02:34] freeformz has joined the channel [02:36] langworthy has joined the channel [02:36] jrockjiggz has joined the channel [02:39] ajpiano has joined the channel [02:40] entp has joined the channel [02:41] meso_ has joined the channel [02:41] SamNZ has joined the channel [02:50] inimino1 has joined the channel [02:53] bentruyman has joined the channel [02:54] ossareh has joined the channel [02:58] jchris has joined the channel [03:00] ajpiano has joined the channel [03:01] Pilate has joined the channel [03:04] masahiroh has joined the channel [03:11] elijah-mbp has joined the channel [03:12] davidwalsh has joined the channel [03:12] elijah-mbp has joined the channel [03:18] jesusabdroolah: ryah_: node master seems to segfault during certain operations without reason--for example, when trying to install npm. I'm gonna run make test and let you know what happens. [03:20] Tim_Smart: Yeah npm segfaults for me too haha. [03:21] isaacs has joined the channel [03:22] noahcampbell has joined the channel [03:25] jgautier has joined the channel [03:25] modular has joined the channel [03:25] jgautier: has anyone here used npm programmtically?? [03:25] isaacs: jgautier: i have ;) [03:25] jgautier: hahhaha [03:25] halfhalo: liar [03:25] jgautier: just the person to talk to [03:26] isaacs: jgautier: what're you wanting to do with it? [03:26] jgautier: i was going to build an npm manager extension for cloud9 [03:26] jgautier: so basically just need to install stuff programatically [03:26] isaacs: ok.. [03:26] jgautier: im trying to call the ls command [03:27] jgautier: do you have how to do that documented anywhere? [03:27] isaacs: var npm = require("npm"); npm.load({configs}, function (er) { /* handle possible error */ npm.commands.install([list, of, args], callback) }) [03:27] isaacs: it's not documented anywhere, but you can look in cli.js [03:27] isaacs: all the commands take an array as the first argument, and a callback as the second [03:28] isaacs: the callbacks all get called like cb(er, data), node-style [03:28] jgautier: yeah and the callback takes info as the second argument right? [03:28] jgautier: im doing something like this and im getting no data back [03:28] modular: anyone ever run into "removeListener only takes instances of Function" ? [03:28] isaacs: jgautier: yeah, it doesn't always give you data back [03:28] jgautier: npm.commands["ls"](["installed"],function(err,info){}); [03:29] jesusghostullah: Something I'm writing and was trying to test also caused segfaults--not sure how [03:29] jgautier: i see it outputting stuff to the console but no data back to the callback [03:29] isaacs: jgautier: i'm working on making the programmatic access more useful, and indexzero (charlie robbins) is helping a lot with that, too [03:29] isaacs: jgautier: check out the code on my master branch (install with "make link" or "make dev") [03:30] rauchg_ has joined the channel [03:30] isaacs: jgautier: if you just want to see what's installed, then you can do this: var readInstalled = require("npm/utils/read-installed") ; readInstalled([], cb) [03:30] jgautier: ahh ok cool [03:30] jgautier: ill try that [03:31] isaacs: jgautier: of course, that doesn't hit the registry, so it won't tell you if it's the latest or whatever. [03:32] jgautier: anyway to get that info? [03:32] isaacs: jgautier: also, in the latest code on HEAD, "npm" is an event emitter [03:32] jgautier: would be useful to display in the extgension [03:33] mbrochh has joined the channel [03:34] jgautier: i could just copy some of the code from ls.js [03:34] jgautier: which would give me the installed and the data from the registry? [03:35] rauchg_ has joined the channel [03:37] Tim_Smart has joined the channel [03:38] isaacs: jgautier: so you can listen t o the "log" events [03:38] isaacs: jgautier: it'd be better to not copy ls.js [03:38] isaacs: jgautier: by design, the files in npm's lib folder are going to access internal apis [03:41] pydroid has joined the channel [03:44] jgautier: so isaacs currently there isnt any way to do what i want easily? [03:44] isaacs: jgautier: what is it exactly that you'd like to do? get a list of installed packages? [03:44] jgautier: yes [03:45] isaacs: so, right now (that is, the code on my master branch), npm.commands.ls([], cb) will give you a list of ALL pacakges, and the installed ones will have an "installed:true" flag on them [03:45] isaacs: ie, you'll get the object before it's prettified and filtered [03:46] isaacs: because the filtering is just a grep, which happens *after* being converted to a string, and there's no logic in there right now to *just* give you the data objects for the pacakges that pass through the filter [03:47] jgautier: ok cool ill try that...when do you plan on releasing the code in your master branch for everyone to use [03:47] hzin has joined the channel [03:47] isaacs: jgautier: i'd really like to rething and rework auto-pruning, but it's taking a bit longer than i'd anticipated. [03:47] modular: does anyone have a working example of using removeListener from within a timeout? i can't figure out how to pass it the callback it seems to want. [03:47] isaacs: also, i decided to finally force myself to switch to vim, so my mild daily rage about textmate crashing has turned into overwhelming urge to kill. [03:48] jgautier: hahah cool [03:48] isaacs: but, i hope the urge to kill will pass soon. [03:48] jgautier: have you tried cloud9? [03:48] isaacs: no, but really, i think my problem is using an editor that's been stable for less than 10 years. [03:49] modular: this is a dump of my listener... { _events: { message: [ [Function], [Function] ] } } [03:49] isaacs: and the "oh, it's so hard" is just whiny loser talk, so i should just man up [03:50] modular: i guess the idea is to pass one of the [Function]s to removeListener as the callback, but how? [03:50] isaacs: modular: e = new EventEmitter ; e.on("foo", function () { var listener = arguments.callee ; setTimeout(function () { e.removeListener("foo", listener) }, 10000) }) ; e.emit("foo") [03:50] Aria: modular: Either save a reference when you create it, or use listeners('message')[0] or similar. [03:51] stepheneb has joined the channel [03:51] isaacs: modular: or, function myListener () {} ; e.on("foo", myListener); setTimeout(function () { e.removeLIstener("foo", myListener) }) [03:52] modular: thanks, i will give those a try. [03:52] isaacs: modular: or: var x ; e.on("foo", x = function () {}) ; setTimeout(function () { e.removeListener("foo", x) }) [03:52] isaacs: the point is, pass *the actual function* in to the call to removeListener [03:53] modular: right [03:54] mtodd has joined the channel [03:54] jgautier: isaacs: dont use cloud9 then [03:55] Aria: What is cloud9? [03:55] isaacs: jgautier: i do kinda dig what cloud9 is trying to do [03:55] isaacs: Aria: it's an editor for javascript [03:55] langworthy has joined the channel [03:55] Aria: Aah, I see. [03:55] jgautier: brb [03:56] jgautier has joined the channel [03:56] marcfive has joined the channel [03:56] evanmeagher has joined the channel [03:56] jgautier: its actually pretty good...with some more work i could use it all teh time [03:57] marcfive has left the channel [03:57] marcfive has joined the channel [03:57] marcfive has left the channel [03:59] ysynopsis1 has joined the channel [04:05] jme has joined the channel [04:05] inimino1 has joined the channel [04:06] mikeal has joined the channel [04:08] ajpiano has joined the channel [04:08] Me1000 has joined the channel [04:11] noahcampbell has joined the channel [04:17] groux has joined the channel [04:20] Tim_Smart: isaacs: How long have you been trying out vim? [04:20] langworthy has joined the channel [04:20] isaacs: Tim_Smart: it's been my cli editor of choice for about 6 years, but i've only been forcing myself to use it full time for about 10 hours [04:21] Tim_Smart: Ah. I see. [04:21] Tim_Smart: I guess it has been my full time editor for a few months. [04:21] isaacs: my textmate setup is SOOO personalized, though [04:22] isaacs: this is pretty painful. [04:25] pquerna: so, day -0 of apachecon. great giants game, lots of texas fans, much joy. [04:25] modular: isaacs: thanks for those examples, really helped me. [04:25] isaacs: modular: np :) [04:25] Tim_Smart: My vim is reasonably personalized I guess. But I have been slowly been 'trimming the fat' on my config. [04:25] pquerna: in stuff in the morning tmorow, but will try to ship the http-streams set on monday afternoon. [04:25] isaacs: pquerna: so, they're 3:0 now? [04:26] pquerna: 3:1 [04:26] isaacs: ACTION is rooting for the giants so that the sportsballers don't come back to my bart stop [04:26] pquerna: hah [04:27] isaacs: my gf's family is rooting for the rangers so that they can come see the giants finish it (they have access to shared season tickets in sf) [04:30] jakehow has joined the channel [04:31] ryah_: i think they might be setting cars on fire in the mission [04:32] seen- has joined the channel [04:32] ryah_: Tim_Smart: segfault? [04:32] Tim_Smart: ryah_: Yeah. [04:33] ryah_: Tim_Smart: can you give me a bt? [04:33] ryah_: (or core dump) [04:34] JimBastard: uhh ohh, its nov 1 [04:34] JimBastard: deploy! deploy! deploy! go! [04:37] Tim_Smart: ryah_: https://gist.github.com/e1d79b8be111e735efea [04:38] Tim_Smart: (32 bit) [04:38] jgautier: hey isaacs fyi i got the latest code and its working [04:40] ryah_: Tim_Smart: hm [04:40] mtodd has joined the channel [04:40] ryah_: Tim_Smart: i think that's the same problem i'm getting on solaris now too [04:40] ryah_: some 32 bit thing.. [04:41] Tim_Smart: Probably just a bug in the build system stuff. [04:41] ryah_: yes [04:44] jgautier: hey isaacs i dont see any properties that would tell me a package is installed though [04:45] isaacs: jgautier: i thought the ls return data is a merge of the read-installed and registry data [04:45] isaacs: jgautier: so it should be something like { name: { version : { installed: true, ... }} [04:46] jgautier: ah ok so its nested inside the version? [04:46] isaacs: jgautier: yeah [04:46] jgautier: k let me try that [04:46] isaacs: jgautier: since you might have multiple versions of something installed [04:48] jgautier: yep thats it [04:48] jgautier: thanks [04:51] jgautier: so whats the best way to filter this stuff out you think? [04:54] jgautier: something like this could be cool [04:54] isaacs: jgautier: npm.commands.ls([], function (er, pkgs) { /* handle error */ var inst = {} ; Object.keys(pkgs).forEach(function (p) { Object.keys(pkgs[p]).forEach(function (v) { if (pkgs[p][v].installed) { (inst[p] = inst[p] || {})[v] = pkgs[p][v] } }) }) }) [04:54] jgautier: http://jlinq.hugoware.com/tryonline [04:54] isaacs: jgautier: that code has not been tested or parsed, so ymmv [04:54] jgautier: yeah gotchya [04:54] jgautier: was thinkign it would be cool to do something like that link [04:54] jgautier: probably a bit overboard for something like this though [04:54] isaacs: but right before the last }), inst should have just the installed packages. [04:55] isaacs: yeah, i'd like to make ls only call the cb with the packages that pass the filter. [04:55] isaacs: just haven't yet. [04:55] mbrochh has joined the channel [04:55] isaacs: needs a bit of refactoring to work properly. basically, just don't throw away the data object once it's stringified, and then filter both based on the string [04:56] jgautier: cool ill just roll with looping through tthem for now [04:56] isaacs: then you could just do npm.commands.ls(["installed", "yui3"], ...) even [04:56] isaacs: or ["installed", "latest"] [04:56] jgautier: yeah that sounds handy [04:59] SamNZ: How can I use child_process.spawn to run a process that takes a long time to run, without blocking the main process? [05:01] dgathright has joined the channel [05:03] ryah_: SamNZ: it doesnt block the main process [05:04] murphy has joined the channel [05:05] seen- has joined the channel [05:05] SamNZ: Hmm ok, must be something to do with how I've structured my server [05:06] dnolen has joined the channel [05:06] ceej: wow....http://somewebguy.wordpress.com/2010/02/14/jlinq-in-mongodb-oh-snap/ [05:06] mikeal1 has joined the channel [05:07] Aria has left the channel [05:09] MikhX has joined the channel [05:10] path[l] has joined the channel [05:13] devinus_ has joined the channel [05:21] chewbran1a has joined the channel [05:28] dgathright has joined the channel [05:30] unomi has joined the channel [05:34] gerad has joined the channel [05:36] sudoer has joined the channel [05:44] fangel has joined the channel [05:45] maxfell has joined the channel [05:48] sudoer has joined the channel [05:52] Nohryb has joined the channel [05:54] jrockjiggz has joined the channel [05:57] nico- has joined the channel [05:57] mtodd has joined the channel [05:58] MikhX_ has joined the channel [06:00] maxfell has joined the channel [06:09] ehaas has joined the channel [06:11] rcy has joined the channel [06:11] pydroid has joined the channel [06:17] pydroid has joined the channel [06:30] pydroid has joined the channel [06:31] quirkey has joined the channel [06:31] ajsie has joined the channel [06:31] mikeal has joined the channel [06:32] brianmario has joined the channel [06:34] nefD has joined the channel [06:35] ajsie: micheil: where is JimBastard? [06:35] ajsie: its nov 1st! [06:39] derferman has joined the channel [06:40] nXqd has joined the channel [06:40] nXqd: hello guys :) [06:42] nXqd: I'm new to nodejs world, a noob question for you : we use haml, ejs, . . . to generate html files ? Can we do load own html file like normal ? Which way is more efficiency :) . [06:45] jesusghostullah: nXqd: You can serve whatever you want, whether it be read from a text file or processed/generated using other tools. Static files of course require less thinking on the part of node, but it all depends on what you want out of it. [06:48] nXqd: jesusghostullah: do you have any article about loading static html file with expressjs ? or plain nodejs :) [06:51] SamuraiJack has joined the channel [06:52] hzin has joined the channel [06:52] nefD has joined the channel [06:55] Nohryb has joined the channel [06:56] mbrochh has joined the channel [07:00] entp has joined the channel [07:01] mraleph has joined the channel [07:02] blowery has joined the channel [07:02] ajsie: is there a way to run a script when installing a npm package? [07:05] fangel: ajsie: I believe there is the script-clause [07:05] fangel: http://github.com/isaacs/npm/blob/master/doc/scripts.md [07:09] sudoer has joined the channel [07:10] ph^ has joined the channel [07:12] ajsie: fangel: thx [07:12] fangel: np [07:13] SINPacifist has joined the channel [07:15] stoneg has joined the channel [07:17] stoneg has joined the channel [07:20] pydroid has joined the channel [07:22] jesusghostullah: nXqd: http://nodejs.org/api.html, http://github.com/ry/node/wiki/modules [07:23] justinf200 has joined the channel [07:27] pydroid has joined the channel [07:29] SubStack has joined the channel [07:31] muhqu has joined the channel [07:33] mikeal: what does the watchFile poll check for? [07:37] pydroid has joined the channel [07:38] femtoo has joined the channel [07:38] mattcodes has joined the channel [07:39] micheil: ajsie: jim is in NYA [07:39] micheil: *NYC [07:40] ajsie: Has to do with the launch today? [07:40] micheil: I dunno [07:40] micheil: what launch? [07:40] micheil: mikeal: [07:40] micheil: ? [07:41] mikeal: nodejitsu [07:41] micheil: mikeal: no, on watchFile, my bad there. [07:41] mikeal: mine seem to fire way too often [07:42] mikeal: i think they fire just when you create a new file handler [07:42] micheil: hmm.. [07:42] ajsie: yeah nodejitsu [07:42] ajsie: he promised it would launch today! =) [07:48] mikeal: dammit [07:49] mikeal: i really want readFile to take a file descriptor [07:53] Anti-X: i want you to take a file descriptor! [07:53] micheil: mikeal: why not use ReadStreams? [07:54] mikeal: ReadStream doesn't take an fd either :) [07:54] mikeal: for this I actually need to read the whole thing in to memory tho [07:54] micheil: does fs.open take an FD? [07:55] micheil: ah [07:55] mikeal: it gives one :) [07:56] micheil: C level blocks fs.open from taking anything other then a string [07:56] micheil: fs.read does take an FD [07:57] micheil: maybe with we destructure fs a little would work? [07:58] MikhX has joined the channel [07:58] micheil: eg, in fs.ReadStream, if path == string, call fs.open() first [07:58] micheil: else just listen / read it. [07:58] micheil: it's probably possible to do. [07:59] micheil: and as FD == v8:Integer, it should be fine. [07:59] micheil: actually. What stops you from sending the FD number to another server and calling fs.write or fs.read on it? [08:00] daglees has joined the channel [08:00] daglees has joined the channel [08:00] robmason has joined the channel [08:00] mikeal: if i'm sticking the contents of a file in to a buffer I want to use blksize and not size from stat right? [08:01] mif86 has joined the channel [08:02] micheil: hmm.. [08:02] micheil: currently it's done using a buffer array [08:02] micheil: Buffer[] [08:02] micheil: then at the end, it does copying across [08:02] jdalton has joined the channel [08:02] micheil: I'm thinking we also need a better way to join buffers. [08:02] jdalton has left the channel [08:02] micheil: or have flexible buffers [08:03] mopemope has joined the channel [08:04] indexzero has joined the channel [08:04] micheil: new GrowBuffer() and it allocates say, a blocksize of 128 bytes [08:04] micheil: or something [08:05] micheil: and it keeps a list of pointers to the different indexes in memory [08:06] micheil: maybe be possible by something like a FastBuffer [08:06] fangel has joined the channel [08:08] Anti-X has joined the channel [08:10] Druid_ has joined the channel [08:12] mraleph has joined the channel [08:13] aurynn has joined the channel [08:14] niko has joined the channel [08:17] V1 has joined the channel [08:17] hassox has joined the channel [08:18] TomY has joined the channel [08:19] hassox has joined the channel [08:19] masahiroh has joined the channel [08:19] Anti-X has joined the channel [08:21] fangel_ has joined the channel [08:21] quag has joined the channel [08:26] adambeynon has joined the channel [08:28] d0k has joined the channel [08:29] stephank has joined the channel [08:31] Athox has joined the channel [08:32] daglees has joined the channel [08:33] prettyrobots has joined the channel [08:34] ph^ has joined the channel [08:36] quag has joined the channel [08:50] mraleph has joined the channel [08:50] unomi has joined the channel [08:53] markwubben has joined the channel [08:53] JohnDav has joined the channel [08:53] kkaefer: when parsing js files with json definitions, can I always be sure in node/v8 that the order of the keys in an object literal is preserved? [08:54] fbits has joined the channel [08:54] kkaefer: it seems to at first glance [08:55] unomi has joined the channel [08:56] mraleph: kkaefer: not for numeric keys AFAIK [08:56] mbrochh has joined the channel [08:56] kkaefer: for string keys? [08:56] micheil: mraleph: just the person I wanted! [08:56] SamNZ has joined the channel [08:57] aubergine_ has joined the channel [08:57] mraleph: kkaefer: if they are not parsable as indexes [08:57] micheil: kkaefer: when parsing data like JSON, you never have any assurances on key order [08:57] micheil: (unless the structure of the data is an Array, but even then) [08:57] kkaefer: micheil: I understand that there is no general guarantee in JavaScript for that [08:57] mjr_: I thought the keys from Object.keys were supposed to come back in the order they were defined. [08:58] micheil: mraleph: on the v8 ml, I just noticed a thread about v8::Arguments, that's not related to the Flags, is it? [08:58] kkaefer: what I want to know is whether I can rely on plain .js files with modules.exports = {...} to return the keys in the order they were defined [08:58] mraleph: mjr_: i think ECMA-262 leaves that staff undefined, [08:58] micheil: mjr_: there's no guarentee [08:58] Athox: if it's an array the order is guaranteed [08:59] mraleph: micheil: unrelated. this CL is related to making JS->C++ calls faster. [08:59] Athox: at least through using indices [08:59] micheil: okay [08:59] micheil: thanks mraleph [08:59] micheil: mraleph: I'm probably going to talk with ryah_ when he's about as to whether we really want to clean up the arg parsing. [08:59] mraleph: micheil: ok [09:00] micheil: mraleph: because I'm thinking I'd be introducing to new methods to v8, v8::IsFlag(char*) [09:00] micheil: and v8::SetFlag(char*, char*) [09:00] micheil: or similar [09:00] micheil: mraleph: does that sound somewhat good? [09:00] tek has joined the channel [09:01] mraleph: micheil: I think there is no harm [09:01] mraleph: micheil: afk for 30m [09:01] micheil: it'd probably also make stuff a little bit cleaner in v8's flags itself, maybe. [09:02] Anti-X: wouldn't that make more sense to discuss on the v8 mailing list or whatever they use [09:03] javruben has joined the channel [09:06] ntelford has joined the channel [09:07] echosystm has joined the channel [09:08] echosystm: hi guys [09:08] mikew3c has joined the channel [09:09] echosystm: can anyone suggest some reading in regards to writing load-balanced apps on cloud infrastructure? [09:09] micheil: Anti-X: well, we need specific things in node, as to whether we want to spend / allocate time to doing certain tasks [09:09] javruben has joined the channel [09:10] micheil: echosystm: yeah, check out yahoo's blog and look up pgriess [09:10] micheil: or peter griess [09:11] echosystm: thanks micheil [09:13] unomi has joined the channel [09:15] echosystm: are there any cloud providers other than AWS worth looking into? [09:20] fbits has joined the channel [09:22] [[zzz]] has joined the channel [09:22] aubergine has joined the channel [09:25] mjr_: echosystm: Joyent is certainly worth looking into if you like node. [09:25] margle has joined the channel [09:26] [[zz]] has joined the channel [09:26] echosystm: cool, thanks for that :) [09:31] hzin_ has joined the channel [09:32] StanAngeloff has joined the channel [09:33] aubergine_ has joined the channel [09:36] hzin_ has joined the channel [09:39] agnat has joined the channel [09:39] hecticjeff has joined the channel [09:41] alexb_ has joined the channel [09:41] alexb_: What is the best way to make a script terminate itself and restart itself? [09:42] V1: probably just create a new child process and do a process.exit() after it [09:43] alexb_: Child processes don't die if the parent dies? [09:44] echosystm: i think hes saying the script that terminates should be a child [09:44] alexb_: Ok and have the parent be a shell [09:44] echosystm: ie. theres some parent that spawns new processes when one fails [09:48] micheil: alexb_: what sort of script? [09:48] micheil: because if it's for keeping a server up, you'd be doing it slightly wrong [09:49] alexb_: A daemon that computes a cache periodically, but it can be restarted np [09:49] alexb_: It has memory leaks and id rather kill it than fix the leaks [09:49] micheil: okay, if it's a daemon, use init.d and upstart / monit [09:50] micheil: also, it's better not to kill scripts and just fix memory leaks. [09:50] alexb_: I'd rather do that but in the short term I'll try these suggestions [09:51] markwubben has joined the channel [09:51] alexb_: I must have circular closures or something because Even when all the closures finish the memory is never gcd [09:53] hzin_ has joined the channel [09:53] micheil: uhh.. [09:53] unomi has joined the channel [09:53] micheil: alexb_: can you share your code some how? [09:53] alexb_: It's thousands of lines and not in a good shape to share atm :( [09:54] mikeal has joined the channel [09:56] hassox has joined the channel [09:57] ph^ has joined the channel [10:02] unomi has joined the channel [10:03] path[l] has joined the channel [10:03] hellp has joined the channel [10:04] omarkj has joined the channel [10:06] mAritz has joined the channel [10:12] xla has joined the channel [10:14] mytrile has joined the channel [10:15] aubergine has joined the channel [10:15] Tim_Smart has joined the channel [10:27] leeeb has joined the channel [10:31] ajsie: anyone that use couchdb here? [10:33] chapel: ajsie << a little, what? [10:33] ajsie: chapel: im using node/express and want to use couchdb .. i wonder how you talk to couchdb, with a library or are you using its Restful API directly? [10:36] Nohryb has joined the channel [10:36] sixtus42 has joined the channel [10:38] vileda has joined the channel [10:44] chapel: well I use http.client directly [10:44] chapel: to interact with couchdb [10:44] chapel: its pretty easy to use [10:44] chapel: though you can use node-couchdb [10:44] margle has joined the channel [10:45] kawaz_work has joined the channel [10:46] Tim_Smar1 has joined the channel [10:47] rikarends has joined the channel [10:48] JohnDav: what could cause high cpu usage on node [10:48] JohnDav: as the concurrent clients start crossing the 250 user limit, i start getting monit alerts of high cpu usage [10:48] JohnDav: > 70% [10:48] jankoprowski has joined the channel [10:48] jankoprowski: NodeJS is amazing [10:50] chapel: what are you using JohnDav ? [10:50] JohnDav: nodejs / socket.io [10:50] JohnDav: chapel: [10:50] rikarends: try profiling it [10:50] rikarends: i think v8 has profiling support, dont know if nodejs exports that [10:51] mopemope has left the channel [10:51] V1: JohnDav: You using crypto? [10:51] JohnDav: V1: nop [10:51] JohnDav: not using crypto [10:52] V1: rikarends: Node exposes the profiling [10:52] V1: JohnDav: Got any code we can look at? I'm running node / socket.io and have no issues with CPU usage, only memory leaks here and there [10:53] JohnDav: V1: I loop all clients and return a userlist of connected clients (client.connected == true) ... could that be causing a lot of cpu usage? [10:54] V1: Sure, it would add some some extra cpu usage but not 70% [10:54] jankoprowski has left the channel [10:54] JohnDav: yeah agreed [10:55] cefn has joined the channel [10:57] V1: Are you running over SSL? [10:58] dquestions has joined the channel [10:58] JohnDav: nope [10:58] cefn has left the channel [10:58] JohnDav: plain text chat [10:58] JohnDav: and it's not even the peak time [10:58] JohnDav: just 250 users connected [10:59] nolkyan has joined the channel [10:59] ctp has joined the channel [11:00] V1: That's just odd than, I'm currently running 640 connected users with 0.3 cpu [11:01] JohnDav: wow, that's quite good [11:01] JohnDav: what are your server specs? [11:01] JohnDav: im on EC 2 small instance [11:01] V1: I'm running on no.de servers [11:02] JohnDav: interesting [11:02] JohnDav: i have a feeling it may be the flood protection i implemented [11:03] V1: But than again, the CPU overhead you are experiencing might because you have allot of message traffic? [11:03] V1: Most of my connected only send about 1 / 5 events per connected session [11:03] JohnDav: http://gist.github.com/657988 [11:03] JohnDav: ah [11:03] JohnDav: my connected keep sending messages for ~ average half an hour [11:05] JohnDav: i think it was this flood protection code... just removed it and the load is down from 0.61 to 0.01 [11:05] JohnDav: and cpu on 0.3% [11:06] V1: Nice :) [11:07] JohnDav: so i guess flood protection will need an external bot [11:07] JohnDav: have you tried something like that? [11:08] aubergine has joined the channel [11:08] JohnDav: Joyent looks really good btw! [11:09] JohnDav: http://no.de I mean [11:09] mlangenberg: Anyone got some experience with Faye and SSL? [11:09] nXqd has left the channel [11:10] JohnDav: I've used Faye, but not over SSL [11:10] mlangenberg: Just noticed that long-polling transports is pretty unstable over SSL [11:10] mlangenberg: But I am not sure where to start debugging ... [11:10] mlangenberg: For instance, I could try to move the SSL part to NginX and proxy over plain HTTP to the Node server ... see how stable that is. [11:11] V1: SSL is pretty unstable in node anyways [11:11] mlangenberg: aah :( [11:11] V1: SSL eats CPU cycles for breakfast [11:11] mlangenberg: V1: I couldn't find any open Node issues about SSL. [11:11] mlangenberg: Oh .. I DID notice that. [11:12] mlangenberg: but there is no good front-end proxy if you want to do WebSockets ... [11:14] zorzar_ has joined the channel [11:14] mlangenberg: It would be great if I could use NginX for the SSL heavy lifting. [11:15] mlangenberg: And that would work for plain XHR ... but not for WebSocket stuff :( [11:15] shreekavi has joined the channel [11:15] pquerna: you could use orbited to bridge to node.js too. [11:15] pquerna: (it has decent enough ssl support) [11:16] saschagehlich has joined the channel [11:16] V1: JohnDav: I haven't implement any flood detection because I don't use socket.io for chat :) [11:17] JohnDav: V1: oh ok :) [11:17] dquestions has joined the channel [11:24] mlangenberg: So what is actually causing Node.js to be so flaky with regards to SSL? [11:25] rikarends: probably because async IO on SSL is a whole new realm of hacking [11:26] rikarends: i tried that once, it 'worked' but jeeeeeez [11:26] rikarends: essentially you get 2 state machines overlaying [11:26] rikarends: one for the SSL protocol and one for the basic async IO on TCP [11:26] rikarends: but dunno why it is exactly for nodejs, thats just my experience [11:27] ph^ has joined the channel [11:27] mlangenberg: Yeah, I see. [11:27] rikarends: depends also a bit on the lib you use. if you use openSSL as a lib async IO really was not designed for it so its scary as hell [11:28] rikarends: havent tried others [11:29] sixtus42: anybody tried implementing a dbus interface for node yet? [11:29] mlangenberg: Funny thing is that I spend more then just a few days on my Node.JS powered backend ... and now I can't use it in production because it is missing reliable SSL support. [11:29] rikarends: why dont you put ngingx with ssl in front of it [11:29] rikarends: problem gone [11:29] mlangenberg: NginX is limited to HTTP/1.0 [11:29] pquerna: mlangenberg: there is a branch to test fixing it. [11:30] pquerna: mlangenberg: http://github.com/pquerna/node/tree/http-streams [11:32] mlangenberg: rikarends: I will try NginX ... but I am afraid that it will choke on WebSocket connections. [11:32] mr_daniel has joined the channel [11:32] rikarends: yeah havent tried websockets through nginx [11:33] mlangenberg: pquerna: are you working on that branch? [11:34] pquerna: mlangenberg: yes [11:34] rikarends: apparently HA Proxy is better [11:34] pquerna: mlangenberg: should get it proposed to merge today [11:34] rikarends: ah right it doesnt do SSL [11:35] mlangenberg: rikarends: HAProxy cannot do SSL? [11:35] V1: nginx will eat your websockets [11:36] rikarends: apparently you can use stunnel in combination with ha proxy [11:36] rikarends: you might even get stunnel to do ssl for node in a stable way [11:37] rikarends: http://www.stunnel.org/examples/https_windows.html [11:37] rikarends: wrong OS but right type of problem solved [11:37] xla has joined the channel [11:38] rikarends: go try it [11:38] rikarends: stunnel can map an ssl port to node [11:39] rikarends: see if it works [11:40] ivan has joined the channel [11:41] mlangenberg: rikarends: thanks ... I will try it and see how it will do with both WebSocket and longpoll. [11:41] mlangenberg: First lunch :) [11:41] rikarends: i think stunnel should do that fine since its just the ssl port [11:42] rikarends: it doesnt actually do anything to the protocol or data [11:43] Utkarsh has joined the channel [11:48] rsms has joined the channel [11:56] noahcampbell has joined the channel [12:04] aliem has joined the channel [12:12] margle has joined the channel [12:16] v8bot has joined the channel [12:21] omarkj has joined the channel [12:28] okuryu has joined the channel [12:28] stepheneb has joined the channel [12:28] alxc1 has joined the channel [12:32] aubergine has joined the channel [12:34] ajsie: how do i make a https request with node.js? [12:36] ajsie: http://pastie.org/1263839 doesnt work [12:36] mlangenberg: ajsie: http.createClient(port, host, true) [12:36] StanAngeloff has joined the channel [12:36] robinduckett: http.createClient(port, host='localhost', secure=false, [credentials]) [12:36] maxfell has joined the channel [12:37] robinduckett: so you need to get your private key certificate and list of CA certs for your credentials option [12:37] aubergine has joined the channel [12:38] robinduckett: crypto.createCredentials({key: fs.readFileSync('privatekey.pem').toString(), cert: fs.readFileSync('cert.pem').toString()}); [12:38] robinduckett: or so [12:39] robinduckett: use the openssl binary to create private keys and certificates [12:39] robinduckett: voila, node un ssl [12:39] eee_c has joined the channel [12:48] Gruni has joined the channel [12:52] dgathright has joined the channel [12:58] javruben2 has joined the channel [12:58] femtoo has joined the channel [13:01] javruben has joined the channel [13:01] indexzero has joined the channel [13:03] dgathright has joined the channel [13:03] davidsklar has joined the channel [13:05] javruben2 has joined the channel [13:06] aubergine has joined the channel [13:11] javruben has joined the channel [13:12] margle has left the channel [13:13] TomY has joined the channel [13:17] dgathright_ has joined the channel [13:21] fermion has joined the channel [13:22] jherdman has joined the channel [13:25] herbySk has joined the channel [13:27] hecticjeff has joined the channel [13:27] res99 has joined the channel [13:27] nerdEd has joined the channel [13:31] ben_alman has joined the channel [13:33] shreekavi has left the channel [13:36] bradleymeck has joined the channel [13:38] dgathright has joined the channel [13:38] ooooPsss has joined the channel [13:46] ceej has joined the channel [13:46] mtodd has joined the channel [13:47] ceej has joined the channel [13:54] jvolkman has joined the channel [13:57] kennon has joined the channel [14:01] emmanueloga has joined the channel [14:01] ntelford has joined the channel [14:02] unomi has joined the channel [14:06] muhqu has joined the channel [14:07] MattJ has joined the channel [14:08] margle has joined the channel [14:09] confoocious has joined the channel [14:10] rsms has joined the channel [14:10] garrensmith has joined the channel [14:10] heavysixer has joined the channel [14:11] diggersf has joined the channel [14:12] mytrile has joined the channel [14:12] Anti-X has joined the channel [14:13] willwhite has joined the channel [14:16] Eber has joined the channel [14:17] Wizek has joined the channel [14:18] Wizek: Hi! How can I make node-inspector to insert a breakpoint on the very first line of my script so I can start debugging from there? There was a --brk-point (or simmilar) command before, but it doesn't seem to work now. [14:18] derencius has joined the channel [14:19] jtsnow has joined the channel [14:21] TomsB has joined the channel [14:21] davidwalsh has joined the channel [14:22] aheckmann has joined the channel [14:22] figital has joined the channel [14:22] Wizek: Does anyone know Node-Inspector? [14:23] rikarends: node what? [14:23] rikarends: :) [14:24] rikarends: i think west coast might not be up yet so probably later [14:25] garrensmith: what is the difference between __proto__ and prototype? [14:25] sivy has joined the channel [14:25] SubStack: ACTION is still up on the west coast [14:25] fangel: __proto__ is what prototype gets loaded into after an object is created [14:26] margle: fangel: could you clarify that for me a bit... after an object is created? prototype == __proto__ ? [14:27] fangel: when you do var foo = new Obj() - Obj.prototype get's loaded into foo.__proto__ [14:27] margle: fangel: ok. [14:28] softdrink has joined the channel [14:30] garrensmith: fangel: thank that makes sense [14:30] garrensmith: fangel: if you want to inherit from some thing do you set __proto__ or prototype? [14:30] fangel: and when you in do foo.method() it searches in foo.__proto__.method(), foo.__proto__.__proto__.method() etc.. [14:30] fangel: you set prototype.. [14:31] garrensmith: if I do Object.create() to create my object do I do the same? [14:31] ajpiano has joined the channel [14:31] fangel: like Child.prototype = new Parent(); iirc - I might be wrong.. but since you're in #node.js, you should use Node's sys.inherit(Child, Parent); [14:32] garrensmith: I think sys.inherit might be depreciated [14:32] fangel: well, in 0.3 sys in renamed to util - so util.inherit [14:36] dshaw has joined the channel [14:37] fangel: see the code for util.inherit if you will http://github.com/ry/node/blob/master/lib/util.js#L382-390 [14:38] wattz has joined the channel [14:38] mbrochh has joined the channel [14:38] mbrochh has joined the channel [14:38] wattz: Good morning [14:39] rauchg_ has joined the channel [14:39] johngbrooks has joined the channel [14:40] sth: Wess! [14:40] sth: Hi wattz [14:41] wattz: Simon! [14:41] wattz: ;D [14:41] sth: How's it going? [14:41] wattz: going good, you? [14:41] margle: fangel: is there a resource that you would recommend to gather some of this in depth information? [14:41] garrensmith: fangel: great thanks [14:41] sth: Fine here, I just moved back to the UK [14:41] wattz: good! [14:41] sth: Are Lacey and the kids fine? [14:42] wattz: awesome as always [14:42] wattz: busy [14:42] wattz: 3 of them makes it crazy fun too [14:42] wattz: 3 boys, lol [14:42] sth: :) [14:42] wattz: Trying to force Mysql into async submission [14:43] wattz: so hackish [14:43] sth: eek [14:43] mlangenberg: rikarends: Stunnel looks to be a good fit for adding SSL to WebSocket / Node.js [14:44] wattz: sth: getting the new version of Cargo together [14:44] sth: wattz: there's already like 5 mysql packages for node [14:44] sth: Cargo? [14:44] fangel: margle: I found these kinda cool https://developer.mozilla.org/en/JavaScript/Guide/Details_of_the_Object_Model + https://developer.mozilla.org/en/JavaScript/Guide/Inheritance_Revisited - just remember a few of the things are Mozilla implementation specific [14:44] wattz: sth: i wrote it a while back before the HUGE boom [14:44] johngbrooks has joined the channel [14:44] wattz: current state, it's not Async [14:44] margle: fangel: thanks [14:44] wattz: http://github.com/wess/Cargo [14:45] mlangenberg: Only problem will be WebSocket handshakes in server libraries, like Faye or Socket.IO. [14:45] sth: I see [14:45] maxfell has joined the channel [14:46] rikarends: mlangenberg: good :) spread the word then seems to be a common problem now [14:46] rikarends: mlangenberg: i just googled it [14:46] rcy has joined the channel [14:46] rikarends: mlangenberg: what is the problem with handshakes? [14:46] sth: wattz: Look at the EventEmitter lib I guess :) [14:46] mlangenberg: We need to patch Stunnel to add a X-Forwarded-Proto header to detect if the originating request is wss / ws. [14:47] rikarends: mlangenberg: i think i saw that patch already [14:48] mlangenberg: rikarends: http://github.com/jcoglan/faye/blob/master/javascript/util/node/web_socket.js#L31 [14:48] rikarends: http://www.onsight.com/faq/stunnel/stunnel-faq-5.html [14:48] rikarends: check that -T transparent proxy mode [14:49] cognominal has joined the channel [14:49] mlangenberg: request.socket.secure will be false (since it's the non-secure request between Stunnel and Node). [14:49] rikarends: right so you will need to figure out if it is secure [14:50] mlangenberg: Apache, NginX or HAProxy usally add a X-Forwarded-Proto .. [14:50] rsms has joined the channel [14:50] rikarends: yeah stunnel knows nothing of http [14:51] xla has joined the channel [14:51] rikarends: http://haproxy.1wt.eu/download/patches/stunnel-4.15-xforwarded-for.diff [14:51] rikarends: that should do it [14:51] davidwalsh has joined the channel [14:51] podman has joined the channel [14:51] podman has left the channel [14:54] jamund has joined the channel [14:54] mlangenberg: rikarends: AFAIK that only adds the original ip, right? [14:54] rikarends: well yes [14:54] rikarends: ah you need the proto too [14:54] pengwynn has joined the channel [14:55] rikarends: and you would also need to be able to trust that exact header [14:56] mbrochh has joined the channel [14:57] rikarends: i dont have an immediate solution to that [14:57] mlangenberg: rikarends: right, so for now I will just hardcode Faye to return 'wss:'. [14:57] rikarends: you could say 'we only do ssl' then it'd be safe for this [14:58] rikarends: or use a domain name in it [14:58] rikarends: secure.something.bla [14:58] micheil: ? [14:58] mlangenberg: Well I only do SSL ... but Faye is a nice generic library. [14:58] rikarends: k [14:58] micheil: you know node.js ssl is changing? [14:58] rikarends: yeah i mean node.js should do it [14:59] micheil: http://github.com/pquerna/node [14:59] rikarends: i was just trying to help you find an intermediate solution that wont crash on you [14:59] micheil: http://github.com/pquerna/node/tree/http-streams/ [14:59] micheil: specifically [15:00] micheil: that should be landing in the next few months. [15:00] micheil: because iirc, there's an open call for testers on it at the moment [15:01] mlangenberg: I would like to find an intermediate stable solution that works today. [15:01] rikarends: btw haproxy+stunnel will allow you to set headers and stuff so you dont have to patch it yourself [15:01] rikarends: but thats 'another' app inbetween [15:01] micheil: mlangenberg: in which case, haproxy + stunnel [15:01] mlangenberg: haproxy cannot do WebSocket [15:02] micheil: it can. [15:02] micheil: talk to @pusherapp [15:02] mlangenberg: :O [15:02] micheil: they have done it. [15:02] micheil: I don't know the details, but they have done it., [15:05] matt_c has joined the channel [15:06] sonnym has joined the channel [15:07] aubergine_ has joined the channel [15:09] wattz: anyone work with xmpp.js for node? [15:10] wattz: curious as to how stable it is [15:10] MattJ: I wrote it :) [15:10] tj has joined the channel [15:10] wattz: lol [15:10] wattz: so how stable is it :D [15:10] MattJ: Someone wrote a pubsub component using it: http://codingteam.net/project/psgxs [15:10] wattz: Wondering if i want to try node/javascript for this platform [15:10] wattz: or python [15:11] wattz: need to push it to a server process [15:11] MattJ: My first choice would be Lua, second Javascript :) [15:12] bentruyman has joined the channel [15:12] scnd has joined the channel [15:13] mtodd has joined the channel [15:16] mraleph: MattJ: *rofl* [15:16] bradleymeck has joined the channel [15:18] MattJ: ACTION picks up mraleph from the floor [15:18] wattz: brush his shoulders off? [15:18] boaz has joined the channel [15:19] qFox has joined the channel [15:21] seen- has joined the channel [15:21] mraleph: I am just surprised... a lot of Lua programmers seem to be using node.js :-) [15:22] wattz: I have never touched Lua, suppose i should take a look one day [15:22] micheil: Lua.. looks nice as a toy / experimental language [15:22] micheil: has some interesting concepts and ideas, but seriously JS ftw. [15:23] bruse: lua is fun [15:23] faust45 has joined the channel [15:23] garrensmith: micheil: they use lua a lot for scripting in game engines so maybe not a complete toy. [15:23] micheil: but I don't know if I'd want to write something like a web service in lua [15:24] garrensmith: micheil: a lot of the games running on the iphone use lua as the scripting engine [15:24] micheil: okay [15:24] micheil: well, yeah, I don't know if it'd be a good thing to write a web service in [15:24] ajsie: someone that could help me connect to my cloudant couchdb? [15:24] micheil: I've never used it, I've just briefly looked at it. [15:24] garrensmith: micheil: same here [15:25] tj: micheil: http://www.stonetrip.com/developer/ [15:25] tj: is lua [15:25] rmetzler has joined the channel [15:25] tj: http://stonetrip.com/ [15:25] tj: sorry [15:25] micheil: ajsie: mikeal if he was about. [15:25] softdrink has joined the channel [15:25] kkaefer: pquerna: would appreciate it if you can give your 2 cents on http://github.com/ry/node/pull/383 [15:26] ajsie: what doy ou mean with was about? [15:26] ajsie: with curl i just do: "curl https://ajsie:password@ajsie.cloudant.com/_all_dbs" [15:26] micheil: mikeal isn't about. [15:27] micheil: he writes a couchdb library [15:27] ajsie: i cant get it to work in node.js with HTTP [15:27] oal has joined the channel [15:28] ajsie: http://pastie.org/1264179 gives me {"error":"unauthorized","reason":"_reader access is required for this request"} [15:28] ajsie: but i used the same password [15:31] aubergine has joined the channel [15:31] boaz_ has joined the channel [15:32] rauchg_ has joined the channel [15:32] CIA-94: node: 03Ryan Dahl 07dumper * r75db9e6 10/ (Makefile src/node_io_watcher.cc): ... - http://bit.ly/bKrE8k [15:32] CIA-94: node: 03Chandra Sekar S 07master * r2b08bac 10/ (lib/fs.js test/simple/test-fs-read-stream.js): Removed range read optimization as it doesn't work with libeio. - http://bit.ly/c7cBR4 [15:32] CIA-94: node: 03Ryan Dahl 07dumper * rd75cc73 10/ (test/fixtures/dumper2.js test/pummel/test-dumper2.js): ... - http://bit.ly/9mVaH3 [15:33] stepheneb has joined the channel [15:33] ajsie: anyone: http://stackoverflow.com/questions/4070331/connect-to-cloudant-couchdb-with-node-js [15:34] sixtus42: ajsie: you don't get the user:pwd@ syntax for free. you have to add it manually to the header [15:34] daniellindsley has joined the channel [15:35] sixtus42: ajsie: http://en.wikipedia.org/wiki/Basic_access_authentication [15:40] EyePulp has joined the channel [15:41] mraleph: I like lua... but recently I started to find it a bit boilerplate-ish... no enough sweet sugar (e.g. pattern matching, short lambda syntax, difference between .-calls and :-calls is booooring) [15:41] jbenesch has joined the channel [15:43] jakehow has joined the channel [15:44] jbenesch has joined the channel [15:45] entp has joined the channel [15:46] jpld has joined the channel [15:46] jacobolus has joined the channel [15:47] elliottkember_ has joined the channel [15:47] elliottkember_ has left the channel [15:47] elliottkember_ has joined the channel [15:47] elliottkember_ has left the channel [15:50] ajsie: sixtus42: dont get it .. why does the curl version work? [15:51] bradleymeck: mraleph well i think lua is more meant to allow easy script embedding than heavy duty stuff [15:51] stepheneb has joined the channel [15:51] sixtus42: ajsie: because curl takes the URI part and does header encoding for you. Node doesn't. [15:52] ryanfitz has joined the channel [15:52] ajsie: sixtus42: so i have to encode it with javascript to base64 encryption and provide it in the header? [15:52] sixtus42: ajsie: yes [15:52] ajsie: how do i encrypt 64base? [15:53] ajsie: and why do a 64base encryption when anyone can decrypt it? [15:53] bradleymeck: (new Buffer("test","utf8")).toString("base64") [15:53] bradleymeck: because it is simple [15:53] bradleymeck: not secure [15:53] gkatsev: 256bit AES with a 4096bit key ftw! [15:55] sixtus42: ajsie: because that's why (ok not only why) you want to use ssl [15:55] gkatsev: also, firesheep ftw [15:55] davidsklar has joined the channel [15:56] dmcquay has joined the channel [15:56] davidsklar has joined the channel [15:59] ajsie: sixtus42: double encryption [15:59] meandi has joined the channel [15:59] sprout has joined the channel [16:00] sixtus42: ajsie: base64 is not encryption, hard pressed to even call it obfuscation [16:00] springmeyer has joined the channel [16:01] mlangenberg: Auch "Error: EMFILE, Too many open files" [16:02] mlangenberg: I'm probably not freeing up my resources [16:02] ajsie: sixtus42: then what is it? [16:02] ajsie: and what is it purpose [16:02] ajsie: really dont get it [16:03] mlangenberg: When I do 'http.createClient' ... should I free up that client when I am done? [16:04] muk_mb has joined the channel [16:04] wink_: ajsie: encoding [16:05] ajsie: wink_: but i can decode it using the same encoded string [16:05] ajsie: so what is the purpose? [16:05] kkaefer: tj: moving .translatePlural into .translate would mean making functions for every string if we want to do it properly [16:05] wink_: the purpose is encoding, not hiding information [16:05] kkaefer: is that what you're imagining? [16:06] wink_: base64 has nothing to do with keeping information private, unless somebody screwed up [16:06] hecticjeff has joined the channel [16:06] tj: kkaefer: nah im sure we can get around that [16:06] tj: just check if any of the substitutions are not just simple tokens [16:06] kkaefer: yeah, but we'd have to do that every time a string is translated [16:07] kkaefer: anyway, I don't think the main use of the translate function is directly via function calls [16:08] kkaefer: I think integrating l10n into template systems like jade is the better way to go [16:08] kkaefer: you'd just write the template in english as usual [16:08] kkaefer: and add translation files for each language [16:08] hellp has joined the channel [16:08] kkaefer: jade would create a compiled template for each language [16:08] tj: yeah it might make more sense to do it at the express view level [16:08] tj: but i would still like this functionality in lingo [16:09] tj: when i have some time i will look into it, im sure we can do it with translate() [16:09] yhahn has joined the channel [16:09] kkaefer: we can, but I'm a little concerned about adding too much overhead for a simple string translation [16:09] dmcquay has joined the channel [16:10] wink_: ajsie: this blog may be able to explain it more concisely: http://danielmiessler.com/study/encoding_vs_encryption/ [16:10] ajsie: thanks [16:12] path[l] has joined the channel [16:14] bentruyman has joined the channel [16:14] muhqu_ has joined the channel [16:15] stephank: tj: I decided to cheat and bind libyaml: http://github.com/stephank/yaml.node [16:15] tj: stephank: haha sweet :) [16:15] ajsie: wink_: now i get it =) thanks [16:20] unomi has joined the channel [16:21] entp has joined the channel [16:22] xicubed has joined the channel [16:22] cefn has joined the channel [16:22] cefn has left the channel [16:22] amerine has joined the channel [16:22] kevwil has joined the channel [16:24] Eber: tj: any hints when mongoose 1.0 will get stable? [16:24] tj: Eber: this week-ish id imagine [16:25] cardona507 has joined the channel [16:25] Eber: tj: really? that is great news :) thanks! [16:26] brianmario has joined the channel [16:26] sixtus421 has joined the channel [16:28] bpot has joined the channel [16:29] robmason has joined the channel [16:29] Nohryb has joined the channel [16:29] bartt has joined the channel [16:31] yhahn: tj: are you holowaychuk [16:32] tj: yup [16:32] mtodd has joined the channel [16:32] tj: shorter nick :D [16:32] tj: haha [16:32] yhahn: : ) are there any specifics for compiling binaries for nodes ? [16:32] yhahn: (your nodes repo) [16:33] tj: not really, id like to get us away from using the repo at all but we need joyent to expose their CI server bins [16:33] tj: eventually [16:34] mtodd has joined the channel [16:35] yhahn: tj: i see, thanks [16:38] aconbere has joined the channel [16:40] Aria has joined the channel [16:41] noahcampbell has joined the channel [16:42] sprout has joined the channel [16:43] sprout has joined the channel [16:46] ajsie: isnt there an http auth library for node.js? [16:47] ajsie: or how do you usually do http basic auth? [16:48] bradleymeck: base encode your username/password put it into the header [16:49] bradleymeck: connect-auth has a lot of stuff though [16:49] sth: the browser will send it as Auth: base64(:) [16:49] meandi2 has joined the channel [16:49] sth: Authorization: Basic [16:49] sth: instead of just Auth: [16:50] pharkmillups has joined the channel [16:51] stephank has joined the channel [16:52] bartt has joined the channel [16:53] ajsie: bradleymeck: where can i find connect-auth [16:53] bradleymeck: github [16:53] mif86 has joined the channel [16:54] path[l] has joined the channel [16:56] siculars has joined the channel [16:56] nrub has joined the channel [16:56] c4milo has joined the channel [16:58] c4milo has joined the channel [17:04] Anti-X: y helo thar [17:05] robinduckett: yo [17:05] robinduckett: I'm writing my portfolio gallery with Connect :D [17:07] technoweenie has joined the channel [17:08] fangel has joined the channel [17:09] bnoordhuis has joined the channel [17:09] davidascher has joined the channel [17:10] softdrink has joined the channel [17:10] bpot has joined the channel [17:11] Nohryb has joined the channel [17:11] JohnDav: quite often, my server gets stuck on 100% CPU usage [17:12] deepthawtz has joined the channel [17:12] JohnDav: any idea what could be causing that? [17:12] fangel: which process is responsible for the cpu usage? [17:12] JohnDav: node [17:13] JohnDav: its my node process [17:13] fangel: do you have a liking for infinite loops? :) [17:13] unomi has joined the channel [17:13] Wizek: What couses this error: [17:13] Wizek: 1 [main] node 2708 exception::handle: Error while dumping state (probably [17:13] Wizek: corrupted stack) [17:13] Wizek: Segmentation fault (core dumped) [17:13] Wizek: ? [17:14] JohnDav: fangel: oh... hmm [17:14] rbranson: JohnDav: what version of node? [17:14] devinus_ has joined the channel [17:14] JohnDav: rbranson: [17:14] JohnDav: 0.2.4 [17:14] JohnDav: and socket.io [17:14] rbranson: bums [17:14] rbranson: I would try upgrading socket.io to HEAD [17:14] benburkert has joined the channel [17:15] rbranson: does this happen immediately or after some time? [17:15] JohnDav: after some time [17:15] JohnDav: infact after quite some time [17:15] rbranson: ah, the best kind [17:15] rbranson: is it happening right now? [17:15] JohnDav: an hour or two [17:16] JohnDav: yes [17:16] JohnDav: stuck on 100% [17:16] JohnDav: for last 5 mins [17:16] rbranson: ok do a netstat -an [17:16] rbranson: and see there are a bunch of connections to the port it's listening on [17:17] JohnDav: yes there are [17:17] JohnDav: on wait [17:17] rbranson: nice [17:17] aubergine has joined the channel [17:17] rbranson: definitely upgrade to socket.io HEAD then [17:17] Yuffster has joined the channel [17:18] rbranson: are you sure it's running node 0.2.4? [17:18] stephank: Wizek: not sure, but can you reproduce it? [17:18] rbranson: there was a bug in 0.2.3 and before that caused this very problem [17:18] JohnDav: ubuntu@ip-10-122-54-147:~$ sudo node -v v0.2.4 [17:18] JohnDav: its 0.2.4 [17:18] rbranson: that's the only node you have installed? [17:18] JohnDav: yes [17:18] rbranson: hmm [17:18] JohnDav: ? [17:18] JohnDav: should i upgrade node to 0.3.0 [17:18] rbranson: no [17:18] rbranson: I would try socket.io HEAD first [17:19] JohnDav: im on socket.io master [17:19] rbranson: nice [17:19] rbranson: are these websocket? [17:19] stephank: Wizek: You might also get a slightly better clue by using gdb. It looks like it dumped a core file, so you try something like `gdb /usr/local/bin/node ./core` and then `bt` on the gdb prompt. [17:19] JohnDav: how do i get to know that [17:19] rbranson: i suppose it shouldn't matter [17:19] rbranson: hmm [17:20] micheil: what's the problem? [17:20] JohnDav: in the netstat... alot are CLOSE_WAIT and TIME_WAIT [17:20] rbranson: yeah [17:20] rbranson: see [17:20] micheil: are socket.io connections CLOSE_WAIT? [17:20] micheil: known issue [17:20] rbranson: socket.io has this bug where it wasn't properly calling end() on connections [17:20] micheil: should be fixed soon. [17:20] rbranson: which is retarded [17:20] rbranson: it's an easy fix too [17:20] micheil: I was working with rauchg last night to try and fix it. [17:20] rbranson: I love socket.io though [17:20] JohnDav: ah [17:20] JohnDav: i love it too [17:20] micheil: yeah [17:20] rbranson: so hope nobody takes that too offensively :D [17:20] JohnDav: specially the transports [17:20] micheil: so, try on HEAD [17:21] rbranson: he's got HEAD apparently [17:21] micheil: it will hopefully be fixed [17:21] JohnDav: micheil im on HEAD [17:21] micheil: okay [17:21] rbranson: are you on socket.io-node HEAD or socket.io HEAD? [17:21] micheil: well, when socket.io uses node-websocket-server, it'll be fixed [17:21] muk_mb has joined the channel [17:21] pandark_ has joined the channel [17:21] JohnDav: thats great [17:21] JohnDav: ? [17:22] JohnDav: so this is what may be causing the 100% CPU usage [17:22] micheil: JohnDav: if rauchg is about, I'll check with him. [17:22] langworthy has joined the channel [17:22] JohnDav: thanks [17:22] micheil: which he isn't. [17:22] micheil: >_> [17:22] JohnDav: micheil: k [17:22] micheil: um, anyway. [17:22] rbranson: it looks like HEAD has the disconnect code [17:22] rbranson: if (this.connection){ [17:22] rbranson: this.connection.end(); [17:22] rbranson: this.connection.destroy(); [17:22] rbranson: this.connection = null; [17:22] rbranson: } [17:23] unomi has joined the channel [17:23] rbranson: JohnDav: socket.io and socket.io-node are 2 different repos, so just make sure you're on socket.io-node HEAD [17:23] rbranson: the bug is in socket.io-node [17:24] adambeynon has joined the channel [17:24] JohnDav: yes rbranson im on both HEAD [17:24] rbranson: hmm [17:24] rbranson: :/ [17:24] JohnDav: just tried a pull again [17:24] peutetre has joined the channel [17:24] rbranson: you might also try setting your disconnectTimeout shorter [17:24] [[zz]] has joined the channel [17:25] JohnDav: i often get an error [17:25] JohnDav: this.connection is undefined [17:25] bnoordhuis: JohnDav: are you using ssl? [17:25] rbranson: nice [17:25] JohnDav: and called end of null [17:25] JohnDav: bnoordhuis: no [17:25] bnoordhuis: then that isn't the problem :) [17:25] rbranson: uh? [17:25] bnoordhuis: ssl support has a few quirks [17:25] rbranson: he said he's not using ssl [17:26] rbranson: oh [17:26] rbranson: early :/ [17:26] bnoordhuis: :) [17:26] JohnDav: im not using ssl [17:27] jameshome has joined the channel [17:27] rbranson: JohnDav: how much volume are you getting? [17:28] JohnDav: 50k users a day [17:28] JohnDav: ~ million monthly [17:28] JohnDav: and ~ 1000 connected at a time [17:28] rbranson: micheil: I'm fearing that he's not running into the websocket bug, that these are regular HTTP or Flashsocket clients and HEAD still has problems [17:28] rbranson: ok so non-trivial volume [17:29] bnoordhuis: have you tried tracing the process with gdb or gprof? [17:29] bnoordhuis: it'd be interesting to see where the cpu cycles are spent [17:29] unomi has joined the channel [17:30] JohnDav: let me try [17:30] micheil: JohnDav: I'm working with rauchg (when I get the chance) to allow socket.io to better handle connections and websockets [17:30] JohnDav: micheil: that's great, thanks =) [17:30] JohnDav: i cant wait till these technologies get stable [17:30] micheil: yeah [17:30] JohnDav: love node, so better than using erlang [17:30] JohnDav: lol [17:31] micheil: JohnDav: give me a few months and I might have a prototype / paper out on massively scaling node. [17:31] micheil: I have a heap of ideas on how to. [17:31] JohnDav: that's great [17:31] JohnDav: good luck! [17:32] jesusabdullah: That's a long time! [17:32] rbranson: that is like 3 centuries in internets time [17:32] robinduckett: guys [17:32] derferman has joined the channel [17:32] robinduckett: Black or white for my CV background? [17:33] robinduckett: color [17:33] rbranson: white [17:33] rbranson: people will print it out [17:33] robinduckett: hmm [17:33] micheil: rbranson: it's purely because that's when I'll have funding to do it. [17:33] rbranson: micheil: funding schmunding ;) [17:33] rauchg_ has joined the channel [17:33] robinduckett: rbranson: it's a web page, perhaps a white background for @print? [17:34] micheil: rbranson: it's a big issue for the time input that this research will take. [17:34] micheil: robinduckett: white for résumés always looks better [17:34] robinduckett: micheil: D: [17:34] robinduckett: fine [17:34] micheil: robinduckett: plus a nice combination of serif and san-serif [17:34] robinduckett: but my portfolio has a black background [17:34] rbranson: micheil: we need it, so fire away :P [17:34] jesusabdullah: Serifs tend to work really well in the print world [17:34] robinduckett: with #333 backgrounds for the syntax highlighted code [17:35] robinduckett: serifs for the actual text or the title text? [17:35] jesusabdullah: actual text [17:35] micheil: rbranson: I believe I know how it'll work. I just need to work out the very lowlevel details [17:35] derferman has left the channel [17:35] jesusabdullah: You get more leeway for other things imo, but in print serifs are supposed to be easier to read [17:35] jesusabdullah: also, black on white for print [17:35] micheil: but it'll be no different really then using the current EventEmitters [17:35] rbranson: micheil: are you talking about actually horizontally scaling node? [17:35] micheil: yes [17:35] rbranson: like across boxen? [17:35] micheil: yes [17:35] rbranson: like teracotta? [17:35] micheil: not sure [17:35] rbranson: or MPI? [17:36] micheil: not sure [17:36] jesusabdullah: micheil: Do you have opinions on the use of dnode for such a thing? [17:36] micheil: what are teracotta and MPI? [17:36] rbranson: I've frequently fantasized about building a terracotta for node.js [17:36] jesusabdullah: MPI is an old-skool message passing system [17:36] micheil: jesusabdullah: dnode is awesome. But I dislike the implementation. [17:36] bnoordhuis: rbranson: how would you go about it? [17:36] jesusabdullah: stands for Message Passing Interface [17:36] jesusabdullah: micheil: Tell me more? [17:36] rbranson: terracotta is a technology that allows JVM objects to be shared across different VM instances over a network connection [17:36] bnoordhuis: terracotta does most of its magic through bytecode instrumentation [17:36] micheil: later. [17:36] jesusabdullah: A'ight [17:36] hellp has joined the channel [17:36] micheil: I need to get to making a new release of node-websocket-server [17:37] jesusabdullah: tssch >:P [17:37] rbranson: bnoordhuis: it would be a big pile of hacks for sure [17:37] bnoordhuis: yeah [17:37] bnoordhuis: trying to think of a feasible approach [17:37] rbranson: terracotta is just a very mature pile of hacks though, honestly [17:37] danielrmz has joined the channel [17:37] vnguyen has joined the channel [17:37] bnoordhuis: :) [17:38] jesusabdullah: rbranson: You have an opinion on zmq? [17:38] rbranson: as far as? [17:38] micheil: you know what? [17:38] bnoordhuis: i suppose it'd be possible with a bit of c++ assistance [17:38] dmcquay has joined the channel [17:38] micheil: Buffer's are never cleared in node/. [17:38] rbranson: bnoordhuis: of course... [17:38] micheil: I think [17:38] olivvv_ has joined the channel [17:39] danielrmz has joined the channel [17:39] micheil: ryah_: would it be wise to have a Buffer.destroy() which dallocs the memory space? [17:39] jesusabdullah: rbranson: You mentioned MPI, so I guess I was wondering if you'd used it, and if so, how you thought it compared to MPI [17:39] bnoordhuis: maybe not fully though [17:39] bnoordhuis: functions are first-class citizens in js [17:39] bnoordhuis: you can't move those across without taking their entire context with them [17:40] jesusabdullah: across what? [17:40] olivvv_: hi.http://gyazo.com/c4c6958b239de030c7cb3a132062a93b.png does that mean that python isnt properly installed ? [17:40] rbranson: jesusabdullah: MPI as a package is clearly designed for unrealistic research applications where you've got low-latency, very reliable network links and no thought of HA [17:40] bnoordhuis: across nodes [17:40] rbranson: jesusabdullah: when I said MPI though, I just referred to message-passing in general [17:40] jesusabdullah: HA? [17:40] rbranson: high availability [17:40] jesusabdullah: ah [17:40] jesusabdullah: so, basically, it only works on a supercomputer. :) [17:40] rbranson: so ZMQ is designed to allow for continued service in the event of network/node failure [17:40] rbranson: right [17:40] jesusabdullah: rbranson: I see. [17:40] rbranson: I mean obviously you have to use it in that fashion [17:41] rbranson: but MPI is not really setup for that [17:41] jesusabdullah: *nod* [17:41] jesusabdullah: I've been wanting to play with zmq but haven't had a good excuse for doing so [17:41] rbranson: it is so poorly named [17:41] rbranson: it sould be called Zero RPC [17:41] rbranson: :D [17:41] jesusabdullah: but that's one more character [17:41] jesusabdullah: silly [17:41] olivvv_: can anyone help me ? [17:41] jesusabdullah: Can't be having that! [17:41] jesusabdullah: What's up olivvv_ [17:41] jesusabdullah: Oh [17:41] jesusabdullah: Hold ons [17:42] micheil: rbranson: what I'm thinking I call XEE, it's basically node's EventEmitters coupled with adhoc network structure [17:42] jesusabdullah: Looks like something more crazy to me, olivvv_ [17:42] olivvv_: jesusabdullah: hi. I'm trying to install node on windows [17:42] jesusabdullah: I see that! [17:42] rbranson: sorry :/ [17:42] micheil: rbranson: like I said, give me a little while, and I'll have a prototype and paper written on it. [17:42] rbranson: micheil: that sounds neato though [17:42] rbranson: micheil: it sounds like it'd be shared-nothing though, correct? [17:43] micheil: rbranson: sort of. [17:43] jesusabdullah: Hmm [17:43] jesusabdullah: Mython is the cygwin python [17:43] jesusabdullah: er [17:43] jesusabdullah: Python* [17:43] rbranson: terracotta allows you to distribute and share state across a set of VMs, so that's why I brought it up [17:43] robmason has joined the channel [17:43] stephank: Is anyone building add-ons for node 0.3? I'm not sure if it's caused by my attempt at side-by-side install with 0.2, but I get unresolvable symbol errors: “Error: ./binding.node: undefined symbol: _ZN4node12EventEmitter20constructor_templateE” [17:43] micheil: rbranson: like, it's not meant to share code, or allow you to explicitly call another function [17:43] micheil: but to pass messages on an adhoc network [17:43] rbranson: it's an event system [17:43] rbranson: yeah [17:43] micheil: yeah [17:44] micheil: that's what I think we need to scale node. [17:44] jesusabdullah: olivvv_: Unfortunately, I don't know what to make of this. Fortunately, I'm definitely not an expert on this sort of thing. [17:44] micheil: then you just have something that can proxy requests. [17:44] rbranson: yeah I agree that a system that's very node-ish using EventEmitter would be nice [17:44] rbranson: make it an API and be sort of transport agnostic [17:44] micheil: rbranson: why am I designing this? because I see it as being needed for a possible employer & for websocket scaling. [17:44] jesusabdullah: olivvv_: Try asking later maybe with a different crowd, or post an issue with http://github.com/ry/node [17:44] bnoordhuis: stephank: there is a problem with the ABI right now [17:44] bnoordhuis: are you using 0.3.1-pre? [17:45] rbranson: micheil: and we want node to be web scale [17:45] micheil: rbranson: yeah, it's going to be very easy to work with. [17:45] rbranson: node + mongodb [17:45] rbranson: web scale 4ever [17:45] micheil: erm./ [17:45] olivvv_: jesusabdullah:ok, ill do that, thanks [17:45] micheil: node + riak. scale 4 ever. [17:45] rbranson: i'm being silly :P [17:45] stephank: bnoordhuis: yes, master [17:45] micheil: riak would be better at scaling. [17:45] rbranson: oh it clearly would [17:45] bnoordhuis: micheil: share nothing, scale even better :) [17:45] SubStack has joined the channel [17:45] micheil: bnoordhuis: share nothing, what do you mean? [17:45] bnoordhuis: stephank: try downgrading to 0.3.0 [17:46] bnoordhuis: i ran into the same issues [17:46] bnoordhuis: micheil: don't share state across nodes [17:46] micheil: bnoordhuis: I hope you reported the issue [17:46] stephank: bnoordhuis: Will try. Thanks for the pointer. :) [17:46] bnoordhuis: and you'll be able to scale infinitely [17:46] micheil: bnoordhuis: oh, ha, no, it'll just share events [17:46] fangel: if I would do something distributed with Node I would definately try to make it Event-based.. like otherServer.emit(...) or groupOfServers.emit(...) - just seems very node-like [17:46] bnoordhuis: stephank: you're welcome [17:46] micheil: fangel: exactly. [17:46] micheil: and, you will see a prototype of that soon. [17:47] rauchg_ has joined the channel [17:47] dguttman has joined the channel [17:47] micheil: I just need to work out all the details [17:47] bnoordhuis: micheil: i reported it a while ago but ryan said something about only having a stable ABI for stable releases [17:47] micheil: but it's an active area of research for me. [17:47] fangel: but that could just be fancy interface ontop of something ZeroMQ based.. actually, that would be really sweet.. [17:47] fangel: yeah.. that's actually reeeally interesting.. I would love to do something like that too.. :) [17:47] bnoordhuis: i think it's a compiler switch actually, but it's not that important [17:47] micheil: fangel: you'll see what I'm thinking soon. [17:47] micheil: it is really interesting [17:48] micheil: I should know by the end of the week if I'm able to continue down this path. [17:48] jtsnow has joined the channel [17:48] stephank: (Hey, that's neat. My 0.3 question was actually related to zeromq.node.) [17:48] fangel: I've been needing a project to test out all the theory I've learn of distributed systems.. :) [17:49] micheil: fangel: heh, okay. Well, give me a little while, and I'll be able to get together a paper as to how this should be done in node. [17:49] fangel: sweet.. I would love to assist in any way possible if you should need it.. :) [17:50] fangel: I've had my fun writing interpreters in JS.. time for some distribution fun ;) [17:51] rbranson: micheil: I'm not able to duplicate the issue JohnDav is having with websocket [17:51] rbranson: micheil: at least not on socket.io-node HEAD and node v0.2.4 with websocket connections [17:51] JohnDav: the cpu usage shot up to 100% again :/ [17:51] micheil: rbranson: open the connection via telnet [17:52] JohnDav: btw could this be because of uncaughtException im catching on process.assert [17:52] rbranson: k [17:52] micheil: rbranson: it's there. [17:52] aubergine_ has joined the channel [17:52] twoism has joined the channel [17:52] fangel: micheil: but you are right.. there is a lot of issues with transferring a closure across.. using something like ZeroMQ it should be a quick hack to get a distributed EventEmitter that carries non-function values though.. [17:52] vnguyen has joined the channel [17:52] micheil: yeah, a quick hack. [17:53] micheil: I think my solution will be better. [17:53] micheil: as it'll be totally decentralized. [17:53] banjiewen has joined the channel [17:53] fangel: but do you intent to try and tackle transferring a closure? that would be a pretty sweet trick [17:54] micheil: transferring stuff like closures, no [17:54] micheil: this is purely for events [17:54] micheil: maybe also sockets. [17:54] micheil: but first an fore most for events [17:55] jesusabdullah: Maan, figures I'd have a good question right when I need to go to class [17:55] jesusabdullah: :) [17:55] rbranson: micheil: yeah it looks like if it wasn't fully initialized as a client that it's hitting CLOSE_WAIT [17:55] rbranson: micheil: ? [17:55] rbranson: micheil: :/ [17:55] ryanfitz has joined the channel [17:55] aubergine_ has joined the channel [17:55] micheil: yeah [17:55] micheil: due to how stuff is done in socket.io [17:55] micheil: rauchg_: we have a fix for that, right? [17:55] fangel: well, what stops you from doing .emit('event', function() { ... }) - isn't that possible? how would that work with a distributed event-model? [17:55] sh1mmer has joined the channel [17:56] micheil: fangel: you have two options, a central events broker, or an adhoc broker [17:56] rauchg_: micheil: ? [17:56] micheil: rauchg_: CLOSE_WAIT socket.io [17:56] rbranson: apachebench makes it obvious quick [17:56] micheil: rbranson: yeah [17:56] JohnDav: rbranson: the CPU usage doesnt increase gradually.. its pretty normal for quite some time... 0% - 15% .. within the range [17:56] rbranson: ab -c 255 -n 255 http://127.0.0.1:port/ [17:56] isaacs has joined the channel [17:56] JohnDav: then shoots up to 100% and doesnt come back [17:57] micheil: as for CPU, I'm not sure. [17:57] rbranson: yeah :/ [17:57] rbranson: i'm not seeing the CPU issues on this benchmark [17:57] rbranson: but this is also very minimal [17:57] jesusabdullah: http://github.com/jesusabdullah/frotzbot/blob/master/frotz.js I'm trying to, basically, expose the inside spawn()'s read/write streams in this constructor, but I'm sucking at it. Any ideas as to how I'm doing it wrong, how to do it the right way, etc? [17:57] JohnDav: what would be the best way to profile this [17:58] jesusabdullah: If anyone has any ideas, lemme know :) [17:58] JohnDav: and see if its my code.. or some other issue [17:58] micheil: jesusabdullah: yeah. [17:58] micheil: jesusabdullah: email me and I'll help you out with it. micheil@brandedcode.com [17:58] jesusabdullah: Email you? [17:58] micheil: yeah [17:58] micheil: I'm kinda busy atm [17:58] jesusabdullah: That's fine [17:59] micheil: jesusabdullah: but yeah, email me, and I can definitely help you out. [17:59] hornbeck has joined the channel [17:59] aubergine has joined the channel [18:00] rauchg_: micheil: that should be addressed in 0.6 already [18:00] rauchg_: the CLOSE_WAIT [18:00] micheil: not for websockets. [18:00] rauchg_: uhm [18:00] micheil: I don't think. [18:00] jesusabdullah: *bam* [18:00] micheil: due to the timers and stuff [18:00] jesusabdullah: Thanks, micheil [18:00] rbranson: I'm seeing the issues in HEAD [18:00] rauchg_: that's fixed [18:00] rauchg_: i'll make sure [18:00] rauchg_: to call .destroy [18:00] rauchg_: on 'end' [18:00] rauchg_: but it's called onDisconnect too [18:01] rbranson: I literally just cloned head 15 minutes ago [18:01] rauchg_: k [18:01] rbranson: I can use ab to reproduce it [18:01] scnd has joined the channel [18:01] rbranson: ab -c 255 -n 255 http://127.0.0.1:port/ [18:01] rbranson: ctrl+c [18:01] rbranson: CLOSE_WAIT out the ass [18:01] rauchg_: can you try again [18:01] rbranson: ab -c 255 -n 255 http://127.0.0.1:port/socket.io/xhr-multipart [18:01] rbranson: is fine [18:02] rbranson: rauchg_: update it from github? [18:02] rauchg_: rbranson: yep [18:02] micheil: rauchg_: I'm just about to release the next version of node-websocket-server [18:02] rbranson: still seeing it [18:02] housetier has joined the channel [18:03] micheil: rauchg_: this looks hot though, http://gist.github.com/658614 [18:03] sudoer has joined the channel [18:03] pharkmillups has joined the channel [18:06] rauchg_: im using your fix though [18:06] rauchg_: :P [18:06] rauchg_: although [18:06] rauchg_: if you just go to http://127.0.0.1:port [18:06] rauchg_: CLOSE_WAIT is expected [18:06] rauchg_: because there're no handlers for that [18:06] rauchg_: unless you 404 or sth [18:06] rauchg_: that's not websocket ? [18:06] rauchg_: how are you testing websocket [18:06] rbranson: uh [18:06] rbranson: why would CLOSE_WAIT be expected? [18:07] rbranson: i understand why it's happening [18:07] rbranson: but it shouldn't [18:07] rauchg_: because socket.io attaches itself to a server and anything that it's not in the /socket.io/ namespace is let go [18:07] rauchg_: you can still /serve/whatever [18:07] rbranson: ugh [18:07] rbranson: :/ [18:07] rbranson: I think ry is changing node to close sockets automagically [18:07] micheil: http://127.0.0.1:8080 [18:08] micheil: if socket.io is running on that, close wait shouldn't happen [18:08] eisd has joined the channel [18:08] rauchg_: if it's the chat example probably not [18:08] micheil: rauchg_: socket.io doesn't let go of things that look like they may be websockets [18:08] rauchg_: socket.io doesn't think thats websocket [18:08] micheil: eg, connection upgrade, and do something wrong in handshaking [18:09] rauchg_: oh [18:09] micheil: yeah. [18:09] rbranson: if you've got a lot of volume, those will stack up after a while [18:09] rbranson: considering it atkes 5 minutes to clear a CLOSE_WAIT [18:10] ajsie: why is many people using Basic auth and not Digest auth? [18:14] aurynn: it's easier to do basic-over-ssl than digest. [18:14] pharkmillups_ has joined the channel [18:14] mikeal has joined the channel [18:18] benburkert has joined the channel [18:19] ossareh has joined the channel [18:19] ph^ has joined the channel [18:20] Craig` has joined the channel [18:20] isaacs: aurynn: also, basic-over-ssl is way securer [18:20] isaacs: it's a hammer to kill a fly, but still. [18:20] nik0 has joined the channel [18:20] bradleymeck has joined the channel [18:21] aurynn: isaacs, that too :) [18:21] isaacs: digest-over-ssl is arguably even sucurer than that, but then that's a fly-swatter after the hammer's already hit the fly [18:24] olivvv_: hi. I want to run node on windows, but I have issues (already looged on github). I m wondering if there is a way around, maybe downloading already compiled files ?? [18:25] olivvv_: (my build fails) [18:25] JohnDav: olivvv_: cygwin ? [18:26] CIA-94: node: 03Oleg Efimov 07master * rfac6db1 10/ Makefile : Add DESTDIR support to Makefile - http://bit.ly/c2ktDA [18:26] CIA-94: node: 03Oleg Efimov 07master * r6bf9780 10/ Makefile : Add node headers installation - http://bit.ly/caMBS2 [18:26] olivvv_: yep I did that [18:26] olivvv_: but build fails [18:27] olivvv_: so while I m waiting for aa fix/reply on this, I thought there may be some other way [18:29] wink_: olivvv_: if you're really stuck, get virtualbox and virtualize it :p [18:30] sivy: anyone truied to get node running on one of those amzn free ec2 instances? [18:30] v8bot has joined the channel [18:30] olivvv_: wink_:thx [18:30] gbot2 has joined the channel [18:31] banjiewen_ has joined the channel [18:32] MikhX has joined the channel [18:33] aho has joined the channel [18:34] vnguyen_ has joined the channel [18:35] rbranson: rauchg_: I still think ry's idea of closing connections when they're closed is probably for the best :) [18:35] pedrobelo has joined the channel [18:36] saschagehlich has joined the channel [18:37] yhahn has joined the channel [18:38] c4milo2 has joined the channel [18:39] c4milo has joined the channel [18:41] melgray has joined the channel [18:41] robmason has joined the channel [18:42] cadorn has joined the channel [18:43] jfd1 has joined the channel [18:44] robmason has joined the channel [18:46] robmason_ has joined the channel [18:49] banjiewen has joined the channel [18:52] simme has joined the channel [18:52] JohnDav: too much TIME_WAIT now [18:52] ngw has joined the channel [18:52] robmason has joined the channel [18:53] tmpvar has joined the channel [18:53] robmason has joined the channel [18:54] robmason has joined the channel [18:55] ossareh has joined the channel [18:55] rbranson: JohnDav: TIME_WAITs don't last very long, like a few seconds [18:55] unomi has joined the channel [18:55] rbranson: JohnDav: do you hvae a handler on your httpServer? [18:56] JohnDav: rbranson: i just return 404 on the http server [18:56] Aria has joined the channel [18:56] rbranson: do you do an end? [18:56] rbranson: http.createServer(function(req, res) { [18:56] rbranson: res.writeHead(404); [18:56] rbranson: res.write("404"); [18:56] rbranson: res.end(); [18:56] rbranson: } [18:57] stepheneb has joined the channel [18:58] ryah_: JohnDav: make /proc/sys/net/ipv4/tcp_fin_timeout shorter [18:59] rauchg_ has joined the channel [18:59] blackbrrr has joined the channel [18:59] JohnDav_ has joined the channel [19:00] blackbrrr has left the channel [19:00] JohnDav_: rbranson: sorry dc [19:00] JohnDav_: yeah im ending with a 404 [19:00] JohnDav_: res.end('404'); [19:01] rbranson: k [19:01] rbranson: [13:58] JohnDav: make /proc/sys/net/ipv4/tcp_fin_timeout shorter [19:01] JohnDav: im having doubts on [19:01] JohnDav: http://apps.facebook.com/clobby-chat/groupchat [19:01] JohnDav: sorry [19:01] JohnDav: on this [19:01] JohnDav: process.on('uncaughtException', function (err) { [19:01] JohnDav: a lot of process.asserts get caught [19:02] rbranson: hehe [19:03] JimBastard has joined the channel [19:04] JimBastard: hey saikat [19:04] saikat: hey JimBastard [19:04] JimBastard: we finally got the new version of node_mailer working and tested. im gonna push in a few [19:04] femtooo has joined the channel [19:04] JimBastard: got a dedicated trusted smtp to test with [19:05] saikat: oh nice [19:05] JimBastard: sorry for the delay, lots of code on the back log [19:05] jpld has joined the channel [19:05] saikat: no problem at all [19:05] saikat: i'll try it out in a few days probably - thanks for the heads up [19:05] JimBastard: anytime [19:06] JohnDav_ has joined the channel [19:07] Yuffster has joined the channel [19:07] EyePulp has joined the channel [19:08] rwaldron_ has joined the channel [19:10] vnguyen_ has joined the channel [19:10] bnoordhuis has joined the channel [19:11] stepheneb has joined the channel [19:13] rwaldron_ has joined the channel [19:14] JohnDav_: rbranson: rauchg_ http://oi56.tinypic.com/2dba1ro.jpg [19:14] herbySk has joined the channel [19:14] rbranson: that's hot [19:14] rbranson: :/ [19:15] JohnDav: memory looks pretty normal [19:15] JohnDav: but the CPU :| [19:15] xla has joined the channel [19:15] ryah_: JohnDav: what verison? [19:15] EyePulp: that's one fancy looking top [19:16] ryah_: EyePulp: htop [19:16] JohnDav: ryah_: 0.2.4 [19:16] muk_mb has joined the channel [19:16] EyePulp: ahhh... [19:18] jimt_ has joined the channel [19:21] rauchg_ has joined the channel [19:23] hassox has joined the channel [19:27] admc has joined the channel [19:30] sketchup has left the channel [19:30] Nohryb has joined the channel [19:31] programble has joined the channel [19:32] rauchg_ has joined the channel [19:32] jvolkman_ has joined the channel [19:35] mw has joined the channel [19:36] bnoordhuis: ryah_: can you apply this? http://gist.github.com/658726 [19:36] bnoordhuis: fixes dlopen link errors on linux [19:44] ezmobius has joined the channel [19:44] cloudhead has joined the channel [19:45] sivy: anyone know what crypto.createHash('md5') depends on? [19:45] sivy: i'm getting "TypeError: undefined is not a function " [19:46] JimBastard: sivy: what you trying to do? [19:46] blaines has joined the channel [19:46] JimBastard: md5 a string? [19:46] sivy: JimBastard: yeah, hang on [19:46] sivy: it's in Connect.utils [19:46] sivy: return crypto.createHash('md5').update(str).digest(encoding || 'hex'); [19:46] sivy: therein lies the asplode [19:47] jrockjiggz has joined the channel [19:47] JimBastard: sivy: i dont use connect [19:47] sivy: i'm getting this app up and runing on a new ec2 [19:47] JimBastard: http://github.com/marak/node_hash is a neat little wrapper on top of crypto [19:47] JimBastard: you can just required that nad use it [19:47] sivy: so i don't know if i'm missing something [19:47] blaines has joined the channel [19:47] JimBastard: or at least look at the syntax to figure out why its failing [19:48] jelveh has joined the channel [19:48] daniellindsley has joined the channel [19:49] blaines has joined the channel [19:50] Anti-X: require some nads? [19:50] blaines has joined the channel [19:51] rauchg_ has joined the channel [19:51] c4milo has left the channel [19:52] JimBastard: Anti-X: require('thesenuts') [19:54] micheil: sivy: check that you have node compiled with openssl support. [19:54] sivy: micheil: oh, hm [19:55] JimBastard: you need openssl to do md5? [19:55] JohnDav_ has joined the channel [19:55] wink_: JimBastard: i believe thats where the md5 api comes from [19:55] sivy: JimBastard: perhaps for the builtin version you do [19:55] wink_: there are surely js implementations [19:56] JohnDav_: ryah_: is the CPU usage issue known? [19:56] ryah_: JohnDav: no [19:57] ryah_: JohnDav: can you reproduce? [19:57] rauchg_: it shouldn't stay at 99% [19:57] rauchg_: but sometimes it does get to 99% [19:57] JohnDav: its consistently at 100% [19:57] JohnDav: everytime i restart the server.. its fine for a few mins.. then spikes up and stays there [19:57] ryah_: JohnDav: does it have a big load on it? [19:58] ryah_: how many open fds? [19:58] JohnDav: ryah_: not much, only 500 active connections [19:58] CIA-94: node: 03Ben Noordhuis 07master * r7a7e88d 10/ Makefile : Fix 'undefined symbol' errors when loading native modules. - http://bit.ly/9UOSRy [19:59] rauchg__ has joined the channel [19:59] aubergine has joined the channel [19:59] Max-Might has joined the channel [20:01] jchris has joined the channel [20:02] v8bot has joined the channel [20:03] V1 has joined the channel [20:03] ajsie: JimBastard: how is it going with the beta launch? [20:04] JimBastard: ajsie: gonna be deploying sometime tonight i think. indexzero had to go teach at columbia this afternoon, so im waiting for him to get back [20:04] AAA_awright: Ahah yes [20:04] JimBastard: we've got a cluster setup and ready to go, just gotta start flipping switches [20:04] JimBastard: im testing a bunch of stuff now, pushing a patch to node_mailer so we can blast people [20:05] ajsie: JimBastard: okay nice .. then ill wake up to it =) [20:05] Me1000 has joined the channel [20:05] JimBastard: if you are around later maybe you could help test one of the first deployements [20:05] JimBastard: ill drop a message in IRC before we email blast [20:05] JimBastard: gonna be in #nodejitsu soo [20:05] JimBastard: too [20:06] femtoo has joined the channel [20:07] ctp has joined the channel [20:08] heavysixer has joined the channel [20:21] sprout has joined the channel [20:25] elijah-mbp has joined the channel [20:26] cagdas has joined the channel [20:29] jamescarr has joined the channel [20:29] jamescarr: who here uses jasmine for client side bdd? [20:30] JimBastard: hey isaacs you around? im trying to publish an npm package and it keeps saying im not authorized. should i npm adduser again? [20:30] tmpvar: JimBastard, yeah [20:30] JimBastard: it keeps saying im not authorized, maybe if forgot the password. can it be reset? [20:30] tmpvar: i think isaacs needs to reset it for ya [20:31] JimBastard: maybe its "a" [20:31] JimBastard: nope [20:31] JimBastard: o well [20:33] ryah_: JohnDav: how can i reporduce the 100% problem? [20:34] pedrobelo has joined the channel [20:35] bentruyman_ has joined the channel [20:35] JohnDav: ryah_: rauchg__ fixed it [20:35] JohnDav: it was a recursive loop [20:36] derferman has joined the channel [20:36] JohnDav: http://gist.github.com/658791 -- this is what seemed to have been causing it apparently [20:36] CIA-94: node: 03Ryan Dahl 07master * rfd725ef 10/ Makefile : Add execinfo to freebsd LINKFLAGS - http://bit.ly/cOdxTJ [20:36] ryah_: good [20:37] ryah_: herbySk: --^ [20:37] derferman_ has joined the channel [20:37] evilhackerdude has joined the channel [20:37] ryah_: herbySk: segfault on crypto is known and is happening on all platforms [20:38] herbySk: ryah_: aha, thanx [20:38] tj: flot almost rendering via node, state bug though http://img.skitch.com/20101101-r2e6phsq7xuuttd2cnwwscp47g.png [20:38] tj: almost :D [20:39] tmpvar: nice! [20:39] stride: huh, nice. do you have a serverside canvas script? [20:39] tj: yup [20:39] tj: will be open sourced when it is closer to being finished [20:39] Aria: wow, sweet. [20:39] Aria: iWant! [20:40] stride: very cool. all in JS? [20:40] tj: its an addon [20:40] tj: so half c++ half js [20:40] stride: ah ok :) [20:41] mraleph: tj: what's about speed? [20:41] ryah_: tj: sick [20:42] tj: mraleph: its not bad at all, toDataURL() is ~10x faster than FF [20:42] tj: other operations are pretty much the same as chrome [20:42] tj: so faster than FF as well [20:42] tj: on par with the others pretty much [20:42] tj: I have yet to do extensive benchmarking though [20:43] tj: and I will support async png streaming (sync already done) soonish, wish will be rad :D [20:43] stride: does your implementation support getImageData & setImageData? [20:43] tj: it will yup [20:43] langworthy has joined the channel [20:44] sixtus42 has joined the channel [20:44] stride: great :) [20:44] tj: :D [20:44] mraleph: tj: nice. looking forward to it. do you use V8 pixel arrays and all that webgl stuff? [20:45] jamescarr: F iyt [20:45] jamescarr: I give up for the day [20:46] tj: mraleph: I just use cairo's image buffer support [20:47] tj: its weird though, I havent looked into it much but v8's setter doesnt seem to clamp values [20:47] tj: even though I can see that it does directly in the code [20:47] tj: kinda odd, but I will look into that more later [20:47] mraleph: tj: setter for which type of arrays? [20:47] mraleph: tj: pixelarrays? [20:48] tj: mraleph: pixel [20:48] mraleph: tj: it should. we have tests in testsuite. if your confirm that it doesn't --- please report the bug. [20:48] tj: will do [20:49] tj: I get a strange result, but it is probably something I am doing wrong haha [20:50] danielrmz has joined the channel [20:53] tj: mraleph: ah, when set to 266 the value should be 255 no? because I get 10 [20:53] Raghuram has joined the channel [20:53] micheil has joined the channel [20:53] Raghuram: Hi... [20:53] Raghuram: need help [20:53] JohnDav_ has joined the channel [20:54] Raghuram: I m trying to intall cygwin [20:54] Raghuram: and nodejs [20:54] sudoer has joined the channel [20:54] Raghuram: when i run ./configure [20:54] gkatsev: i'm sorry. [20:55] Raghuram: it says...C:\python22/python.exe can't open file '/node-v0.2.4/too.s/waf-light' [20:56] mraleph: tj: that's wierd. [20:56] Raghuram: any help would be appreciated [20:57] mraleph: tj: can you post your testcase somewhere? [20:57] tj: mraleph: yeah I can try and test out side of my lib to confirm [20:58] mraleph: tj: that would be great. [20:58] tj: mraleph: well actually, even the node Buffer api [20:58] tj: will do the same [20:59] tj: buf[0] = 266; buf[0] == 10 [21:00] stride: what's buf? [21:00] mraleph: i'm just failing to see where 10 comes from. [21:00] stride: something that's 8 bit long? than it doesn't fit and the first one in 0100001010 gets dropped presumably [21:00] bnoordhuis: overflow [21:00] stride: (1010 being decimal 10) [21:00] bnoordhuis: wat stride said :) [21:00] tj: it should be clamping AFAIK [21:01] mraleph: ahh. it's 266 [21:01] mraleph: not 256 [21:01] tj: yeah [21:01] tj: the pixel array setters should clamp though [21:01] mraleph: yep [21:02] stride: oh, ok [21:02] eee_c has joined the channel [21:03] willwhite has left the channel [21:05] modular has joined the channel [21:06] ooooPsss: hey. I'd like your opinion about the best way to start learning node.js for different levels of JS knowledge please [21:07] modular: i'm using http.createClient to request info from a server. can i abort this connection manually? [21:07] modular: if, for example, the response seems to hang half way, or is just too slow? [21:07] tj: ooooPsss: id say just pick a few modules that you understand conceptually, and see how they are implemented [21:08] ooooPsss: tj: would that work for anyone, even if it doesn't know JS? [21:08] tj: ooooPsss: hmm well maybe not [21:08] tj: i dunno depends how much you know [21:09] stride: for basic concepts I'd suggest at least glancing over crockfords website + that eloquent site [21:09] ooooPsss: ok, ty guys [21:09] stride: oh and howtonode of course. how could i forget.. :) [21:10] modular: i see i can do response.pause() to pause the request, but is there no response.end() ? [21:10] stride: ooooPsss: holding a course? [21:10] stride: meh wth.. s/course/seminar/ f*** my mother language.. :) [21:11] ooooPsss: yes, something like that ;) [21:11] bnoordhuis: modular: you can call destroy() on the httpclient object [21:11] bnoordhuis: i think that'll do the trick [21:11] JohnDav has joined the channel [21:11] modular: hm, ok, thanks. [21:12] willwhite has joined the channel [21:15] blaines has joined the channel [21:16] pedrobelo has joined the channel [21:17] eisd has joined the channel [21:19] StanAngeloff has joined the channel [21:23] c4milo has joined the channel [21:23] walkah has joined the channel [21:23] c4milo has left the channel [21:26] dgathright has joined the channel [21:26] JohnDav has joined the channel [21:27] BHSPitCSP: When using a server module like Socket.IO, node loses its interactive shell. Is there a way to run such a server and still retain the interactivity? [21:27] rpflo has joined the channel [21:28] saikat has joined the channel [21:29] drudge_ has joined the channel [21:31] necrodearia has joined the channel [21:33] necrodearia has joined the channel [21:36] necrodearia has joined the channel [21:36] ryah_: BHSPitCSP: ? [21:37] ryah_: BHSPitCSP: require('repl').start() in your script [21:37] ryah_: if that's what you're asking... [21:37] necrodearia has joined the channel [21:38] BHSPitCSP: ryah_: ah [21:38] qetbn has joined the channel [21:38] necrodearia has joined the channel [21:39] dgathright has joined the channel [21:39] necrodearia has joined the channel [21:40] hober has joined the channel [21:41] sixtus42: ryah_: any idea what might cause this: http://github.com/pgriess/node-webworker/issues/issue/12 [21:42] BHSPitCSP: repl doesn't seem to play well with sys.log... [21:43] ryah_: sixtus42: hm - no [21:43] sixtus42: ryah_: hitting this very reliably. and only took me a day to realize [21:45] sixtus42: the only "odd" thing about my setup: I am not using npm but have a "exports = require("../dependencies/node-webworker/lib/webworker");" file in my load path [21:45] tj: awesome, fixed the bug: http://img.skitch.com/20101101-qc17pw415siacm947pcfnrften.png [21:45] sixtus42: but that approach is working fine for everything except webworker [21:46] isaacs: sixtus42: what do you mean "in my load path"? [21:47] sixtus42: require.paths.push("./lib") and lib/webworker.js contains "exports = require("../dependencies/node-webworker/lib/webworker");" [21:47] sixtus42: isaacs: trying to be self-contained instead of using npm [21:48] isaacs: sixtus42: require.paths must be absolute paths [21:48] isaacs: sixtus42: or else The Badness happens. [21:48] isaacs: sixtus42: you know, though, you can be "self contained" and also use npm. npm bundle [21:48] jfd1 has joined the channel [21:48] rosencrantz has joined the channel [21:49] isaacs: sixtus42: also, assigning to "exports" is not good. you should assign to "module.exports" [21:50] rsms has joined the channel [21:50] sixtus42: isaacs: gnaaaaa [21:50] drudge_ has joined the channel [21:50] sixtus42: isaacs: I've been doing module.exports everywhere [21:50] isaacs: oh, ok [21:51] jigz has joined the channel [21:51] sixtus42: isaacs: it fixes the problem [21:51] sixtus42: isaacs: what's npm bundle? [21:51] isaacs: sixtus42: so, what you do is, you write a package.json that lists your dependencies, and then "npm bundle" installs them locally to ./node_modules [21:51] hornbeck has joined the channel [21:52] naturalethic has joined the channel [21:52] sixtus42: isaacs: but I don't want to rely on npm being installed (long story) [21:52] aconbere has joined the channel [21:52] isaacs: sixtus42: which, in 0.3.1+, is in the module lookup path. although, ryah_ keeps threatening to take away my candy ;) [21:53] isaacs: sixtus42: well, you'd only need it to be installed when you do the bundle. from there, you can do whatever you want with it [21:53] isaacs: sixtus42: ie, you don't need to have npm installed on your target machine where yoer' deploying it [21:53] isaacs: bundle just sets things up locally for you [21:53] sixtus42: isaacs: got a rtfm link? ;-) [21:53] isaacs: basically the same as what you're doing by hand, but in a consistent and predictable way [21:53] isaacs: sixtus42: npm help bundle [21:54] bnoordhuis has joined the channel [21:54] isaacs: sixtus42: or http://github.com/isaacs/npm/blob/master/doc/bundle.md [21:54] sixtus42: isaacs: " This is experimental functionality." I like [21:54] isaacs: heh [21:54] isaacs: yeah, it's actually fairly stable [21:54] isaacs: doesn't do very much [21:55] isaacs: so, in the next version of npm, the folder will default to "./node_modules", and in 0.3.0+ of node, it'll pick up modules from that folder by default. [21:55] siculars has joined the channel [21:55] isaacs: so then, if you do "npm bundle", just that, in the root of your program, then it'll work when you do "require('webworker')" [21:55] isaacs: that's the plan, anyway [21:56] sixtus42: isaacs: ok, so if I write a package.json I basically do "npm bundle node_modules" and have a self-contained package? [21:56] isaacs: the idea is that you won't have to do the "require('../deps/whatever')" in your code [21:56] isaacs: sixtus42: in node@0.3.0+, yes [21:56] Craig` has joined the channel [21:56] bnoordhuis: ryah_: can't you remove the deprecated node::Buffer methods? [21:57] sixtus42: isaacs: ok, so it is exactly what I have been doing manually :-) [21:57] bnoordhuis: i'd rather have compile-time errors than runtime ones [21:57] isaacs: :) [21:57] sixtus42: isaacs: thanks for the tip [21:57] isaacs: sixtus42: np [21:57] sixtus42: now all I need is someone to write a dbus interface :-) [21:58] ryah_: bnoordhuis: which? [21:58] bnoordhuis: Buffer::data() and Buffer::length() [21:58] Craig`: although this isn't exactly related to node.js as such, what would you recommend as the best approach to making a parser? I was wanting to make a parser for calculator-like math, that produces content mathml, by calculator like I mean 5^2 etc, i'm not exactly advanced with javascript so my parser would...be terrible. [21:58] ryah_: oh - yeah [21:59] CIA-94: node: 03Ryan Dahl 07master * rea78d99 10/ (61 files in 10 dirs): Upgrade V8 to 2.5.3 - http://bit.ly/96EO07 [21:59] CIA-94: node: 03Ryan Dahl 07master * rf1391f3 10/ lib/net.js : Add missing require('fs') - http://bit.ly/dgCxm5 [21:59] CIA-94: node: 03Ryan Dahl 07master * r41c1563 10/ src/node_buffer.h : Remove old buffer api - http://bit.ly/dqfQGO [22:00] wilmoore has joined the channel [22:00] bnoordhuis: and thus the world became a slightly better place [22:01] ysynopsis has joined the channel [22:02] sixtus42: Buffer API is changing? I hear my code breaking… oh well, what else is new in node land? ;-) [22:02] ryah_: sixtus42: the c++ api [22:02] bnoordhuis: sixtus42: it's mostly the C++ API, not the JS one [22:03] bnoordhuis: damnit, preempted [22:05] sixtus42: while we are at it, is it sys or util now? I refactored to util and then pulled to find it's all sys again... [22:06] bnoordhuis: sixtus42: util [22:07] muk_mb has joined the channel [22:08] jpld has joined the channel [22:08] sixtus42: bnoordhuis: I pulled today and get Error: Cannot find module 'util' while before it was giving me warnings about sys going away [22:09] jherdman has joined the channel [22:09] bnoordhuis: sixtus42: on which branch was this? [22:09] sixtus42: master [22:10] bnoordhuis: strange [22:10] bnoordhuis: sys is nothing now but a bunch of aliases for util [22:12] sixtus42: bnoordhuis: I pulled again, let's see once compiled (btw: it used to take all cores, now it's compiling on one only) [22:12] bentruyman has joined the channel [22:12] isaacs has joined the channel [22:12] sixtus42: bnoordhuis: strange, now it's util again with sys warnings [22:13] bnoordhuis: sixtus42: make -j 4 :) [22:13] isaacs: whooaaaa, irc in adium, and not crashing. this is rad. [22:14] derencius has joined the channel [22:14] halfhalo: ACTION found a webirc client he is going to rip apart for its frontend [22:16] halfhalo: awesomeish interface, crap backend [22:16] sixtus42: bnoordhuis: node is a brave new world everytime I pull. make used to ignore -j for the longest time, now it's honoring it [22:17] sixtus42: isaacs: adium is the reason I am back on irc, the only osx client I found that does irc over http-proxy [22:17] halfhalo: stupid ruby backend... [22:17] bnoordhuis: sixtus42: never a dull moment with node :) [22:17] halfhalo: it only checks for new messages every 10 seconds... but it looks really cool [22:17] bnoordhuis: btw, i remember doing `make -j 16` on my uni's supercomputer [22:17] bnoordhuis: and that is close to ten years ago [22:18] matt_c has joined the channel [22:20] sixtus42: bnoordhuis: ah, node is honoring -j, but v8 isn't [22:20] ryah_: autoconf is annoying me greatly [22:20] bnoordhuis: hi ryan, welcome to the group [22:20] rikarends: welcome to compiling stuff ENTIRELY by hand :) [22:21] bnoordhuis: sixtus42: v8 uses scons so that's probably why [22:21] drudge_ has joined the channel [22:21] rikarends: its actually quite wonderful how easy stuff compiles if you make everything an include [22:21] ryah_: god. i mean i know exactly the commands i want to do. why can't there be a build system that i can express these desires in? [22:21] ryah_: in a way that i doesn't make me want to stab myself [22:21] sixtus42: you have compilers? We only had card punchers... [22:21] rikarends: ryah_: its called 'bash' :) or even just executing commands in nodejs :) [22:22] sixtus42: didn't I just see a node based build system flying around? [22:22] rikarends: my entire project is still one C++ file and its compileable with one gcc command [22:22] bencc has joined the channel [22:22] rikarends: even though it includes about 5mb of source it still compiles in 8 seconds or so [22:22] softdrink has joined the channel [22:23] devinus has joined the channel [22:23] rikarends: im guessing node as a single include tree will compile very fast [22:23] ryah_: node's build process requires a bit more complexity [22:23] rikarends: because of the included js files? [22:23] ryah_: because of many things [22:24] EyePulp has joined the channel [22:24] rikarends: the only reason stuff cannot compile as a single header tree is if you have really ***ed up defines that bite eachother [22:25] rikarends: or if you need to generate wads of code that get linked in [22:25] ryah_: that's naive [22:25] rikarends: perhaps, but sofar it is working far longer than i expected for me [22:26] ryah_: v8 for example, compiles the VM, which then runs the standard libraries (written in js), stops it - serializes the heap and writes that into a static library [22:26] ryah_: so that when it starts the VM the next time it doesn't have to recompile the standard libs [22:26] ryah_: that is part of node's build process [22:26] rikarends: yeah exactly, that part you cannot include in a single buildstep [22:28] rikarends: also a single buildstep has a scaling sweetspot. I dont know where node is in relation to that [22:28] bartt has joined the channel [22:28] rikarends: but its surprising how much code can be compiled in one pass about 30 times faster than doing separate file+link [22:28] adambeynon_ has joined the channel [22:29] sixtus42: ryah_: this is also the reason, why node is so hard to cross compile (still doing it on the device, because I never had the time to figure it out) [22:30] ryah_: sixtus42: yeah [22:30] rikarends: what build part is actually pissing you off [22:40] aubergine has joined the channel [22:40] rikarends: i actually wonder if you need to compile ALL of lib/ into node [22:40] sonnym has joined the channel [22:40] rikarends: seems to me like just throwing them into v8 on require will hardly make adent [22:41] tpryme has joined the channel [22:45] rnewson has joined the channel [22:47] sixtus42: rikarends: but it would break node being a single binary [22:47] bartt has joined the channel [22:47] rikarends: not necessarily, you can also inline the text into headers to include [22:48] rikarends: im just saying, if the build step to precompile the included js makes it very hard to crosscompile, why not just include it as source [22:48] rikarends: it starts only once anyway [22:49] rikarends: the only big file seems to be the crypto one, the rest will compile in milliseconds [22:50] hsuh has joined the channel [22:50] rikarends: but if i recall correctly v8 itself does the same thing, so the point might be moot [22:50] rikarends: since the cross compile problem will remain with v8 [22:50] bnoordhuis: isaacs: you there? [22:52] stephank has joined the channel [22:53] ajpiano has joined the channel [22:53] flintf has joined the channel [22:53] willwhite has joined the channel [22:54] ryah_: rikarends: that's what node does for it's own js [22:54] ryah_: *its [22:54] rikarends: it includes it as source in a header? so you meant the v8 base lib thing [22:54] ryah_: rikarends: it's just a big complex thing with lots of dependencies and lots of supported OSes - it's hard. [22:55] rikarends: yeah i get it, i've been fighting with build systems my entire professional life :) [22:55] rikarends: and recently dropped everything again in favor of commandline gcc and at most a makefile [22:56] echosystm has joined the channel [22:56] ryah_: it's a good idea, and i would liek to do that too [22:58] rauchg_ has joined the channel [22:58] mraleph has joined the channel [23:00] rikarends: Ghe one of our guys has managed to include the entire freetype library header only just now :) Hmm. i must say that IS stretching it but lets see how stable it is cross platform. [23:02] bnoordhuis: rikarends: if you haven't, you might want to try out llvm-clang [23:02] rikarends: yeah i read about it. awesome errors [23:02] bnoordhuis: it has support for precompiled headers [23:02] bnoordhuis: and that too :) [23:02] rikarends: i will, but im not in a hurry [23:03] rld has joined the channel [23:03] rikarends: i have a full header tree canvas component with LibAGG, glue, V8, zlib, and now freetype and i think it does a full recompile in about 8 seconds [23:03] rikarends: everything is included. just the plain .c files [23:03] bnoordhuis: you have a 32 core machine with 128 gb ram? [23:03] rikarends: lets say its an experiment :) [23:03] rikarends: no its running on a single core of a core2duo [23:04] rikarends: on gcc which is a dog [23:04] rikarends: msvc is much faster [23:04] rikarends: usually pulls it through in a few seconds [23:04] bnoordhuis: wow [23:04] rikarends: hence my remark [23:04] bnoordhuis: just v8 takes about a minute here [23:04] rikarends: nodejs will probably compile in a few seconds [23:04] rikarends: as a single header tree [23:04] rikarends: yeah i dont have v8 btw as a header tree [23:04] rikarends: that one is purely external [23:04] rikarends: but the rest is [23:05] rikarends: v8 is a but too much hair to even attempt an include [23:05] ryah_: % ls -sh 0001-back-to-waf-kill-me.patch [23:05] ryah_: 668K 0001-back-to-waf-kill-me.patch [23:05] ryah_: :( [23:05] rikarends: nooooooo [23:05] bnoordhuis: haha [23:05] bnoordhuis: and i secod rik's emotion :) [23:05] bnoordhuis: *second [23:05] rikarends: i spent 3 days on the waf channel getting my node modules to compile :) [23:06] CIA-94: node: 03Ryan Dahl 07back_to_waf * r658eb54 10/ (73 files in 25 dirs): back to waf (kill me) - http://bit.ly/dwzAl1 [23:06] bnoordhuis: i have this iconv module that also compiles libiconv [23:06] bnoordhuis: i've given up on trying to get node-waf to compile it [23:06] ryah_: sigh. [23:07] ryah_: autoconf is annoying me too greatly [23:07] rikarends: maybe if im bored one afternoon i will see if i can get node to build as a single header tree just for the fun of it [23:07] ryah_: yeah, im not having header c++ classes [23:07] ryah_: :) [23:07] rikarends: dont mistake me for a boost fanboy :) [23:08] jelveh has joined the channel [23:08] rikarends: ah well i hope someday we'll have build tools written in coffeescript running on nodejs. [23:08] bnoordhuis: something like gant but for nodejs? [23:09] rikarends: nah actually that wont help, it will just be WAF for nodejs [23:09] rikarends: the problem is platforms actually diverge so wildly hiding building complexity becomes somewhat of a useless artform [23:09] bnoordhuis: well, i was going to ask how to build add-ons from now on [23:09] bnoordhuis: that's one question less [23:10] AAA_awright: I don't care what the build system is as long as it's not python, please [23:10] rikarends: wasnt the old school way to provide make files per platform? [23:10] bnoordhuis: AAA_awright: what about xml? maven? [23:10] SubStack: write it in node no wait [23:10] rikarends: XML build systems need to be euthanised [23:11] ryah_: bnoordhuis: node-waf [23:11] ryah_: bnoordhuis: even with autoconf that was the plan [23:11] bnoordhuis: i was afraid so [23:11] ryah_: i'd love to kill it eventually but not in the near future [23:11] bnoordhuis: there is no love lost between waf and me [23:11] AAA_awright: Someone who wants to become rich and famous needs to design a semantic build system [23:11] bnoordhuis: why did you pick it in the first place? [23:11] rikarends: waf is great if it works [23:12] rikarends: the problem is when it doesnt want to pass that particular flag to that particular command you want [23:12] bnoordhuis: or refuses to link to your static library... [23:14] rikarends: im actually using nodeJS as a build controller and build tool for my non-node C++ stuff [23:14] rikarends: but its really js-bash so thats nothing special [23:15] bnoordhuis: what about a build system like rake? [23:15] AAA_awright: bnoordhuis: There needs to be a build system designed like this http://69.72.216.27/guru/ [23:15] AAA_awright: We are STILL looking at build systems completely the wrong way [23:15] slickplaid has joined the channel [23:16] rikarends: is that a joke page? [23:16] AAA_awright: No joke but fictional [23:16] slickplaid: You guys offer quick help in here? [23:16] stagas has joined the channel [23:16] rikarends: depends how stupid the question is :) [23:16] jesusabdullah: No! Our help takes a really long time. You have to sit through a boring lecture first. [23:16] bnoordhuis: sounds dirty when you put it like that but yes [23:17] slickplaid: Knowing me, probably very. :D [23:17] rikarends: general rule: ask the question first :) [23:18] slickplaid: http://pastie.org/1265329 <-- trying to get redis-node OR redis-node-client to work [23:18] slickplaid: using npm and i've tried node 0.2.4, 0.2.3 and 0.3.0 [23:18] rikarends: go debug that code [23:18] rikarends: its a pretty small lib [23:18] rikarends: figure out why commandForReply is null [23:18] rikarends: console.log the crap out of the stuff around that area [23:19] rikarends: untill someone else has exactly the same problem [23:19] AAA_awright: "Don't ask meta-questions" [23:19] rikarends: i think the error started earlier with 'unknown command' [23:19] rikarends: and it pushed it into the output buffer somehow anyway [23:20] aubergine has joined the channel [23:20] stagas: rikarends: try node_redis: npm install redis [23:21] slickplaid: that ERR unknown command is happening in both redis-node and redis-node-client ...thought it could have just been a change with the node source but even dropping back to several versions earlier doesn't fix it (node) [23:21] slickplaid: okay [23:21] stagas: rikarends: then require('redis'). the api is the same with your code [23:21] rikarends: im not asking :) [23:21] rikarends: but thanks :) [23:22] rikarends: anyway just saying, sometimes just debugging the error beats endlessly downloading stuff [23:22] rikarends: its not magic [23:23] dgathright has joined the channel [23:23] nrub has left the channel [23:24] bentruyman has joined the channel [23:25] slickplaid: http://pastie.org/1265352 same error [23:25] rikarends: guess you have no other options now :) [23:26] ShiZWeaK has joined the channel [23:26] ShiZWeaK has left the channel [23:26] stagas: slickplaid: redis version? [23:26] rikarends: thou shalt read the code and fix the bug! [23:26] slickplaid: The thing that is odd is how three different libs from three different people have the same issue [23:26] slickplaid: makes me think it's something i'm doing lol [23:26] slickplaid: and not their code [23:27] bentruyman has joined the channel [23:27] slickplaid: redis-1.02 [23:28] slickplaid: hm... going to recompile and use 2.0 [23:28] slickplaid: probably is the problem :D [23:29] stagas: slickplaid: ;) [23:29] rikarends: redis has had 'set' from day 1 [23:29] rikarends: so i doubt it is actually that :) [23:30] echosystm: whats everyones client-side js library of choice? [23:30] echosystm: for writing 'as much logic on the client' type apps [23:30] slickplaid: Ever have those days that you've been staring at the computer screen for so many hours you forget the simple things like how to spell words and how a simple word like 'that' is spelled? [23:30] rikarends: www.ajax.org :) [23:30] slickplaid: point in case [23:30] rikarends: well soon anyway, when the requireJS refactor is done [23:30] slickplaid: i need sleep [23:30] slickplaid: lol [23:31] _matt has joined the channel [23:31] slickplaid: tired slickplaid is tired [23:31] _matt: anyone have a good example of an "interface" design pattern in js? [23:32] _matt: specifically for nodejs [23:33] echosystm: whats an interface design pattern? [23:33] echosystm: do you mean a UI pattern? [23:33] rikarends: im guessing a programming interface [23:33] _matt: http://pastebin.com/Kfhb7jsU [23:33] _matt: programming… OO design pattern [23:34] dgathright has joined the channel [23:34] _matt: this is a simple function I am using to enforce an interface.. but im not sure if it is the best way [23:34] echosystm: whys an interface required in JS? the object either implements it or it doesnt [23:34] c4milo has joined the channel [23:34] rikarends: js is very ducktypey so thats usually enough [23:34] rikarends: you can add like a general function which is like bla.implements('someinterface') [23:34] rikarends: to test for the duck [23:34] rikarends: but other than that its really just adding functions on an object to implement the interface [23:35] _matt: i want to enforce that functions are implemented [23:35] _matt: if you extend my object [23:36] echosystm: i dont get it, thats inheritance [23:36] rikarends: you cant force anything, you could make a 'decorator' tho that adds essentially functions that fail with exceptions untill you replace them [23:36] _matt: var IConnection = function () { [23:36] _matt: // Interface.call(this); [23:36] _matt: }; [23:36] _matt: IConnection.prototype = { [23:36] _matt: connect: function(){}, [23:36] _matt: disconnect: function(){}, [23:36] _matt: } [23:37] _matt: var Connection = function(user_name){ [23:37] _matt: } [23:37] _matt: Connection.prototype.connect = function(){ [23:37] _matt: console.log('connnect'); [23:37] _matt: }; [23:37] rikarends: what you could do is indeed something like this paste, an interface being just a bunch of functions that need to be there and it will fail otherwise [23:37] _matt: connection should die in proper OO because it does not have a disconnect fonction [23:37] rikarends: but i dont think there is any standard for this [23:38] _matt: odd.. i have been working with AS3 [23:38] rikarends: AS3 has a lot more standardsy stuff than what JS lives in the browser and in nodejs [23:39] _matt: which is ECMAscript based.. [23:39] rikarends: well its like a different dialect [23:39] _matt: i get that [23:39] rikarends: aS3 also has E4X and other things [23:39] _matt: just thought a standard design pattern would be… standard [23:39] rikarends: yeah unfortunately not. [23:40] rikarends: there are many attempts tho [23:40] rikarends: but also, usually ducktyping works fine too [23:40] rikarends: it takes a bit getting used to [23:40] _matt: ok I guess ill keep down the path i was going [23:40] rikarends: dropping the strict OOP school [23:40] rikarends: at first you are like NOOOOOOOOOO [23:41] rikarends: but then after a while it turns out that all this loose crap works too [23:41] rikarends: as long as you write unittests [23:41] echosystm: hey rikarends im looking at that ajax.org framework - it's LGPL, does that mean when you extend a framework obejct that is considered a derivative work and must be open sourced? [23:41] rikarends: essentially what you have here is a poor mans unittest :) [23:43] _matt: actually here is another weird question… is there a why for a class to know that it got inherited from… automatically without the subclass calling the parent constructor? [23:43] rikarends: echo: No i think only when you modify the library itself. any extensions or apps built with it can be whatever license [23:43] bentruyman has joined the channel [23:43] rikarends: echo: its really there so we can get bugfixes back [23:43] rikarends: echo: but free to use otherwise [23:43] Rld has joined the channel [23:44] rikarends: _matt: im too tired for that question [23:44] echosystm: afaik, LGPL has had issues in the past where inheritance is considered a derivative [23:44] echosystm: i remember this being addressed in some other license [23:45] rikarends: hmmm, i'll investigate that. but thats not the spirit of it why it was chosen [23:45] rikarends: also there is technically no inheritance like that in JS [23:46] JojoBoss has joined the channel [23:47] Rld has joined the channel [23:47] boaz_ has joined the channel [23:49] ryah_: echosystm: linking is considered a derivative, yes [23:49] Tim_Smart has joined the channel [23:49] Tim_Smart: ryah_: back_to_waf? [23:49] ryah_: Tim_Smart: :( [23:49] jakehow has joined the channel [23:50] ryah_: Tim_Smart: it's too much instability... [23:50] rcy has joined the channel [23:51] TooTallNate has joined the channel [23:52] Tim_Smart: Anyway, time to download Ubuntu 10.10 and try awesomewm :) [23:52] ryah_: i want to release 0.3.1 - and i can't with autoconf as it is.. [23:52] Tim_Smart: Yeah. [23:52] CIA-94: node: 03Ryan Dahl 07back_to_waf * r476b991 10/ tools/test.py : Also tools/test.py - http://bit.ly/9RXcFM [23:52] CIA-94: node: 03Ryan Dahl 07master * r97c9745 10/ (75 files in 26 dirs): [23:52] CIA-94: node: Back to WAF [23:52] CIA-94: node: Too much instability right now. Hopefully we can revisit autoconf soon. - http://bit.ly/d4cjkR [23:52] CIA-94: node: 03Ryan Dahl 07back_to_waf * r0e2e6a4 10/ test/simple/test-executable-path.js : Fix test for waf - http://bit.ly/9hwDr1 [23:52] ryah_: 75 files changed, 9149 insertions(+), 12572 deletions(-) [23:52] ryah_: woooo.. [23:52] davida has joined the channel [23:53] Tim_Smart: :/ [23:53] tj: ryah_: what will you tag when 0.3.x is "done" and you are moving on to 0.4.x? just wondering when would be a reasonable time to start supporting it module-wise [23:53] tj: I guess maybe wait until 0.4.x is on the go [23:53] [[zz]] has joined the channel [23:54] rikarends: echosystm: what license would you prefer? [23:54] echosystm: i'm not sure [23:54] echosystm: i think LGPL is fine as long as you dont have to open source code whenever you extend an object [23:55] ryah_: tj: it's probably not going to be for another two months [23:55] isaacs has left the channel [23:55] rikarends: echosystm: that was the idea yeah. but its also the case people might misunderstand that [23:55] isaacs has joined the channel [23:55] ben_alman has joined the channel [23:55] echosystm: i think most people would prefer apache/MIT/BSD on principle though [23:55] echosystm: anything 'GPL' tends to send alarm bells for a lot of people [23:56] jamescarr_ has joined the channel [23:57] ryah_: echosystm: ironic, isn't it? [23:58] echosystm: i think another potential limitation of LGPL is that if someone makes a commercial package, they cant redistribute the framework with it , regardless of whether it is modified or not [23:59] echosystm: i'm not 100% sure on that though [23:59] rikarends: all FUD :) [23:59] echosystm: do you know if thats the case? [23:59] echosystm: ok [23:59] rikarends: no thats not true [23:59] ryah_: linking to LGPL is okay - sorry - i thought we were talking about GPL