[00:01] TheEmpath: okay so about modules and objects again [00:01] TheEmpath: because its not clearly stated anywhere [00:02] TheEmpath: i need to ensure that there is only one instance of something like an application object or an http server object [00:02] DrunkDwarf- has joined the channel [00:03] TheEmpath: and any time i call up var application = require('application') the same application object is returned, regardless of which module calls it [00:05] benbro has left the channel [00:05] TheEmpath: is that even possible? [00:07] muk_mb: sounds like a bad pattern [00:09] davidascher has joined the channel [00:11] benburkert has joined the channel [00:12] cloudhead has joined the channel [00:16] jchris has joined the channel [00:17] franksvalli has joined the channel [00:17] dilvie: The_Surfer: Why do you want only one instance? [00:21] rcy has joined the channel [00:23] d4ilycow has joined the channel [00:26] SubStack: mikeal: you're in oakland? :o [00:30] pedrobelo has joined the channel [00:36] creationix has joined the channel [00:38] tilgovi: anyone got a sane editing mode for emacs that won't fight me on comma-first style? [00:38] tilgovi: i'm trying to figure out how to modify espresso-mode but my head asplode [00:38] herbySk: TheEmpath: Looks to like abusing exports. Better make that object in the module code (var TheServer = exports.TheServer = new Bar();), then you can use require('foo').TheServer over the code [00:38] franksvalli has joined the channel [00:39] [[zzz]] has joined the channel [00:41] banjiewen_ has joined the channel [00:42] dilvie: Is there an express tutorial that will walk you through a app? [00:43] dilvie: I'd love to see how other people use express so I can get to know it bitter. [00:43] tjholowaychuk: dilvie: most components of an app have an example in ./examples [00:45] dilvie: tjholowaychuk: Thanks for the tip. [00:46] tjholowaychuk: dilvie: np, my source (for most of my projects) are heavily documented as well [00:46] tjholowaychuk: so its never a bad idea to go take a look [00:46] tjholowaychuk: if you are curious about something [00:52] Tim_Smart: Any know the correct way to call a function from C with no args. [00:52] Tim_Smart: Creating a empty array makes -ANSI -Wall complain. [00:52] shaver: really? [00:53] shaver: oh [00:53] tjholowaychuk: Tim_Smart: what do you mean? [00:53] shaver: hmm [00:53] tjholowaychuk: Tim_Smart: call a v8 function? [00:55] Tim_Smart: tjholowaychuk: Well, like: Handle::Cast(myFn)->Call(this, arg_count, args); [00:56] Tim_Smart: Can you just omit the count and args? [00:56] Tim_Smart: Nope. [00:58] Tim_Smart: Oh, it takes NULL as a option. [01:01] dilvie: tjholowaychuk: What is "the memory store bundled with connect"? [01:03] tjholowaychuk: dilvie: its Connect's default store [01:03] tjholowaychuk: stores sessions in the process [01:03] tjholowaychuk: via {} [01:03] saikat has joined the channel [01:03] tjholowaychuk: :) [01:03] tjholowaychuk: serves mainly as a default / example for implementation [01:04] tjholowaychuk: but nice for running tests in a dev environment etc [01:06] threeve has joined the channel [01:07] mwilliams01 has joined the channel [01:09] mwilliams01: Can anyone give me some insight into this error? I don't think I've changed anything but the URL requested from the example... http://pastebin.com/BTZBUrKB [01:13] xla has joined the channel [01:14] matt_c_ has joined the channel [01:19] [[zz]] has joined the channel [01:20] Yuffster has joined the channel [01:20] sudoer has joined the channel [01:26] ooooPsss: does node makes use of more than one core? [01:27] ryah: http://gist.github.com/617786 [01:27] ryah: ooooPsss: no [01:28] ryah: ooooPsss: unless you run multiple nodes [01:28] ooooPsss: ok, got it. ty [01:29] webr3: ryah, so if I do something extrememly processor intensive w/ node, it's at best only ever going to utilize 1 core - ya? [01:29] dguttman_ has joined the channel [01:29] ryah: webr3: that's right [01:30] webr3: ACTION must remember that [01:30] marshall_law_ has joined the channel [01:30] ryah: no free lunch [01:30] threeve has joined the channel [01:30] ryah: (and you won't get that free lunch elsewhere either) [01:31] ooooPsss: erlang? don't they do that? [01:31] ryah: it's not going to send a single loop to multiple threads for computation [01:32] ryah: you have to structure your program in a message passing style [01:32] ryah: which you can do with node too [01:32] webr3: ryah, does v8 internally handle different threads and manage much of this? [01:32] webr3: (ie pipes to communicate to main core app so it can use multi-cores)? [01:32] ryah: split your computation into different parts so that it can be run by different threads, start some nodes send it out [01:32] dilvie: tjholowaychuk: I don't think I can handle the plain object database of doom! [01:32] dilvie: OMG! [01:32] ryah: webr3: no [01:33] tjholowaychuk: dilvie: haha what? [01:33] webr3: ryah, that's the approach I normally take in most langs, just wanting to get some of the finer details :) [01:33] ryah: webr3: there's some work going on to use mutliple threads for the marking phase of the GC [01:33] tjholowaychuk: its not a database [01:33] ryah: webr3: since that can be done in parallel [01:33] tjholowaychuk: dilvie: dont use it in production [01:33] dilvie: / Authenticate using our plain-object database of doom! [01:33] tjholowaychuk: dilvie: you can swap it for connect-redis etc [01:33] dilvie: hehe [01:33] tjholowaychuk: ohhh [01:33] tjholowaychuk: hahha [01:33] tjholowaychuk: yes :D [01:33] tjholowaychuk: awesomeness [01:33] ryah: anyway - i assure you - that if you're asking this question, you're not compute bound [01:33] dilvie: can I swap it for couch? [01:33] tjholowaychuk: not sure what session stores are out there, check the connect wiki [01:34] tjholowaychuk: nstore / redis for sure [01:34] tjholowaychuk: mongo i think [01:34] ryah: so don't worry about it. you don't need multiple core processing [01:34] jimmybaker has joined the channel [01:34] Tim_Smart: ryah: Working on gtk bindings <3 [01:34] ryah: Tim_Smart: awesome, dude [01:34] lakin has joined the channel [01:34] ryah: Tim_Smart: i've got some glib event loop + libev magic [01:34] ryah: if you need some [01:35] Tim_Smart: ryah: So far http://dl.dropbox.com/u/396394/screenshots/node%2Bgtk.png [01:35] webr3: cool - just read the docs in: http://code.google.com/p/v8/source/browse/branches/bleeding_edge/src/x64/cpu-x64.cc?r=5483 which clarified too :) [01:35] dilvie: tjholowaychuk: where's the connect wiki? [01:35] Tim_Smart: ryah: (I'm tidying up brainfuckers bindings first) [01:35] tjholowaychuk: dilvie: on connect's page http://github.com/senchalabs/connect/wiki [01:36] ryah: Tim_Smart: okay - link? [01:36] dilvie: tjholowaychuk: Thanks! [01:36] TomSlick` has joined the channel [01:36] ryah: got it nm [01:36] Tim_Smart: ryah: I'll link you when I create my fork and push. [01:36] sechrist: So I modified dean edward's packer and made a simple variable substitution/eval thing [01:36] Tim_Smart: Oh, yeah. [01:36] sechrist: anybody think they can unpack this? http://friendshuffle.com/superfly.js :) [01:37] dilvie: tjholowaychuk: I've been playing around with node all by itself, but I have a commercially funded application project and I want to use node for all the server-side stuff. =) [01:37] ryah: Tim_Smart: okay [01:37] tjholowaychuk: dilvie: cool man :) [01:37] ryah: Tim_Smart: you don't need to do this setInterval loop [01:37] ryah: Tim_Smart: to call the gtk update [01:37] ryah: there is magic to be had [01:37] tjholowaychuk: dilvie: Express provides a thin layer, so you shouldnt feel restricted at all [01:37] Tim_Smart: ryah: I haven't looked at that yet. I'm just cleaning the API. [01:37] dilvie: tjholowaychuk: Just a little worried that I'll be doing a lot more roll-your-own work than I would on other server side environments. =) [01:37] sechrist: GTK mapping booyah! [01:38] ryah: Tim_Smart: http://github.com/brainfucker/node-gui/blob/master/gtk.js#L5-7 [01:38] dilvie: tjholowaychuk: Express looks great. [01:38] tjholowaychuk: dilvie: oh you will [01:38] tjholowaychuk: that is the nature of node ATM haha [01:38] tjholowaychuk: but [01:38] tjholowaychuk: yeah i dunno, id say rolling your own is easier/faster sometimes [01:38] lakin: Is there an straightforward, secure way to seralize objects (say, for sessions) that supports undefined values? undefined isn't supported in JSON. [01:38] benburkert has joined the channel [01:38] salieri has left the channel [01:38] dilvie: tjholowaychuk: IMO, that's better than writing a bunch of code that has to be duplicated on the server-side. [01:38] sechrist: So is there a way to compile javascript into a hybrid node bin thing? (like the node standard library?) [01:38] pedrobelo has joined the channel [01:39] sechrist: deploying a node desktop app sounds interesting [01:39] tjholowaychuk: dilvie: you may be suprised. with connect/express it will handle quite a lot for you [01:39] dilvie: tjholowaychuk: I wrote an html5 validation module that works right now on the client and server side using jQuery. I can't imagine how much work it would be to reproduce in PHP. [01:39] tjholowaychuk: unless you are used to content management systems [01:39] dilvie: Not trivial. [01:39] tjholowaychuk: php == death [01:40] dilvie: especially considering that I hardly know any PHP at all. =) [01:40] tjholowaychuk: i promised myelf [01:40] tjholowaychuk: myself if i ever go back to php [01:40] tjholowaychuk: i would write some kind of language above it [01:40] tjholowaychuk: and compile down [01:40] webr3: dilvie - does it have a full html5 parser as per the html5 parsing rules? [01:40] Tim_Smart: ryah: Yeah that seems a little hackish ;) [01:40] sechrist: is there a fast way to parse html and use jquery yet? [01:40] sechrist: last I knew it was terribly slow [01:40] dilvie: webr3: It's a form validation plugin, not a markup validation plugin. [01:40] webr3: ahh, okay :) [01:40] dilvie: webr3: It uses jsDOM [01:41] lakin: I'll never write PHP by hand again, either. [01:41] dilvie: tjholowaychuk: CoffeScript for PHP? =) [01:41] dilvie: =) [01:41] tjholowaychuk: haha [01:41] tjholowaychuk: kinda [01:41] webr3: anybody know if there's a javascript reference implementation of the html 5 parsing rules? [01:41] tjholowaychuk: I had "Less Lame PHP" [01:41] tjholowaychuk: for a while [01:42] tjholowaychuk: but it was a quick hack [01:42] tmpvar has joined the channel [01:42] dilvie: tjholowaychuk: I built a rapid application development tool that would create all my PHP objects for me so I could just use them. I defined the objects in javascript's object literal syntax. =) [01:42] dilvie: <-- cheater [01:43] dilvie: I guess you don't have to do that anymore. [01:43] dilvie: I imagine json parsers take care of it now. [01:43] aconbere has joined the channel [01:47] sechrist: all of the implementations of JSON.parse are safe right? [01:47] sechrist: like in various browsers? [01:47] tmpvar: yeah [01:47] sechrist: I wouldn't be surprised if any just called eval underneath [01:48] tmpvar: heh [01:48] dilvie: sechrist: I wouldn't worry about browser-native implementations, but I think some libraries wall fall back on eval() if there's no native implementation. [01:49] boaz has joined the channel [01:49] sechrist: well yeah [01:50] sechrist: if you're loading json from another domain than yours it's already JSONP so they could rape you that way [01:50] dilvie: "In browsers that provide native JSON support, JSON parsers are also much faster than eval." <-- from JSON.org/js.html [01:50] sechrist: (unless you're doing higher level ws stuff) [01:50] sechrist: faster than eval? really? O.o [01:51] tmpvar: if Crockford says it, it must be true [01:51] ooooPsss has joined the channel [01:53] zooko has joined the channel [01:54] dilvie: sechrist: hmmm http://jsperf.com/native-json-parse-versus-eval-parse [01:54] sechrist: yeah --- already reading [01:54] sechrist: interesting [01:55] webr3: maybe the clues in the eval(uation) - cos no expressions need evaluated when you just JSON parse.. [01:57] webr3: wait that's wrong [01:57] webr3: eval is much faster if I'm reading these results correctly [01:58] pedrobelo has joined the channel [01:58] webr3: the numbers aren't time, they are how many times it run per second [01:58] dilvie: webr3: You're not. [01:59] webr3: I'm getting JSON_parse(eval) at 20,460 ops a second, and JSON.parse at 6,598 per second, that's 67% slower for native implementation [01:59] dohtem has joined the channel [01:59] dohtem has joined the channel [01:59] Tim_Smart: dilvie: There is also the return new Function("return (" + json + ");")(); method. [01:59] banjiewen has joined the channel [01:59] Tim_Smart: Around the same as eval, little bit slower. [02:00] Ari-Ugwu has joined the channel [02:00] dilvie: Tim_Smart: What's the point of taht? [02:00] dilvie: that, even.. [02:00] Tim_Smart: Runs the code in its own scope. [02:00] zooko` has joined the channel [02:00] dilvie: Tim_Smart: Oh, good point. [02:01] webr3: unique valid is marginally faster though - so in reality - JSON.parse native is faster a bit - cool [02:01] webr3: ACTION heads off [02:01] dilvie: Tim_Smart: That'll keep it from clobbering existing scope variables, but it doesn't protect against intentional malicious attack. [02:01] Tim_Smart: Yeah. [02:04] dilvie: I would guess that native parse is more secure than eval.. I'm not aware of how it's handled in current browsers, but even if browsers started out just wrapping eval(), the have the option of replacing that with an actual parse, sanity checking, etc... so your code gets more secure as browsers get upgraded. [02:04] dilvie: even just using a lib that falls back on eval, if the user upgrades their browser, the script gains new security protections for free. [02:05] dilvie: you still shouldn't be too trusting of JSON any way you swing it. [02:08] jamescarr_: hmmmm... anyone replicating sessions across a cluster? [02:10] creationix has joined the channel [02:11] creationix: I think I FINALLY found a way to visualize closures and figured out exactly what the difference between Scope, Activation Objects, Variable Objects, and Execution Contexts is. [02:12] dilvie: creationix: Let's see. [02:12] dilvie: creationix: I've been thinking about writing a blog post on that subject - just describing it all. [02:12] creationix: dilvie: do you have a good understanding of the terms [02:13] creationix: if you can get past the ads, this article is actually pretty good http://ajax.sys-con.com/node/676031 [02:13] dilvie: creationix: I'm not sure what you mean by variable objects. [02:13] creationix: it's all in the spec [02:14] matt_c has joined the channel [02:14] creationix: they basically mean the same thing or rather, mean different things, but in implementation are the same thing [02:14] creationix: variable object is the object that holds all the local variable and function names for a scope [02:14] creationix: it's created when a function is executed [02:15] creationix: at the start of a new execution context [02:15] creationix: that's why var statements take effect for the entire context [02:15] creationix: even though that particular line hasn't been executed yet [02:16] creationix: and functions defined with the "function foo(){}" syntax are callable before they are actually executed as well [02:17] creationix: well, time to go back and fix my diagrams from the last article [02:17] creationix: and fix my new one before publishing it [02:17] dilvie: cool [02:18] creationix: I do worry that even though I now have a correct understanding that it will be harder to explain it to newcomers [02:18] creationix: my intuitive understanding through years of experience is easier to grasp for people who have been coding for years as well [02:20] dilvie: Yeah. I tried to explain the importance of closure to some less experienced programmers lately, and they didn't seem to grasp what I was saying. [02:20] No_2 has joined the channel [02:20] q_no|weekend has joined the channel [02:20] dilvie: I gave one guy the code he needed to make it work to solve his problem, and he gave up instead of using it because he thought it looked too hard. [02:20] creationix: closure is very hard to grasp if you've never used it [02:21] creationix: I hope my diagrams will help the visual learners with that [02:21] dilvie: I gave him working code, and he gave up! [02:21] dilvie: it was done. [02:21] dilvie: with helpful comments, even. [02:21] creationix: reminds me of my CS 101 class 10 years ago [02:21] salieri: never really got it til i started trying to do it in C/C++; it's all about the bound vars. doesn't matter if the code worked, it's the process he was after most likely(?) [02:22] salieri: btw someone tried to sneak in closures in C, if you try to do one, it will put the closure in the stack. just hope you never call another function or return from the current one (not very useful but it's there) [02:22] creationix: the lab instructor gave the entire class some sample C++ code (which didn't even compile, had syntax errors) [02:22] creationix: Everyone but me turned in the exact same broken code from the TA [02:22] creationix: I wrote C++ code that compiled AND worked [02:22] creationix: they got A's, I was failed [02:22] salieri: lemme guess [02:23] salieri: you failed the autograder. [02:23] creationix: maybe so [02:23] creationix: but I even took it to the TA [02:23] creationix: sat down with her for 3 hours explaining every line [02:23] jherdman has joined the channel [02:23] creationix: and finally she said, "oh, that works, I'll give you a 70%" [02:23] dilvie: 70%? [02:23] dilvie: wtf? [02:23] creationix: I switched schools [02:24] salieri: welcome to academia :-P [02:24] banjiewen has joined the channel [02:24] salieri: brb [02:24] dilvie: haha, I recently took a JavaScript test for a job interview. [02:24] No_2 has joined the channel [02:24] creationix: 4 different universities and 10 years later I finally for my BS just a couple months ago [02:24] dilvie: The test was packed with typos, errors, missing semicolons (where they are actually required)... [02:24] dilvie: I had to pick the least broken code from a multiple choice [02:24] kriszyp_ has joined the channel [02:25] creationix: "least broken" that sounds rather subjective [02:26] dilvie: well yes.. They were actually looking for the "correct" way [02:26] dilvie: all of them were broken. [02:26] creationix: you did say they were all broken right [02:26] creationix: ? [02:26] dilvie: like the test preparer didn't bother to test their test examples [02:26] dilvie: yes. [02:26] antares_ has joined the channel [02:27] dilvie: the problems weren't phrased, "pick the least broken solution" -- they were phrased, "Here is the problem, pick the best solution from the choices" [02:28] dilvie: when they're all broken, "least broken" is the only way to interpret those instructions. =) [02:28] creationix: yeah [02:28] dilvie: I was very worried that I'd score like 60%-70%.. had to make my best guesses at what the test preparer _meant_ to express. [02:28] dilvie: =) [02:29] salieri has joined the channel [02:29] dilvie: turns out I did better than 92% of other test takers. [02:29] dilvie: which I can only interpret as, "everybody sucked" [02:30] dilvie: =) [02:33] davidascher has joined the channel [02:33] Ari-Ugwu: Anyone use Cloud9 with Node.Js v0.3.0-pre? [02:34] Ari-Ugwu: I get an error saying I need v0.2.x and I hope I just fat fingered something. [02:36] galaxywatcher has joined the channel [02:36] zooko has joined the channel [02:36] salieri: dilvie academia hates c++ it's sad [02:38] MikhX_ has joined the channel [02:39] MikhX__ has joined the channel [02:40] hsuh has joined the channel [02:42] scnd has joined the channel [02:42] nsm has joined the channel [02:47] aheckmann has joined the channel [02:47] tmpvar has joined the channel [02:48] Gruni has joined the channel [02:48] gJ|Alex has joined the channel [02:49] zooko has joined the channel [02:53] rex_fernando has joined the channel [02:53] sprout has joined the channel [02:58] cloudhead has joined the channel [02:58] matt_c has joined the channel [03:05] stephenjudkins has joined the channel [03:07] dbathurst has joined the channel [03:10] bradleymeck has joined the channel [03:14] webr3: v8: 1 + 1 [03:14] v8bot: webr3: 2 [03:14] webr3: v8: a = {value:'bar'}; b = {value:'bar'}; a == b; [03:14] v8bot: webr3: false [03:14] webr3: v8: a = {value:'bar'}; b = a; a == b; [03:14] v8bot: webr3: true [03:14] webr3: v8: a = {value:'bar'}; b = {value:'bar'}; a == b; [03:14] v8bot: webr3: false [03:15] webr3: ACTION googles object equality in ecmascript [03:16] bradleymeck: webr3 if they are the same reference == works [03:17] webr3: v8: a = {value:'bar'}; b = {value:'bar'}; a === b; [03:17] v8bot: webr3: false [03:17] webr3: whats the point in === then? [03:17] webr3: v8: true = 'true'; [03:17] v8bot: webr3: ReferenceError: Invalid left-hand side in assignment [03:17] webr3: v8: true == 'true'; [03:17] bradleymeck: "" == {toString:function(){return ""}} [03:17] v8bot: webr3: false [03:17] webr3: v8: true == 1; [03:17] v8bot: webr3: true [03:17] EyePulp has joined the channel [03:17] webr3: v8: true === 1; [03:17] v8bot: webr3: false [03:18] webr3: ack can't change it best get on and code around it [03:20] tmpvar: v8: (1) [03:20] v8bot: tmpvar: 1 [03:20] tmpvar: v8: (!1) [03:20] v8bot: tmpvar: false [03:21] tmpvar: v8: (!!1) [03:21] davidascher has joined the channel [03:21] v8bot: tmpvar: true [03:21] tmpvar: :P [03:25] sechrist: Anybody have any ideas on how to resolve redirecting urls to their destination the most efficient way? [03:25] sechrist: I was thinking abruptly ending the connection as soon as it gets the header (without a location) but I'm not sure if that would work [03:25] sechrist: but even with that.. body data is sent [03:26] dgathright has joined the channel [03:27] lakin has joined the channel [03:27] sechrist: v8: 1==1; [03:27] v8bot: sechrist: true [03:27] sechrist: v8: for(;;){} [03:27] v8bot: sechrist: Error: Timeout [03:27] sechrist: :) [03:27] chrischris has joined the channel [03:29] jesusabdullah: v8: for (i=0; i < 10; i++) {yield i} [03:29] v8bot: jesusabdullah: SyntaxError: Unexpected identifier [03:29] jesusabdullah: v8: for (i=0; i < 10; i++) {i} [03:29] v8bot: jesusabdullah: 9 [03:29] sechrist: v8: parseInt.toString(); [03:29] v8bot: sechrist: "function parseInt() { [native code] }" [03:30] jesusabdullah: v8: function () { for (i=0; i < 10; i++) {yield i } } [03:30] v8bot: jesusabdullah: SyntaxError: Unexpected token ( [03:30] jesusabdullah: v8: function() { for (i=0; i < 10; i++) {yield i } } [03:30] v8bot: jesusabdullah: SyntaxError: Unexpected token ( [03:30] sechrist: v8: console.log('..'); [03:30] v8bot: sechrist: ReferenceError: console is not defined [03:30] jesusabdullah: v8: function() { for (i=0; i < 10; i++) { i } } [03:30] v8bot: jesusabdullah: SyntaxError: Unexpected token ( [03:30] sechrist: v8: 'test'; [03:30] jesusabdullah: <_> [03:30] v8bot: sechrist: "test" [03:30] sechrist: v8: 'v8: 1==1'; [03:30] v8bot: sechrist: "v8: 1==1" [03:31] inimino: There's no `yeild` in standard ECMAScript or in V8 [03:31] inimino: `yield` either... [03:31] jesusabdullah: I just read that there is in Javascript 1.7 [03:31] jesusabdullah: for firefox [03:31] jesusabdullah: so yeah, I was wondering if v8 had it yet [03:31] inimino: That's true. [03:31] sechrist: v8: "\n\n"; [03:31] v8bot: sechrist: "\n\n" [03:31] inimino: No, V8 won't add it since it's non-standard. [03:32] jesusabdullah: :C [03:32] jesusabdullah: it should become standard [03:32] sechrist: v8: eval('for(;;){}'); [03:32] v8bot: sechrist: Error: Timeout [03:32] inimino: It might eventually. [03:32] jesusabdullah: Possibly :) [03:32] sechrist: k I'm guessing v8 is set up like geordi [03:32] inimino: jesusabdullah ⋱ There's nothing you can do with yield that you can't do with callbacks though. [03:33] jesusabdullah: Yeah, but they are pretty nifty [03:33] jesusabdullah: timtowtdi and all that, imo [03:34] jesusabdullah: Not a big deal, but I was messing with them in python earlier, thought they were pretty rad [03:34] sechrist: v8:version() [03:34] v8bot: sechrist: ReferenceError: version is not defined [03:34] sechrist: eh.. yea [03:34] jesusabdullah: hmm [03:35] jesusabdullah: Callback pattern works pretty well, yeah [03:35] sechrist: v8: var a=function(){setTimeout(a,1);} a(); [03:35] v8bot: sechrist: SyntaxError: Unexpected identifier [03:35] jesusabdullah: Slightly different way to think of it, but the end result's pretty much the same I guess :) [03:35] sechrist: v8: var a=function(){setTimeout(a,1);}; a(); [03:35] v8bot: sechrist: ReferenceError: setTimeout is not defined [03:35] sechrist: wwwwwwwwwwut [03:36] sechrist: v8: typeof setInterval [03:36] v8bot: sechrist: "undefined" [03:36] jesusabdullah: v8bot: typeof(setInterval) [03:36] v8bot: jesusabdullah: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [03:36] jesusabdullah: v8: typeof(setInterval) [03:36] v8bot: jesusabdullah: "undefined" [03:36] jesusabdullah: wat [03:36] sechrist: ^ [03:37] jesusabdullah: v8: typeof(function(x,y) {setInterval(x,y);}) [03:37] v8bot: jesusabdullah: "function" [03:37] siculars has joined the channel [03:37] jesusabdullah: DISAPPROVAL [03:37] sechrist: v8: (function(x,y) {setInterval(x,y);})(function(){},1); [03:37] v8bot: sechrist: ReferenceError: setInterval is not defined [03:37] sechrist: hahah [03:38] SubStack: v8: typeof Math.sin [03:38] v8bot: SubStack: "function" [03:38] SubStack: jesusabdullah: it's because setInterval isn't defined in v8bot [03:38] SubStack: v8: typeof jaskdlfjasdklfjaskdfjkdsf [03:38] v8bot: SubStack: "undefined" [03:39] jesusabdullah: SubStack: Makes sense. [03:39] aconbere has joined the channel [03:40] sechrist: v8: a = new Array(); for(i=0;i<1000;i++){a.push(a.join('||||'))} [03:40] v8bot: sechrist: [03:40] sechrist: v8: a = new Array(); for(i=0;i<100000;i++){a.push(a.join('||||'))} [03:40] v8bot: sechrist: [03:40] jesusabdullah: Someday my finite element bullshit will be done [03:40] jesusabdullah: and I'll be able to play with javascript again [03:40] sechrist: out of memory = blank? [03:40] jesusabdullah: :( [03:40] sechrist: v8: a = new Array(); for(i=0;i<100000;i++){a.push(a.join('||||'))}; 'done'; [03:40] v8bot: sechrist: [03:47] adrienf has joined the channel [03:47] c4milo has joined the channel [03:49] jwcooper has joined the channel [03:51] noahcampbell has joined the channel [03:52] Yuffster_work has joined the channel [04:02] langworthy has joined the channel [04:04] deepthawtz has joined the channel [04:07] DrunkDwarf has left the channel [04:09] zooko has joined the channel [04:11] rex_fernando has joined the channel [04:19] banjiewen has joined the channel [04:20] jamesarosen has joined the channel [04:28] bradleymeck has left the channel [04:31] Blackguard has joined the channel [04:33] davidascher has joined the channel [04:33] digitaltoad has joined the channel [04:42] chrischris has joined the channel [04:46] eisd has joined the channel [04:47] ysynopsis1 has joined the channel [04:53] chapel: hmm [04:53] reid has joined the channel [04:54] rex_fernando has joined the channel [04:59] sprout has joined the channel [05:05] jamesarosen has joined the channel [05:07] creationix: yay, closure diagram! http://72.14.187.119:3000/object-graphs-2/factory.dot [05:07] creationix: I think I finally got it clear enough [05:12] SubStack: that is supposed to describe the factory pattern in javascript? [05:13] SubStack: ACTION doesn't get why the factory pattern needs to be its own pattern [05:15] creationix: SubStack: should I call it something else [05:15] creationix: it's a pattern for sure [05:16] creationix: using a closure per instance to hold data instead of sharing functions and storing data on the object itself [05:16] SubStack: oh no my complaint is more about the classification itself, not your diagram [05:16] creationix: sure, but what should I call it [05:16] creationix: it's sometimes called the module pattern too [05:16] creationix: but more so the (function(foo){…}(foo) stuff [05:17] creationix: SubStack: did you see the code for the diagram? http://72.14.187.119:3000/object-graphs-2/factory.js [05:17] aurynn has joined the channel [05:19] SubStack: the code makes a lot more sense [05:19] noahcampbell has joined the channel [05:20] SubStack: although I am not used to looking at diagrams of code [05:21] chapel: hmm [05:21] chapel: anyone know if tmpvar updated jsdom? [05:22] SubStack: http://github.com/tmpvar/jsdom/commits/master [05:22] chapel: nope [05:22] chapel: :( [05:22] chapel: waiting on him adding some code so it works for me [05:23] SubStack: did you do a pull request? [05:23] chapel: no, I didn't make the code [05:23] chapel: talked to him yesterday about it [05:23] chapel: not a big deal [05:29] JimBastard_: id start doing merges but im knee deep in nodejitsu shit [05:29] JimBastard_: >.< [05:29] JimBastard_: party is going on over here, im coding around it [05:36] davidascher has joined the channel [05:42] unomi has joined the channel [05:45] slidefox has joined the channel [05:45] aurynn has joined the channel [05:50] sstephenson has joined the channel [05:51] slidefox has joined the channel [05:52] deoxxa: anyone using the orlandov's sqlite plugin successfully in a high-load environment? [05:52] deoxxa: i'm getting segfaults :( [05:54] zooko has joined the channel [05:58] gerred has joined the channel [06:00] ysynopsis has joined the channel [06:01] bartt1 has joined the channel [06:01] slidefox has joined the channel [06:05] aurynn: what sort of things would I have to do to end up with my prototype being undefined? [06:08] aurynn: or should I expect this.prototype to be undefined after instantiation? [06:14] davidascher: hmm, time to pick a testing framework. so many to choose from... [06:15] boaz has joined the channel [06:16] slidefox has joined the channel [06:18] a_meteorite has joined the channel [06:22] hassox has joined the channel [06:24] hassox_ has joined the channel [06:26] overra has joined the channel [06:26] reid has joined the channel [06:26] slidefox has joined the channel [06:30] killfill has joined the channel [06:33] d0k has joined the channel [06:35] killfill has joined the channel [06:42] a_meteorite has joined the channel [06:44] andrewf_ has joined the channel [06:46] MikhX has joined the channel [06:53] rauchg_ has joined the channel [06:54] rauchg_ has joined the channel [06:54] sh1mmer has joined the channel [06:57] Twelve-60 has joined the channel [07:01] MikhX has joined the channel [07:07] jamesarosen has joined the channel [07:11] hannesw_ has joined the channel [07:15] brainfck` has joined the channel [07:19] V1 has joined the channel [07:28] muhqu has joined the channel [07:36] rra_ has joined the channel [07:39] __mn__ has joined the channel [07:39] rex_fernando has joined the channel [07:40] hornbeck has joined the channel [07:43] V1 has joined the channel [07:44] saikat has joined the channel [07:51] a_meteorite has joined the channel [07:54] kuya has joined the channel [07:54] benburkert has joined the channel [07:54] andrewfff has joined the channel [07:55] a_meteorite has joined the channel [07:56] CIA-77: node: 03Ryan Dahl 07master * rf7a9eea 10/ (deps/libeio/cygwin/config.h deps/libev/cygwin/config.h): Add config.h for cygwin for libev and libeio - http://bit.ly/beWw3C [07:56] CIA-77: node: 03Ryan Dahl 07master * r634c4bf 10/ deps/v8/src/atomic.h : Add missing v8 file... - http://bit.ly/d5NQQs [07:59] a_meteorite has joined the channel [08:03] adambeynon has joined the channel [08:08] __mn__: anybody know how to get socket.io module to use secure connections? (I can't find any resources via google) [08:11] brainfck` has joined the channel [08:11] pquerna: I also wondered that. I don't think it does right now. [08:11] pquerna: at least i've never seen someone do it. [08:11] __mn__: Hmm, would it be dangerous to pass passwords through it, then? for logins, and such. [08:14] micheil: __mn__: umm, I can check for you [08:14] SubStack: ACTION wonders why Step is not setting err like the readme suggests [08:15] micheil: __mn__: at any rate, passing passwords over the wire is always dangerous. [08:17] __mn__: micheil: lol, right. but I'm interested in having a realtime login. hmm, okay. thanks anyways. [08:18] micheil: __mn__: well, the reason I say it's dangerous is due to man-in-the-middle style attacks [08:18] micheil: __mn__: is there a need for realtime login, like, what does it achieve? [08:19] Tim_Smart: Urgh. Can't get damn node addon to run :/ [08:20] __mn__: micheil: I'm mostly a frontend coder, so I'm just getting into backend stuff starting with node.js cause it is exactly what I want. I'm using jquery to create a live DOM manipulator, and now I'm developing the server-side and I'm coding it all to be realtime... so login won't be the only thing that should be secured. [08:21] micheil: hmm.. [08:21] micheil: on the client of socket.io, there is a flag in the options for secure [08:22] micheil: try setting that to true, and run your server off a setSecure http server. [08:22] __mn__: micheil: do you have a reference, cause I couldn't find anything in the documentation for that after looking for the last 20 minutes on google and the github doc. [08:22] __mn__: micheil: thanks :), greatly appreciated. [08:23] micheil: similar to this: http://gist.github.com/618014 [08:23] micheil: although, watch out, as I have heard ssl support in node is still buggy at best. [08:24] micheil: I'm looking at the source code. [08:24] micheil: on the client: var socket = new io.Socket(null, {port: 8080, secure: true}); [08:24] __mn__: micheil: oh, I searched the source code for wss:// but didn't find anything. [08:25] micheil: yeah, it's "wss" [08:25] ph^ has joined the channel [08:25] micheil: line 396 of socket.io.js [08:25] __mn__: micheil: aha, thanks! I'm going to go try that out. :) [08:27] dbathurst has joined the channel [08:28] rex_fernando has joined the channel [08:36] SubStack: there, forked step and fixed it to match the readme better [08:40] Tim_Smart: Oh wow. I got my gtk code to work. [08:40] Tim_Smart: Finally.,, [08:40] stephank has joined the channel [08:43] wao: oh hai [08:43] wao: is possible to update nodejs through npm? [08:53] digitalspaghetti: no, but there is nave you can use [08:53] digitalspaghetti: nave is virtualenv for node [08:56] Tim_Smart has joined the channel [09:02] andrewfff: is there anything like py2exe for nodejs (or, for that matter, any JS dev environment)? [09:04] wao: nave? ok gonna google for it [09:06] pquerna: andrewfff: not yet [09:06] pquerna: andrewfff: its definately on the todo for a few people, rough plan has been talked about several times [09:08] andrewfff: any idea if there's a wiki page or vague timeline or anything? i was considering hacking something together but wouldn't want to duplicate effort [09:09] pquerna: im one of the people who want to do it. no one has done it yet, or gotten far afaik. [09:09] Tim_Smart: Ever so slowly working by way through the GTK api... [09:09] Tim_Smart: my* [09:09] pquerna: short story: refactor out int main() of node's .cc; Make a few basic apis like node_init(), node_run() [09:10] pquerna: so, then you have a basic shared lib; not reentranent, but something you can wrap and bundle up [09:10] pquerna: then its about figuring out code loading etc, but thats the first step [09:11] pquerna: ryah has expressed interest in doing it, so if you got the time, dive in and start sending patches.. :) [09:11] overra has joined the channel [09:13] hassox has joined the channel [09:13] digitalspaghetti: you might want to join the node-dev mailing list and start a discussion there [09:13] digitalspaghetti: and submit patches/github pull requests [09:13] andrewfff: ok thanks! [09:23] rra_ has joined the channel [09:29] mbrochh has joined the channel [09:29] mbrochh has joined the channel [09:34] ezmobius has joined the channel [09:40] overra has joined the channel [09:44] vandenoever has joined the channel [09:45] vandenoever: ACTION wonders why callbacks are usually placed at the end of a call [09:45] vandenoever: it more or less fixes the number of arguments (if you prefer the callback at the extremity) [09:48] jesusabdullah: there are ways to get around it [09:48] jesusabdullah: A bit finnicky, maybe, but doable [09:48] jesusabdullah: callback at the end is a convention. It also makes inline callbacks more readable. [09:49] jesusabdullah: So instead of something like [09:49] jesusabdullah: doThisthing(function(err, results) { . . . [09:49] jesusabdullah: . . . [09:49] jesusabdullah: . . . [09:49] jesusabdullah: }, someArg, someOtherArg); [09:50] jesusabdullah: we can have all the args grouped together at the beginning, THEN the callback, closed with }); [09:50] jesusabdullah: So yeah [09:50] jesusabdullah: good convention [09:54] SamuraiJack has joined the channel [09:58] vandenoever: ok, i'll follow the convention [09:58] vandenoever: i was putting the callback at the front [10:01] Anti-X has joined the channel [10:09] V1 has joined the channel [10:16] jesusabdullah: cool :) [10:16] franck34: generaly in js, is there a way to handle http error for a jsonp request ? (404 not found, timeout ..) ? [10:16] franck34: seem's hard [10:16] franck34: i don't see how it's possible [10:17] femtoo has joined the channel [10:17] jesusabdullah: jsonp is json with a javascript callback? [10:18] jesusabdullah: ACTION never really "got" jsonp [10:18] franck34: yes [10:18] franck34: problem is that when something wrong (404, timeout), nothing is called [10:19] jesusabdullah: ah [10:19] jesusabdullah: Maybe try/catch around the original request? [10:19] TomsB has joined the channel [10:21] [[zz]] has joined the channel [10:22] Anti-X: what's the p stand for? [10:23] micheil: jsonp that p? [10:23] Anti-X: padding [10:23] Anti-X: lol [10:23] Anti-X: wtf is that supposed to mean [10:24] micheil: yeah [10:24] micheil: I think jsonc would be better, json with callback [10:24] franck34: agree [10:24] micheil: but eh' [10:24] micheil: names matter not at all really. [10:24] StM: its called padding by the way its implemented [10:24] franck34: jesusabdullah: i don't think i can try/catch a script injection in the head tag [10:25] Anti-X: should be promises based [10:25] agnat has joined the channel [10:25] franck34: i'm rewriting client/server of chat.node.js to make it cross domainisable [10:25] Anti-X: jsonp?callback=something&error=somethingElse [10:25] hannesw_ has joined the channel [10:25] __mn__: micheil: so I got the security certificates and everything to work, the AJAX long polling works, but I have a handshake problem with WebSockets because non-secure doesn't match secure (ws:// != wss://) -- any ideas? or is this what is not-yet-implemented? [10:26] micheil: hmm.. [10:26] franck34: Anti-X: your solution is for an application error, not a http error [10:26] Anti-X: oh [10:26] Anti-X: well [10:26] Anti-X: still [10:26] Anti-X: an http error can be handled by the server [10:26] franck34: except if it's down :) [10:26] Anti-X: then you'll get an exception or a notice in your browser [10:26] Anti-X: event maybe [10:27] micheil: __mn__: hmm.. looks like the origin handling may be doing that. [10:29] __mn__: micheil: origin handling? (?) (socket.io.js line 315 is what detects it, in the same way that line 153 detects it for HTTPS) ... but the websocket one mismatches. [10:29] micheil: yeah [10:29] Tim_Smart: Yay, got Window fully working http://github.com/Tim-Smart/node-gtk [10:29] micheil: I'm looking into it. That may be a bug [10:30] micheil: __mn__: I'd recommend you open a bug report on the project, looks like a certain bug. [10:30] __mn__: micheil: got it, thanks. :) [10:30] micheil: __mn__: worked? [10:31] __mn__: micheil: no no, just for me to go and submit it. I'm going to play around with the code first a little bit though. [10:31] micheil: __mn__: yeah, there should be something on the server checking it better. [10:32] __mn__: micheil: I'll let you know, if I am able to fix it, do I send it as a patch? (pardon my n00bness) [10:32] micheil: __mn__: I'm not too sure. [10:32] micheil: __mn__: just so you know, I do know that there will be a high chance that large parts of socket.io will be changing soon. [10:33] __mn__: micheil: the updates he mentioned in his slide? http://www.slideshare.net/TimothyFitz/socketio [10:33] Ori_P has joined the channel [10:33] micheil: TimothyFitz isn't behind socket.io, iirc. [10:34] micheil: also, I actually believe that most people implement websockets wrongly. [10:34] micheil: websockets' started out simply, it's a myth really that they are simple. [10:35] micheil: and no, what I'm talking of isn't mentioned in those slides. [10:35] hellp has joined the channel [10:36] __mn__: micheil: ah, I just found the slide online, don't know who created it / redistributed it. I didn't like sockets cause they are an HTML5 technology (which in my head = won't be usable for 5 years till people upgrade their browsers), but then I saw socket.io had legacy graceful degradation, which I thought was cool. [10:36] micheil: __mn__: for what it's worth, I'm the author of node-websocket-server [10:36] micheil: as for websockets, the only browsers without support at the moment, which are mainstream browsers, are: firefox, opera, IE [10:37] __mn__: micheil: ooh! okay. I'm going to go look that up. :) I was actually just about to ask you what you do with node. :P [10:37] micheil: firefox 4 will have them [10:37] micheil: opera has an internal build with them coming [10:37] micheil: and there is talk from Microsoft people on the IETF mailing list, so IE may be getting websockets soon (hopefully) [10:37] __mn__: micheil: "only browsers without support" = majority of them. Lol, I wouldn't call that "only". Especially with legacy versions still in use. [10:38] __mn__: micheil: really? IE9 is actually gonna do it that fast? wow, shock and awe. :P I don't believe it. [10:38] micheil: well, with chrome, chromium, and safari, they all support draft 76, few draft 75 clients still exist. [10:38] micheil: firefox 4 will support draft 76. [10:38] micheil: (last I know) [10:38] __mn__: true, but Webkit also doesn't even render borders correctly. :/ [10:38] micheil: I'm not sure where opera is at, but I know it's coming based on information I've been told [10:39] micheil: I've never had problems with webkit and borders. [10:39] Tim_Smart: Node powered GUI: http://dl.dropbox.com/u/396394/screenshots/node-gtk.png [10:39] micheil: as for firefox and opera, they auto update. [10:39] micheil: IE is the only one really lagging behind [10:39] micheil: Tim_Smart: that clear-ish window? [10:39] __mn__: which explains why there are still a lot of IE6 and IE7 users :P [10:39] micheil: it's not exactly a GUI :P [10:40] Tim_Smart: Yeah. Well, it doesn't interface anything :p [10:40] micheil: :P [10:40] micheil: I could do with a french press.. [10:42] Tim_Smart: Hmm I think it might have a memory leak... [10:44] digitalspaghetti: Straw poll: What do you guys use for internal bug/feature tracking? (that isn't github) [10:44] micheil: digitalspaghetti: I don't? [10:44] micheil: I should though. Just like testing. [10:45] __mn__: micheil: about to try your example. [10:45] micheil: which example? [10:45] micheil: the one from 2-4 hours ago? [10:45] franck34: jsonp handling error: seem's that there is script.onload and script.onreadystatechange i can use :) [10:46] rnewson has joined the channel [10:46] franck34: ACTION patching mootools :D [10:46] Anti-X: exactly [10:46] micheil: yeah, onreadystatechange is fairly good. [10:46] __mn__: I just gitted (is that the proper use?) it, so... the chatroom? [10:47] micheil: __mn__: git clone http://github.com/miksago/node-websocket-server.git? [10:47] micheil: the term there would probably be cloned [10:47] __mn__: yeah, thats the one I gitted. [10:47] Tim_Smart1 has joined the channel [10:47] micheil: okay, in which case, take the examples with a grain of salt. [10:47] __mn__: cloned, right haha. :P **awards self the n00b status** [10:48] __mn__: will do. [10:50] __mn__: micheil: nice chatroom, no problems at all. very IRC like. [10:51] micheil: heh [10:51] micheil: it's an example of what can be done, but by no means something that should be copied. [10:51] __mn__: micheil: though, as I said before, I don't really like sockets unless I can degrade :/ [10:51] __mn__: micheil: lol, right. [10:52] __mn__: do you have other node projects? [10:52] micheil: __mn__: well, true. Currently I do believe that my server is the most spec compliant, although, there's still work to be done on it. [10:52] micheil: not really. [10:52] micheil: not one's that I really actively work on. [10:52] __mn__: micheil: yeah, I agree. there is definitely a need for proper implementation of websockets. Absolutely. [10:52] micheil: writing a websocket server while being in education fulltime and working doesn't leave you with much other time [10:53] __mn__: unfortunately, I just don't see them being used much widely untill 99.5% of the web is using them. [10:53] micheil: __mn__: for what it's worth, I am working closely with the team behind socket.io, and hopefully we'll be able to intergrate the two in a way [10:53] __mn__: micheil: yeah, know what you mean. thought so :P [10:53] micheil: __mn__: well, look at the winners of the node knockout, there was a figure, something like 7 out of 9 winners used websockets [10:54] micheil: (although, most used socket.io) [10:54] micheil: I think it's actually on http://socket.io [10:54] __mn__: micheil: right... but these are all the people who *are* on the cutting edge of tech. So thats an obvious target audience :P [10:54] __mn__: which, dont' get me wrong, if that is your audience, is totally valid. [10:54] naxx has joined the channel [10:54] micheil: __mn__: true, although, we did judge to have some corss-browser working in there. [10:55] __mn__: I'm having to develop for grandmas and puppy dogs also. :/ [10:55] __mn__: so can I ask you some questions? I skimmed through your documentation. But I noticed the whole broadcast/send thing going on. The annoyance I saw with socket.io is it has no group-exclusion mechanism, just raw user-lists. [10:55] __mn__: does yours support something more sophisticated? Like blocking based off of chatroom/URL location? [10:56] micheil: well, the way node-websocket-server does that is through a connection manager [10:56] micheil: it's essentially a linked list [10:57] micheil: as for routing, node-websocket-server is super low level [10:57] micheil: this has some ideas: http://github.com/miksago/nws-router [10:57] micheil: (no code, on that branch, let me push) [10:57] __mn__: connection manager ... you can pool different connections into different groups? [10:57] __mn__: k. [10:58] micheil: __mn__: no. [10:59] micheil: the main reason is because it's something that is on top of node-websocket-server that should do that. [10:59] __mn__: fundamentally, though, any exclusion is done through a list of users generated from some chatroom URL. Yeah? There isn't any mechanisms to have them in separate processes/sessions or something? (general question, not necessarily targeted at you or your module) [10:59] micheil: this is sort of how you could do routing with websockets: http://github.com/miksago/nws-router/blob/master/lib/router.js [11:00] __mn__: **clicks** [11:00] micheil: theoretically you can do routing based on the resource path, like that code shows [11:00] micheil: although, there is a different handshaking proposal that may change that a bit. [11:01] __mn__: different handshaking proposal ? what do you mean? [11:01] __mn__: (n00b alert again) [11:01] micheil: __mn__: well, the websocket protocol is still in very early stages [11:01] ooooPsss has joined the channel [11:01] micheil: draft 76 is just the most recent implemented draft [11:02] micheil: there's also draft ietf-02 [11:02] micheil: which changes things slightly and draft ietf-03 is likely to change a lot. [11:02] __mn__: okay gotcha, so there is a new proposal that will change...... routing based off of resource paths? [11:02] micheil: well, rather then using http upgrade, it uses http connect [11:03] micheil: so, the initial handshake between client and server is like an ssl upgrade [11:03] __mn__: npm install connect ... is that the node module for the official connect? [11:03] micheil: no [11:03] micheil: that is the official connect [11:03] micheil: oh. right. [11:03] __mn__: oh oh. okay. [11:03] micheil: it's the same thing as the git repo [11:03] micheil: it's just a different way to install / distribute [11:04] micheil: npm is like ruby's Gems or python's PyPi [11:04] __mn__: gotcha [11:04] __mn__: okay, so for a frontend guy getting into backend development... I am basing (currently) my entire backend off of this realtime stuff. [11:04] micheil: it's generally recommended that you use npm instead of vendoring files in your project [11:05] micheil: well, I'm originally a frontend developer too. [11:05] __mn__: which would be using these very in-progress emergent technologies [11:05] micheil: __mn__: look at why you need to use these technologies [11:05] __mn__: do you recommend that I ... base my entire project off of those things? [11:05] vandenoever: what's the best dom implementation for node.js? [11:05] micheil: I couldn't do that until I've looked over most details of your project. [11:05] __mn__: if they ... could just change and stop working because of how I implemented them? [11:06] micheil: (I'm available to hire as a consultant on these sorts of things) [11:06] micheil: as for the technology of websockets, all that would change is the server side implementation details. [11:06] __mn__: vandenoever: express framework has some interesting client side stuff. [11:06] micheil: the HTML / DOM interface is pretty much fixed in stone. [11:06] dahankzter has joined the channel [11:07] micheil: the only changes recently have been things like subprotocols can no longer use spaces or comma's in them [11:07] __mn__: micheil: gotcha. how much do you charge per hour? :P [11:07] micheil: vandenoever: probably jsdom. But I wouldn't recommend DOM stuff on the server. [11:07] vandenoever: micheil: why not? too heavy? [11:07] micheil: __mn__: depends. 40-80$AU / hour, which is like, 39-79$US [11:08] micheil: vandenoever: pretty much [11:08] vandenoever: micheil: it's a large computer with few users, so that's ok [11:08] __mn__: micheil: hmm, do you do freelance dev also? [11:08] micheil: __mn__: yes. [11:09] vandenoever: micheil: besides, there is not always an alternative if you want something easy to work with xml [11:09] micheil: vandenoever: I don't want to know why you're needing xml :P [11:10] micheil: hmm.. if he comes back asking for me, I'm grabbing coffee. [11:11] __mn__ has joined the channel [11:11] __mn__: ... ? [11:12] __mn__: micheil: are you still here? [11:13] xla has joined the channel [11:13] ooooPsss: micheil: hmm.. if he comes back asking for me, I'm grabbing coffee. [11:14] __mn__: okay, sorry. I'm a IRC newb, I clicked something and it booted me off the server. [11:21] unomi has joined the channel [11:24] Anti-X: you clicked exit that's what! [11:24] Anti-X: or maybe reconnect [11:25] Anti-X: it's not rocketry [11:28] __mn__: lol. do I get the newb award? [11:28] zorzar has joined the channel [11:29] jetienne has joined the channel [11:29] sveimac has joined the channel [11:30] xla has joined the channel [11:35] dal9k has joined the channel [11:35] jstemmer has joined the channel [11:40] charlenopires has joined the channel [11:42] micheil: micheil: yeah. [11:42] micheil: erm [11:42] micheil: __mn__: yeah [11:42] __mn__: hi [11:42] micheil: howdy [11:42] __mn__: sorry about that. [11:43] digitalspaghetti: with EventEmitter errors, can only a string be passed back? [11:43] __mn__: how do you start a private IRC? :P [11:44] digitalspaghetti: you ask the person if they mind, then /msg HAI! [11:44] __mn__: thanks. :) [11:44] micheil: digitalspaghetti: uhh, you can have anything as an argument to an emitter [11:45] digitalspaghetti: hmm, maybe something else i did then [11:45] digitalspaghetti: as I want to have more than 1 error event, as I need difference response codes [11:46] micheil: digitalspaghetti: by all means do it then. [11:46] micheil: perhaps use a custom Error subclass? [11:46] MattJ has joined the channel [11:47] digitalspaghetti: i just want to do something like this: self.emit('error', {error: 'Connection Error - Cannot connect to the CouchDB Instance', code: 410}); [11:47] micheil: that should work. [11:47] digitalspaghetti: i think if you don't catch it, that's where there are issues [11:48] digitalspaghetti: ends up throwing a throw new Error("Uncaught, unspecified 'error' event."); [11:48] digitalspaghetti: i probably forgot to do that before :D [11:48] micheil: yeah [11:48] micheil: that's right. [11:48] micheil: that's how eventEmitter works, it's somewhat annoying. [11:49] digitalspaghetti: wondering if I should write my code more in the style of passing an object with success/failure callbacks [11:49] micheil: depends. [11:49] q_no|weekend has joined the channel [11:49] micheil: .on("connection") is usually nice [11:50] micheil: maybe use an event like on("_error" ? [11:50] digitalspaghetti: basically, it's a wrapper around couchdb stuff: https://gist.github.com/e9ed612e6d41f356ac68 [11:53] micheil: hmm, I'm not sure then [11:53] Chris64 has joined the channel [11:53] Chris64: hi all [11:53] micheil: digitalspaghetti: possibly use _error [11:53] digitalspaghetti: this way seems to work, i just worry it might bite me in the ass down the line if EventEmitter changes at all [11:53] micheil: not sure if "Error" === "error" though [11:54] digitalspaghetti: (and I'll probably just use 'fail' instead [11:54] micheil: hmm.. [11:54] __mn__: okay so I noticed that client/lib/transports/websocket.js has ('/' + this.sessionid) : ''); instead of the HTTPS that has ('/' + this.sessionid) : '/'); [11:55] Chris64: I'd like to resolve some Reverse DNS entries but don't know how to get the ip in the callback to proper display it. Is there a way to get both ip and resolved domains? [11:57] Chris64: the problem is that the callback function (I've defined one with a name, so not anonymous) doesn't seem to know about the resolved ip address. is it bether to use an anonymous callback function with a third parameter for ip? [11:57] agnat has joined the channel [11:57] zooko has joined the channel [11:58] Chris64: dns.reserve('212.227.17.105', function(err, '212.227.17.105', domains) );? [11:59] Chris64: i am js newsbie that's why I'm not that familiar with such specific language features [11:59] brainfck` has joined the channel [11:59] agnat has joined the channel [12:01] agnat_ has joined the channel [12:03] Chris64: no idea? :( [12:03] chapel: you are trying to take an ip and check the reverse record for it? [12:04] Chris64: i want to resolve it's reverse dns record, yes [12:05] chapel: are you using the cmd line option for it? [12:05] chapel: host [12:05] Chris64: mh, i think i got an idea how to do it. dns module example on the website defines an extra function with an embedded function and inside it they use a variable defined in the root function [12:06] Chris64: no, dns module [12:06] chapel: oh [12:06] Chris64: http://nodejs.org/api.html#dns-258 [12:06] chapel: well tbh, I am not that skilled in node.js or javascript to give good advice heh [12:07] Anti-X: dns.reserve('212 [12:07] chapel: but, you want to get the ip/reverse record from the callback? [12:07] Anti-X: it says reserve, not reverse [12:07] Chris64: oh yes, you're right [12:09] chapel: dns.reverse( function (ipaddress, callback) { [12:09] V1 has joined the channel [12:09] chapel: callback(ipaddress); [12:09] chapel: } [12:09] Chris64: thank you :) [12:10] chapel: or [12:10] chapel: use callback to send whatever you want [12:10] chapel: so if you assign the reverse domain inside the function, at the end just do callback(domains); [12:11] chapel: you can send as much as you want [12:11] chapel: though don't quote me on this [12:11] chapel: I just figured out callbacks yesterday, and only the basics [12:12] Chris64: I've tried to adapt the example in the docs, but there is an error: http://pastebin.com/z7ez8mij [12:12] Chris64: mh [12:13] chapel: I take it at line 5 you want domains to be returned? [12:14] Chris64: yes, i've forgot tu add ip to the output but nodejs says that doReverse is not defined [12:14] Chris64: well [12:14] Chris64: there is no output [12:14] Chris64: ok [12:14] Chris64: sorry [12:14] chapel: okay hmm [12:14] chapel: well a isn't defined anywhere [12:15] Chris64: so i have to replace a with ip [12:15] chapel: looks like it [12:17] Chris64: and a typo in test ip, that's why there was no ouput [12:18] chapel: is it working now? [12:18] delapouite has joined the channel [12:19] chapel: btw [12:19] Chris64: yes :) [12:19] chapel: okay cool [12:20] Chris64: now fighting with domains.forEach ;) [12:20] chapel: hmm [12:20] chapel: whats the issue there? [12:20] Chris64: i want to display one domain per line. always with it's corresponding ip [12:21] digitalspaghetti: sweet http://code.google.com/p/servicestack/wiki/NodeJsWindowsDownload [12:21] q_no|weekend has joined the channel [12:23] zomgbie has joined the channel [12:23] Chris64: http://pastebin.com/9yQ120mv :| [12:23] Chris64: should I use more anonymous functions? [12:25] Chris64: mh, yes, now it works [12:25] Chris64: http://pastebin.com/x0Kun7ia :) [12:26] MikhX has joined the channel [12:27] chapel: grats [12:29] herbySk has joined the channel [12:30] chapel: whats the best way to use couchdb with node.js? [12:31] __mn__: chapel: I assume http://github.com/felixge/node-couchdb [12:31] __mn__: but idk. [12:31] chapel: okay, thats what I found [12:32] chapel: but of course, its hard to know what is working the best atm [12:32] __mn__: :P [12:33] chapel: now, I am doing my development on my local machine, but was wondering if I could host my couchdb server remotely? [12:33] __mn__: do you have shell access? [12:34] __mn__: you could write a script to echo shell commands. (if that is possible?) [12:34] chapel: to the remote, or local? [12:34] chapel: I mean, its not a big issue, I can use either [12:34] chapel: was mostly curious [12:35] __mn__: to the remote. [12:35] __mn__: oh, but I guess you also have to echo to local. Meh, I don't know these things. :P [12:36] Chris64: is there an documentation about Error Object? How do I check Error Codes against dns.TEMPFAIL? [12:37] Chris64: err == dns.TEMPFAIL? [12:38] ezmobius has joined the channel [12:41] Chris64: mhh,works [12:41] Ari-Ugwu has joined the channel [12:50] sudoer has joined the channel [12:50] hannesw_ has joined the channel [12:55] bradleymeck has joined the channel [12:55] bradleymeck has left the channel [12:55] hassox has joined the channel [12:55] Chris64: there is no icmp module right now or? [12:59] Chris64: have to go now [12:59] Chris64: thank you for your help :) [13:03] kriszyp has joined the channel [13:03] jetienne: anybody knowledgeable in site stream API ? how can i get a oauth key [13:07] digitalspaghetti: i wrote this to get twitter oauth keys, might help you; http://gist.github.com/575303 [13:09] digitalspaghetti: mikeal: you about? [13:12] ysynopsis has joined the channel [13:15] muk_mb has joined the channel [13:16] __mn__: okay. something really stupid that I've been doing forever. I'm running cygwin... and the only way I know how to restart a server is by exiting it, then opening cygwin again, and cd folder back to where I was and running it again [13:17] __mn__: cause when I run a server,... you can't type in cygwin [13:17] __mn__: how do you .... terminate a server via commandline in cygwin if you can't type? [13:17] __mn__: or better yet, how do you reboot/restart a server? [13:19] threeve has joined the channel [13:20] maushu has joined the channel [13:20] digitalspaghetti: Ctrl + D [13:21] __mn__: doesn't work. [13:24] jashkenas has joined the channel [13:27] John9e9 has joined the channel [13:28] Tim_Smart: Anyone know the best way to find memory leaks in node addons (c++) [13:29] __mn__: nodejs.org/api.html#process then look for process.memoryUsage() [13:30] __mn__: then simply console.log() it out with some benchmarks, I assume. [13:34] sveisvei has joined the channel [13:35] rra_ has joined the channel [13:37] SamuraiJack has joined the channel [13:39] Tim_Smart: Hmm. Intersection time http://arewefastyet.com/?machine=5 [13:40] __mn__: ouch, V8 really whooped the others. [13:40] DrunkDwarf has joined the channel [13:40] Tim_Smart: On the v8 bench anyway. [13:41] __mn__: oh [13:42] Tim_Smart: __mn__: Oh, about my previous question, wouldn't valgrind or something work for C++ addons? [13:43] __mn__: I'm a newb trying to see if I can help. :P so I have no clue. You should be helping me. :P [13:43] Tim_Smart: Oh, no problem :) [13:44] Tim_Smart: I'm not that great at C++ either... [13:45] Tim_Smart has joined the channel [13:45] __mn__: I coded in C++ a long time ago, but nothing epic and its been way to long that I don't remember anything other than confusing header file structure systems and struct lists and junk like that. :P [13:45] c4milo has joined the channel [13:48] murphy has joined the channel [13:50] muk_mb has joined the channel [13:50] DrunkDwarf has left the channel [14:01] Blink7 has joined the channel [14:05] Ari-Ugwu has joined the channel [14:07] femtoo has joined the channel [14:07] ncb000gt has joined the channel [14:16] FLYBYME has joined the channel [14:16] hannesw__ has joined the channel [14:17] k23z__ has joined the channel [14:20] q_no|weekend has joined the channel [14:30] c4milo has joined the channel [14:30] xla has joined the channel [14:37] jmaister has joined the channel [14:43] mAritz has joined the channel [14:44] heavysixer has joined the channel [14:51] k23z__ has joined the channel [14:54] omygawshkenas has joined the channel [14:55] Gruni has joined the channel [14:56] tekky has joined the channel [15:03] naxx has joined the channel [15:03] [[zz]] has joined the channel [15:03] jpld has joined the channel [15:05] aconbere has joined the channel [15:09] dachary has joined the channel [15:10] digitaltoad has joined the channel [15:10] dachary: Hi. Is there a sample node.js application with tests ? I would like to see how it should be done. [15:10] Blink7_ has joined the channel [15:12] _mythz has joined the channel [15:12] dachary: ACTION trying http://github.com/benrady/jasmine-nodejs-example [15:13] dachary: this is confusing [15:14] dachary: ACTION reading http://cjohansen.no/en/node_js/unit_testing_node_js_apps [15:15] dachary: ACTION cheking out http://github.com/caolan/nodeunit [15:18] peritus- has joined the channel [15:20] hsuh has joined the channel [15:20] Blink7 has joined the channel [15:24] almaisan-away has joined the channel [15:26] [[zz]] has joined the channel [15:48] davidascher has joined the channel [15:50] [[zz]] has joined the channel [15:58] EyePulp has joined the channel [16:00] trotter has joined the channel [16:03] mikew3c has joined the channel [16:04] jchris has joined the channel [16:05] dmcquay has joined the channel [16:10] DrunkDwarf has joined the channel [16:12] steadicat has joined the channel [16:14] nikolaiwarner has joined the channel [16:16] nikolaiwarner has left the channel [16:16] siculars has joined the channel [16:17] [[zz]] has joined the channel [16:18] dnolen has joined the channel [16:21] sudoer has joined the channel [16:22] gerred has joined the channel [16:27] gerred: anyone have a really good conceptual resource on writing and understanding evented code? that's the biggest barrier. [16:28] ysynopsis: i thought this was pretty good: http://yhoo.it/c6pid7 [16:29] gerred: oh cool. [16:29] scoates: http://github.com/scoates/node/commit/44e8ebeee95600d571e3d316db8df1147c4da828 [16:30] scoates: would be wonderful if you could pull that, ryah (-: [16:30] micheil: scoates: what's it fix / change? [16:30] scoates: (I didn't send a pull request because my clone is messed up) [16:30] micheil: (I would open, although, my browser's currently crashing., [16:30] scoates: micheil: it adds $ to the valid characters in a variable name in the REPL completer [16:31] dnolen has left the channel [16:31] scoates: $_ and some$thing are valid variable names, but they weren't matching [16:31] micheil: ah [16:31] dnolen has joined the channel [16:35] jashkenas has joined the channel [16:37] micheil: hey jeremy [16:38] micheil: or not. [16:49] oever has joined the channel [16:54] jameshome_ has joined the channel [16:55] adambeynon has joined the channel [16:57] langworthy has joined the channel [16:57] kuya has joined the channel [16:58] muk_mb has joined the channel [17:01] peritus- has joined the channel [17:02] benburkert has joined the channel [17:02] aconbere has joined the channel [17:02] rnewson has joined the channel [17:02] rnewson has joined the channel [17:07] xdamman has joined the channel [17:12] AAA_awright: user-agent': 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.63 Safari/534.3' [17:13] AAA_awright: Sooo.... which web browser is it? Firefox, Chrome, Safari? Make up your mind >_< [17:13] c4milo1 has joined the channel [17:17] bartt has joined the channel [17:20] mape: Chrome :) [17:22] boaz has joined the channel [17:23] dilvie: hi mape [17:23] mape: dilvie: ohai [17:23] cloudhead has joined the channel [17:26] ashb: AAA_awright: thats why you shouldn't do anything based on user-agent [17:26] ashb: since old legacy code detected thigns wrongly based on UA, browsers have to lie [17:27] AAA_awright: ashb: Yep :) [17:27] AAA_awright: Well, there is one appropriate use I can think of, banning abusive clients, particularly automated ones [17:28] ryan[WIN]: abusive automated clients tend to easily spoof themselves :) [17:28] AAA_awright: Misbehabing ones that don't respect caching headers, etc, it won't stop malicous clients of course [17:28] stephank has joined the channel [17:28] mape: I tend to use IE7 user agent for abusing things [17:28] AAA_awright: And yeah, of you are masking yourself as IE or something it won't help. [17:29] AAA_awright: ^ [17:29] dilvie: mape: LOL [17:29] AAA_awright: PHP sends its own UA header, for instance. [17:29] mikeal1 has joined the channel [17:31] mape: Surely that can be overwritten? [17:33] pquerna: its an ini setting [17:33] pquerna: but ye [17:35] V1 has joined the channel [17:42] AAA_awright: How many people change the default? I mean, besides myself. [17:44] k23z__ has joined the channel [17:47] zooko has joined the channel [17:48] pquerna: i think its porportional to how many people who care still use php :) [17:48] xla has joined the channel [17:54] eisd has joined the channel [17:55] Ari-Ugwu has joined the channel [17:56] ben_alman has joined the channel [17:56] timmywil has joined the channel [17:56] hellp has joined the channel [17:58] zooko` has joined the channel [17:59] steadicat has joined the channel [17:59] jpld has joined the channel [17:59] jpld has joined the channel [18:00] digitalspaghetti: v8: parseInt('3.2', 10) [18:00] v8bot: digitalspaghetti: 3 [18:02] jpld has joined the channel [18:04] jpld has joined the channel [18:04] jpld has joined the channel [18:05] daglees has joined the channel [18:05] daglees has joined the channel [18:08] xdamman has joined the channel [18:09] dbathurst has joined the channel [18:12] aubergine has joined the channel [18:15] jpld has joined the channel [18:17] overra has joined the channel [18:20] CIA-77: node: 03Sean Coates 07master * rae87007 10/ lib/repl.js : add $ to variable name character matching patterns in repl completer - http://bit.ly/97bwkz [18:23] luddep has joined the channel [18:23] kjeldahl has joined the channel [18:25] Ari-Ugwu: Any tips for getting Wheat to run on a host like Dreamhost? [18:25] Ari-Ugwu: 'npm wheat install' doesn't seem to do the trick. Wouldn't mind manually installing but...at a loss. [18:25] HAITI has joined the channel [18:25] HAITI: cheers! [18:26] digitalspaghetti: Don't use Dreamhost? [18:30] digitalspaghetti: v8: parseInt('three') [18:30] v8bot: digitalspaghetti: NaN [18:31] MikhX has joined the channel [18:33] zemanel has joined the channel [18:34] Druid_ has joined the channel [18:36] Ari-Ugwu: digitalspaghetti: i'll get right on that. [18:38] itissid has joined the channel [18:40] maushu: Hmm, need to parse some html. [18:40] maushu: Lets see if there is anything new about that. [18:44] jamescarr_: hmmmm... anyone replicating sessions across a cluster? [18:45] davidascher has joined the channel [18:47] jashkenas has joined the channel [18:50] dbathurst has joined the channel [18:50] _mythz has joined the channel [18:52] deepthawtz has joined the channel [18:53] jashkenas: yo. [18:54] micheil: howdy' [18:54] micheil: digitalspaghetti: hmm, I think on of tj's new libs may help you. i'm not sure [18:54] langworthy has joined the channel [18:56] hsuh has joined the channel [18:58] saikat has joined the channel [19:02] sudoer has joined the channel [19:04] admc has joined the channel [19:04] admc__ has joined the channel [19:04] admc_ has joined the channel [19:04] LFabien has joined the channel [19:05] jetienne has joined the channel [19:07] dachary has joined the channel [19:09] Yuffster has joined the channel [19:10] rauchg_ has joined the channel [19:12] JimBastard_ has joined the channel [19:13] bsstoner has joined the channel [19:16] digitalspaghetti: micheil: eh? [19:16] micheil: digitalspaghetti: I was thinking of lingo.js [19:16] CIA-77: node: 03Ryan Dahl 07master * rb5359e4 10/ (src/node_buffer.cc src/node_buffer.h): Warnings for new C++ buffer API - http://bit.ly/cb9ABw [19:16] micheil: turns out it wouldn't help you. [19:18] digitalspaghetti: yea, it's for couchdb saving, ExtJS is JSON POST as text, so when i do req.body.volume for exmaple, it's "3" not 3 [19:18] digitalspaghetti: so couchdb saves it as text, not a number [19:21] digitalspaghetti: actually i think i have to specifically set a numberfield rather than a textfield [19:21] micheil: digitalspaghetti: possibly. [19:23] gerred: is there a good list of standard events? stream, data, messageBegin, etc. [19:23] micheil: hmm, no. [19:24] programble has joined the channel [19:24] programble has joined the channel [19:25] gerred: or rather, a good way for me to find out what events say, an HTTP server is going to emit... [19:25] sonnym has joined the channel [19:25] spetrea-home has joined the channel [19:27] micheil: gerred: the source code for the latter. [19:27] gerred: yeah. [19:28] rra_ has joined the channel [19:29] halfhalo: Ugg, why the hell is perstore not wanting to cooperate [19:31] benburkert has joined the channel [19:33] sonnym has joined the channel [19:37] CIA-77: node: 03Ryan Dahl 07master * rd164989 10/ lib/sys.js : [19:37] CIA-77: node: Commas last in sys.inspect [19:37] CIA-77: node: Ugly? Yes. More readable by first time users? Yes. - http://bit.ly/cn9Def [19:37] aurynn: is Array.forEach part of node yet? :) [19:38] ryah: aurynn: that's v8 - yes [19:38] aurynn: Awesome. [19:38] aurynn: thank you :) [19:41] mr_daniel: I have a little code snippet and I don't understand the behavior: http://nopaste.info/0f40133ea1.html [19:41] mr_daniel: Ctrl+C kills a running script, but when I register one or more listeners on the SIGINT event of process. this default behavior seems to be overwritten. [19:41] mr_daniel: But the http://nodejs.org/api.html says: [19:41] mr_daniel: ...emitter.on(event, listener) Adds a listener to the end of the listeners array for the specified event... [19:41] mr_daniel: So what is happening behind the scenes? Isn't the kill-behavior a registered listener of process? How can I restore the default behavior? [19:42] aurynn: Woot [19:42] aurynn: ACTION is just about there [19:42] kriszyp_ has joined the channel [19:42] mr_daniel: btw: the behavior of the script http://nopaste.info/0f40133ea1.html that Ctrl+C will NOT kill the script, but the script continous to run [19:43] JimBastard: mr_daniel: you should process.exit [19:44] JimBastard: if you are catching that signal [19:44] JimBastard: right? [19:44] JimBastard: you overrode the signals handler [19:44] JimBastard: so its not gonna process.exit() anymore [19:45] mAritz has joined the channel [19:45] mr_daniel: JimBastard: I don't think I overwrote them [19:45] mr_daniel: because multiple listerners can listen on the same event [19:46] JimBastard: i dunno its my first day [19:46] mr_daniel: run for example this script: console.log( process.listeners('SIGINT') ); [19:46] CIA-77: node: 03Ryan Dahl 07master * r39b9043 10/ lib/sys.js : [19:46] CIA-77: node: Use readline.columns in sys.inspect when possible [19:46] CIA-77: node: Though, this should probably be an option to sys.inspect and be set by REPL. - http://bit.ly/bTTa93 [19:46] CIA-77: node: 03Ryan Dahl 07master * r783f501 10/ (lib/repl.js src/node.cc): Add flag to disable colors in REPL - http://bit.ly/ckODze [19:46] JimBastard: try adding process.exit(), it will exit [19:46] JimBastard: on that signal [19:46] mr_daniel: it will return an empty array [], but we all know that the 'default behavior' shoudl work [19:47] JimBastard: it returns nothing, because you havent added any handlers [19:47] JimBastard: gtg [19:50] aurynn: hm. Clearly I need to learn more about javascript inheritance. [19:59] ryah: what happened to announcer? [19:59] halfhalo: died in a fire? [20:00] banjiewen has joined the channel [20:05] rex_fernando has joined the channel [20:08] ossareh has joined the channel [20:08] Ori_P has joined the channel [20:09] Anti-X: maushu [20:11] Gruni has joined the channel [20:11] maushu: Wut. [20:11] Anti-X: read upwards [20:12] maushu: ACTION reads upwars. [20:12] maushu: Announcer? [20:12] Anti-X: totally! [20:12] maushu: ... ;_; [20:12] SubStack: yeah I miss announcer [20:13] Anti-X: where is that sum'bithc [20:13] SubStack: now how can I spam the channel with my stupid node twats [20:13] maushu: I've been busy. [20:13] Anti-X: we feel cut off from the world [20:13] Anti-X: when we can't get our regular tweets [20:13] SubStack: announcer is pretty much the only reason I use twitter at all [20:15] maushu: Huh, a system shutdown happened today. [20:15] digitalspaghetti: i use hootsuite and have a #nodejs and #node.js search it's very handy :D [20:15] Anti-X: we use announcer [20:16] dysinger has joined the channel [20:16] Anti-X: except when it's dead [20:16] maushu: Wait a sec, I'm looking for the phoenix down. [20:17] Anti-X: it's been gone for weeks tho [20:17] Anti-X: i think [20:17] c4milo has joined the channel [20:17] maushu: Yup, I've been really busy. [20:17] Anti-X: well it's a bot... you'd think it could live on its own! [20:17] maushu: I think a system shutdown happened 2 months ago and for some reason upstart didn't bring it up. [20:17] Anti-X: oh [20:18] Anti-X: 2 months! [20:18] c4milo has left the channel [20:18] prettyrobots has joined the channel [20:18] Anti-X: the horror [20:18] maushu: Well, more like 1 month and some days. [20:20] ukstv has joined the channel [20:21] sketchup has joined the channel [20:21] sketchup has joined the channel [20:21] maushu: Crap. Forgot the password. [20:24] technoweenie has joined the channel [20:25] rra_ has joined the channel [20:26] heavysixer has joined the channel [20:27] Anti-X: it's probably "babyjuice" [20:28] scoates: ryah: thanks for the pull [20:28] maushu: Error: ECONNRESET, Connection reset by peer [20:28] maushu: ... [20:28] Anti-X: man, this peer guy [20:29] _announcer has joined the channel [20:30] davidwalsh has joined the channel [20:30] maushu: announcer, clean the tubes [20:30] _announcer: Cleaning the tubes for great justice! [20:31] _announcer: Twitter: "Every time I'm on vimeo for node.js stuff I see ads from scientology #somethingswrong" -- Sleeptillseven. http://twitter.com/sleeptillseven/status/26874167907 [20:31] gerred: hmm...how are people currently handling this situation: using node.js to add websocket elements, but having the actual app handled by a framework written in another language (rails, codeigniter, sinatra, whatever) [20:32] SubStack: gerred: I've been using dnode on top of connect [20:33] SubStack: http://github.com/substack/dnode/tree/master/examples/connect/ [20:33] Anti-X: maushu, awesome thx! [20:33] gerred: hm okay [20:33] SubStack: gerred: also there is http://github.com/bnoguchi/Socket.IO-connect [20:34] SubStack: you can pretty much bolt on web sockets after-the-fact [20:34] gerred: ahh. [20:35] SubStack: although it depends a lot on how you want the app to work [20:35] SubStack: and whether you want to integrate persistent connections into site navigation type stuff [20:36] muhqu has joined the channel [20:36] gerred: right... [20:37] maushu: var div = dom[1].children[1].children[16]; [20:37] maushu: sys.puts(div.children[0].children[4].children[0].data); [20:37] maushu: Huh... yeah. [20:37] jesusabdullah: s/children/babbies/ :D [20:38] maushu: No, I don't want babies, I want a better way to explain the data I want. [20:38] maushu: Maybe apricot. [20:39] rauchg__ has joined the channel [20:39] _announcer: Twitter: "@psvensson Do you hang about in the #nodejs irc channel at all? Would be interested in having a chat about it" -- Tane Piper. http://twitter.com/tanepiper/status/26874679537 [20:39] scoates: maushu: Sizzle? Xpath? [20:39] ukstv has joined the channel [20:40] maushu: Something like that. [20:40] Anti-X: mebbe "gimme dataz!" [20:40] scoates: we have jQuery working with node, so I imagine Sizzle would work with little (additional) trouble. [20:41] maushu: Anti-X, I don't want to use that one. [20:41] _announcer: Twitter: "Cool #nodejs app http://scrabb.ly/ #svcc" -- clive boulton. http://twitter.com/iC/status/26874783665 [20:41] Anti-X: it's very easy [20:41] maushu: I'm tired of the var lolcat = require('lolcat'); [20:41] Anti-X: ok [20:42] maushu: Besides, using xpath or sizzle is pretty useless since the pages I want to parse aren't organized code wise. [20:42] maushu: Like this date I want to get is inside some tables, some divs and whatelse. None of them have classes or ids. [20:42] jesusabdullah: take(3*babbies(), NewYork).toLady.tooRest() [20:42] maushu: Well, xpath would work with the indexes. [20:43] digitalspaghetti: i want var bf = require('brainfuck') [20:43] digitalspaghetti: bf('+++-]]]-->>') [20:43] jesusabdullah: lolcat? [20:43] vandenoever: there's xpath for node.js? [20:43] Anti-X: i saw an article about a company that posted a job ad in c# code.. and i was thinking.. it wouldn't be a bad idea to also reply in c# code.. but then i thought.. what about writing an application and cv in code for a job ad that WASNT written in code to begin with? of course a programming job, otherwise that would be stupid... thoughts? :P [20:44] langworthy has joined the channel [20:44] jesusabdullah: digitalspaghetti: That'd be pretty sweet. Brainfuck is pretty simple, isn't it? Sounds almost like an afternoon [20:44] maushu: jesusabdullah, did it in 2 hours in haXe. [20:44] digitalspaghetti: jesusabdullah: never implemented it myself, and only had a play with it [20:44] jesusabdullah: maushu: Sweet [20:44] maushu: Pretty useless if you ask me since I suck at coding in brainfuck. [20:45] jesusabdullah: I'm no haxxor, but I bet it's not too terrible :) [20:45] jesusabdullah: Well, yeah [20:45] jesusabdullah: nobody actually *codes* in brainfuck [20:45] jesusabdullah: Actually, I knew a guy that did [20:45] jesusabdullah: from irc [20:45] jesusabdullah: frequents the haskell channel these days iirc [20:45] maushu: I've seen stuff coded in bf that didn't have the right to be coded in bf. [20:45] maushu: Like this text game. [20:45] digitalspaghetti: the annouce up there asking if the guy hangs about here, he's interested in doing a minecraft srver with nodejs [20:45] digitalspaghetti: which is what i've been thinking of doing :D [20:46] Anti-X: so you've said [20:46] Anti-X: but minecraft looked boring, no offense [20:46] digitalspaghetti: Anti-X: i thought that too.....at first [20:47] jesusabdullah: Minecraft is fucking awesome, dude [20:47] digitalspaghetti: and so has anyone else i talked to [20:47] digitalspaghetti: THEN, they play it [20:47] Anti-X: then they should learn how to sell it [20:47] Anti-X: better [20:47] jesusabdullah: Selling things is hard [20:47] jesusabdullah: (really!) [20:47] digitalspaghetti: the best thing notch did was not caring about piracy [20:47] digitalspaghetti: and that free weeknd [20:47] digitalspaghetti: it was because of the free weekend i bought it [20:48] Anti-X: and why does it cost money? [20:48] Anti-X: when it doesn't even look nice [20:48] Anti-X: never mind the gameplay [20:48] jesusabdullah: In the game, you can dig, explore, and make things. So, it has some components of Legos-like sandbox stuff, along with exploration and fighting [20:48] digitalspaghetti: Anti-X: the look nice thing is rubbish - sure the textures are lo-res, but the actual look is beautiful [20:48] jesusabdullah: So, it's really lots of fun, even if it looks less than amazing [20:48] _announcer: Twitter: "I wish something like GCD is close to the Erlang Process. I know Erlang. Then, node.js feel that close." [ja] -- 阿川 耕司 (AGAWA Koji). http://twitter.com/atty303/status/26875280576 [20:49] jesusabdullah: Yeah, climb to the top of a hill and look about. Gorgeous vistas :D [20:49] digitalspaghetti: when you walk around a mountain and see a giant cave with waterfalls and gaps with sunbeams it's just :D [20:49] jesusabdullah: Part of the aesthetic is to be playing on the voxel cube thing [20:49] jesusabdullah: so that's why a lot of people get :( with the graphics [20:49] jesusabdullah: I think [20:49] jesusabdullah: Though, I think he just hasn't updated them is all, instead concentrating on other aspects of the game [20:50] jesusabdullah: Like, boats :D [20:50] Anti-X: i watched the rollercoaster vid once and thought "this is crap" [20:50] digitalspaghetti: jesusabdullah: Painterly pack is probably going to become default anyway [20:50] jesusabdullah: Oh yeah, his roller coaster pack sucks [20:50] Anti-X: gimme a vid that shows the game the way it's supposed to be played [20:50] jesusabdullah: digitalspaghetti: painterly pack? I'm aware of the graphics packs, but not that one in particular [20:50] Anti-X: and under the rollercoaster it says: The game is a lot like that, [20:50] Anti-X: yeah nice sell [20:50] Anti-X: >_< [20:51] digitalspaghetti: http://painterlypack.net/ [20:51] _announcer: Twitter: "Very close to a working alpha of postgres.js for node.js. woot." -- ʍɐɥs uuʎɹnɐ. http://twitter.com/aurynn/status/26875433175 [20:51] jesusabdullah: http://www.youtube.com/watch?v=kwr79lPRrFI [20:51] jesusabdullah: Anti-X: ^^ [20:53] UHMA: i'm gonna have to check out minecraft now. someone else was talking about it yesterday [20:53] digitalspaghetti: infact, http://www.youtube.com/watch?v=58oP0WJn3BM [20:53] digitalspaghetti: ismuch better [20:53] UHMA: apparently it was made by 1 person in 3 months, is that true ? [20:53] digitalspaghetti: NCC 1701-A in Minecraft :D [20:53] Anti-X: lol @ square clouds [20:53] jesusabdullah: Oh yeah, that enterprise was fucking nuts [20:54] digitalspaghetti: the problem is watching videos is all well and good, but it doesn't give you the experience [20:54] digitalspaghetti: it's like instead of playing Civ V, watching someone's video of them playing it for hours [20:55] jesusabdullah: http://www.youtube.com/watch?v=LGkkyKZVzug Also BA [20:55] maushu: I love minecraft. [20:55] jesusabdullah: Yeah, that's definitely true digitalspaghetti [20:55] jesusabdullah: People have watched me play and said it looked boring [20:55] Anti-X: oh so it's a game engine more than a game? [20:55] jesusabdullah: meanwhile I'm like, "YEAH RAILROAD" [20:55] jesusabdullah: Naw, it's a game, but it's got a strong sandbox quality to it [20:56] jesusabdullah: Maybe like Gary's Mod? Not that I am really familiar with Gary's Mod, but I heard redstone took from that a little [20:56] Anti-X: and wtf, torches on the enterprise? [20:56] digitalspaghetti: jesusabdullah: yea i heard that too [20:56] jesusabdullah: the game currently has torches for lighting [20:56] jesusabdullah: Soon, torches will go out, and you'll have to build lamps instead [20:58] digitalspaghetti: oh my god this 16b ALU [20:58] digitalspaghetti: sperge-tastic [20:58] jesusabdullah: Man, the painterly pack is pretty sex [20:58] jesusabdullah: Yeah, that guy did an awesome job [20:59] _announcer: Twitter: "my server side language moved from php -> python / ruby -> node.js but still I believe php is an excellent server side language." -- Seung-jin Kim. http://twitter.com/seungjin/status/26875900606 [20:59] jesusabdullah: Hah [20:59] jesusabdullah: "excellent" [20:59] jesusabdullah: Excellent at BEING SHITTY [20:59] jesusabdullah: BURN [21:00] Anti-X: speaking of excellent [21:00] digitalspaghetti: Also Anti-X as a side point, now that notch has ~ 3.7m euros to burn he can probably afford to pay for a designer [21:00] Anti-X: bedtime [21:01] Anti-X: doubt it [21:01] Anti-X: a brand new ferrari costs a mill easy [21:02] Anti-X: or a koenigsegg [21:02] Anti-X: http://www.tuningnews.net/wallpaper/1024x768/koenigsegg_ccxr_special_edition-01.jpg [21:02] Anti-X: do wnt [21:02] digitalspaghetti: Yea, PHP is dead to me now jesusabdullah [21:03] digitalspaghetti: and python is starting to head that way, since i've pretty much re-written my django app in expressjs [21:03] digitalspaghetti: and in a hell of a lot less time and with fewer bugs [21:03] TooTallNate has joined the channel [21:04] Anti-X: and then the node api will be rewritten and you'll have to rewrite again [21:05] Anti-X: not that i think it will, but it could happen [21:05] Anti-X: nite [21:05] digitalspaghetti: as of 0.2 node API is 'stable'* [21:05] digitalspaghetti: oh he's gone [21:06] rra_ has joined the channel [21:08] vandenoever: "notch has ~ 3.7m euros to burn" there was some investment in node.js? [21:09] _announcer: Twitter: "@RolfKoenders Node.js?" -- Wim. http://twitter.com/dev10/status/26876554388 [21:10] _announcer: Twitter: "Node.js is actually the perfect basis for pure JavaScript webapps. Lightweight, fast and you can focus on a single language." -- Elias. http://twitter.com/saile/status/26876593147 [21:10] digitalspaghetti: vandenoever: no, minecraft [21:11] vandenoever: a java game? [21:12] jesusabdullah: Indeed [21:12] jesusabdullah: That's the one head-a-splode-y thing about it, I think [21:12] jesusabdullah: an amazing game written...in java?! [21:12] jesusabdullah: wat [21:12] _announcer: Twitter: "Soon will start to develop matuhin.com using node.js as a server-side programming language. Too bad that very few hosters support it :(" -- Nick. http://twitter.com/mafia_manager/status/26876751992 [21:14] Ned_ has joined the channel [21:14] Ned_: If I have a lib and I do a.bad.functionname, it throws an exception and I get a nice trace when my program dies. If I do throw 'error'; then I get no stack trace ? [21:14] Ned_: anyone know why that might be ? [21:15] _announcer: Twitter: "I think that #node.js will be the main trend in programming very soon. Maybe in 1-2 years. It's just so cool ! http://nodejs.org/api.html" -- Nick. http://twitter.com/mafia_manager/status/26876901135 [21:16] rex_fernando has joined the channel [21:18] SubStack: trends are frustrating [21:18] UHMA: minecraft looks worse than wolfenstein (1992) [21:19] SubStack: looks are easy to get past with interesting enough game dynamics [21:19] SubStack: although I haven't played this minecraft thing [21:19] Ned_: it seems that process.on('uncaughtException') can't actually catch errors thrown using "throw()" [21:19] Ned_: :-( [21:21] skampler: Ned_: throw new Error() [21:21] UHMA: i just bought it... it seems amazingly creative... but man, I can't believe the pixels lol... i guess that appealed to the indie game crowd though [21:21] Ned_: skampler: right, I'll try that ... thanks :-) [21:21] Ned_: skampler: magic :-), thanks [21:21] skampler: np [21:22] vandenoever: how can i validate an xml in node.js? i cannot find the right function in jsdom [21:24] digitalspaghetti: UHMA: install this [21:24] digitalspaghetti: http://painterlypack.net/ [21:24] jesusabdullah: SubStack: You'd better avoid minecraft. It'll kill your productivity! Can't be having that with hacking to do :( [21:24] jesusabdullah: Yeah, that painterly pack looks boss [21:25] digitalspaghetti: oh there is that problem :D [21:25] SubStack: jesusabdullah: at the same time, I get bored of games pretty quickly [21:25] c4milo has joined the channel [21:25] jesusabdullah: Yeah, there's that [21:25] jesusabdullah: In that case, save yout $13 for a few days of mochaccinos [21:25] jesusabdullah: :) [21:25] SubStack: yes sir! [21:25] jesusabdullah: Cause it's unfortunately nonfree [21:25] SubStack: chemicals are far more addictive than games could ever be [21:26] jesusabdullah: Though, I think he may open source it when it reaches the end of its lifespan [21:26] SubStack: stackvm is starting at that point and working backwards [21:28] rnewson has joined the channel [21:30] jesusabdullah: stackvm: Benjamin Button?? [21:31] SubStack: could be [21:32] jesusabdullah: aka [21:32] jesusabdullah: BRAD PITT [21:34] _announcer: Twitter: "#svcc so far I've seen presentations on html5 and node.js. Currently checking out webos/node/phonegap" -- dreamlogic.net. http://twitter.com/dreamlogicnet/status/26878051182 [21:37] UHMA: jesusabdullah: thanks, I'll check that out. I just got stuck in a cave, and realised I could dig my way out... but then water started flowing in... this game is actually awesome [21:37] bencc has joined the channel [21:39] micheil: cloudhead: ping. [21:40] Tprice has joined the channel [21:42] jpld has joined the channel [21:44] Eber has joined the channel [21:44] Eber: Does anyone knows if nodestream works well with other template engines besides jade? [21:45] admc__ has joined the channel [21:45] admc_ has joined the channel [21:45] admc has joined the channel [21:46] micheil: Eber: it may be possible to make it work for other engines, but it's designed for jade [21:46] Eber: micheil: I see! I guess I'll go with jade just to be safe ... :P [21:46] pengwynn has joined the channel [21:47] Me1000 has joined the channel [21:51] dgathright has joined the channel [21:53] _announcer: Twitter: "Node.js, Socket.io and redis - awesome tools. Built a small but cool prototype." -- Marco Kaiser. http://twitter.com/marco/status/26879165120 [21:55] rauchg_ has joined the channel [21:55] jpld has joined the channel [21:55] _announcer: Twitter: "http://markup.io <-- really slick nodejs app using Socket.IO, Connect, Express and Raphael to draw directly on websites, wicked stuff" -- Raphaël. http://twitter.com/RaphaelJS/status/26879287772 [21:56] scnd has joined the channel [21:57] DTrejo has joined the channel [21:58] _announcer: Twitter: "I swear testing in node.js is a bit of a joke. Of the frameworks I've tried, none actually work." -- Micheil Smith. http://twitter.com/miksago/status/26879471765 [21:58] DTrejo: Hey everyone, I'm at a hackathon and going to do some node.js stuff :) [21:59] DTrejo: Still in the brainstorm phase, so if anyone has an idea they find interesting, let me know [22:00] _announcer: Twitter: "Very nice slides about the @ # nodeJS emerleite http://slidesha.re/dBmagy" [pt] -- jaydson. http://twitter.com/jaydson/status/26879592840 [22:03] SubStack: !tweet @miksago expresso ftw [22:03] micheil: could just ping me? [22:03] ryah: yey, announcer is back [22:03] SubStack: oh that is you! [22:03] micheil: tried expresso, looking for something a bit more colourful in language [22:03] SubStack: i see how it is [22:04] SubStack: colors? [22:04] digitalspaghetti: micheil: write your own :p [22:04] SubStack: micheil: http://github.com/substack/node-optimist/blob/master/test/parse.js [22:05] digitalspaghetti: or port one of these: http://ejohn.org/blog/which-unit-testing-framework/ [22:05] SubStack: expresso works pretty well I think [22:05] SubStack: for me anyhow [22:05] micheil: digitalspaghetti: If people tell me I should write tests, then when I do get a chance to, and none of the frameworks work.. then, y'know. [22:05] SubStack: also it does code coverage and a bunch of crap that I rarely use [22:05] SubStack: just type 'expresso' in a dir with a test/ [22:05] micheil: I've been trying to get vows to work. it doesn't like something: http://gist.github.com/618648 [22:06] benburkert has joined the channel [22:06] sanduz2 has joined the channel [22:06] micheil: I can't work out why it doesn't work. I'm following everything in the documentation and examples. [22:07] davidascher has joined the channel [22:08] mr_daniel: Suppose I have a module util.js with the content 'exports = function(){return 5;}'. What is the semantic of 'exports = ...'? You can find an example here on line 16 http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/listener.js [22:08] mr_daniel: I only saw 'exports.foo = 3' or 'exports.bar = function(){...}', but never 'exports = ...' [22:08] micheil: it seems with vows, it doesn't like my connection Manager, which is the piece of code I'm trying to test. [22:08] micheil: module.exports = ... [22:09] micheil: not exports = ... [22:09] mr_daniel: wait a minute: 'module.exports.foo = 3' is the same as 'exports.foo = 3' [22:09] micheil: pretty much [22:09] micheil: iirc. [22:09] digitalspaghetti: mr_daniel: https://gist.github.com/296e1cea6fef1f2240b5 [22:09] digitalspaghetti: here is an example of what I do [22:10] digitalspaghetti: then i can do: [22:10] digitalspaghetti: var database = require('database') [22:10] digitalspaghetti: then I can do database.save(), database.db.foo, etc [22:11] ysynopsis has joined the channel [22:11] mr_daniel: seems like you are right micheil , there is a difference between 'exports' and 'module.exports'; I thought they are the same [22:12] mr_daniel: thanks for the paste digitalspaghetti , you mean line 128-134, right? [22:12] killfill has joined the channel [22:12] digitalspaghetti: well yea the whole thing [22:13] digitalspaghetti: if I did exports = {} I'd have to put it in a function and call it like: [22:13] digitalspaghetti: var database = require('database')() [22:13] jamesarosen has joined the channel [22:18] killfill has joined the channel [22:19] admc has joined the channel [22:20] _announcer: Twitter: "I lost 3 hours of my life for a problem of encoding with NodeJS (fs.write (<data>, 'binary'); FTW!)" [es] -- César D. Rodas. http://twitter.com/crodas/status/26880850875 [22:24] killfill has joined the channel [22:30] aconbere has joined the channel [22:31] podman405 has joined the channel [22:31] podman405: good evening [22:32] podman405: i'm trying to implement crc32 in nodejs and i think i'm running into an integer overflow probelm [22:33] saikat has joined the channel [22:34] _announcer: Twitter: "Hacking on some Node.js while waiting for the wife and kids to get home. Have no idea what I'm doing, but I'm making progress." -- Samuel Mullen. http://twitter.com/samullen/status/26881716708 [22:36] tyfighter has joined the channel [22:36] cloudhead has joined the channel [22:40] steadicat has joined the channel [22:41] mr_daniel: micheil + digitalspaghetti: maybe this is interesting for you too http://groups.google.com/group/commonjs/browse_thread/thread/e0d88d49bafeac41 seems like Node.js is not 100% standard conform with CommonJS spec [22:42] maushu: mr_daniel, nothing is. [22:42] SubStack: good [22:42] maushu: CommonJS is weird. [22:47] podman4051 has joined the channel [22:48] prettyrobots has joined the channel [22:48] amrnt has joined the channel [22:49] amrnt has left the channel [22:49] amrnt has joined the channel [22:50] dmcquay has joined the channel [22:51] jchris1 has joined the channel [22:53] mr_daniel has joined the channel [22:54] gf3 has joined the channel [22:57] davidascher has joined the channel [22:59] rex_fernando has joined the channel [23:03] Eber: Less vs. Sass... who wins? [23:07] stride: vapor.css [23:08] bsstoner has joined the channel [23:08] creationix has joined the channel [23:09] xAFFEE has joined the channel [23:10] mif86 has joined the channel [23:11] bruse: hmm [23:12] bruse: this is the only two lines of error text i get when running my small scraping script in node [23:12] bruse: /usr/local/lib/node/.npm/jsdom/0.1.6/package/lib/jsdom/level1/core.js:1050 throw new core.DOMException(INVALID_CHARACTER_ERR, 'Invalid character in [23:12] bruse: bah [23:12] bruse: there's a new line after core.js:1050 [23:12] _announcer: Twitter: "@ Kalsch there's a wrapper for geos node.js here http://github.com/paulsmith/geonode" [de] -- max ogden. http://twitter.com/maxogden/status/26884258894 [23:13] bruse: code: http://gist.github.com/618714 [23:13] JimBastard: DTrejo in the house [23:13] JimBastard: :-D [23:13] DTrejo: helloo [23:14] JimBastard: is anyone else at NYU today? [23:14] _announcer: Twitter: "@ Master linux Geddy based on nodejs is pretty good" [de] -- Jan Monschke. http://twitter.com/thedeftone/status/26884352182 [23:14] JimBastard: maushu: FINALLY [23:14] JimBastard: YOU CAME BACK [23:15] maushu: Wut. [23:15] maushu: I've been busy. [23:16] bruse: seems it only happens if i try to print this.textContent [23:16] zomgbie has joined the channel [23:16] bruse: actually, if i try to print '.\n' instead, the same happens [23:16] bruse: but if i dont print anything it runs [23:17] bruse: wait, my bad, it doesnt work for any of them [23:18] Eber: is anyone here using mongoose 1.0? can we use it already? [23:26] bsstoner has joined the channel [23:30] _announcer: Twitter: "Slides from my talk at #svcc this morning. http://creationix.com/intro-to-nodejs.pdf "Intro to node.js"" -- Tim Caswell. http://twitter.com/creationix/status/26885478728 [23:30] creationix: yay, announcer is back [23:33] creationix: considering I wrote those slides while listening to the talk before mine, I think they turned out pretty good. [23:33] Blackguard has joined the channel [23:35] _announcer: Twitter: "@dysinger I've had good experiences with underscore in both client side js and node.js programming. Having fun with functional.js tho." -- Grant Goodale. http://twitter.com/ggoodale/status/26885810519 [23:35] bjarkih has joined the channel [23:36] bjarkih: hello [23:36] zooko has joined the channel [23:36] aurynn has joined the channel [23:37] bjarkih: Is it possible to see socket data in firebug? [23:39] JimBastard_ has joined the channel [23:40] digitalspaghetti: creationix: i might be doing a 5 minute talk on nodejs on wednesday, mind if i steal some of your stuff? :D [23:41] creationix: go for it [23:41] digitalspaghetti: cool [23:42] SubStack: oh creationix I forked step to make it less confusing [23:43] creationix: SubStack: really, how so? [23:43] SubStack: like for instance now err is always the first arg, whether or not an error occurred [23:43] SubStack: just like how the rest of node does it [23:43] creationix: it was before [23:43] SubStack: negatory [23:43] creationix: what step were you using? [23:43] SubStack: it was setting the first arg to be the result from this() [23:43] SubStack: the master off your github [23:44] creationix: hmm, I don't believe it [23:44] SubStack: I'll make a gist, one sec [23:45] _announcer: Twitter: "The more alcohol I consume, the clearer asynchronous programming in node.js becomes. #nodejs" -- Justin Marney. http://twitter.com/vigemarn/status/26886461682 [23:45] creationix: SubStack: maybe the library you're using doesn't properly call the callback with an error first like it should? [23:46] _announcer: Twitter: "However, like all programming models, #nodejs has a Ballmer Peak. http://xkcd.com/323/" -- Justin Marney. http://twitter.com/vigemarn/status/26886548660 [23:46] _announcer: Twitter: "Solutions after you (root) executed "chmod-x chmod" http://goo.gl/znR7 / / see also node.js artifact!" [zh-CN] -- zzzcn. http://twitter.com/zzzcn/status/26886580504 [23:47] SubStack: oh this is why [23:47] SubStack: I was doing a lot with path.exists [23:47] jacobolus has joined the channel [23:47] SubStack: which has no error condition [23:47] creationix: that will break it [23:47] SubStack: what if something throws though? [23:47] SubStack: that should go to an arg [23:47] creationix: step wraps it in a try..catch [23:48] creationix: and forwards it to the first arg [23:48] prettyrobots_ has joined the channel [23:48] creationix: also it catches return values and forwards them to the second arg [23:48] xAFFEE has left the channel [23:48] SubStack: I see how it is now [23:48] SubStack: what is up with .parallel() though? [23:49] creationix: it any of the callbacks have an error, then it goes in the first arg [23:49] SubStack: yes but what about when the callbacks have more than one arg? [23:49] creationix: if there are two errors, you only get the last one (or first one, I'm not sure) [23:49] creationix: if they have more than one data arg, then you can't use parallel or group [23:50] davidascher has joined the channel [23:50] creationix: It's about time to take another crack at a step-like library [23:50] creationix: I haven't touched it since July [23:50] creationix: it's simple and works [23:50] creationix: but there must be something better [23:51] SubStack: I think a nicer way would be to call the next function with an argument array for each .parallel() [23:51] AAA_awright: Haha at http://goo.gl/znR7 [23:51] SubStack: that's what my fork does [23:51] SubStack: even though the error commits aren't so great [23:52] creationix: I thought about that, but then it's harder to use for 90% of the cases [23:52] micheil: wow, github moves really quickly now. [23:52] micheil: like, 1000 or so changes in like, 2 minutes. [23:53] bartt has joined the channel [23:55] creationix: AAA_awright: I would have been the last guy [23:55] DTrejo: hello everyone [23:55] DTrejo: I am trying to deploy a sample socket.io chat app to no.de, but it gives me this: "No submodule mapping found in .gitmodules for path 'lib/socket.io' [23:55] DTrejo: " [23:56] DTrejo: any joyent reps around? [23:56] Tim_Smart has joined the channel [23:56] DTrejo: or anyone with no.de experience here? [23:56] JimBastard: i know a little something [23:56] DTrejo: Tim_Smart: I think I saw you talking about this problem before? "No submodule mapping found in .gitmodules for path 'lib/socket.io'" [23:56] JimBastard: you push and it goes [23:56] JimBastard: oofa [23:56] JimBastard: did you configure npm on the box? [23:56] DTrejo: when i visit the url, my app is not deployed [23:56] DTrejo: yes, npm works [23:57] JimBastard: npm install socketio didnt do it? [23:57] AAA_awright: creationix: :) I liked /lib/ld [23:57] DTrejo: I did a git clone --recursive to get the latest socket.io, because the npm version is old [23:57] JimBastard: or whatever it is [23:57] creationix: AAA_awright: I don't get that one [23:57] JimBastard: rauchg_: you know about this [23:57] Tim_Smart: DTrejo: no.de usually runs git submodule update --init -- recursive [23:57] Tim_Smart: DTrejo: Might be better to ask in #joyent [23:57] MikhX has joined the channel [23:57] DTrejo: I deleted the .git s in the submodules becuase I thought that might fix it, but it didn't work [23:58] DTrejo: Tim_Smart: thank you [23:58] AAA_awright: creationix: It's a core executable handler thing [23:58] creationix: ahh [23:58] creationix: still, how breaking chmod doesn't break a server, unless you want to later chmod something of course [23:59] AAA_awright: Ah, creationix: It will load a shared object, but if you call ld by itself and supply a regular ELF executable as the argument it does pretty much the same thing, and runs the file as an executable [23:59] AAA_awright: It's a hack, I had no clue that would work