[00:00] n2liquid: but that doesn't change the fact that [00:00] pdelgallego has joined the channel [00:00] konobi: http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/20575 [00:01] n2liquid: node-oauth, for example, didn't have to require('http') [00:01] mcastner has joined the channel [00:01] n2liquid: I'm sure there are other examples [00:01] CrisO has joined the channel [00:01] n2liquid: and connect-oauth didn't have to depend on connect [00:01] n2liquid: it does a lot of things that are useful outside connect [00:02] gqlewis has joined the channel [00:02] n2liquid: they could have written those things separately and used an adapter to connect it to connect [00:02] errorhandler has joined the channel [00:02] konobi: (lack of namespacing)-- [00:03] n2liquid: konobi: one could say, yeah.. [00:03] n2liquid: namespacing doesn't solve it if people don't use it properly, though [00:03] konobi: true [00:03] n2liquid: actually, modules do the job pretty well [00:03] mscdex: n2liquid: well, lots of people use connect/express/etc, so they will often develop directly for those frameworks [00:04] n2liquid: mscdex: yeah, I get the reasoning [00:04] n2liquid: but [00:04] n2liquid: if you're doing it [00:04] n2liquid: you might as well just abstract things a little bit more [00:04] konobi: cpan++ [00:04] v8bot: konobi has given a beer to cpan. cpan now has 2 beers. [00:04] mscdex: perl-- [00:04] v8bot: mscdex has taken a beer from perl. perl now has -1 beers. [00:04] mscdex: :p [00:04] konobi: mscdex-- [00:04] v8bot: konobi has taken a beer from mscdex. mscdex now has 7 beers. [00:05] mscdex: node++ [00:05] v8bot: mscdex has given a beer to node. node now has 2 beers. [00:05] n2liquid: and then if you abandon your project, people will have an easier time continuing your work [00:05] mscdex: javascript++ [00:05] v8bot: mscdex has given a beer to javascript. javascript now has 1 beers. [00:05] n2liquid: n2liquid++++ [00:05] n2liquid: aw =\ [00:06] mscdex: n2liquid: i suppose, but if projects are abandoned, they most likely have to be modified to work with the newest versions of node [00:06] timcosgrove has joined the channel [00:06] mscdex: oh, and it looks like udp performance has improved since i last tried rtp [00:06] timcosgrove has left the channel [00:06] mscdex: :D [00:07] n2liquid: mscdex: it turns out many of my needs could be so abstract they wouldn't even depend on Node [00:07] n2liquid: I mean [00:07] n2liquid: if you used http.createClient and it got deprecated, your code is deprecated [00:07] n2liquid: but if you abstracted HTTP usage that would be no problem [00:07] mediahack has joined the channel [00:07] mikeal has joined the channel [00:07] mscdex: you'd need some kind of api for the abstraction [00:08] mscdex: and that could change [00:08] mscdex: :S [00:08] n2liquid: mscdex: suppose I just need to HTTP GET [00:08] n2liquid: ok? [00:08] mscdex: http.get() [00:08] n2liquid: hold on [00:08] mscdex: that's always been the same [00:08] mscdex: :P [00:08] n2liquid: huh, ok [00:08] n2liquid: does it work on browsers? [00:09] mscdex: no, but browsers are limited when it comes to making requests like that [00:09] n2liquid: in any case [00:09] mscdex: and you have to worry about cross-browser issues [00:09] n2liquid: suppose you're going crazy [00:10] n2liquid: and you suddenly realize your module should RPC something written in another language [00:10] n2liquid: that would use a protocol entirely different from HTTP [00:10] n2liquid: maybe you're encrypting things in some nasty way [00:10] n2liquid: if you use http.get(), you'd have to change that [00:10] mscdex: https.get() ? [00:10] mscdex: heh [00:10] n2liquid: I said nasty [00:10] n2liquid: think nasty [00:10] n2liquid: (: [00:11] n2liquid: think it's going inside the Linux kernel or some very stupid and lunatic thing [00:11] n2liquid: I mean [00:11] n2liquid: ok [00:11] n2liquid: rare, huh? [00:11] n2liquid: but when you just put export a callback variable to be configured externally [00:11] n2liquid: even the craziest things become possible [00:12] n2liquid: I know it's easy to think: "who's gonna need that?" [00:12] mscdex: i dunno, i guess i just have never had to need that kind of abstraction for projects i've worked on [00:12] FireFly has joined the channel [00:12] mscdex: plus i'm primarily a backend js developer now for the most part [00:12] n2liquid: remember also that's not just for you, but for any crazy japanese that bumps into your code and gives it a new usage [00:13] mscdex: it's so nice not having to worry about cross-browser junk :p [00:13] n2liquid: lol, yeah [00:13] Transformer has joined the channel [00:13] n2liquid: I know [00:13] asdfsafdsa: v8: [00:13] v8bot: asdfsafdsa: undefined [00:13] mscdex: well, anyone who needs that kind of abstraction can just write it themselves [00:13] Emmanuel__ has joined the channel [00:14] jakehow has joined the channel [00:14] n2liquid: mscdex: I generally get really depressed when I bump into those things [00:14] n2liquid: maybe I'm just a bad programmer, lol [00:14] asdfsafdsa: v8: console.log('test'.substring(1, -1)); [00:14] v8bot: asdfsafdsa: "t" [00:15] mscdex: but like i said, lots of modules are not meant to be compatible with the browser because they rely on the specific behavior of core node modules [00:15] asdfsafdsa: v8: console.log('abcd'.substr(1, -1)); [00:15] v8bot: asdfsafdsa: "" [00:15] mscdex: that you can't emulate (very well) in the browser [00:15] n2liquid: eh, sure.. [00:15] mscdex: and even if you could, you'd have to keep tabs on behavior changes in each of the browsers out there [00:15] mscdex: between versions [00:15] n2liquid: but what about other solutions? [00:16] mscdex: and al lthat [00:16] n2liquid: like [00:16] Transformer has left the channel [00:16] n2liquid: there are other CommonJS engines, right? [00:16] n2liquid: implementations* [00:16] mscdex: there are some pure commonjs stuff on the module list [00:16] mscdex: but it's minimal compared to pure node modules because you can't make any assumptions about the environment you're in [00:16] n2liquid: CommonJS specifies that require('http').get() should work? [00:17] mscdex: besides the basic stuff like require() and such [00:17] TheIronWolf has joined the channel [00:17] n2liquid: mscdex: I'll give you an example of something I've been working on [00:17] asdfsafdsa: Is there a way to get the length up to the semi last character with substring or substr using a negative number? [00:17] Casperin has left the channel [00:18] mscdex: asdfsafdsa: lastIndexOf ? [00:18] mscdex: wait, semi last character? [00:18] hank_ has joined the channel [00:18] awenkhh has joined the channel [00:19] n2liquid: it's an authentication framework, meant for people to authenticate with services like Twitter and etc in a standard way [00:19] n2liquid: I know there's OAuth [00:19] n2liquid: and OAuth libraries [00:19] n2liquid: but still some things could be made easier [00:20] asdfsafdsa: mscdex: like 'abcd'.substring(0, -1) [00:20] copongcopong has joined the channel [00:20] n2liquid: the framework contains drivers for each service, and in the repo they're all inside a drivers/ subdir [00:20] asdfsafdsa: mscdex: i want 'abc' [00:20] n2liquid: at first I did if (using_node) { loadEverythingFrom('drivers/'); } [00:20] mscdex: asdfsafdsa: not afaik, you'll have to use .length-1 or something [00:21] saikat has joined the channel [00:21] n2liquid: but then I noticed I could write another module, node-authmein, that used authmein (the core framework module) and used node to list all the drivers and send them to authmein [00:21] asdfsafdsa: mscdex: i thought there might be a shortcut for it. oh well [00:21] n2liquid: that way authmein earned a very pure API [00:22] eb4890 has joined the channel [00:24] jtrudeau has joined the channel [00:28] realazthat_ has joined the channel [00:28] awenkhh has joined the channel [00:28] llkazu has joined the channel [00:31] a|i has joined the channel [00:34] llkazu: i assume folks would love a free-as-in-donations, reliable, scalable nodes hosting service? [00:35] mscdex: the more the merrier! [00:35] mscdex: ;) [00:35] losing has joined the channel [00:35] llkazu: so far none of the existing solutions do it right :-p [00:36] muz1 has joined the channel [00:36] highermath_away has joined the channel [00:38] ryanfitz has joined the channel [00:40] eee_c has joined the channel [00:40] febits has joined the channel [00:40] techwraith has joined the channel [00:42] langworthy has joined the channel [00:44] hello_ has joined the channel [00:45] frank06 has joined the channel [00:45] mcastner: so if I forked a project on github just to change xml2js to xml2js-expat [00:45] mcastner: should I do a pull request? hahaha [00:45] hello_: hey guys - i have an object method which uses some callbacks in conjunction with various functions, but i can't seem to use 'this' from within the callbacks. is there something i'm missing or is there some way to get around that? [00:46] frank06: # Fatal error in /usr/local/n/node-v0.4.6/deps/v8/src/heap.h, line 1793 [00:46] frank06: # CHECK(object->IsHeapObject()) failed [00:46] frank06: # Fatal error in /usr/local/n/node-v0.4.6/deps/v8/src/heap.h, line 1793 # CHECK(object->IsHeapObject()) failed [00:46] frank06: ^ is this known? [00:47] hello_: for instance, i'm using an api method which takes a callback, but i need to call that same api object (this.api) from within the callback [00:47] techwraith has joined the channel [00:50] Bwen has joined the channel [00:51] jacobolus has joined the channel [00:52] mscdex: hello_: use a 'self' object that saves 'this' and use that instead [00:52] errorhandler has joined the channel [00:52] errorhandler: is there something like pow (http://pow.cx) for node? [00:53] techwraith: hello_: somewhere before the callback, do var self = this; then use self inside the callback :) [00:53] langworthy has joined the channel [00:53] frank06: any idea what is causing the segfault that i just posted? [00:53] techwraith: errorhandler: not that I know of, but I'd be happy if you built one :) [00:53] mscdex: frank06: what version of node are you using? [00:54] techwraith: frank06: Nope :( [00:54] errorhandler: techwraith: I might have to! [00:54] frank06: same thing happened w/ 0.4.5 and 0.4.6 [00:55] mscdex: frank06: if you can boil it down to a simple test case and post a message about it on the nodejs-dev mailing list, you'll probably get an answer [00:55] hello_: awesome, thanks guys. :) [00:55] mscdex: frank06: v8 developers frequent there and in here [00:55] llkazu: I'm looking for feedback from the community on what you're looking for in a hosting solution. http://qwk.io/bn3 [00:56] llkazu: any feedback would be MUCH appreciated, I want to make sure what I build actually solves someone's problems :-p [00:56] frank06: mscdex: will do. i figured i'd check here first - thanks [00:56] hassox has joined the channel [00:58] janerecny has joined the channel [00:59] LSU_JBob has joined the channel [00:59] xiackok has joined the channel [00:59] LSU_JBob: How do I get past this error? Error: node.js not compiled with openssl crypto support? I've just installed openssl successfully, but how do I recompile now? [01:00] llkazu: LSU_JBob, you running debian or ubuntu or something similar? [01:00] llkazu: (and did you compile your own nodejs to begin with?) [01:01] LSU_JBob: ubuntu and yes i believe so [01:01] LSU_JBob: i got it from the git repo [01:01] llkazu: you need to install libssl-dev [01:01] llkazu: then just recompile as you had before [01:01] llkazu: ./configure --prefix=whereveryouwantit [01:01] llkazu: make [01:01] no-gooder has joined the channel [01:01] llkazu: make install [01:01] llkazu: :-) [01:01] LSU_JBob: what would be an example of "whteveryouwantit" [01:02] llkazu: i usually do /usr, some people do /usr/local [01:02] LSU_JBob: ah ok [01:02] LSU_JBob: i have nodejs installed at /root/node [01:02] LSU_JBob: so just go back into that directory and make then make install [01:02] llkazu: then /root/node [01:02] no-gooder: /usr/local/bin [01:02] llkazu: i suppose so [01:03] llkazu: I'm confused as to why you didn't install it system-wide [01:03] llkazu: that seems silly to me :-p [01:03] LSU_JBob: i'm a newb [01:03] LSU_JBob: learning best practices still [01:03] Bj_o_rn has joined the channel [01:04] llkazu: run ./configure --prefix=/usr/local [01:04] llkazu: then make [01:04] llkazu: then make install [01:04] LSU_JBob: ok [01:04] echosystm: does anyone know if node + npm play nice when installed via brew yet? [01:05] [[zz]] has joined the channel [01:05] errorhandler: I've got npm installed but when trying to require('express') I get a error: Cannot find module [01:06] no-gooder: errorhandler, try to install into /user/local/bin [01:06] LSU_JBob: llkazu: it works! thank you so much! [01:06] LSU_JBob: llkazu++ [01:06] v8bot: LSU_JBob has given a beer to llkazu. llkazu now has 1 beers. [01:06] llkazu: LSU_JBob, no prob :-) don't forget to install npm [01:06] errorhandler: echosystem: I had a lot of trouble installing npm via homebrew I wouldn't if I was you [01:06] LSU_JBob: llkazu: yes I already have [01:06] akl has left the channel [01:06] llkazu: LSU_JBob, you'll need to reinstall it now that you've put node in a different location. [01:06] errorhandler: no-gooder: Install what? [01:07] LSU_JBob: llkazu: ok i will reinstall it then [01:07] jennings has joined the channel [01:07] no-gooder: errorhandler, did you install express framework ? [01:08] errorhandler: yes [01:08] andrewfff has joined the channel [01:08] LSU_JBob: llkazu: all good now, resintalled and everything [01:08] llkazu: woot :-) [01:08] LSU_JBob: llkazu: i'm using the drupal 7 plugin [01:09] johnciacia has joined the channel [01:10] jetheredge has joined the channel [01:12] artilect has joined the channel [01:12] errorhandler: how can I find where npm install packages? [01:13] no-gooder: npm ls [01:14] no-gooder: check it before it's installed correctly [01:15] no-gooder: npm ls installed [01:16] max_dev has joined the channel [01:16] no-gooder: also check npmrc file to see where your modules installed [01:16] errorhandler: empty [01:17] mikeal has joined the channel [01:17] no-gooder: ? [01:17] xastey has joined the channel [01:17] errorhandler: npmrc is empty [01:18] Phyllio has joined the channel [01:18] Vertice has joined the channel [01:18] errorhandler: I just want to know the directory where the packages are installed [01:19] llkazu: errorhandler, chances are they're in /usr/lib/node or /usr/local/lib/node [01:19] F1LT3R has joined the channel [01:20] hassox: ezmobius hey mate you here? [01:20] hassox: bah [01:22] Schmallon has joined the channel [01:24] eyesUnclouded has joined the channel [01:25] no-gooder: my modules are in /var/www/node modules [01:25] gazumps has joined the channel [01:26] llkazu: o.o [01:26] llkazu: scary [01:27] errorhandler has joined the channel [01:27] errorhandler: is there a refreshing server for node? [01:28] errorhandler: I saw a script that would refresh when the file was changed.... I can't find it [01:28] ckknight: supervisor, errorhandler [01:28] errorhandler: ? [01:28] ckknight: https://github.com/isaacs/node-supervisor [01:28] errorhandler: thanks [01:29] ryanfitz has joined the channel [01:31] ckknight: Hey all, I added client-side URL generation to my routing library, so that you could generate URLs client-side based on server-side configuration. If anyone wants to check that out: https://github.com/ckknight/escort [01:31] olympum has joined the channel [01:32] Opaque has joined the channel [01:35] LSU_JBob has joined the channel [01:36] kriszyp has joined the channel [01:38] perlmonkey2 has joined the channel [01:39] stagas has joined the channel [01:41] stagas has joined the channel [01:42] sako has joined the channel [01:44] stagas has joined the channel [01:48] mdwright_laptop has joined the channel [01:48] JasonCoffin has joined the channel [01:48] mdwright_laptop: I'm using fs.stat to look at some of the details of the file. How can I access the filename in the callback if I'm doing this for a list of files? I know I always have the option of using the synchronous version, but I'd prefer not to [01:54] secoif has joined the channel [01:54] JojoBoss has joined the channel [01:56] pHcF has joined the channel [02:00] Kami_: mdwright_laptop: well, if you use fs.stat you already know the file path and to get only the filename you can just use path.basename(filePath) [02:02] mdwright_laptop: Kami_: Yeah, I'm iterating through a list of files though, so when I need the filename, the variable that's held it has been replaced. I suppose I could wrap the whole thing in a closure, but I'm not sure I gain any performance by being asynchronous then. [02:05] b0t` has joined the channel [02:05] Aria: Cost of closure vs cost of disk access? no contest. [02:06] pauls has joined the channel [02:06] ckknight: closures are super fast in V8 [02:06] pauls has joined the channel [02:06] ckknight: making a billion of them might take a little while [02:06] mdwright_laptop: Aria: No, you're right. I was thinking the closure might not return until I had done disk access anyways, but that wouldn't be the case [02:06] ckknight: but a thousand would even be fine [02:06] pauls: anyone know why i'd get a connect error "500 TypeError: Cannot call method 'toString' of undefined" only when going to www.server.com instead of server.com? [02:06] febits[0] has joined the channel [02:06] perlmonkey2 has joined the channel [02:07] pauls: stack: http://pastebin.com/h1mWBEaL [02:07] ckknight: see what the code is. It's open-source. [02:07] Aria: Yeah, not at all. It might be a wash if the OS cache is hot, but that's only a rough order of magnitude guess. [02:07] ckknight: line 136 of connect-mongodb.js [02:09] pauls: derp. okay :) [02:10] pauls: data.session must be undefined [02:12] jjmalina has joined the channel [02:13] samsonjs_ has joined the channel [02:13] pauls: ticket mde.. https://github.com/masylum/connect-mongodb/issues/13 [02:17] chrislorenz has joined the channel [02:18] Phyllio has joined the channel [02:20] eyesUnclouded has joined the channel [02:21] losing has joined the channel [02:21] cloudhead_ has joined the channel [02:22] pauls: anyone worked with node apn? https://github.com/argon/node-apn [02:23] jacobolus has joined the channel [02:24] A_Nub has joined the channel [02:25] mdwright_laptop has left the channel [02:26] ckknight: has someone written a bittorrent server in node yet? [02:26] febits has joined the channel [02:26] A_Nub: to host torrent files? [02:26] A_Nub: bit torrent is client client [02:26] A_Nub: other than trackers [02:27] ckknight: no, I mean an announcer [02:28] jaket has joined the channel [02:28] A_Nub: did you check modules? [02:28] A_Nub: https://github.com/WizKid/node-bittorrent [02:28] ckknight: well, that's still a client, actually [02:29] A_Nub: Ok I didnt read it ;) [02:29] jacobolus has joined the channel [02:29] A_Nub: by the same guy [02:29] A_Nub: https://github.com/WizKid/node-bittorrent-tracker [02:31] AAA_awright: Is anyone else using node-irc? It isn't detecting time-out disconnections and reconnecting [02:32] AAA_awright: ...Should an IRC client be able to? [02:33] A_Nub: yea [02:33] A_Nub: mine does [02:33] A_Nub: But it means you need to cache passwords [02:33] A_Nub: which some people don't like [02:34] AAA_awright: Well I'm talking about an IRC bot so that's not much of an issue [02:34] A_Nub: oh yea [02:34] A_Nub: well it should reconnect [02:35] A_Nub: otherwise it would be bad bot if u had to manually reconnect [02:36] chrislorenz has joined the channel [02:36] A_Nub: the idea of bot usually mean autonomous [02:41] muz1 has joined the channel [02:44] Wraithan has joined the channel [02:45] Wraithan: Is there a reason/way to prevent https://gist.github.com/923676 from taking up 400mb of ram after a couple days of running? [02:45] Wraithan: (aka I am new to node so how did i mess up) [02:46] losing has joined the channel [02:47] A_Nub: Wraithan: are you joking? [02:47] Wraithan: A_Nub: nope [02:47] ngs has joined the channel [02:49] kawaz_work has joined the channel [02:50] A_Nub: I dont see how it can take up that much ram [02:50] Wraithan: A_Nub: nor I, but it was after about 3 days, maybe a little more maybe a little less [02:51] Wraithan: I wrote it to play with things, it isn't how I plan on consuming my redis queue, but when I noticed I had problems I decided I'd ask to see what I did wrong. [02:51] A_Nub: Wraithan: sounds like garbage collection is not working [02:52] A_Nub: blpop returns the two element multi bulk [02:52] ngs has joined the channel [02:52] A_Nub: its like that is being retained [02:52] A_Nub: is my guess [02:53] A_Nub: try var tmp = client.blpop….; [02:53] A_Nub: delete tmp; [02:53] A_Nub: see if that accumulates the same ram [02:53] A_Nub: (warning this could be potentially dangerous) [02:53] jetheredge has joined the channel [02:53] A_Nub: on dangerous to items in the redis stack [02:53] A_Nub: but [02:53] A_Nub: it might confirm the garbage collection problem [02:54] A_Nub: by the redis stack I mean its ram [02:54] A_Nub: but since its poping [02:54] A_Nub: i doubt it will cause aproblme [02:54] A_Nub: problem* [02:56] ianfarrell has joined the channel [02:59] bingomanatee has joined the channel [03:01] Eber has joined the channel [03:03] chrislorenz has joined the channel [03:04] tedsuo has joined the channel [03:04] ryanfitz has joined the channel [03:04] ianfarrell has joined the channel [03:05] zubin_ has joined the channel [03:06] yozgrahame has joined the channel [03:06] zubin_: Sup everybody -> wanted y'all to try this self-expiring node powered chatroom - Chrome, FF or iOS only for now... room expires in 50 mins... [03:07] zubin_: link: https://shh.sh/p497d1c7318d4bc59ad6456c370b04e6e [03:08] k1ttty has joined the channel [03:09] Wraithan: A_Nub: cool, I'll give that a go, thanks! [03:12] ianfarrell has joined the channel [03:13] llkazu: lol, more chatrooms! [03:13] Wraithan has left the channel [03:15] monokrome has joined the channel [03:15] monokrome: hey [03:15] Aria has joined the channel [03:16] monokrome: What is the error that I need to catch in order to prevent my express app from crashing? [03:16] monokrome: I tried: app.on('unhandledException', function (err) { }) [03:16] monokrome: but that didn't help [03:17] tbranyen: monokrome: process.on('unhandledException' [03:18] monokrome: Is process a global? [03:18] tbranyen: yea [03:19] monokrome: process.on('unhandledException', function (err) { console.dir(err) }) [03:19] monokrome: That isn't working [03:21] tbranyen: maybe its uncaught [03:21] tbranyen: did you look it up? [03:21] tbranyen: or are you guessing like me? [03:21] monokrome: Yeah, everywhere I saw used 'unhandledException' [03:21] eventi has joined the channel [03:21] monokrome: ah [03:21] monokrome: It is uncaught though :) [03:21] monokrome: Thanks for your help. [03:21] tbranyen: np [03:23] monokrome: Now back to figure out this ECONNREFUSED :( [03:23] xtianw_ has joined the channel [03:25] zcopley has joined the channel [03:25] tbranyen: monokrome: the password is GUEST [03:26] Bloc has joined the channel [03:26] creationix has joined the channel [03:26] Bloc has joined the channel [03:27] omni5cience has joined the channel [03:27] creationix: Is there a good build of gnome3 and gtk3 for Ubuntu yet? [03:27] monokrome: tbranyen: what? [03:28] creationix: oops, wrong room ;) [03:28] cloudhead has joined the channel [03:28] tbranyen: gnome3 looks ugly man you gonna hate yourself [03:28] tbranyen: although isn't it all web sexiness based [03:28] creationix: the window manager is written in JavaScript [03:28] creationix: and I think the theming engine uses a css parser [03:29] creationix: this community has spoiled me [03:29] creationix: I can't seem to get any answers from anyone in gnome land [03:29] halfhalo: ew, gnome 3 [03:29] tbranyen: heh, latest gtk supposedly will have web interoperability or something too [03:30] tbranyen: i'll believe it when i see it [03:30] creationix: like gtk implemented in html? [03:30] astropirate: Gnome panel is pretty good looking. the Only i had with it was it was uber un customizable :( [03:30] HelenWaite has joined the channel [03:30] creationix: gnome-shell you mean? [03:31] halfhalo: can't stant gnome 3, nor unity [03:31] tbranyen: creationix: gtk [03:31] tbranyen: i dunno what gnome-shell is [03:31] astropirate: creationix, hehe yes thats what i mean [03:31] astropirate: gnome-shell is what you think of when you think gnome 3 [03:31] tbranyen: oh talking to astropirate [03:31] muz1 has joined the channel [03:32] creationix: astropirate: right [03:32] tbranyen: http://tech.slashdot.org/story/11/03/17/1739233/Gtk-32-Will-Let-You-Run-Applications-In-a-Browser [03:32] tbranyen: just seems so out of scope i don't even get it [03:32] marcello3d: is there any way to get a serialization of a closure's scope? [03:32] astropirate: I'm a Qt guy :) [03:32] creationix: tbranyen: I think that's just some vnc like thing [03:33] tbranyen: astropirate: get us bindings to qt pls [03:33] llkazu: <3 qt [03:33] creationix: marcello3d: not in vanilla js [03:33] marcello3d: in node.js? [03:33] creationix: I think QT is ugly (the ui) [03:33] astropirate: tbranyen, i was thinking that then was like ssssssssss that sounds like too much work [03:33] astropirate: creationix, lol seriously? [03:33] creationix: I really like the gnome look [03:33] tbranyen: creationix: oh thats not what i thought at all [03:34] astropirate: Opera has a beautiful UI and it uses Qt [03:34] creationix: heh, I also think opera is ugly [03:34] astropirate: :( [03:34] creationix: I guess I'm uniform with taste [03:34] tbranyen: opera ugly no way [03:34] marcello3d: yea it's pretty ugly [03:34] marcello3d: on mac os x anyway [03:34] deepu has joined the channel [03:34] astropirate: Opera is beautiful but i don't like using it. Its a bit querky [03:35] creationix: I think chrome is pretty [03:35] creationix: simplicity is my style [03:35] astropirate: its mehh [03:35] llkazu: i <3 chrome [03:35] llkazu: opera is meh [03:35] astropirate: I'd take anything over the Mac theme though.. w/e its called [03:35] creationix: I just want a way to write native desktop apps with node [03:35] astropirate: gnome kde w/e [03:36] creationix: I was thinking some sort of webkit bindings [03:36] marcello3d: prism? [03:36] tbranyen: lol chrome does not have simplicity over my opera config [03:36] creationix: where you had a webview and that was your app [03:36] astropirate: Air is propitiatory right? [03:36] marcello3d: http://prism.mozillalabs.com/ [03:37] mikeal has joined the channel [03:37] creationix: yeah, prism is no good, I don't want xulrunner [03:37] creationix: way too much bloat for my needs [03:37] astropirate: *proprietary [03:37] marcello3d: can't help you there [03:37] jesusabdullah: Sup creationix ! Long time no see [03:37] creationix: I mean, how hard can it be to have a webkit window [03:37] creationix: jesusabdullah: hey [03:37] k1ttty has joined the channel [03:37] creationix: webOS has kept me pretty busy lately [03:38] halfhalo: suuure [03:38] halfhalo: :p [03:38] tbranyen: creationix: yeah i'm with you on the native apps stuff, i wanted to slowly port over some opengl methods to just get a basic display window created [03:39] tbranyen: so i could pump rgb image data and get a video feed of the kinect depth map [03:39] mansoor-s: So has node.js just killed Google go in its crib? [03:39] tbranyen: qt or gtk bindings would be nice too [03:39] creationix: tbranyen: once I get node-gir finished than it's trivial to make a webkitgtk window [03:39] bnoguchi has joined the channel [03:40] creationix: and the contents could be all html + css so it wouldn't have to look like gnome [03:40] halfhalo: hmm.... wonder if titanium could be messed with for stuff [03:40] mansoor-s: creationix, node-gir? link please [03:40] tbranyen: node-ffi :( [03:40] tbranyen: isn't that gonna be slow as p? [03:40] creationix: https://github.com/creationix/node-gir [03:40] creationix: tbranyen: slow is relative [03:40] tbranyen: creationix: i dunno seems ffi has a lot of hate around it [03:40] creationix: I'm not making millions of ffi calls per second [03:40] deepu: i was trying to connect mongodb to nodejs .. does it requires to load any drivers for it [03:41] tbranyen: creationix: i'll fork your project and see if i can help any, i'm not as good as samcday at bindings, but i've written a couple [03:41] deepu: is there any good tutorial for connecting node.js with mongodb [03:41] creationix: also we could do like the seed guys did and have native bindings for performance sesitive things and ffi for the rest [03:42] langworthy has joined the channel [03:42] creationix: tbranyen: I have very little C experience and finding good docs for gnome things is like pulling teeth [03:42] tbranyen: oh you only hvae a readme atm [03:42] tbranyen: forked that for nothing heh [03:43] creationix: tbranyen: yeah, I spent all day today writing an app using seed to get a feel for gir from javascript [03:43] creationix: it's not too bad, once you know gtk [03:43] creationix: https://github.com/creationix/webOS_IDE/blob/master/app/CodeEditor.js [03:44] creationix: seed's module system is really weird though [03:44] ryan0x2 has joined the channel [03:44] jesusabdullah: I'd hang and chat but shit's going down in my living room, [03:44] jesusabdullah: Saturday game night! [03:44] halfhalo: ACTION likes where that ide is going [03:44] jesusabdullah: Also planning my trip to the bay [03:44] tbranyen: creationix: imports thing? [03:44] jesusabdullah: If any of you are in PNW and want to meet up, gimme a pm and maybe I'll drop by! [03:44] jesusabdullah: This would be in June sometime [03:45] creationix: imports for ffi and builtins and Seed.include for js modules [03:45] creationix: but include is just a load+eval [03:46] creationix: halfhalo: yeah, we need a tool, I'm just having a hard time finding a good gui kit for node [03:46] tbranyen: oh right forgot you work for palm xD [03:46] creationix: halfhalo: open the glade file in resources for a rough idea of how it looks [03:47] tbranyen: webos is the only mobile platform i'd be serious developing for [03:47] halfhalo: I usually just use textmate, but thats mac only, which sucks [03:47] halfhalo: ACTION is trying to get an internship there this summer [03:47] creationix: halfhalo: yeah, I use gedit or vim [03:47] tbranyen: tried winmo, iphone, and android and couldn't get into any of them [03:47] creationix: but the problem is it's a pain to transfer files, clear the webkit cache, package ipks, etc... [03:47] creationix: a custom gui with an explicit workflow for webos would rock [03:48] halfhalo: I have been playing with sublime 2, but havent forked over the cash due to it being alpha/beta right now [03:49] creationix: hmm, haven't heard of that one, is it a textmate clone? [03:49] halfhalo: its similar [03:49] creationix: gedit is actually quite similar once it's customized right [03:49] halfhalo: mac/win/linux as well [03:49] ziro` has joined the channel [03:49] tbranyen: sublime has that cool minimap [03:49] tbranyen: that i want to port over to vim [03:50] tbranyen: one of these days... [03:50] halfhalo: I refuse to use linux on any of my computers as the main os [03:50] tbranyen: really? [03:50] halfhalo: I do not want to deal with all the hassle it entails [03:50] tbranyen: laptop, server and desktop are all arch linux now [03:50] creationix: halfhalo: exactely why I use linux, I don't want the hassle from others [03:50] tbranyen: its been pretty liberating [03:50] halfhalo: I do dev on a mac [03:51] tbranyen: yeah mac works too, but linux by far is easier to dev on [03:51] creationix: well, ubuntu and sometimes arch, the other linuxes are a lot of hassle [03:51] creationix: I do miss dtrace from osx sometimes though [03:51] systemfault: tbranyen: The rolling release model never caused you any problem? [03:52] AAA_awright: Releases suck. Majorly. [03:52] creationix: wow, sublime 2 is ugly, what's it gui toolkit? [03:52] creationix: and it's about page won't close on my window manager [03:52] halfhalo: I tried using ubuntu on my laptop... I really did... but I just couldn't. It pissed me off to much [03:52] stephen_mcd has joined the channel [03:52] creationix: halfhalo: depends on the hardware, some simply won't support it [03:52] tbranyen: ubuntu pisses me off too, which is why i use arch ;-) [03:53] creationix: it's not like osx runs on more hardware than ubuntu [03:53] AAA_awright: Which is why I use Gentoo [03:53] tbranyen: start minimalist and work your way up [03:53] creationix: yeah, if you have the time, arch is a real treat [03:53] tbranyen: AAA_awright: if gentoo doesn't piss you off, you arne't doing it right [03:53] halfhalo: creationix: its not the hardware, its little things in the ui that add up and annoy the crap out of me [03:53] AAA_awright: pffft [03:53] systemfault: Arch is a must :) [03:53] creationix: no, other than compile time, gentoo is nice [03:53] joshthecoder has joined the channel [03:53] creationix: but arch feels a lot cleaner and more modern [03:54] AAA_awright: Is YOUR kernel 3.6M? [03:54] systemfault: creationix: Compile time is the reason why it shouldn't be used :P [03:54] creationix: plus is suppports binary packages out of the box [03:54] tbranyen: emerge --update world *snore* [03:54] tbranyen: wake me up in 6 or 7 hours [03:54] creationix: 6 hours, not a bad machine [03:55] tbranyen: AAA_awright: nope as bleeding edge as arch gets i prefer to work with the stable 2.6.* [03:55] mscdex: i use lunar linux on my old epia board [03:55] mscdex: :-D [03:55] tbranyen: although tbqh i've never heard of 3.6M [03:56] tbranyen: i'm sure googling will enlighten me [03:56] creationix: what's the average size of an ubuntu kernel? [03:56] AAA_awright: For my servers I've got one machine doing the compiling which pushes the updates out to the other VPSes with less memory, it works really well [03:56] systemfault: I have 4GB of ram ;) [03:56] AAA_awright: I'm booting up my Ubuntu system right now to see [03:56] Astro has joined the channel [03:56] tbranyen: oh lol Megs [03:56] tbranyen: -_- [03:56] AAA_awright: I pulled it off of ls -lah [03:57] systemfault: 4MB on ubuntu server... [03:57] secoif has joined the channel [03:57] doubletap has joined the channel [03:57] creationix: ubuntu server is pretty lean [03:57] doubletap has left the channel [03:57] creationix: reminds me of arch, but not quite as vanilla [03:57] systemfault: Arch is simply the best [03:57] creationix: I've always liked vanilla gnome over the ubuntu customized one [03:57] tbranyen: arch just has really great support in irc, wiki, aur, etc [03:58] halfhalo: ACTION busts out win 200 advanced [03:58] tbranyen: i've never found myself wondering how to do something [03:58] halfhalo: awwwww yeah [03:58] AAA_awright: 4.4M kernel plus 13M initrd whatever that does [03:58] systemfault: I would use it at work but I fear that the rolling release model might cause me problems.. [03:58] tbranyen: halfhalo: awww yea dude all my windows vms atm are nlite'd win2k [03:58] creationix: I can't believe unity if the default in 11.04 [03:58] systemfault: creationix: Yeah, it's very stupid. [03:58] AAA_awright: It's crashed on me about a dozen times now. [03:58] systemfault: creationix: The shell is nowhere near being ready [03:59] creationix: though, I will say gnome-shell isn't any more stable in ubuntu [03:59] deepu: hi i was trying to connect mongodb with nodejs using http://paste.ubuntu.com/595029/ i get an error that Db is not defined [03:59] systemfault: creationix: It's worse. [03:59] creationix: has anyone tried it with arch [03:59] systemfault: creationix: Stability-wise [03:59] creationix: systemfault: right [03:59] systemfault: creationix: Because compiz is a lot more mature than mutter [03:59] creationix: I mean, it's not like gnome3 is beta or anything, it's been out for a while now [03:59] tbranyen: :-/ nope i've been using awesomewm and openbox/xfce [03:59] tbranyen: cause like awesome has awesome in the name [04:00] tbranyen: we should just make our own wm, how hard could it be D: [04:00] systemfault: Ewww [04:00] creationix: tbranyen: exactely why I want good gui bindings for node [04:00] systemfault: XLibs... are... awful [04:01] creationix: tbranyen: gnome-shell is spidermonkey and written in javascript [04:01] tbranyen: what a bunch of queercakes using spidermonkey [04:01] creationix: of course, using clutter and others to do the heavy lifting [04:01] creationix: gjs is spidermonkey and seed is javascriptcore (webkit js) [04:02] deepu: hi i was trying to connect mongodb with nodejs using http://paste.ubuntu.com/595029/ i get an error that Db is not defined [04:02] tbranyen: you keep mentioning seed, i'll need to look that up [04:02] tbranyen: oh lol thats basically what you're doing with node [04:02] creationix: tbranyen: http://live.gnome.org/Seed and here is a seed app I've been working on today. https://github.com/creationix/webOS_IDE [04:03] tbranyen: creationix: yeah i was looking at the source that explains why it doesn't look like node xD [04:03] tbranyen: i figured you had some weird loader someplace [04:03] creationix: no, I much prefer vanilla node requires [04:03] creationix: I hate custom loaders [04:03] llkazu: soooo who thinks i can build a fully-functional, scalable, reliable nodejs hosting service by this time tomorrow! [04:03] tbranyen: god damnit i want that in node so bad [04:04] tbranyen: i'd even use gnome [04:04] creationix: tbranyen: node-gir, how hard can it be? [04:04] andrewfff has joined the channel [04:04] deepu: i am still strugling to connect database.. god knows about total app [04:04] creationix: deepu: sorry, I've never used mongo [04:05] tbranyen: creationix: have you done any more than the readme yet? [04:05] llkazu: deepu, whats your problem? i use mongo [04:05] deepu: ok [04:05] deepu: i am still strugling to connect database.. god knows about total app [04:05] deepu: hi i was trying to connect mongodb with nodejs using http://paste.ubuntu.com/595029/ i get an error that Db is not defined [04:05] llkazu: ACTION looks [04:05] deepu: i got an error [04:05] llkazu: which driver are you using [04:05] creationix: tbranyen: nothing substantial [04:05] tbranyen: creationix: so you aren't married to the ffi idea? [04:05] Viriix has joined the channel [04:05] creationix: tbranyen: I went through pquerna's old article on writing node extensions [04:05] deepu: i am new to nodejs i dont know which driver to use actually [04:06] llkazu: deepu, i'd suggest starting with mongoose then. [04:06] monokrome: Does fs.readFile transparently create a variable called path somehow within the handler function? [04:06] llkazu: http://mongoosejs.com/ [04:06] llkazu: its more.. ORM-ish [04:06] creationix: tbranyen: I like ffi because it makes building easier [04:06] creationix: and then you can access anything in the gnome ecosystem [04:06] deepu: #llkazu thanks [04:06] tbranyen: i don't see how you can't do that with native bindings either, i think once you see some of the code the pattern is quite easy to get by with [04:06] creationix: monokrome: no, why [04:06] llkazu: no probably [04:06] tbranyen: and you don't really need to worry about scaling [04:06] llkazu: *problemo [04:07] monokrome: creationix: Because I am getting a 'path' variable changed for no apparent reason [04:07] tbranyen: since its only going to run on a single machine [04:07] creationix: tbranyen: exactely [04:07] monokrome: creationix: http://paste.pocoo.org/show/373108/ [04:08] monokrome: On line 10, path is the result of require('path') as expected [04:08] creationix: monokrome: like 34 [04:08] creationix: btw, this is why I CamelCase my modules when I require them [04:08] monokrome: on like 13, it's set to the same value as default_styles_route [04:08] creationix: reduces accidental conflicts [04:08] monokrome: oh jeez [04:08] monokrome: I didn't use var [04:08] creationix: yep [04:09] halfhalo: ACTION prefers random var names like... iuasheu24hiu231ib2 [04:09] monokrome: That still doesn' explain why on like 10 it's what I expected it to be [04:09] monokrome: but oh well. Thank you :) [04:09] monokrome: ACTION changes it to, var route = route || default_styles_route [04:10] Twelve-60: how to catch an ETIMEDOUT for a http.get request? [04:10] creationix: monokrome: good question, I'd assume 34 executes before the get_stylesheet function [04:10] monokrome: creationix: But the configure_styles function sets up the view routing [04:10] monokrome: So, the view can't be called before that line executes [04:10] creationix: dunno [04:11] monokrome: Oh well. Hehe :) [04:11] creationix: I occasionally run code through jslint to find errors like that [04:11] creationix: it's really good at pointing out accidental globals [04:11] ryanfitz has joined the channel [04:12] creationix: tbranyen: so you said you have C experience? [04:13] tbranyen: creationix: i have experience bringing c libs into node yea [04:13] tbranyen: i have libcwiid for wiimote and libgit2 for git [04:13] creationix: I think all I need help with is binding libgirepository.so to node [04:13] tbranyen: my wiimote one isn't released yet since i'm trying to finish a basic game with it [04:13] creationix: and I can do the rest in JS [04:14] creationix: my worry is that the glib event loop will block node's event loop [04:14] creationix: but I think there are ways to make the two share [04:14] tbranyen: creationix: nah you can spawn a second event loo [04:14] tbranyen: p [04:14] tbranyen: i'm doing that with my wiimote stuff [04:14] creationix: right, but the node loop will need to access stuff in the glib loop [04:15] tbranyen: i'm able to emit events from the second loop [04:15] creationix: so both are in the same thread then? [04:15] tbranyen: checking my code to see how this works [04:15] springmeyer has joined the channel [04:16] tedsuo has joined the channel [04:16] tbranyen: oh right i pass in my c++ object instance as data into the libev watcher [04:16] tbranyen: so i can emit events [04:16] creationix: http://software.schmorp.de/pkg/EV-Glib.html [04:16] creationix: I guess it's been solved before, that's good to know [04:16] tbranyen: https://github.com/tbranyen/nodewii/blob/master/src/wiimote.cc [04:17] timmywil_ has joined the channel [04:17] creationix: nice [04:17] creationix: yeah, if you can help me with gir bindings I could have all sorts of fun [04:18] tbranyen: yeah learning libev def helped [04:18] tbranyen: it works like settimeout and setinterval based on the params [04:18] tbranyen: or* [04:18] Ond has joined the channel [04:18] tbranyen: i was accidentally setting a setinterval inside a setinterval before and wondering why only a few events ever emitted xD [04:20] creationix: so I was thinking ffi for now and then native later? [04:20] tbranyen: the original author of the libgit2 bindings for node used ffi [04:20] creationix: since gnome is really pushing gir as a first-class scripting platform [04:20] tbranyen: i dunno [04:20] tbranyen: seems dirty [04:21] creationix: yeah, you lose a lot of protection [04:21] creationix: the flexibility of scripting, but still prone to segfaults [04:21] tbranyen: yea i've been slowly going through all my nodegit code with valgrind looking for segfaults/memleaks [04:22] tbranyen: i've got a few memleaks atm that need to be fixed [04:22] tbranyen: but seems fairly stable for the most part [04:22] creationix: cool, if I ever rewrite wheat I might use it [04:23] muz1 has joined the channel [04:24] Twelve-60: how to catch an ETIMEDOUT for a http.get request? [04:24] tbranyen: i pulled the gobject-introspection project [04:25] tbranyen: http://sharefilewith.me/u/dbcf10.png << lol girepository is quite big [04:25] tbranyen: just a matter of scanning the headers and making a list of all the methods [04:25] tbranyen: figuring out which ones are crucial [04:25] tbranyen: for a demo/getting started [04:25] halfhalo: the ones with a g in their name [04:25] tbranyen: lol [04:26] tbranyen: http://bit.ly/tb_methods << i did this for libgit2 methods [04:26] tbranyen: something similar for this would work well to track [04:27] creationix: wow, that's a nice table [04:27] tbranyen: hell if we could just get the included example to work [04:27] tbranyen: that'd be cool [04:27] tbranyen: glib-print.c [04:27] creationix: wow, that's a lot bigger than I thought [04:28] tbranyen: yeah but 100% coverage isn't required [04:28] tbranyen: ... yet [04:28] creationix: no wonder they have to push people to use it instead of just generating static bindings [04:28] tbranyen: http://pastie.org/1802660 [04:28] tbranyen: is a demo app included [04:28] tbranyen: could start by just implementing those methods [04:28] tbranyen: i wanna see if i can get it to compile and work first tho [04:29] c4milo1 has joined the channel [04:30] creationix: I built seed today [04:30] tbranyen: also i need to do this on a faster computer compiling is so slow on this dual core [04:31] creationix: it was pretty fast, but jsc used a system library [04:31] indutny has joined the channel [04:31] creationix: node without v8, c-ares, or openssl is pretty darn fast too [04:31] creationix: faster even [04:31] tbranyen: once i learned about JOBS=4 on my quad [04:31] tbranyen: holy shit [04:31] tbranyen: compiled in like 45 seconds on a q6600 [04:32] creationix: my z800 at work is beefy [04:32] creationix: since I get to compile webkit, kernel, glib, and node on a regular basis [04:32] halfhalo: ACTION pets his q6600 at 3.6GHz [04:32] creationix: oh, and qt [04:32] tbranyen: ha i've compiled webkit before and that was large too [04:33] tbranyen: when i compiled chrome dev from source [04:33] creationix: about the same as qt if I remember riht [04:33] tbranyen: never again [04:33] creationix: made v8 look tiny [04:33] tbranyen: creationix: how do you like it at palm? [04:33] creationix: it's great, just keeps me a bit busy [04:34] creationix: buy they let me keep speaking at conferences which is great [04:34] creationix: just not much time to hang out in here [04:34] tbranyen: yeah irc at work is a productivity killer [04:34] kriszyp has joined the channel [04:34] creationix: my last job was essentially node evangelism so hanging out in here was sortof part of the job [04:35] creationix: but even then it was a time sink [04:35] halfhalo: heh [04:37] creationix: tbranyen: what sort of minimal sample do you need? [04:37] creationix: kriszyp: evening [04:37] iFire has joined the channel [04:37] kriszyp: hi criswell [04:37] tbranyen: creationix: well just something to see it working in action, even if its just spawning a window [04:37] kriszyp: oops [04:38] kriszyp: hi creationix [04:38] kriszyp: autocomplete fail [04:38] creationix: kriszyp: have you ever worked with gjs or seed (gnome) [04:38] kriszyp: no, I haven't :/ [04:38] creationix: ok, just curios, since you've been doing server-side js since before node [04:39] tbranyen: http://packages.debian.org/sid/libgirepository-1.0-1 also where in the f is the source for this ... [04:39] tbranyen: (and yes i clicked the source button) [04:40] tbranyen: i guess its part of that build i just did, weird [04:40] creationix: kriszyp: that auto-complete failure is actually funny, my last name is "caswell" and I thought you had made a pun of some sort on purpose [04:40] tbranyen: libtool: install: /bin/install -c .libs/libgirepository-1.0.a /usr/local/lib/libgirepository-1.0.a [04:40] tbranyen: awwww yea [04:40] creationix: tbranyen: nice [04:40] tbranyen: sweet so that part is over with [04:41] creationix: tbranyen: you rock [04:41] tbranyen: 1am, skipping church tomorrow woot [04:41] tbranyen: which means my parents aren't buying me breafast :-/ [04:41] seivan has joined the channel [04:41] creationix: heh, I'm teaching sundayschool [04:41] creationix: I'll nap afterwards [04:41] Aikar: um [04:41] tbranyen: haha [04:42] tbranyen: just take a bathroom break and crash for like 30 minutes [04:42] halfhalo: lol [04:42] Aikar: client.on('drain', senddata); senddata(); [04:42] Aikar: if senddata calls .write(), shouldnt that keep pumping data to the stream? [04:42] Aikar: im only getting 1 drain event [04:42] creationix: Aikar: why not use .pipe() [04:43] mscdex: fo reals [04:43] Aikar: im not reading from a pipe lol [04:43] Aikar: i was just trying to write a ton of data at a connection and wanted to use drain instead of setInterval [04:43] Aikar: as a way of "go as fast as you can" [04:43] creationix: ahh, your source isn't a stream, I see [04:44] mscdex: make that sucker a stream! [04:44] mscdex: that'll make your data go pew pew [04:44] Aikar: theres no need in this case lol [04:45] Aikar: im trying to benchmark the receiver end, so the sender is simply just needing to send as much data as fast as possible [04:45] creationix: tbranyen: I think all I need is I give the library the path to a .typelib file and it gives me back all the ffi signatures. [04:45] creationix: wouldn't that be enough for manual usage? [04:45] tbranyen: maybe, can you do that and give me the output? [04:45] tbranyen: i'm just curious as to what the signatures look like [04:46] tbranyen: it does look as tho this lib was designed with ffi in mind [04:46] creationix: it was [04:46] xandrews has joined the channel [04:47] creationix: my other plan was to implement a typelib parser in javascript [04:47] creationix: but that's probably a bad idea [04:47] creationix: seeing how large that library does, there is probably a lot of complexity in there [04:48] Aikar: so my wormhole lib looks to be parsing about 20k messages/sec on 1 process (maxing out a cpu core) [04:48] tbranyen: yeah i'd just like to see that 46 line example code to run in node [04:48] tbranyen: and my familiarity with ffi is pretty weak [04:48] creationix: 46 line gtk sample? [04:48] creationix: in javascript [04:48] tbranyen: http://pastie.org/1802660 [04:48] tbranyen: ths one [04:49] tbranyen: just a 1:1 of that [04:49] Aikar: oh hmm [04:49] Aikar: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND [04:49] Aikar: aikar 13732 75.9 1.1 633928 45820 pts/1 R+ 00:46 2:25 | \_ node sntprecv.js [04:49] Aikar: using process.nextTick isnt even maxing out the cpu [04:49] tbranyen: my philosophy has been to create a 1:1 low level api of a native lib and then a convenience wrapper on top of that [04:50] creationix: tbranyen: sounds like a plan [04:50] tbranyen: even if that means sacrificing some performance [04:50] Aikar: or weird, it is in htop [04:50] creationix: writing layers on top in JavaScript is something I can do [04:50] creationix: I find that in node, it's not always slower [04:50] creationix: the vm is happier when you stay in js land more [04:51] tbranyen: yeah but i mean making calls into c++ is slower [04:51] creationix: true, if it means more calls [04:51] creationix: well, get it working first, if it ends up being a bottleneck, then we can worry [04:51] errorhandler has joined the channel [04:51] creationix: I hate over-complicating things for issues that you might never have [04:51] tbranyen: yea def, even if it bottlenecks (which it won't) can figure out other ways [04:52] creationix: I'm still trying to figure out what that 46 line example does [04:52] errorhandler: which is the best vim plugin for jade.... theres 3 on github? [04:52] tbranyen: heh i ran it and it gave me some weird output [04:53] tbranyen: would probably work better if i actually installed gnome instead of just gnome-common [04:53] Aikar: hell yeah [04:53] Aikar: 36k messages/sec for small "real world" messages [04:53] tbranyen: vm time [04:53] creationix: tbranyen: wait, is it making the ffi call directly? [04:54] creationix: I thought it just returned data [04:54] creationix: ACTION wishes he knew more c [04:54] tbranyen: i wish i knew more about libgirepository [04:54] creationix: Aikar: nice [04:54] tbranyen: but this is just using that library directly without ffi [04:54] ryah: it's really too bad that gnome isn't using node. [04:55] marcello3d: woot [04:55] creationix: ryah: working on it ;) [04:55] marcello3d: mongolian deadbeef v0.1.7 released: https://github.com/marcello3d/node-mongolian [04:55] marcello3d: preliminary support for auth and mapreduce [04:55] marcello3d: but mostly untested because I don't use either personally >_> [04:56] creationix: tbranyen: what was the magic line to compile the file? [04:57] tbranyen: creationix: ./autogen.sh and then running make worked for me [04:57] tbranyen: the actual build line is probably in the Makefile and around the lines of gcc -lgirepository sourcefile.c [04:58] Aikar: @.@ hit 50k/sec now [04:59] Aikar: im making this lib to be used in an rpc framework, so i think this is a pretty good sample data: client.write({call: 'foo', args: [1,2,3,2222,true,"false",{x:'y'}]}); [04:59] Aikar: receivers parsing 50k messages/sec with steady memory [04:59] tbranyen: $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(glib_print_CFLAGS) $(CFLAGS) -MT glib_print-glib-print.o -MD -MP -MF $(DEPDIR)/glib_print-glib-print.Tpo -c -o glib_print-glib-print.o `test -f 'examples/glib-print.c' || echo '$(srcdir)/'`examples/glib-print.c [04:59] Aikar: using msgpack streaming interface :) [04:59] tbranyen: found that line [05:00] creationix: Aikar: very nice [05:00] Aikar: http://github.com/aikar/wormhole [05:01] Aikar: sending is slower than receiving it seems [05:01] creationix: Aikar: it's like socket.io for non-browsers [05:02] Aikar: my send process is pegged at 93-100% cpu with receiver at 80% [05:02] Aikar: creationix: well yeah socket.io is a messaging system [05:02] mikegerwitz has joined the channel [05:02] mikegerwitz has joined the channel [05:02] Aikar: but wormhole is aimed strongly at performance, so im using msgpack [05:02] indutny: ryah: ping? [05:03] Viriix has left the channel [05:03] creationix: Aikar: do you have custom framing or just what's included with msgpack? [05:04] creationix: and are you using msgpack rpc for rpc [05:05] Aikar: no [05:05] Aikar: im building an rpc library [05:05] Aikar: going to be alot more than what msgpack-rpc provides tho [05:05] Aikar: goal is to provide similiar to Erlangs OTP system [05:06] Aikar: you throw a new box into the cluster, and functions just magically call on it [05:06] creationix: I see [05:07] Aikar: but yeah check wormholes source, its not that complicated, mainly relying on the streaming nature of msgpack deserializer [05:07] creationix: tbranyen: want write access to my repo? or do you want to just send me pull requests when you have stuff [05:07] Aikar: i feed mp data, mp informs me when a message is complete [05:07] creationix: Aikar: yeah, I was planning on making something like that for ipc between nodes [05:07] bojicas has joined the channel [05:07] devrim has joined the channel [05:07] tbranyen: creationix: lets see if i can get anything to work, once proof-of-concept is down, write access would be more convenient [05:07] jaket has joined the channel [05:08] iFire has joined the channel [05:08] broofa has joined the channel [05:08] Aikar: looks like im capping out at 50k/sec on a 3.4ghz cpu and im bottlenecked at send level [05:09] Aikar: >>> node sntprecv.js [05:09] Aikar: 18968k: 50.13917268250389 messages/secc [05:09] Aikar: forgot the k on debug line lol [05:09] dguttman has joined the channel [05:10] creationix: I wonder how bad a js parser of typelib would be http://developer.gnome.org/gi/unstable/gi-gtypelib.html [05:10] creationix: that might be enough to get me going [05:10] creationix: I just need to call existing gir libraries [05:10] creationix: I don't want to define my own [05:11] insin has joined the channel [05:12] tbranyen: you know whats nice about JS, theres only like 8 freaking data types [05:12] creationix: are there that many? [05:12] halfhalo: ACTION needs to see what msgpack is, because it sounds similar to one of his ideas he wants to do [05:12] creationix: number, null, boolean, undefined, object, function [05:12] creationix: hmm, string [05:13] Aria: string [05:13] tbranyen: string [05:13] tbranyen: heh [05:13] halfhalo: more than ruby, which has object, object, object and object [05:13] creationix: lies [05:13] Aria: Or immediate object and not-immediate object. [05:13] creationix: it's all propaganda [05:13] Aria: Or a bazillion types of object. [05:13] tbranyen: creationix: also array [05:13] Aikar: ryah: can you give me a quick glance over and see if i did anything wrong here for V8 stuff? https://github.com/aikar/wormhole/blob/master/src/wormhole.cc [05:13] creationix: no, array is just object [05:13] tbranyen: debatable [05:13] Aria: Yeah. Arrays count as a separate type to me, too. They don't work as normal objects do. [05:14] tbranyen: i can create array like objects like function arguments [05:14] tbranyen: but they are not the one true array [05:14] creationix: with es5 you can do it [05:14] halfhalo: to rule them all? [05:14] Aria: Heh, and then there's the arguments type. [05:14] tbranyen: http://perfectionkills.com/how-ecmascript-5-still-does-not-allow-to-subclass-an-array/ [05:14] tbranyen: i think es5 still has some issues [05:14] creationix: ok, fine 8 types [05:14] tbranyen: :3 [05:15] creationix: but only 1 number type [05:15] creationix: and like what, 64 in C? [05:15] tbranyen: creationix: i did like two days worth of msvc++ for mobile dev and wanted to shoot myself [05:15] systemfault: Number is basically a C double [05:15] Aria: Heh. Yeah. [05:15] tbranyen: like 16 different string types [05:15] Wraithan has joined the channel [05:16] kriszyp has joined the channel [05:16] Aria: I really wish Javascript Numbers were exact decimals. [05:16] Aria: I still think that should be the default in most languages. [05:16] Wraithan: Is there a preference (couldn't find any comparisons on the web) in nodegit vs node-gitteh ? [05:17] systemfault: Aria: Number as doubles seems more "natural" to me [05:17] halfhalo: :/ desktop just BSODS [05:17] systemfault: Even though I agree that I would prefer exact decimals [05:17] Aikar: dont use windows ;) [05:17] Aria: If you work in graphics, doubles make sense. If you work with "human" numbers, exact makes sense. [05:17] Aikar: ubuntu ftw [05:17] halfhalo: hothothot case is hot owow [05:17] Aria: I really want both in every language, but I think exact should be the default. [05:18] tbranyen: Wraithan: heh i wrote nodegit samcday wrote gitteh [05:18] Aria: (and I think explicit casts should be needed to convert) [05:18] tbranyen: Wraithan: depends on what you want to do [05:18] samcday: Neither have really been around long enough for there to be a "preference" really ;P [05:18] tbranyen: sam has put a shit load of time into gitteh to make the backend stable [05:19] halfhalo: hmm... I think my computer may have overheated slightly [05:19] Wraithan: tbranyen: using it for a git backed wiki setup [05:19] Remoun has joined the channel [05:19] creationix: halfhalo: that's what happens when you built qt [05:19] Wraithan: tbranyen: is the plan at least [05:19] tbranyen: Wraithan: you'll have better luck with gitteh atm [05:19] tbranyen: more coverage [05:19] halfhalo: the mobo chipset reads 95C [05:20] tbranyen: nodegit is still chugging along [05:20] creationix: halfhalo: ouch [05:20] Aikar: building node debug ver made me think my tower was about to launch off, i had to turn the fans up to max, i usually run them on lowest lol [05:20] mjr_ has joined the channel [05:20] tbranyen: Wraithan: http://bit.ly/tb_methods you can see the coverage i have as of 0.0.3 [05:21] kriszyp2 has joined the channel [05:21] creationix: mjr_: evening [05:21] indutny: how can I build native module w/ "node_crypto.h" include? [05:22] Wraithan: tbranyen: neat spreadsheet! [05:22] chrislorenz has joined the channel [05:22] tbranyen: Wraithan: yeah i need to run through it again to ensure its up-to-date [05:22] tbranyen: another thing to put on my todo list :) [05:23] Wraithan: tbranyen: Thanks for the tips, I'll likely go with gitteh, per your suggestion, though by the time I get to implementing it who knows how the playing field will have changed [05:23] tbranyen: creationix: i'm not opposed to trying out ffi as well if you want to give that a shot on your end [05:23] tbranyen: Wraithan: yeah play with both if you find any bugs in nodegit i'd appreciate them [05:24] tbranyen: watch the project to, i have no intentions on stopping the development till it hits a production ready version [05:24] dandean has joined the channel [05:24] creationix: tbranyen: I'm not sure what I can do on my own [05:24] tbranyen: creationix: oh lol i thought you were gonna try the ffi stuff [05:25] Wraithan has left the channel [05:25] creationix: well, I wanted node-gir to give me the ffi signatures [05:25] iFire` has joined the channel [05:25] halfhalo: ok, computer down from burning temps for now [05:25] tbranyen: creationix: https://github.com/tjfontaine/node-libgit2/blob/master/lib/error.js [05:26] tbranyen: node-ffi looks pretty easy to work with [05:26] creationix: yeah [05:26] creationix: maybe I should just look up the type defs from the typelib or xml gir files [05:26] samcday: ffi looks like alot of overhead though [05:26] creationix: and generate a lot of javacsript [05:26] tbranyen: yea [05:26] samcday: JS -> C++ bridge is already savage enough [05:27] tbranyen: samcday: for this implementation tho, i'm not so sure how crucial speed will be [05:27] creationix: samcday: nah, writing apps in html is slow [05:27] mikeal1 has joined the channel [05:27] creationix: I bet ffi gtk will be a lot faster [05:27] samcday: Fair enough :) [05:27] ajpiaNOU has joined the channel [05:28] mjr_: hey creationix, how goes the world of mobile node [05:28] mjr_: ? [05:28] boaz has joined the channel [05:28] creationix: ok, now to get node-ffi working with node 0.4.6 and npm [05:28] tbranyen: heh i never got node-ffi installed [05:28] cloudhead2 has joined the channel [05:28] tbranyen: took longer than npm install node-ffi so i bailed [05:28] creationix: mjr_: not much going on node side at the moment, we're busy finishing for the june release of the tablet [05:28] tbranyen: creationix: can you hook me up w/ said tablet [05:28] tbranyen: for ... testing [05:29] iFire has joined the channel [05:29] creationix: tbranyen: if only [05:29] mjr_: creationix: I've been digging in to riak for the last few weeks. It's pretty interesting. [05:29] halfhalo: ACTION wants one for testing.... [05:29] timcosgrove has joined the channel [05:30] timcosgrove has left the channel [05:30] sechrist has joined the channel [05:31] creationix: mjr_: yeah, it reminded me of my "advanced OS" class in graduate school [05:31] sechrist: Anybody taken nodelite and compiling it into node? [05:31] throughnothing has joined the channel [05:32] creationix: we learned lots of algorithms and protocols for distributed systems [05:32] mjr_: Lots of things that have the word "lamport" in them [05:32] creationix: yep, those are very useful [05:32] creationix: I had many a quiz and test with "lamport *" things in them [05:32] sechrist: Vax finger worm ftw [05:34] dandean: I was just about to ask a question, then I stopped and read the manual! You're all proud of me, right? [05:34] jacobolus: is there a good way to turn an async API sync? i.e. wrap it in a function that returns a value rather than invoking a callback? [05:34] tbranyen: blasphemy [05:35] halfhalo: whomever made one of those would be both beloved and hated by all at the same time [05:35] jacobolus: the particular example here is the stylus css renderer, which is currently async, but for reasons entirely unclear [05:36] jacobolus: I want to just run this thing in a little offline script; if it's slow, that doesn't matter at all [05:36] muz1 has joined the channel [05:36] jacobolus: tbranyen: so is that a "no" then? [05:37] tbranyen: jacobolus: you can't turn an async library "synchronous" you can make it easier to use higher level, but if it doesn't expose any synchronous methods i don't see how you can make it sync [05:37] jacobolus: basically using this API asynchronously is going to more than double the complexity of my tiny little script [05:37] llkazu: boot makes me grumpy. [05:37] llkazu: *boto [05:37] cloudhead2 has joined the channel [05:37] tbranyen: jacobolus: make wrappers then? [05:37] llkazu: it doesn't properly support route53 yet. [05:38] harth has joined the channel [05:38] jacobolus: tbranyen: that doesn't help anything, if they're also async. oh well, it's not too big a deal [05:38] cloudhead_ has joined the channel [05:38] tbranyen: jacobolus: it reduces complexity which you are complaining about [05:39] jacobolus: the API isn't complex, it's just that if I can do it synchronously I can drop it nicely into my existing structure, whereas if it's async it requires special casing [05:39] jacobolus: nevermind though [05:39] admc has joined the channel [05:40] Phyllio has joined the channel [05:40] creationix: jacobolus: for what it's worth, there are such tools, but they aren't vanilly javascript and change the semantics of the event loop [05:40] echosystm: has anyone here used cloudfoundry? [05:40] creationix: *vanilla [05:40] echosystm: and, if so, how long did it take for your account to be enabled? [05:41] jacobolus: it's too bad I can't say like "block on this execution context until the callback gets called" or similar :) [05:41] llkazu: well [05:41] jacobolus: creationix: yeah, that'd be more trouble than it's worth [05:41] llkazu: put whatever you want to happen enxt [05:41] llkazu: in the callback [05:41] llkazu: et voila, you get the same thing [05:41] creationix: jacobolus: right, you can with coroutine extensions, but I find it's better to just re-organize code [05:42] jacobolus: llkazu: yes, that's fine; it just requires some code rewriting and a result that is rather more complicated than before [05:42] llkazu: only mentally, and only until you get used to it [05:42] jacobolus: no, not only mentally [05:43] jacobolus: also taking up physical characters in my file [05:43] llkazu: lol [05:43] jacobolus: and increasing the nesting depth by a couple indents [05:43] jacobolus: anyway, no worries [05:43] jacobolus: thanks for the replies [05:44] jeffmoss has left the channel [05:44] creationix: jacobolus: you're right. Though with time, you find new techniques for async code and it ends up not being not much more complicated. Plus you can do things that weren't possible with sync code like parallel I/O waits [05:44] ngs has joined the channel [05:44] llkazu: mmmm, parallel io waits <3 [05:44] llkazu: event-driven code, continuation-based design, its all so lovely... [05:44] jacobolus: I've done plenty of event-driven code; it's just sometimes unnecessary [05:45] steph021_w has joined the channel [05:45] tbranyen: creationix: i have 9% battery left, i'm tackeling this in the AM [05:45] tbranyen: i'll hit you up on github/here if i get anywhers [05:45] iFire` has joined the channel [05:46] creationix: tbranyen: ok, I'll not be on much tomorrow [05:46] creationix: it's my day off from programming [05:46] tbranyen: ryah: you're giving up awesomewm for gnome :O [05:46] ngs has joined the channel [05:46] llkazu: bah, engineers never have real days off from programming [05:46] tbranyen: ha my extended weekend is supposed to be off from programming, but i realized i don't do much else since its cold outside [05:47] samcday: http://www.bitcoin.org/ holy shit that looks cool, and kinda scary [05:47] llkazu: its either being typed, or being written in their heads only to be typed later [05:47] timcosgrove1 has joined the channel [05:50] creationix: llkazu: true, but I try [05:50] llkazu: XD [05:50] llkazu: dammit, has nobody built a half-decent library for amazon's webservices? :-( I'm getting to the point that i'll have to build half of my shard management scripts in python! [05:51] llkazu: and i dislike that concept lol [05:51] llkazu: (i love python, but it seems wrong to build half of a nodejs hosting service in python) [05:51] Phyllio has joined the channel [05:52] jjmalina has left the channel [05:52] samcday: llkazu, that's half the fun of node.js, getting to reinvent everything in javascript ;) [05:52] llkazu: bah! humbug :-) [05:52] samcday: But I'm sure I've seen a few amazon libs on module wiki page [05:52] samcday: Maybe that was just s3 though (there's like a billion s3 node libs) [05:52] llkazu: most of them are broken :-/ i've tried 3 so far [05:53] deepu: #llkazu i still find errors in connecting nodejs to mongodb with mangoose [05:53] llkazu: deepu, like what? [05:53] deepu: unexpected identifiers [05:53] llkazu: pastebin [05:54] samcday: mangoose lol [05:54] samcday: Is that like a horrific man/goose experiment gone wrong? [05:54] llkazu: indeed, samcday [05:54] samcday: ACTION tries to imagine what it would even look like. [05:54] llkazu: the thought scares me deeply. [05:55] deepu: #llkazu http://paste.ubuntu.com/595045/ [05:55] insin: honk honk [05:55] sechrist has joined the channel [05:55] llkazu: i think a few puppies died when yu were writing this code. [05:56] deepu: it says connect is not an identifier [05:57] sreeix has joined the channel [05:57] kriszyp has joined the channel [05:57] llkazu: you imported the thing wrong [05:57] llkazu: remove the .Mongoose [05:58] llkazu: var mongoose = require('mongoose'); mongoose.connect('mongodb://krillr:a4bg5ka9@tempest.mongohq.com:10015/krillr_large'); [05:58] llkazu: like that [05:58] llkazu: please ignore the random password from mongohq :-) [05:58] Opaque has joined the channel [05:59] llkazu: …actually, i think i changed that already. so who cares. lol. [05:59] deepu: Object # has no method 'noSchema' [05:59] deepu: i got the above error now [06:00] beejeebus has joined the channel [06:00] llkazu: hmm.... [06:00] llkazu: ya, that seems to have been removed. [06:01] deepu: how to specify username and password in this mongodb [06:01] deepu: i was following http://blog.learnboost.com/blog/mongoose/ tutorial [06:02] doubletap has joined the channel [06:02] llkazu: ancient tutorial is ancient [06:02] llkazu: go here http://mongoosejs.com/ [06:05] timcosgrove has joined the channel [06:05] gazumps has joined the channel [06:05] timcosgrove has left the channel [06:05] timcosgrove has joined the channel [06:06] timcosgrove has left the channel [06:07] iFire has joined the channel [06:08] apang42 has joined the channel [06:08] iFire` has joined the channel [06:10] timcosgrove has joined the channel [06:10] timcosgrove has left the channel [06:15] jetienne has joined the channel [06:16] timcosgrove has joined the channel [06:16] apang42 has left the channel [06:16] saikat has joined the channel [06:18] samcday: Anybody see the ridiculous excuse M$ gave for not even considering to implement WebGL? :P [06:18] timcosgrove has joined the channel [06:18] timcosgrove has left the channel [06:18] skm has joined the channel [06:20] insin: not native enough? [06:20] zomgbie has joined the channel [06:24] samcday: insin: haha ;) That too [06:25] samcday: But apparently because their rendering engine utilizes gpu in pipeline, and chakra does too, they don't need webgl. [06:25] beawesomeinstead has joined the channel [06:25] beawesomeinstead has joined the channel [06:25] Swimming_bird has joined the channel [06:25] ianfarrell: typical microsoft logic [06:25] samcday: Perhaps, but do they really expect people to be that stupid? [06:26] samcday: Software rasterizer on a html5 canvas with awesome gpu optimizations or not, is still not the same as a hardware rasterizer... [06:27] ianfarrell: how is webgl hardware [06:27] ianfarrell: (lost me at gpu) [06:27] samcday: It's an opengl implementation, so it utilizes gpu for 3d rendering [06:27] ianfarrell: okay, that's what i thought [06:28] samcday: Which is going to be ALOT faster than say, writing a software rasterizer (software based 3d scene drawing) in Javascript (using canvas) [06:28] samcday: Even if the JS running in Chakra (IE9 js engine) is getting accelerated by gpu [06:29] samcday: It makes me sad, because if you go check out mrdoob's three.js on a webgl browser, your mind will be fkin blown [06:29] ianfarrell: yeah, i have [06:29] samcday: But 40%+ of the world will not see it [06:29] samcday: ACTION cries in a corner [06:29] altamic has joined the channel [06:30] ianfarrell: does webgl has built-in anti-aliasing support? [06:30] insin: what are they driving at with holding IE back from older versions of windows? All the best alternatives run right back to XP and businesses are often stuck with webapps which only work on earlier versions in any case [06:31] samcday: ianfarrell, probably, webgl is basically just opengl es with a different name ;P [06:32] samcday: insin, Incentivizing upgrading from winxp [06:32] samcday: Same way they tried that by only blockbusters like Halo2 to be run on Vista [06:32] samcday: Which I always thought was hilarious... [06:32] samcday: only allowing* [06:33] tfe_ has joined the channel [06:33] tfe_ has joined the channel [06:34] losing has joined the channel [06:37] matjas has joined the channel [06:38] dmojoryder has joined the channel [06:38] jjmalina has joined the channel [06:42] davidcoallier has joined the channel [06:55] SvenDowideit_ has joined the channel [06:58] wilmoore has joined the channel [06:58] zomgbie has joined the channel [07:00] phluffy has joined the channel [07:03] __tosh has joined the channel [07:07] febits has joined the channel [07:10] sako_ has joined the channel [07:10] mytrile has joined the channel [07:12] Druide_ has joined the channel [07:16] Bj_o_rn has joined the channel [07:17] bojicas has joined the channel [07:17] micheil has joined the channel [07:19] onre has joined the channel [07:21] artilect has joined the channel [07:22] hnguyen_ has joined the channel [07:23] okuryu has joined the channel [07:25] micheil has joined the channel [07:26] enos_feedler has joined the channel [07:27] marlun: Ond: Hello again, I didn't get it working yeasterday (launching editor and getting back to nodejs script after saving). I didn't understand your last answer about launching a new shell. I also asked the question here: https://groups.google.com/forum/#!topic/nodejs/ZLnp0FmWL6Y [07:29] Ond: Hey! I was actually wondering whether you got that to work. [07:29] A_Nub has left the channel [07:29] Casperin has joined the channel [07:30] Ond: I think you want to spawn a new process [07:30] Ond: http://nodejs.org/docs/v0.4.6/api/child_processes.html#child_process.spawn [07:31] saikat has joined the channel [07:32] stride: marlun: vim uses ncurses, even if that works you won't get usable output [07:32] stride: which it presumably won't do because vim never quits / closes STDOUT and exec buffers until it does iirc [07:33] sreeix has joined the channel [07:35] JojoBoss has joined the channel [07:37] davidcoallier has joined the channel [07:37] llkazu: ACTION grumbles [07:37] llkazu: that does it. [07:37] llkazu: I'm not even going to try to write this in javascript [07:37] llkazu: its going to be python [07:38] llkazu: ACTION sighs [07:38] llkazu: yes, thats right, the administrative tools and the API that powers my nodejs hosting service. [07:38] llkazu: will be python. [07:38] llkazu: i know, i know. its terrible. [07:38] llkazu: but it simply can't be done quickly enough in nodejs in a way that makes me happy. [07:40] insin: it's not like you *have* to dogfood it :) [07:40] msucan has joined the channel [07:40] llkazu: but i soooo wanted to :-p [07:40] kawaz_air has joined the channel [07:40] marlun: Ond, stride: What about if I don't get the user but only create a new file and remember the filename, open vim and let the user write to the file and when the user saves the doc and exit vim I get back to the script where I read from the file? [07:40] altamic has joined the channel [07:41] llkazu: ill probably write the first version in python, then slowly redo it in javascript [07:41] sledge has joined the channel [07:42] chapel: llkazu: seems like a cop out [07:42] micheil has joined the channel [07:42] llkazu: more like, "i don't want to spend 2 months rebuilding boto in javascript just for the sake of releasing this service, so I'm going to use a tool that lets me get it done faster" [07:44] chapel: eh, good luck making another hosting service, its not bad to have more, but it just seems like everyone is doing one [07:45] hojberg has joined the channel [07:45] sako has joined the channel [07:46] llkazu: ya, but everyone's doing it so /wrong/. [07:46] llkazu: I've been in the hosting business for 10 years. [07:46] llkazu: and frankly the current offerings appall me. [07:47] llkazu: nodester runs everything off a single machine with no proper load-balancing, redundancy, or anything (though the simple curl-based api is pretty neat) [07:47] llkazu: no.de requires wayyyy too much maintenance for quick-and-dirty application deployment [07:48] llkazu: etc etc etc [07:48] llkazu: plus everyone's in "beta" status right now and won't speak a word about final pricing. [07:49] dahankzter has joined the channel [07:49] lorhko has joined the channel [07:50] marlun: Ond: Also thought I should maybe do spawn('/bin/bash', ['vim', 'tempfile'], function() {...}) but that doesn't seem to work either. [07:50] llkazu: i dunno, maybe I'm just grumpy because i recently had my wisdom teeth taken out :-p [07:51] rchavik has joined the channel [07:53] Emmanuel__ has joined the channel [07:54] Opaque has joined the channel [07:55] Nexxy has joined the channel [07:55] Nexxy has joined the channel [07:56] eb4890 has joined the channel [07:56] marlun: Ond: Argh, I have to go again but if you think of anything please just write it out and I'll check the backlog when I get back :) (or answer the mailinglist thread) [07:56] kawaz_air has joined the channel [07:57] Ond: Alright [07:58] chapel: llkazu: no worries, I don't like nodester, its barely a hello world hosting project [07:58] chapel: no.de is high quality, but it definitely is more involved at the moment [07:59] llkazu: i agree no.de is high-quality, most of joyent's stuff is awesome. [08:00] llkazu: my goal is to build something with the quality and robustness of no.de with the ease-of-use that nodester provides [08:00] llkazu: and hopefully with the awesome add-on services that heroku provides through 3rd-parties. [08:01] akavlie has joined the channel [08:02] fly-away has joined the channel [08:02] eb4890_ has joined the channel [08:02] llkazu: my other goal is to have the main hosting service be purely donation-based, you get as much capacity as you want for free, but you're invited to donate. [08:02] llkazu: premium services i'll be charging for. i haven't quite decided what premium services are though. [08:03] akavlie: what's everyone using for templating with node.js? [08:03] Ond: EJS [08:03] Ond: A lot of people use Jade it seems [08:03] llkazu: akavlie, i've not been doing templating on the server side. i've been using socket.io/nowjs to send data to the browser then using query's built-in template language. [08:03] llkazu: the dojo toolkit has a plugin available that parses django-style templates, too, which i've been pondering looking at [08:04] akavlie: llkazu, you mean jquery's template language? [08:06] Ond: You could also use underscore if you want to go there. You have options. [08:06] akavlie: llkazu, and if you do, it has nothing built in... would it be this? http://api.jquery.com/category/plugins/templates/ [08:06] llkazu: ah, yes, sorry, i forgot it was a plugin. [08:06] llkazu: its supposed to be integrated in eventually [08:06] aurynn has joined the channel [08:07] akavlie: Ond, yeah looked at that too. Seems there are def. plenty of options. [08:07] akavlie: even those that shun traditional templating entirely [08:07] llkazu: TBH unless you absolutely have to, rendering templates server-side is silly. its a waste of consolidated resources. [08:07] llkazu: doing template rendering client-side distributes that load quite well [08:08] llkazu: and makes your server-side stuff more like a web service, and your client-side stuff more like a real web app [08:08] SvenDowideit_ has joined the channel [08:08] llkazu: which is where html5 is really going anyway [08:08] SvenDowideit_ has joined the channel [08:09] akavlie: llkazu, yeah, seems like client-side rendering may be a good idea. [08:09] akavlie: I'm used to Django and other Python stuff. I love the templating there. [08:09] newy_ has joined the channel [08:10] llkazu: ACTION nods [08:10] llkazu: jinja2 is my favorite templating engine ever [08:10] llkazu: i assume you've used it? [08:11] akavlie: llkazu, yep, that's probably my favorite too. [08:12] akavlie: loved Django templates... Jinja2 is very similar but it has some extra capabilities. [08:12] copongcopong has joined the channel [08:12] llkazu: and jinja2 is much faster [08:13] llkazu: i've always been annoyed with how slow django templates are out of the box [08:13] akavlie: how do you even notice a difference in speed? I don't. [08:13] akavlie: benchmarks? [08:14] llkazu: practice :-p i've got a web app that gets 25m+ views per day, the only way i can keep it running on the 3 machines i've got is to use jinja2 instead of django templates. [08:14] akavlie: Anyway I like all the stuff you get w/ those template languages like filters. And I much prefer curly braces to <%= %> syntax. [08:14] llkazu: the pages are MASSIVE, usually around 1MB, with long iterations over long lists. thats where django templates really fall down [08:15] llkazu: +1 [08:15] Ond: If you're using express you can set the open/close tokens [08:15] akavlie: llkazu, which app?? [08:15] llkazu: http://search.secondlife.com/ :-) [08:15] stride: akavlie-- for reminding me of JSP on a sunday. [08:15] llkazu: i work for linden lab [08:15] stride: :) [08:16] akavlie: wow [08:16] coreb has joined the channel [08:16] zcopley has joined the channel [08:16] qFox has joined the channel [08:16] akavlie: stride, is <%= %> JSP? I just know it from ERB and some of the JS templating libraries I was looking at tonight which parrot it. [08:16] llkazu: this page took 2.5 second to render with django templates: http://world.secondlife.com/place/60f4adf7-d7c7-76d1-ca61-11ccc83af23e [08:17] llkazu: *seconds [08:17] chapel: llkazu: you really should look into dnode [08:17] llkazu: takes under 300ms with jinja2 precompiled [08:17] chapel: and browserify [08:17] stride: akavlie: yeah, it outputs stuff there :) [08:17] chapel: with those two, you can rock anything else [08:17] llkazu: chapel, been looking at dnode as an alternative to nowjs. nowjs has been making me sad. [08:17] akavlie: llkazu, ever thought about pagination? :-) [08:17] chapel: SubStack makes some quality stuff [08:17] Melkor has left the channel [08:18] llkazu: akavlie, looooong story on why we aren't paginating. [08:18] tjgillies: llkazu: what makes you mad about it? [08:19] llkazu: tjgillies, what makes me sad about it is more about socket.io than nowjs itself. but nowjs doesn't let me connect to multiple web socket servers, which bugs me. i'd like to connect to a click-stat server to send like click/action data from the web app to some logging system, while connecting to some central user authentication and preferences system for that type of data, then connect individually to different web socket services for wha [08:19] llkazu: tever the user currently wants to do [08:20] chapel: dnode does that llkazu [08:20] llkazu: chapel, yup! which is why I'm pondering moving to it. [08:20] llkazu: my biggest blocker right now is socket.io not scaling well. [08:20] chapel: you've seen browserling? [08:20] llkazu: ACTION nods [08:21] llkazu: browserling is crazy awesome [08:21] chapel: they use dnode for almost everything in the backend [08:21] chapel: the whole infrastructure is dnode based [08:21] llkazu: nice. [08:21] chapel: you know its quality when they actually use it for real problems [08:21] Kingdutch has joined the channel [08:22] llkazu: ACTION nods [08:22] chapel: I actually haven't used now.js, just because I prefer dnode, and see no reason to switch [08:22] chapel: I am a bit biased [08:22] jetienne: anybody doing applications which upload picture to twitter ? [08:22] rchavik has joined the channel [08:22] chapel: but to me, now.js seems more like a toy than a tool [08:23] llkazu: indeed. [08:23] tjgillies: i use my tool as a toy [08:23] llkazu: XD [08:24] llkazu: the interactive traffic visualizer that I'm building into my nodejs hosting service will be using dnode. [08:24] Guest67480 has joined the channel [08:24] chapel: cool [08:24] chapel: there are a couple of those floating around [08:24] jetienne: is there a doc on dnode ? [08:25] chapel: a doc? [08:25] chapel: you mean like tutorial? [08:25] Ond: https://github.com/substack/dnode [08:25] jetienne: yeah something which tell me what it does and how to use it [08:25] Ond: See above [08:26] chapel: well there is that, also substacks blog [08:26] tjgillies: jetienne: http://substack.net/posts/9bac3e [08:28] d0k has joined the channel [08:29] jetienne: yep seems nice rpc mecanism. i like the fact a client may be node.js or browser [08:29] SubStack: chapel: backend AND frontend! [08:30] chapel: well yeah [08:30] chapel: I guess that was assumed [08:30] llkazu: now my question is, has dnode solved the scaling problems inherent to socket.io? where it can't seem to track connections across servers? :-p [08:30] chapel: SubStack: I would love to see a breakdown on how you run browserling in the backend [08:31] chapel: llkazu: not built in, but it wouldn't be hard [08:31] chapel: since you could keep track of everything between processes [08:31] chapel: they might not share memory, but you can easily share state [08:31] jetienne: llkazu: chapel: yep i think it could/should be done on top of socket.io [08:31] chapel: jetienne: dnode is built on socket.io [08:31] llkazu: with nowjs, socket.io keeps complaining "cannot find client with session id XXX" and killing things. [08:31] llkazu: ACTION should try dnode sooner rather than later [08:32] chapel: but also has standard sockets for non-browser clients [08:32] SubStack: chapel: it's just a loose federation of processes that all talk to each other [08:32] jetienne: chapel: ok... why are you telling me that ? dnode is solving the multi server issue ? [08:32] chapel: you said my name jetienne [08:33] jetienne: chapel: hmm ok micommunication i guess [08:33] SubStack: dnode is pretty much just a trick to let you pass around functions in json [08:33] SubStack: surprisingly tricky to do [08:33] jetienne: chapel: i was thinking about the multi server issue because i need a solution for it for http://easywebsocket.com [08:33] chapel: but it works so elegantely [08:33] chapel: elegantly [08:34] jetienne: SubStack: simple and selfcontain. nicely done [08:34] jetienne: SubStack: how stable it is ? [08:34] SubStack: well I've used rpc systems before I wrote dnode so I know some of the pain points [08:34] SubStack: node already takes care of the asynchronous pain point [08:35] SubStack: and javascript has a pretty standard way of passing around data structures with json [08:35] jetienne: for http://pacmaze.com too i need multiserver socket.io stuff [08:35] pdelgallego_ has joined the channel [08:35] pdelgallego has joined the channel [08:36] jetienne: SubStack: well dnode api is nice, many would have made a features monster :) [08:36] chapel: SubStack: well as you know with toe (pyrotechnik's game) the problem is similar, but probably a bit more demanding [08:36] jetienne: ok how to do this multiserver socket.io ? [08:37] soulofpeace has joined the channel [08:37] jetienne: browser/server communication by socket.io for sure [08:37] micheil: jetienne: easywebsocket.com? [08:38] jetienne: server/server communication... not sure [08:38] jetienne: micheil: oh my bad http://easywebsocket.org [08:38] chapel: jetienne: dnode handles that [08:38] jetienne: server/server may be done with via database layer [08:38] tjgillies: zeromq [08:38] tjgillies: ;) [08:39] jetienne: or via a network protocol (chapel yep dnode could do the server/server network part) [08:39] micheil: jetienne: why not just use node-websocket-server + node-websocket-protocl (when it's out), then adapt socket.io to use nws behind the scenes [08:39] micheil: then you can have a websocket-client on your server [08:39] jetienne: tjgillies: i dunno it, it is suitable for our case ? [08:39] micheil: as for clients that don't support websockets, I think long-polling is the best fallback [08:40] chapel: or use dnode... cause well it does server - server and server - browser automatically [08:40] micheil: (at current, that's my thinking) [08:40] jetienne: micheil: multi server can be messy, im not cool with putting all this mess in socket.io [08:40] SubStack: ewww databases for message passing [08:40] micheil: in which case you can use a form of FiFo queue [08:40] chapel: and you could port dnode to any transport if you wanted [08:40] EM03 has joined the channel [08:40] micheil: jetienne: or, use distributed back channels [08:40] jetienne: micheil: the client/brower api may be compatible with socket.io. [08:40] EM03: anyone use that espress framework for actual web developmetn? [08:40] EM03: if you did what did you think bout it [08:41] SubStack: easy to do since the protocol is factored out into dnode-protocol [08:41] Ond: Espresso or Express [08:41] micheil: EM03: it was okay, but my experience would've been better if I'd understood the module system better [08:41] jetienne: SubStack: forget the techno, how would you keep the server in sync ? [08:41] Guest67480 has left the channel [08:41] jetienne: something like irc ? [08:41] micheil: jetienne: easy, you have network sockets between each server [08:41] micheil: and you pass messages for each event [08:42] tjgillies: kinda like zeromq [08:42] tjgillies: ;) [08:42] jetienne: micheil: like a full mesh... ok why not, it is ok if number of server is small [08:42] micheil: {event: "connection", id: "fooo"} [08:42] chapel: ... [08:42] micheil: {event: "message", data: "some message"} [08:42] chapel: SubStack: its like they don't see us :( [08:42] jetienne: micheil: ok so each server got a full version of the database? [08:42] micheil: no [08:43] micheil: you set it up so that each server connects to each other [08:43] jetienne: chapel: dnode is about rpc, this is only a part of the problem [08:43] micheil: I should actually properly write this meshing network [08:43] jetienne: micheil: ok so you got the network topology, and say dnode for network handling [08:43] jetienne: let see a usecase [08:43] micheil: I wouldn't even use dnode for network handling [08:43] EM03: do you think node.js will be a strong contender in webdev as a whole? not just server side push stuff? [08:44] jetienne: EM03: later polease [08:44] micheil: I'd just use net.Socket + net.Server [08:44] jetienne: micheil: ok [08:44] micheil: and then json+netstrings [08:44] jetienne: suppose im a browser i run a network game, im using socket.io like and send message to the server [08:45] SubStack: routing messages can get very complicated [08:45] micheil: jetienne: although, to be honest, for websockets where you just want broadcast and/or server push, I'd just use pusher.com [08:45] SubStack: especially if you add on lots of layers of functionality [08:45] jetienne: this server is a "multi server" what do we do with this messqge when it is received by the server [08:45] SubStack: if you go the json route you'll have to come up with a dispatch system for getting the data out of the json chunks to where they need to go [08:45] micheil: jetienne: then that message would be sent out via server A to all it's connected clients, and sent via the back channel on server A to all other connected servers [08:46] jetienne: SubStack: +1 this is why i would prefere to keep it outside of socketio itself [08:46] jetienne: micheil: ok so full broadcast... may be inefficient [08:46] micheil: the meshing functionality doesn't focus at all on routing of messages, just on distributing them throughout a system [08:46] FireFly|n900 has joined the channel [08:47] SubStack: how much does it need to scale? [08:47] SubStack: and in what ways? [08:47] jetienne: SubStack: it all depends on the case... [08:47] micheil: also, you should be able to easily handle 20,000 or 50,000 connections on just 2 servers [08:47] EM03: jetienne: huh? [08:47] tjgillies: telehash.org ;) [08:47] jetienne: SubStack: say a realtime game... i need a good latency in several place around the world [08:48] jetienne: SubStack: good latency beind < 50ms [08:48] micheil: tjgillies: that looks interesting [08:48] llkazu: I'm off for a bit, night all [08:48] tjgillies: night [08:48] SubStack: tricky! [08:48] lorhko_ has joined the channel [08:49] jetienne: SubStack: well you spread the servers on the proper place, then allocate new gamers to the server near them, and broadcoast to everybody in the same game... [08:49] jetienne: SubStack: that may work... i think, no ? [08:50] BingeBoy has joined the channel [08:50] jetienne: SubStack: it would allocate people close to each other to the same server [08:50] SubStack: sounds feasible [08:50] jetienne: SubStack: obviously they would play on the game with low ping [08:51] jetienne: SubStack: yep... and yet not too complex [08:51] jetienne: let hope it actually work :) [08:53] micheil: jetienne: you can do it in a few ways [08:54] micheil: 1) centralised message queue/dispatcher [08:54] micheil: 2) distributed inter-connected clients [08:54] micheil: s/clients/servers [08:54] micheil: obviously route #1 does have the downfall of a single point of failure / latency [08:54] jetienne: naturally i would go in distributed servers... probably because i coded a lot of routing protocol :) [08:55] jetienne: how other are doing it ? im sure im not the first with this problem [08:55] saikat has joined the channel [08:55] micheil: I might actually write a meshing server for node [08:55] trollboy has joined the channel [08:56] micheil: so far i've seen option #1 work quite well, but only on smaller systems were < 250ms was the latency range [08:56] micheil: *where [08:56] jetienne: 250ms is way too much for me. im doing fps like game [08:56] jetienne: i need 50ms top [08:57] jetienne: centralized mean a single server around the world... it isnt tunable from a latency point of view [08:57] jetienne: is this correct ? [08:58] jetienne: because if it is, this means a distributed solution is the way to go [08:58] micheil: depends, if you build off something like EC2, and use internal IP's, I'm pretty sure you'll find the inter-server latency to be very low [08:58] coreb: if latency is your focus, would async servers be the way to go? [08:58] micheil: yes. [08:58] jetienne: for example i got a easywebsocket.org backend on channel API (google app engine version of websocket) and the latency is horrible like 160ms [08:59] steffkes has joined the channel [08:59] micheil: GAE isn't exactly the fastest server setup, iirc. [08:59] jetienne: true other factors enter in the computation [09:00] jetienne: coreb: latency is my focus, what do you mean by async server. tell me more [09:00] ryan0x2 has joined the channel [09:00] saikat has joined the channel [09:02] jetienne: or i just launch the next game only in france .... [09:02] jetienne: the silly workaround on multi player :) [09:02] SubStack: isn't tahiti part of france? [09:02] jetienne: thanks all for the chat [09:02] daglees has joined the channel [09:02] daglees has joined the channel [09:03] jetienne: SubStack: yep old colonies [09:04] SubStack: I mean that parts of france would have very high latency [09:04] SubStack: being just about as far away as it is possible to be [09:04] Opaque has joined the channel [09:04] SubStack: while still being on the internet [09:05] jetienne: SubStack: well thats ok :) [09:05] jetienne: you know i do webgl games, i cut out large part of the users because of this :) [09:06] chapel: jetienne: why not have the client hit a master server, that tells it locations of logical servers that are closer, client pings those, and then is routed to the best ping server [09:07] jetienne: chapel: this is a possible arch [09:07] robhawkes has joined the channel [09:08] jetienne: once you pick the distributed arch, it become a clustering problem. you want players who are on the same game to be in the same server [09:08] chapel: I haven't done the backend of a webgl game yet, but as long as it is within the same domain, I think it would be easy enough to handle that [09:08] coreb: the obvious weak link in the chain is latency between the servers and bandwidth [09:09] chapel: what type of game are we talking about [09:09] chapel: since that matters [09:09] svenlito has joined the channel [09:09] jetienne: coreb: in fact you want to limit inter server communication [09:09] saikat has joined the channel [09:10] coreb: jetienne: how can you, when information must be distributed between all of them to connect all gamers [09:10] jetienne: chapel: something like a fps. aka multi player, i move, you "immediatly" see me moving on your screen [09:10] micheil: coreb: this is a simplistic channel manager class: https://gist.github.com/923872 [09:10] micheil: back later. [09:10] chapel: well jetienne most fps fake the movement with client prediction matched with server correction [09:10] jetienne: coreb: only the routing information must be shared, if you assume all players of a same game are on the same server [09:10] coreb: micheil: cool [09:11] hnguyen_ has joined the channel [09:11] jetienne: chapel: yep they predict on the screen. but this is another problem [09:11] chapel: I don't see how that changes, if people want to play with certain players, it ignores ping, otherwise it finds servers based on ping and available players [09:11] coreb: jetienne: I thought you wanted players from all servers in the same game [09:11] jetienne: still the latency must be low [09:12] jetienne: coreb: oh now :) this is like a fps, 20 players per game. not 30000 in one game :) [09:13] thalll has joined the channel [09:13] jetienne: the more we talk the more i realise it isnt hard [09:13] chapel: jetienne: yes, of course you want it low, but I don't see how my arch advice means it wouldn't be? [09:13] jetienne: because i have a small amount of players per game [09:13] chapel: it will be in its own way, but conceptually its not that difficult once you get the basics in place [09:13] chapel: but yeah [09:13] coreb: well, then what chapel said [09:13] chapel: its when you have an mmo like game [09:13] jetienne: chapel: you arch would have low latency, not disputing that [09:14] chapel: that really will add problems [09:14] coreb: find a set of close servers, ping them, and choose [09:14] jetienne: another part is the fact to assume that every player of a game is on the same server [09:14] jetienne: so a game got one server, all the data/network/cpu of the game [09:15] jetienne: nice simplication :) [09:15] jetienne: so it become just a "find the server for this game" [09:16] coreb: yeah, your first solution should be as simple as possible, then move on from there [09:16] jetienne: which is in the initialisation so no need for low latency.... so a central server will do [09:16] jetienne: coreb: that my kind. keep everything simple :) [09:17] __tosh has joined the channel [09:17] jetienne: so central server to keep log on all the games, a directory. [09:17] jetienne: and several game server around the world for low latency [09:17] Astro has joined the channel [09:17] jetienne: excelent, so simple :) [09:18] coreb: jetienne: sure, got the money for it?;) [09:18] jetienne: thanks all [09:18] jetienne: coreb: game monetisation is funky :) [09:19] newy_ has joined the channel [09:20] coreb: servers around the world do cost money :) [09:21] chapel: if you are using amazon, its pretty easy [09:21] chapel: just spin them up as needed [09:21] coreb: the have what, ireland, west and east usa, and asia? [09:22] coreb: they* [09:22] chapel: idk exactly tbh [09:22] chapel: I don't use amazon [09:23] coreb: what do you use for hosting? [09:23] chapel: atm, I don't have any node specific hosting, no active projects [09:23] chapel: at least being hosted [09:23] chapel: but one I am working on might use linode [09:24] coreb: linode seems good [09:24] EM03: so about express ....anyone use it? worth a serious look? [09:24] Ond: Yes [09:25] mape: EM03: Most people are using it, at least for that use case [09:26] EM03: hmm [09:26] EM03: I use ruby now [09:27] chapel: sinatra? [09:27] EM03: ramaze [09:27] chapel: not familiar with it [09:27] EM03: like sinatra [09:27] EM03: but mvc [09:27] EM03: but not heavy like rails or nothing [09:27] chapel: ah [09:28] chapel: well express is like sinatra, but you can so mvc [09:28] herbySk has joined the channel [09:28] chapel: you can do all kinds of things [09:28] EM03: also i noticed some guy just implemented prototype to work with node.js [09:28] mape: think someone did something with express that moved it into mvc [09:28] EM03: soo that means I could possibly get a bunch of ruby like features [09:29] stride: mape: wasn't there an mvc example in the regular express repo as well? [09:29] incon has joined the channel [09:29] EM03: I guess if that works and express is decent I have a make shift ruby [09:29] chapel: there is [09:29] mape: stride: not sure [09:29] chapel: EM03: connect is a barebones part of express, you can use as much or little as you want [09:30] stride: https://github.com/visionmedia/express/tree/master/examples/mvc [09:30] EM03: https://github.com/Rixius/protoype.node.js [09:30] EM03: anyone use this? [09:30] chapel: ba stride [09:30] chapel: https://github.com/visionmedia/express/tree/master/examples/mvc [09:30] stride: heh :) [09:30] chapel: just cause I had it too [09:31] liquidproof has joined the channel [09:31] EM03: the fact js can do anon functions is crazy [09:32] Twelve-60: anyone care to explain why the outside catch is never called? http://pastebin.com/k85cwenh [09:32] EM03: so much bootstrap code [09:32] chapel: idk, not that fantastic, js is just awesome [09:32] jonaslund: jetienne: i don't think counting on sub 50ms latency is realistic for web style apps yet [09:33] chapel: Twelve-60: looks like the thrown error is inside a different stack [09:33] stride: Twelve-60: the callback is executed asynchronously, outside of that context [09:33] chapel: that being the net stack [09:33] chapel: or what stride said [09:33] Twelve-60: i see [09:33] chapel: you shouldn't throw errors inside async stuff [09:33] chapel: pass it back up [09:34] Twelve-60: how should i deal with errors [09:34] Twelve-60: re-emitting events? [09:34] stride: what would you like to do in such a case? [09:34] chapel: use callbacks or events [09:34] RusAlex has joined the channel [09:34] chapel: either way you are sending it up to something better suited for it [09:34] chapel: ACTION isn't a big fan of try/catch [09:34] stonebranch has joined the channel [09:35] Twelve-60: so basically try/catch isn't very useful in most cases due to the prevalence of async methods [09:35] jetienne: jonaslund: why ? [09:36] stride: Twelve-60: yeah, only inside stuff that's sync or fully under your control [09:36] jonaslund: jetienne: browsers being as they are (web-sockets is an improvement). but also the fact that it's all tcp/ip based [09:36] jetienne: jonaslund: i got 25ms here. on firefox and chrome with a server in my city [09:36] Twelve-60: stride: i see, i just liked the idea of try/catch due to the fact that one can 'throw it up' until someone catches it [09:36] stride: Twelve-60: it's also unnecessary. the pattern of error events is there so you don't have to blow up your code with error handling [09:36] Twelve-60: is that possible with events? [09:37] Twelve-60: or do i have to add listeners + reemit [09:37] chapel: jetienne: you should really look at having a lot of client prediction, will help [09:37] jetienne: chapel: yep i will look at this [09:37] chapel: Twelve-60: instead of using try/catch, just handle external (as in other modules) errors with your own event emitter [09:38] chapel: and then in your main logic where you want to handle errors, add a listener [09:38] jonaslund: jetienne: well.. net connections are better nowadays, the problem is that once the connection slows down you will still transmit the "old" data and it will need to arrive before you can send new data again [09:38] tanepiper: ugh ambiguous errors :/ [09:38] stride: they do some sort of automatic propagation iirc, not sure about the current implementation though [09:38] jonaslund: jetienne: since tcp/ip has ordering of data [09:39] jonaslund: jetienne: udp on the other hand would drop old packets if there was a congestion and you'd always get "new" packets [09:39] Twelve-60: chapel: i see [09:39] tanepiper: i'm in the same position using cradle just now, calling db.list and all i get is https://gist.github.com/923893 [09:39] chapel: yeah, most games use udp for multiplayer, because they can just skip packets [09:39] chapel: easier than having late packets [09:39] chapel: or have it slow down to a crawl when multiple packets are lost [09:40] jetienne: jonaslund: ok, yep i understand tcp/udp quite well. (coded it in 90s router). but i think tcp latency is underestimated [09:40] jonaslund: the big problem of late packets is that getting into phase will take longer time [09:40] Twelve-60: i dont suppose you can do net.on("event", function (event) {}); [09:40] jetienne: jonaslund: in a previous effort i did live video thru tcp without issue [09:40] Twelve-60: net.on("event", function (event) { /* possibilty of handling ALL events emmitted */ }); [09:40] jonaslund: jetienne: yeah as i said.. today networks are better than they were in the 90s so tcp will prolly not be as bad [09:40] chapel: Twelve-60: you could always pass up the event handler [09:40] stride: http://gafferongames.com had a nice little (high-level though) series on game networking, escp. in regards to using udp and prediction if anybody cares :) [09:41] jetienne: jonaslund: yep [09:41] Twelve-60: chapel: well yeah i'd like to, but is there a generic event handler for all events [09:41] jetienne: stride: we discussed it yesterday night :) [09:41] Twelve-60: or do i have listen for each one manually and pass up each one :P [09:41] stride: jetienne: oh :) damn [09:41] jetienne: stride: but im glad so many gamdev are lucking here :) [09:42] stride: yeah, sadly I'm just a lurker, I'm doing b2b java & .Net stuff most of the time.. :) [09:42] jonaslund: client prediction is a one of the big reasons i'm doing JS on the server [09:42] jetienne: yummy :) [09:42] stride: anyway, got to go, ciao guys [09:43] jonaslund: since i'm trying to share code as much as possible [09:43] chapel: Twelve-60: you can extend event emitter with your own objects, and then on net errors or any other module errors send them to your error emitter then listen in your main logic code [09:43] chapel: jonaslund: dnode? [09:43] jetienne: jonaslund: code sharing is a big plus of nodejs for me too [09:43] chapel: browserify? [09:44] chapel: tanepiper: thats a nice error [09:44] chapel: good luck finding that without some major debugging [09:45] tanepiper: chapel: yea :/ [09:45] hojberg has joined the channel [09:45] jonaslund: chapel: hmh ? [09:45] Twelve-60: chapel: i actually think this functionality should be added natively, i.e. the ability to listen to all events given by an EventEmitter [09:45] chapel: I am not totally impressed with cradle, I mean its awesome and all, but couch is so easy to interface with, I have only done manual http stuff with it [09:46] chapel: I don't see the issue, if you want to listen for a type of event, listen for it [09:47] Twelve-60: it appears my request has already been looked at: http://groups.google.com/group/nodejs-dev/browse_thread/thread/4f344fc6c1dfd050 [09:47] __tosh has joined the channel [09:47] Twelve-60: chapel: i agree, but that functionality should still be there [09:48] jetienne has joined the channel [09:48] mraleph has joined the channel [09:48] chapel: but it seems redundant [09:49] cognominal: I see "void 0" in some place of backbone.js code [09:49] chapel: you can already listen for any type of event [09:49] cognominal: validObj[attr] = void 0; [09:49] cognominal: I dont know what that means :( [09:49] saikat has joined the channel [09:49] tanepiper: void 0 is undefined [09:49] Twelve-60: chapel: afaik you cant re-emit all events [09:50] Twelve-60: chapel: i.e. you have to listen for them all explicity and re-emit them all separately [09:50] chapel: v8: var test = void 0; [09:50] v8bot: chapel: undefined [09:50] chapel: :) [09:50] cognominal: tanepiper : so what not say undefined in place of void 0 ? [09:50] chapel: v8: var test = undefined; [09:50] v8bot: chapel: undefined [09:50] tanepiper: cognominal: yes, it's how coffeescript outputs undefined [09:50] chapel: less characters for same output [09:51] tanepiper: since currently undefined is a variable not a constant [09:51] chapel: yeah [09:51] tanepiper: so someone could do undefined = 5 [09:51] chapel: good point [09:51] tanepiper: then yer buggered, so void 0 is a more safe way [09:51] cognominal: v8 : undefined - 5 [09:51] cognominal: v8 : undefined = 5 [09:51] cognominal: v8: undefined = 5 [09:51] v8bot: cognominal: ... [09:51] Twelve-60: who the hell redefines undefined XD [09:51] Nexxy has joined the channel [09:52] tanepiper: heh, found my bug :/ I had toJSoN in my couchdb design do instead of toJSON :/ [09:52] jonaslund: v8: undefined [09:52] v8bot: jonaslund: undefined [09:52] tanepiper: caused couchdb to hang badly, and cradle couldn't handle that [09:52] chapel: Twelve-60: without more context of your app or code base, what you are wanting seems wasteful [09:52] chapel: lol [09:52] chapel: tanepiper: :) [09:52] chapel: v8: test = undefined; undefined = 5; [09:53] v8bot: chapel: ... [09:53] chapel: haha [09:53] jonaslund: v8: (function() { this['undefined']=123; })() [09:53] v8bot: jonaslund: ... [09:53] jonaslund: undefined [09:53] chapel: v8: undefined = 8; test = undefined; [09:53] v8bot: chapel: ... [09:53] jonaslund: v8: undefined [09:53] v8bot: jonaslund: undefined [09:53] __tosh has joined the channel [09:53] Emmanuel__ has joined the channel [09:53] chapel: whats ... supposed to mean [09:53] jonaslund: v8bot: (function(){})() [09:53] v8bot: jonaslund: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [09:54] graysky has joined the channel [09:54] jonaslund: v8bot: (function(){ 123; })() [09:54] v8bot: jonaslund: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [09:54] Ond: It's v8bot rolling its eyes I think [09:54] jonaslund: v8bot: (function(){ var x=123; })() [09:54] v8bot: jonaslund: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [09:54] jetienne: v8: (function(){ 123; })() [09:54] v8bot: jetienne: undefined [09:54] jetienne: jonaslund: v8: [09:54] jonaslund: ahh [09:54] jonaslund: my silly auto-complete kicked in [09:54] jonaslund: v8: (function(){})() [09:54] v8bot: jonaslund: undefined [09:54] tanepiper: yay, app not crashing any more! [09:54] tanepiper: stupid typos [09:55] chapel: tanepiper: I hate that [09:55] chapel: specially when you spend hours on a bug [09:55] chapel: only to find it was a stupid typo [09:55] jetienne: me too, i want a #pragma to be notified when they do slota[null] [09:55] torgeir has joined the channel [09:55] jonaslund: that's the only downside of dynamic languages :P [09:55] chapel: guess that is what is nice about lint/hint [09:55] jetienne: or sblabla._notexistingprop [09:55] chapel: tanepiper: were you using coffee? [09:56] tanepiper: chapel: everywhere :) [09:56] chapel: figured :) [09:56] tanepiper: my couch design docs are in coffeeescript, my server runs on coffee - my client side i compile to JS, but it's all coffee too [09:56] cognominal: v commands [09:56] cognominal: v8: v commands [09:56] v8bot: cognominal: SyntaxError: Unexpected identifier [09:56] chapel: is there a hook for coffee-script to run jshint? [09:56] tanepiper: jslint, but yea [09:56] cognominal: arf [09:57] cognominal: v8: `v commands [09:57] v8bot: cognominal: SyntaxError: Unexpected token ILLEGAL [09:57] tanepiper: chapel: but i'm looking to build in better debug tools to my cloud9 extensions for cs [09:57] chapel: I wish I could get used to vim [09:57] tanepiper: at the moment, my lifecoffee stuff is good for debugging though [09:57] tanepiper: *live [09:57] chapel: since it can do auto jslint and coffeescript stuff [09:57] chapel: yeah [09:58] chapel: I use textmate right now [09:58] chapel: how is cloud9 now? [09:58] jonaslund: ACTION uses eclipse/aptana/chromedebug/sepl [09:58] tanepiper: i installed the tm bundle on e-texteditor, but the problem is you can't run coffee on windows, and it's a pain to set up in cygwin [09:58] tanepiper: chapel: great [09:58] tanepiper: has it's flaws, but then so does every text editor/ide [09:59] tanepiper: the difference is cloud9 is a hell of a lot easier to extend, since it's javascript + some XML [09:59] chapel: yeah [09:59] chapel: does it have built in debugging still using nodes debug? [10:00] tanepiper: i think so, but currently it doesn't work with my stuff - but i want to build in coffeescript debugging [10:00] tanepiper: i could probably get it working with cs's --nodejs stuff, but mehh [10:02] chapel: yeah [10:02] chapel: well let me know when you get it a bit more solid [10:02] chapel: I might entertain using it [10:03] cognominal: tanepipe, not everething browser related can be native in windows :) [10:03] chapel: upgrade to windows 8 and everything is native in the browser [10:04] cognominal: marketing based future proofing :) [10:07] Opaque has joined the channel [10:09] FireFly: `v commands [10:09] v8bot: FireFly: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support. [10:10] Bwen has joined the channel [10:11] Spion__ has joined the channel [10:12] cognominal: Firefly: I had tried about every other combinations to get the v8 bot to list its commands [10:13] FireFly: Heh [10:13] cognominal: `v help beers [10:13] v8bot: cognominal: beers Command: Type nick++ to give a beer to a user (usually as a way to say "thanks"). Type nick-- to take a beer away from a user. Type "`v beers " to get the number of beers for a specific user. [10:13] __tosh has joined the channel [10:13] cognominal: FireFly++ # :) [10:13] JimBastard has joined the channel [10:13] cognominal: `v beers FireFly [10:13] v8bot: cognominal: FireFly has 0 beers. [10:14] FireFly: I don't think it likes the comment [10:14] cognominal: yup, purl in perl channels is more lenient on that matter [10:15] jonaslund: erhhrm [10:15] jonaslund: does anyone remember who was writing that postgres backend ? [10:17] mjr_: jonaslund: brianc has one [10:17] aurynn: I have one [10:17] aurynn: and for the first time in a month, I'm actually online [10:17] aurynn: :) [10:17] jonaslund: mjr_: it was with him we were discussing a few nights ago right ? [10:17] mjr_: Yeah, probably [10:17] jonaslund: pure-js vs libpg performance [10:20] spectrum has joined the channel [10:20] pomodoro has joined the channel [10:20] coreb: and the conclusion was? [10:21] hnguyen_ has joined the channel [10:21] MattJ has joined the channel [10:21] jakehow has joined the channel [10:22] aurynn: that you're spending more time in disk IO ? [10:22] Kingdutch has joined the channel [10:22] jonaslund: aurynn: not entirely [10:23] jonaslund: coreb: today pure-js is nearly as fast with small queries (round-trip time to server,disk,etc prolly takes most time) but since buffer index access is still "slow" the native bindings wins out queries with big(/many´?) objects [10:24] jonaslund: but apperatly in the future V8 will have optimizations for array access in stuff like buffer and that kind of access will become 4x faster (And with it stuff like the pure-js bindings) [10:24] jonaslund: see http://blog.mrale.ph/post/4217120977/improved-v8-external-arrays-support-and-nodejs-buffer [10:25] mjr_: That is probably going to be a big win all over node land. [10:29] pdelgallego has joined the channel [10:31] oskude has joined the channel [10:31] mytrile has joined the channel [10:32] jonaslund: ACTION reviews some old code he hasn't looked at in a while [10:32] bogo has joined the channel [10:33] chapel: my old code scares me [10:33] chapel: I have a lot of old code [10:33] chapel: not sure what I want to do with it [10:34] bogo: chapel: haha, that's usually the case :D [10:34] jonaslund: depends on how useable it is [10:34] yozgrahame has joined the channel [10:35] jonaslund: reading, deciphering old/others code quickly is sometimes the greatest skill you can have [10:35] Wizek has joined the channel [10:35] mjr_ has joined the channel [10:36] chapel: its even worse, since I switched to coffeescript [10:36] chapel: and some of my early code was learning the basics of node [10:36] chapel: I still want to go back and rework it, but eh [10:37] jonaslund: when i was 16-18 i was writing alot of stuff in pure x86 asm [10:37] jonaslund: it's mindboggling i even got stuff done .. but persistence.. :D [10:38] shaunau_ has joined the channel [10:38] chapel: heh [10:38] chapel: how old are you now? [10:38] jonaslund: 30 [10:38] chapel: ah [10:38] chapel: 27 here [10:38] chapel: when I was around 17 I was doing c++ [10:38] chapel: I didn't have much to learn from, someone said I needed a compiler, recommended borland turbo c++ [10:38] mAritz has joined the channel [10:39] chapel: so I got that, and my only resource for learning was the compiler manual [10:39] chapel: lets just say, that was a challenge at times [10:39] febits has joined the channel [10:39] chapel: kids now a days [10:39] chapel: have so much available to them [10:40] jonaslund: i'm not really sure about my age [10:40] jonaslund: but i think i was in 2nd-3rd grade (9-11 or so) i got my C64 [10:40] jonaslund: mostly played with it for a year or so [10:40] chapel: I wasn't that lucky [10:40] chapel: I didn't have my own computer until I was 16 [10:41] chapel: had a family one at 14, but no internet [10:41] ankit has joined the channel [10:41] Twelve-60: chapel: http://pastebin.com/6csGaBCe [10:41] bogo: haha, maan [10:42] jonaslund: i was loading games off tapes, the problem was that you had to adjust the "tone-head" to get the correct pitch of the sounds to load properly [10:42] bogo: i've been coding since i was 11. when i look at this code now, i get all misty eyed ;) [10:42] jonaslund: and one day i just couldn't get any games loading since i didn't get that head adjusted properly [10:42] jonaslund: so i started looking at the C64 manual [10:42] jonaslund: and in there was some basic examples.. i botched typing it in but just having stuff output was awesome :) [10:42] bogo: jonaslund: haha, i guess that's why we are all programmers :) [10:43] chapel: I am jealous of you guys [10:43] jonaslund: chapel: no need to be [10:43] chapel: wish I had parents that would have let me have stuff like that [10:43] chapel: might have started off earlier [10:43] jonaslund: chapel: i didn't get a net connection until i was 17 or so either [10:43] chapel: well sure [10:44] bogo: jonaslund: almost the same here - i saw the first website when i was 14 [10:44] chapel: but the net didn't help me that much at first [10:44] jonaslund: yeah at school [10:44] chapel: at that age I spent most of my time chatting with girls on aol [10:44] jonaslund: chapel: you're prolly better off for it [10:44] bogo: school never helped me in studying programming [10:44] bogo: at the same time going to the library [10:44] chapel: now I rarely talk to girls online [10:44] bogo: (no laptops back then!) [10:44] bogo: and reading, reading, reading and taking notes did [10:45] chapel: I was lucky to have a teacher let me and some friends do a self guided programming class [10:45] chapel: though we kind of called it in and fucked around most of the time [10:45] bogo: haha, yeah [10:45] bogo: my teacher was like [10:45] bogo: ok bogo, don't break anything, sit still and i'll give you an A, mkay? [10:45] bogo: ;) [10:46] bogo: i guess it was sort of bewildering to teachers to have a 10yo better at their own devices [10:46] chapel: I was 17 at that time :( [10:46] chapel: well :) [10:47] __tosh has joined the channel [10:47] chapel: cause it was fun hacking the school computers [10:47] bogo: haha, it always is [10:48] AAA_awright has joined the channel [10:50] jonaslund: :) [10:50] Corren has joined the channel [10:51] liar has joined the channel [10:52] chapel: you see people amazed that some 11 year old kid is making full fledged web apps now, but back in the day, it was amazing for an 11 yo to make games on a c64 or whatever [10:52] skm has joined the channel [10:53] chapel: the amount of information that is available now is crazy, that any kid with any drive is like a sponge and would be able to grep almost anything [10:53] bogo: yup [10:53] bogo: and mashups have virtually no learning curve [10:53] stephank has joined the channel [10:54] jonaslund: hmmm [10:54] bogo: i remember the days when to get a data from a web service you had to learn how to SCRAP html for data [10:54] cognominal: I remember programming in C. The only C code I had ever seen was the K & R I read. Painful. [10:54] jonaslund: i dunno [10:54] bogo: now it's all REST and JSON [10:54] MattDiPasquale has joined the channel [10:54] jonaslund: sure, many of us had crap environments to learn in [10:55] cognominal: At least I had the right book. [10:55] jonaslund: i'm grown up in the "hicks" where everyone i went to school with spends their days driving snowmobiles, dirtbikes or something similiar nowadays [10:55] chapel: jonaslund: not to diminish the ability for kids now, but the availability of information on how to do things when we were younger was more scarce [10:55] chapel: jonaslund: alaska? [10:55] chapel: :P [10:55] jonaslund: nah, the north of sweden [10:56] jonaslund: kinda the same but less oil and shotguns [10:56] chapel: oh nice [10:56] bogo: and you don't see russia from there [10:56] chapel: but I know what you mean [10:56] cognominal: bogo : you think so because your are in the hip crowd. Most people shovels computer crap all day long [10:56] chapel: irl I don't know anyone that actually codes [10:56] mytrile has joined the channel [10:56] jonaslund: anyhow [10:56] chapel: or I could talk to about stuff like this [10:56] jonaslund: even if i had it that way, and many others [10:56] bogo: cognominal: what do you mean by hip crowd? [10:56] jonaslund: there was some people that grew up around the same time as me (or earlier) that got better oppurtunities [10:57] cognominal: you do node :) [10:57] bogo: cognominal: i have to carve in shit every day when working with my customers' proprietary databases that have source code that didn't change since regan administration [10:57] jonaslund: go read about ken silverman for example [10:57] bogo: node is just a side job :D [10:57] chapel: yeah jonaslund [10:57] chapel: in hs, I had friends that had high speed internet, and were into stuff I wished I was [10:58] bogo: true that [10:58] bogo: i grew up in Poland [10:58] chapel: I had a friend that was doing all kinds of video projects [10:58] bogo: in a small town [10:58] jonaslund: anyhow [10:58] jonaslund: was fun chatting to you guys [10:58] jonaslund: but i'm late for a meeting [10:58] jonaslund: ta [10:58] chapel: I was the first person at my hs to get an mp3 player [10:58] chapel: :) [10:59] shaunau_ has joined the channel [10:59] bogo: yeah, i had virtually no CS friends [10:59] bogo: couple of guys i met on IRC [10:59] bogo: but none irl [10:59] bogo: while american teenagers were getting book deals for writing about applescript, etc [10:59] bogo: what was a 14yo from middle-of-nowhere, poland supposed to do to get noticed? [11:00] stride: bogo: what are you up to nowadays? [11:00] bogo: i personally work a lot with mobile, and mainly iOS [11:01] bogo: most recently, connecting a very, very old DB system to iOS frontend [11:01] stride: ah, nice. native or web? [11:01] bogo: mostly native, but i try to do as much as i can web recently [11:01] bogo: phonegap is really production ready imho [11:01] stride: heh, yeah, I made a frontend for an ERP system a while back. hate legacy databases [11:01] bogo: legacy sucks [11:01] chapel: well, where I live, I can't find any good tech work [11:02] stride: really? I was planning on looking at phonegap, last time I used iUI because it was the most "stable" at the time [11:02] stride: chapel: where's that? [11:02] bogo: stride: i found it working flawless the couple times i used in projects [11:03] stride: bogo: hmkay, thanks for the tip [11:03] bogo: given though that i used it mostly as a webkit view [11:03] bogo: with connections into notifications and camera [11:03] chapel: spokane, washington, usa [11:03] stride: well, at least you're in the right country chapel :) [11:04] bogo: haha, yes [11:04] chapel: sure [11:04] chapel: but I can't move [11:04] chapel: I wish the node.js freelancing market would explode so I could get some work [11:05] stride: heh, true [11:06] chapel: I have thought of doing a startup, but I don't want to do the funding route [11:06] robhawkes has joined the channel [11:07] bogo: chapel: at that point i'm sure there'll be already enough BRIC "consultants" who learnt node from reading one tutorial and implementing everything in a single class -.- [11:07] chapel: and any ideas Ive had, seem played out or hard to justify charging [11:07] chapel: bogo: sure [11:07] stride: bogo: "the php way"? :)) [11:07] bogo: haha, yeah [11:07] bogo: man [11:07] chapel: but at that point I will be able to prove my ability [11:07] chapel: well I can now [11:07] bogo: i've been to every bric country and i love them all [11:07] bogo: but the level of consultants from there [11:07] bogo: uhm [11:08] bogo: floor [11:08] chapel: bric? [11:08] bogo: brasil, russia, india, china [11:08] chapel: ah yes [11:08] bogo: with special accent on the last two [11:08] chapel: bric: "BRIC" is a political term used to name the worlds four fastest growing economies which are Brazil,Russia,India and china.The term was thought up by Goldman Sachs in 2003 to argue the economic potential of Brazil,Russia,India,and China and their global importance in the near future. Extended terms f... | Full Definition @ http://urbanup.com/define.php?term=bric [11:08] bogo: indian consultancies are absolute _crap_ [11:08] febits[0] has joined the channel [11:08] bogo: i've seen good indian coders [11:08] chapel: I didn't want to spam the channel with that, without making sure it was relevant [11:08] bogo: better, excellent ones [11:09] bogo: but whenever a company outsources something to BRICs, it comes back in a 10th grader code [11:11] stride: I talked to a guy last week who did that. was pretty unlucky with the shop he outsourced to. he had about the same amount of coders now to write detailed specifications.. [11:12] gattuso has joined the channel [11:13] cognominal: bogo : everything becomes legacy in months [11:15] robhawkes has joined the channel [11:16] xla has joined the channel [11:17] fairwinds has joined the channel [11:18] Druide_: hm, anyone got a good link for a webbased messenger system based on js? [11:22] tosh has joined the channel [11:28] jetienne has joined the channel [11:32] mike5w3c has joined the channel [11:33] shaunau_ has joined the channel [11:34] beawesomeinstead has joined the channel [11:39] stride: hmm, for templating with express, which of the mustache engines would I use? :) [11:41] skm has joined the channel [11:42] zomgbie has joined the channel [11:44] ardcore has joined the channel [11:48] chapel: dust.js [11:48] chapel: :) [11:50] torgeir has joined the channel [11:56] bogo: Druide_: you mean an im client? [11:58] no-gooder has joined the channel [12:00] Swizec has joined the channel [12:03] jarek has joined the channel [12:03] jarek has joined the channel [12:05] Twelve-60: chapel: still around? :P [12:05] jarek: Hello [12:05] chapel: yep [12:06] jarek: what's the best way for converting the content of package.json into an object? [12:07] Twelve-60: chapel: i was thinking, using an event system, you can't really emit an event directly for a certain callback [12:07] jarek: e.g. if I have following string: "{ "name" : "Package 1", "description" : "Sample package 1" }" [12:07] jarek: how do I convert it back into javascript object? [12:07] chapel: jarek: do you have it already as a string in js? [12:07] jarek: chapel: yeah [12:08] chapel: jarek: JSON.parse(package.json); [12:08] chapel: or whatever [12:08] jarek: chapel: I have learned that there is JSON.parse() function [12:08] Twelve-60: e.g. anyone who is listening for the 'error' event will get it, even if i only want the piece of code that 'called it' to recevie it [12:08] jarek: chapel: but it only works when the string was generated by JSON.stringify() [12:08] jarek: not sure why [12:08] chapel: Twelve-60: use explicit callbacks [12:08] chapel: well no, it works [12:09] chapel: v8: json = "{ "name" : "Package 1", "description" : "Sample package 1" }"; [12:09] v8bot: chapel: SyntaxError: Unexpected identifier [12:09] __tosh has joined the channel [12:09] Twelve-60: chapel: that means combining errors with the callback, but i guess thats why node js does callback(err, other, stuff) [12:09] chapel: v8: json = '{ "name" : "Package 1", "description" : "Sample package 1" }' [12:09] v8bot: chapel: "{ \"name\" : \"Package 1\", \"description\" : \"Sample package 1\" }" [12:09] Twelve-60: ACTION ponders [12:09] chapel: yep Twelve-60 [12:10] Twelve-60: i thought separating them would be a good idea [12:10] Twelve-60: but i guess not [12:10] chapel: its best imo to do callbacks or events, mixing them is confusing [12:10] jarek: chapel: I see, so my package.json must be messed up [12:10] chapel: well [12:10] Twelve-60: yeah i guess so [12:11] chapel: well here [12:11] langworthy has joined the channel [12:11] gattuso has joined the channel [12:11] chapel: v8: parsed = {name: 'Package 1', description: 'Sample package1'}; json = JSON.stringify(parsed); [12:11] v8bot: chapel: "{\"name\":\"Package 1\",\"description\":\"Sample package1\"}" [12:12] chapel: notice the " are escaped [12:12] chapel: v8: json = '{ "name" : "Package 1", "description" : "Sample package 1" }'; parsed = JSON.parse(json); [12:12] v8bot: chapel: {name:"Package 1",description:"Sample package 1"} [12:12] chapel: it works [12:13] kriszyp2 has joined the channel [12:14] Twelve-60: chapel: is there a help function on creating an 'error' to return? [12:14] jarek: chapel: it looks like JSON.parse() does not work when the string contains new line characters (\n) [12:14] chapel: Twelve-60: like what? [12:15] Twelve-60: i guess to copy what nodejs does, e.g. object with name/message/whatever [12:15] chapel: v8: json = '{ "name" : "Package 1", \n"description" : "Sample package 1" }'; parsed = JSON.parse(json); [12:15] v8bot: chapel: {name:"Package 1",description:"Sample package 1"} [12:15] chapel: jarek: seems to work [12:16] chapel: v8: new Error('message'); [12:16] v8bot: chapel: {stack:"Error: message\n at eval at (evalmachine.:26:5)\n at evalmachine.:26:9\n at evalmachine.:30:2\n at Socket.run (/home/inimino/v8bot/lib/sandbox/shovel.js:76:19)\n at Socket.emit (events.js:39:17)\n at Socket._onReadable (net.js:629:51)\n at IOWatcher.onReadable [as callback] (net.js:156:10)",arguments:undefined,type:undefined [Output truncated...] [12:16] noplace has joined the channel [12:16] jarek: damn, this function is awful [12:16] jarek: I'm going to create a wrapper to JSON.stringify :/ [12:16] jarek: and JSON.parse [12:16] chapel: jarek: do a gist/pastie of your code [12:17] Twelve-60: chapel: ah ha, any other arguments? [12:17] ph^ has joined the channel [12:18] kuya: hi hi, im trying to use backbone.js with express, for some reason using backbone.Collection.fetch() doesnt seem to be making a request express understands. If i do a jquery .ajax() call the request is seen by express. the only difference between the two requests seems to be that the backbonejs call is setting content-type to application/json. any ideas? [12:18] chapel: umm yeah, I don't know them off the top of my head [12:18] jarek: chapel: ahh... it works now [12:19] jarek: chapel: I forgot to remove a trailing comma [12:19] symbel has joined the channel [12:19] chapel: funny how that is :) [12:20] chapel: v8: console.dir(new Error('test')); [12:20] v8bot: chapel: TypeError: Object # has no method 'dir' [12:20] chapel: v8: console.error(new Error('test')); [12:20] v8bot: chapel: TypeError: Object # has no method 'error' [12:20] chapel: v8: console.log(new Error('test')); [12:20] v8bot: chapel: {stack:"Error: test\n at eval at (evalmachine.:26:5)\n at evalmachine.:26:9\n at evalmachine.:30:2\n at Socket.run (/home/inimino/v8bot/lib/sandbox/shovel.js:76:19)\n at Socket.emit (events.js:39:17)\n at Socket._onReadable (net.js:629:51)\n at IOWatcher.onReadable [as callback] (net.js:156:10)",arguments:undefined,type:undefined,me [Output truncated...] [12:21] chapel: Twelve-60: { stack: [Getter/Setter], arguments: undefined, type: undefined, message: 'error' } [12:23] Twelve-60: hmm [12:24] Twelve-60: trying see what fs does, as it has a code aswell [12:24] stepheneb has joined the channel [12:24] Twelve-60: e.g. { stack: [Getter/Setter], arguments: undefined, type: undefined, message: 'ENOENT, No such file or directory \'idontexist\'', errno: 2,31, code: 'ENOENT', path: 'idontexist' } [12:25] chapel: yep [12:26] Twelve-60: hmm [12:30] jetienne: http://blog.mrale.ph/post/4217120977/improved-v8-external-arrays-support-and-nodejs-buffer <- excelent... so much for micro optimisation :) [12:30] chapel: jetienne: yep [12:31] chapel: I threw that on hn [12:31] chapel: its on the front page [12:31] no-gooder has joined the channel [12:35] hellp has joined the channel [12:36] xandrews has joined the channel [12:36] stepheneb has joined the channel [12:40] F1LT3R has joined the channel [12:52] SamuraiJack has joined the channel [12:52] micheil: oh, wow. the netstring module by pgriess does a hell of a lot of intensive Buffer work. [12:56] fly-away has joined the channel [13:00] shiawuen has joined the channel [13:08] mytrile has joined the channel [13:10] tmedema has joined the channel [13:11] tmedema: I've got an issue with Express/Jade. Basically in view options I initialize an empty headScripts array. In my layout.jade file I then iterate over this array to include every script into the head that has been pushed in the array. In my indivual views I then do eg. - headScripts.push('/jquery.js'); now the problem is that it is apparently adding the scripts multiple times [13:12] tmedema: Any idea what could cause that? It looks like the push call is executed multiple times even though I only set it once in my view [13:12] jdub has joined the channel [13:13] hackband has joined the channel [13:13] coreb has joined the channel [13:13] Shrink has joined the channel [13:14] tmedema: Wow.. the strange thing is that if I refresh the browser there are even more duplicate calls [13:14] tmedema: as if something is cached.. [13:14] tmedema: Oh.. I guess the array is "global" and each time a view is rendered another item is added [13:15] tmedema: That's weird, I thought the view options are set on every render, aka it should be an empty array at the start [13:17] bojicas has joined the channel [13:18] eb4890 has joined the channel [13:18] tomgallacher has joined the channel [13:21] echosystm has left the channel [13:24] eee_c has joined the channel [13:26] jetienne has joined the channel [13:27] indutny has joined the channel [13:27] skm has joined the channel [13:27] indutny: ryah: ping? :) [13:28] no-gooder has joined the channel [13:29] Bwen: pong? [13:30] indutny: ryah: can we expose node_crypto.h? [13:31] indutny: Bwen: ? [13:31] Bwen: bong? [13:32] k1ttty has joined the channel [13:33] indutny: bwong? [13:33] Bwen: access granted, you may proceed [13:33] indutny: I like that kinda informative conversations :D [13:37] arianrock has joined the channel [13:38] arianrock: yo [13:38] stride: hey [13:40] indutny: hey? [13:40] stride: ho [13:41] mikegerwitz has joined the channel [13:41] mikegerwitz has joined the channel [13:42] pomodoro has joined the channel [13:51] jtrudeau has joined the channel [13:53] skm has joined the channel [13:53] maushu has joined the channel [13:54] marcello3d has joined the channel [13:54] skm has joined the channel [13:55] skm has joined the channel [14:04] indutny: ryah: double-ping? ping-ping ;) [14:05] noplace: ping-pong [14:08] bogo: pong [14:08] bogo: foos [14:08] ph^ has joined the channel [14:09] heinzp has joined the channel [14:09] micheil: ryah: is it possible to get the localPort of a server remotely? [14:10] micheil: rather, of a socket remotely? [14:12] FireFly has joined the channel [14:12] rfay has joined the channel [14:13] ph^ has joined the channel [14:19] pauls has joined the channel [14:20] unknown_had has joined the channel [14:20] jetienne: http://nodejs.org/docs/v0.4.6/api/net.html#socket.remoteAddress <- micheil may be this [14:21] micheil: I'm wanting the port number [14:21] jetienne: micheil: you tried and it doesnt include the number ? [14:21] astropirate has joined the channel [14:21] micheil: I'm using a pair of a net.Server and net.Socket to mesh nodes together [14:21] micheil: yeah, no port number [14:22] micheil: or, if I do use remotePort, I get the socket's port, not the server's port, which isn't what I want. [14:22] kriszyp has joined the channel [14:22] jetienne: hmm ok [14:23] skm has joined the channel [14:23] jetienne: anybody tried joose on node.js ? does it work well ? [14:23] galaxywatcher has joined the channel [14:24] skm has joined the channel [14:26] heinzp has joined the channel [14:26] tmedema: jetienne: it worked well but used a lot of Eval which I didn't like so I stopped using it [14:27] tmedema: author says Eval is not evil and wants to keep using it [14:27] zakabird has joined the channel [14:28] stonebranch has joined the channel [14:28] lorhko has joined the channel [14:29] jetienne: tmedema: what is the issue with eval ? [14:29] ardcore has joined the channel [14:29] jetienne: tmedema: i collaborate with @cramforce by patching streamie, he seemed reasonable and skilled from here [14:29] jetienne: collaborated [14:30] Imyourm8 has joined the channel [14:30] tmedema: jetienne: it was difficult to debug and afaik eval is not needed [14:30] tmedema: I used Joose 3 [14:30] Imyourm8: hi guys [14:31] Imyourm8: i have an issue with installing node on windows via cygwin [14:31] jetienne: tmedema: ah yeah, clearly eval may make the debug harder [14:31] Imyourm8: message: error:could not configure a cxx compilier! [14:32] Imyourm8: didnt find this issue in faq [14:32] Imyourm8: what i have to do to fix it? [14:34] tmedema: Any Express ninja can help me out here? http://groups.google.com/group/express-js/browse_thread/thread/b767df0003f788b2 It's about properly adding scripts to the head section within body views [14:35] mytrile has joined the channel [14:35] tmedema: (Note how this indirectly implies that, if you manage to help me, you are an 'Express Ninja' - who would not want to be an express ninja?!) [14:37] jtsnow has joined the channel [14:39] stagas has joined the channel [14:39] postwait has joined the channel [14:45] micheil: sooo... close to getting auto-meshing working [14:46] dandean has joined the channel [14:47] Corren has joined the channel [14:54] Astro: does anyone know how expensive nodecamp tickets are going to be? [14:57] F1LT3R has joined the channel [14:57] themiddleman_itv has joined the channel [14:59] SamuraiJack: tmedema: thanks to your notes, Joose no longer uses evals :) [14:59] SamuraiJack: in Joose itself [14:59] marcello3d: micheil: awesome! :D [14:59] SamuraiJack: eval is still being used for code materialization, for the reasons we already discussed [14:59] marcello3d: I fixed mongo auth support on mongodlian deadbeef :) [14:59] micheil: marcello3d: although, I did it wrong, my bad. [15:00] micheil: each peer in the network was going to have 1 server and N sockets [15:00] micheil: where N is the number of peers, but that's not needed. [15:00] micheil: I don't think [15:00] tmedema: SamuraiJack: ah, so it does not use eval to execute code in the browser? [15:01] skm has joined the channel [15:02] tmedema: it is a great library anyway, no doubts about that [15:04] SamuraiJack: it does [15:05] SamuraiJack: since FB can't debug code, executed with