[00:05] jcrosby has joined the channel [00:15] ionfish has joined the channel [00:26] hassox: hey guys [00:27] aurynn: Hey. [00:28] hassox: just wondering if I could get some help on process.inherits and process.mixin [00:28] hassox: I'm not quite sure what they're doing [00:28] hassox: I'm trying to add an event listener on an object that listens to its own event [00:29] hassox: https://gist.github.com/f640780f8359e7a3fb8e [00:29] hassox: if you run that with node, [00:29] hassox: the request goes into the first app (directly) but then skips the second one, and goes straight to the thrird :( [00:30] hassox: trying to understand why the listener from the third is overwriting the second [00:34] ionfish: can anyone recommend a good C++ book? I want to write some node bindings for C libraries [00:39] ashb: http://semver.org [00:39] ashb: thats not for you ionfish , btw [00:40] JimBastard has joined the channel [00:40] JimBastard: umm wtf, is this happening for anyone else? this static js file being served by node won't appear / work in chrome at all [00:40] JimBastard: http://retardbox.com:8000/js/mustache.js [00:41] ashb: JimBastard: contant type is text/html [00:42] ashb: er, content [00:45] alexiskander has joined the channel [00:50] JimBastard: whats it suppose to be, javascript? [00:50] JimBastard: i should probaly be using fu.js or a framework eek [00:50] ionfish: if you're serving a static file, why not just use nginx or apache? [00:51] aurynn: You should use nginx for that [00:52] JimBastard: im trying to keep everything self contained for simplicity right now [00:52] JimBastard: but you are right [00:53] JimBastard: im only use node.js as a staging area for this context right now, so it would be permanent [00:53] JimBastard: it wouldnt* be [00:53] JimBastard: thanks [00:58] jazzychad: hassox: i'm running your gist... i don't even see it print "in first"... i just get "in third" straight away [00:59] dnolen has joined the channel [01:00] hassox: jazzychad: right [01:00] hassox: why though [01:01] hassox: the listener should be on the first, which should fire and event on second, which should then be picked up by the listener on second etc [01:01] jazzychad: right... i'm trying to figure that out too :) [01:02] hassox: :) [01:02] hassox: thx [01:02] hassox: my js foo is still young [01:02] jazzychad: where is the process.inherits doc? [01:03] jazzychad: not finding it on the nodejs site.. or am i blind? [01:03] hassox: afaik it's not documented [01:03] hassox: it's in the source in src/node.js [01:04] hassox: bbiab [01:04] Vito` has left the channel [01:04] inimino: I highly recommend using normal JavaScript OOP, not trying to use something else like .inherit() [01:05] hassox: inimino: what's normal javascriptOOP ? [01:05] hassox: do you mean class inheritance stuff like in prototype? [01:06] inimino: I mean inheritance without classes [01:06] JimBastard: "has-a" over "is-a" [01:06] JimBastard: ? [01:06] hassox: inimino: isn't that what's happening in process.inherits? [01:06] inimino: there are no classes in JavaScript, but there is inheritance if you want it [01:06] hassox: prototype inheritance? [01:06] JimBastard: yeah [01:06] inimino: if you were using normal JavaScript OOP you wouldn't need a library function to do it [01:06] inimino: that's the point [01:07] hassox: brb [01:08] jazzychad: so how would you get an object to be an EventEmitter? [01:08] jazzychad: not sure i'm asking that right.. [01:08] inimino: Crockford has some good material on OOP, including why he eventually grew out of trying to layer class-based OOP on JavaScript [01:08] inimino: jazzychad: I wouldn't, generally, I'd prefer to just construct an object that conforms to a certain interface [01:09] inimino: i.e. something that has a .addListener() method, a .emit() method, and so on [01:10] jazzychad: so you just reimplement the other object/class basically...? [01:10] isaacs: jazzychad: pull req sent [01:11] inimino: jazzychad: not necessarily, if you want to you can do that by ensuring the existing methods are somewhere in the prototype chain of your new object [01:12] jazzychad: inimino: yeah.. makes sense too.. i was just trying to think how to easily do it w/ the code that hassox already has [01:12] JimBastard: ive find that the OO approach doesn't always make sense, espically with JS [01:12] JimBastard: found* [01:12] inimino: jazzychad: but if you're doing OOP in the JavaScript style, it is more to do with duck-typing than trying to map Java semantics onto JavaScript [01:12] JimBastard: at least in the classic "oo" definition [01:12] isaacs: JimBastard: ++ [01:13] JimBastard: are you saying i get + 1 ? lol [01:13] jazzychad: yeah.. i try to minimize oo stuff in js too [01:13] inimino: the irony is that JavaScript's style of OO is actually much much closer to the original languages that pioneered OOP [01:13] JimBastard: im a bit fan of lazy initilization in JS [01:13] jazzychad: isaacs: cool. i've never done a pull req before.. could you help me w/ the next steps? [01:13] JimBastard: damn my keyboard is flailing [01:13] inimino: ACTION adds one to JimBastard, converting him to a number in the process [01:13] JimBastard: huzzah! [01:14] isaacs: jazzychad: i've never actually used the UI that gh provides for it [01:14] jazzychad: isaacs: i can do cli, too.. would rather do that anyway [01:14] isaacs: ok. [01:14] isaacs: i usually add any contributors as remotes: [01:15] jazzychad: i just haven't used git as a code repo before, so i dunno commands, etc [01:15] isaacs: git remote add git://github.com// [01:15] isaacs: so, in this case, [01:15] JimBastard: git i spretty easy, check out the help docs on github [01:15] isaacs: git remote add isaacs git://github.com/isaacs/querystring.node.js [01:15] isaacs: from there: [01:15] isaacs: git checkout -b isaacs-merge [01:15] isaacs: git pull isaacs [01:16] isaacs: (handle conflicts, etc) [01:16] isaacs: git checkout master [01:16] isaacs: git merge isaacs-merge [01:16] isaacs: i do it on a branch so that i can abort easily if anything gets to hairy [01:18] jazzychad: "git pull isaacs" gave error: "You asked me to pull without telling me which branch you want to merge with.." [01:18] isaacs: sorry: git pull isaacs master [01:18] jazzychad: ok.. i was gonna guess that, but didn't want to blow things up [01:18] isaacs: if you wanted to pull a different branch from my repo, you could say so [01:19] isaacs: as long as your remote repo is up to date, you can always blow the local away, clone fresh, and start over. [01:21] RayMorgan has joined the channel [01:21] kriskowal has joined the channel [01:24] jchris has joined the channel [01:25] jazzychad: stupid question: was i suppoed to issue those commands from inside my querystring.node.js dir? [01:25] isaacs: jazzychad: yes. [01:25] jazzychad: ok, i did... i see that i have your test.js file, for example [01:25] isaacs: great. [01:25] isaacs: you pulled me, and i didn't even notice. [01:25] jazzychad: but now "git diff --stat" shows no results, and doing commit -a doesn't show any files to be updated [01:25] isaacs: of course not. [01:26] isaacs: try git log --graph --pretty=oneline [01:26] isaacs: (also, create an alias for that) [01:26] isaacs: you'll see my commits right there on top of yours. [01:27] jazzychad: yes i see [01:27] isaacs: if you do a git push now, you'll push those commits up to your public repo [01:28] jazzychad: oh odd... i guess i expected to see what would change if i did a push [01:28] jazzychad: by doing a diff --stat or commit -a or something [01:28] jazzychad: obviously i need to rtfm of git :) [01:29] JimBastard: you'll find that git doesnt punish you as hard as SVN does [01:29] isaacs: git *assumes* that you'll be doing lots of collaborating and branching and merging, so it makes it painless. [01:29] isaacs: it all just kinda works and happens. not a lot of extra stuff beyond what's necessary. [01:29] JimBastard: yeah yeah [01:29] mikeal: you get a little punished for trying to back things out of your master [01:29] jazzychad: gotcha [01:29] isaacs: mikeal: yeah, but that's probably a rare event. [01:30] mikeal: you can't really revert, just create another commit that reverses a change [01:30] mikeal: yeah, you should be liberal with branches [01:30] jazzychad: so, i 'git push'-ed and it does seem to have merged/pushed all the stuff into my repo [01:30] jazzychad: so... hooray [01:30] isaacs: w00t! [01:30] mikeal: so that you can just create a new branch at the point before you messed up in the bad branch [01:30] isaacs: mikeal: you CAN change the HEAD pointer... but you'll get into a very strange place if you've already pushed upstream. [01:30] mikeal: branch branch branch [01:30] isaacs: branches are your friend. [01:30] jan____: *burp* [01:30] isaacs: branches protect your head from the hard rain. [01:30] mikeal: haha [01:31] mikeal: it's the hardest thing to get people used to about git [01:31] mikeal: "branches are cheap, merges are cheap, use them liberally" [01:31] mikeal: also, rebase is the greatest thing ever invented [01:33] JimBastard: im sorry did you mean, "freebase" [01:33] mikeal: haha [01:35] isaacs: hehehe [01:35] isaacs: rebase is a very heavy and sharp cleaver [01:35] isaacs: in the hands of an expert, it is great. in the hands of a not-so-expert, it's a remover of hands. [01:35] mikeal: it has reduced the work load of some of my merges by several orders of magnitude [01:37] jazzychad: i take it the "git log --graph" output and the github network graph visualizer are showing two different things... [01:43] jazzychad: thx for the help, all. food time. [01:43] jazzychad: and if you need awesome querystring parsing in node, check out http://github.com/jazzychad/querystring.node.js :) [01:47] Connorhd__ has joined the channel [01:54] scudco has joined the channel [01:56] gwoo_ has joined the channel [02:01] scudco has joined the channel [02:03] hassox: jazzychad: back [02:03] hassox: so [02:03] hassox: it doesn't look like there's an awesome way to make an event emitter? [02:11] jed has joined the channel [02:11] eddanger has joined the channel [02:21] soveran has joined the channel [02:23] JimBastard has joined the channel [02:25] JimBastard: the mailing list made me laugh a little today [02:42] hassox: inimino: still here? [02:42] inimino: hassox: yes [02:43] hassox: hey inimino [02:43] hassox: can I ask you a couple of q's about this inheritance thing? [02:43] aurynn: Python is for girls! :D [02:43] inimino: hassox: sure [02:43] JimBastard: do you speak python? [02:43] JimBastard: yes [02:43] JimBastard: hissssssssssssssssssss [02:44] hassox: k I want to get an event emitter as an object that I then extend [02:44] hassox: being a n00b to js I'm wondering if chaining the protoytpes is going to be the way to get it [02:44] hassox: so AppPrototype.prototype = new process.EventEmitter [02:44] inimino: well, maybe, maybe not [02:44] hassox: App.prototype = new AppPrototype [02:44] hassox: ? [02:44] inimino: why do you want that? [02:45] hassox: I want my app to have prototype methods in addition being an EventEmitter [02:45] JimBastard: addCallback() [02:45] hassox: wondering on the most js'y way to do that [02:45] JimBastard: ? [02:45] JimBastard: im lost here, sorry [02:45] inimino: I looked at your paste and it looks like you're trying to create some sort of way of handling a request in more than one place [02:45] hassox: am I not making sense? [02:45] inimino: what's the big picture? [02:46] inimino: using inheritance is a solution, I'm trying to find out what the problem is [02:46] hassox: I want to create a container that has some behavior baked in, that can emit events [02:46] inimino: var foo = new process.EventEmitter() [02:46] inimino: that can emit events [02:47] malkomalko: what up bastard [02:47] hassox: but now, can i have foo as a constructor [02:47] hassox: so I can make many foo's [02:47] JimBastard: naaaah [02:47] inimino: if you want, sure [02:47] JimBastard: you could do function foo() { return new process.eventemitter() } ? [02:47] hassox: I new I wasn't thinking of this quite right [02:48] inimino: function Foo(){}; foo.prototype = new process.EventEmitter() [02:49] inimino: s/foo.prototype/Foo.prototype/ [02:49] inimino: but that's not something I've ever wanted to do, which is why I asked why you want that [02:49] isaacs: hassox: in node, do it like this: function MyEventEmtter () { ... }; require("sys").inherits(MyEventEmitter, process.EventEmitter) [02:49] inimino: why do you want something that is an event emitter but also something else? [02:50] hassox: isaacs: that's what I have and it's not working [02:50] isaacs: hassox: worksforme? [02:50] inimino: using .inherits is what I was just recommending against :-) [02:50] isaacs: got some code? [02:50] hassox: inimino: I want to build on it [02:50] isaacs: inimino: why's that? [02:50] hassox: 1 sec [02:50] hassox: isaacs: https://gist.github.com/f640780f8359e7a3fb8e [02:50] inimino: isaacs: I don't think it helps to try to bolt on some other model when the one JavaScript has works better anyway [02:50] isaacs: inimino: but, in this case, javascript kinda got it wrong. [02:50] hassox: isaacs: why is the event firing on First being picked up by third [02:51] inimino: isaacs: I tend to recommend people learn the language first [02:51] isaacs: it gives you the classy sugar, but not the proper thing [02:51] isaacs: inimino: i know, and i agree. that's why hassox should take a look at the code for sys.inherits. [02:51] isaacs: ;) [02:51] hassox: inimino: my understanding is that you can setup a chain for prototypes [02:51] hassox: which is essentially what I'm trying to do [02:51] inimino: well, I generally don't recommend using 'new' or inheritance, either [02:51] isaacs: ACTION reading code, bbiab [02:51] inimino: well the code I looked at doesn't really do anything with prototypes [02:52] isaacs: hassox: i recommend against process.mixin [02:52] isaacs: better to keep the things namespaced rather than globalized [02:52] isaacs: [02:52] JimBastard: i havent used mixin yet...... [02:52] inimino: you're use of mixin on line 7 looks wrong... [02:52] hassox: inimino: I thought that's what the inherits thing is doing [02:53] inimino: like you're expecting it to do something magical and combine properties rather than simply overwrite them [02:53] hassox: isaacs: it's a prototype... it won't stay like that [02:54] hassox: inimino: on that line what I want to do is overwrite anything in this with what's passed in [02:54] hassox: sorry lads :() [02:54] hassox: I'm really really new to js... :( [02:55] JimBastard: hee hee [02:55] isaacs: hassox: it's ok [02:55] isaacs: we've all been there [02:55] JimBastard: yes! years and years and doing front-end bitch work is finally paying off [02:55] JimBastard: ahaha [02:55] isaacs: so... i'm seeing that it calls the request on third [02:55] JimBastard: take that java! [02:55] hassox: JimBastard: :) [02:55] hassox: isaacs: exactly [02:55] hassox: it should be calling the request on first, then second then third [02:55] isaacs: no, it's calling it on third 3 times [02:56] isaacs: because you're mixing in hte obj 3 times on the same object. [02:56] hassox: the event listener is being overwritten or something I fear [02:56] hassox: but I don't know what [02:56] hassox: isaacs: on the same object? [02:56] hassox: I thought inside a constructor is was a different object>? [02:56] isaacs: well... hm... this is weird. ok, now that i know what youer' trying to do, i'm gonna retool it a bit to make it do that. [02:56] isaacs: bbiab. [02:56] hassox: is there an object_id or something for each object? [02:56] isaacs: ACTION is a sucker for code puzzles. [02:56] hassox: :) [02:57] isaacs: i'mma use this one in a job interview someday, watch [02:57] isaacs: hehe [02:58] inimino: heh [02:59] hassox: just out of curiosity [02:59] hassox: how much of an abomination is my code? [02:59] dnolen has joined the channel [03:03] inimino: hassox: the reason you're not seeing the behavior you expect is on line 16 [03:03] inimino: well [03:03] inimino: I should wait for isaacs' rewrite [03:04] hassox: I'm curious to know of the reason as well as see it written nicely ;) [03:04] isaacs: hehehe... [03:04] isaacs: you people have an unreasonably high opinion of me. [03:05] isaacs: yeah... this is kinda weird. [03:05] JoePeck: isaacs: can I save that quote? hilarious. [03:05] JoePeck: =) [03:05] hassox: lol [03:05] inimino: well, you said you were rewriting it so I figured you'd explain why it wasn't working currently too :) [03:05] isaacs: JoePeck: Everything I say is licensed under the Crockford BSD [03:05] isaacs: unless otherwise noted. [03:05] inimino: hehe [03:06] isaacs: inimino: fair enough :) [03:06] inimino: isaacs: can I use that quote for evil? [03:06] isaacs: inimino: noooooooo!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [03:06] isaacs: (at least, not without violating the license) [03:06] inimino: this code is an interesting demonstration of how to confuse yourself with JavaScript scope [03:06] inimino: hehe [03:06] inimino: but if I was evil, would I care about the license? [03:07] isaacs: HAHAHAHA!!!! [03:07] isaacs: self isn't var'ed [03:07] isaacs: derp deeeeee derp [03:07] hassox: isaacs: is that what's causing the issue? [03:07] inimino: ^.^ [03:07] hassox: damn [03:07] isaacs: you fell victim to one of the classic blunders. the first, of course, being "never get involved in a land war in asia", but only slightly less well known is this: [03:07] inimino: none of his variables are [03:07] hassox: that's nasty [03:07] isaacs: always "var" your local vars!! [03:08] JoePeck: lol [03:08] hassox: haha [03:08] hassox: hrm [03:08] hassox: kk 1 sec [03:08] isaacs: the issue is that "self" is a global, so every time you call new App, you're re-referencing it to the last thing you created. [03:08] isaacs: like a student whose favorite book is the one he read last. [03:08] inimino: (First, Second, Third, and http) being the others [03:09] hassox: i c [03:09] hassox: damn [03:09] hassox: that's nasty [03:09] hassox: I can only see that one [03:09] hassox: someone said none of the vars were var'd [03:09] hassox: but I don't see nay others [03:09] hassox: only ones in the function sig [03:09] isaacs: hassox: yeah, it's an unfortunate "feature" of js that the default scope of any new variable is global [03:09] inimino: I just named the others [03:09] inimino: there are four :) [03:10] isaacs: yeah. put a "var" in front of First, Second, Third, and http [03:10] hassox: isaacs: w00t [03:10] hassox: oh [03:10] hassox: they're vars too? [03:10] hassox: kk [03:10] isaacs: my problem with process.mixin is asthetic. years of working in browsers with collisions between scripts has led me to be very afraid of non-var'ed variables. [03:11] isaacs: hassox: in a commonjs/node env, you should have "var" in front of anythingn that isn't: a named function (those are ok), a function parameter (cuz derp, otherwise you'll clobber the param), or things hanging on the "exports" object. [03:11] isaacs: function Foo () {...}; is ok, and akin to var Foo = function ... [03:12] isaacs: it'd be nice if there was a "strict" mode that would detect changes to the global namespace and throw an error. [03:12] inimino: pedantry: "otherwise you'll clobber the param" is actually not what will happen [03:12] inimino: (nothing will happen) [03:12] inimino: (unless you assign to it in the var statement of course...) [03:12] isaacs: inimino: well, you'll get "undefiend" rather than the param [03:13] isaacs: oh, apparently not in v8. [03:13] isaacs: yay! [03:13] inimino: not in any correct interpreter :-) [03:13] isaacs: but it will clobber globals, that's what i was thinking of. [03:14] isaacs: var a = "asdf"; function foo() { var a; return a }; foo() // undefined [03:14] inimino: it'll shadow them yes [03:15] isaacs: inimino: that makes it sound so... spooky. [03:15] isaacs: like your var is a ninja or something [03:15] inimino: hehe [03:15] inimino: ghosted variables [03:18] chrisfarms has joined the channel [03:18] inimino: that was a tough one, hassox [03:18] hassox: thanx lads [03:18] hassox: I really appreciate the help [03:19] hassox: sorry I'm in and out [03:19] hassox: ACTION is at work atm [03:19] isaacs: hassox: no problem. [03:19] hassox: now other issues ;) [03:20] hassox: ACTION loves being a n00b in some weird kinda way [03:21] inimino: ES5 strict mode would have caught that error [03:21] isaacs: inimino: true. does v8 support "use strict"? [03:21] inimino: not yet, I expect [03:22] scudco has joined the channel [03:22] wattz has left the channel [03:24] isaacs: yeah, it laughs at your request for strictness, and remains accepting. [03:24] JoePeck: I believe it works on the honor system [03:24] isaacs: haha [03:24] JoePeck: you say you're using strict, it trusts you [03:24] inimino: ACTION wonders how long it will take for "use strict" to become completely meaningless in all browsers [03:25] inimino: (again, I mean) [03:25] JoePeck: all the cool kids will not use it because arguments.callee is banned =( [03:25] inimino: at least nobody is using it yet [03:25] isaacs: JoePeck: but that's what named function expressions are for :) [03:25] inimino: that's what the Z combinator is for [03:26] JoePeck: lol [03:26] inimino: function(f){return function(x){return f(function(y){return x(x)(y)})} (function(x){return f(function(y){return x(x)(y)})})} [03:27] JoePeck: knowing inimino, you typed that without even looking it up =) [03:27] JoePeck: I just looked it up (to see how it differed from the Y combinator) [03:27] inimino: I wrote that earlier today so it was fresh in my mind [03:28] JoePeck: hehehe [03:28] inimino: it's the one you can actually run in applicative-order languages [03:29] isaacs: you know, a lot of the [\w]-combinator patterns seem more simply done (albeit, with less purity-cred) by using the "var" statement, closures, and arguments.callee [03:29] isaacs: (or the function name) [03:29] JoePeck: lol [03:30] isaacs: if I saw function(f){return function(x){return f(function(y){return x(x)(y)})} (function(x){return f(function(y){return x(x)(y)})})}, my first thought would be "aw, fuck, now i gotta fire some motherfucker, and here i thought it was gonna be a good day..." [03:30] malkomalko has joined the channel [03:30] inimino: hehe [03:30] inimino: well, I should point out that I wrote that in a file to demonstrate a JavaScript parser, not in production code [03:30] isaacs: hehe [03:30] isaacs: yeah, exactly [03:31] isaacs: "Oh, that BETTER be some kinda crazy weird test case example code, or something you're doing just to prove you can, or we got PROBLEMS, yo!!" [03:31] JoePeck: hahaha [03:31] inimino: I even asked for some cute JavaScript programs here first and no-one had any [03:31] inimino: hehe [03:31] JoePeck: isaacs: I need to listen to you more often. =) [03:32] isaacs: aw, i must've missed that. http://foohack.com/tests/ycomb.html [03:32] inimino: actually here it is: http://boshi.inimino.org/3box/PEG/build/ES5.html [03:33] inimino: maybe someone can tell me which browsers that work in [03:33] isaacs: http://github.com/isaacs/_ify/blob/master/_ify.js has some cute overly-clever bits, too [03:33] isaacs: wow, works in Firefox 3.5 (but you prolly knew that) [03:33] inimino: I don't even have IE here to test [03:33] JoePeck: inimino: I got "done" in the nightly [03:34] isaacs: wow, inimino that's really interesting... [03:34] inimino: sweet [03:35] silentmatt has joined the channel [03:35] inimino: lots more features to come :-) [03:35] inimino: I'm just getting ready to blog about what I have so far [03:36] isaacs: inimino: what are you doing here? go blog it. then tell us. [03:36] JoePeck: lol =) [03:36] JoePeck: +1 [03:36] inimino: hehe, ok [03:38] JoePeck: isaacs: http://github.com/isaacs/dotfiles again, hilarious stuff =), count me as a fan of your work [03:38] isaacs: JoePeck: thanks ^_^ [04:02] micheil has joined the channel [04:12] soveran has joined the channel [04:24] micheil has joined the channel [04:48] binary42 has joined the channel [05:07] hassox has joined the channel [05:11] JimBastard has joined the channel [05:11] rtomayko has joined the channel [05:11] noxa has joined the channel [05:11] Pilate has joined the channel [05:11] mcarter has joined the channel [05:11] sifi has joined the channel [05:13] JimBastard has joined the channel [05:13] rtomayko has joined the channel [05:13] noxa has joined the channel [05:13] Pilate has joined the channel [05:13] mcarter has joined the channel [05:13] sifi has joined the channel [05:18] thenduks has joined the channel [05:18] Yuffster has joined the channel [05:18] jazzychad has joined the channel [05:18] simoncpu has joined the channel [05:18] skampler has joined the channel [05:18] beppu_ has joined the channel [05:18] sr has joined the channel [05:18] orlandov has joined the channel [05:18] careo has joined the channel [05:18] wil_ has joined the channel [05:18] claudio has joined the channel [05:18] sztanpet has joined the channel [05:18] rbranson_ has joined the channel [05:18] deanlandolt_ has joined the channel [05:18] Nailor has joined the channel [05:18] rudebwoy has joined the channel [05:25] thenduks has joined the channel [05:25] Yuffster has joined the channel [05:25] jazzychad has joined the channel [05:25] simoncpu has joined the channel [05:25] skampler has joined the channel [05:25] beppu_ has joined the channel [05:25] sr has joined the channel [05:25] orlandov has joined the channel [05:25] careo has joined the channel [05:25] wil_ has joined the channel [05:25] claudio has joined the channel [05:25] sztanpet has joined the channel [05:25] rbranson_ has joined the channel [05:25] deanlandolt_ has joined the channel [05:25] Nailor has joined the channel [05:25] rudebwoy has joined the channel [05:27] hassox has joined the channel [05:28] thenduks has joined the channel [05:28] Yuffster has joined the channel [05:28] jazzychad has joined the channel [05:28] simoncpu has joined the channel [05:28] skampler has joined the channel [05:28] beppu_ has joined the channel [05:28] sr has joined the channel [05:28] orlandov has joined the channel [05:28] careo has joined the channel [05:28] wil_ has joined the channel [05:28] claudio has joined the channel [05:28] sztanpet has joined the channel [05:28] rbranson_ has joined the channel [05:28] deanlandolt_ has joined the channel [05:28] Nailor has joined the channel [05:28] rudebwoy has joined the channel [05:32] thenduks has joined the channel [05:32] Yuffster has joined the channel [05:32] jazzychad has joined the channel [05:32] simoncpu has joined the channel [05:32] skampler has joined the channel [05:32] beppu_ has joined the channel [05:32] sr has joined the channel [05:32] orlandov has joined the channel [05:32] careo has joined the channel [05:32] wil_ has joined the channel [05:32] claudio has joined the channel [05:32] sztanpet has joined the channel [05:32] rbranson_ has joined the channel [05:32] deanlandolt_ has joined the channel [05:32] Nailor has joined the channel [05:32] rudebwoy has joined the channel [05:38] thenduks has joined the channel [05:38] Yuffster has joined the channel [05:38] jazzychad has joined the channel [05:38] simoncpu has joined the channel [05:38] skampler has joined the channel [05:38] beppu_ has joined the channel [05:38] sr has joined the channel [05:38] orlandov has joined the channel [05:38] careo has joined the channel [05:38] wil_ has joined the channel [05:38] claudio has joined the channel [05:38] sztanpet has joined the channel [05:38] rbranson_ has joined the channel [05:38] deanlandolt_ has joined the channel [05:38] Nailor has joined the channel [05:38] rudebwoy has joined the channel [05:40] JimBastard has joined the channel [05:40] rtomayko has joined the channel [05:40] noxa has joined the channel [05:40] Pilate has joined the channel [05:40] mcarter has joined the channel [05:40] sifi has joined the channel [05:44] thenduks has joined the channel [05:44] Yuffster has joined the channel [05:44] jazzychad has joined the channel [05:44] simoncpu has joined the channel [05:44] skampler has joined the channel [05:44] beppu_ has joined the channel [05:44] sr has joined the channel [05:44] orlandov has joined the channel [05:44] careo has joined the channel [05:44] wil_ has joined the channel [05:44] claudio has joined the channel [05:44] sztanpet has joined the channel [05:44] rbranson_ has joined the channel [05:44] deanlandolt_ has joined the channel [05:44] Nailor has joined the channel [05:44] rudebwoy has joined the channel [05:44] jcrosby has joined the channel [05:56] thenduks has joined the channel [05:56] Yuffster has joined the channel [05:56] jazzychad has joined the channel [05:56] simoncpu has joined the channel [05:56] skampler has joined the channel [05:56] beppu_ has joined the channel [05:56] sr has joined the channel [05:56] orlandov has joined the channel [05:56] careo has joined the channel [05:56] wil_ has joined the channel [05:56] claudio has joined the channel [05:56] sztanpet has joined the channel [05:56] rbranson_ has joined the channel [05:56] deanlandolt_ has joined the channel [05:56] Nailor has joined the channel [05:56] rudebwoy has joined the channel [05:57] JimBastard has joined the channel [05:57] rtomayko has joined the channel [05:57] noxa has joined the channel [05:57] Pilate has joined the channel [05:57] mcarter has joined the channel [05:57] sifi has joined the channel [06:00] thenduks has joined the channel [06:00] Yuffster has joined the channel [06:00] jazzychad has joined the channel [06:00] simoncpu has joined the channel [06:00] skampler has joined the channel [06:00] beppu_ has joined the channel [06:00] sr has joined the channel [06:00] orlandov has joined the channel [06:00] careo has joined the channel [06:00] wil_ has joined the channel [06:00] claudio has joined the channel [06:00] sztanpet has joined the channel [06:00] rbranson_ has joined the channel [06:00] deanlandolt_ has joined the channel [06:00] Nailor has joined the channel [06:00] rudebwoy has joined the channel [06:04] thenduks has joined the channel [06:04] Yuffster has joined the channel [06:04] jazzychad has joined the channel [06:04] simoncpu has joined the channel [06:04] skampler has joined the channel [06:04] beppu_ has joined the channel [06:04] sr has joined the channel [06:04] orlandov has joined the channel [06:04] careo has joined the channel [06:04] wil_ has joined the channel [06:04] claudio has joined the channel [06:04] sztanpet has joined the channel [06:04] rbranson_ has joined the channel [06:04] deanlandolt_ has joined the channel [06:04] Nailor has joined the channel [06:04] rudebwoy has joined the channel [06:04] JimBastard has joined the channel [06:04] rtomayko has joined the channel [06:04] noxa has joined the channel [06:04] Pilate has joined the channel [06:04] mcarter has joined the channel [06:04] sifi has joined the channel [06:11] aguynamedben has joined the channel [06:16] scudco has joined the channel [06:17] logicuce has joined the channel [06:20] gwoo has joined the channel [06:23] teemow has joined the channel [06:26] micheil: so.. who's actually about? [06:29] aurynn: I got my PG driver working a little more solidly. [06:31] scudco has joined the channel [06:33] scudco has joined the channel [06:33] inimino: ACTION is about [06:42] jed: ACTION is about [06:43] sudoer has joined the channel [06:47] micheil: morning folks [06:52] micheil: ACTION is embarking on another coding journey.. this time IMAP [06:53] micheil: but first, coffee. [07:06] aurynn: http://github.com/aurynn/postgres-js [07:06] aurynn: just updated my fork. Prepared queries are now working [07:06] micheil: oooo... [07:06] aurynn: though my underlying code needs some definite cleanup [07:06] aurynn: I need to implement parameterized one-off queries [07:06] aurynn: and autocommit [07:06] micheil: do you think modelling a IMAP moule around the HTTP module would be a good idea? [07:06] aurynn: and a few other pieces [07:07] micheil: *module [07:08] micheil: aurynn: also, I don't know if it's relevant, but I have heard switch statements to be rather slow, although, it may just be a client side thing. [07:08] micheil: ACTION needs coffee. [07:08] aurynn: micheil, not my original code [07:16] jazzychad: ACTION is about b/c his xbox died on him... back to coding [07:21] logicuce has joined the channel [07:49] blakemizerany has joined the channel [08:02] scudco has joined the channel [08:05] kriskowal has joined the channel [08:13] elliottcable: NOOOOOOO [08:13] elliottcable: somebody stop ryah_away before he does something horrible )-’: [08:19] inimino: what did I miss [08:19] elliottcable: http://tau.pe/6721562914 [08:19] elliottcable: sync FS operations!? [08:19] elliottcable: and even scarier, he just tweeted this: [08:19] elliottcable: @ryah: decided [08:20] elliottcable: O_O [08:20] elliottcable: decided on sync FS ops?! O: [08:20] elliottcable: ACTION runs in circles like a chicken with his head cut off [08:21] inimino: yeah he's said that before [08:21] elliottcable: o_o; [08:22] inimino: I think I'd prefer sync fs ops to having .wait() [08:22] elliottcable: yeah he replied, he means as an *alternative* I think. Not to replace async. [08:22] elliottcable: In which case, okay, fine by me, I don’t have to use them. [08:22] inimino: the trouble with .wait() is that people want to use it on arbitrary promises, and it's just ugly [08:22] inimino: sure, of course [08:22] elliottcable: scared me shitless [08:23] inimino: hehe [08:23] elliottcable: what with all the other ways that Node.js is conforming to CommonJS, it would be the final blow, you know? [08:23] elliottcable: giving up on everything it is to just be yet another CommonJS platform [08:23] elliottcable: at which point, there’s no reason for it to exist at all /-: [08:23] inimino: I don't think ryan is going to take away the primary reason for node's existence :-) [08:24] micheil: elliottcable: look at his reply.. http://twitter.com/ryah/status/6724552634 [08:24] elliottcable: yeah, saw it [08:24] elliottcable: lol [08:25] micheil: oh shit. [08:25] michaelk^ has joined the channel [08:25] micheil: I just realised I'd been researching the wrong protocol [08:25] micheil: I wanted SMTP not IMAP [08:25] elliottcable: … [08:25] elliottcable: hahahahahahaha [08:26] elliottcable: wow. [08:26] jazzychad: yikes [08:26] inimino: heh [08:26] inimino: micheil: if it makes you feel any better, SMTP is a much simpler protocol [08:26] jazzychad: yes, much [08:27] micheil: I even managed to name the repo as imap some how. [08:27] sveimac has joined the channel [08:27] inimino: also much closer in the wild to its specification [08:31] micheil: I can't believe I did that.. >_> [08:41] elliottcable: Hah. [08:41] elliottcable: We’re ‘noder’s. Best name EVER. [08:42] elliottcable: Better than Rubyist and Cocoahead combined. [08:42] micheil: hmm.. [08:42] micheil: Nodists [08:43] micheil: elliottcable: actually.. I had better, some kid in about yr 7 in high school asked me if I was a scientist, I said no, I work with computers, so they replied, "Oh... So does that mean your a Computerist then?" [08:43] elliottcable: hah [08:43] elliottcable: not bad [08:43] micheil: that's what I thought [08:43] elliottcable: Nah, nodist is too close to nödist. [08:44] micheil: or nudist [08:44] elliottcable: ’s what I just said. [08:44] micheil: oh [08:44] elliottcable: d-: [08:44] micheil: hm... [08:44] micheil: nodule? [08:44] elliottcable: no. [08:44] elliottcable: Noder. [08:44] elliottcable: Node coder. [08:44] micheil: yeah, definitely Noder [08:45] micheil: or Nodoper [08:45] elliottcable: I need to make a Noder.js website, for us to SOCIALIZE [08:45] micheil: but no, Noder sounds better [08:45] micheil: elliottcable: oh, oh, I have a PRO idea: [08:45] micheil: make it using node.js :P [08:45] elliottcable: Um, duh? [08:45] micheil: haha [08:47] micheil has left the channel [08:47] micheil has joined the channel [08:48] micheil: what license is node.js under.. actually? [08:48] elliottcable: micheil: http://github.com/ry/node/blob/master/LICENSE [08:49] elliottcable: wtf? “which is copyrighted by the Google, Inc.” [08:49] elliottcable: the Google? [08:50] micheil: try going to the front page, enter nothing in the search box and hit "I'm feeling lucky" [08:50] Nailor: elliottcable: yes, the Google has made the v8 [08:51] micheil: yeah, I think it's The Google, much like The Internet [08:51] Nailor: aaa [08:51] Nailor: :) [08:51] elliottcable: WTF? [08:51] elliottcable: micheil: uh [08:51] elliottcable: I don’t like the look of that o_o [08:54] micheil: haha :P [08:56] sveimac has joined the channel [08:58] micheil: ryah_away: would you say that node's licensing is similar to GPL/MIT ? [08:58] elliottcable: http://cld.ly/d9ssw [08:58] micheil: yeah, the count down [08:58] elliottcable: wtf is it [09:02] micheil: new Date(Date.now()+(1379317*1000))+"" => "Fri Jan 01 2010 19:09:28 GMT+1100 (EST)" [09:02] micheil: it's time until the new year [09:03] micheil: I reckon if you open it up 1 minute to 12:00 on Dec 31st, it'll then have fireworks [09:03] the_undefined has joined the channel [09:09] elliottcable: lol [09:29] inimino: http://inimino.org/~inimino/blog/peg_first_release [09:29] inimino: whee :) [09:29] elliottcable: wat [09:30] jazzychad: inimino: cool [09:30] inimino: :) [09:32] micheil: hmm? [09:33] micheil: oh right, that. [09:34] rictic has joined the channel [09:37] logicuce has joined the channel [09:42] johan-s has joined the channel [10:20] the_undefined has joined the channel [10:25] mahemoff has joined the channel [10:43] the_undefined: ryah_away: so I updated my deferred branch and I'm eager to break people's code with it. Are you sure you won't merge until JAN? [10:51] ryah_away: the_undefined: yeah maybe we can merge it in soon [10:51] ryah_away: i just need to get my laptop on the internet [10:51] the_undefined: ryah_away: cool [10:51] the_undefined: ryah_away: oh, you're still traveling? [10:51] ryah_away: micheil: node is mit [10:52] ryah_away: still in luebeck [10:52] ryah_away: i'm going to go to berlin next week [10:52] the_undefined: ryah_away: ah ok. You might want to get an aiport express, you can use it to make yourself an access point to a WPA wifi :) [10:52] ryah_away: hmm. probably won't have much time - but if i do would you be up for hangin gout? [10:53] the_undefined: ryah_away: yes, definitley - let me know if you find time [10:53] the_undefined: ryah_away: anyway, I was wondering if you're happy with the latest patch and if I should continue to test & document it or if you have some other things you'd like to change [10:54] micheil: ryah_away: righteo, good to know [10:54] ryah_away: the_undefined: i need to look at it with my own computer. i'll try to do that tomorrow [10:55] the_undefined: ryah_away: k, no worries : ). I'm just very excited about those deferreds and can't await to use them :) [10:55] the_undefined: anyway, now that I'm lacking further excuses for procrastinating on actual work, I guess I should go back to it :) [10:55] the_undefined: ttyl [10:56] micheil: ryah_away: how would one get a module included into Node? [10:57] ryah_away: micheil: by convincing me to include it :) [10:57] micheil: ryah_away: I've not got anything yet, but I am working on a SMTP module [10:57] ryah_away: micheil: probably not - at least not yet [10:57] micheil: and considering most other frameworks include things like SMTP (and besides the fact that it's useful), it'd make a good widget to include [10:58] ryah_away: trying to stick to getting http, dns, tcp working [10:58] ryah_away: extra modules = extra support [10:58] micheil: I'm going write it as standalone, and build off TCP, but if there's any guidelines as to how you'd want code to be structured, that'd make later inclusion easier [10:58] ryah_away: once those are all working well, i may expand the included modules to handle other thingss like smtp [10:59] micheil: are there currently many bugs with tcp, http, and dns? [10:59] micheil: I know there's that http.parseUri issue [11:00] ryah_away: well - they're difficult to expand on. [11:00] ryah_away: dns doesn't do /etc/host look-ups for example [11:00] ryah_away: etc [11:00] micheil: ah [11:01] micheil: btw, feel free to shoot me an email if you need things tested on mac os x 10.6.2 [11:01] ryah_away: yeah, we need to setup a buildbot [11:01] ryah_away: anyway. [11:02] ryah_away: ACTION iss really away now [11:02] micheil: I'm currently trying to run HEAD builds of node locally [11:21] micheil: ryah_away: btw, I think I have a problem with tls on mac os x 10.6.2, but I'm not sure. [11:21] micheil: one test fails in ./test/mjsunit/test-tcp-tls.js [11:25] bry has joined the channel [11:26] chrisfarms has joined the channel [11:39] soveran has joined the channel [12:17] malkomalko has joined the channel [12:24] soveran has joined the channel [12:36] alex-desktop has joined the channel [13:00] rolfb has joined the channel [13:01] johan-s has joined the channel [13:11] ionfish has joined the channel [13:35] ashb: inimino: hows the parser coming along? [13:45] pmuellr has joined the channel [13:51] chrisfarms has joined the channel [13:51] bry has joined the channel [13:51] the_undefined has joined the channel [13:51] teemow has joined the channel [13:51] ashb has joined the channel [13:51] iamstef has joined the channel [13:51] richtaur has joined the channel [13:51] tlockney_ has joined the channel [13:51] xantus has joined the channel [13:51] elliottcable has joined the channel [14:04] logicuce has joined the channel [14:07] pdelgallego has joined the channel [14:40] johan-s has joined the channel [14:53] sveisvei has joined the channel [15:07] bentomas has joined the channel [15:09] thenduks has joined the channel [15:09] Yuffster has joined the channel [15:09] jazzychad has joined the channel [15:09] simoncpu has joined the channel [15:09] skampler has joined the channel [15:09] beppu_ has joined the channel [15:09] sr has joined the channel [15:09] orlandov has joined the channel [15:09] careo has joined the channel [15:09] wil_ has joined the channel [15:09] claudio has joined the channel [15:09] sztanpet has joined the channel [15:09] rbranson_ has joined the channel [15:09] deanlandolt_ has joined the channel [15:09] Nailor has joined the channel [15:09] rudebwoy has joined the channel [15:10] rtomayko has joined the channel [15:10] noxa has joined the channel [15:10] Pilate has joined the channel [15:10] mcarter has joined the channel [15:10] sifi has joined the channel [15:10] mikeal has joined the channel [15:12] alexiskander has joined the channel [15:24] quirkey has joined the channel [15:32] qFox has joined the channel [15:41] noxa has joined the channel [15:41] ryanmcgrath has joined the channel [15:46] thenduks has joined the channel [15:46] Yuffster has joined the channel [15:46] jazzychad has joined the channel [15:46] simoncpu has joined the channel [15:46] skampler has joined the channel [15:46] beppu_ has joined the channel [15:46] sr has joined the channel [15:46] orlandov has joined the channel [15:46] careo has joined the channel [15:46] wil_ has joined the channel [15:46] claudio has joined the channel [15:46] sztanpet has joined the channel [15:46] rbranson_ has joined the channel [15:46] deanlandolt_ has joined the channel [15:46] Nailor has joined the channel [15:46] rudebwoy has joined the channel [15:47] rtomayko has joined the channel [15:47] Pilate has joined the channel [15:47] mcarter has joined the channel [15:47] sifi has joined the channel [15:59] frodenius has joined the channel [15:59] inimino: ashb: it's coming along nicely, did you see my blog post? :-) [16:00] ashb: no - url? [16:01] mikeal has joined the channel [16:01] alex-desktop has joined the channel [16:01] rictic has joined the channel [16:01] sveimac has joined the channel [16:01] eddanger has joined the channel [16:01] sveisvei has joined the channel [16:01] soveran has joined the channel [16:01] gwoo has joined the channel [16:01] onar has joined the channel [16:01] nefD has joined the channel [16:01] apgwoz has joined the channel [16:01] jan____ has joined the channel [16:01] elliottcable has joined the channel [16:01] alexanderte has joined the channel [16:01] onar has joined the channel [16:01] rakeshpai has joined the channel [16:02] soveran_ has joined the channel [16:02] ashb: found it [16:02] inimino: http://inimino.org/~inimino/blog/peg_first_release anwyay [16:02] inimino: anyway, even [16:04] alexanderte: does anyone know if there's a way I can change the current working directory with node.js? [16:04] bentomas: process.chdir() [16:04] bentomas: I think [16:05] bentomas: it is undocumented, so I don't know if that is a permanent addition to the Node API, though [16:05] alexanderte: not sure if it exists... it's at least not... aha [16:05] ryanmcgrath: Haha, I was just dealing with that yesterday! [16:05] ryanmcgrath: .chdir() works, yeah [16:05] alexanderte: nice, I'll try that :) [16:05] ryanmcgrath: In fact, I just put my example up as a Gist [16:05] ryanmcgrath: http://gist.github.com/257942 [16:05] alexanderte: cool, I'll take a look at it [16:05] bentomas: ryanmcgrath: that's exactly how I knew the answer, from you discussing it yesterday. sorry to steal your solution! [16:06] ryanmcgrath: Haha, it's hardly my solution, I just happened to find it. ;D [16:06] ryanmcgrath: It's all good. [16:06] aurynn has joined the channel [16:08] bentomas has left the channel [16:13] soveran has joined the channel [16:14] erichocean: anyone here using Node on Solaris 10? [16:16] aurynn has joined the channel [16:16] mikeal has joined the channel [16:16] alex-desktop has joined the channel [16:16] rictic has joined the channel [16:16] eddanger has joined the channel [16:16] rtomayko has joined the channel [16:16] Pilate has joined the channel [16:16] mcarter has joined the channel [16:16] sifi has joined the channel [16:17] erichocean: this is what I'm seeing: http://pastie.org/745800 [16:18] rictic has joined the channel [16:19] alexanderte has joined the channel [16:19] binary42 has joined the channel [16:20] rtomayko has joined the channel [16:20] Pilate has joined the channel [16:20] mcarter has joined the channel [16:20] sifi has joined the channel [16:24] jchris has joined the channel [16:24] thenduks has joined the channel [16:24] Yuffster has joined the channel [16:24] jazzychad has joined the channel [16:24] simoncpu has joined the channel [16:24] skampler has joined the channel [16:24] beppu_ has joined the channel [16:24] sr has joined the channel [16:24] orlandov has joined the channel [16:24] careo has joined the channel [16:24] wil_ has joined the channel [16:24] claudio has joined the channel [16:24] sztanpet has joined the channel [16:24] rbranson_ has joined the channel [16:24] deanlandolt_ has joined the channel [16:24] Nailor has joined the channel [16:24] rudebwoy has joined the channel [16:35] logicuce has joined the channel [16:41] aurynn has joined the channel [16:41] mikeal has joined the channel [16:41] alex-desktop has joined the channel [16:41] eddanger has joined the channel [16:43] inimino: ashb: I'm adding some API features, should have streaming support next week [16:43] ashb: cool. how is that going to work? [16:43] ashb: you designate break points in the PEG or similar? [16:48] soveran has joined the channel [16:48] sveisvei has joined the channel [16:48] gwoo has joined the channel [16:48] nefD has joined the channel [16:48] apgwoz has joined the channel [16:48] jan____ has joined the channel [16:48] soveran has joined the channel [16:48] inimino: ashb: yes, just like that [16:49] ashb: hmmm i wonder how easy it is to detect the typ of doc system used by a module just from looking at its comments [16:58] thenduks has joined the channel [16:58] Yuffster has joined the channel [16:58] jazzychad has joined the channel [16:58] simoncpu has joined the channel [16:58] skampler has joined the channel [16:58] beppu_ has joined the channel [16:58] sr has joined the channel [16:58] orlandov has joined the channel [16:58] careo has joined the channel [16:58] wil_ has joined the channel [16:58] claudio has joined the channel [16:58] sztanpet has joined the channel [16:58] rbranson_ has joined the channel [16:58] deanlandolt_ has joined the channel [16:58] Nailor has joined the channel [16:58] rudebwoy has joined the channel [16:58] jed has joined the channel [16:58] dnolen has joined the channel [17:01] soveran has left the channel [17:06] RayMorgan has joined the channel [17:10] mikeal1 has joined the channel [17:14] aurynn has joined the channel [17:15] thenduks has joined the channel [17:15] Yuffster has joined the channel [17:15] jazzychad has joined the channel [17:15] simoncpu has joined the channel [17:15] skampler has joined the channel [17:15] beppu_ has joined the channel [17:15] sr has joined the channel [17:15] orlandov has joined the channel [17:15] careo has joined the channel [17:15] wil_ has joined the channel [17:15] claudio has joined the channel [17:15] sztanpet has joined the channel [17:15] rbranson_ has joined the channel [17:15] deanlandolt_ has joined the channel [17:15] Nailor has joined the channel [17:15] rudebwoy has joined the channel [17:18] voodootikigod has joined the channel [17:19] alexanderte has joined the channel [17:23] bryanl has joined the channel [17:40] eddanger has joined the channel [17:41] jbowman has joined the channel [17:45] rtomayko has joined the channel [17:48] scudco has joined the channel [17:54] RayMorgan_ has joined the channel [17:57] dnolen has joined the channel [17:59] the_undefined has joined the channel [18:04] rictic has joined the channel [18:06] sudoer has joined the channel [18:08] jed has joined the channel [18:08] binary42_ has joined the channel [18:10] RayMorgan has joined the channel [18:15] isaacs has joined the channel [18:16] isaacs has joined the channel [18:16] isaacs has joined the channel [18:19] logicuce has joined the channel [18:21] ericflo has joined the channel [18:33] RayMorgan_ has joined the channel [18:38] RayMorgan has joined the channel [18:46] sveimac has joined the channel [19:03] isaacs_ has joined the channel [19:04] dnolen has joined the channel [19:06] isaacs has joined the channel [19:13] nrstott has joined the channel [19:16] aguynamedben has joined the channel [19:18] jchris has joined the channel [19:20] shfx has joined the channel [19:22] kriszyp has joined the channel [19:23] saikko has joined the channel [19:24] kriskowal has joined the channel [19:25] the_undefined_ has joined the channel [19:54] RayMorgan has joined the channel [19:55] RayMorgan has joined the channel [19:56] kriszyp: This is what I get when I do a require with a circular dep in node (before it exits): http://www.pastie.org/746150 [19:57] rbranson: nice [19:59] isaacs: kriszyp: code? [19:59] isaacs: i'm wondering if my changes fix this [19:59] isaacs: if not, it's a useful testcase [20:00] kriszyp: I have a media.js that does require("./media/json"); and the media/json.js does a var Media = require("../media").Media [20:00] isaacs: ok, lemme try to simplify it, see if i can repro [20:01] kriszyp: and BTW, doing require("../module") does not seem to work if the module is in a different search path than the calling module [20:01] kriszyp: it looks like it just goes up a directory, I think [20:02] rakeshpai has joined the channel [20:02] isaacs has joined the channel [20:03] isaacs has joined the channel [20:04] isaacs: ok, so it seems ike the problem might be with requiring ../foo rather than circular dependencies as such [20:04] kriszyp: oh, really? [20:04] kriszyp: ok [20:04] isaacs: testing that out now... [20:05] kriszyp: hmm, ../ seems to work fine for me (as long as it is in the same path from require.paths) [20:06] isaacs: ok, yeah, lots of promise.wait() issues. [20:07] isaacs: yeah, if you put json.js in the same folder as media.js, then no issues [20:07] isaacs: that's odd. [20:07] kriszyp: hmm [20:08] kriszyp: but you are able to reproduce it? [20:08] isaacs: yeah [20:08] isaacs: i can repro it fine, but only if you have the .. in there [20:09] isaacs: http://github.com/isaacs/node-playground/tree/master/kriszip-bug [20:09] jcrosby has joined the channel [20:10] isaacs: both samedir-module.js and media/json.js try to load media.js via a relative path [20:10] isaacs: if i require media/json.js from media.js, it blows up [20:10] isaacs: if i require samedir-module.js from media.js, it's fine [20:15] hassox has joined the channel [20:16] hassox has left the channel [20:17] isaacs: yep. that's a bug alright. [20:18] kriszyp: it doesn't seem like I am getting full stack traces [20:21] isaacs: i don't see why it would work with ./foo but not ../foo [20:22] hassox_ has joined the channel [20:22] isaacs: that's extremely weird to me. [20:23] rbranson has joined the channel [20:27] jazzychad: ooh, using orbited with a back-end node tcp server creates a nice websocket-ish mechanism. neat. [20:32] cmlenz has joined the channel [20:33] isaacs: kriszyp: it appears to have something to do with the "waitForChildren" step, but i'm not sure why that works when the modules are not using .. in the path. [20:35] isaacs: ah, i see. it's not resolving properly. [20:35] isaacs: "sys" parent: {"id":"media/../media/../media" [20:36] isaacs: looking for "media/../media/../media/../media" in ["/Users/isaacs/Documents/src/js/node-playground/kriszip-bug/media/../media/../media"] [20:36] isaacs: etc. [20:41] isaacs: the problem is in pathModule.join [20:42] kriszyp: are you not allowed to have require statements inside function bodies? [20:43] isaacs: kriszyp: you should be able to have require() anywhere [20:45] kriszyp: arg, it is just shutting down with: Error: (no message) [20:45] kriszyp: no promise.wait warnings either [20:46] isaacs: you've found an interesting issue. [20:46] thenduks has joined the channel [20:46] Yuffster has joined the channel [20:46] jazzychad has joined the channel [20:46] simoncpu has joined the channel [20:46] skampler has joined the channel [20:46] beppu_ has joined the channel [20:46] sr has joined the channel [20:46] orlandov has joined the channel [20:46] careo has joined the channel [20:46] wil_ has joined the channel [20:46] sztanpet has joined the channel [20:46] rbranson_ has joined the channel [20:46] deanlandolt_ has joined the channel [20:46] Nailor has joined the channel [20:46] rudebwoy has joined the channel [20:46] kriszyp: just a simple: require("./jsgi/csrf") [20:46] isaacs: a workaround seems to be to not use circular require(), at least for the moment. [20:46] rakeshpai: ok... who farted? [20:47] ryanmcgrath: Hey, this might be a stupid question, but when I sys.exec() a command and it fails, I get nothing in stderr/stdout - I'm guessing nothing is returned, but is there any way to grab that? e.g, if I try/catch it, is it passed to the catch? [20:49] thenduks has joined the channel [20:49] Yuffster has joined the channel [20:49] jazzychad has joined the channel [20:49] simoncpu has joined the channel [20:49] skampler has joined the channel [20:49] beppu_ has joined the channel [20:49] sr has joined the channel [20:49] orlandov has joined the channel [20:49] careo has joined the channel [20:49] wil_ has joined the channel [20:49] sztanpet has joined the channel [20:49] rbranson_ has joined the channel [20:49] deanlandolt_ has joined the channel [20:49] Nailor has joined the channel [20:49] rudebwoy has joined the channel [20:53] isaacs: ryanmcgrath: sys.exec() returns a promise. attach an errback to get the failure event. [20:53] ryanmcgrath: Argh, you're right! [20:53] ryanmcgrath: Damn, I missed that. [20:53] isaacs: ryanmcgrath: sys.exec("i fail at failing lolz!!omgwtf").addErrback(function (e) { sys.debug("fail!") }) [20:55] aurynn: sys.debug("I FAIL AT SHELL COMMANDS ZOMGWTF?"); [20:57] ryanmcgrath: Mmmm, so e just returns an ID, it seems. [20:57] ryanmcgrath: I wanna get the failure output of whatever I just ran. [20:59] isaacs: ryanmcgrath: check the docs, but i think you can do that with the subprocess stuff. [20:59] isaacs: and get stderr/out/in handles for the process. [21:00] aurynn: does anyone have any comments on a DBI spec, as I start to create one? [21:00] ryanmcgrath: Mmm, yeah [21:00] isaacs: kriszyp: so, i've got a fix so that it's at least failing the same way every time, instead of a cascading crapfest of promise.wait() garbage. [21:01] kriszyp: isaacs: I've got a great one now [21:01] isaacs: oh? [21:02] kriszyp: http://www.pastie.org/746255 [21:02] isaacs: interesting... [21:02] kriszyp: the require statement causes the getter to be executed !?!? [21:02] isaacs: what does that do? [21:02] kriszyp: well, I just defined a getter [21:02] isaacs: i didn't think v8 even supported that syntax. [21:02] isaacs: right, i get that... [21:02] isaacs: (hardeehar) [21:03] kriszyp: I never actually actually called test.foo [21:03] kriszyp: yet, when I do require("aynthin"), node for some reason calls Object.stringify on the exports and accesses every property [21:03] isaacs: right, and when you require anything else, your test.foo is being gotten? [21:03] kriskowal: the module system prolly enumerates the properties. should be permitted. [21:03] kriszyp: did not expect that :P [21:03] RayMorgan_ has joined the channel [21:04] kriszyp: anyway, in my situation it somehow gets into an infinite loop, but I'll track that down next [21:04] kriskowal: why it would enumerate exports.test.foo tho is a mystery to me [21:04] kriszyp: I'd really like that *not* to happen [21:04] ashb: isaacs: it suppoers __defineGetter__ too [21:04] kriszyp: I made a getter so I can do lazy computation on purpose :/ [21:05] isaacs: ashb: i'm aware ^_^ http://github.com/isaacs/node/commit/1782a2693f586776f6edb9bf76fc382bb8f87575 [21:05] kriskowal: if it's got __defineGetter__, narwhal's object.defineProperty patch should work. [21:05] kriskowal: that's cool [21:06] isaacs: oh yeah, kriskowal ^ [21:06] ashb: kriskowal: does it die if you try to set something asn non-enumerable? [21:06] kriszyp: yeah, the getter works fine :P [21:06] isaacs: that's me copying you. [21:06] isaacs: and adding a __defineSetter__ for module.exports. [21:06] ashb: '// it's not [[DONTDELETE]], but it's as close as v8 can do.' [21:06] ashb: surely v8 can do better from C++ [21:06] isaacs: ashb: i'd like to not start doing surgery on v8's internals. that's a job for the v8 project, not nodejs. [21:07] isaacs: as long as we don't touch it, we can keep just pulling it and expecting it to work. [21:07] ashb: isaacs: no i mean the v8 api lets you do it [21:07] ashb: in which case node sohuld boostrap Object.defineProperty [21:07] kriszyp: so is it reasonable to for node.js to refrain from recursively getting all the properties in the exports? [21:07] kriskowal: we should share http://github.com/kriskowal/narwhal/blob/refactor/engines/default/lib/global-es5.js [21:08] isaacs: ashb: they do. but i'm saying, i'm not about to start adding javascript language stuff to the interpreter. if ryah_away wants to, that's his call. [21:09] ashb: man the v8 'docs' are sketchy [21:10] RayMorgan: ashb: yeah, the best thing I found to do is take a couple hours and learn the layout of the v8 header files and use those instead [21:10] kriszyp: arg, the lack of stack traces is annoying, how do I get the full stack trace? [21:13] isaacs: kriszyp: when an error is thrown from JS, you get a full stack trace. [21:13] isaacs: at least, i do [21:13] isaacs: there are cases where something crashes in the c/c++ world, and in those cases, yeah, it just pukes and dies. [21:14] kriszyp: I get something like this: http://www.pastie.org/746266 [21:14] kriszyp: which looks like a partial stack trace [21:14] kriszyp: clearly something required jack/utils [21:14] kriszyp: it is not the startup cript [21:14] kriszyp: script [21:14] isaacs: kriszyp: so... what do you mean by "stack trace"? I see a stack there. [21:14] kriszyp: partial [21:14] kriszyp: it is not all there [21:14] kriszyp: what called utils.js? [21:15] isaacs: what's missing? is it possible that something asynchronous is happening and part of it is being lost that way? [21:15] kriszyp: require calls are sync aren't they? [21:15] isaacs: kriszyp: function require (id) { return requireAsync(id).wait() } [21:15] isaacs: so, yeah, technically. but not in the stack-trace sense, they're not. [21:15] ashb: yeah - Object::Set(Handle key, Handle value, PropertyAttribute attribs) [21:16] kriszyp: I wonder if the use of promise.wait in require cuts of the stack [21:16] kriszyp: how is wait() implemented? [21:16] kriszyp: doesn't it spin the event-loop? [21:16] kriszyp: or is something else doing that and cutting off the stack trace? [21:16] isaacs: kriszyp: that's a q for ryah_away [21:16] isaacs: don't know [21:16] kriszyp: ok [21:17] kriszyp: I presume the wait spins the event-loop, but is doing it with some native code that is loosing the stack trace of the wait caller :/ [21:17] isaacs: kriszyp: http://groups.google.com/group/nodejs/browse_thread/thread/1aa0146b92582679 [21:17] kriszyp: the wait function in narwhal properly preserves stack traces, but maybe he can't do it [21:18] kriszyp: isaacs: thanks! [21:19] jcrosby has joined the channel [21:20] isaacs: kriszyp: also, you know, you can have it spit out a LOT more debuggery if you do this: $ NODE_DEBUG=1 node myfile.js [21:20] isaacs: like, way more than you probably want. [21:20] logicuce has joined the channel [21:20] isaacs: but it's handy when the error output is not helpful [21:20] kriszyp: its an env var? [21:20] isaacs: yeah [21:21] kriszyp: ok, yeah, wow [21:21] kriszyp: I wonder if that is what is doing the recursive look up in the exports (and just not printing it when debug is off) [21:21] isaacs: you can also at any time set process.ENV.NODE_DEBUG, and then delete it when you're done. [21:21] kriszyp: ok, cool [21:21] kriszyp: thank you for the help! [21:21] isaacs: oh, wait, no, i'm lying... [21:22] isaacs: it's either set or not when node.js is loaded. [21:22] kriszyp: how do I turn it off? [21:23] isaacs: nvm, you can't switch it on and off. [21:23] isaacs: it's set when node starts up [21:23] isaacs: just don't set the env var, and it'll be turned off. [21:23] isaacs: now that i think about it, a check every time might be non-trivial overhead. [21:23] kriszyp: I guess just don't know how to delete env vars in osx [21:24] isaacs: kriszyp: oh no, you set it with bash export or something? [21:24] kriszyp: yeah [21:24] kriszyp: is that wrong? [21:24] kriszyp: I don't know what I am doing :/ [21:25] kriszyp: anyway, I've made some good progress on getting pintura running on node, this is looking good [21:25] kriszyp: I appreciate the help [21:25] isaacs: kriszyp: you can just put it in the command itself: [21:25] isaacs: myprompt$ NODE_DEBUG=1 node myfile.js [21:26] isaacs: if you set it with a separate export, i think it lasts until your session dies. [21:26] kriszyp: ah, ok [21:26] isaacs: just start a new bash [21:26] kriszyp: yeah, i did [21:28] nua has joined the channel [21:28] isaacs: kriszyp: in your jsgi/streaming/httpevent/node post, i'm not sure who "you" is? [21:28] isaacs: oh, derp, "show quoted text" [21:29] isaacs: my issue with jsgi+node is that jsgi seems to imply that the response can never begin until the request is completely done. [21:30] isaacs: for many use cases, that is valid, but not all, and it necessitates caching the whole incoming http body in memory [21:30] isaacs: which is great, unless you need a jsgi handler that will let you upload a 200gb tarball file or something. [21:30] kriszyp: hmm, not sure where I used "you" [21:30] isaacs: "Sorry I didn't give you credit" [21:31] kriszyp: oh, response to mike wilcox [21:31] kriszyp: or wilson [21:31] isaacs: rite [21:31] kriszyp: I doubt think you have to wait for the request to be finished to start the response [21:31] kriszyp: why would you need to do that? [21:31] kriszyp: all you need is the request status and headers to start the response [21:31] deanlandolt_: just the headers, right? [21:31] deanlandolt_: is there a request status? [21:32] kriszyp: sorry :P [21:32] kriszyp: method [21:32] isaacs: deanlandolt_: well, let's say i want to return a 401 or a 200 depending on something in the body? [21:32] isaacs: with vanilla node, that's not hard now. [21:32] kriszyp: the request.input will block if you call read() and the body is not there yet [21:32] isaacs: but with jsgi (in all its middlewared glory) that's kinda tricky without synchronizing against the incoming body. [21:32] kriszyp: obviously that is not as ideal as async since it consumes a thread, but it is a lot better than consuming 200gb! [21:33] isaacs: kriszyp: blocking for headers is fine. blocking for body is not. [21:33] kriszyp: asynchronously getting the body is obviously more ideal, but I am *very* skeptical that is needed frequently [21:33] isaacs: provided, of course, there's a limit to how many bytes of headers you let in, rather than just trusting that it's gonna be small. [21:34] isaacs: i can pretty trivially construct an HTTP request with 200GB of headers, and then laugh while your app server goes down. and it certainly wouldn't be the first time. [21:34] isaacs: there's a lot of jerks on the internet who know how to use curl. [21:34] kriszyp: like I said my server handles that fine [21:34] kriszyp: it just consumes a thread while downloading the request [21:35] isaacs: right [21:35] dnolen has joined the channel [21:35] kriszyp: and in fact, in some situations it might not even do that, depending on how the blocking occurs, if it uses a wait function with an event-loop spinner like node and narwhal, potentially it could temporarily drop the thread [21:36] kriszyp: and the proposal does not prevent anyone from going to down the HTTP event level when they want to [21:36] isaacs: right [21:36] kriszyp: (and where it is possible, it is simply not possible in something like GAE) [21:37] isaacs: and i certainly don't want to go down the route of building space shuttles when what we need is a good bus [21:37] nua: would someone mind checking I'm not going crazy regarding the behaviour or require()? :D see --> http://pastebin.com/m7c6062e6 [21:37] nua: *of require()... [21:38] isaacs: i have a use case in the near future where i'm going to be building module-type things and it will require uploading rather large files as well. [21:38] logicuce has joined the channel [21:38] isaacs: jsgi's middleware approach is beyond lovely. but it breaks some important cases where node shines. if it was pretty trivial to have a single server that both allows middleware in the cases that make sense for it, and evented granularity where it doesn't (or better yet, the best of both worlds somehow), i'd be psyched. [21:40] kriszyp: writing middleware on top of streaming apis hasn't been well-received, and I think people's experience with servlet's filter API has demonstrated the pain of that [21:40] kriszyp: it is doable [21:42] isaacs: nua: reproducible. [21:42] jed has joined the channel [21:43] nua: thanks isaacs. is it expected behaviour? [21:43] isaacs: kriszyp: so make it easy! :P [21:43] isaacs: nua: nope. somethings wrong. [21:43] isaacs: investigating [21:43] kriszyp: heh :) [21:43] nua: isaacs: excellent, thanks [21:46] kriszyp: No workers in node.js yet, right? [21:46] isaacs: kriszyp: not that i know of [21:47] kriszyp: and what is the easiest way to deliver static files in node? [21:47] kriszyp: when it is an http server [21:47] RayMorgan: kriszyp: is a JS version in github somewhere [21:47] RayMorgan: there is* [21:47] kriszyp: using child processes? [21:47] RayMorgan: yeah [21:47] thenduks has joined the channel [21:47] Yuffster has joined the channel [21:47] jazzychad has joined the channel [21:47] simoncpu has joined the channel [21:47] skampler has joined the channel [21:47] beppu_ has joined the channel [21:47] sr has joined the channel [21:47] orlandov has joined the channel [21:47] careo has joined the channel [21:47] wil_ has joined the channel [21:47] sztanpet has joined the channel [21:47] rbranson_ has joined the channel [21:47] deanlandolt_ has joined the channel [21:47] Nailor has joined the channel [21:47] rudebwoy has joined the channel [21:47] RayMorgan: so not optimal for serving files if that is what you are trying to do [21:48] isaacs: kriszyp: figure out which file you want to serve, then read it using the posix stuff, and send body whenever you get another chunk, and emit("complete") when you're done [21:48] isaacs: you can do it in not very much doe. [21:48] isaacs: *code [21:48] kriszyp: anything already written out there? [21:48] isaacs: kriszyp: yeah, i wrote something like that like 10 minutes from now. [21:48] kriszyp: heh [21:50] jed: kriszyp: fu.js has a static handler you might be able to use. [21:50] jed: kriszyp: http://github.com/ry/node_chat/blob/master/fu.js [21:51] kriszyp: awesome, thank you [21:52] jed: kriszyp: np. [21:52] RayMorgan: kriszyp: Gateway (my Node.js JSGI clone) can also handle static files. http://github.com/raycmorgan/gateway/ There is an example in examples/ [21:53] kriszyp: great [21:55] RayMorgan: probably more of a "clone-ish"... since it is different in many ways [21:57] sudoer has joined the channel [22:01] isaacs: kriszyp: it'll be easier once i get done with my file-stream thingie [22:02] inimino: kriszyp: for future reference: $ unset NODE_DEBUG [22:03] pdelgallego has joined the channel [22:06] isaacs: kriszyp_afk: http://github.com/isaacs/node-playground/blob/master/file-server.js [22:07] isaacs: so, if you do "node file-server.js", and then go to localhost:8000/file-server.js, you'll download the file. [22:07] isaacs: it'd be not terribly hard to add in directory listing, better error handling, etc. [22:10] RayMorgan has joined the channel [22:12] dnolen_ has joined the channel [22:12] kriszyp_afk: great, thank you [22:14] svei has joined the channel [22:14] sudoer has joined the channel [22:15] dnolen_ has joined the channel [22:16] mahemoff has joined the channel [22:16] dnolen__ has joined the channel [22:19] sveisvei has joined the channel [22:19] gwoo has joined the channel [22:19] nefD has joined the channel [22:19] apgwoz has joined the channel [22:19] jan____ has joined the channel [22:20] binary42 has joined the channel [22:34] mikeal has joined the channel [22:54] sudoer has joined the channel [22:56] jed has joined the channel [22:57] jtoy has joined the channel [23:02] logicuce has joined the channel [23:07] rictic has joined the channel [23:18] logicuce has left the channel [23:19] thenduks has joined the channel [23:19] Yuffster has joined the channel [23:19] jazzychad has joined the channel [23:19] simoncpu has joined the channel [23:19] skampler has joined the channel [23:19] beppu_ has joined the channel [23:19] sr has joined the channel [23:19] orlandov has joined the channel [23:19] careo has joined the channel [23:19] wil_ has joined the channel [23:19] sztanpet has joined the channel [23:19] rbranson_ has joined the channel [23:19] deanlandolt_ has joined the channel [23:19] Nailor has joined the channel [23:19] rudebwoy has joined the channel [23:20] isaacs: aw, nua left. [23:20] isaacs: and here i got a fix for nua's bug. [23:20] isaacs: oh well. [23:22] thenduks has joined the channel [23:22] Yuffster has joined the channel [23:22] jazzychad has joined the channel [23:22] simoncpu has joined the channel [23:22] skampler has joined the channel [23:22] beppu_ has joined the channel [23:22] sr has joined the channel [23:22] orlandov has joined the channel [23:22] careo has joined the channel [23:22] wil_ has joined the channel [23:22] sztanpet has joined the channel [23:22] rbranson_ has joined the channel [23:22] deanlandolt_ has joined the channel [23:22] Nailor has joined the channel [23:22] rudebwoy has joined the channel [23:27] JoePeck has joined the channel [23:27] dnolen has joined the channel [23:29] dnolen_ has joined the channel [23:31] cmlenz has joined the channel [23:32] beppu has joined the channel [23:32] skampler has joined the channel [23:32] sr has joined the channel [23:32] jazzychad has joined the channel [23:32] Nailor has joined the channel [23:32] simoncpu has joined the channel [23:32] careo has joined the channel [23:32] thenduks has joined the channel [23:32] wil_ has joined the channel [23:32] Yuffster has joined the channel [23:33] rbranson_ has joined the channel [23:33] sztanpet has joined the channel [23:33] rudebwoy has joined the channel [23:36] JoePeck has joined the channel [23:37] keeto has joined the channel [23:37] orlandov has joined the channel [23:38] deanlandolt has joined the channel [23:39] cloudhead has joined the channel [23:40] hassox has joined the channel [23:42] hassox: good morning pps [23:43] JoePeck has joined the channel [23:44] mediacoder: good night pps :-) [23:51] JoePeck has joined the channel