[00:00] inimino: Spot__: node still actually uses only DNS, not /etc/hosts, for name resolution, AFAIK [00:00] inimino: but you can use '127.0.0.1' [00:01] orlandov: or 0.0.0.0 for all if's, right? [00:01] pdelgallego has joined the channel [00:02] mumrah has joined the channel [00:02] embwbam has joined the channel [00:02] Spot__: inimino: actually i found that false seems to work [00:02] drostie has joined the channel [00:03] embwbam: I'm having trouble with variable scope. http://gist.github.com/322288 - I get 100 for i every time [00:03] ashb: welcome to javascript [00:03] embwbam: javascript is always that fiddly [00:03] embwbam: ? [00:03] ashb: you are closing over the variable. not the value [00:03] embwbam: how can I get the value out of that? [00:03] inimino: Spot__: you can just pass "" if you want to listen on everything, yes (but that's not the same as 'localhost') [00:04] orlandov: oh god... [00:04] embwbam: Actionscript (ECMAScript-like) works completely differently [00:04] orlandov: yeah i have had that happen to me :( [00:04] ashb: embwbam: really? even when still using var? [00:04] inimino: no, it's the same [00:05] ashb: its just AS has "let", no? [00:05] embwbam: actionscript? no it's not… if you create an anonymous function it remembers local variables [00:05] inimino: yes [00:05] inimino: embwbam: it *is* remembering the variable [00:06] embwbam: (fires up flash to go check) [00:06] inimino: just not the value that the variable had in the past... it's the same as in Python, Scheme, etc [00:06] embwbam: well, how can I get the local value of "i" into that callback? [00:06] embwbam: I've tried everything I can think of [00:06] inimino: create another function and call it [00:06] orlandov: could you say 'var j = i;' before nextTick? [00:06] ashb: create an extra closure [00:06] inimino: `closures [00:06] gbot2: http://jibbering.com/faq/faq_notes/closures.html or http://blog.morrisjohns.com/javascript_closures_for_dummies [00:07] ashb: orlandov: wouldn't help since JS has not block scoping [00:07] embwbam: I understand the general concept of closures [00:07] orlandov: urgh [00:07] inimino: I think one of those articles covers the exact issue you're having [00:07] ashb: mozilla's added them :) [00:07] embwbam: oh, shoot [00:07] embwbam: you're right [00:08] embwbam: this works: http://gist.github.com/322288 [00:08] ashb: http://wiki.ecmascript.org/doku.php?id=harmony:let [00:08] ashb: and its a harmony proposal [00:08] ashb: but god knows when V8 will implement that, or if it will even get approved [00:08] embwbam: oh… wait, yeah, it makes sense [00:08] embwbam: the var i is a global variables [00:08] embwbam: variable [00:09] embwbam: duh [00:09] embwbam: I bet it would even work if I put the for loop in a closure… (testing) [00:10] embwbam: right… this works too: http://gist.github.com/322294 [00:10] inimino: really? [00:10] ashb: it does?. [00:11] embwbam: yes, because var i is no longer a variable defined outside of the test function [00:11] ashb: it shouldn't? you aren't calling loop(); for starters [00:11] embwbam: ha [00:11] embwbam: (smacks head) [00:11] inimino: but if you did, it will print "100" 100 times [00:11] ashb: embwbam: var i = 1; function x(i) puts(i); x(2); never sees the global var i [00:11] embwbam: yeah, you're right… maybe I don't understand it then [00:11] ashb: its like this: [00:11] inimino: there's nothing magical about the global scope [00:11] inimino: it's just the top-level scope [00:11] embwbam: k [00:12] ashb: you are binding a function to get calledo nthe next tick. [00:12] ashb: 100 times [00:12] inimino: so putting it in a function just moved the problem down a level [00:12] ashb: each closers over the same var i [00:12] ashb: by the time next tick is called (after you loop has finished) i is 100 [00:12] embwbam: right… and it calls "test" from that anonymous function that has i defined as 100 [00:12] embwbam: you're right [00:13] ashb: i know i am :) [00:13] embwbam: :) [00:13] inimino: :) [00:13] inimino: ACTION recommends http://jibbering.com/faq/faq_notes/closures.html [00:14] inimino: the other link appears to be down [00:14] embwbam: …long... [00:14] embwbam: thanks guys [00:22] joshbuddy has joined the channel [00:22] joshbuddy has joined the channel [00:23] tmpvar_ has joined the channel [00:24] embwbam: do you guys ever put classes in your custom modules? what do you do about how the "this" pointer gets corrupted? [00:26] Tim_Smart: embwbam: In what way does 'this' get corrupted [00:27] embwbam: If you create an instance of a class [00:27] embwbam: … let me create an example [00:27] Tim_Smart: example would be nice :p [00:33] embwbam: http://gist.github.com/322319 [00:33] embwbam: just updated it to add an example that fixes it. Again, wrapping it in another closure [00:37] orlandov: embwbam: i'm not sure if this is exactly what you're talking about, but i do `var self = this` quite often [00:38] embwbam: yeah! I remember that [00:38] embwbam: Thanks… man, it's been awhile [00:38] orlandov: i hear ya :) [00:39] embwbam: right, I can put that in my root class function, then use self.everything and not have to worry about it, right? [00:39] orlandov: yeah [00:39] embwbam: function MyClass() { var self = this; /* functions */ } [00:39] orlandov: just don't forget the `var` [00:39] orlandov: or you'll have ridiculous identity bugs [00:39] orlandov: ACTION speaks from experience [00:40] softdrink has joined the channel [00:44] aho has joined the channel [00:46] pdelgallego has joined the channel [00:48] maushu: Does it take long for commits to show up in github? [00:48] orlandov: generally no [00:48] orlandov: should be right away [00:48] maushu: Weird, I did a commit and nothing happened.. hmmm. [00:48] orlandov: in my experience [00:49] Tim_Smart: maushu: Did you push it :p [00:49] maushu: Oops. [00:49] orlandov: heh [00:49] maushu: ACTION crawls away. [00:50] Tim_Smart: New git users do it all the time, they still think they are working on a server [00:50] orlandov: i blame svn [00:50] Tim_Smart: and cvs [00:51] maushu: What the hell. [00:51] maushu: My commit went with my nickname instead of git account. [00:51] maushu: Wryyyyyyy [00:52] orlandov: cat ~/.gitconfig [00:52] maushu: cat: /home/mau/.gitconfig: No such file or directory [00:52] maushu: Is this bad? [00:52] Tim_Smart: You will want to set up your git config sooner or later [00:53] orlandov: not bad, but you probably want to set it up with your name and email [00:53] orlandov: cause then github can do nitfy things like sho your gravatar [00:53] maushu: But... but... where the heck did they get my nickname anyways. [00:55] maushu: I'm confused. [00:56] Booster has joined the channel [00:56] maushu: How do I make my commits show with the same name as my github account? [00:57] gwoo: git config --global user.name "what your want" [00:57] gwoo: i think [00:57] gwoo: maushu: github has a guide for you [00:57] maushu: I'm looking for it. [00:57] maushu: Let's see... Help... [00:58] gwoo: well i was right :) [00:58] gwoo: http://github.com/guides/git-cheat-sheet [00:58] gwoo: go to the Configure section [00:58] maushu: Ah here we go. "If you just f*cked up, read this guide." [00:58] gwoo: http://help.github.com/git-email-settings/ [00:59] maushu: Ah, thanks. [01:01] maushu: Ok I think I'm ready. Here we go again. [01:05] brapse has joined the channel [01:09] tisba_ has joined the channel [01:10] maushu: FFFFFFFFFFFF- [01:10] maushu: Now my e-mail shows up! [01:15] tmpvar_ has joined the channel [01:16] maushu: Finally. [01:16] maushu: SVN never gave me this much work. >_< [01:21] Tim_Smart: maushu: generally tools with steep learning curves lead to ninja tools, there are exceptions though [01:21] maushu: ... [01:21] maushu: Now my email shows up in the file commit. [01:22] maushu: Instead of my nickname and link. [01:22] maushu: Did I do something bad to someone in some past life? ;_; [01:22] inimino: vim, emacs, git,... [01:25] Tim_Smart: maushu: http://help.github.com/git-email-settings/ [01:26] orlandov: maushu: once you get proficient with git, i swear you will think using svn is like banging rocks together [01:26] maushu: Oh, I know. Git is pretty. If only it did what I want. [01:27] maushu: Tim_Smart, I did that, the problem is that instead of my nickname with a link to my github home it shows my email. [01:27] maushu: Next to the changed file. [01:30] Booster has joined the channel [01:37] mikeal: is there a clean way to close an http client that is waiting on a connection? [01:37] mikeal: sorry [01:37] mikeal: waiting on a response [01:38] mikeal: calling .close() on the client shows an exception [01:40] _ry_away: mikeal: .forceClose [01:40] mikeal: sweet [01:40] _ry: mikeal: (maybe) [01:40] mikeal: hehe [01:40] siong1987 has joined the channel [01:47] voodootikigod_ has joined the channel [01:57] muri_one: the menu on the left of the api documentation doesn't fit on a 1024/600 netbook screen [01:58] muri_one: is addons the lest menu item there? [01:59] muri_one: s/lest/last [02:01] Tim_Smart: _ry: Thinking about the whole adding extensions idea. Do you think your require.registerExtension idea would be acceptable for now? [02:02] Tim_Smart: Reason being, is I'm looking at making a web framework that lets the user write his code in coffee [02:02] Tim_Smart: But runs on node.js [02:03] _ry: muri_one: oh shit that's not goo [02:03] _ry: good [02:04] _ry: Tim_Smart: sure - get it working for yourself and then send me a patch with the hook [02:06] jashkenas has joined the channel [02:07] Tim_Smart: _ry: OK I'll look into it [02:08] mikeal: i *really* need a pint [02:09] Tim_Smart: I have taken a strange liking to cider lately [02:10] Tim_Smart: talking about pints, that is [02:10] Tim_Smart: I are not derailing teh node IRC [02:11] muri_one: _ry: i can get down to addons in a full screen window. with taskbar and firefox menus,tabs,and statusbar Path Module is as far as it goes. :) [02:11] mikeal: haha [02:11] mikeal: i need to head to a bar somewhere in Oakland before my brain explodes [02:11] Tim_Smart: Your fridge must really suck right now [02:12] abustin has left the channel [02:12] mikeal: if i get a drink at home I'll end up writing more code [02:12] mikeal: i need to get a pint somewhere without computers [02:12] Tim_Smart: oic [02:12] tmpvar_: lol [02:13] omygawshkenas has joined the channel [02:13] Tim_Smart: I wonder if anyone has drunken a pint on the moon yet... [02:13] mikeal: don't you have to drink through a straw in that gravity? [02:13] Tim_Smart: yeah, but still, has anyone done it? [02:14] Tim_Smart: If not, I better start saving my internet dollars [02:14] mikeal: i'm sure the Virgin Galactic will be serving excellent beverages [02:14] mikeal: s/the/that [02:18] omygawshkenas has joined the channel [02:22] blazzy: buzz aldrin supposedly had a bit of wine on the moon. as some religious ritual [02:35] omygawshkenas has joined the channel [02:37] isaacs has joined the channel [02:41] gf3: JoePeck: can I borrow some of these: http://github.com/JosephPecoraro/jsircbot/blob/master/commands.yaml ? [02:41] gf3: JoePeck: for use in #prototype [02:43] _ry: why aren't the irc bots written in node? [02:43] _ry: i guess the logger is [02:44] siong1987_ has joined the channel [02:44] steadicat has joined the channel [02:45] Tim_Smart: _ry: All my irc bots are :p Just haven't found a server for them [02:47] gf3: _ry: http://github.com/gf3/Jerk [02:47] jashkenas has left the channel [02:49] mikeal has joined the channel [02:54] embwbam has joined the channel [02:56] konobi: _ry: ping [02:58] tmpvar_: soup [02:58] tmpvar_: :P [02:58] tmpvar_: gf3 looks cool [02:59] mumrah has left the channel [02:59] gf3: tmpvar_: thanks! [03:01] tmpvar_: where is the IRC lib? [03:01] tmpvar_: AH [03:01] tmpvar_: nevermind :) found [03:01] tmpvar_: that ones a bit bigger, but small compared to what i was expecting [03:01] tmpvar_: gf3, nice job [03:02] gf3: thanks, tmpvar_, it's an ongoing process, I'll continue refining both [03:03] tmpvar_: awesome [03:03] creationix has joined the channel [03:03] creationix has left the channel [03:05] tmpvar_: I think I found a way to do composites in performer [03:06] Tim_Smart: tmpvar_: http://github.com/biggie/biggie , about to get started. Feel free to edit http://wiki.github.com/biggie/biggie/roadmap [03:07] tmpvar_: Tim_Smart, I'll attempt to free up some time [03:07] tmpvar_: got sucked into some old ideas I had but could never express in code :) [03:08] Tim_Smart: tmpvar_: Don't feel you have to, it would just be nice to have a community driven framework designed by noders for node [03:08] tmpvar_: im all for that [03:08] tmpvar_: actually, i think you are starting smart [03:09] tmpvar_: making an account for biggie is really smart as you can have your supporting libs blown out under the same user [03:09] tmpvar_: i should have composites tonight, tomorrow pipes [03:09] tmpvar_: this weekend a composer, then i'll decide where im going heh [03:09] tmpvar_: ACTION continues to talk in gibberish [03:10] tmpvar_: i'll be showing this off if its anything like i think it will be [03:11] mikeal has joined the channel [03:11] Tim_Smart: tmpvar_: okay [03:12] Tim_Smart: tmpvar_: The whole one account thing also means, we don't fall into the same trap jquery did, where everything was under JohnResig's name [03:12] Tim_Smart: well not really a trap, but a bit mis-leading [03:13] tmpvar_: well, that may be a bad example.. as he is pretty f-ing good at what he does [03:13] tmpvar_: but non-the-less i get what you are saying [03:13] tmpvar_: so what does the license look like? [03:14] Tim_Smart: MIT I'm assuming for now [03:14] aho has joined the channel [03:15] tmpvar_: sounds good to me [03:15] morgan has joined the channel [03:17] Cainus has joined the channel [03:17] dnolen has joined the channel [03:30] abustin has joined the channel [03:42] kriszyp_ has joined the channel [03:46] steadicat has joined the channel [03:52] schmelzle has joined the channel [04:01] isaacs: Tim_Smart: pull req: http://github.com/isaacs/biggie/commit/d8b5f2edc9a6db220f7a2dac3c389ade0e561068 [04:01] isaacs: (i made the hyperlink a hyperlink) [04:01] Tim_Smart: :p [04:01] Tim_Smart: You want commit access? [04:01] isaacs: sure, why not? [04:01] Tim_Smart: I'll add you to biggie-orm as well [04:02] isaacs: i'm kinda curious about where you're going with it. i have a lot of other projects cooking, so i don't have much time to devote to this, but i dig the name (sinatra and coltrane are so outdated, i grew up with biggie and tupac) [04:02] bpot has joined the channel [04:02] isaacs: also, it seems like express is kinda the go-to "full featured node platform", and i have some major artistic differences with it [04:02] isaacs: so it'd be good if there was one that *didn't* completely disregard the whole "module" thing [04:03] Tim_Smart: As you can see, it is very much a blank slate: http://wiki.github.com/biggie/biggie/design-goals [04:03] isaacs: yep [04:04] isaacs: seems like this would benefit from a good html parser: "so you can call it all from the browser, that has identical templating facilities for generating HTML on both sides" [04:04] Tim_Smart: we do have a google wave, where we discussed a lot of things [04:04] isaacs: i'd really like to see something that didn't get too far from node's built-in features [04:04] tmpvar_: hey isaacs [04:04] isaacs: ie, don't try to turn it into ruby or python or whatever [04:05] Tim_Smart: isaacs: Well one things I aim on adding is coffeescript support [04:05] isaacs: suresure [04:05] isaacs: but that could just be a matter of compiling .coffee files to .js [04:05] isaacs: and then using that [04:05] isaacs: i'm talking about the jsgi ejsgi ajsgi rack sinatra stuff [04:05] tmpvar_: you mean aids? [04:06] Tim_Smart: isaacs: _ry is currently accepting a patch for require.registerExtenstion [04:06] Tim_Smart: so just a matter of putting that in init [04:06] isaacs: tmpvar_: it makes things slower, but i don't know if i'd compare it to the AIDS epidemic [04:06] isaacs: Tim_Smart: oh, ok, then that'd do it. [04:06] tmpvar_: yeah, bad joke perhaps [04:07] isaacs: tmpvar_: hehe [04:07] Tim_Smart: isaacs: Well as I said, nothing is decided, so put your opinions down in the wiki [04:07] isaacs: Tim_Smart: i'd also like to see biggie be pluggable, so that it's small at its core, and i could avoid loading the cs compiler if i wanted. [04:07] isaacs: etc. [04:07] isaacs: smallie? [04:08] Tim_Smart: Yes that is what I am after also [04:08] Tim_Smart: so things like the orm etc can be included / excluded at will [04:09] tmpvar_: composites === hackishly functional, wut! (celebration cig) [04:10] isaacs: Tim_Smart: very very nice [04:11] tmpvar_: I think there is much to learn from the failures of past php/ruby/python projects :) [04:12] isaacs: tmpvar: in their defense, they didn't ever have a sane securable module framework [04:12] isaacs: but we don't have that excuse. [04:12] tmpvar_: oh, i agree. this is a whole new paradigm [04:12] tmpvar_: brb [04:16] bpot_ has joined the channel [04:16] ako has joined the channel [04:18] BryanWB has joined the channel [04:18] softdrink has joined the channel [04:19] embwbam has left the channel [04:20] brainproxy: hey, i'll be watching biggie for good things to come :) [04:23] isaacs: i love it when they call me big poppa (throw ya hands in the air, if you's a true playa) [04:24] tmpvar_: i see a gun in your waist - please dont shoot up the place - cuz i see some ladies here tonight - should be havin my babies - baby [04:25] isaacs: tmpvar_: RIGHT!? [04:25] tmpvar_: something to that effect lol [04:25] tmpvar_: keepin it real yo [04:25] isaacs: to all the ladies makin money playin niggas like dummies: uh. [04:26] isaacs: it'd also be cool if biggie used npm extensively. i've got some stuff on my roadmap for post-0.1.0, like start and stop scripts. [04:27] tmpvar_: yeah, we need a pm [04:28] Tim_Smart: I guess it could use any package manager that supported node [04:28] Tim_Smart: But it would be nice to give the option of making apps stand-alone [04:28] isaacs: Tim_Smart: it's a race between me and kriskowal, i think [04:28] isaacs: :) [04:28] Tim_Smart: so they are portable. Ah ok [04:29] tmpvar_: as long as they use package.json its all good :) [04:29] isaacs: yeah, loose separation is key. but i've been longing for something like "yinst start foo" and "yinst set foo.port=8080" etc [04:32] wil_ has joined the channel [04:39] sztanphet has joined the channel [04:39] jashkenas has joined the channel [04:39] atcrabtree has joined the channel [04:40] Tim_Smart: isaacs: Have you thought about ORM in node much? [04:40] isaacs: Tim_Smart: i looked into that just a teeny bit once upon a time, with narwhal. [04:40] isaacs: Tim_Smart: i dunno. ORM seems kinda meh. I mean, why not just use couch or something, where you get data objects, if that's what you want? [04:41] isaacs: node-couchdb is nicer than most orms [04:41] kriskowal: javascript is pretty hostile to orms anyway; no proxies yet [04:41] isaacs: but i suppose you could do some very clever and pretty (and, probably, slow) things using setters and getters on the fields [04:43] kriskowal: but nathan stott did a basic form modeling library; i haven't looked into it. [04:43] kriskowal: and moose would probably be a decent basis for an orm [04:44] Tim_Smart: I'm looking into disregarding sql databases entirely from the beginning [04:45] Tim_Smart: no-sql is becoming quite popular, and we don't want to be maintaining code that will just take time from other features [04:49] Tim_Smart: isaacs: I guess a simple ORM that provides a base for storing models in a no-sql storage system would be just fine [04:49] Tim_Smart: Maybe tie it in with creationix's node-persistence [04:50] isaacs: Tim_Smart: i'd probably be more inclined to just figure out a consistent surface that node-persistence and node-couchdb and node-postgres can hook onto [04:50] isaacs: maybe even modify those packages slightly [04:50] jashkenas: Hey, if you tie it in to events that the models emit (both on the client and the server) it could be really beautiful. [04:50] Tim_Smart: isaacs: Isn't that what node-persistences goal is? A common API for multiple storage systems? [04:51] isaacs: Tim_Smart: yeah, but you might not want everything that node-persistence offers. [04:51] jashkenas: ie, when you call model.save(attributes) ... [04:51] isaacs: maybe the answer there is to make node-couchdb look more like node-persistence [04:51] isaacs: it's a pretty small lib (i hacked it a bit to make it work with 0.1.30) [04:51] Tim_Smart: jashkenas: So events are distributed at both levels [04:52] jashkenas: The model fires a 'changed' event, that triggers the callbacks attached by everyone who's listening. On the browser that means re-rendering a small portion of the DOM, and perhaps syncing it to the server. [04:52] isaacs: but then, you could have something where you're like "biggie.waveHandsInAir(require("node-couchdb"))" [04:52] jashkenas: And on the server, that means that your ORM actually serializes the new attributes to the DB> [04:53] Tim_Smart: Yeah I'm looking at using event-emitters extensively [04:53] Tim_Smart: making everything that much more pluggable [04:53] Tim_Smart: and easier to de-bug, by over-riding the emit method :p [04:55] Tim_Smart: jashkenas: Wouldn't something like that require use of bi-directional communication? [04:56] jashkenas: Only when you have changes originating from the server, in which case, yes, you need to have built-in polling, web-sockets, or comet. [04:56] isaacs: Tim_Smart: blerg.onSomething is faster, and even easier to debug ;) [04:56] isaacs: but i guess then you only get one listener per event [04:57] jashkenas: If you had that built in to the models transparently, it would be a pretty compelling reason to use it. [04:57] Tim_Smart: jashkenas: Node would certainly make it easier [05:01] Tim_Smart: I guess you could say whether a model emits server initiated events, and it will auto-add bi-directional communication support to the page [05:09] spoob has joined the channel [05:15] tmpvar_: im a bit late to the discussion, but i completely agree with Tim_Smart here [05:15] tmpvar_: events are the way to go [05:15] tmpvar_: especially for a pluggable architecture [05:16] Tim_Smart: events are awesome, and fit the whole web thing very well. When something happens = an event [05:17] Tim_Smart: All it will need is a custom EventEmitter prototype on the browser, hooked up to a XMLHttpRequest [05:18] Tim_Smart: or if the user decides to include the jQuery plugin for biggie, which is something I just thought of [05:18] Tim_Smart: Then it uses different client code [05:20] tmpvar_: Tim_Smart, not sure if its helpful, but i ported nodes eventemitter to pure js [05:20] tmpvar_: http://github.com/tmpvar/jsemitter [05:21] Tim_Smart: Sure, I guess I'll make a wiki page linking to helpful projects [05:21] tmpvar_: currently the emit function is built in c++ [05:21] tmpvar_: (in node) [05:22] tmpvar_: should work on the browser, but I have yet to actually test :/ .. when that happens I'll probably be re-factoring a few of my projects [05:22] tmpvar_: anyhow.. early morning tomorrow have a good night! [05:22] Tim_Smart: night [05:34] RayMorgan has joined the channel [05:46] mikeal has joined the channel [05:54] micheil has joined the channel [06:13] dnolen has joined the channel [06:14] mikeal has joined the channel [06:19] kennethkalmer has joined the channel [06:20] kennethk_ has joined the channel [06:22] mikeal: isaacs: i've got npm setup using link packages on two boxes and they are both going great [06:22] isaacs: mikeal: that warms my heart. [06:22] isaacs: i'm adding in your bin stuff now [06:22] mikeal: my bin stuff? [06:22] mikeal: oh that [06:22] mikeal: i thought you meant that experimental code i wrote like a month ago [06:22] mikeal: i was like "you're way past that" [06:22] mikeal: cool [06:23] isaacs: { "bin" : { "foo" : "path/to/foo.js" } } [06:23] mikeal: the bin stuff will be awesome [06:23] isaacs: i'm just gonna symlink it, though [06:23] isaacs: not a nodejs shim [06:23] isaacs: since you might want to add an actual factual binary [06:24] isaacs: and you can pretty much be assured that your main kit is gonna be in a predictable place, so like the npm cli.js can just do require("npm") to get it [06:24] mikeal: it's not actually an issue until windows support goes in to node [06:25] isaacs: i am perhaps one of the more deeply anti-windows folks in the nodejs community. and that's really saying something [06:25] mikeal: on pretty much any posix box you can do #!/usr/bin/env node [06:25] mikeal: it's only if you need to support somewhere that didn't have it that you would need the shim [06:26] isaacs: sure... but there's a lot more harder problems to solve in that case. [06:27] mikeal: if you do every support windows, the whole stack might just get special cased :) [06:27] mikeal: s/every/ever [06:27] mikeal: i need to go to bed [06:27] mikeal: or i need to write awesome testing support in to couchapp [06:27] mikeal: i can't decide [06:31] Tim_Smart: When some asks whether they should go to bed or not, in most cases bed is the best option [06:41] bpot has joined the channel [06:43] Tim_Smart: isaacs: For a brief run-down of biggie-orm, how does this look: http://github.com/biggie/biggie-orm#readme [06:43] Tim_Smart: ignore the fail list >.< [06:44] isaacs: lolz: it currently will support are [06:44] tmpvar has joined the channel [06:45] Tim_Smart: isaacs: A confusion between future and present state :p [06:51] isaacs: seems alright [06:54] Tim_Smart: Well I'll probably be stealing quite a few ideas from activerecord for the orm [07:02] geoffreyd has joined the channel [07:06] dnolen has joined the channel [07:07] Cainus has joined the channel [07:12] BryanWB has joined the channel [07:21] dnolen has joined the channel [07:23] ako has joined the channel [07:52] sveisvei has joined the channel [08:06] BryanWB has joined the channel [08:15] tisba has joined the channel [08:16] christkv has joined the channel [08:19] rockstar has joined the channel [08:19] rockstar has joined the channel [08:28] markwubben has joined the channel [08:34] teemow has joined the channel [08:45] jed_ has joined the channel [09:20] felixge has joined the channel [09:32] qFox has joined the channel [09:34] kjeldahl has joined the channel [09:41] tbassetto has joined the channel [10:58] felixge has joined the channel [10:58] felixge has joined the channel [11:05] hassox has joined the channel [11:35] malkomalko has joined the channel [11:39] JonGretar has joined the channel [11:42] isaacs: wow, the introductions thread is awesome. [11:42] isaacs: usually those things are sorta lame, i think, but this is fascinating. [12:04] MattJ has joined the channel [12:40] siculars: does JSON.parse not exist in node? [12:40] ithinkihaveacat has joined the channel [12:41] alex-desktop has joined the channel [12:46] erikcorr1|away has joined the channel [12:47] ashb: siculars: yes it does [12:47] christkv has joined the channel [12:47] kennethk_ has joined the channel [12:47] tlockney has joined the channel [12:50] siculars: ashb: woops , sorry bout that. was calling it wrong. doh' [13:06] brandon_beacher has joined the channel [13:25] pmuellr has joined the channel [13:31] gf3 has joined the channel [13:33] voodootikigod_ has joined the channel [13:41] davidsklar has joined the channel [13:43] kriszyp has joined the channel [13:55] hassox has joined the channel [14:00] JAAulde has joined the channel [14:08] Booster has joined the channel [14:12] lifo has joined the channel [14:17] joshbuddy has joined the channel [14:17] joshbuddy has joined the channel [14:20] pdelgallego has joined the channel [14:43] carsonm has joined the channel [15:02] tmpvar has joined the channel [15:03] tbassetto has joined the channel [15:03] schmelzle has joined the channel [15:05] Cainus has joined the channel [15:07] brandon_beacher has joined the channel [15:07] christkv has joined the channel [15:07] kennethk_ has joined the channel [15:07] tlockney has joined the channel [15:16] alexiskander has joined the channel [15:17] jed_ has joined the channel [15:21] softdrink has joined the channel [15:22] embwbam has joined the channel [15:22] embwbam: Anyone know of an ftp client library? [15:23] gwoo: did you see http://github.com/billywhizz/nodeftpd ? [15:23] embwbam: nope. thanks [15:23] gwoo: felixge: you here? [15:23] gwoo: felixge: are you working on GSOC? [15:24] embwbam: The docs mention something about "packaging a module as a directory" — what does that mean? [15:24] felixge: gwoo: I'm trying to help with getting in there [15:25] gwoo: felixge: awesome [15:25] gwoo: felixge: i tried last year for cake [15:25] felixge: gwoo: didn't work? [15:25] gwoo: no [15:25] felixge: bumer [15:25] gwoo: its very hard to break in [15:25] gwoo: the most important thing was the list of potential projects [15:25] gwoo: yeah it was weird cause there were even a bunch of students who specifically wanted to work on cake [15:25] embwbam: nvm, figured it out [15:26] felixge: well, there is at least one guy at google using/playing with node, so maybe we can infiltrate ;) [15:26] gwoo: yeah and using v8 [15:26] gwoo: helps [15:26] felixge: gwoo: heh, probably [15:26] felixge: gwoo: lets see [15:26] gwoo: so i think we just need to focus on the list [15:26] gwoo: of potential opportunities [15:27] embwbam has left the channel [15:27] embwbam has joined the channel [15:29] kriszyp_ has joined the channel [15:29] gwoo: felixge: it also will help if there is a specific page on nodejs.org that promotes GSOC [15:30] embwbam: gwoo: dang, that's only an FTP *server* [15:30] gwoo: ah [15:31] gwoo: embwbam: probably because writing a client is trivial [15:31] gwoo: with the tcp stuff [15:31] embwbam: yeah, just lines over TCP, right? [15:31] embwbam: still, some things do seem daunting the first time [15:31] embwbam: this list of modules is *awesome* http://wiki.github.com/ry/node/modules [15:31] kriszyp_: christkv: which version of mongo have you been developing/testing with? [15:32] christkv: kriszyp: 1.2.2 [15:32] kriszyp_: ok, I'll try that, I was using the 1.3.x branch [15:32] carsonm: Is calling removeListener from inside an event callback a bad thing? It seems to modify the list of listeners while the emit is still going causing listeners to be skipped. [15:33] christkv: Should be fine as long as you emit first [15:33] carsonm: It seems like removing listeners needs to be deffered until after all listeners are done. [15:34] christkv: I would have prefered to have some sort of "emit" and remove call [15:35] carsonm: If I add two listeners and they both remove themselves from the list of listeners after they get the event the second one will not fire. [15:35] christkv: where the emit would call the listener and automatically deregister the listener [15:36] christkv: in monogdb-native I only use this tactic one place [15:36] christkv: and it's with custom "events" [15:36] christkv: each message from mongo has a responseTo Id that's used for the listener [15:37] christkv: so there's always a 1:1 relationship between the message coming from mongo and the listener [15:37] alexiskander has joined the channel [15:38] carsonm: I was playing with amqp when I ran into this. One queue with multiple listeners. [15:39] carsonm: I was trying to long poll connections to listen on the queue so I need them to remove themselves from the listeners when they finish responding. [15:39] pdelgallego has joined the channel [15:43] christkv: yeah interesting problem [15:44] _ry: hello [15:44] tmpvar has joined the channel [15:45] christkv: I have no idea how you could solve that other than turning the array behind into something like a linked list [15:45] carsonm: I did create a patch that made it work but it is rough around the edges. [15:46] christkv: carsonm: you got a link ? [15:46] carsonm: I just track that the emit is in progress and push the remove requests into another array. At the end of the emit it applys all those to the list. [15:47] carsonm: not yet, I wanted to make sure I wasn't crazy before going into it more [15:47] steadicat has joined the channel [15:48] tisba_ has joined the channel [15:49] kriszyp: I get the same error with mongo 1.2.2 :(. Guess I'll see if I can put together a test case [15:52] cloudhead has joined the channel [15:52] christkv: kriszyp: what os, node and driver version ? [15:53] kriszyp: os-x 10.5.8, node 0.1.30, and downloaded your driver from git yesterday [15:55] christkv: pick the new tag with commits from Christoph Pojer V0.6.2 [15:56] christkv: but yeah if you can put together a failing testcase I will be super thankful [15:58] PyroPeter has joined the channel [15:58] kriszyp has joined the channel [15:58] cloudhead: isaacs: just wanted to say I'm with you on artistic differences with express, not my cup of tea [15:59] cloudhead: I'm developing my own thing, but will be keeping an eye on biggie [16:00] ashb: what's express? [16:01] felixge: ashb: framework for node, tries too much to look like sinatra IMHO [16:01] ashb: ah [16:01] felixge: but it's pretty full-featured and actively developed [16:01] felixge: so there is that [16:02] felixge: I really like (fab) so far [16:02] ashb: Express is currently being developed with node --version: v0.1.27 [16:02] ashb: 'actively'? [16:03] christkv: the node 0.1.30 branch "more" or less works [16:03] rockstar has joined the channel [16:03] ashb: oh theres a branch [16:03] ashb: i see [16:03] rockstar has joined the channel [16:03] ashb: tho the readme isn't updated [16:04] christkv: well I say more or less. It's not passing it's tests which causes some weird behaviour [16:04] christkv: but close enough [16:05] kriszyp: christkv: I think I have a test case I can send you, will send it your ml [16:05] christkv: carsonm: How are you fixing the removeListener issue ? [16:07] voodootikigod has joined the channel [16:10] brapse has joined the channel [16:10] lifo has joined the channel [16:13] christkv: ry: process.EventEmitter.prototype.removeListener currently changes the inplace array. Would it not be better to copy, change and replace the current array instead so you avoid the index changing in the middle of an event loop ? [16:13] gf3: JoePeck: heyo [16:13] carsonm: christkv: 1) I changed emit to set a flag saying that it is working. 2) I changed removeListener to check the emit working flag and shove the listener into a defferedRemoval array. 3) When emit is done it removes anything in the defferedRemoval list. [16:14] carsonm: I don't understand enough about how things work though to be comfortable with how I did it. It feels like there is probably a race condition in there or other issues. [16:14] christkv: there is also process.nextTick [16:14] christkv: you can add a callback and remove listeners then [16:15] carsonm: christkv: I was thinking about doing a copy but I lack enough understanding of V8 to do it. [16:16] _ry: christkv: yeah, maybe [16:16] carsonm: I gave it a 10 minute try but I don't think I knew how to increase the reference count so it still got removed. [16:16] christkv: well I would think the "current" listener array will be collected once all reference are lost to it which would be at the end of the event loop [16:17] carsonm: making a copy probably makes things easier [16:17] christkv: yeah [16:18] christkv: can you reproduce it in a test ? [16:19] carsonm: I think I can but I haven't had time to. I'm doing real work ATM :) [16:20] carsonm: I'll see if I can take a minute to do it before lunch. [16:21] dnolen has joined the channel [16:25] christkv: kriszyp: your db crashed the mongo commandline lol [16:25] kriszyp: heh, ok [16:28] carsonm: christkv: This should do it http://gist.github.com/322880 [16:29] tbassetto has left the channel [16:30] carsonm: christkv: expected output should be "test one: testing..." and "test two: testing..." but you only get the first one. [16:32] christkv: ry: should I fork off master for pull requests ? [16:36] _ry: christkv: yes? [16:36] binary42 has joined the channel [16:38] carsonm: christkv: http://github.com/carsonmcdonald/node/commit/9d83be73a8736e242084e025b5df78fe1f77770f [16:38] carsonm: That is what I did to "fix" it. [16:39] carsonm: Keep in mind I was just trying to verify that I wasn't missing anything. It needs more work. [16:40] carsonm: I think a cleaner way of doing it in the same way would be to stick the listener functions into a struct and then just flag them as needing to be removed or not. [16:44] alexiskander_ has joined the channel [16:45] christkv: or copy-replace :D [16:47] dandean has joined the channel [16:48] tmpvar has joined the channel [16:58] embwbam has joined the channel [16:59] RayMorgan has joined the channel [17:04] embwbam has left the channel [17:23] bpot has joined the channel [17:24] sveisvei has joined the channel [17:25] joshbuddy has joined the channel [17:29] aguynamedben has joined the channel [17:33] codeswing has joined the channel [17:33] christkv: carsonm: explored the copy-replace idea but won't work as a pure javascript fix [17:33] christkv: carsonm: it will have to be a combined native-javascript fix like you proposed [17:35] kennethkalmer has joined the channel [17:36] JoePeck has joined the channel [17:39] felixge has joined the channel [17:39] felixge has joined the channel [17:39] siong1987 has joined the channel [17:40] christkv: I think you should send a pull request to ry [17:44] eikke has joined the channel [17:44] kriszyp: christkv: how do you sort by descending order? [17:45] mattly has joined the channel [17:45] carsonm: christkv: I'll give that a go. I want to make it look a little better first. [17:45] tmpvar has joined the channel [17:45] ashb: kriszyp: http://www.mongodb.org/display/DOCS/Sorting+and+Natural+Order [17:45] kriszyp: right, I understand that part [17:46] kriszyp: how do I translate that to mongodb-native's API? [17:47] ashb: ah that i dont know [17:48] ashb: it doesn't just present the same sort of API but with callbacks? [17:49] kriszyp: based on http://github.com/christkv/node-mongodb-native/blob/master/examples/queries.js#L61 it looks like it takes a sort property that is the name/path of the property [17:49] kriszyp: but I don't see how to provide a direction [17:50] peburrows has joined the channel [17:50] ashb: try passing 'sort': { 'a': -1 } [17:50] ashb: ? [17:50] ashb: // Sort can be a single name, array, associate array or ordered hash [17:51] ashb: I would like to point out tht a module cannot be considered released until it has docs. that is all [17:51] peburrows has joined the channel [17:52] kriszyp: looks like it is going to expect 'sort': [{ 'a': -1 }] [17:53] kriszyp: or 'sort': [['a', -1 ]] [17:54] ashb: http://github.com/christkv/node-mongodb-native/blob/master/lib/mongodb/cursor.js#L141 [17:54] ashb: if you haven't foudn it already [17:58] tilgovi has joined the channel [17:59] felixge: _ry: are you sure you want to remove the inlined function in favor of prototypes for the file stream? I benchmarked it. Prototype is faster with 10 mio. objects created / sec, but inlined isn't slow with 8 mio / sec either. I mean it's incredibly cheap compared to opening the actual file descriptor and makes for a much nicer implementation [18:10] _ry: felixge: no - don't worry about it [18:10] _ry: it's fine how it is [18:13] stepheneb has joined the channel [18:20] unomi: _ry: at the risk of being annoying .. [18:20] kriszyp: thanks for the help ashb and christkv, I think I got my mongo object store in good shape now: http://github.com/kriszyp/perstore/blob/master/engines/node/lib/store/mongodb.js [18:20] unomi: autodocs just need C style comments. which presumably C supports ;) [18:20] kriszyp: now I can do REST on top of mongo... [18:22] felixge: _ry: the __proto__ seems to have the benefit of not needing to call the parent constructor [18:22] stepheneb_ has joined the channel [18:23] felixge: _ry: nvm, made that up [18:29] RayMorgan_ has joined the channel [18:29] _ry: unomi: i want good docs though [18:31] _ry: felixge: i forget the reason where doing what you were doing fails, but there's a point to sys.inherits() [18:31] _ry: felixge: google uses it. that's good enough for me :) [18:32] felixge: _ry: I just took __proto__ from isaacs who uses it in the multipart parser :) [18:32] felixge: _ry: but yeah google beats isaacs :) [18:32] felixge: _ry: got everything fixed, writing docs now [18:33] unomi: I don't feel particularly comfortable arguing for autodocs if you don't want them, I just don't understand what issues are perceived with them. The most damning issue that I heard was regarding 'backdated' documentation for released branches [18:33] stepheneb has joined the channel [18:33] _ry: unomi: well for example there is a c++ class in src/node_net.cc which implements a javascript class tcp.Server [18:34] unomi: but I honestly don't really find that too compelling either, 0.1.30 is the release version, not the latest git hash for that branch [18:34] _ry: unomi: for the purpose of the user it doesn't matter where it is implemented [18:34] isaacs has joined the channel [18:34] RayMorgan has joined the channel [18:35] _ry: unomi: if we auto generate docs - we're going to have to fight it to make that appear non shitty [18:36] _ry: i'd rather just spend 10 minutes and write out the docs for tcp.Server manually [18:36] unomi: ok, so imagine if we maintain doc files, much like asciidoc, but whose files mirror the api layout [18:36] _ry: doc/tcp/Server.html [18:36] _ry: yes [18:37] _ry: the thing is, i hate programming [18:37] kriskowal has joined the channel [18:37] _ry: i love doing things manually - because then they don't break :) [18:37] unomi: either we have it under version control with branches for each node release version [18:37] softdrink: Can anyone recommend something better than Selenium + Selenium Grid? I'm about to put it through a freaking wall. [18:37] _ry: yes, that's the big question [18:37] _ry: how to do the versions [18:38] unomi: or we have files like 0.1.30/doc/tcp/Server.html [18:38] _ry: one idea is to have a separate doc repo, and do 'cp -R node/doc/ node-doc/v0.1.31/' [18:38] _ry: then manually maintain them outside of the node repo [18:38] unomi: which is a bit nicer than /doc/tcp/0.1.30Server.html or /doc/tcp/Server/0.1.30.html [18:39] _ry: the cooler idea - start a branch for each release inside the node repo [18:39] _ry: have the doc generator walk the branches [18:39] _ry: pull them all out [18:39] unomi: nod [18:39] _ry: that's harder - and i'm not sure it's worth the effort [18:40] unomi: most doc generaters travers dirs by default [18:40] _ry: we'd also have things like back porting docs from later versions to earlier versions [18:40] unomi: yes, but just because a branch has been released as 0.1.30 doesn't mean that the files necessarily have to be completely static [18:41] unomi: true though, if the docs and the code are comingled then ensuring that a stray character doesn't disrupt something could be more iffy [18:41] tmpvar has joined the channel [18:42] devinus has joined the channel [18:42] _ry: i think doing doc branchs in a separate repo might make thigns easier [18:42] _ry: it would also allow more contributers [18:42] unomi: autodocs normally work by extracting comments which are located in code files, but they could just be files of comments [18:42] devinus: _ry: what's the net2 branch for? [18:42] piranha has joined the channel [18:42] unomi: so we use them just for markup [18:43] _ry: unomi: hmm.. why not just using markdown directly? [18:43] _ry: unomi: or for that matter just html? [18:43] siong1987 has joined the channel [18:43] tmpvar: _ry: i think we should use markdown (easy of entry) [18:43] tmpvar: how we do linking to other md's might be an issue though [18:43] _ry: you know we can parse html and insert elements (like navigation) and reserialize it [18:44] unomi: nod, in the case where we keep it completely seperate it might not offer a great deal of difference, there are niceties such, with yui doc, automatic navigation and skinnability [18:44] _ry: devinus: it's my attempt to change the way networking is done. [18:44] devinus: _ry: was there a problem with the first attempt? [18:45] peburrows has left the channel [18:45] _ry: devinus: all in c++, binary sucks [18:47] devinus: ah [18:47] creationix has joined the channel [18:50] creationix: _ry: looks like I missed the whole docs conversation [18:51] _ry: creationix: that's okay. i prefer to have it on the mailing list anyway [18:51] unomi: there is a thread on the ml, just wanted to mention some things out of band [18:52] unomi: ACTION sometimes beats dead horses, don't tell peta [18:53] _ry: creationix: how do you do
 in yaml?
[18:53] creationix: yaml or haml?
[18:54] creationix: yaml is basically just extended json
[18:54] tisba has joined the channel
[18:54] _ry: yaml
[18:55] creationix: _ry: I guess I don't understand the question then
[18:55] _ry: i mean a multiline, indented thing - does yaml have support for that?
[18:55] creationix: sure, that's why I recommend yaml over json, multiline strings and a lot less syntax
[18:56] pdelgallego has joined the channel
[18:57] mikeal has joined the channel
[18:57] _ry: yeah yaml seems like a good choice to me
[18:57] creationix: and depending on how free-form we want the content, markdown would be good for the unstructured paragraphs
[18:57] creationix: just embedded as yaml strings
[18:57] orlandov: i
[18:58] orlandov: 'm not sure i understand how yaml would fit into docs
[18:58] orlandov: isn't yaml mostly for data serialization?
[18:58] _ry: orlandov: i guess just giving it structure
[18:59] _ry: orlandov: but you have a point - there isn't that much structure - especially if we split the docs into many files
[18:59] _ry: why not just raw markdown?
[19:00] tmpvar: +1 for markdown
[19:01] orlandov: what about auto-generating some markdown?
[19:01] pigdude has joined the channel
[19:01] _ry: no auto-generating. it's going to be more pain than it's worth.
[19:01] tmpvar: there has been some work on that front.. I think user documentation might be better suited as fully manual
[19:02] creationix: agreed
[19:02] pigdude: what do you use to list a dir's contents?
[19:02] creationix: I'll work up a couple of gists on some sample markdown, yaml, or both combined to see what we think
[19:02] _ry: pigdude: fs.readdir
[19:02] tmpvar: "api docs" could possibly be partially auto-gen'd (its always good to have commends in the code)
[19:02] pigdude: _ry, ah there it is, thank you
[19:03] _ry: creationix: do tcp.Server - it's a small but typical example
[19:03] _ry: comments are fine. doc autogen is hell.
[19:04] _ry: (unless you're doing a small simple project - in which case it's reasonable)
[19:05] felixge: _ry: ok, I've finished the changes / docs and pushed it to a 'file2' branch: http://github.com/felixge/node/commits/file2
[19:06] tmpvar: _ry, i do agree.. but sometimes its nice to look at auto-docs than digging around in source 
[19:06] tmpvar: s/nice/nicer
[19:06] felixge: (file2 because you asked me to change the commit message on a previous commit and a force-push to the same branch would have deleted all our previous comments on github)
[19:06] _ry: felixge: what about encoding?
[19:07] felixge: _ry: it's user configureable, binary is the default
[19:07] _ry: felixge: i mean, very soon (really!) i'm going to make all streams emit buffers. until then it might be good to follow tcp.Connect and have a setEncoding() method
[19:08] felixge: _ry: so setEncoding() rather than specifying the encoding when creating the stream, or in addition to that?
[19:10] _ry: felixge: nevermind 
[19:10] creationix: _ry: ok, sounds good, I'll post it to the mailing list
[19:10] felixge: _ry: k
[19:10] Cainus has joined the channel
[19:11] felixge: _ry: I'm headed out for drinking fairly soon, so if you could review the rest right now that'd be nice. Otherwise I'll be back tomorrow
[19:11] _ry: felixge: i'm merging it now
[19:12] _ry: just want to run the tests once
[19:12] mikeal: who is Rasmus Andersson
[19:12] mikeal: linkedin doesn't have IRC names
[19:12] felixge: _ry: sure
[19:12] ollie has joined the channel
[19:13] pigdude: how do I get a pid? from sys.exec?
[19:13] felixge: mikeal: rsms <- http://wiki.github.com/ry/node/node-users
[19:13] pigdude: *pid from sys.exec?
[19:13] mikeal: ok
[19:13] mikeal: i always forget about pages when they are actually useful
[19:14] pigdude: I feel like I may be going about this the wrong way (using one node process to start another). is there an internal way to start a node process, avoiding sys.exec?
[19:14] felixge: _ry: are you gonna introduce yourself in the google groups thread as well? I mean everybody knows who you are, but there is not much more info about you to be found on the internets :)
[19:14] eikke has joined the channel
[19:15] unomi: ry is a top secret government experiment
[19:15] _ry: felixge: merged
[19:15] felixge: _ry: sweet :). Thanks you!
[19:15] felixge: * thank
[19:15] _ry: felixge: thank you very much for doing the file streaming - i think it's going to be awesome
[19:16] gwoo: suggestion for gsoc? http://progit.org/2010/03/04/smart-http.html
[19:16] felixge: _ry: I had to do it, you guys just deleted the old file module - and removing promises didn't make backporting that any nicer :)
[19:17] gwoo: nodejs git server
[19:17] maritz has joined the channel
[19:17] felixge: gwoo: probably not very important, but if we get 10+ slots *dream
[19:17] felixge: :)
[19:17] _ry: gwoo: would be cool - it's probably an afternoon hack though?
[19:17] gwoo: should be
[19:17] gwoo: :)
[19:17] gwoo: its node
[19:18] gwoo: but permissions system and some other goodies
[19:18] gwoo: might take a bit longer
[19:19] unomi: how advanced should gsoc projects be?
[19:20] gwoo: unomi: i think they are meant to last at least a month
[19:21] piranha has joined the channel
[19:21] unomi: with hotloading etc, the next step seems to me to be scaling.
[19:22] unomi: some very nice ideas were laid out wrt reaching 5 9s uptime
[19:22] rictic has joined the channel
[19:22] unomi: but another issue is also provisioning new node instances on remote servers
[19:24] unomi: for an application hoster, the ability to get node to 'reach out' to other node instances when they reach a certain connection saturation, have those newly provisioned node instances get at the resources and start accepting clients would be pretty sexy
[19:27] gwoo has joined the channel
[19:28] maushu has joined the channel
[19:29] MattJ: unomi: Just a thought, but isn't that better done in a different layer to node?
[19:30] MattJ: Perhaps using node also, but that's beside the point :)
[19:30] unomi: yes and no. 
[19:30] unomi: adding something like chef to the mix will give greater flexibility
[19:31] unomi: but being able to just install node on a client, start it with node slave.js conf
[19:31] devinus: _ry: i think you'll be glad to know that of all the languages/frameworks i've tried (Python[Pylons,Tornado]/Erlang[Mochiweb]/PHP) node.js with your postgres adapter is the only one that can handle the load and keep up 150 req/s consistently
[19:31] unomi: and then adding that ip to a pool will be pretty amazing
[19:32] unomi: because then you might just have a hassle free cloud application solution
[19:32] unomi: and it is obviously also totally in line with the name 'node' ;)
[19:32] MattJ: :)
[19:33] _ry: devinus: !
[19:36] Tim_Smart has joined the channel
[19:37] tmpvar has joined the channel
[19:39] maushu has joined the channel
[19:48] drostie has joined the channel
[19:56] stepheneb has joined the channel
[19:56] joshbuddy has joined the channel
[19:56] joshbuddy has joined the channel
[19:58] christkv has joined the channel
[19:59] _ry: so i guess we need an evalCtx
[19:59] _ry: so people can make irc bots
[19:59] _ry: and crap
[19:59] _ry: ACTION puts it on his todo list for the weekend
[20:00] kriskowal has joined the channel
[20:00] technoweenie has joined the channel
[20:00] Tim_Smart: _ry: I already got a node addon than evals in a clean context
[20:01] felixge: ACTION headed out for drinking. So much more training to do before JSConf :)
[20:01] nodejs_v8 has joined the channel
[20:02] Tim_Smart: technoweenie: Did you get my pull request for twitternode
[20:02] technoweenie: yes i did, thank you, i was about to pull it
[20:02] Tim_Smart: Cool
[20:02] technoweenie: doing some mongodb testing currently
[20:02] Tim_Smart: :p
[20:02] _ry: Tim_Smart: oh let's pull it in
[20:02] _ry: Tim_Smart: url?
[20:02] maushu: evalCtx?
[20:03] maushu: You mean a sandbox?
[20:03] _ry: yes
[20:03] eikke has joined the channel
[20:03] maushu: gf3 was doing a sandbox.
[20:03] Tim_Smart: _ry: It is standalone atm, but take a look: http://dl.dropbox.com/u/396394/v8eval.zip
[20:03] maushu: I want a sandbox for an experimental project of mine.
[20:04] maushu: The problem is the possibility to whitelist some functions and to stop infinite loops.
[20:04] gf3: ahoy
[20:06] isaacs has joined the channel
[20:07] maushu: I don't like the async in redis-node-client.
[20:07] dnolen has joined the channel
[20:09] maushu: How the heck do I prevent all these stairs when using multiple async callbacks?
[20:11] Tim_Smart: maushu: By declaring some of the callbacks elsewhere, instead of nesting
[20:11] maushu: ...I still end with tons of functions.
[20:12] gwoo: maushu: more than in any other app?
[20:12] maushu: Yeah.
[20:12] Tim_Smart: then redis-node-client is doing something wrong
[20:13] kriszyp: I think that's just life with async
[20:13] maushu: Basically, if I want to get a value, process that value then send that value somewhere in this order I need to follow 3/4 functions.
[20:14] Tim_Smart: maushu: Well in a sync app, that is 3 - 4 functions
[20:14] Tim_Smart: more likely 3 than 4
[20:15] maushu: Not really, thats 3/4 "commands" inside a single function.
[20:16] Tim_Smart: maushu: Well if you like typing heaps, yeah. But generally you abstract the db inside functions. So a function for getting, a function for storing and the function that calls those
[20:17] kriszyp: using promises can help with the data flow and keeping the interfaces cleaner, but they don't usually reduce the number of functions you need
[20:17] technoweenie: maushu: http://howtonode.org/do-it-fast
[20:17] _ry: Tim_Smart: do you have any tests for this? do you want to patch node with it?
[20:17] maushu: Tim_Smart, the db is already abstracted in redis-client.
[20:17] siong1987 has joined the channel
[20:17] technoweenie: maybe try using Do if you're doing multiple redis calls in a single operation
[20:17] Tim_Smart: _ry: Ah no I don't, nodejs_v8 has been using it for a while
[20:19] n8o has joined the channel
[20:19] kriszyp: maushu: you can also do operations in parallel with promises, and you'll get better encapsulation
[20:19] maushu: Yeah, I was thinking about that.
[20:20] maushu: But my brain like linearity!
[20:20] felixge has joined the channel
[20:20] felixge has joined the channel
[20:21] gwoo: kriszyp: i thought promises were gone
[20:21] kriskowal: gwoo node-promises are removed. they have become the purview of frameworks.
[20:22] gwoo: ok
[20:22] Tim_Smart: maushu: I guess this is as linear as it gets http://gist.github.com/323099
[20:23] maushu: Tim_Smart, now try to do that to 10 different "stuffs".
[20:24] kriszyp: gwoo: yeah, it's third party now, here is the one I worked on: http://github.com/kriszyp/node-promise
[20:25] Tim_Smart: maushu: Depends if it could be done in parallel or not
[20:25] gwoo: kriszyp: ah cool
[20:25] Tim_Smart: Otherwise I would module-ise and break it up into manageable chunks
[20:26] davidsklar has left the channel
[20:27] Tim_Smart: _ry: Where do you want the method defined?
[20:27] konobi: _ry: ping
[20:41] kriskowal: maushu here's an example with ref_send style promises http://gist.github.com/323121
[20:41] maushu: It doesn't look good either. :|
[20:41] kriskowal: that happens to be the map/reduce pattern.  all of the gets are done in parallel and reduced to a single object
[20:42] kriskowal: and it doesn't incur O(n) nesting.
[20:42] kriskowal: and it's reusable
[20:47] n8o has joined the channel
[20:47] eikke has joined the channel
[20:49] mau has joined the channel
[20:49] tlrobinson_ has joined the channel
[20:50] siong1987 has joined the channel
[20:51] gf3 has joined the channel
[20:51] tmpvar has joined the channel
[20:59] siong1987 has joined the channel
[21:07] Booster has joined the channel
[21:07] _ry: konobi: pong
[21:07] _ry: Tim_Smart: under process?
[21:08] Tim_Smart: ok, I
[21:08] Tim_Smart: *I'll add it to the todo
[21:08] pdelgallego has joined the channel
[21:11] _ry: ls
[21:11] _ry: oops
[21:12] Tim_Smart: somefile  somedir   src ?
[21:12] Tim_Smart: not sure what running ls on IRC outputs
[21:12] Tim_Smart: :p
[21:20] siong1987 has joined the channel
[21:25] RayMorgan has joined the channel
[21:28] stephenlb has joined the channel
[21:30] rolfb has joined the channel
[21:32] creationix: _ry: I'm thinking yaml is a no, but extended markdown looks promising
[21:32] creationix: I much prefer markdown to ReST
[21:40] unomi has joined the channel
[21:45] hassox has joined the channel
[21:48] pdelgallego has joined the channel
[21:50] siong1987 has joined the channel
[21:55] binary42 has joined the channel
[22:01] maushu has joined the channel
[22:02] gianni has joined the channel
[22:05] RayMorgan_ has joined the channel
[22:06] javajunky has joined the channel
[22:07] javajunky: evenin
[22:08] javajunky: quick q. mkdirsync doesn't appear to support 'mkdir -p' type functionality or have I missed something vital. I'm trying to create a nested directory and it's parents in one statement
[22:09] maushu: javajunky, have you tried to execute the command?
[22:10] javajunky: ;) I'm trying to stay in node rather than use exec but yes that does work ;)
[22:10] maushu: Well... there is this mode. No idea what it is though.
[22:10] maushu: It might be what you want.
[22:11] javajunky: that's the mode on the created for I.e. 0777 but there's nothing controlling whether the parent directory is also created at least I think
[22:12] maushu: Hmm.
[22:15] javajunky: I guess I'll be parsing the path then ;)
[22:16] javajunky: right back later
[22:17] brianm has joined the channel
[22:18] charlenopires has joined the channel
[22:19] pdelgallego has joined the channel
[22:22] maushu: It renders. \o/ http://www.graphnode.com/
[22:23] maushu: It brings me a tear to my eye seeing my code working.
[22:23] konobi: devinus: we just made a fairly significant fix to the postgres bindings, btw
[22:23] maushu: (I'm also tracking how many unique people click that link. :3)
[22:24] devinus: konobi: oh really? the other day i removed promises for callbacks....
[22:24] konobi: devinus: nested queries in callbacks would fail
[22:24] maushu: Is 1ms too much for a page? I don't remember.
[22:24] Tim_Smart: "Psst, this page took 0ms to be created. ;)" Impossible!
[22:25] maushu: Tim_Smart, with node.js everything is possible.
[22:25] Tim_Smart: I'm guess 1ms is rounded up
[22:25] _ry: devinus: http://github.com/ry/node_postgres
[22:25] maushu: Just wait for the next version ry releases. It will result in negative values!
[22:25] devinus: konobi, _ry: so node_postgres is going to be actively maintained now or...?
[22:25] maushu: (Rendering the page before the user actually visits it.)
[22:26] _ry: devinus: not by me - just threw up konobi's fixes today and cleaned up some things
[22:26] maushu: Tim_Smart, does the page load quick? I don't know since I'm on mobile internet.
[22:26] Tim_Smart: Yea, well, its only a little bit of text
[22:27] maushu: True, but it does various things in the background, like connecting to the database and getting stuff.
[22:27] devinus: konobi, _ry: i want to get the bindings as completely as possible. i'm talking support for all PG datatypes and JS <=> PG data type conversion e..g Date(2012, 12, 21) -> '2012-12-12'::date
[22:27] _ry: devinus: that'd be great
[22:28] devinus: indeed
[22:28] tmpvar has joined the channel
[22:30] _ry: does anyone have mac 10.5?
[22:30] maushu: We really need to get a name standard.
[22:30] _ry: could they test this http://github.com/ry/node/issues/#issue/74
[22:31] maushu: If seen *-*-node, node_*, *_node and node-*.
[22:36] CIA-77: node: 03Ryan Dahl 07master * r6d60d2d 10/ (benchmark/http_simple.rb src/node.cc): 
[22:36] CIA-77: node: Revert "Use kqueue on macintosh"
[22:36] CIA-77: node: Experiencing bugs http://github.com/ry/node/issues/#issue/74
[22:36] CIA-77: node: This reverts commit 409020a67d3388e4eda90af546e0fbe25b0adec3. - http://bit.ly/buOJe5
[22:39] richardb has joined the channel
[22:42] Tim_Smart has joined the channel
[22:44] rauchg has joined the channel
[22:45] voodootikigod_ has joined the channel
[22:50] rektide: kriskowal: thanks for the ref-send impl
[22:51] kriskowal: rektide you're using it?
[22:51] rektide: *conf
[22:51] rektide: kriskowal: i think i'm gonna switch all my deferred code over to it tonight
[22:51] kriskowal: work continues on it; what are you tracking?
[22:51] rektide: well, attempt to, withing the next 3 hours
[22:51] rektide: the gist
[22:51] kriskowal: k.
[22:52] kriskowal: it's not the end of the world, but markm pointed out that he can attack the promise sealer
[22:52] kriskowal: which is a pretty academic nit at this point, but i'll be delivering updates
[23:13] rektide: _ry: good job knowing where to offload the task to userland
[23:13] rektide: that goes hand and hand with the above thanks to kris
[23:18] atmos has joined the channel
[23:19] atmos: yo, what's the proper way to emit a signal to a custom handler ?
[23:19] atmos: basically i want to send a custom signal to an object that i added a named listener to, if that makes any sense
[23:20] Tim_Smart: atmos: eventemitter.emit('EventName', arg1, argx);
[23:24] atmos: Tim_Smart: hmm
[23:24] atmos: think i got it, seems it was 'this' in that context
[23:32] CIA-77: node: 03Ryan Dahl 07master * re72b072 10/ (src/node.js src/node_timer.cc src/node_timer.h): Decouple timer from EventEmitter - http://bit.ly/drSHbv
[23:33] pdelgallego has joined the channel
[23:35] isaacs has joined the channel
[23:43] InfiniSOMA has joined the channel
[23:44] kriszyp has joined the channel
[23:50] micheil_mbp has joined the channel
[23:50] creationix has joined the channel
[23:58] micheil has joined the channel