[00:00] saschagehlich has joined the channel [00:00] rabc has joined the channel [00:01] rabc: someone can help me? I'm trying to make my class an EventEmitter [00:01] rabc: (class == module) [00:01] sholmes has joined the channel [00:02] brianc: aurynn: I gotta jet -- let's discuss more next time we both online. in the mean time -- happy coding [00:02] gryzzly_: tjholowaychuk: do I need to require all the same things that were required in app.js in test/app.test.js ? it's kind of the only thing that worked for me. working with required modules like this: app.Document returns "undefined". Is there something I might be doing wrong? Or is it really required to "import" all the things twice? [00:02] aurynn: brianc, talk to you soon! [00:02] tjholowaychuk: gryzzly_: export.app = app [00:02] tjholowaychuk: thats it [00:04] rabc: to make my module able to emit events, I just need to MyModule.prototype = new EventEmitter(); ? [00:05] rauchg_: rabc: or MyModule.prototype.__proto__ = EventEmitter.prototype; [00:06] rabc: my module keep saying the error 'Object # has no method 'emit'" [00:06] rabc: anyone knows what's wrong? [00:07] hornairs has joined the channel [00:07] Wizek: Does anyone know why do I get this error (https://gist.github.com/790678) when trying to build Node o Cygwin? [00:08] jpld has joined the channel [00:08] gryzzly_: :tjholowaychuk thanks again [00:08] tjholowaychuk: np [00:09] elliottcable: I’m extremely disappointed that I somehow missed the boat on NodeConf. ;_; [00:10] elliottcable: Doesn’t the fact that there’S a huge rant by me on the very first day of the #Node.js channel logs get me in? :D [00:10] rauchg_ has joined the channel [00:11] DTrejo has joined the channel [00:11] rabc: to make my module able to emit events, I just need to MyModule.prototype = new EventEmitter(); ? [00:12] sholmes: rabc, have you tried exports.prototype = new EventEmitter()? [00:13] rabc: sholmes: hmm.. no, let me see [00:14] yhahn has left the channel [00:14] rabc: sholmes: same error :( [00:15] hzin has joined the channel [00:17] sholmes: rabc, which error? [00:17] rabc: sholmes: Object # has no method 'emit' [00:17] brianleroux has joined the channel [00:17] rabc: that's what I'm trying: [00:17] rabc: MyModule.prototype = new EventEmitter(); [00:17] sholmes: rabc: pastebin them [00:17] rabc: and inside my module: EventEmitter.call(this); [00:18] rabc: good idead [00:18] rabc: good idea [00:19] tjholowaychuk: rabc: are you confusing a constructor with a module? function Foo(){} is not a module [00:19] tjholowaychuk: its a function [00:20] djacobs7 has joined the channel [00:21] rabc: here what I'm trying (just a part of the module) http://pastebin.com/LkrBYNzV [00:23] tanepiper: you could use util.inherits [00:24] tanepiper: var Foo = function() {}; var EventEmitter = require('events').EventEmitter; var util = require('util'); util.inherits(Foo, EventEmitter); Foo.emit('foo', 'bar'); [00:25] isaacs: nice. just got `sudo npm install pcap` that runs all scripts as "nobody", and leaves the package dir owned by "nobody" [00:26] isaacs: there is light at the end of the sudon't tunnel [00:27] rabc: hmm.. let me see using inherits [00:27] podman: so, in case anyone was wondering, mongohq did the trick [00:27] Aria: Sweet! [00:27] rabc: does that work on node.js 0.2.6 ? [00:28] pyrotechnick has joined the channel [00:29] pyrotechnick: can somebody please explain concisely what it means when people say uneven minor versions of node are unstable [00:29] tanepiper: rabc: yes, but it's not documented [00:29] markstory has joined the channel [00:29] tanepiper: pyrotechnick: 0.1/0.3/0.5 unstable [00:29] pyrotechnick: what does that mean exactly [00:29] tanepiper: 0.2/0.4/0.6 stable [00:29] tanepiper: no API changes in stable [00:30] isaacs: Aria: yeah, it's pretty nice [00:30] pyrotechnick: so 0.2.1 and 0.2.2 do not contain API changes [00:30] pyrotechnick: but 0.3.1 and 0.3.2 do [00:30] pyrotechnick: correct? [00:30] tanepiper: so you won't suddenly find thisMethod is now thatMethod in stable [00:30] pyrotechnick: ok [00:30] pyrotechnick: thankyou very much [00:30] isaacs: Aria: i need to yank out an ugly hackaround and just require that you have a version of node that lets you specify a uid/gid to child_process.spawn [00:30] tanepiper: but in 0.3.x it can happen at any time [00:31] tanepiper: and already has, new http module is backwards compatible but also has big changes for 0.4 [00:31] isaacs: pyrotechnick: it's more than just api changes. the binary interface is consistent in 0.2.x [00:31] rabc: tanepiper: same error "Object # has no method 'emit'" :/ [00:31] jashkenas: Unfortunately, in practice, you have to support both, if you're doing a library... [00:32] isaacs: pyrotechnick: in theory, you shouldn't even have to rebuild .node addons in 0.2. [00:32] kiddphunk_ has joined the channel [00:32] tylerstalder has joined the channel [00:33] mikeal has joined the channel [00:33] Figaroo has joined the channel [00:33] dnolen has joined the channel [00:34] Figaroo: rabc, why do you do module.export instead of just export? [00:34] sprout has joined the channel [00:35] rabc: Figaroo: I tried the both ways (usually I use exports.MyModule = MyModule) [00:35] saikat has joined the channel [00:35] clvv: hello people, I have a question: I'm writing a node.js module, and I split my code in to multiple files by functionality, but the problem is that I found my self requiring sys, util, fs a lot in different files, is there a way to share the same node standard modules across different files? thanks in advance! [00:35] Figaroo: rabc, module.exports works too? [00:36] tjholowaychuk: clvv: not really, you just deal with the verbosity :) [00:36] mexitek has joined the channel [00:36] clvv: but will there be memory overhead? or should I just put everything in one file? [00:37] pyrotechnick: clvv: no [00:37] pyrotechnick: clvv: split them up, requires are shared [00:37] pyrotechnick: it's part of the standard that they're shared [00:37] rabc: Figaroo: I saw some modules using that, but I never used that for real, just some tests. [00:37] tjholowaychuk: clvv: no lol dont be paranoid :p they are cached, but even if they were not, no reason to be paranoid [00:37] DTrejo_ has joined the channel [00:37] pyrotechnick: you can safely alter a required module [00:37] clvv: thanks a lot! [00:37] pyrotechnick: and access that alteration from another file [00:37] pyrotechnick: that's how commonjs was defined [00:38] clvv: got it, thanks again :) [00:38] pyrotechnick: it's a bit hacky so try not to do it [00:38] Figaroo: rabc: maybe it's old API [00:38] pyrotechnick: but you can safely assume requiring all over your app wont consume large amounts of memory [00:38] pyrotechnick: there may be edge cases where you're right [00:38] pyrotechnick: but generally [00:38] pyrotechnick: it's not the case [00:39] pyrotechnick: make node work hard not yourself [00:39] clvv: But I wrote a little test that require some files that simply just require fs, sys, util and the memory does increase as the number of required files increase [00:39] pyrotechnick: yep [00:39] pyrotechnick: but it wont double [00:39] Me1000 has joined the channel [00:39] clvv: make sense [00:40] pyrotechnick: basically what you're seeing are the objects created by the require facility of node [00:40] pyrotechnick: wont be very large [00:40] pyrotechnick: some strings and numbers [00:40] pyrotechnick: they'll be GCd eventually [00:41] clvv: yes, I can see the memory will drop [00:42] papandreou has joined the channel [00:43] blueadept has joined the channel [00:43] blueadept has joined the channel [00:43] rabc: asked at nodejs google group, thanks everyone who tried to help me [00:43] papandreou: mikeal: Hi, I'm working on some fixes for your request library, can I ask you a couple of questions? [00:44] RichardJ has joined the channel [00:44] mikeal: sure [00:46] papandreou: mikeal: Content-Length gets wrong when options.body is a string with non-ascii chars. The obvious fix is to use Buffer.byteLength(options.body) instead of options.body.length, but I was wondering if it was even supposed to support utf8 strings? [00:46] kevwil has joined the channel [00:46] papandreou: mikeal: Because that would also require a change to the options.request.write call [00:47] konobi: it's just a string of bytes regardless of wether it's ascii or utf8... Content-Type is what marks it as utf-8 [00:47] konobi: s/string/series/ [00:47] mikeal: hrm.... [00:47] mikeal: how about [00:47] mikeal: body = new Buffer(body) [00:47] papandreou: konobi: Not quite that simple :) [00:47] mikeal: then use that for the length and for the write [00:48] mikeal: papandreou: why byteLength instead of just .length? [00:48] aaronblohowiak has joined the channel [00:48] sudoer has joined the channel [00:49] papandreou: mikeal: .length is the length in characters, so "\u263a".length is 1, but it's 3 bytes when serialized to utf8, which is what matters for the content-type header. [00:49] konobi: papandreou: not for a Buffer though [00:49] papandreou: mikeal: (That's a unicode smiley face btw.) [00:50] konobi: String.byteLength vs Buffer.length [00:50] joelklabo has joined the channel [00:50] papandreou: konobi: Yeah, that's why I'm asking. Is options.body supposed to be a "binary string", a string containing >255 codepoints, or must it be a buffer? [00:50] konobi: (assuming the body is in a buffer of course) [00:51] papandreou: You can't tell from the code, but if I do request({url: ..., body: "\u263a"}) then the http client truncates the body to one byte. [00:52] papandreou: mikeal: What if options.body is a buffer already? Should that be supported also? [00:52] mikeal: good call [00:53] papandreou: mikeal: So something like: if ('body' in options && !Buffer.isBuffer(options.body)) options.body = new Buffer(options.body); [00:53] mikeal: is byteLength an attribute or a function? [00:53] papandreou: mikeal: function [00:53] mikeal: options.body = options.body.byteLength !== undefined ? options.body : new Buffer(options.body); [00:54] papandreou: mikeal: It's a helper function on the global Buffer object: Buffer.byteLength [00:54] papandreou: mikeal: And it takes a string just to complete the confusion :) [00:55] mikeal: options.body = Buffer.isBuffer(options.body) ? options.body : new Buffer(options.body); [00:55] mikeal: options.headers['content-length'] = Buffer.byteLength(options.body); [00:55] mikeal: it can't take a buffer? [00:55] mikeal: that is fucked up [00:55] halfhalo has joined the channel [00:55] daveyjoe_ has joined the channel [00:55] mikeal: ok [00:55] mikeal: options.headers['content-length'] = Buffer.byteLength(options.body.toString()); [00:55] mikeal: options.body = Buffer.isBuffer(options.body) ? options.body : new Buffer(options.body); [00:55] halfhalo has joined the channel [00:55] mikeal: that looks right [00:56] papandreou: mikeal: It kinda makes sense, if you already have a buffer, you can just check its length attribute to get the byte length. [00:56] mikeal: ok, that's what i thought [00:56] mikeal: options.body = Buffer.isBuffer(options.body) ? options.body : new Buffer(options.body); [00:56] mikeal: options.headers['content-length'] = options.body.length; [00:56] ron_frown has joined the channel [00:56] papandreou: mikeal: So making sure that options.body is a Buffer early on is clearly a good call. [00:56] mikeal: yeah [00:56] mikeal: and it's not any extra overhead since it has to become one eventually anyway [00:58] DTrejo has joined the channel [00:58] mikeal: papandreou: pushed [00:58] mikeal: can you test it on master and then I'll push a bugfix release [00:58] Kevin_ has joined the channel [00:59] papandreou: mikeal: Sure, one moment [00:59] konobi: mikeal: lemme know when that goes out, we use request in some of our stuff [01:00] mikeal: i pushed a new version like an hour ago [01:00] mikeal: 1.0.0 [01:00] konobi: we care about unicode too =0) [01:00] mikeal: 1.0.0 also has an encoding option now [01:01] mikeal: so i don't break binary encoding during concatenation if you specify the binary type [01:03] creationix has joined the channel [01:05] creationix: what's the latest node version that compiles on windows? [01:05] davidascher has joined the channel [01:05] creationix: with cygwin in fine [01:05] Wizek has joined the channel [01:05] creationix: I found this site, which seems reasonable up to data http://node-js.prcn.co.cc/ [01:06] brianleroux has joined the channel [01:07] papandreou: mikeal: Eh, now it doesn't work at all, I get a broken pipe when making any request involving a body. Whoops. [01:09] severla has joined the channel [01:09] peol has joined the channel [01:10] konobi: papandreou: request.write(chunk, encoding='utf8') .... The chunk argument should be an array of integers or a string. [01:12] bbttxu has joined the channel [01:13] papandreou: konobi: I had my eyes on that, too. But a Buffer is basically an array of integers, so it ought to work, right? [01:13] bbttxu has left the channel [01:13] konobi: internally it's a C++ object [01:14] konobi: papandreou: might need to do buffer.toString() then [01:15] keyvan has joined the channel [01:15] papandreou: konobi: The docs (0.2.6) for writable streams says that stream.write(buffer) is perfectly valid too. [01:15] eee_c has joined the channel [01:15] ezmobius_ has joined the channel [01:15] papandreou: konobi: That would seem like an awful lot of wasted work to convert to buffer, then back to string, wouldn't it? [01:15] Fuld: Are the arguments that node.js shouldn't be used in production overblown now? [01:16] konobi: papandreou: it's a http.ClientRequest though, right? [01:16] Fuld: I want to use node.js + socket.io in production [01:17] papandreou: konobi: Yeah, but that's a writable stream too (stated explicitly in the docs). [01:17] papandreou: konobi: Wouldn't make any sense for it not to accept a buffer. [01:17] creationix has left the channel [01:18] daveyjoe_: How do I view all currently installed npm packages? [01:18] isaacs: daveyjoe_: npm ls installed [01:18] isaacs: daveyjoe_: note: there's an "npm faq" that lists out most of the things you're probably going to ask over the next few days. [01:18] isaacs: ;P [01:19] konobi: papandreou: but for chunking, doesn't need to do some interpretation of that data [01:19] Fuld: Can anyone tell me what happens when you try to send a message to the client via socket.io while the client is disconnected? Does it fail and make you try later, or does socket.io save your message in queue and remit it to the client when it reconnects? [01:19] daveyjoe_: isaccs: Ta [01:19] tanepiper: isaacs: that question has come up more than once tonight, and myself i didn't know that - maybe `npm installed` alias? :) [01:19] papandreou: konobi: Say again? [01:20] isaacs: tanepiper: nah. i mean, it's the same as rubygems, rightr? [01:20] isaacs: you do `gem list installed` to seethem. `npm list installed` is the same thing [01:20] konobi: request.write() is used to send chunks (ie: chunked transfer encoding) [01:21] isaacs: oh, no, it's just `gem list` to see installed ones [01:21] konobi: I might be misreading the code though... =0/ [01:21] hackeron has joined the channel [01:21] tanepiper: although yea, i should probably check the faq again isaacs it's been a while :) [01:21] Fuld: Say socket.io falls back to HTTP polling [01:21] tanepiper: ANYWAY, bed time for me [01:22] isaacs: turns out that one isn't on the faq. adding it now :) [01:22] galeal has joined the channel [01:22] papandreou: konobi: Yeah, it is. At that abstraction level it's just a bunch of bytes (you're assumed to have utf8-decoded it at that point), so a Buffer of raw bytes is ideal for it to work on. [01:23] bingomanatee: Are there any good functions for sorting array members by a property? [01:23] galeal: bingomanatee: underscore has that. [01:24] konobi: papandreou: yup... but it looks that the abstraction there doesn't take buffers into account [01:24] bingomanatee: cool. [01:24] bingomanatee: is that in git or node core? [01:24] galeal: http://documentcloud.github.com/underscore/ [01:24] cronopio has joined the channel [01:26] papandreou: konobi: But it wouldn't make any sense if it didn't. This is exactly what buffers are for. I have a project where I stream uploaded images directly to CouchDB, and clientRequest.write(buffer) works in that situation. [01:26] jakehow has joined the channel [01:27] cronopio has joined the channel [01:29] konobi: papandreou: huh... odd [01:30] papandreou: konobi: Eh, whoops, it looks like it actually does work perfectly as it is. I had added some test code in the server part of my experiment that sometimes ignored the request body. Stupid me. [01:30] bingomanatee: any caveats for using underscore with node? [01:30] papandreou: bingomanatee: No, only benefits, I use it all the time :) [01:31] konobi: papandreou: heh, yeah just checked the node source and it does take buffers into account... the docs just don't state that it can [01:31] papandreou: konobi: So everything is back to making sense again, at least for me :) [01:32] konobi: heh [01:32] lukegalea: bingomanatee: Nope, I use it for all my node stuff. Works great. Just var _ = require('underscore'); [01:33] mfernest has joined the channel [01:35] CIA-89: node: 03Ryan Dahl 07master * r7dfbccf 10/ test/simple/test-https-agent.js : Add test-https-agent - http://bit.ly/hwdj07 [01:36] brianler_ has joined the channel [01:36] bingomanatee: sweet. [01:39] isaacs: Aria: hey, you around? [01:39] tokumine has joined the channel [01:39] Jaye has joined the channel [01:40] wilee60 has joined the channel [01:40] CIA-89: node: 03Ryan Dahl 07master * r4612b07 10/ lib/http.js : [01:40] CIA-89: node: Fix test-http-allow-req-after-204-res [01:40] CIA-89: node: Agent queue waits for connecting sockets. - http://bit.ly/h6GbPZ [01:41] tapwater has joined the channel [01:43] sprout has joined the channel [01:44] lukegalea has joined the channel [01:45] Kevin9 has joined the channel [01:46] kevwil has joined the channel [01:47] wilee60 has left the channel [01:48] JusticeFries_ has joined the channel [01:49] kevwil has joined the channel [01:49] wakawaka has joined the channel [01:49] CIA-89: node: 03Ryan Dahl 07master * r76afea9 10/ lib/http.js : [01:49] CIA-89: node: Fix test-http-exceptions [01:49] CIA-89: node: Agent: Each time an http req is sent to a socket, _cycle to try to dispatch [01:49] CIA-89: node: another. Problem became apparent in 4612b0 when we wait for connecting [01:49] CIA-89: node: sockets. - http://bit.ly/g1mdzr [01:50] wakawaka: hi all, where do you guys install node on ubuntu? home directory, project directory, etc.? [01:50] ryah_: wakawaka: home directory [01:51] wakawaka: cool thanks [01:51] wakawaka: ryah_: why home? [01:53] Aria: isaacs: I am! [01:53] isaacs: hey [01:53] isaacs: so... [01:53] isaacs: root/.npm/.cache/name/ver/* [01:53] isaacs: that stuff [01:53] isaacs: owned by "nobody", or "operator" [01:53] markstory has joined the channel [01:54] isaacs: where "operator" == $SUDO_USER, ie, "isaacs" or "aredridel" or whowever. [01:54] Aria: Hm. [01:54] Aria: Why leave it owned by a user? [01:54] Aria: And not root? [01:55] lukegalea has joined the channel [01:55] isaacs: well, mostly because then you *must* be root to clean out the cache, and since that's used to backup registry data, you end up having to be root to just do `npm view whatever` [01:55] isaacs: otherwise it can't do the etag dances properly [01:55] ryah_: please test ry/master on macintosh if you can [01:55] isaacs: i suppose i could have it root-owned and 0666? [01:56] jetheredge has left the channel [01:56] isaacs: ryah_: cooing now. [01:56] isaacs: *cooking [01:56] bingomanatee has joined the channel [01:56] isaacs: (i'm not making any pigeon noises) [01:56] isaacs: yikes. lotta -'es [01:56] masahiroh has joined the channel [01:56] isaacs: oh, wait, nvm [01:56] ryah_: cooking node or cooking food? [01:56] isaacs: cooking node [01:56] isaacs: [00:40|% 100|+ 164|- 0]: Done [01:57] isaacs: i was thinking the % was "+" and the "+" was "-" [01:57] ryah_: can you do make test-all ? [01:57] isaacs: ryah_: running... [02:00] SubStack: this _ify stuff looks nifty [02:00] SubStack: ACTION considers hacking it into seq's partial application thing [02:01] ryah_: ACTION hopes the beast builds out of the box on solaris. i hate porting... [02:02] ryah_: the beast = node [02:02] isaacs: SubStack: glad you enjoy it. [02:03] isaacs: SubStack: i've never acutally used it for anything ever. [02:03] isaacs: SubStack: it was purely "saturday is functional programming day!" kind of project. [02:04] SubStack: hah I have lots of projects like that too [02:04] SubStack: I'm thinking something like Seq._ would be sweet though [02:04] SubStack: right now the partial function application thing checks the args for === Seq and swaps in `this` at runtime [02:05] SubStack: but the arguments are sometimes in the wrong order for it to be very useful [02:05] isaacs: SubStack: the awesome thing about _ify is that you can specify the args in reverse [02:06] isaacs: f._(_, _, _, 4)(_, _, 3)(_, 2)(1) [02:06] isaacs: ==> f(1,2,3,4) [02:06] isaacs: or even: f._(___, 4)(___, 3)(___, 2)(1) [02:06] SubStack: that's like composing with the compose operator in haskell [02:06] isaacs: yeah [02:06] isaacs: the goal was to be operator-like [02:06] isaacs: hence the weird single-char [02:07] isaacs: i read some blog post about haskell and why it was awesome, and then added what the author was saying was awesome about haskell, and then NEVER EVER USED IT FOR ANYTHING EVER. [02:07] isaacs: Just like Haskell. [02:07] isaacs: ok, dinner time. ry: [06:33|% 100|+ 356|- 0]: Done [02:09] richcollins has joined the channel [02:09] mfernest: Haskell is awesome [02:09] lukegalea has joined the channel [02:10] Bosmon has joined the channel [02:11] philipharrison has joined the channel [02:12] ossareh has joined the channel [02:12] ryah_: ACTION cuts the dist. [02:22] perlmonkey2 has joined the channel [02:24] lukegalea has joined the channel [02:24] lukegalea: eek. sorry, lost connection. [02:25] Evet: np [02:25] tilgovi has joined the channel [02:26] CIA-89: node: 03Ryan Dahl 07master * r6703a7f 10/ (doc/api/_toc.markdown doc/api/all.markdown): Add https docs to toc - http://bit.ly/hxxWkG [02:26] CIA-89: node: 03Ryan Dahl 07master * rbb3e714 10/ (ChangeLog doc/index.html src/node_version.h): Bump version to v0.3.6 - http://bit.ly/ezM9r0 [02:27] CIA-89: node: 03Ryan Dahl 07master * r7892918 10/ src/node_version.h : Now working on v0.3.7 - http://bit.ly/f9BmN9 [02:30] DTrejo_ has joined the channel [02:31] pquerna: ryah_: good post eh [02:39] lukegalea has joined the channel [02:42] isaacs has joined the channel [02:47] DTrejo has joined the channel [02:51] lukegalea has joined the channel [02:51] perlmonkey2: nice, https server [02:52] SubStack: https client, I'm more stoked about [02:52] davidascher has joined the channel [02:54] sivy has joined the channel [02:54] perlmonkey2: SubStack: client? why? [02:54] SubStack: so I can automate some tests [02:54] perlmonkey2: a webserver that can't handle ssl connections is kind of gimped. [02:54] Fuld: Does node.js scale better than FastCGI and C? [02:55] SubStack: https servers have been possible for a while [02:55] bingomanatee: Hi SubStack [02:55] SubStack: a bit less clunky now [02:55] perlmonkey2: Fuld: some rough tests on my laptop show node.js being amazingly scalable. [02:55] SubStack: bingomanatee: oh hello [02:55] bingomanatee: Have any good ideas for the first node.js.sfbay meet? [02:56] bingomanatee: I was thinking wet t-shirt contest, only with laptops [02:56] Fuld: lol [02:56] tim_smart: Fuld: Depends how good the code is [02:57] tim_smart: But generally, good node won't out-scale good C [02:57] Fuld: hmm [02:57] SubStack: good C is impossible [02:57] tim_smart: SubStack: Good assembly? [02:57] tim_smart: :p [02:57] bingomanatee: But seriously - if anyone wants to present for the meeting please let me know. [02:57] SubStack: bingomanatee: feb 3rd right? [02:57] bingomanatee: SubStack did a great preso for the last show. [02:57] bingomanatee: yeah. [02:58] tfe_ has joined the channel [02:58] Fuld: bingomanatee: Let's play Capture The Node [02:58] bingomanatee: for instance a hands on with dNode would be fun. [02:58] SubStack: hmmm! [02:58] SubStack: an interactive thing might be fun [02:58] SubStack: audience participation! [02:58] bingomanatee: yeah [02:58] bingomanatee: maybe give them a basic express stack with some sort of simple dom game [02:59] Fuld: bingomanatee: Don't forget NYCers :( [02:59] bingomanatee: I'm not forgetting you I just don't have the technology. My best advice - DIY [02:59] tapwater has joined the channel [02:59] bingomanatee: but at the least I'll dump whatever source we use online. [02:59] Fuld: cool [03:00] bingomanatee: Yeah but if anyone wants to play videographer that would be sweet. [03:00] perlmonkey2: hah, I want to see the website written in C. I'm sure it will be fast, it will just take 400 years to write. [03:00] davidascher has joined the channel [03:00] bingomanatee: yeah but assembly.com still rules. [03:00] rjrodger has joined the channel [03:01] bingomanatee: And technically Facebook is written in C - if hiphop-generated C [03:01] SubStack: bingomanatee: I could hack some on hexhack, a dnode-based mud [03:01] bingomanatee: That would be sweet. [03:01] Fuld: perlmonkey2: zeroconf.org is C [03:01] SubStack: that might be a good hands-on demo [03:01] bingomanatee: I remember that from the camp. [03:01] bingomanatee: Just make sure we have good documentation [03:01] bingomanatee: is it dNode based? [03:01] SubStack: yes [03:01] bingomanatee: awesome. [03:01] josephhitchens has joined the channel [03:02] kawaz_air has joined the channel [03:02] SubStack: http://github.com/substack/hexhack-server and http://github.com/substack/hexhack-client [03:02] bingomanatee: Yeah - if you can put good documentation up on the meetup.com site and put a link to the git there I'd really appreciate it. [03:02] SubStack: just stubs right now [03:02] bingomanatee: awesome. [03:02] bingomanatee: okay [03:02] bingomanatee: If you can get it working by the 3rd I'll introduce it on the meetup site. [03:02] SubStack: I think it would be fun especially if there's drinking involved [03:02] SubStack: ok [03:02] bingomanatee: definately. [03:03] DTrejo has joined the channel [03:03] bingomanatee: And anyone else who can get someting done in a month or so two big events are coming up. [03:04] bingomanatee: Ryan is in negotiation with the PHP meetup to present there [03:04] bingomanatee: and I plan to have another event in another month (c. March 3) [03:05] Fuld: SubStack: Have you run into any show-stoppers using node.js in production? The hackernews folks seem to denigrating it as a production event framework [03:05] bingomanatee: Possibly less as there is another node.js group and we plan to run cooperatively. [03:06] tfe__ has joined the channel [03:07] losingle has joined the channel [03:07] breccan has joined the channel [03:08] SubStack: Fuld: nothing that is node's fault [03:08] Fuld: cool [03:08] Yuffster has joined the channel [03:08] Fuld: Unfortunately #startups haven't drunk the kool aid :( [03:08] SubStack: haters gonna gate [03:08] Fuld: yeah [03:09] losingle: hi [03:09] brapse has joined the channel [03:16] perlmonkey2: The bidirectional example for dnode broke my brain. [03:16] keyvan has joined the channel [03:17] fallsemo has joined the channel [03:17] SubStack: perlmonkey2: yeah it is a bit crazy, if you can come up with a less contrived example pull requests welcome [03:18] perlmonkey2: SubStack: no, once it clicked it was a great example. [03:18] tmzt: perlmonkey2: hah yeah [03:19] SubStack: ah cool [03:19] langworthy has joined the channel [03:19] perlmonkey2: maybe make it more explicit in the docs that the client is calling the server, which grabs the value from the client, which it then converts, returning that to the client's original call. [03:19] DTrejo has joined the channel [03:20] jchris has joined the channel [03:20] jchris has joined the channel [03:20] c4milo1 has joined the channel [03:22] perlmonkey2: This is a really cool project. A webapp that doesn't need to make http requests. [03:22] c4milo2 has joined the channel [03:22] perlmonkey2: sorry that wasn't a complete thought. [03:23] chris_b has joined the channel [03:23] SubStack: great for backend communication too [03:24] lukegalea has joined the channel [03:25] c4milo2 has joined the channel [03:25] c4milo2 has joined the channel [03:29] noahcampbell has joined the channel [03:31] aaronblohowiak has joined the channel [03:31] c4milo1 has joined the channel [03:31] aaronblohowiak: anyone want to get dinner and talk about node in/around palo alto ? [03:32] ryah_: https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3-(soon-v0.4) [03:32] ryah_: please help out! [03:33] Christopher_Bisc has joined the channel [03:33] webr3 has joined the channel [03:35] dspree has joined the channel [03:36] aaronblohowiak: ryah_: started to contribute, will get some food and then append more later [03:36] bstmstr has joined the channel [03:36] ryah_: aaronblohowiak: thank you :) [03:36] aaronblohowiak: ryah_: yw [03:37] pkrumins: i wanna finish node-browserling so badly [03:37] c4milo2 has joined the channel [03:37] pkrumins: oops [03:37] pkrumins: what am i saying here [03:37] pkrumins: jhesus [03:37] pkrumins: node-browser! [03:37] ryah_: pkrumins: the recent http.request() function should help [03:37] ryah_: it has connection pools built in. [03:37] aaronblohowiak: ryah_: http://nodejs.org/api.html still has big google juice, perhaps set it to redirect somewhere. [03:37] pkrumins: oh, connection pools. [03:38] pkrumins: noted the http.request() [03:38] ryah_: aaronblohowiak: ah, good point [03:38] bstmstr: Anyone know of a way to have TextMate organize javascript symbols (methods) in a hierarchical layout instead of just a flat list? [03:38] bstmstr: Like Aptana's outline viewer. [03:38] pkrumins: ryah_: connection pools for Connection: Keep-Alive? [03:39] ryah_: pkrumins: i haven't tested whether keep-alive is working yet [03:39] ryah_: but if it's not it should be easy to get [03:39] ryah_: it's designed to support it, that is. [03:39] ryah_: i've just been fixing more basic things so far... [03:42] matt_c_ has joined the channel [03:43] DTrejo: hey guys, check out my post on scraping websites with node.js, jsdom, http-agent and jQuery: http://news.ycombinator.com/item?id=2129839 [03:43] djacobs7 has joined the channel [03:43] DTrejo: if you guys have any feedback, I'd love to hear it [03:43] ryah_: DTrejo: wow - awesome [03:44] bingomanatee: is there a way in JavaScript that you can invoke afunction if you know its name as a string? [03:44] DTrejo: ryah_: thanks :) btw I was that random kid in the car on the way down to that meetup at sencha, during the summer [03:44] Pilate: bingomanatee: eval, but its discouraged [03:45] ryah_: DTrejo: oh yeah! :) [03:45] ryah_: that seems so long ago now [03:45] shaver: bingomanatee: this[string]() [03:45] shaver: if this is bound to the global [03:45] DTrejo: sure does [03:45] shaver: otherwise you can use eval [03:45] shaver: f = eval(functionname); f() [03:47] nerickson has joined the channel [03:47] bingomanatee: thanks [03:47] luke`_ has joined the channel [03:51] gf3 has joined the channel [03:55] Tidwell has joined the channel [03:56] sshillo has joined the channel [03:56] sshillo: anyone have any recommendations on redis-clients for node.js [03:58] DTrejo has joined the channel [03:58] DTrejo: is it generally ok to post informative blog posts on node.js to the list? [03:59] joshfng has joined the channel [03:59] ryah_: DTrejo: yes [03:59] DTrejo: cool [04:00] shaunau has joined the channel [04:01] shaunau: hi [04:01] SubStack: bingomanatee: oh right if I do hack up this hexhack talk I'll try to illustrate it too [04:02] SubStack: plus I already have some sketches of node people I can reuse [04:02] shaunau: wondering if anyone here can help me with a biggie-router problem? [04:02] mike5w3c_ has joined the channel [04:04] MikhX has joined the channel [04:05] sh1mmer has joined the channel [04:07] zikes has joined the channel [04:08] DTrejo has joined the channel [04:08] warz has joined the channel [04:10] shaunau: is anyone able to run the biggie-router examples? [04:10] shaunau: i get just get a module error. [04:11] ttpva has joined the channel [04:12] tim_smart: shaunau: Hello [04:12] micheil: voodootikigod: you about? [04:12] shaunau: hi tim! [04:12] shaunau: wow am i glad to see you. :) [04:12] tim_smart: shaunau: Let me reboot and I'll be back [04:13] shaunau: ok thanks [04:13] EyePulp has joined the channel [04:15] tim_smart: shaunau: Back [04:15] shaunau: cool [04:15] shaunau: ok i installed biggie-router using npm but when i run the example i get an error [04:16] shaunau: @tim_smart http://pastebin.com/xr9MFdxb [04:16] AAA_awright: It would be nice if I could define arbritary == methods [04:16] pyrotechnick: how i long for operator overrides in js [04:16] pyrotechnick: it would make math libraries alot nicer [04:17] tim_smart: shaunau: OK I know what is causing that. [04:17] tim_smart: Let me do a quick update [04:17] shaunau: ok, thanks Tim [04:18] daveyjoe_: Anybody know a good place to find information on writing good javascript APIs? [04:18] pyrotechnick: here [04:20] bloho_afk: daveyjoe_: we try to abide by the law of demeter around here [04:21] daveyjoe_: bloho_afk: The greek goddess of fertility? [04:21] bloho_afk: daveyjoe_: http://en.wikipedia.org/wiki/Law_of_Demeter [04:22] tim_smart: shaunau: OK try that [04:22] c4milo2 has left the channel [04:22] daveyjoe_: bloho_afk: Ah, ok thnaks. [04:23] shaunau: tim_smart: can i update with npm? [04:24] tim_smart: shaunau: Yes. [04:24] isaacs has joined the channel [04:25] shaunau: tim_smart: - seems to be the same problem [04:26] tim_smart: OK I should probably test it. [04:27] shaunau: tim_smart: http://pastebin.com/mzvSQxWR [04:27] shaunau: Thanks for your help Tim. :) [04:29] tim_smart: shaunau: node version? [04:29] shaunau: tim_smart: npm info using npm@0.2.15 [04:29] shaunau: npm info using node@v0.2.6 [04:30] tim_smart: OK. I just updated the package.json to only support node >0.3.0 [04:30] tim_smart: So it probably didn't install the new version. [04:30] shaunau: tim_smart: ok perhaps i should upgrade to that version of node.. [04:31] shaunau: i'm trying to get a prototype app done for work to try and get nodejs used for production.. so was sticking with stable. [04:31] tim_smart: shaunau: Yeah that code works fine here [04:32] shaunau: tim_smart: which version of node would you recommend? [04:32] KungFuHamster has joined the channel [04:32] tim_smart: shaunau: 0.3.6 I guess [04:33] tim_smart: Or download 0.3.5 from the node site [04:33] tim_smart: http://nodejs.org/dist/node-v0.3.5.tar.gz [04:33] shaunau: tim_smart: ok i'll upgrade to 0.3.5 - thank you for your help (and your library) :) [04:35] sshillo: any thoughts on which redis-client is best for node [04:37] ron_frown has joined the channel [04:39] keyvan has joined the channel [04:43] jchris has joined the channel [04:43] shaun has joined the channel [04:44] shaun: #shaunau test [04:45] shaun: whoops [04:45] DTrejo: why does finals period have to conflict with jsconf and nodeconf! arggg [04:47] micheil: DTrejo: I had similar for pretty much every conference of interest last year; it's not just you that happens to. [04:47] DTrejo: yeah, it happened with google IO for me last year, but the year before I went with my highschool webdev class, and it rocked [04:48] DTrejo: and then last year they gave out TWO android phones [04:48] DTrejo: this year it'll probably be 3 haha [04:50] fallsemo has joined the channel [04:51] polotek has joined the channel [04:52] bartt has joined the channel [04:53] shaun: daveyjoe_: http://misko.hevery.com/ [04:55] Elephant_ has joined the channel [04:56] ryan[WIN] has joined the channel [04:56] MikhX has joined the channel [04:58] sholmes: is the node-mysql module an incomplete implementation? [04:58] ryan[WIN]: hy [05:02] davidascher has joined the channel [05:03] shaun: tim_smart: it works fine now. [05:05] sholmes: Are there any session handling modules similar to PHP's sessions? [05:06] clarkfischer has joined the channel [05:09] polotek: sholmes: I believe connect/express has session middleware [05:09] polotek: are you using those or rolling your own? [05:10] sholmes: I did a little work on my own framework, NodeIngiter [05:11] dthompson has joined the channel [05:13] falconair has joined the channel [05:13] jakehow has joined the channel [05:14] polotek: here's the session middleware in connect https://github.com/senchalabs/connect/blob/master/lib/connect/middleware/session.js [05:16] richcollins has joined the channel [05:17] ewdafa has joined the channel [05:18] zikes: anybody available that could give me a hand with an odd http.createClient error? [05:18] statim has joined the channel [05:19] arrty has joined the channel [05:19] statim: just want to check, there is no 'return false' type thing on node.js events to prevent the next listeners in line from firing is there? [05:19] polotek: statim: nope [05:20] SubStack: statim: .once ;) [05:20] polotek: the next event isn't necessarily related to this one [05:20] statim: polotek: ok, good to have confirmation at least… i guess im still thinking in a slighting client-side manner :) [05:20] statim: slightly* [05:20] davidascher has joined the channel [05:21] polotek: yep, you want to use .once if it's an event you only want to fire once [05:21] polotek: if you are trying to preempt a different event [05:21] SubStack: http://nodejs.org/api/all.html#emitter.once [05:21] polotek: you'll have to keep a reference to that other event and remove it manually [05:22] statim: gotcha polotek. thanks SubStack [05:23] statim: as for the 'main event loop', if nothing is listening then the program will exit is my understanding. so ive tried to implement a graceful shutdown of an express/socket.io/redis app, by closing express, and all redis clients, but it still doesnt seem to exit. is there any way to see whats still running on the main event loop that needs to be closed? [05:24] wilmoore has joined the channel [05:25] backthatzachup_ has joined the channel [05:25] sholmes: what if you want to prevent other callbacks from firing on an event? [05:26] SubStack: removeAllListeners() [05:27] sholmes: Okay, what if you want to un-prevent other listeners from firing? [05:27] polotek: sholmes: it's not an on off switch [05:27] polotek: you're removing them from the list [05:27] polotek: they're gone [05:27] sholmes: say you had a listener that had a conditional if statement, if true, then prevent other events from firing, else allow them to? [05:27] Aria: Save the list of listeners first? Or rethink your design and try not to need that. [05:28] statim: sholmes: from what im gathering it doesnt work like that… each listener needs to be self-contained/decide if it should run if it needs that level of precision [05:28] polotek: sholmes: it sounds like you're composing your events to loosely [05:28] davidascher has joined the channel [05:28] polotek: if this event controls others [05:28] Aria: Or too tightly, alternately. [05:28] polotek: it they should probably fire together [05:29] polotek: maybe instead of setting event B and having A decide if it should fire later [05:29] polotek: you should fire A and let it decide whether to fire B [05:30] polotek: that was a bit muddled [05:30] polotek: hope you get what I'm driving at [05:30] polotek: proactive instead of reactive [05:31] sholmes: well, I'm mainly asking this because statim brought this to my attention. In the DOM you can just return false to prevent the execution of other event callbacks. [05:31] SubStack: the DOM has a hierarchy through which events propagate [05:32] SubStack: EventEmitters are flat [05:32] polotek: right, with the dom you're preventing related events [05:32] sholmes: SubStack, what do you mean a heirarchy? [05:32] polotek: because they're propogating from the same place [05:32] SubStack: sholmes: a link in a td in a tr in a table in a div [05:33] SubStack: each of those can hook onto an onclick event, but you can also stop the propagation [05:33] sholmes: well, I guess when the events bubble then there's a heirarchy. [05:33] noahcampbell has joined the channel [05:33] Elephant_: hello, anybody know how to find the cause why node process exited on signal SIGSEGV? How to debug this type of errors? [05:33] polotek: and strictly speaking there's only one event [05:33] SubStack: an obvious well-ordering too [05:33] polotek: it just keeps bubbling up and firing at the next level of the heirarchy [05:33] polotek: node doesn't do that either [05:34] statim: well, not saying this is a good idea for node because theres probably reasons why its not like this, but in jquery for example, you can call stopImmediatePropagation and no more callbacks will fire, and like node the callbacks are executed in the order they are defined so there is a way to use that [05:34] sholmes: well doesn't node have an order in which the event callbacks are fired? [05:34] SubStack: Elephant_: those are usually due to buggy c++ libs [05:34] stepheneb has joined the channel [05:34] SubStack: Elephant_: you can sometimes fire up gdb and figure out where [05:35] polotek: sholmes: they fire in the order they are added to the event loop [05:35] hobodave has joined the channel [05:35] polotek: one pass through the loop is linear [05:35] polotek: with one exception that I know of [05:35] Elephant_: : I don't use any c++ libs, only redis and mysql that written on pure js [05:35] polotek: processing calls set with setTimeout/setInterval [05:36] polotek: since it's on a timer, it's tough to predict when it will be set into the loop [05:36] sholmes: oh [05:36] Elephant_: : i suppose that is because memory leaks, but I don't know what to do with that ( [05:36] sholmes: Is module.exports the old API or the new API? [05:37] polotek: sholmes: it has always been there AFAIK [05:37] polotek: Elephant_: gist some code maybe [05:37] pzich has joined the channel [05:37] polotek: try to boil it down to a simple example that produces the problem [05:38] sholmes: here they use both https://github.com/senchalabs/connect/blob/master/lib/connect/middleware/session.js ? [05:38] halfhalo_ has joined the channel [05:38] sholmes: exports = module.exports = function ... [05:38] sholmes: why would you ever do that if they both are the same? [05:38] polotek: oh, it's not a separate api [05:38] polotek: exports is easy to use [05:38] polotek: but it's an object that you set properties on [05:39] polotek: but if you want to completely replace exports [05:39] polotek: you can't do exports = foo [05:39] polotek: you have to do module.exports = foo [05:39] polotek: people use this to set exports to a function instead of an object [05:39] polotek: for example [05:40] sholmes: wait, why can't you completely replace exports by just assigning it a value? [05:40] shinmei has joined the channel [05:41] joshthecoder: hey node peeps [05:41] polotek: the short answer is that it doesn't work that way :) [05:41] joshthecoder: was just curious if anyone here has done any IRC work with node (I am looking to get a proxy/bouncer running w/ node) [05:41] void_ has joined the channel [05:41] SubStack: joshthecoder: http://github.com/substack/rowbit [05:41] polotek: the module system does a lot [05:41] polotek: modules run in isolated contexts [05:42] polotek: exports is a special object [05:42] sholmes: polotek, and the long answer? I'm curious as to why Node wouldn't just allow this. [05:42] polotek: or it's treated specially at the end of the module I should say [05:42] joshthecoder: SubStack: cool, IRC bots make a fun little project [05:42] tim_smart: sholmes: module.exports = myObject [05:42] tim_smart: Then the entire exports get set to your object [05:43] polotek: tim_smart: yeah, he's asking why you can't just do exports = myObject [05:43] polotek: I don't know the technical details [05:43] SubStack: with the Script.runInNewContext stuff you can actually just read back exports afterwards from the sandbox you supply [05:43] SubStack: but the node internals don't do that [05:44] halfhalo_ has joined the channel [05:44] polotek: SubStack: I'm assuming you mean you can only read off the properties of the context object [05:44] joshthecoder: SubStack: what are you using for parsing IRC messages? custom code or lib? [05:44] joshthecoder: I see a require for 'irc-js' [05:44] SubStack: joshthecoder: rowbit uses irc-js yep [05:45] polotek: so when you reset exports inside the context, you can no longer retrieve it outside of the context [05:45] sholmes: if exports is just an object treated specially at the end of the module and if module.exports is the object that gets exported, then why not just set module.exports to exports at the end of the module 'module.exports = exports'? [05:45] SubStack: joshthecoder: you can just `npm link` in the project directory and npm will fetch all the dependencies [05:45] polotek: sholmes: you could do that. it would be equivalent [05:45] joshthecoder: is that a fairly new lib, I know a few months back I didn't have much luck finding a JS irc lib [05:45] SubStack: polotek: nope, you actually can [05:45] statim: anyone know how expensive keeping around tons of redis.createClient()'s is? trying to figure out if it would be better to handle the logic conditionally using one main redis subscriber vs using a bunch of individual ones [05:46] polotek: SubStack: I was speculating, I don't actually know how it works in depth [05:46] SubStack: polotek: src/node.js just isn't written that way [05:46] jdalton has joined the channel [05:46] SubStack: I looked into it and almost wrote a patch [05:46] ezmobius has joined the channel [05:46] mjr_: statim: how many clients are you talking about? [05:46] sholmes: polotek, why doesn't Node.js just do this for you automatically? [05:47] joshthecoder: hmm might have to hack that, doesn't seem server ready w/ it's current API [05:47] statim: mjr_: we'd like to get each socket.io box housing 100k concurrent clients [05:47] polotek: sholmes: couldn't tell you [05:47] joshthecoder: interesting he uses peg for parsing the messages [05:47] ryah_: statim: relatively cheap [05:47] statim: mjr_: and assuming each would have one of more redis clients in that strategy [05:48] mjr_: statim: sharing connections is relatively cheap. [05:48] SubStack: v8: process [05:48] v8bot: SubStack: ReferenceError: process is not defined [05:48] SubStack: lame [05:48] mjr_: statim: and with node_redis, which I wrote, you really benefit from pipelining, so fewer connections makes the whole thing more efficient. [05:48] SubStack: anyhow, you can just do var sbox = { exports : { zzz : 111 } }; process.binding('evals').Script.runInNewContext('exports = 42', sbox); sbox.exports [05:49] statim: sharing != redis.createClient() though? not sure how it works under the hood, but say on each new connected socket.io user we do client.subscriber = redis.createClient(). would that still be considered sharing? [05:49] mjr_: ryah_: glad to see that we are back in breaking API change land again with the HTTP client API. Feels like old times. [05:49] jdalton: v8: global [05:49] v8bot: jdalton: ReferenceError: global is not defined [05:49] ryah_: mjr_: :) [05:49] SubStack: in node.js, line 350 it does this: return runInNewContext(content, sandbox, filename, true) [05:49] jdalton: v8: [].__proto__ [05:49] v8bot: jdalton: [] [05:49] ryah_: mjr_: the old api is still supported [05:49] mjr_: statim: for many workloads, you can safely just create a single redis connection for the entire server. [05:50] statim: mjr_: npm install hiredis redis <— is that your node_redis? [05:50] SubStack: if it passed along the sandbox in the return value you could make 'exports = ...' work [05:50] mjr_: ryah_: node at master throws exceptions for me with my existing client code [05:50] SubStack: ACTION speculates [05:50] mjr_: statim: yes, that's my lib [05:50] ryah_: mjr_: oh - dang [05:50] joshthecoder: ryah_: hey thanks a ton for making http-parser, it has been very helpful for a C client/server lib I have been coding [05:50] ryah_: mjr_: it's supposed to be supported [05:50] ryah_: joshthecoder: thanks [05:51] mjr_: ryah_: I run 0.3.x in production, so I was a little surprised to find that. I refreshed earlier today to get your timer fix, and found that my clieint calls all broke. [05:51] joshthecoder: it will probably be open source and on github once I have it polished and cleaned up [05:51] mjr_: ryah_: so I rolled back to after the timer fix, but before the new HTTP client stuff. [05:52] ryah_: mjr_: would be intersting to know what broke [05:52] mjr_: statim: if your redis server is on the same machine as your node process, or in the same datacenter, it is probably better to share a single connection for the entire process. [05:52] mjr_: statim: share a single redis client, that is. [05:52] ryah_: mjr_: you should fix it and note it in https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3-(soon-v0.4) [05:52] statim: mjr_: sweet. basically i have one redis subscriber for listening to one pubsub event for s2s, one publisher client for publishing, and one called db for actually doing normal redis stuff. but then im trying to think how best to set up individual connected clients to be able to "subscribe" to certain things... [05:52] mjr_: Lemme find the logs for what broke with the client. [05:53] ryah_: it's probably missing methods [05:53] ryah_: pause() or something [05:53] ryah_: oh - no - like destroy() or something [05:53] mjr_: hang on [05:54] shiawuen has joined the channel [05:54] mjr_: TypeError: Cannot read property 'writable' of undefined [05:54] mjr_: oh, that's probably just the typo thing. [05:55] mjr_: except, hmm. of undefined. [05:56] muk_mb has joined the channel [05:56] dthompson1 has joined the channel [05:56] mjr_: ryah_: anyway, we got that error from HTTP client stuff when we went to head as of about 11AM. [05:57] mjr_: I rolled back to 860e7a7a5f423704cecfe3057c3282f32a078dd6 and the errors went away. [05:59] statim: anyone have luck with spark2? seems like a good idea, just couldnt get it to work :/ [06:00] joshthecoder: oh cool you guys are rolling out https support [06:00] polotek: mjr_: what is your app? [06:00] jdalton has joined the channel [06:00] mjr_: polotek: the backend for http://voxer.com/ [06:02] statim: mjr_: mind if i ask what your using for realtime? socket.io, something else, or rolled yourself? [06:02] Eleph has joined the channel [06:02] polotek: nice [06:02] mjr_: We have an HTTP-based protocol, but the client is native code. [06:03] polotek: https://github.com/ry/node/compare/860e7a...master [06:03] mjr_: Or at least, it will be as soon as Apple approves the next version. [06:03] mjr_: The one in the app store is using a phonegap-like scheme with WebKit and long polling. [06:03] ryah_: mjr_: can you give a stack trace? [06:03] mjr_: It is OK, but suffers from a lot of unreliable edge cases. [06:04] statim: mjr_: oh, i see, nm thought there was a web side of the app as well [06:04] mjr_: ryah_: sadly, this is a caught exception. I can update to dump err.stack, probably on Monday. [06:05] mjr_: My catch just logs err.message. [06:05] mjr_: statim: the API is intended for web browsers to use, but at the moment, the only consumer is our own iOS app. [06:06] _jdalton has joined the channel [06:07] Fuld: How do you get the file path part of the URL requested? [06:08] dthompson has joined the channel [06:08] shaver: url.parse(req.url).pathname [06:10] Fuld: shaver, thanks [06:10] tmzt: statim: sure, but haven't tried it as a daemon, just running it in screen [06:11] tmzt: you just export the server instead of an object with functions in app.js [06:12] statim: tmzt: yes, i tried that, but i think i might not be able to do that given im using socket.io, which i need to call io.listen(server) on a running server object. so leaving it up to spark2 i cant run that [06:13] tmzt: statim: I'm using dnode with it which is using socket.io [06:13] statim: hmm. ok maybe i messed something up then. and i guess i should check out dnode since im working heavily in this space right now :) [06:14] tmzt: actaully I've got dnode and bayeux, both just attached to app [06:16] statim: so you attach them before you call server.listen (which spark calls for you)? and it just works? hmm [06:16] mjr_: statim: you can have a single connection that is subscribed to many things. I believe that node_redis will let you modify your subscriptions on the fly after they are in pub/sub mode. If you can't do this, let me know, as I've not tested that feature thoroughlu. [06:16] tmzt: sure, but I'm using express.createServer() [06:17] mjr_: thoroughly. [06:17] perezd has joined the channel [06:17] tmzt: so I think you have to have a server object it just doesn't have to be listening [06:17] sholmes: what does the module.parent.exports do? [06:17] Fuld: Us node.jsers that are getting to the node.js party early are very seminal. WE ARE PIONEERS PEOPLE! [06:17] tim_smart: ryah_: Is it possible to upgrade a no.de instances node [06:18] statim: tmzt: cool, will try it again [06:18] ryah_: tim_smart: yeah - it's just a symlink [06:18] Fuld: We're going to get famous just like Ruby/Rails and Python/Django. Tis rocks! [06:18] ryah_: tim_smart: shell in and set it to the newer version [06:18] ryah_: v0.3.6 isnt on there yet though [06:18] SubStack: tmzt: that's surprising that dnode works with bayeux, neat [06:18] tim_smart: ryah_: Oh cool. Do I need root for that? [06:18] statim: mjr_: makes sense, thanks [06:18] ryah_: tim_smart: no [06:18] ryah_: `which node` [06:18] tmzt: SubStack: yeah, I still have something I haven't converted to dnode [06:18] sholmes: lol, Flud. [06:18] ryah_: tim_smart: er echo $PATH [06:19] stalled has joined the channel [06:19] mjr_: Some people say that node.js is going to be the next PHP. [06:19] mjr_: I think node.js will be the next Windows. [06:19] SubStack: I hope not. [06:19] Fuld: We're going to change the future with our node.js community. We are going to use technology to unite the world of design and software engineering! :-) [06:19] mjr_: Or possibly node.js will be the next alternating current. [06:19] Fuld: mjr_, heh [06:19] SubStack: node.js should be the next batman movie [06:19] tmzt: ryah_: is there a reason not to make some of the api a standalone library with core node/v8 will that make versioning more or less complex? [06:20] shaver: what's the lightest-weight thing I can mix into a socket.io-based app to server a handful of static files? [06:20] Fuld: mjr_: Nikola Telsa was actually pretty famous during his lifetime, but not remembered as the father of electricity like Edison was. [06:20] tmzt: SubStack: possibly pump [06:20] tmzt: oops, shaver [06:20] Fuld: ACTION personally thinks Samuel Ingersoll was more seminal today's grid. [06:20] mjr_: Fuld: that's a really good point, thanks for bringing that up. [06:20] sholmes: mjr_, there's no doubt that Node.js is the future though. [06:20] tmzt: thought there are a few modules for serving static files [06:21] tim_smart: ryah_: Oh good, it doesn't call a absolute path. [06:21] pzich has joined the channel [06:21] tmzt: sholmes: yeah, seems there are a few things in unix node.js could replace too [06:22] tmzt: or the evented model, whether or not ultimately they used js [06:22] bingomanatee: Tesla moved into research, partly military, and his keepers had no interest in aggrandizing Tesla. [06:22] SubStack: shaver: you can do var server = connect.createServer(connect.staticProvider(__dirname + '/static')) [06:22] mjr_: We are slowly converting our entire computing platform to node. it's pretty cool. [06:22] sholmes: tmzt, what do you mean? [06:22] bingomanatee: mjr: need help? [06:22] shaver: SubStack: using connect from npm? [06:22] Fuld: What solutions do you imagine being put together to try create a marriage between the server-side and client-side code now that they are both the same language? [06:22] Fuld: Until now, they've been pretty separated by the whole being different computers thing. [06:22] SubStack: shaver: yep [06:23] shaver: SubStack: well isn't that special [06:23] shaver: thank you [06:23] sholmes: Are you saying that Node has the potentially do *everything*? [06:23] joshthecoder: I like the new http API in 0.3 [06:23] joshthecoder: (client) [06:23] tmzt: sholmes: not a complete thought yet, I was but lets say things like mail servers for instance [06:23] tim_smart: mjr_: Hopefully not the *entire* platform. Unix is about using the right tool for the job... [06:23] bingomanatee: sholmes: poetneially everything *interesting* [06:23] SubStack: node is great for writing servers [06:24] tmzt: Fuld: it would be awesome if remoting could become invisible, with a javascript object on the client being transparently connected to one on the server [06:24] Fuld: SubStack: Node is great for making Mark Zuckerberg cry at night. [06:24] tmzt: dnode is a good first step [06:24] bingomanatee: \me d [06:24] SubStack: heh [06:24] bingomanatee: ACTION is looking to get hooked up with a node based project [06:25] joshthecoder: bingomanatee: you can help me code a IRC bouncer :D [06:25] Fuld: tmzt: I think the uniting of code on the client and code on the server is kind of like attempts to simplify multi-threaded code [06:25] sholmes: what happens if you have two node instances creating two servers listening on the same port? [06:25] joshthecoder: ugh I have so many projects to work on, but no time [06:25] SubStack: or just improve rowbit for me ^_^ [06:25] bingomanatee: what does it do that ignore doesn't? [06:25] bingomanatee: or maybe I'm not in with the concept [06:25] Fuld: bingomanatee: I'm doing a start-up with a couple guys in NYC using node.js [06:26] SubStack: shaver: one of them doesn't work [06:26] joshthecoder: sholmes: only one will bind [06:26] joshthecoder: afaik [06:26] bingomanatee: Fluid: how do you feel about remote workers? [06:26] sholmes: joshthecoder, the first one or the last one? [06:26] mjr_ has joined the channel [06:26] tmzt: sholmes: the kernel doesn't let you [06:26] bingomanatee: Fukd ^ ^ [06:26] joshthecoder: who ever binds first [06:26] bingomanatee: Fuld ^ [06:26] bingomanatee: ^ [06:26] adam___ has joined the channel [06:26] SubStack: Fuld: have you met the nodejitsu hackers? [06:27] bingomanatee: ACTION is in San Francisco [06:27] joshthecoder: but I think you can share a socket (not sure if node supports it) [06:27] Fuld: bingomanatee: Well, having people in the s.v. area can be useful [06:27] Fuld: Especially since ycombinator is there [06:27] joshthecoder: between multiple processes [06:27] amerine has joined the channel [06:27] tmzt: anybody have a browser based ide they would actually use? [06:27] joshthecoder: then the kernel will load balance connections to them [06:27] SubStack: tmzt: see cloud9 [06:28] Fuld: bingomanatee: But I need to finish the prototype before I bring anyone on board :-) [06:28] tim_smart: ryah_: It isn't using the same as `which node`. Executing start method ("env `cat /home/node/node-service/profile` /opt/nodejs/v0.2.5/bin/node /home/node/node-service/releases/20110122062251/server.js") [06:28] bingomanatee: Fuld: why wait? [06:28] tim_smart: ryah_: It uses something in /opt [06:28] tmzt: SubStack: where? [06:28] bingomanatee: I don't mind volunteering at early stage work - unless you think more workers are counterproductive. [06:28] SubStack: tmzt: http://www.cloud9ide.com/ [06:29] tmzt: I see source is that the same project? [06:29] Fuld: bingomanatee: I want to build the prototype solo, but then open it up to developers [06:29] bingomanatee: alright. [06:29] mjr_: SubStack: do you use cloud9 to do actual work, or just to play around? [06:29] bingomanatee: If you think thats the fastest way to get things done. [06:29] Fuld: bingomanatee: But that will be done by the second of February [06:29] bingomanatee: okay [06:29] SubStack: mjr_: I have it downloaded but haven't messed with it yet [06:30] micheil: hey mjr_ [06:30] derferman has joined the channel [06:30] Fuld: bingomanatee: So if you want, you can drop me a line and I'll show you then [06:30] adam___: Hey guys, could anyone help me get node setup in cygwin? I keep getting odd errors (eg, it says it can't find a c compiler but its installed and working fine) [06:30] bingomanatee: If you can get it done faster we can showcase it in the Silicon Valley Node.js group :D [06:30] tmzt: SubStack: is that fully installable on my own server or just the hosted beta? [06:30] mjr_: I have high hopes for kod. I hope he keeps developing it and makes it the next textmate. [06:30] mjr_: micheil: hey there. Are you back in Mountain View? [06:30] bingomanatee: what is the nature of the taskyou are working on? [06:30] Fuld: bingomanatee: Hmm really? When's the event? [06:30] bingomanatee: Feb 3 [06:30] joshthecoder: mjr_: yeah kod is interesting [06:30] tim_smart: micheil: vim is the previous, current and next textmate :p [06:30] micheil: mjr_: not at the moment [06:30] bingomanatee: But its repeating [06:30] SubStack: tmzt: you can run it locally, yeah [06:31] joshthecoder: especially with textmate barely getting updated [06:31] bingomanatee: so if you don't et it by the 3rd of Feb we can showcase it later. [06:31] micheil: tim_smart: neva! Kod is the next textmate, thanks. [06:31] mjr_: micheil: I'm moving to Hawaii in a few days, so I might not see you in the Bay Area again. [06:31] bingomanatee: Fuld: what is the nature of the project? [06:31] tmzt: and it will force forever or something to reload the server? [06:31] micheil: okay; wait, not the next textmate, who would want another textmate? Kod is the next editor. :P [06:31] tmzt: mjr_: moving there for? [06:31] Fuld: bingomanatee, we're building this, but as a web app instead of an iphone app: http://www.youtube.com/watch?v=BoHl5n1EDBA [06:32] micheil: mjr_: oh? I thought you were full-time at your company? I would've thought that'd mean you'd be on site [06:32] polotek: I realized recently. I want a new modern editor, but none of them ever appeal to me [06:32] Fuld: And we have a different take on the message stream [06:32] mjr_: I'm still working fulltime at my job still, just using the internets to work remotely. [06:32] polotek: and the one and only reason is they don't have extensive keyboard shortcuts for editing [06:32] void_ has joined the channel [06:32] bingomanatee: Fuld: ever hear of SF net? [06:33] Fuld: bingomanatee, nah [06:33] polotek: they add all of these nice other features and they suck more at editing text [06:33] polotek: so I go back to emacs [06:33] micheil: mjr_: sounds like a nice seachange, I guess; I've just moved myself, to just south of brisbane (au) [06:33] bingomanatee: In Web 1.0 a guy named Wayne Gregori set up a BBS through dumb terminals at a series of coffee shops in the Bay Area. [06:33] bingomanatee: They were essentially chat machines in arcade format/pay per time [06:33] Fuld: bingomanatee: Are you talking about sourceforge.net? [06:33] bingomanatee: no totally not [06:33] Fuld: Ah cool [06:34] Fuld: What do SFers do now for chat? [06:34] mjr_: We do this. [06:34] mjr_: Like it was 1986. [06:34] bingomanatee: I don't know that other than specialiced IRC rooms there is a domainant public chat room environment. [06:35] bingomanatee: In the past Yahoo Chat was popular but the Cylons killed that off pretty quickly. [06:35] shaver: icb? [06:35] bingomanatee: I got majorly laid off Yahoo Chat. [06:35] SubStack: unless you know what to look for irssi in screen looks like work [06:35] mechanate has joined the channel [06:35] bingomanatee: There are plenty of diffuse niche chat environments like IRC but I don't think there is a broad-based chat service for nonspecialists. [06:35] Fuld: bingomanatee, we're gearing the service towards events. [06:35] SubStack: in my startup it /is/ work [06:35] mjr_: shaver: icb reference noted, and credited to your account. [06:36] bingomanatee: That makes sense. [06:36] bingomanatee: I think SMS kind of replaced broadband chat services. [06:36] tmzt: bingomanatee: their java gaming platform is still around the last I checked [06:36] Fuld: bingomanatee: So when's the deadline for the node.js showcase? The 1st? [06:36] bingomanatee: although they aren't a perfect analogue so "Replaced" is probably not that accurtae. [06:36] joshthecoder: Fuld: that's an interesting concept [06:36] tmzt: funny thing is it was one of the first public use of java applets and nothing has changed in close to 14 years [06:36] bingomanatee: Yeah there is a not of gaming chat rooms. But thats kind of dickless. [06:37] joshthecoder: probably would scale nicely w/ node, but you'll probably crash the cell tower :) [06:37] ossareh has joined the channel [06:37] Fuld: joshthecoder: hehe [06:37] bingomanatee: The problem is that it is very difficult to provent the intrusion by chatbots onto popular channels. [06:37] mjr_: Once LTE is out, we should be able to get some pretty great mobile gaming apps. [06:37] mjr_: Latency on LTE is way lower. [06:37] bingomanatee: Keep in mind you will get a lot of spammers polluting channels. [06:37] micheil: LTE? [06:38] Fuld: bingomanatee, we'll mitigate that to some extent [06:38] mjr_: LTE === Long Term Evolution AKA 4G. [06:38] mjr_: LTE is already available in many US cities. [06:38] bingomanatee: Fuld: 3rd. check out http://www.meetup.com/Node-js-sfbay/. [06:39] bingomanatee: However given this will be only the first meeting of many I wouldn't push to make that deadline - I can just as easily present in a couple of weeks if you think it needs more polish. [06:39] joshthecoder: you probably need to create small groups based on geolocation (keeping expending radius until max is reached for group size) [06:39] bingomanatee: Or more Polish. [06:39] micheil: mjr_: ah. okay [06:39] Fuld: bingomanatee: I can probably get it in by then no problem, but I won't be able to come [06:39] joshthecoder: if its a small event everyone can probably be in one group, but if it's conf then splitting it up is best [06:40] bingomanatee: Do you have anyone else in the West Coast who can speak for you? You can always set up a you tube driven demo [06:40] Fuld: ACTION is going to be stuck somewhere in Manhattan for sue :) [06:40] tim_smart: ryah_: Nevermind. I did a quick search and found the part about "config.js" [06:40] joshthecoder: Fuld: will this be an open source project? [06:40] Fuld: bingomanatee, actually my uncle is in SF [06:40] tim_smart: Seems v0.3.3 is the most current version however. [06:40] _jdalton: so [06:40] bingomanatee: Is he technical? [06:40] tim_smart: mjr_: Hey. How goes node_redis? [06:40] jdalton: im looking through how nodejs benchmarks itself [06:41] Fuld: joshthecoder, open source, but also SaaS. [06:41] joshthecoder: Fuld: cool I'd be willing to hack on it [06:41] mjr_: tim_smart: pretty well. Lots of people are using it these days. We've found a lot of tricky and subtle bugs that way. [06:41] bingomanatee: We can probably find someone to present for you if you prep them properly [06:41] joshthecoder: I'll contribute auto-banning of pervs and trolls :D [06:41] Fuld: joshthecoder: Cool. We'll have something on github soon :) [06:41] bingomanatee: A YouTube video and a solid site woudl be good enough. [06:41] mjr_: tim_smart: pietern from the Redis team made a hiredis binding to node, so you can get native code to do reply parsing. [06:42] Fuld: bingomanatee, cool [06:42] joshthecoder: Fuld: so for mobile what are u using? phonegap / titanium [06:42] Fuld: bingomanatee: So how do I submit when I'm ready? [06:42] joshthecoder: btw I work for titanium/appcelerator [06:42] bingomanatee: Join the meetup.com group and just keep me abreast. [06:42] mjr_: My office is right across the street from 21st amendment, where I guess a node.js meeting is happening. [06:42] tim_smart: mjr_: In C++? [06:42] Fuld: joshthecoder, html5 geolocation atm. Phonegap looks like a good solution though [06:42] mjr_: tim_smart: yeah, npm install hiredis [06:42] bingomanatee: Really? Can you host mjr_? [06:43] tim_smart: C++ -> JS can be quite slow though :/ [06:43] mjr_: bingomanatee: I'd love to, except I'm moving out of the area in a few days. [06:43] bingomanatee: 2 bad [06:43] mjr_: Yeah, I'll be back in March for a week. [06:43] Fuld: bingomanatee, will do [06:43] tmzt: why is redis ascii based by the way? [06:43] mjr_: tmzt: so you can test with telnet and debug with tcpdump. [06:43] joshthecoder: Fuld: okay I don't really work on mobile stuff (I do desktop), but yeah html 5 geo probably works good [06:44] tmzt: that's fun true [06:44] bingomanatee: ACTION is looking for hosts for the meetups. [06:44] jdalton: I think the benchmarks could be improved in node.js [06:44] jdalton: like the actual guts of the benchmarks [06:44] mjr_: Oh, speaking of which, I'm going to benchmark node.js vs. a satsuma orange. [06:44] jdalton: how it measures [06:44] mjr_: node.js can do more requests per second, but the satsumas are quite a bit jucier. [06:45] jdalton: some tests do the old start timer, for-loop, end timer [06:45] techwraith has joined the channel [06:45] jdalton: and that's not as useful as other methods of benchmarking [06:45] tmzt: what's the fastest signup for a facebook like thing? like what's the minimal information you would want to collect to cement an identity? [06:45] polotek has left the channel [06:47] mjr_: just email. You can collect the rest later if people really like your app. [06:48] mjr_: Or just use facebook's API, since everybody is already on there anywa. [06:48] tmzt: okay, then let's make this off the wall, what's the best node-derived environment for running outside code on a server with a limited set of global objects? [06:49] _jdalton has joined the channel [06:49] shaver: I can't find pump in npm, SubStack [06:49] tmzt: well I think facebook will be around for a very long time (in computing terms) but it won't quite be what it is today (what is that anyway?) [06:49] shaver: oh [06:49] shaver: it was called connect [06:49] tmzt: shaver: util.pump [06:49] shaver: who told me about pump? [06:49] shaver: oh! [06:49] bingomanatee: ??? [06:50] micheil: or, stream.pipe [06:50] micheil: shaver: ^^ is the newer [06:50] warz has joined the channel [06:50] shaver: I can get a stream off a request? [06:51] breccan has joined the channel [06:51] micheil: yes [06:51] micheil: see the Streams "class" [06:51] shaver: well that is simply delightful [06:51] yx has joined the channel [06:51] micheil: if it inherits from Stream, then you have access to Stream.pipe [06:52] tmzt: I don't think there will be a readwrite web until we can post code somewhere and have it run as part of a page, like uploading a custom filter to gmail, or the equivalent of greasemonkey but on the web [06:52] micheil: hmm.. 256kbps internet is no fun, especially when you pay for 10mbps. [06:53] micheil: tmzt: hmm, you mean like an embedded gist? [06:53] micheil: tmzt: gist.github.com [06:53] shaver: mmm [06:53] tmzt: no, that's static [06:53] shaver: so I want to use socket.io [06:53] tmzt: I mean as part of the page [06:53] micheil: oh. [06:53] tmzt: shaver: what are you doing? [06:53] micheil: that doesn't really work with server-side code; you know? [06:53] shaver: but the flashtransport wants a port that would require me to run node as root [06:54] tmzt: micheil: active content, sandboxed but not find-replace sandbox like facebook api [06:54] micheil: shaver: yup, unfortunately. That, or you change it to a high port and use iptables to re-route it [06:54] shaver: does node have some drop-privs API? [06:54] shaver: oh, that's clever [06:54] micheil: tmzt: hmm, maybe talk to the cloud9 guys? [06:54] _jdalton has left the channel [06:55] shaver: I could also give node some selinux priv for low ports, I guess [06:55] micheil: shaver: yeah, it, iirc, does have a drop-privs API, but I'd have no idea how it works exactly. [06:55] micheil: shaver: that'd also work. [06:55] tmzt: micheil: sure, that's a start. [06:55] tmzt: I thought Google would have the first modern hosted browser (like the IE-based one on desktop.com) [06:56] tmzt: they seem to be going for thick clients (chrome) and sync [06:56] tmzt: I just want to be able to click on a link in hn or google reader and have it open in a tab *within the page* [06:57] tmzt: oh, and non-iframed widgets, that would be cool too [06:58] shaver: iframes are fine, you just want them to be seamless (in flow and inline) [06:59] tmzt: domains on arbitrary subtrees would be nice, hard to get working though [07:00] tmzt: at some point if js loses the global you could even split the DOM up into sections with certain 'd scripts only able to access certain ones [07:00] micheil: require() in the browser would be hot like that. require("dom"); :D [07:00] tmzt: like from john http://ejohn.org/blog/dom-documentfragments/ [07:01] tmzt: nah, not require() that implies starting with [07:02] tmzt: I mean [07:02] tmzt: or something like that [07:02] micheil: oh. [07:02] micheil: nawh. [07:02] tmzt: each js context then gets its own global environment fully isolated from the rest of the page, by webworkers or otherwise [07:03] micheil: anyone here in sydney? [07:04] micheil: I'll be there from the 1st for a week; if there's anyone interested in meeting up & talking node/javascript stuffs [07:04] shiawuen_ has joined the channel [07:04] tmzt: mjr_: is that your site? [07:05] mjr_: which? [07:05] tmzt: ejohn.org [07:05] mscdex: lol [07:05] mjr_: ah, no. [07:05] mscdex: ejohn.org is john resig [07:05] mjr_: Although John is my middle name. [07:05] tmzt: yeah that was the guess, oh well [07:05] mscdex: and rockford is his last name! [07:05] mscdex: :-D [07:05] tmzt: ah [07:06] micheil: ejohn is john resig [07:06] mjr_: yeah, paste the link! [07:06] _jdalton has joined the channel [07:06] mscdex: http://i27.tinypic.com/2yzn2u8.jpg [07:06] mjr_: there we go [07:06] mscdex: :-D [07:06] mjr_: a joke gotten by approx. 2 people in life. [07:06] mscdex: had to dust that one off [07:07] mjr_: I thought you'd have that on some sort of hotkey [07:07] mjr_: Like a Windows hotfix. [07:07] mscdex: nah [07:07] mscdex: i'm not that attached to crockford [07:07] mjr_: But you must have spent at least 15 minutes on that image. [07:08] mscdex: not really [07:08] pkrumins: the crockford files: hacking is believing; [07:08] mscdex: just a quick photoshop [07:08] mjr_: And another 15 trying to convince other people that it was funny, even though everyone is too old to remember the Rockford Files. [07:08] mscdex: heh [07:08] mjr_: er, too young. [07:08] mjr_: one of those [07:10] sriley has joined the channel [07:13] mr_daniel has joined the channel [07:15] tk has joined the channel [07:18] tmzt: Fuld: group chat? somebody's got to get a working design for a forum that interacts with (or replaces) a mailing list for development [07:19] mscdex: hrmm [07:19] warz: as it is, i dont think mailing lists support development any better than forums do [07:19] mscdex: time to find something to implement [07:20] tmzt: well, okay, but if you could get linux-style patch management (with github, etc.) in a browser interface that would be pretty cool [07:20] xSmurf: how do I concat two buffers? [07:20] warz: just create a forum that you can submit to via email, or txt msg. heh. [07:20] tmzt: add some code review in place [07:20] xSmurf: trying .copy but it's telling me the first arg isn't a buffer O.o [07:22] mscdex: xSmurf: https://gist.github.com/790943 [07:22] mscdex: that's one i use [07:27] claudiu__ has joined the channel [07:30] dahankzter has joined the channel [07:31] shaver: hmm [07:31] shaver: flashsocket is a lot slower than websocket transport for socket.io [07:31] shaver: I'm surprised [07:32] Utkarsh__ has joined the channel [07:33] muhqu has joined the channel [07:34] micheil: I wouldn't be [07:34] shaver: like a LOT slower [07:34] chapel: hola [07:35] shaver: 150ms rt for a tiny message [07:35] evl: How fast is JSON.parse? I've got a key-value store of about 5000 entries and now I need to search them >< [07:35] mscdex: i've never benchmarked the two to compare them, but i haven't noticed any difference [07:35] shaver: which is 100ms more than I was getting with websocket [07:35] shaver: weird [07:36] shaver: wonder if something is misconfigured [07:36] chapel: evl: Ive heard JSON.parse is somewhat slow [07:36] chapel: but I dont know [07:36] mscdex: and i do streaming with both [07:36] xSmurf: thx mscdex that helped! [07:37] mscdex: xSmurf: np [07:37] mjr_: shaver: if only there weren't that HORRIBLE security problem with websocket, we could all be using it instead. [07:37] shaver: well [07:38] shaver: I overrode the firefox block [07:38] mjr_: Good. [07:38] shaver: and instead of using websocket, it says "no transport available" [07:38] mjr_: Because the security implication of websocket are MINDBLOWING [07:38] shaver: if I put the block back in place, it uses flash [07:38] tim_smart: For some wierd reason, a buffer is not writing to socket after around 100 iterations in a benchmark loop [07:39] shaver: wonder what's going on here [07:39] mjr_: So it's the flash plugin boundary traversal that takes that long? [07:39] shaver: that's really not possible [07:39] shaver: if it took even 10ms to cross a plugin call boundary [07:39] shaver: I would be screaming and waving my arms at the office [07:40] shaver: I wonder if our block override pref doesn't work the way I want it to [07:42] mjr_: I'm really sad about the state of websocket [07:42] ph^ has joined the channel [07:42] shaver: yeah, me too [07:43] mjr_: realtime web apps, please. [07:43] shaver: very [07:44] tmzt: I think the low over head base64-like is going to have to work [07:44] tmzt: somethign that was purely binary would be so much nicer though [07:45] tmzt: this without f7 would be awesome, a links-hacked mode http://mshared.tumblr.com/post/2856324781/pentadactyl [07:45] ChrisPartridge has joined the channel [07:55] liar has joined the channel [07:55] Tobias| has joined the channel [07:56] shaver: ha! [07:56] shaver: it was confused somehow [07:56] shaver: the cookie was cached [07:57] shaver: mmm, yeah [07:59] daglees has joined the channel [08:02] torvalamo has joined the channel [08:03] mjr_: what's a few orders of magnitude and cached cookies between friends. [08:04] shaver: nothing, really [08:04] shaver: I think I know why it got confused [08:04] torvalamo has joined the channel [08:04] shaver: sort of an edge case, but I forked to fix it [08:04] saschagehlich has joined the channel [08:06] jdalton has joined the channel [08:07] dnolen has joined the channel [08:10] jdalton has left the channel [08:14] stagas has joined the channel [08:18] Remoun has joined the channel [08:24] breccan has joined the channel [08:27] tim_smart: mjr_: Hmm https://gist.github.com/41ba0a9ef70dd49f3fea [08:28] tim_smart: (1024 byte buffer) [08:28] mjr_: I wonder why that is. [08:29] mjr_: Any insight would be appreciated. [08:29] tim_smart: mjr_: Maybe it is the sending of commands? [08:30] tim_smart: The reply parsing is probably neck and neck [08:30] tim_smart: But then again, I haven't isolated the parsers from the clients so I wouldn't know. [08:31] mjr_: you can try with hiredis and see. [08:31] tim_smart: Right. I'll just get a for loop and pass it through the parser a couple thousand times. [08:31] mjr_: node_redis with the javascript parser triggers a lot of GC for reasons I can't figure outl [08:32] tim_smart: Probably buffers? [08:32] mjr_: But with the hiredis parser, it is WAY faster for some patterns. [08:32] tim_smart: Which ones in particular? I can test them. [08:32] mjr_: lrange key 0 500 [08:33] mjr_: Check out multi_bench.js from node_redis [08:33] opengeard has joined the channel [08:33] mjr_: it completely disables pipelining, which is an interesting scenario. [08:33] mjr_: Because pipelining in node-based redis clients is such a huge win [08:34] mjr_: Anyway, these days I return strings by default. [08:34] mjr_: I'd love to know how to make it faster though, if you have any insight. [08:37] tim_smart: mjr_: My client squashes commands together, meaning less sockets writes. [08:37] tim_smart: The is why things like DEL are a lot faster. [08:37] tim_smart: *That [08:39] mjr_: It is interesting to see what happens if you don't do any pipelining. The overhead from node dominates most things. [08:39] mjr_: Except for the large lrange queries. [08:41] Evet: what about message queue vs pipelining? [08:42] Evet: but yeah, you have to hack both client and server [08:42] pekim has joined the channel [08:42] tim_smart: mjr_: pipelining vs message queue? [08:43] tim_smart: Evet, rather [08:43] tim_smart: pipelining is a protocol feature, rather than a service. [08:44] Evet: right [08:44] Evet: i meant [08:44] Evet: pipelining versus a lightweight binary protocol through mq service [08:45] kawaz_air has joined the channel [08:45] tim_smart: Evet: Pipelining is just sending the next message before recieving the response for the previous one. [08:45] fangel has joined the channel [08:46] tim_smart: Most clients would go: Send message -> Receive response -> Repeat. Pipelining is: Send message -> Send message -> Receive responses [08:46] Evet: doesnt pipeline mean unix domain sockets? [08:47] fly-away has joined the channel [08:49] Druid_ has joined the channel [08:50] sveimac has joined the channel [08:51] tim_smart: Evet: Hmm, I have heard the term 'pipe'. But pipelining is a term more reserved for the message passing paradigm. (I think) [08:51] ezmobius has joined the channel [08:52] mikeal has joined the channel [08:53] Evet: tim_smart: so its like UDP? [08:54] mjr_: pipelining is sending a request without necessarily waiting for the previous request to complete. Or something to do with plumbing. [08:55] shaver: laying pipe, what? [08:55] mjr_: It's like making craft projects with pipe cleaners. [08:55] mjr_: Also, the internet is a series of tubes. [08:56] shaver: furthermore: your mom [08:57] mjr_: well played. [08:57] SubStack: damn now I want to make some art [08:58] Evet: tim_smart: anyways, i was gonna ask you something [08:59] jspiros has joined the channel [08:59] swaj has joined the channel [08:59] swaj has joined the channel [08:59] Evet: im trying to build a comet app without touching sockets for message massing [08:59] matjas has joined the channel [08:59] mjr_ has joined the channel [08:59] mjr_: oh man, my amazing linux-based wifi access point is so great. [08:59] mjr_: I'm so glad that it never crashes. [09:00] Evet: tim_smart: what do you suggest for in-process pub/sub? [09:02] DoubleV has joined the channel [09:02] Athox has joined the channel [09:04] franck34: tim_smart: my first pull using github (on socket.io). I learned benefits of github this night, and yes, compared to svn, it's really cool, thanks for pushing me in this way ;) [09:04] ROBOd has joined the channel [09:05] adambeynon has joined the channel [09:05] micheil: mjr_: ? [09:05] mjr_: hey [09:06] _jdalton has joined the channel [09:06] micheil: I was more referring to the linux-based wifi access point, but hey [09:06] nooder has joined the channel [09:06] Kingdutch has joined the channel [09:06] mjr_: my ap crashed while I was downloading a file. [09:06] torvalamo has joined the channel [09:07] micheil: oh, right :) [09:07] nooder has left the channel [09:09] sveimac has joined the channel [09:12] stephank has joined the channel [09:13] tim_smart: Evet: Just use a simple object hash? [09:13] andrzejsliwa has joined the channel [09:13] tim_smart: With array values or something [09:13] tim_smart: Actually don't use arrays [09:14] dsirijus has joined the channel [09:14] tim_smart: Evet: https://github.com/Tim-Smart/node-redis/blob/master/utils.js#L61-90 [09:16] tim_smart: franck34: Ah cool. I found it took a month or two before getting comfortable with the git workflow. [09:18] nook has joined the channel [09:19] Evet: tim_smart: cool. thank you! [09:19] gattuso has joined the channel [09:20] sveimac has joined the channel [09:22] franck34: Evet: comet app ? interesting, can you explain a little bit more ? is your code somewhere online ? [09:23] franck34: tim_smart: ok :) my fingers must learn to stop typing svn but git in a first time grrr !! [09:25] Evet: franck34: not yet, im gonna make it online nowadays [09:26] Kingdutch: ACTION hates it when he comes in late to an interesting conversation just because he stayed in bed so long. [09:26] franck34: ok, i'm asking cause i just started something using socket.io and i want to implement a pub/sub system on it [09:27] SubStack: franck34: rolling your own pubsub eh? [09:27] SubStack: ACTION wrote about that: http://substack.net/posts/9bac3e  [09:28] Kingdutch: //What's a pubsub? [09:28] SubStack: Kingdutch: like event emitters, but over the network [09:29] SubStack: publish : subscribe :: emit : on [09:29] Kingdutch: XML-RPC Event emitters? [09:29] Kingdutch: I see [09:29] Gruni has joined the channel [09:29] SubStack: no, require('events').EventEmitter [09:29] franck34: SubStack: well, i need to learn many things before implementing something, and see effectivly if i'm not reinventing the well. I've found https://github.com/jcoglan/faye which is very interesting, but i already validate socket.io for socket stuff [09:29] franck34: ACTION reading http://substack.net/posts/9bac3e [09:29] micheil has joined the channel [09:30] aklt has joined the channel [09:30] Evet: franck34: try to build your web app in c with embedded http server [09:31] SubStack: yay node-canvas is saving me lots of time [09:31] d0k has joined the channel [09:33] franck34: Evet: in http://substack.net/posts/9bac3e, what are you using to maintain connection between browser and server ? websocket ? flashsocket ? foreveriframe ? xhrmultipart ? xhr polling or jsonp ? [09:33] SubStack: franck34: dnode uses socket.io [09:33] franck34: haargfg :) [09:33] franck34: lol [09:33] SubStack: so yes, all of those [09:33] franck34: need to go deeper so, thanks a lot [09:33] franck34: perfect [09:33] SubStack: or at least most of them [09:34] franck34: now following you on github hehe [09:34] ezmobius has joined the channel [09:35] SubStack: hooray more followers \o/ [09:35] SubStack: just 10 behind mikeal :p [09:36] Ond: --make it nine [09:36] franck34: omg you've made so many things related to node [09:36] pdelgallego has joined the channel [09:36] SubStack: franck34: and npmtop will tell you exactly how many! [09:37] dsirijus has joined the channel [09:39] franck34: SubStack: regarding pubsub, my final goal is to : user Auth -> user subscribe to something. User quit. User Auth again -> auto subscribe previously subscribe channel but magicaly server side [09:40] Evet: tim_smart: is 0.3.6 yet stable to replace nginx? [09:40] SubStack: sounds possible [09:40] SubStack: Evet: there are lots of sites running node in production right now [09:40] tanepiper: Evet: 0.3.6 is not stable, BUT it's close to being - 0.4.x is planned for the beginning of feb [09:40] SubStack: like mine! http://browserling.com/ [09:41] Evet: hmm [09:42] djacobs7 has joined the channel [09:42] sveimac has joined the channel [09:43] tanepiper: SubStack: have you tested DNode with 0.3.6 yet? [09:43] SubStack: not yet [09:43] SubStack: I'm still running v0.2.5 :/ [09:44] tanepiper: k, i'll test it today then :) it runs fine on 0.3.5 though [09:44] SubStack: excellent [09:46] tanepiper: i suspect it would be connect that breaks more though, fingers crossed x [09:49] tanepiper: BAHH! The first thing to break is actually Cradle [09:49] tanepiper: TypeError: Object # has no method 'setTimeout' [09:50] SubStack: >_< [09:50] tanepiper: patch submission time! [09:51] Evet: do you use any fancy client-side frameworks? [09:51] franck34: SubStack: is browserling.com yours ? [09:51] SubStack: franck34: me and pkrumins run it [09:51] franck34: ok, did you made a simple benchmark apache/node ? [09:52] SubStack: o_O [09:52] franck34: lol [09:52] SubStack: this kind of application isn't even possible with apache really [09:52] franck34: i understand [09:52] franck34: i'll do it for a single html page [09:52] Evet: SubStack: omg [09:52] franck34: just curious [09:53] franck34: who want to port mod_security to node.js ? :) [09:53] tanepiper: Evet: I'm using ExtJS which is pretty heavy on javascript, and i wrote my own proxy to use DNode so I can do callbacks all the way down :D [09:53] SubStack: callbacks are the best [09:53] steffkes has joined the channel [09:53] SubStack: fuck coroutines [09:53] steffkes^ has joined the channel [09:54] tanepiper: ryah_: ping [09:55] Evet: tanepiper: your own proxy? in which language? [09:56] tanepiper: Evet: JavaScript - basically ExtJS comes with a bunch of proxies for doing Ajax, ScriptProxy (x-domain), and their own ExtDirect which is a JSONRPC implementation [09:56] tanepiper: but i wrote one that works with DNode, so basically I can pass a request object and a callback, and get a response with an Error + response object [09:56] booo has joined the channel [09:57] tanepiper: so i don't even have to think about how I call server side stuff, I just do it [09:58] Evet: hmm [09:58] tanepiper: Client.remote.GetDoc({id: 'foo'}, function(error, response) { // do stuff in here }); this then makes a request over DNode and just returns the callback, no need to worry about transport agents [09:58] Anirudh has joined the channel [09:58] Anirudh: hello? [09:58] SubStack: GREETINGS [09:59] Guest74064: I am trying to install node.js [09:59] Ond: Ok [09:59] Guest74064: However it hangs up on the "./configure" step, saying it cannot configure the c++ compiler. [09:59] jetienne has joined the channel [09:59] Guest74064: I've done the rebase, troubleshooting [09:59] nook: link the output [09:59] Wizek has joined the channel [10:00] DoNaLd`: Guest74064: macosx/linux ? [10:00] Guest74064: Windows running Cygwin [10:00] pomodoro has joined the channel [10:00] garrensmith has joined the channel [10:01] Guest74064: any ideas? [10:01] SubStack: Guest74064: do you have a g++? [10:01] Guest74064: yes [10:01] Guest74064: I installed it during cygwin installation, but it's not added to the path... [10:01] SubStack: gist the output [10:01] gnrfan has joined the channel [10:02] SubStack: well there you go [10:02] Guest74064: It has to be added to the PATH? [10:02] SubStack: try this: [10:02] SubStack: ln -s $(which gcc) $(dirname $(which gcc))/g++ [10:02] SubStack: cygwin installs a gcc but not a g++ [10:02] Evet: SubStack: may I pm you? [10:02] SubStack: why ask? [10:02] Guest74064: Sure [10:02] SubStack: asking is for suckers [10:02] Evet: lol [10:03] Evet: its rude not to ask [10:03] vyvea has joined the channel [10:03] SubStack: I feel the opposite. [10:04] Guest74064: Ln: failed to create submolic link `/usr/bin/g++': File exists [10:04] benburkert has joined the channel [10:04] shinmei has joined the channel [10:04] SubStack: oh well that's good, you already have a g++ [10:05] SubStack: Guest74064: paste the entire output here: http://gist.github.com and link us [10:05] Guest74064: Yes, and it works in cmd [10:05] Guest74064: How do i copy text from cmd prompt ? :-/ [10:06] Evet: SubStack: does browserling.com use websockets? [10:06] jdalton has joined the channel [10:06] SubStack: Evet: it uses dnode which uses socket.io which uses websockets among other transports [10:08] shinmei has joined the channel [10:09] Guest74064: Alright, here is the output. [10:09] Guest74064: http://i.imgur.com/zaD1q.png [10:09] gadelat has joined the channel [10:10] tanepiper: woop! apart from http.createClient not having .setTimeout available anymore, 0.3.6 seems to be stable enough :D [10:10] SubStack: Guest74064: hmm! Looks like some kind of cygwin problem [10:10] tanepiper: but i'm proabbyl going to have to end up re-writing this whole module anyway :D [10:11] tanepiper: at least the http client parts [10:11] mike5w3c has joined the channel [10:12] Guest74064: Should I have restarted my computer between installing cygwin, and installing node.js? [10:12] chapel: tanepiper: what module? [10:13] femtoo has joined the channel [10:15] saschagehlich: any coffeescript guys here? I'm wondering how to add a #!/my/binary to my compiled javascript code [10:16] Evet_ has joined the channel [10:17] tanepiper: chapel: cradle [10:18] tanepiper: chapel: makes heavy use of http client, but so far seems to be the only one that breaks for me, but i've put a temp fix in [10:18] chapel: ah [10:18] chapel: yeah [10:18] saschagehlich: shebang! that's the word I was looking for, lol [10:18] saschagehlich: warum nich bangher [10:18] saschagehlich: wrong window, sry. [10:18] tanepiper: the other problem is i've already submitted a couple of patches for it, but they don't seem to have been merged in yet :( [10:19] tanepiper: so i can see me having to maintain my own version for a while [10:20] SamuraiJack has joined the channel [10:20] clarkfischer has joined the channel [10:20] chapel: ah [10:20] tmzt: SubStack: how are you doing the graphics updates? [10:22] derferman has joined the channel [10:23] ChrisPartridge: Has anyone played around with implementing Ace? [10:26] SubStack: tmzt: a teetering pile of hacks and glue [10:26] SubStack: canvas, pngs, rfb decoding [10:26] SubStack: I'm writing a copyrect detection thing right now to speed it up [10:28] Wizek: Why do I get an EPERM error (crashing node) when tying to connect to a port which on localhost where nothing is listening? [10:28] tmzt: RDP proxy? [10:28] tmzt: since you're using windows vms [10:29] SubStack: rdp is involved but it's vnc for encoding [10:30] echosystm: does anyone know of a "platform as a service [10:30] echosystm: " like appengine? [10:30] tmzt: hmm, cool, pbaukus thinks innerHTML is faster than canvas though [10:30] echosystm: but not appengine [10:30] Wizek: "Operation not permitted" it says, but I'm listening for errors... [10:30] SubStack: innerHTML can't do what we need [10:30] tmzt: isn't amazon getting one? [10:31] tmzt: SubStack: no? [10:31] echosystm: amazon? [10:31] SubStack: tmzt: for copyrects you need a raster so you can copy regions and paste them elsewhere [10:32] echosystm: hmm, amazon beanstalk eh [10:32] echosystm: sounds interesting [10:32] franck34: SubStack: perhaps you know, how can i test socket.io using a node client ? [10:33] SubStack: franck34: you might be able to use https://github.com/pgriess/node-websocket-client [10:33] SubStack: at least for websocket clients [10:33] franck34: sound good, thx a lot [10:33] mattie has joined the channel [10:35] matjas has joined the channel [10:36] tmzt: SubStack: ah, ok [10:39] ron_frown: its easy to test [10:39] ron_frown: although I am nto always to get super consistent behavior out of it =( [10:43] m64253 has joined the channel [10:44] franck34: SubStack: doesn't work. when i strace server.js, i can see the GET request coming, but immediately close by my server.js, which is a minimal socket.io server :( [10:44] franck34: ACTION googling [10:46] saschagehlich_ has joined the channel [10:46] ron_frown: what transports do you have enabled [10:47] ron_frown: on the server side and js side [10:47] ron_frown: and what browser [10:47] garrensmith has joined the channel [10:47] franck34: ron_frown: i'm trying to make non browser client for testing purpose [10:47] franck34: seem's somebody already did it :) https://github.com/dpritchett/tasslehoff/blob/master/client.js [10:48] ron_frown: ahh [10:48] ron_frown: good call [10:48] mattijs: franck34: Socket.io uses it's own protocol on top of websockets (or whatever transport you use) [10:48] ron_frown: yeah i'd like something that would notify me of my node.js prob [10:48] ron_frown: seems like right this sec [10:48] tanepiper: woop! Not only did I fix cradle http requests, it also now supports https client requests! [10:48] mattijs: your clients need to support that [10:48] common- has joined the channel [10:49] SamuraiJack_ has joined the channel [10:49] SubStack: tanepiper: https! awesome [10:50] haxd has joined the channel [10:50] haxd: Morning all [10:51] franck34: mattijs: yep, i just understood that thx [10:51] haxd: Anyone who knows C++ / making modules with node about? I'm having difficulties :( [10:51] mattijs: franck34: you could have a look at https://github.com/remy/Socket.io-node-client but it's outdated [10:51] mattijs: since the protocol underwent some changes [10:52] haxd: I'm getting "error: ‘New’ was not declared in this scope" but I copy/pasted the line directly from the postgres c++ module :/ [10:53] Kingdutch has joined the channel [10:53] tmzt: how hard do you think it would be to port that to Flash AS3 directly? [10:53] sWORDs: When creating a socket with net.createServer(function(socket){...}; How can you write to that socket from another function (or how should rewrite the socket creation)? [10:53] tmzt: or socket.io itself, not to use as a socket in browser javascript but directly in as3 code [10:53] Kingdutch: Hola tmzt [10:54] SubStack: sWORDs: you can pass the socket variable around however you like [10:55] sWORDs: SubStack, I've tried socket.write but it gives ReferenceError: socket is not defined [10:56] sWORDs: socket.write does work within the original function [10:56] chapel: you could have to pass the socket to another variable [10:57] beilabs has joined the channel [10:57] chapel: it is defined only inside the anonymous callback function inside net.createServer [10:57] sWORDs: chapel, like var TCPserverSocket = socket;? [10:58] beilabs: I have node scraping a page, is it possible to scrape it after all the JS functions have been executed on it? [10:58] Wizek: What does ECONNRESET mean? [10:58] chapel: well, more like functionThatYouWantToUseSocket(socket) [10:58] tmzt: sWORDs: the first function is a callback with the socket after it's been created [10:58] garrensmith: anyone familiar with cradle? [10:59] chapel: tanepiper [10:59] chapel: is [10:59] k04n has joined the channel [10:59] clarkfischer: I really appreciate how cloud9 has like infinity submodules.... [10:59] sWORDs: chapel and tmzt, I'm sorry but I can't figure out what you mean. [10:59] tmzt: it's just a style of coding that's used in node [10:59] garrensmith: tanepiper: you familiar with cradle? [10:59] chapel: sWORDs: socket is only defined inside function (socket) {} [10:59] tanepiper: garrensmith: yes [10:59] saschagehlich has joined the channel [10:59] tmzt: just think of the first nested function as part of the way you create a socket [11:00] tmzt: you'll get used to it [11:00] franck34: mattijs: thx for https://github.com/remy/Socket.io-node-client, but not enought skill to update/fix hehe, googling again [11:00] stagas has joined the channel [11:00] chapel: the only way to access socket outside of the function is to send it to another function, or build your code to pass a call back [11:00] garrensmith: tanepiper: I cant get the destroy method to work? Is there anything special I need to do. I want to do a setup and teardown for my tests. So I can create the db but I cant delete it afterwards?? If I do a curl I can delete it [11:01] tanepiper: garrensmith: destory is probably the one bit i have't used garrensmith , but let me do a quick check [11:02] yumike has joined the channel [11:02] dsirijus has joined the channel [11:02] garrensmith: tanepiper: cool thanks [11:02] franck34: mattijs: seem's i can work around that simply ? https://github.com/franck34/Socket.IO-node/blob/master/tests/transports.websocket.js [11:03] chapel: v8: function blah(x) { return x; }; var test = blah('test'); [11:03] v8bot: chapel: undefined [11:03] andrzejsliwa has joined the channel [11:04] tmzt: why is that? [11:04] franck34: v8: function blah(x) { return x; }; var test = blah('test'); console.log(test); [11:04] v8bot: franck34: CONSOLE: ["test"], OUTPUT: undefined [11:04] chapel: v8: function blah(x) { return x; }; blah('test'); [11:04] v8bot: chapel: "test" [11:05] sWORDs: chapel, I just thought of something else, as there will be more the one clients connected or maybe even none when fetching the data, what I'm trying to do can't work. So maybe I should write the data to a variable and pass that. But how would I output something to all clients connected to the TCPServer? [11:05] chapel: :) [11:06] franck34: broadcast rulez [11:06] _jdalton has joined the channel [11:06] tmzt: sWORDs: first, node is using something called evented i/o (it's the tagline) meaning you get an event when data is received from the socket, just as you got a callback when the socket was created [11:06] tmzt: so basically you have to nest to three levels [11:06] chapel: sWORDs: http://camp.nodejs.org/videos/session-01_introduction_to_node-ryan_dahl.html watch that [11:07] chapel: basically creates exactly what you are talking about [11:07] chapel: while doing the presentation [11:07] sWORDs: chapel, I've watched every video with ryan I could find, and every video from the lead developer of v8 aswell [11:07] tmzt: net.createServer(function(socket){ socket.on('connect', function(..??..??..) { socket.write('xxx'); }); }); [11:07] tanepiper: garrensmith: works for me [11:07] tmzt: or something like that [11:07] tanepiper: how are you calling it? [11:08] admc has joined the channel [11:08] garrensmith: tanepiper: var db = new (cradle.Connection)().database('test_db'); [11:08] garrensmith: tanepiper: db.destroy(); [11:09] chapel: sWORDs: var sockets = []; net.creatServer(function(socket) { sockets.push(socket); }); [11:09] chapel: something like that [11:09] mnbvasd: oh must look at that, I currently handle stuff just with an array. [11:09] Evet: there must be an html parser in node.js :) [11:09] SubStack: loads of those [11:09] tanepiper: garrensmith: weird - what to do is pass a callback to destroy [11:09] tanepiper: so [11:10] tanepiper: db.destroy(function() { console.log(arguments); }) [11:10] tanepiper: see if you get an error response [11:10] garrensmith: should I have to close all previous connections? [11:10] tanepiper: garrensmith: have you set auth? that's possibly it. I have my admin party open, so i don't have those issues just now [11:11] garrensmith: tanepiper: that could be it, I haven't set auth. I just create connection [11:11] tanepiper: garrensmith: nope, i just added it to the end of my deploy script there so once done, it deletes the db - all done in one go [11:11] sWORDs: chapel, so I basicly create an array with sockets and output to each and everyone individualy (with a for loop or something like that)? Isn't there a way to output to all sockets? [11:12] chapel: not built in I dont think [11:12] chapel: did you watch that video I linked? [11:12] chapel: seriously, he does exactly what you are talking about [11:12] sWORDs: I'm going to watch it again [11:12] chapel: creates a tcp/http chat server [11:13] garrensmith: tanepiper: do I set aith via futon? [11:13] garrensmith: *auth [11:13] sWORDs: chapel, This is a video I haven't seen. Tnx! [11:13] chapel: figured [11:13] chapel: :) [11:14] chapel: its fun, too bad they cut out some of the parts [11:14] tanepiper: garrensmith: have you already set up an auth user in futon? [11:14] garrensmith: tanepiper: no [11:14] tanepiper: so your admin party is open? [11:14] franck34: many people are working on the same thing lol: chat systems [11:14] garrensmith: tanepiper: correct, just local machine at this point [11:14] tanepiper: garrensmith: well you should be able to destroy db's at will then [11:14] Kingdutch: franck34: One of the easier things ot build [11:14] tanepiper: did you get any repsonse in the destroy callback? [11:15] franck34: Kingdutch: yep, but that's because it's easy to be able to imagine something really more complexe [11:15] sWORDs: I'm really glad you guys (and chapel even more, bailed me out two times already) are providing so much help. As soon as I've got the hang of it I'll try to help others asmuch as I can aswell. [11:15] franck34: sWORDs: +1 [11:15] franck34: good spirit here [11:16] Kingdutch: franck34: True, I'm working on something that'll have a node backend myself, but I need to get the frontend up and running, it's such a shame that JS can be viewed/copied/modified by anyone though because that compromises data security [11:16] garrensmith: tanepiper: nope [11:16] chapel: sWORDs: yeah, I got a ton of help [11:16] chapel: so if I can help others, its worth it [11:16] chapel: I still need a lot of help haha [11:16] Kingdutch: sWORDs: Most people are here to help if they can :D Sicne we all share something we like (Node) [11:16] micheil: I can't believe I'm on php.net when working on a node.js project >_> [11:16] Kingdutch: micheil: lol [11:16] Kingdutch: Old habits die hard [11:16] pandark_ has joined the channel [11:17] micheil: trying to figure out wtf php does with dates compared to node [11:17] chapel: hmm [11:17] Kingdutch: phew, I jsut nearly send a glass of juice over my keyboard typing that last sentence o.O [11:17] tanepiper: garrensmith: not sure then :( all i can say is it works for me on my couchone instance, i've got no admin set up just now for dev and it creates then deletes the database fine [11:17] micheil: I've got 1216170865, it should be some time on the 7th July 2008 [11:17] Kingdutch: micheil: Try searching for Javascript Date() that's just implemented in Node [11:17] sWORDs: frank34, Yeah I'm so glad I'm not being kicked out of the # for being to much of a noob. It's really hard to find the right info on node.js. [11:17] micheil: Kingdutch: that's done in v8 [11:17] Kingdutch: Well yeh [11:17] Kingdutch: Isn't that what you want? [11:18] Kingdutch: Node is on top of v8 so anything that works in V8 does in node [11:18] franck34: Kingdutch: well, i begin to think of that yes ... and perhaps because datastorage now available client side, why not imagine to store js code in a encrypted datastore client side and use dynamic key to decode content and be able to exec using ... EVAL is evil lol. Just thinking .. [11:18] chapel: like what micheil? [11:18] garrensmith: tanepiper: weird, if I create and then delete it works. But if I create then later delete nothing. Could be something with the test framework I'm using [11:18] Kingdutch: franck34: The problem is, at some point you need to transfer the key to the client to run it, at which point anyone can look atthe code [11:18] saschagehlich has joined the channel [11:18] Kingdutch: you gotta decode the code to run it, if you can, so can anyone with a browser [11:19] jetienne: v8: (![]) [11:19] v8bot: jetienne: false [11:19] micheil: yeah, but I know that 1216170865 comes from php (it's from facebook's api) [11:19] sWORDs: franck34, I'll be doing the same. I'm building a controller for domotica, almost all my code will be in SQLite aswell. [11:19] jetienne: v8: (![]+[]) [11:19] v8bot: jetienne: "false" [11:19] franck34: yep, that always the same problem ... [11:19] jetienne: js is crazy :) [11:19] Kingdutch: v8 ([]) [11:19] v8bot: Kingdutch: v8 is no longer supported (except in PM). Try v8: or v8> [11:19] Kingdutch: v8bot: ([]) [11:19] v8bot: Kingdutch: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [11:19] Kingdutch: God autocomplete >.> [11:19] Kingdutch: v8> ([]) [11:19] v8bot: Kingdutch: [] [11:19] Kingdutch: v8> if ([]) [11:19] v8bot: Kingdutch: SyntaxError: Unexpected end of input [11:19] sWORDs: I'll fetch and load it (eval) every bit of data from sql into mem on startup. [11:20] Kingdutch: v8> if ([]) { return true} [11:20] v8bot: Kingdutch: SyntaxError: Illegal return statement [11:20] Kingdutch: abadeeeee [11:20] garrensmith: tanepiper: its working, its my test framework. Thanks for the help [11:20] Kingdutch: sWORDs: Then I'll just take your loading code and instead of evalling it I'll document.write it and I can just see it [11:20] Kingdutch: So no code integrity there [11:20] tanepiper: garrensmith: no probs [11:21] gattuso has joined the channel [11:21] Kingdutch: Take the packer algorithm it's something like eval(function(p,a,c,k,e,r) { stuff here } ); [11:21] franck34: ACTION poc of a testing local websocket client is OK ehe [11:21] Kingdutch: Now if I make the eval to a document.write I just get my code printed out to me [11:22] sWORDs: Kingdutch, the loading code is compiled, but you could still sniff things with wireshark [11:22] Kingdutch: compiled how? [11:22] Kingdutch: It's not JS? [11:22] clarkfischer: What's a .node file? [11:22] chapel: heh [11:22] chapel: there is no way to protect client side code [11:22] chapel: its just something we will have to get used to [11:22] chapel: so just protect the serverside [11:22] franck34: +1 chapel [11:22] sWORDs: The clients will be Philips Pronto's, Android, IOS or Windows.exe [11:22] halfhalo has joined the channel [11:22] Kingdutch: Oh ok [11:22] Kingdutch: chapel well yeh [11:23] garrensmith: tanepiper: which is nicer couchone or cloudant? [11:23] Kingdutch: I just wish JS made it easier to wrap things up like C++ 's classes [11:23] Kingdutch: I know it can be done, btu it feels weird [11:23] sWORDs: Pronto's contain javascript, but you can compile+encrypt them. [11:23] clarkfischer: like Harmony's module thingy? [11:24] tanepiper: garrensmith: i'm using couchone because it's easy, but when we go production we're hosting out own anyway within a vlan [11:24] tanepiper: plus mikeal works with couchone, so he's always good to bug for help :) [11:24] sWORDs: I haven't used Harmony's, they don't provide enough option for customisation. [11:24] Kingdutch: Anyway it's time for me to go, happy to discuss code integrity with you later on :) [11:24] Kingdutch: Good day! [11:30] chapel: hmm [11:31] Wizek: What does ECONNRESET mean, and why does it count as an error to be thrown? [11:32] mnbvasd: I'd say so.. [11:32] zorzar has joined the channel [11:32] mnbvasd: it received a RST flag in a tcp packet? [11:32] chapel: isn't it when a socket its refused or shut down remotely? [11:33] mnbvasd: or there's an error in the tcp stream. [11:33] mnbvasd: so it may mean you want to reconnect. [11:33] mnbvasd: or not. [11:33] chapel: you should be able to check for that error [11:34] echosystm: i have a general event based concurrency question [11:35] echosystm: imagine you get a request that requires you to write to one file, then write to another file afterwards [11:35] echosystm: how can you guarantee those operations happen in order and no other requests modify the first/second file inbetween the callbacks? [11:36] aklt has joined the channel [11:36] mnbvasd: echosystm: put the second write in the call back from the first write. [11:36] echosystm: that doesnt guarantee it will be called immediately after though, does it? [11:36] mnbvasd: nope. [11:36] echosystm: a callback for a different even could happen first [11:36] mnbvasd: no. [11:36] mnbvasd: well from some semi-unrelated thing yes... [11:37] mnbvasd: but nestled callbacks will work in order, so the second write would alwasys come after the first, however something else could read/write inbetween. [11:37] echosystm: yeah, thats the issue im concerned about [11:37] tanepiper: echosystm: put the write requests into an array, and pop the array when the callback is done until the array is empty? [11:38] echosystm: ok [11:38] echosystm: thats what i have done, i just wanted to check that my logic was corect :P [11:38] tanepiper: basically while (array.length) { write = array.pop; // do something with write } [11:39] mnbvasd: I need to work out some my file io stuff, it needs to be transactional too :-/ [11:39] franck34: noob question. Is there a ready to use function node side to remove \n at the end of a line ? [11:39] franck34: or need i .replace ? [11:40] mnbvasd: that's what I'd do. [11:40] franck34: k thx [11:40] mnbvasd: ACTION isn't an expert. [11:41] tc77 has joined the channel [11:41] franck34: seem's trim() exist [11:42] mraleph has joined the channel [11:44] volton has joined the channel [11:44] frodenius has joined the channel [11:46] SwiftLayer: is there a parser for node that can be used for reading and writing from and to nix config files like, httpd.conf, named.conf ??? [11:47] jetienne: franck34: really ? where did you get that [11:47] piscisaureus has joined the channel [11:48] tim_smar1 has joined the channel [11:52] jetienne: The Node.js Community Could Use Some TLC <- what tlc stands for ? [11:52] chapel: tender loving care [11:53] chapel: or the learning channel [11:53] yumike has joined the channel [11:54] jetienne: chapel: ok thanks [11:56] franck34: jetienne: interesting question. It's working in my code, but i can't find where this function is defined :) [11:56] franck34: buffer.toString().trim(); [11:57] jetienne: v8: "kjkj ".trim() [11:57] v8bot: jetienne: "kjkj" [11:57] jetienne: v8: "kjkj ".trim() [11:57] v8bot: jetienne: "kjkj" [11:57] MattJ has joined the channel [11:57] nsswb has joined the channel [11:57] nsswb has left the channel [11:58] jetienne: strange, it works in v8 bot, and in v8 from my chrome. but not in node [11:58] chapel: is it in ecma script 5? [11:58] jetienne: v8: "kjkj " [11:58] v8bot: jetienne: "kjkj " [11:58] franck34: v8: "bla\n".trim() [11:58] v8bot: franck34: "bla\n" [11:58] franck34: mpf [11:58] kawaz_air has joined the channel [11:58] franck34: ridiculous :) [11:58] jetienne: the escaping of the bot is no good [11:59] chapel: v8: 'bla\n'.trim('\n') [11:59] v8bot: chapel: "bla\n" [11:59] chapel: :) [11:59] jetienne: franck34: your line work in chrome browser [11:59] chapel: yeah the bot ignores \n [11:59] franck34: socket.io is using .trim() in one of the file [11:59] franck34: i'm using it with node 0.2.6 [11:59] franck34: so sound like a native stuff ? [12:00] jetienne: franck34: it is supported by node/v8 [12:00] franck34: ok [12:04] Wizek: v8bot: 'bla\n'.trim('\\n') [12:04] v8bot: Wizek: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [12:04] Wizek: v8bot: 'bla\n'.trim('\\n') [12:04] v8bot: Wizek: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [12:04] Wizek: v8bot: 'bla\n'.trim('\\n') [12:04] v8bot: Wizek: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [12:04] clarkfischer: `v commands [12:04] v8bot: clarkfischer: Commands: Type `v . Optionally, type `v @ to send to a specific user. `v Commands are: about, beers, commands, git, google, help, macro. Other commands: v8, `re, `pcre, `ref. Type `v help for more information. Join #v8bot for more support. [12:05] clarkfischer: `v beers [12:05] v8bot: clarkfischer: has 0 beers. [12:05] Evet: SubStack: do you monitor browserling actively? [12:05] chapel: lol [12:05] chapel: Wizek: its v8: [12:05] chapel: not v8bot: [12:05] Wizek: chapel: I know, my xchat seems to autocomplete it to v8bot... [12:06] SubStack: Evet: how do you mean? [12:06] jdalton has joined the channel [12:06] Vertice has joined the channel [12:06] Wizek: v8: 'bla\n'.trim('\\n') [12:06] v8bot: Wizek: "bla\n" [12:06] Evet: SubStack: the processes [12:06] SubStack: we have some scripts that alert us when stuff is broken [12:07] temp01 has joined the channel [12:07] SubStack: an irc bot, specifically [12:11] micheil: what was the thing for setting node's timezone? [12:13] daveyjoe_ has joined the channel [12:14] Evet: jetienne: sure :) [12:14] Fandekasp has joined the channel [12:14] Fandekasp: hello [12:16] Fandekasp: I am trying to install nodeunit for node.js , but after git clone the project and make from the directory, the sudo make install fails http://paste.pocoo.org/show/324808/ and I can't find a solution for this. Can someone help me with this ? [12:19] Fandekasp: I can't install npm either :( http://paste.pocoo.org/show/324812/ [12:21] franck34: omg :) http://zgadzaj.com/benchmarking-node-js-testing-performance-against-apache-php/ [12:22] Evet: SubStack: will you consider an isolated environment for the browsers? [12:24] yumike has joined the channel [12:26] pomodoro has joined the channel [12:29] herbySk has joined the channel [12:33] pomodoro has joined the channel [12:33] q_no has joined the channel [12:34] SubStack: Evet: we're working on that [12:34] jamescarr has joined the channel [12:35] jamescarr: wondering if I should code new work for node 0.3.6 [12:38] mytrile has joined the channel [12:40] jamescarr: is there an environment var I can set for places to look for node modules? [12:40] jamescarr: (been away too long) [12:41] SubStack: NODE_PATH [12:41] gattuso has joined the channel [12:42] jamescarr: thanks [12:43] SubStack: also npm can figure that all out [12:43] SubStack: `npm link` <3 [12:47] lintaba has joined the channel [12:47] lintaba: hy [12:48] lintaba: what editor are you using for nodejs, javascript, or css? :D [12:49] franck34: lintaba: vim [12:50] lintaba: and why? [12:50] farhadi has joined the channel [12:51] stride: why something else? [12:51] franck34: because i have linux every where and i use that since many years [12:52] svenlito has joined the channel [12:54] Wizek: can node v0.3.5 be compiled on cygwin? [12:55] franck34: http://blog.dtrejo.com/how-to-install-nodejs-on-windows [12:56] franck34: https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [12:58] Wizek: franck34: https://gist.github.com/790678 [12:59] Wizek: franck34: these are the errors I get during make [13:01] fallsemo has joined the channel [13:02] Wizek: franck34: any ideas as to how to solve them? [13:05] Utkarsh has joined the channel [13:06] _jdalton has joined the channel [13:10] herbySk has joined the channel [13:10] sWORDs: Wizek, as far as I've seen 0.3.1 is the last that works (0.3.6 doesn't work either) [13:11] opengeard has joined the channel [13:11] franck34: Wizek: sorry, no idea (i'm on linux) [13:11] Wizek: sWORDs: And what does it take to make a version work under cygwin? [13:11] chapel: well Wizek you should be happy to know ryah_ has been working on getting real windows support, not using cygwin [13:11] sWORDs: Being able to build it? [13:11] chapel: but its not easy [13:11] farhadi has left the channel [13:12] sWORDs: But there is a prebuild version aswell [13:12] sWORDs: http://node-js.prcn.co.cc/ [13:13] sWORDs: This package must be enough for most users to start experiments. It contains node.exe + dll dependencies + documentation. It's not truly 'complete' as you cannot extend Node with modules written in C++, but that requires full Cygwin installation anyway. [13:13] Wizek: chapel: That sounds interesting! How is he progressing? [13:13] beilabs has joined the channel [13:13] chapel: well I dont know the specifics [13:13] chapel: but hopefully soon for those [13:14] Utkarsh_ has joined the channel [13:14] sWORDs: Yeah, I'll be using a linux mini kernel later, but I use windows for easy testing en development [13:15] chapel: windows for easy testing/dev? [13:15] chapel: those don't go together [13:15] chapel: no offense, but I could never go back to windows and do web dev [13:15] chapel: be it node or anything else [13:16] sWORDs: lol, it saves me the time because I only have systems laying around with windows on it. Besides that I don't do web dev. [13:16] chapel: Im on a macbook [13:16] chapel: and have a hackintosh at home [13:16] chapel: so I only run osx [13:17] Wizek: chapel: I'm thinking on running a hackintosh as well [13:17] sWORDs: And I need to figure out it node will do what I wan't, else it's back to c#. I've had mac's during my childhood and hackintosh until a year ago. Nothing here now. [13:18] chapel: what do you need node to do? [13:18] sWORDs: That controller thing I was talking about. But it gets pretty extensive [13:18] chapel: did you finish the video? [13:19] sWORDs: yes, that will get me a lot further [13:19] Wizek: chapel: I've just downloaded a .vmx that supposed to have OSX preinstalled and set up, but it stucks at the gray apple logo during it's boot... Is there anything I could do with that one? [13:19] sWORDs: But the amount of things I need to build.... [13:19] chapel: uhh I dont know about vm's and osx [13:20] chapel: there is a lifehacker article on running osx off of a usb stick [13:20] sWORDs: Wizek, don't use vmware, create a dual boot. What mb do you have? [13:21] Wizek: sWORDs: P5B-E [13:21] sWORDs: Or even better, MB, CPU, NIC, SC and GPU. [13:21] sWORDs: p5b is pretty compatible [13:21] sWORDs: let me check some things [13:22] Wizek: sWORDs: I'd do doalboot, but I'm a bit afraid of darwin messing up my current mbr... [13:22] saschagehlich: Hey, I'm getting a "EBADF, Bad file descriptor" when I try to close my filestream - did anyone experience something like that before? [13:22] chapel: Wizek [13:22] yumike has joined the channel [13:22] chapel: I boot off of a usb stick [13:23] chapel: I mean, I could boot windows easily [13:23] chapel: but I dont have it installed [13:23] chapel: osx is installed on my hdd, but the boot partition is on my usb stick [13:23] sWORDs: wizek, the chipset is great, but the attansic lan and ADI audio might be problematic. Do you have any PCI NIC's laying around? [13:24] sWORDs: And if you're affraid of your mbr use a second disk [13:24] sWORDs: You can even use the windows vista/7 bootloader to select the second disk, no need to overwrite it. [13:25] Wizek: sWORDs: I don't think I have, since I'm not sue what NIC is. [13:25] shaun has joined the channel [13:25] chapel: Wizek: http://lifehacker.com/5739259/how-to-create-a-portable-hackintosh-on-a-usb-thumb-drive [13:25] sWORDs: networkcard (Network Interface Card) [13:26] sWORDs: chapel, the methods I know require a mac or hackintosh to create the usb drive [13:26] Wizek: sWORDs: No, I only have the integrted one, and I know it't problematic, even with Win7 it was... [13:26] Evet: what do you suggest for interprocess communication? [13:26] chapel: Evet: between node processes? [13:26] jetienne: Evet: dnode :) [13:26] sWORDs: Wizek: You can buy them for $5 [13:26] chapel: damn jetienne [13:27] chapel: I was going to say that [13:27] Evet: chapel: yes [13:27] Evet: jetienne: oh, dnode again :) [13:27] chapel: dnode Evet [13:27] chapel: SubStack is the man behind it [13:27] Evet: what i want to do implement multi-threading to my nodejs app [13:28] sWORDs: Wizek: If you do install macos on it connect all SATA devices to the Intel SATA ports (not to the two JMICRON ones) and don't use P-ATA (IDE). [13:28] jetienne: https://github.com/ry/node/wiki/modules#rpc <- Evet for an informal list [13:29] Evet: oh my god [13:29] jetienne: http://developer.yahoo.com/blogs/ydn/posts/2010/07/multicore_http_server_with_nodejs/ <- multi threading in nodejs with web worker Evet [13:29] chapel: Evet: well I wouldn't do multithreading like other servers [13:29] chapel: use nodes strengths [13:29] Evet: chapel: why not? [13:29] chapel: well the yahoo post gives some good ideas [13:30] chapel: but I prefer the child worker (webworker) style of handling load [13:30] jetienne: multi threading got a singnificant cost, often overlooked. [13:30] sWORDs: Wizek: On 10.6 x64 the PATA, Audio (with voodookext) and LAN (with attesic driver) appear to work. [13:30] jetienne: this is like the trademark of nodejs :) [13:30] Utkarsh has joined the channel [13:31] chapel: if you have data that needs to be shared across all node processes, use something like redis to be your memory store [13:31] Evet: i will use worker processes to use all cores [13:31] chapel: thats not always going to give you the results you want or expect [13:31] jetienne: Evet: most likely not a good idea (if you are still on the web app real time game stuff) [13:31] Wizek: sWORDs: And do I need a retail disk, or a hackintosh one? [13:32] chapel: sWORDs: well that depends, most times you can use a retail disk [13:32] Evet: jetienne: why not? [13:32] chapel: but there are hackintosh ones [13:32] sWORDs: Wizek: Depends of the method you use, there is a guide in ru [13:32] sWORDs: http://www.applelife.ru/topic/19090-macosx-106-%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B0-%D0%BD%D0%B0-pc/ [13:32] sWORDs: maybe you can translate it [13:32] jetienne: Evet: because the concurency by threading is much less than usual nodejs concurency [13:33] chapel: I prefer to have a main process that is handling logic, and if I have blocking code, send that to a worker [13:33] chapel: I would have a proxy in front of that [13:33] jetienne: Evet: aka get multple nodejs running, but each independant. get db to share data [13:33] chapel: that could dispatch another main process, that would be a duplicate [13:33] chapel: and again same thing [13:34] Evet: hmm concurrency [13:34] chapel: and use redis in the backend to handle any data in memory [13:34] texodus has joined the channel [13:35] mnbvasd: chapel: do you mean you can effectivly fork in node? [13:35] saschagehlich: Hey, I'm getting a "EBADF, Bad file descriptor" when I try to close my writable stream - did anyone experience something like that before? [13:35] sWORDs: Wizek: search for p5b-e on this page http://wiki.osx86project.org/wiki/index.php/HCL_10.6.0 [13:35] jetienne: Evet: just spend the weekend toying with socket.io. do bench, and such. [13:35] chapel: mnbvasd: umm dont think fork is supported [13:35] jetienne: Evet: i think it is the best way to get a feel of the techno [13:35] chapel: also Evet node can handle a lot [13:36] mnbvasd: chapel: aye :-/ I thought so.. I've been pondering what to do about that for multi-processing my server :-/ [13:36] chapel: I wouldn't worry about scaling before it is an issue, node is fast if you do it right [13:36] Evet: jetienne: non-keepalive benchmarks are comparable to nginx [13:36] jetienne: mnbvasd: run multiple instances of nodejs [13:36] chapel: read that yahoo link jetienne linked [13:36] charlenopires has joined the channel [13:36] mnbvasd: aye I'm thinking of that, I already have a router object, and other objects for various things, it'd be easy to split them out. [13:37] chapel: the best way to handle node for scaling is to have a proxy in front, like nginx, or a node proxy, and then each node process is just like any other [13:37] mnbvasd: I'm going to need to so I can cluster things anyway... I think a fork would be cleaner though. [13:37] mnbvasd: chapel: I'm not doing http [13:37] chapel: oh [13:37] chapel: well node proxy then [13:37] jetienne: mnbvasd: what do you do [13:37] chapel: in whatever you are doing [13:37] mnbvasd: I'm doing an xmpp server.. [13:37] nook has joined the channel [13:37] Max-Might has joined the channel [13:38] MattJ: mnbvasd: why? :) [13:38] mnbvasd: MattJ: why not? [13:38] jetienne: mnbvasd: and xmpp doesnt support the usual "one client or more per cpu" ? [13:38] MattJ: mnbvasd: I guess that's what my answer would be :) [13:39] jetienne: mnbvasd: like a given process handle a given client, chosen randomly on connection establishement ? [13:39] mnbvasd: jetienne: it's a messaging server, which is compatable with google-talk. [13:39] MattJ: mnbvasd: Wondered if there was a particular reason you chose to write your own rather than use an existing one [13:39] Evet: chapel: is single-thread node sufficient for multiple backend nodes? [13:39] yumike has joined the channel [13:39] chapel: what do you mean Evet ? [13:39] jetienne: mnbvasd: yep so suppose you get 4 cpus, you run 4 nodejs, when client connect, you assign it to a given nodejs instance. you get load balancing [13:39] chapel: you mean like a node proxy? [13:39] mnbvasd: jetienne: handle multiple clients and server connections per process.. then communicate between the processes, 1 process per connection wouldn't scale well. [13:40] Evet: chapel: a reverse proxy, like nginx [13:40] chapel: ah [13:40] Evet: but written in nodejs [13:40] mnbvasd: jetienne: aye, something like that.. I also need to run it on multiple hosts in a cluster fassion. [13:40] chapel: should be [13:40] chapel: for simple stuff like a proxy, node is more than capable [13:40] jetienne: mnbvasd: 1 process per connection is the "threading model", nodejs is not like that [13:40] mnbvasd: MattJ: all the existing jabber implementations are horrible and/or in crazy languages. [13:41] jetienne: mnbvasd: nodejs doesnt handle the cluster stuff. you need to config something in front [13:41] MattJ: mnbvasd: I object to you calling Lua crazy, but oh well :) [13:41] jetienne: mnbvasd: or you need to code it yourself [13:41] sWORDs: Wizek: I'm of watching another video, /query me if you need more, or ask chapel as he's done some hackintosh lately. [13:41] chapel: :) [13:41] mnbvasd: erlang, java, lua... well there are some c ones. [13:42] mnbvasd: jetienne: srv records in dns handle them, and if you have multiple on the same site, you can just use some tcp load balancing solution. [13:42] Wizek: sWORDs: alright, thanks for the pointers, I'm considering wheter it worths the investment of time/work [13:42] Evet: thread-based model and multi-threading used to make me confused [13:43] jetienne: mnbvasd: this is a possibility. [13:43] Evet: i think thread-based server is runs a process per connection, like apache does [13:43] jetienne: Evet: same here [13:43] Evet: and multi-threading means the server uses all cores, right? [13:43] jetienne: hmm [13:43] jetienne: i dont see a difference [13:44] mnbvasd: I'd just like to do a fork() in the code, rather than having my master router process pulling up all the client processes.. it's just going to make it complex. [13:44] void_ has joined the channel [13:44] Evet: jetienne: nginx is multi-threaded event-based http server [13:44] mnbvasd: and xmpp is all horrible and complex already ;) [13:44] jetienne: mnbvasd: agreed :) [13:44] MattJ: Pft [13:44] mnbvasd: I already had to hack tls.js so I can upgrade plain text connections to secure ones.. :) [13:45] kolbyjack: Evet: nginx is not threaded. [13:45] jetienne: Evet: note that nginx is not able to interpret your server code [13:45] MattJ: mnbvasd: Lots of protocols require that [13:45] mnbvasd: socket.upgrade(options); [13:45] jetienne: Evet: aka nginx/lighttpd/apache are not at the same level of node [13:45] mnbvasd: MattJ: indeed, it'll allow secure imap, smtp, xmpp, even vhost based ssl. [13:45] ph^ has joined the channel [13:45] Evet: jetienne: what do you mean? nginx is not able to interpret your server code? [13:46] mnbvasd: well vhost based ssl webserver would probably require a little more though and hacking. [13:46] jetienne: vhost base ssl... the holy graal :) [13:46] jetienne: Evet: nginx similar to lighttpd, similar to apache... [13:46] mnbvasd: I've never tried it on a client, but it's there in the rfcs... [13:46] jetienne: Evet: nodejs is more like ruby/php/python than apache/nginx/lighttpd [13:47] mnbvasd: but theoretically, you can just automagically upgrade after receiving the host header :) [13:47] peol has joined the channel [13:47] jetienne: :)= [13:47] kolbyjack: jetienne: Actually, you can embed lua in nginx with a third-party module. [13:48] jetienne: as you can nodejs, php, python, ruby:) [13:48] kolbyjack: No, I mean write lua directly in the config file of nginx [13:48] kolbyjack: Not just pass to a lua backend [13:48] jetienne: i think the first v8 on server what on nginx, or lhttpg [13:48] MattJ: kolbyjack: stop making me want to install nginx... [13:48] bradleymeck has joined the channel [13:49] Evet: jetienne: well, i used to build my web apps in c, as nginx module [13:49] mnbvasd: ACTION gets food [13:49] Evet: jetienne: it has a great internal api [13:49] kolbyjack: MattJ: I'm biased, but I'm here because node also looks interesting :) [13:49] adambeynon has joined the channel [13:49] jetienne: http://journal.paul.querna.org/articles/2008/12/23/mod_v8/ <- from dec 2008 :) [13:50] jetienne: he was at joost at the time tho [13:50] bradleymeck: thank god someone added coroutines as an extension, now the complaining can go to him instead of the list [13:50] charlenopires_ has joined the channel [13:50] chapel: nginx is single threaded [13:51] jetienne: all efficient codes are [13:51] jetienne: ok ok trolling [13:51] CrazyGoogle: chapel: thats not right [13:51] Evet: what exactly single threaded and multi threaded means? [13:51] Evet: apache creates new process for each connection [13:51] chapel: Evet: well single threaded means there is one thread [13:51] Evet: so its multi thread [13:52] CrazyGoogle: nginx produce somuch threads as config says, mostly = cpu cores [13:52] chapel: multithreaded means that a new thread is made every time the app needs to do something [13:52] CrazyGoogle: every request is splitet to nginx threads are configured by round robin [13:52] kolbyjack: chapel: It just means multiple threads, not necessarily a new thread every time [13:52] chapel: well sure kolbyjack [13:52] chapel: depends on the app [13:53] Evet: so, what do nginx workers refer to? [13:53] chapel: process != thread [13:53] kolbyjack: CrazyGoogle: nginx is multi-process, not multi-threaded. They don't share address space [13:53] jetienne: http://www.infoq.com/presentations/nodejs <- Evet from the *master* :) [13:53] CrazyGoogle: best practice is to start n node.js processes (equal to cpu cores) that work requests ap (like spark2 do) [13:53] kolbyjack: Evet: nginx is also multi-process, but each process runs a single thread and uses an event loop (like node) [13:54] Evet: allright [13:54] CrazyGoogle: https://github.com/davglass/spark2 [13:54] CrazyGoogle: yes, sorry. my bad [13:54] Evet: i thought multi-thread is synonym of multi-process [13:54] CrazyGoogle: i meaned processes [13:54] chapel: nope [13:54] CrazyGoogle: ACTION shame [13:55] chapel: what apache does is creates new threads [13:55] chapel: they are sub processes of the main [13:55] CrazyGoogle: its not the same [13:55] CrazyGoogle: sorry again [13:55] kolbyjack: chapel: Depends on the mpm. mpm_prefork is a process per request [13:55] yumike has joined the channel [13:55] chapel: you know, you could potentially build a web server in node that handles php [13:55] charlenopires has joined the channel [13:55] CrazyGoogle: there was epool worker for apache (but i think it was not realy good working) [13:56] CrazyGoogle: chapel: if node.js would undestand fastcgi protocol, you could bind it to php-fpm, but there are problems [13:56] mnbvasd: chapel: why not just build a webserver in php, then we could have like for like benchmarks between the node and php weberservers ;) [13:56] CrazyGoogle: technical problems as i know [13:57] chapel: haha [13:57] chapel: cause php would be super slow :) [13:57] chapel: idk tbh [13:57] bradleymeck: lol benching php [13:57] bradleymeck: nginx + apc + php does ok [13:58] mnbvasd: chapel: if you saw the benchmarks somebody pasted earlier.. they compared apache+php to node... a better comparison would have been apache+node to apache+php ;) [13:58] chapel: the way I see node, or really what made me realize how special it was (not short bus special) is that you can use node to create nginx, where as other dynamic languages probably aren't performant enough to even try [13:58] mnbvasd: chapel: the thing is that the php version didn't get the floor wiped with it. [13:59] chapel: mnbvasd: well that bench used node 0.1.x [13:59] piscisaureus has joined the channel [13:59] Evet: then, how do you encapsulate multithreading and multiprocessing? [13:59] mnbvasd: chapel: it's still v8 under the hood... it's just not that relevant imo. [13:59] chapel: I know its v8 [13:59] chapel: thats why it rocks [13:59] mnbvasd: chapel: it'd have been better to compare it to something like helloworld on a tomcat server? [13:59] CrazyGoogle: i am sure few things you can do faster with php than node.js [14:00] CrazyGoogle: or you can programm in node.js so that its slower than in anyother programming language except basic :D [14:00] chapel: probably not with apache [14:00] chapel: and yes CrazyGoogle, node can be slow [14:00] mnbvasd: CrazyGoogle: indded.. though the benchmark showed nothing, except the power of statistics ;) [14:00] chapel: because its easy to block the event loop [14:00] CrazyGoogle: hello world on tomcat can be supper slow, if server has right hardware and properly configured :d [14:01] CrazyGoogle: if you build long function that do 1sek block node.js [14:01] CrazyGoogle: you do big performance drop in node on paralel requests [14:01] mnbvasd: CrazyGoogle: aye, that's where erlang outdoes node. [14:01] CrazyGoogle: and you do not nececary need call blocking methods [14:02] tokumine has joined the channel [14:02] CrazyGoogle: just long time taking calculation without special optimizations with nexttick and so [14:02] chapel: erlang servers are multi-threaded though mnbvasd [14:02] bradleymeck: mnbvasd the way apache handles requests wouldn't sync up with node [14:02] killfill has joined the channel [14:02] bradleymeck: sadly they are fundamentally different [14:03] CrazyGoogle: but well programmed node.js code - has very good perforamance [14:03] chapel: I think the whole reliance on hello world as a benchmark is where the problem is [14:03] mnbvasd: chapel: yes, but... they also do single thread context switching... so you can run multiple loops in the same thread without them blocking. [14:03] chapel: use node at what its good at [14:04] mnbvasd: I just like it, so I'm using it for everything atm.. [14:04] chapel: I like it too [14:04] mnbvasd: I'm a builder now, and node is my hammer.. everything is a nail ;) [14:04] chapel: but I think people come in with misconceptions [14:04] chapel: haha [14:04] bradleymeck: lol [14:05] chapel: I love how easy it is to make just about anything in node [14:05] bradleymeck: i think people come to node too fast, it has a purpose [14:05] chapel: Ive made cli tools, web scrapers, random web tools [14:05] CrazyGoogle: i love too, but what i dont love - node programming is very low level [14:05] CrazyGoogle: we need more standardised way to build standard stuff [14:05] chapel: CrazyGoogle: that is what I love about node [14:06] chapel: I am not forced into doing it one way [14:06] CrazyGoogle: like handling requests, or http sessions, etc. [14:06] bradleymeck: crazygoogle have you tried the web frameworks? i mean anything else probably is going to be low level [14:06] mnbvasd: I still use perl over node for a bunch of stuff, as perl is very stable, and exists everywhere. [14:06] stride: CrazyGoogle: uh, why don't you just use something else then? [14:06] jdalton has joined the channel [14:06] CrazyGoogle: i tryed, nothing for me, so i made own for my needs [14:06] CrazyGoogle: its cool [14:06] chapel: if you want something similar to a framework, express is pretty good [14:06] CrazyGoogle: its realy cool, and i love my code. But thats what disturb me at same time [14:07] bradleymeck: lol [14:07] CrazyGoogle: everybody build own framework, that look 90% same as others [14:07] CrazyGoogle: express, meryl, connect, etc... [14:07] chapel: heh [14:07] chapel: connect is apart of express [14:07] CrazyGoogle: i actually follow a lot at github [14:08] CrazyGoogle: yes [14:08] CrazyGoogle: i know [14:08] chapel: I think too many people came in looking for rails but faster or in js [14:08] chapel: or django [14:08] chapel: pick your poison [14:08] mnbvasd: I've not done any web stuff in node yet. [14:08] chapel: but node is low level [14:09] perlmonkey2 has joined the channel [14:10] mnbvasd: chapel: it is? I thought it was very high level.. I've been strugging with md5-digest auth for a while (gave it up to do my tls stuff)... I think the issue is the high level strings. [14:10] CrazyGoogle: i know, and as i sad, its not necessary bad. I just would like to have more more stronger frameworks that would see self as standard [14:10] chapel: all I can say is that node is not even a year and a half old :) [14:10] CrazyGoogle: yeap :D [14:10] chapel: afk [14:10] CrazyGoogle: and its amazing [14:11] mnbvasd: yeah, but js is > 10 years. [14:11] mnbvasd: how old is v8? [14:11] mnbvasd: v8bot: how old are you? [14:11] v8bot: mnbvasd: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [14:11] mnbvasd: bah ;( [14:11] unomi has joined the channel [14:11] CrazyGoogle: js and v8 wasnt placed as server side solution [14:12] mnbvasd: CrazyGoogle: there's other ss js engines out there and have been for years. [14:12] Nomon: �q [14:12] mnbvasd: I've just not found any I liked. [14:12] CrazyGoogle: i know only one from mozilla [14:13] Country has joined the channel [14:14] ryah_: hello [14:15] mAritz has joined the channel [14:15] mnbvasd: ACTION waves [14:16] CrazyGoogle: hi ryah_ [14:17] CrazyGoogle: ryah_: thanks for link to Scraping Made Easy with jQuery :D Needed it today [14:17] mnbvasd: ryah_: I did some more tls hackage.. I stil need to tide the code some more, but does this look nicer as an api: https://gist.github.com/790640 [14:18] tanepiper: ryah_: you br0ked http.createClient :p (p.s. you probably didn't, the module developer was probably doing something they shouldn't :D ) [14:18] mnbvasd: ryah_: start the server/client with {startClearText: true} as an option then call socket.upgrade(options) (not mandatory) to upgrade to a secure connection. [14:19] tanepiper: CONNECT 4 ryah_ ! [14:20] piscisaureus: I cannot believe that this ryah_ is real... [14:20] mnbvasd: piscisaureus: he's just a js script really. [14:21] piscisaureus: yeah but why did ya call him ryah_ ? [14:22] gf3 has joined the channel [14:22] ryah_: mnbvasd: i don't know about this api. [14:22] ryah_: mnbvasd: i'd rather just upgrade a tcp socket [14:23] ryah_: tls.upgrade(socket) [14:23] ryah_: as opposed to an option on tls.Server [14:23] Wyverald has joined the channel [14:24] ron_frown has joined the channel [14:24] tc77 has joined the channel [14:24] eikke has joined the channel [14:26] mnbvasd: ryah_: hmm, that may be difficult, to remove the networking stuff from the socket, and insert the crypto stream between it.. [14:27] mnbvasd: I'll have to do more digging throught he stream code.. [14:27] Evet: ryah_: feature request: hack chrome os to extend node.js to an operating system. [14:27] mnbvasd: and net code. [14:28] ryah_: mnbvasd: i see [14:29] ryah_: mnbvasd: yeah i see your point [14:29] keeto has joined the channel [14:31] evl has joined the channel [14:31] evl has joined the channel [14:33] saschagehlich: ryah_: did you ever experience Bad file descriptors in 0.3.6 and 0.3.7-pre? [14:37] pyrotechnick has joined the channel [14:37] pyrotechnick: morning lads [14:37] jstemmer has joined the channel [14:39] piscisaureus has joined the channel [14:40] zz_raja has joined the channel [14:41] sid3k: is there any nodejs equivalent of python's __main__ variable? [14:42] piscisaureus: global? [14:42] piscisaureus: that you don't want to use, btw [14:42] sid3k: hmm, you mean global==exports? [14:43] bradleymeck has joined the channel [14:43] Evet_ has joined the channel [14:43] piscisaureus: no [14:43] [[zz]] has joined the channel [14:43] sid3k: so? [14:43] piscisaureus: global is just a global var [14:44] sid3k: can I use it to check if a module is main script? [14:44] bradleymeck: require.main [14:44] ttpva has joined the channel [14:45] CrazyGoogle: ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](document.cookie) [14:45] sid3k: bradleymeck: thanks [14:45] CrazyGoogle: :) [14:45] sid3k: what does it do? [14:46] CrazyGoogle: i would like to know too :D [14:46] CrazyGoogle: http://adamcecc.blogspot.com/2011/01/javascript.html [14:46] wao: :) [14:46] wao: alert [14:46] piscisaureus: v8: ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!”+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](document.cookie) [14:46] v8bot: piscisaureus: SyntaxError: Unexpected token ILLEGAL [14:46] tanepiper: CrazyGoogle: yea i saw that on reddit and had to wtf it several times [14:46] wao: lol [14:46] CrazyGoogle: yeah :D [14:47] tanepiper: v8: ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](this) [14:47] v8bot: tanepiper: TypeError: Property 'alert' of object # is not a function [14:47] tanepiper: javascriptfuck [14:47] chapel: v8: ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!”+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$]+"" [14:47] v8bot: chapel: SyntaxError: Unexpected token ILLEGAL [14:47] piscisaureus: v8: alert = console.log; ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!”+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](this) [14:47] v8bot: piscisaureus: SyntaxError: Unexpected token ILLEGAL [14:48] tanepiper: v8: global.alert = console.log; ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](this) [14:48] v8bot: tanepiper: ReferenceError: global is not defined [14:48] kuhrt has joined the channel [14:48] piscisaureus: v8: (alert = console.log) && ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!”+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](this) [14:48] v8bot: piscisaureus: SyntaxError: Unexpected token ILLEGAL [14:48] jamescarr: piscisaureus, uh [14:48] jamescarr: can you trst that out elsewhere? [14:48] tanepiper: v8: this.alert = console.log; ($=[$=[]][(__=!$+$)[_=-~-~-~$]+({}+$)[_/_]+ ($$=($_=!''+$)[_/_]+$_[+$])])()[__[_/_]+__ [_+~$]+$_[_]+$$](this) [14:48] v8bot: tanepiper: CONSOLE: [{}], OUTPUT: undefined [14:48] tanepiper: woop, i win! (well nearly) [14:49] chapel: hah [14:49] piscisaureus: tanepiper++ [14:49] v8bot: piscisaureus has given a beer to tanepiper. tanepiper now has 1 beers. [14:49] wao: :)) [14:49] jamescarr: boo... spring-amqp requires a classId header to map json objects to java objects [14:49] jamescarr: that makes my node.js -> java app communication quirky ;) [14:50] tanepiper: aww pity, i don't really drink. will exchange for Irn Bru or Mountain Dew [14:51] CrazyGoogle: so what this script do ? [14:51] CrazyGoogle: show cookies ? [14:52] CrazyGoogle: ah [14:52] CrazyGoogle: its simple alert [14:52] hij1nx has joined the channel [14:52] sid3k: guys, I'm working on a new compile tool. it'll be based on mapreduce plug-ins. any ideas and suggestions are welcome. [14:53] jlecker has joined the channel [14:53] tanepiper: compiling what? [14:54] jamescarr: callbacks probably [14:54] sid3k: compiling source code [14:54] jamescarr: another make async look sync tool :-P [14:55] sid3k: jamescarr: haha, be sure I'm aware of what I do [14:55] tanepiper: sid3k: yes, but what type of sourcecode? C/C++ ? [14:55] jamescarr: tanepiper, frankenscript [14:55] sid3k: since it's based on plug-ins, there aren't any limitations [14:56] sid3k: but its first plugin will be a new web implementation of commonjs [14:56] tanepiper: ahh, so a general puropse build tool :) have you checked out jake? [14:57] Koelkast has joined the channel [14:57] sid3k: nope, is it as extensible as the one I'm talking about? [14:59] bingomanatee: You know torture is wrong even if you are torturing robots. [14:59] bingomanatee: or logic. [14:59] stride: awesome extensible build tool? is it as extensible as writing everything you need to build again in C? [15:00] tanepiper: dunno, but might be a good start to extend rather than write another one :) [15:00] tanepiper: good build tools are hard to come by [15:00] sid3k: bingomanatee: hmm, lassie is trying to tell me something :) [15:01] bingomanatee: "Is the v8bot fell down the well?" [15:01] sid3k: stride: it'll be based on plugins with map reduce functions [15:01] stride: you're talking to collies? [15:01] bingomanatee: well the whole framework is calliesback based. [15:02] SubStack: I don't get why it's called map reduce [15:02] sid3k: a build tool doesn't have to implement everything with callbacks [15:02] SubStack: map can be implemented in terms of reduce [15:02] stride: sid3k: yeah, I have no idea how that would make my life easier honestly :) make sure to put up a fancy webpage w/ examples ;) [15:02] bingomanatee: in what context SubStack [15:03] SubStack: because monomorphisms are a strict subset of catamorphisms [15:03] sid3k: stride: all right, I'll let you guys know it when it's ready [15:04] stride: sid3k: :) [15:04] SubStack: v8: [1,2,3,4].reduce(function (xs,x) { return xs.concat(x*10) }, []) [15:04] v8bot: SubStack: [10, 20, 30, 40] [15:05] bingomanatee: Hey question: I am trying to write a component based variant of express - is there any way you can have multiple path roots to views in express? [15:05] sivy has joined the channel [15:05] mraleph: SubStack: we need more bananas and barbed wire in JS [15:06] sid3k: stride: actually, that reduce method is not functional, first of all [15:06] _jdalton has joined the channel [15:06] SubStack: mraleph: on it [15:06] sid3k: (if you wonder why, because it can't be manipulated by another function) [15:06] bingomanatee: wouldn't it be more practical to cross breed roses and bananas to produce a barbed banana that smelled like flowers? [15:06] xla has joined the channel [15:07] bingomanatee: Nobody's slippin on ronana peels [15:07] sid3k: stride: sorry wrong person [15:07] bradleymeck: banoses? [15:07] bingomanatee: Thas better [15:07] sid3k: SubStack: see what I write above [15:07] sid3k: guys, O [15:07] nsswb has joined the channel [15:08] darvvin has joined the channel [15:08] SubStack: sid3k: yes well javascript is not strictly functional in the sense that its fundamental unit of computation is not the lambda [15:08] sid3k: I've checked out jake, and wonder about whether is it possible to code a plugin building commonjs packages for web. [15:08] nsswb has left the channel [15:09] sid3k: SubStack: so why did you need to give that example? trying to tell me something I'm not aware of? [15:09] pyrotechnick: SubStack: what does ping get as it's argument in DNode? [15:09] pyrotechnick: it seems to hover between 0 and 2 [15:10] SubStack: pyrotechnick: ping the event or ping the parameter? [15:10] pyrotechnick: event [15:10] tanepiper: sid3k: it would probably be possible to write a plugin to let you run map/reduced based plugins :D [15:10] pyrotechnick: i know it takes the interval in ms [15:10] bradleymeck: could we set configurable to false to all constructors for built in types? [15:10] SubStack: should be milliseconds that the ping round-trip took [15:10] pyrotechnick: hmm [15:10] pyrotechnick: 1 ms [15:10] pyrotechnick: really? [15:10] pyrotechnick: thats cool [15:10] pyrotechnick: can it be more precise than that at all? [15:10] tanepiper: pyrotechnick: DNode is insanely fast :D [15:10] pyrotechnick: are you rounding it or is that the precision of js events [15:10] SubStack: not easily [15:11] pyrotechnick: tanepiper: yeah [15:11] SubStack: tanepiper: I know I wasn't even trying [15:11] pyrotechnick: i had it running at 20 000 Hz the other day [15:11] SubStack: actually I was actively writing things the pretty way instead of the fast way at every corner [15:11] pyrotechnick: substack i gisted the benchmark [15:11] sid3k: tanepiper: new core implementation is a good reason to code an alternative tool [15:12] tanepiper: SubStack: oh i did hit some bugs in IE though :( but tbh i dunno if they are coming from DNode or socket.io yet, i haven't dared debug it yet [15:12] SubStack: probably dnode [15:12] pyrotechnick: SubStack: https://gist.github.com/788196 [15:12] tanepiper: Die IE, Die in a fire [15:12] pyrotechnick: tanepiper++ [15:12] v8bot: pyrotechnick has given a beer to tanepiper. tanepiper now has 2 beers. [15:12] SubStack: i squashed a few and did some work with the compatability layer but didn't finish [15:12] pyrotechnick: SubStack: have you tried a benchmark like that [15:12] SubStack: but now I have browserling so I've got no excuse [15:13] pyrotechnick: tanepiper: want to run it too [15:13] jetienne: silly bot [15:13] tanepiper: pyrotechnick: i'll save it and run it later, then we can stick it up on the DNode wiki :) [15:13] SubStack: pyrotechnick: didn't I write that? [15:14] SubStack: at least part of it [15:14] pyrotechnick: yeah but you were using setTimeout, 0 [15:14] pyrotechnick: which max's at 1000 [15:15] tanepiper: oh yea, i learned that nextTick trick too :) it's ftw [15:15] pyrotechnick: run that guys [15:16] piscisaureus: ryah_: who runs/owns the other buildbots? [15:16] piscisaureus: joyent? [15:18] SubStack: pretty crazy fast, that benchmark [15:18] SubStack: I was getting 11k-15k fps [15:19] ryah_: piscisaureus: random people [15:19] bingomanatee: I was wondering why I was getting tasks assigned to me when I scratched off lotto tickets. [15:20] saschagehlich: ryah_: did you ever experience Bad file descriptors with node? I'm having this problem on 11 servers and now even on my macbook [15:20] ryah_: saschagehlich: uh - no? [15:21] aurynn has joined the channel [15:21] pyrotechnick: SubStack: yeah i get about 19K [15:21] pyrotechnick: it's good, very good [15:21] pyrotechnick: it will only get faster [15:21] Eleph has joined the channel [15:22] tanepiper: i still need to write a blog post for my dnode file upload thingy [15:22] saschagehlich: ryah_: on my local system I'm getting this error when I try to install a npm package when it tries to do fs.writeSync [15:22] pyrotechnick: tanepiper: pleaes do [15:23] SubStack: yep [15:23] tanepiper: pyrotechnick: you can get the example, it's pretty easy to follow (i hope) https://github.com/tanepiper/dnode-upload-example [15:23] pyrotechnick: tanepiper: cheers [15:24] jchris has joined the channel [15:27] jashkenas has joined the channel [15:28] gartenstuhl has joined the channel [15:28] Tasser has left the channel [15:29] devrim has joined the channel [15:32] sveimac has joined the channel [15:32] ryah_: saschagehlich: hm, seems like you should notify isaacs abou tthat [15:33] saschagehlich: well but I also get this one on my own project when I try to close a writable stream [15:33] bingomanatee: I would like to see a destination site for dnode itself [15:33] devrim: hi guys - i want to start playing with node.js, porting our current backend from go, can someone give me insight about how good node.js is accessing underlying OS ? [15:33] bingomanatee: with some cool SubStack graphics N videos et al [15:33] daveyjoe_ has joined the channel [15:34] bingomanatee: devrim: good at filesystem stuff. For more complex operations you'd have to be more specific. [15:34] devrim: any equivalency to http://golang.org/pkg/os/ [15:34] bingomanatee: Yes [15:34] bingomanatee: the process core module does most of that stuff [15:34] bingomanatee: So you can write node equivalents of bash scripts easily [15:35] devrim: thx bingomanatee [15:35] devrim: does it go this far ? http://golang.org/pkg/syscall/ [15:35] ttpva: is there a vows.js textmate bundle? [15:35] devrim: we dont really use those, but jsut checking [15:36] devrim: basically we will execute thousands of bash commands using a node.js server [15:36] devrim: where appropriate, we will use nodejs native commands instead of bash [15:36] bingomanatee: ... outside my personal experience- anyone else call bash scripts from node? [15:36] bingomanatee: ryah_ ^ ^ ? [15:37] ryah_: bingomanatee: yes [15:37] devrim: typical stuff are creating files, folders, zip, unzip, check in/out svn/git repos, creating vhost restarting webservers. [15:37] daveyjoe_: Hi, I'm trying to add a function to socket.io clients using prototype but it's not working I get the error `TypeError: Cannot set property 'remote_function' of undefined`. Code is here: http://pastie.org/1487364 [15:38] daveyjoe_: I'm a complete javascript and node.js noob by the way. [15:38] devrim: creating mongo/mysql/couchdb dbs [15:39] devrim: so each time we execute a bash command we exactly want to know what's going on with that task, is it stuck, running, exited - it should never make the server crash.. [15:40] devrim: where do you suggest me to start ? is there some similar project i can compile and run? [15:40] piscisaureus: daveyjoe: socket.clients.prototype is not what you want to extend [15:41] daveyjoe_: piscisaureus: Ok, what do I want to extend? [15:41] bingomanatee: ryah_: can you give any advice to devrim here? [15:41] pomodoro has joined the channel [15:41] bingomanatee: I do a lot in mongo with node. [15:41] bingomanatee: that part I can be definitive on. [15:41] tanepiper: devrim: you can read stdin and stdout when you execure a child process, so you can parse it [15:41] bingomanatee: Couch is REST based so I think its fair to say that node works great with REST. [15:41] tanepiper: or don't use bash, and just write the script in javascript [15:42] bmavity has joined the channel [15:42] devrim: yeah if it's available as node.js native, we will use it within [15:42] piscisaureus: daveyjoe: I don't know, it depends on what socket.io does. But *suppose* that socket.clients is populated with: [15:42] piscisaureus: socket.clients.push(new Client(bla, bla)) [15:42] piscisaureus: then you need to extend Client.prototype [15:42] devrim: bingomanatee: i guess mongo has a library for node.js right ? [15:42] bingomanatee: I think you will find experiments extremely cheap to produce and fairly successful - the libraries are fairly transparent and low leve. [15:43] bingomanatee: Yes the christkov library. You'll hvae to get your head around callback-centric access but its quite practical. [15:43] tanepiper: i do my couchdb deploy script as JS and use cradle as my "driver" for is, since it lets you write designs as actual JS objects and not strings [15:43] devrim: and running bash commands in parallel.. i'd assume threading is good in node.js ? [15:43] tanepiper: devrim: not threads, event loop [15:43] bingomanatee: Asynchronous action is good in node. [15:43] daveyjoe_: piscisaureus: Ok, I'll look through the Socket.io source and see if I can figure it out. Thanks. [15:43] bingomanatee: It is not technically threading but it is non-blocking [15:43] tanepiper: so listen for events, not threads ending [15:44] devrim: hm - any good reading for that? [15:44] piscisaureus: daveyjoe_: I didn't look at the source code but I bet you just get to it with require('socket.io').Client.prototype [15:44] bingomanatee: these IRC conversations themselves are archived and are in many cases the best reference for specific questions - http://nodejs.debuggable.com/ [15:45] bingomanatee: however the core documentation is of course at nodejs.org and distributed trhough github. [15:45] daveyjoe_: piscisaureus: Yep, looking at the source. I think you're right. [15:45] devrim: awesome - thx bingomanatee, tanepiper [15:45] bingomanatee: I think that documenation is not the area in which node excels but give us some time [15:45] devrim: i'll continue investigating [15:45] bingomanatee: Am presonally attacking that front. [15:46] daveyjoe_: piscisaureus: I assume that `this` returns an instance of the Client. Correct? [15:46] devrim: btw if it goes well, kodingen.com will run on nodejs :) [15:46] bingomanatee: Most of the principal architects of node are available fairy consistently in this forum. [15:46] piscisaureus: daveyjoe_: well it depends on the context :-/ [15:46] tanepiper: bingomanatee: ooh idea for project, couchdb + lucine backend that indexes all the nodejs irc logs, tied to a DNode powered client/server that lets you do text searches of all the logs :D [15:46] bingomanatee: Yes I think a complete in-house cloud would be fantastic. [15:47] bingomanatee: tanepiper I have that largely done [15:47] bingomanatee: noogle [15:47] tanepiper: no shit? cooooooool! [15:47] bingomanatee: I'm refactoring the MVC but I have the logs mongo indexed [15:47] chapel: tanepiper: why not just make it a couchapp [15:47] chapel: :) [15:47] bingomanatee: Yeah if you want to chip in this is my first node project but I could use some help - when I'm done I'll let you know and you guys can toss stones at it. [15:48] bingomanatee: Once I get the basic search engine I'm hopeing to follow conversational threads based on immediate responder nicks and keyword frequency matching. [15:49] chapel: devrim: are you doing the hosting, or is this working with external servers too? [15:50] bingomanatee: devrim - where are you based? [15:50] daveyjoe_: piscisaureus: Hmmm, getting error: `Cannot read property 'prototype' of undefined` now. Updated code: http://pastie.org/1487364 [15:50] sshillo has joined the channel [15:51] devrim: bingomanatee, chapel : new york, we are doing the hosting [15:51] devrim: and will extend it to any servers very soon [15:51] chapel: pretty cool, have you seen cloud9? [15:52] devrim: yes, will support that on the next release as well.. [15:52] devrim: so when u get an account it will run that out of the box [15:52] daveyjoe_: piscisaureus: Whoops, the Object is `Listener` for the server side code not `Client`. [15:52] devrim: nodejs is progressing very fast, and its extremely difficult to find ppl to work with Go [15:53] devrim: so thats why before we release it, i wanted to take a stab at nodejs [15:53] chapel: watching the screencast, looks like node.js could handle most if not everything [15:53] pietern has joined the channel [15:53] chapel: you can also create your own c++ addons to node [15:53] chapel: so if you needed something that didn't exactly exist, you could make it [15:54] devrim: we switched to Go because c++ gave us hell [15:54] chapel: if it wasn't possible in js, or something [15:54] devrim: but i see what u mean [15:54] chapel: but most if not everything is possible in js [15:54] tanepiper: devrim: did you see Bespin is being merged into cloud9 now, it's called ACE editor [15:54] devrim: they change names so fast i cant keep up anymore :) [15:54] chapel: just a though, it is hard to tell what your site is [15:55] tanepiper: well Mozilla were going to just drop Bespin, but instead of wasting it they decided to do this instead [15:55] chapel: is it a community, is it hosting, what is it, you know [15:55] devrim: but i saw ace, i hope they do a good code editor finally leave all the other irrelevant stuff aside [15:55] chapel: devrim: I think it might be prudent to make the front page focused on getting people to sign up, so keep to the hosting/online dev environment [15:56] Theory has joined the channel [15:57] Theory: How does one include another .js file without it being a module? [15:57] chapel: eval :P [15:57] devrim: thx chapel - we pretty much did everything new, almost ready to get it out [15:58] chapel: well looks interesting [15:58] SubStack: process.binding('evals').Script has some good ones [15:58] chapel: SubStack: hows browserling going? [15:58] chapel: are you guys trying to bootstrap it? [15:59] SubStack: we have been bootstrapping, but out of money [15:59] chapel: ah [15:59] jamescarr has joined the channel [15:59] chapel: anyone signing up to use it? [15:59] SubStack: a few [16:00] SubStack: we'll start ramping that up next month I expect along with some new features [16:00] yorick: devrim: :O people are actually using Go? [16:00] tanepiper: yea, we're running out of money too :( I've had to pickup some freelance work for next month on top [16:00] tanepiper: the pain of a startup [16:01] devrim: yorick: go is wonderful - it handles much better than anything else we tried [16:01] devrim: its just too hard to find devs, [16:01] yorick: congrats, you're one of the 5 people in the world who uses it [16:01] devrim: :) [16:02] devrim: be the 6th - u wont regret [16:02] bingomanatee: When you go off the reservation its usually the rule to expect to train people in your platform. [16:02] chapel: SubStack: you should check out techzing podcast, get on there and promote your site :) [16:02] chapel: talk about node [16:02] bingomanatee: Unless you are willing to stick with the herd and do Rails/LAMP/.NET, you kind of take on the burden of being a "Teaching Company" :D [16:02] mike5w3c_ has joined the channel [16:03] philipharrison has joined the channel [16:04] w0rse has joined the channel [16:04] tanepiper: haha: http://www.boingboing.net/2011/01/21/what-does-the-front-.html [16:05] chapel: yeah saw that [16:05] jamescarr: yawn [16:05] chapel: looks like a phishing site [16:05] tanepiper: only $55 to control Michigan, cheap state [16:05] tanepiper: chapel: indeed [16:05] hornairs has joined the channel [16:06] jdalton has joined the channel [16:06] joshpeek_ has left the channel [16:06] markstory has joined the channel [16:07] Theory: Be nice to Michigan :( [16:08] yorick: tanepiper: http://www.srblche.com/ [16:08] Theory: Seriously, what's the alternative to include("myotherfile.js"); [16:09] Theory: It looks like include was depcreated a while back [16:09] chapel: why dont you want to require Theory ? [16:09] Theory: chapel: How can I use require() to include something that's not a module? [16:10] chapel: just use module.exports [16:11] joshpeek has joined the channel [16:11] tanepiper: Theory: what is it you are trying to do, run a script, or include something that isn't a function? [16:12] Theory: tanepiper: I want to include a source file with functions mostly [16:13] Theory: Something similar in function to = function() {} [16:14] tanepiper: var foo = require('myfile'); foo.() [16:15] saschagehlich: https://gist.github.com/780c7ba0738626a70f18 << shouldn't this throw an error instead of displaying additional prototype functions? [16:15] Theory: What about require.paths.unshift('.') ? [16:15] texodus has joined the channel [16:16] zemanel has joined the channel [16:16] tanepiper: it's not . [16:16] tanepiper: require.paths.unshift(__dirname) [16:16] tanepiper: __dirname is the global for the current directory you are running from [16:17] tanepiper: ohmy: http://www.oampo.co.uk/2011/01/exporting-video-from-webgl/ (using nodejs!) [16:17] zemanel has joined the channel [16:17] dnolen has joined the channel [16:18] herbySk has joined the channel [16:18] tanepiper: also, haha: http://bejes.us/ another nodejs hosting platform (using the nodester platform). [16:20] tanepiper: "The Hello World of nodejs" [16:20] sstephenson: does node have something like isatty()? [16:21] piscisaureus: sstephenson: require('tty').isatty(fd) [16:22] Theory: tanepiper: , ah [16:22] piscisaureus: sstephenson: with the latest head, process.stdin.isTTY and process.stdout.isTTY also work. [16:22] sstephenson: great [16:23] sstephenson: ah, and process.binding("stdio") has an isatty() function in 0.2.x [16:23] ryah_: https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3 [16:24] ryah_: ^-- please update [16:24] ryah_: im going to spam this link about every 2 hours for the next two weeks :) [16:24] bingomanatee: how does node communicate with the bash layer - is there a way to send a bash command straight out from node.js? [16:24] ryah_: bingomanatee: child_process.exec() [16:24] tanepiper: ryah_: was this ever a proper part of the api? var client = http.createClient(/**?); client.setTimeout(/**/) ? [16:25] sstephenson: piscisaureus: thanks [16:25] ryah_: tanepiper: yes [16:25] ryah_: tanepiper: is that broken now? [16:25] tanepiper: ryah_: well 0.3.6 broke it [16:25] ryah_: tanepiper: we should fix that... [16:25] bingomanatee: awesome. [16:25] ryah_: 0.3.6 has a back port of the old http.Client [16:25] tanepiper: ryah_: https://github.com/tanepiper/cradle/commit/88cb017089aa5ddc300965ac8a2be23da3c3a184 [16:25] void_ has joined the channel [16:25] ryah_: it's not the same code base, but i'd like to get it as close as possible [16:25] tanepiper: i had to make this change in cradle to get it work [16:26] tanepiper: although that change is moving it towards 0.4 so no bad thing [16:30] Evet: what is the "Rails" or "Django" of nodejs? [16:30] mbrochh has joined the channel [16:30] mbrochh has joined the channel [16:30] ryah_: tanepiper: i added a note to https://github.com/ry/node/wiki/Migrating-from-v0.2-to-v0.3 about http.Client [16:30] ryah_: Evet: express? [16:31] Evet: checking [16:32] tanepiper: someone wrote a clone of Django, but i can't remember what it's called [16:33] ryah_: getty? [16:33] tanepiper: nahh, geddy is older, this is more recent [16:33] tanepiper: but it seems when you search `nodejs django` my site comes up top of the search :D [16:33] ryah_: https://github.com/drtyhbo/drty [16:33] pyrotechnick: evet: TBH i see express being the platform of the rails/django clone [16:34] tanepiper: that's the one [16:34] pyrotechnick: express is not quite there, and for good reason, it's not trying to be full-stack monolithic like rails/django etc [16:34] pyrotechnick: but i can see the node alternate to those frameworks sitting atop express [16:35] pyrotechnick: zappa provides a nice alternate to sinatra and sits atop express, think you have to use coffeescript though [16:35] pyrotechnick: so i see a successful full-stack framework sitting on express too [16:36] pyrotechnick: although it would be nice to have some serious competition for express [16:36] tanepiper: pyrotechnick: express is agnostic, it basically provides routes and access to middleware [16:36] pyrotechnick: yep [16:36] pyrotechnick: but i mean it has the notion of views [16:36] pyrotechnick: and an MVC example [16:36] shiawuen has joined the channel [16:37] tmzt: thats whats awesome about node [16:37] pyrotechnick: so it's halfway to rails/django [16:37] muk_mb has joined the channel [16:37] tmzt: its all modular and getting more so [16:37] MrTopf has joined the channel [16:37] fallsemo has joined the channel [16:37] pyrotechnick: it's just a matter of everyone agreeing on a standard and then making that the rails/django of node [16:37] pyrotechnick: a company with a bit of influence needs to step up and do it or it will never happen [16:37] pyrotechnick: like there were plenty of ruby app frameworks when rails was being born [16:38] pyrotechnick: but 37 signals stood up and said look we will define a nice standard to write apps on [16:38] pyrotechnick: here it is, it's rails [16:38] jakeskik: and there's still :) [16:38] jakeskik: imo express is a lot closer to sinatra than rails [16:38] pyrotechnick: i know [16:38] jakeskik: which is good, i'd say :) [16:38] Yuffster has joined the channel [16:38] pyrotechnick: but what im saying is for all the people asking for rails and django on node, everything is there, it's just a matter of someone with influence saying these are the standard tools, these are the standard APIs [16:39] pyrotechnick: there's no point sitting around saying no dont make a full-stack framework leave it ad-hoc like express is currently [16:39] pyrotechnick: there is a want for a full-stack framework, a need [16:39] pyrotechnick: it will happen [16:39] pyrotechnick: also someone needs to sort out models [16:40] pyrotechnick: there needs to be a datamapper for node [16:40] pyrotechnick: or an activerecord [16:40] pyrotechnick: i think it might be call activemodel now in rails 3 [16:40] pyrotechnick: something like that [16:40] chapel: theres bigorm [16:40] chapel: or biggyorm [16:41] chapel: dont remember [16:41] pyrotechnick: yeah [16:41] chapel: lots of other orms [16:41] pyrotechnick: i guess what im saying is that i think it might need to be sponsored [16:41] tmzt: is it possible for require to be extended, say to allow something like npm to provide versioned dependencies without symlinks? [16:41] chapel: you're saying, ryah_ has to say this is the divine framework/way to node? [16:41] pyrotechnick: the full-stack framework, the ORM, the tools, everything that has gone into rails and django [16:41] piscisaureus: ryah_: you just won the "most incomprehensible tweet award" [16:41] pyrotechnick: not ryah_ [16:41] pyrotechnick: matz didnt make rails [16:41] pyrotechnick: so ryah_ doesnt have to make X [16:42] chapel: sure [16:42] pyrotechnick: but it needs to be someone with the communities blessing [16:42] pyrotechnick: someone objective [16:42] pyrotechnick: someone with money [16:42] pyrotechnick: and developers [16:42] chapel: idk, whats the biggest company that is running node, and has contributed the most to it, by modules or whatever? [16:42] pyrotechnick: and sway and influence [16:42] pyrotechnick: joyent [16:42] Aikar: ryah_: [16:42] Aikar: process.inherits = [16:42] Aikar: removed('process.inherits() has moved to sys.inherits.'); [16:42] Aikar: in node.js [16:42] chapel: well outside of joyent [16:42] Aikar: needs to say utils.inherits doesnt it :P [16:42] chapel: since joyent = ryah :) [16:42] pyrotechnick: Aikar: no point telling him here lol [16:43] pyrotechnick: file a ticket [16:43] chrischris has joined the channel [16:43] pyrotechnick: submit a pull-request [16:43] pyrotechnick: outside of joyent [16:43] pyrotechnick: in the open-source world? [16:43] pyrotechnick: or in the private sector? [16:43] ryah_: pyrotechnick: probably palm or yahoo [16:43] ryah_: or sencha [16:43] pyrotechnick: yeah [16:43] pyrotechnick: i would have said palm [16:44] chapel: what about non-big companies [16:44] pyrotechnick: but i know of a few private places using node in finance [16:44] chapel: since 37 signals started small [16:44] chapel: indie [16:44] pyrotechnick: and theres BIG $$$ involved [16:44] tanepiper: Sencha seemed to have dropped the ball, based on what creationix was saying [16:44] chapel: honestly, I dont think node needs a 'rails' [16:44] pyrotechnick: you dont [16:44] pyrotechnick: but fortunately theres alot of other people that do think so [16:44] pyrotechnick: so it will happen whether you like it or not [16:44] ryah_: piscisaureus: http://www.youtube.com/watch?v=PElhV8z7I60 [16:45] chapel: I do think some goto source for anyone not in the community would help [16:45] chapel: pyrotechnick: I have no problem with it happening [16:45] chapel: as long as it doesn't get pushed into node core [16:45] chrischris has joined the channel [16:45] pyrotechnick: it wont [16:45] pyrotechnick: ever [16:45] pyrotechnick: it will drive node-core [16:45] pyrotechnick: but it wont infiltrate it [16:46] pyrotechnick: similar to how some active support stuff got into ruby over the years [16:46] chapel: my main problem with the docs, is that its hard to know how to use something just from a description [16:46] chapel: sometimes an example goes miles [16:46] chapel: I think node needs an example repo [16:46] pyrotechnick: the docs of node or a FSF? [16:46] chapel: for every part of the api [16:46] chapel: node docs [16:46] kevwil has joined the channel [16:46] mnbvasd: I think the docs are great on the whole.. [16:46] pyrotechnick: chapel: i am |-| close to starting a community site for node [16:46] pyrotechnick: kind of like howtonode [16:46] mnbvasd: most of them have examples. [16:46] tanepiper: chapel: docs will natually improve - maybe worth doing a sprint one weekend like MDC is doing next week [16:46] pyrotechnick: but more of a wiki than a blog [16:46] mnbvasd: just the api descriptions parts can be a bit sticky though. [16:46] chapel: pyrotechnick: I would be willing to help [16:47] arrty has joined the channel [16:47] pyrotechnick: chapel: you should skype me sometime [16:47] pyrotechnick: i am pyrotechnick [16:47] pyrotechnick: just a 5 min chat [16:47] pyrotechnick: let you know my thoughts and vice-versa [16:47] chrischris has joined the channel [16:47] chapel: possibly [16:47] pyrotechnick: because a few times ive been like ry nodejs.org needs this on the front page and maybe he agrees maybe he doesnt but 90% of the time he's just doing things more important to node in the long run [16:47] chapel: I never keep it open [16:47] chapel: yeah [16:48] jpld has joined the channel [16:48] jpld has joined the channel [16:48] Kingdutch has joined the channel [16:48] pyrotechnick: but that doesnt help people trying to get into node when npm isnt on the front page of nodejs.org [16:48] polotek has joined the channel [16:48] chapel: the good thing about ryah, is that he does [16:48] chapel: he does, and just doesn't say [16:48] pyrotechnick: the other good thing is that he doesnt [16:48] chapel: but node does need a big sayer [16:48] pyrotechnick: sometimes not doing is better than doing [16:48] Christopher_Bisc has joined the channel [16:48] mnbvasd: pyrotechnick: unfortunatly npm is a bit crappy in my expereince.. [16:48] Evet: heh [16:48] pyrotechnick: its just growing pains [16:48] mnbvasd: it's not stable yet :-/ [16:49] pyrotechnick: i personally use it many times an hour all day long everyday of the week [16:49] chapel: I really haven't been apart of anything open source, so I dont have a good grasp on that whole thing [16:49] pyrotechnick: mnbvasd: NOTHING in node is stable [16:49] pyrotechnick: dont be afraid of changing APIs [16:49] mnbvasd: indeed. [16:49] chapel: npm? [16:49] chapel: I have had no issues with it [16:49] tmzt: ryah_: would it make sense for require to have an extension mechanism for the resolver, say to allow something like npm to provide versioned dependencies without symlinks? [16:49] Evet: best thing about node is: socket.io [16:49] mnbvasd: every time I've tried to use it things are broken, randomly betwen stable and unstable. [16:49] tmzt: or does npm already have that if you trquire it? [16:49] pzich_ has joined the channel [16:50] pyrotechnick: chapel: do be honest i didnt really consider myself an open-source dev until about 6 weeks ago. i was really depressed from not being able to do much in rails and just had this sort of gloomy cloud over my head feeling like something just wasn't right [16:50] pjackson has joined the channel [16:50] pyrotechnick: then node and coffee came along and it sounds stupid but it literally turned my life around [16:50] pyrotechnick: now i'm on a 100K+ a year node project and am loving it all [16:50] tanepiper: pyrotechnick: that happened to me with I started using DNode [16:51] tanepiper: daamn, throw some of that goodness this way ;) [16:51] pyrotechnick: i still am in shock someone would put me on [16:51] chapel: yeah [16:51] dahankzter has joined the channel [16:51] chapel: Id be happy with $20k a year [16:51] pyrotechnick: but im starting to accept the 2 months i spent doing nothing but hacking on node is just paying off and i deserve it [16:51] chapel: well at first [16:51] Theory: http://pastie.org/1487512 -- What am I doing wrong? [16:51] pyrotechnick: chapel: how is your coffeescript? [16:51] Qbix1 has joined the channel [16:51] pyrotechnick: we need a part time dev for our game [16:51] tmzt: be happy with something, no money startup in the wrong state are draining me [16:51] tanepiper: i'm supposed to be on £30k p/a to start with, but there was only £15 in the pot and it's now dry :( [16:52] pyrotechnick: same goes for anyone else in here [16:52] chapel: I honestly haven't touched coffeescript [16:52] tanepiper: *£15k [16:52] Evet: pyrotechnick: nice story :) [16:52] pyrotechnick: it's true [16:52] chapel: I dont work in the tech industry [16:52] pyrotechnick: not yet [16:52] piscisaureus: Theory: foobar function() maybe? [16:52] mnbvasd: Theory: exports.foobar = function () [16:52] tmzt: pyrotechnick: game? [16:52] chapel: I make $20k a year baby sitting developmentally disabled people at night while they sleep [16:52] Christopher_Bisc: what kind of game? [16:52] pyrotechnick: github.com/feisty/ToE [16:52] Theory: mnbvasd: In foobar.js? [16:52] pyrotechnick: MMO [16:52] pyrotechnick: played minecraft and/or WoW? [16:53] mnbvasd: Theory: yes [16:53] chrischris has joined the channel [16:53] Christopher_Bisc: enough to know [16:53] Evet: why do people need thousands of bucks for a website startup? [16:53] pyrotechnick: well imagine if they had sex [16:53] pyrotechnick: so MMO minecraft with classes [16:53] chapel: pyrotechnick: honestly my end goal is to make games [16:53] mnbvasd: Theory: then require ( "./foobar" ).foobar;w [16:53] pyrotechnick: combined with a physics sandbox like eve/garrysmod [16:53] pyrotechnick: well keep in touch guys [16:53] chapel: and to further extend that [16:53] piscisaureus: Theory: make sure to call app.foobar() if you use exports.foobar = function() [16:53] Christopher_Bisc: sounds like theres going to be a new anon group :-p [16:53] pyrotechnick: watch the projects and stick around in here [16:53] chapel: a mmos [16:54] pyrotechnick: github.com/feisty [16:54] pyrotechnick: we're also doing some 2d facebook stuff [16:54] pyrotechnick: mason [16:54] Theory: piscisaureus: So node.js wants you to put your functions in proper namespace [16:54] tmzt: pyrotechnick: awesome, I wanted to do something like that but it was supposed to be limited to your facebook friends [16:54] pyrotechnick: but i do want a good part time dev who is a wizard at coffee and node [16:54] pyrotechnick: if anyone knows anyone [16:55] chapel: Theory: http://howtonode.org/creating-custom-modules [16:55] tmzt: coffeescript is not too bad if you know js right? [16:55] piscisaureus: Theory: there is no global scope that is shared amongst modules (unless you explicitly set an env var to enable it) [16:55] pyrotechnick: tmzt: no, it's excellent [16:55] pyrotechnick: if you want a tute jump in #coffeescript [16:55] tmzt: I mean too bad to learn [16:55] pyrotechnick: nope [16:55] piscisaureus: Theory: what chapel said :-) [16:55] pyrotechnick: do you like python [16:55] Evet: what is unstable about node.js? [16:55] tmzt: Ill join but im on a cell phone riht now [16:55] pyrotechnick: Evet: the API changes alot [16:55] pyrotechnick: in uneven versions like the current 0.3 versionm [16:56] pyrotechnick: but when it goes 0.4 it will be stable for a while [16:56] tmzt: yeah love python just dont have a web framework on it I actually like [16:56] chapel: I dont know python :P [16:56] Evet: hmm [16:56] tmzt: if you have a tab key it works [16:56] tmzt: learned jade in a few minutes [16:56] pyrotechnick: tmzt: yeah just between you and I (DJANGO DEVS STOP READING) but django is horrible [16:56] pyrotechnick: i know what you're saying [16:57] tmzt: I like cherrypy but I didnt think it would scale [16:57] tmzt: then I got a paying intership doing asp.net [16:57] polotek: django's not horrible. it's just not perfect [16:57] chapel: django was created by a newpaper for their publishing system right? [16:57] tmzt: which wasnt too bad [16:57] Theory: Yay. my server works :) [16:57] polotek: it's awesome for a certain class of websites or apps [16:57] tanepiper: pyrotechnick: the app i'm working on now i switched from django to nodejs + couchdb [16:57] tmzt: then did something on my own is asp.net but ended using it just for json rest stuff with dojo [16:58] tanepiper: i was sick of Django screaming like a baby when I tried to do something it didn't like [16:58] tmzt: which was pointless, its too big for that [16:58] pyrotechnick: tanepiper: cool! [16:58] pyrotechnick: anyway tmzt coffee is much like python [16:58] tmzt: so I wanted to rip out routing and write it as a whatever com object ms uses for iis [16:58] pyrotechnick: but with js semantics [16:58] tmzt: yeah it looks good [16:59] Theory: tmzt: Any paid node.js work? [16:59] polotek: tanepiper: that's probably the biggest problem with django [16:59] tmzt: not yet :) [16:59] polotek: it tries to be module in places, but it's monolithic at this point [16:59] polotek: hard to be as flexible as you need to be for some things [16:59] polotek: s/module/modular/ [16:59] tanepiper: polotek: it's the Model's that are it's own worst enemy [16:59] Theory: <-- Prefers Javascript over python and ruby syntax [17:00] polotek: Theory: me too, but it's not just syntax [17:00] tmzt: then I needed comet so I started using AspComet and found I couldnt send messages from other code (like a twilio twiml responder) without hacking it to pieces [17:00] polotek: I find the semantic rules for javascript simple and easy to grasp [17:00] Theory: yeah [17:00] tmzt: blah blah blah and then I found node a few months later [17:00] polotek: that's not to say they always make sense :) [17:00] polotek: but it doesn't try to be too clever [17:00] tmzt: models are hard [17:01] tmzt: they cant quite work right conceptually without writting way too much boilerplate [17:01] Evet: client side development getting more and more important everydat. i think a node.js framework will have a big advantage over django/rails: integrating both client/server side [17:01] Evet: everyday* [17:01] tmzt: like backend, it mostly looks good but its too much (code) overhead [17:01] Theory: I think I need coffee before I can node :( [17:01] Theory: ACTION starbucks [17:02] polotek: the thing I worry about with node is security [17:02] altamic has joined the channel [17:02] tmzt: yeah, something that really ties together frontend and backend with a transparent event api would be just awesome [17:02] polotek: people will start doing really dumb stuff trying to connect their front and back ends [17:02] tmzt: with fully authenticated actions [17:03] piscisaureus: who is on top of this monkey rock? [17:03] chapel: saying that, I think that is what would really define node apart from the rest [17:03] Aikar: Theory: dont hipster it up! go to a local coffee shop instead :P [17:03] chapel: is a full front and back end application framework, where you write the code once, and it just works [17:03] tanepiper: polotek: that's what I am doing using DNode :D but at least I'm aware I need to fix my security model before we go live [17:04] polotek: starbucks is the devil [17:04] tmzt: I think ws needs two encodings, a fast biderectional utf8 event stream and a full binary encoding with neccessary overhead [17:04] Evet: could someone explain what exactly DNode is? [17:04] chapel: ie, you write the server code, and everything, and it would generate the client code that matches but would be secure [17:04] polotek: and now you can get 31 oz of evil [17:04] tmzt: Evet: I can try if Sub isnt here [17:05] tmzt: can require.js work by wrapping node modules in a pre and post? [17:05] polotek: "Asynchronous object-oriented RPC for node.js" https://github.com/substack/dnode [17:06] Theory: Aikar: Only a true hipster would accuse Starbucks patrons of being hipsters. [17:06] tmzt: is there a way to describe interfaces in any of the javascript wrapper or derivatives? [17:06] _jdalton has joined the channel [17:07] softdrink has joined the channel [17:07] polotek: tmzt: you're thinking of traditional OO interfaces? [17:07] aconbere has joined the channel [17:07] tmzt: yeah contracts without implementations [17:07] Aikar: Theory: that statement doesn't make sense. [17:07] piscisaureus: ryah_: when 0.4 is released, will 0.2 still be maintained? [17:07] Evet: polotek: what is an "Asynchronous object-oriented RPC"? [17:07] polotek: I've meaning to try out a few libs that offer that [17:08] ryah_: piscisaureus: a little, maybe [17:08] piscisaureus: ok [17:08] ryah_: obviously i don't want to support v0.2 forever [17:08] polotek: Evet: did you read the readme on that page? it's a pretty decent intro [17:08] tmzt: Evet: it would be easier to answer questions you may have [17:08] Aikar: ryah_: Remember I made a topic about making node behave like require, so node would load dir/index.js, well i got that working with 1 line of code changed lol [17:09] Evet: polotek: i did this morning [17:09] wakawaka has joined the channel [17:09] polotek: ryah_: only major security fixes get back ported, that's usually sufficient [17:09] polotek: 0.2 has been really stable for a while now [17:09] polotek: for me at least [17:09] Aikar: ryah_: src/node.js line 447 Module.runMain [17:09] Aikar: Module._load(process.argv[1], process.mainModule);//process.mainModule.load(process.argv[1]); [17:09] Aikar: that makes node load just like a require [17:09] wakawaka: hi all, is there anyway to install jade or haml.js from the git repo? or do i have to use kiwi/npm? [17:10] Aikar: any negative effect to that that you can think of? [17:10] polotek: tmzt: you might checkout http://traitsjs.org/ [17:10] tc77 has left the channel [17:10] polotek: not exactly what you asked, but a different approach [17:10] Kingdutch: Guys what's the best way to structure JS classes? Like how do you decide what goes where? [17:11] polotek: basically using behavior composition as a first class feature [17:11] wakawaka: anyone use jade or haml.js with express? [17:11] polotek: tmzt: also https://github.com/kriszyp/compose [17:11] dthompson has joined the channel [17:11] polotek: similar kind of thing [17:12] Evet: tmzt: so dnode is an volatile object database with Async RPC API? [17:12] polotek: but to answer your question, I haven't seen anything that describes interfaces without the behavior also attached [17:14] herbySk has joined the channel [17:14] Theory: polotek: HTML? [17:14] polotek: Kingdutch: I consider modules to be the main unit of organization, not classes [17:14] polotek: Theory: I mean in js :) [17:15] Kingdutch: polotek: That's looking at Node though, I mean JS in general, for like client side too [17:15] Kingdutch: (WebGL specifically but yeh :') [17:15] polotek: Kingdutch: use modules in your client too :) [17:15] Theory: Structure is HTML, presentation is CSS, and Javascript is behavioru :) [17:15] Aikar: ryah_: https://github.com/ry/node/pull/575 [17:15] tmzt: Evet: no, dnode you write the server side code executed in response to client requests [17:16] Theory: Or are we thinking of pwning CSS/HTML? :) [17:16] polotek: Theory: I'm not sure what you're getting at [17:16] tmzt: wakawaka: using jade loving jade [17:16] polotek: we're only talking about javascript code [17:16] Kingdutch: polotek: Sounds like a bad idea [17:16] polotek: or at least I am [17:16] polotek: Kingdutch: why is that? [17:16] maushu has joined the channel [17:16] Theory: polotek: Neither am I. Coffee is a horrible thing when you get addicted and are too tired to make it ;( [17:17] polotek: a module is just encapsulated js code [17:17] wakawaka: tmzt: sweet, anyway to get up and running with jade besides using npm? [17:17] tmzt: I think im using npm for that [17:17] polotek: and "classes" are just functions that create objects [17:17] Theory: ACTION can't even write the simplist code without coffee and nodose pills anymore, unfortunately [17:17] Kingdutch: polotek: You'd still need to decide what goes where, and the modules aren't much more than classes either [17:17] Aikar: screw jade, Nova ftw! >_> http://aikar.co/2011/01/21/nova-javascript-based-template-engine-nodejs/ [17:17] polotek: so in terms of organization, put all related classes and functions in one module namespace [17:17] tmzt: polotek: I know, Im thinking of a generator for dnode client side [17:17] Kingdutch: Except iirc modules olny really encapsulate behaviour and not data [17:18] aklt has joined the channel [17:18] Theory: Templates are evil. [17:18] polotek: Kingdutch: nope, they can hold state variables just fine [17:18] Kingdutch: polotek: Classes in JS are just functions that create objects, classes in general do more [17:18] polotek: Kingdutch: we're not saying different things [17:19] polotek: maybe I don't get your question [17:19] polotek: are you talking about where to put your files? [17:19] kuhrt has joined the channel [17:19] Kingdutch: I'm talking about how to decide what functionality goes where [17:19] chapel: if anyone is interested in a cool template engine, I like dust [17:19] aklt has joined the channel [17:19] Kingdutch: Like, a vertex buffer would be stored where and constructed how? In a constructor, or would you use a function to pass in vertices or? [17:19] chapel: http://akdubya.github.com/dustjs/ [17:19] tmzt: TBL is a random guy on the internet? [17:20] polotek: ah, you're talking about module design actually [17:20] tmzt: so any template engine that can generate jquery-style tables/grids? [17:20] polotek: that's pretty subjective. you won't find a lot of consensus in the node community [17:20] polotek: there is still a lot of experimenting going on [17:20] Aikar: chapel: check out mine :) [17:21] polotek: I like to have my modules organized like components [17:21] polotek: so expanding your example I would have a module that had a vertex class, an edge class a graph class, etc [17:21] chapel: I like the idea Aikar, but I prefer to write html as html [17:22] chapel: not a big fan of jade either [17:22] Aikar: well you can still in mine lol [17:22] polotek: and various functions that were related to manipulating those things [17:22] Kingdutch: polotek: But in the vertex class, where'd you insert the data for the vertex [17:22] Kingdutch: in the constructor? make a function to set it? Or what? [17:22] Kingdutch: That's my problem [17:22] polotek: I've picked up the node habit of using factory functions [17:23] polotek: var point = graphModule.createVertex( x, y, z ) [17:23] stride: wow. dust looks great [17:23] polotek: inside that it was basically return new Vertex(x, y, z) [17:23] Evet: tmzt: ah, so dnode is used for integrating objects, their methods and statements between client-side and server-side [17:23] Kingdutch: Hmm ok [17:23] polotek: but it's usually good to avoid having other code directly call "new" on your constructors [17:24] Kingdutch: How do you figure that? [17:24] polotek: better for testing, more maintainable if you decide to change implementatinos [17:24] Aikar: chapel: actually doing something like return [fs.readFileSync('./header.html'), nova.onRender(function(vars, render) {}), fs.readFileSync('footer.html')]; would save it time in compiling {x:y} syntax to html. but the goal was to let you write it faster w/o typing all the < > and closing tags, and it handle indentation for you too [17:24] tfe_ has joined the channel [17:25] Kingdutch: Hmm ok [17:25] chapel: yeah Aikar [17:25] chapel: very cool [17:25] Kingdutch: But ok I'm gonna go upstairs 'n make some music [17:25] Kingdutch: bbl [17:25] chapel: I still like to separate display code, and its easier for me to visualize things as I go when writing it [17:26] Aikar: well as i said in my blog post, im giving ya the power to just do w/e the hell ya want :P dont have to put logic in the template if ya dont want to [17:28] Theory: Aikar: Twitterized, what is a template? [17:29] daveyjoe_ has joined the channel [17:29] Theory: Aikar: Can a template encapsulate behavior, presentation, and structure? [17:29] tmzt: is there something like jade but extensible? the tight compiled regexes make that difficult [17:29] cloudhead has joined the channel [17:32] Aikar: Theory: sure, a template engine is suppose to be a tool to help you layout the view of your content. and in some cases logic to dictate partials makes more sense in the template than in the controller [17:32] [-_-_-_-_-_-_-_-: I see. [17:32] polotek: Aikar: did you link to this lib? I missed it [17:32] Aikar: http://aikar.co/2011/01/21/nova-javascript-based-template-engine-nodejs/ [17:33] Aikar: im hoping to have it ready by tomorrow evening, but dont hold me to it >_> [17:33] Aikar: may end up playing video games all day/night tonight instead, weekends are hard to really plan for :p [17:33] piscisaureus has joined the channel [17:34] polotek: Aikar: what's up with the nested arrays? body: [[ {'div': ...} ]] [17:34] Aikar: but seeing if(loggedIn) render('loggedInHeader'); else render('guestHeader') makes more sense than render($headerFile); [17:35] texodus has joined the channel [17:35] Aikar: theres 2 levels, the main root tree, and if an element in the root tree is an object (ie {body:[]}, the array after body: defines properties for that node [17:35] Aikar: but in clearest way, {body:[{attributesToTheNode}, [childrenNodes]} [17:36] Aikar: so body: [[ ]] is simply no attributes [17:36] Aikar: thatll all be documented [17:37] tlrobinson has joined the channel [17:37] Aikar: {div:[{id:'main'},[{span:[['Hello']]}]]} translates to
Hello
[17:37] chapel: you know what would be even more cool Aikar [17:37] yx has joined the channel [17:37] chapel: is if you could take html and make it into your template objects [17:38] Aikar: but its smart and if it detects {} instead of an array, it knows thats the args and it has no children [17:38] cloudhead has joined the channel [17:38] Aikar: chapel: lol, that could be doable, but the sloppy ways people write HTML could be difficult [17:38] Aikar: ie opening tags with no close (
,
etc) [17:38] chapel: sure [17:38] mnbvasd: Aikar: you just need some slack lazy xml parser ;) [17:38] chapel: :) [17:39] chapel: just saying [17:39] dgathright has joined the channel [17:39] Aikar: but yeah, ive made it try to figure out what you mean in almost every context [17:39] chapel: cause that would make it more useful imo, write the template how you expect it, be able to put it into memory as an object or whatever, and then interact with it that way [17:39] Aikar: ie {span:'Hello'} [17:39] mnbvasd: there's an xml->json style parser... I wrote my own not liking it, then realised it needed to be very similar in the end. [17:39] tmzt: how hard do you think it would be to add proper require support to a web browser? [17:39] Aikar: well thats not an array, so it auto knows to use a child node of a string instead [17:40] booo has joined the channel [17:40] tmzt: and which web brwoser [17:40] sriley: not closing br etc sloppy... its just not xhtml, html shouldnt close them [17:40] chapel: tmzt: there are commonjs implementations for the browser [17:40] Aikar: chapel: not really lol, this engine translates nova syntax to HTML on compile time [17:40] chapel: http://tagneto.blogspot.com/2009/11/javascript-module-loading-browser-and.html [17:40] bingomanatee: another satisfied noder [17:41] tmzt: chapel: kind of a different question, ita a proof of concept and very experimental [17:41] chapel: could be old [17:41] chapel: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=commonjs+browser [17:41] bingomanatee: mnbvasd: what is that parser called? [17:41] tmzt: but if done right it should be a small patch assuming js context apis arent completely broken [17:41] mnbvasd: Aikar: I don't think it's that simple {'elem':'span','attr':{'id':'myid'},nodes[{newelem},{newelem}]} [17:42] Aikar: mnbvasd: huh? O.o [17:42] cloudhea1 has joined the channel [17:42] Aikar: that syntax would kill the idea of easier/quicker to write than plain html [17:42] tmzt: the hard part is enforcing cross domain security in one page [17:43] Aikar: chapel: https://gist.github.com/791294 theres an example of what it looks like on compile [17:43] chapel: http://www.sitepen.com/blog/2010/07/16/asynchronous-commonjs-modules-for-the-browser-and-introducing-transporter/ << tmzt [17:43] Aikar: you see all the html has been built and cached until it hits an onRender function [17:43] Aikar: then it resumes back to the cached html [17:43] mnbvasd: on the modules page: https://github.com/ry/node/wiki/modules -> https://github.com/maqr/node-xml2js/ [17:44] mnbvasd: iirc [17:44] bingomanatee: ACTION thinks the font tag will come back ... with a vengnece! [17:45] mnbvasd: Aikar: you need to have an array of children.. if you think of html, you have -> , then -> [17:45] mAritz: are there good libraries to make websites completely ajax based? [17:45] mAritz: i'm currently working with jquery and backbone.js. [17:45] chapel: mAritz [17:45] chapel: check out sammy.js [17:46] Aikar: mnbvasd: im really confused on what your trying to say lol, why are you telling me what is needed, needed for what O.o? [17:46] mAritz: (oh i'm mainly talking clientside, but node.js stuff for handling that would be welcome as well. :D ) [17:46] chapel: handles routes sinatra style [17:46] mAritz: chapel: i will, thanks :) [17:46] chapel: think express, but on the server [17:46] liar has joined the channel [17:46] chapel: since they are both based on sinatra [17:46] mnbvasd: Aikar: sorry I was trying to say how parsing xml to an object isn't really that nice :-/ [17:46] mAritz: uhm... express is on the server as well?! (and i'm using ni+express right now and don't plan on switching :P ) [17:47] chapel: err [17:47] chapel: sorry [17:47] chapel: browser [17:47] chapel: :) [17:47] Aikar: oh yeah, well i could use that lib to build it to an object, then translate that object to my syntax, but that really iso nly useful for helping people 'convert' over [17:48] piscisaureus: ACTION dinner time [17:49] jashkenas: ... don't checkout Sammy if you're already using Backbone -- they don't go together. [17:49] mAritz: jashkenas: that was my next question. i had already typed it half-way [17:49] mAritz: :D [17:49] mAritz: jashkenas: can you recommend something? [17:49] jashkenas: recommend something? [17:50] Aikar: i was also thinking last night. I could render a client side portion to this, and design your site around it to stream nova syntax straight to client if they java JS enabled and only rerender parts that change on a page. but that would be huge and come later [17:50] mnbvasd: jashkenas: recomend he make us all tea? ;) [17:50] chapel: jashkenas: they can go together, but aren't exactly compatible out of the box [17:50] aconran____ has joined the channel [17:50] mAritz: how to handle single-page apps with backbone.js. i haven't done much with backbone.js yet, but i like it. [17:50] Ond has joined the channel [17:51] jashkenas: chapel: Backbone and Sammy are different ways to accomplish the same goal ... using them together would be like including Prototype and jQuery on the same page. [17:51] chapel: Aikar: your template engine would go good with something like dnode and the client [17:51] mAritz: i could just use bbq and handle everything myself, but if there's a good solution ready to use, i'd prefer that [17:51] mischievious has joined the channel [17:51] chapel: jashkenas: well sammy is simple, it just does views [17:51] chapel: the rest is up to you [17:51] chapel: backbone is mvc [17:51] jashkenas: mAritz: backbone already does routing for you. [17:51] mnbvasd: Aikar: what would be cool is having a fully ajax rendered site, but building it to work statically and work with static urls for web crawlers and people running noscript :) [17:52] mAritz: jashkenas: really? since when? (haven't checked the docs in quite a few weeks, will do so now again :D ) [17:52] Aikar: mnbvasd: sorta what i was invisioning, but using socket.io with websockets instead [17:52] Aikar: to have an extremely fast render [17:52] jashkenas: mAritz: looking at the changelog, since 0.3.0 ... on November 9th. [17:52] mnbvasd: Aikar: yeah, but not web crawler friendly? [17:52] hij1nx has joined the channel [17:52] jashkenas: Aikar: want to add your template lib to this bakeoff? http://jsperf.com/dom-vs-innerhtml-based-templating/47 [17:53] Aikar: hince i said 'if js enabled', would need to have fallback support [17:53] halfhalo has joined the channel [17:53] mnbvasd: :) [17:53] mischievious has joined the channel [17:54] aegir has joined the channel [17:54] bluegene_ has joined the channel [17:54] ROBOd_ has joined the channel [17:54] Aikar: im a big believer in trying to keep your site functional if user doesnt have js enabled unless the site REALLY relies on JS [17:54] chapel: well Aikar [17:54] Aikar: ie a basic content site shouldn't break if user has js disabled [17:55] chapel: you could check if js is enabled, ie if js is, it does a call to your server [17:55] chapel: if you dont get that call, then render statically [17:55] LoRe_ has joined the channel [17:55] messju_ has joined the channel [17:55] chapel: might be better ways to handle it [17:55] Aikar: i wish browsers would send a header 'JS: Enabled/Disabled' [17:55] chapel: but something that is a concern with couchapps [17:55] Nevtus_ has joined the channel [17:55] eikke has joined the channel [17:56] mnbvasd: how about just render the first page statically?, then if js is enabled replace all links with js calls? [17:56] Aikar: or redirect to js enabled page [17:56] Aikar: or just wipe out dom and rebuild [17:56] mnbvasd: that's dull and not as smooth ;) [17:56] Evet: i would like inline javascript in C [17:57] Aikar: but yeah that feature is way away ahead [17:57] mnbvasd: Evet: that's what node is... download it and fiddle ;) [17:57] pyrotechnick: v8 [17:57] v8bot: pyrotechnick: undefined [17:57] pyrotechnick: v8 = inline js in c [17:57] namelessnotion_ has joined the channel [17:57] Aikar: i have a major project im working on, so first goal is to get these libraries i intend to use done and released, then ill be focusing on my main app [17:57] OndpuO has joined the channel [17:57] Aikar: and i know ill expand them as i develop my app, so ill push updates/fix bugs as it comes [17:57] mnbvasd: I'm torn between making the infrastructure and my app... [17:58] jashkenas: Aikar: You've already seen the other HTML-in-JSON templating libraries before, right? [17:58] mnbvasd: I've got the tls working enough for my app, so am focusing on that now. [17:58] Aikar: well im building infrastructure first lol [17:58] shiawuen_ has joined the channel [17:58] Aikar: jashkenas: no, but im trying to create something out of own vision, not trying to copy others. [17:58] mnbvasd: ouch. [17:58] Aikar: BOOM HEADSHOT [17:58] Aikar: jashkenas: no, but im trying to create something out of own vision, not trying to copy others. [17:59] mnbvasd: I closed a bunch of my bugs today :D [17:59] MattJ has joined the channel [17:59] Aikar: my project is going to be commercial, so im trying to write as much of the system on my own since im no legal expert, if its my own code i know i dont have to worry ;) [17:59] jashkenas: Aikar: http://jsonml.org/ [17:59] jashkenas: https://github.com/hij1nx/JUP [18:00] mnbvasd: my project is gonna prolly be mit or something quite permissive... I'll be happy and impressed if a single person tests it out. [18:00] Aria has joined the channel [18:01] djacobs7 has joined the channel [18:01] c4milo1 has joined the channel [18:01] Aikar: thats similiar to mine cept id rather denote a node by object instead of an array, as in mine you can have an array of nodes (which is used internally, or you can return from your functions) [18:02] jashkenas: if you care about speed at all, beware of the performance limitations of the HTML-in-JSON style. [18:02] mnbvasd: why is that slow? [18:03] markstory has joined the channel [18:03] eventi has joined the channel [18:03] Aikar: for example: {ul: [{id: 'myList'}, [function() { var result = []; for(var i = 0; i < 10; i++) { result.push({li: [[i]]}); } return result; }]]} [18:03] andrzejsliwa has joined the channel [18:03] jashkenas: because you need to do a ton more work/processing to generate the HTML. [18:03] ivan has joined the channel [18:03] mnbvasd: jashkenas: converting json to xml/html is trivial compared to the other way around ;) [18:03] Aikar: would build 10 counting
  • and that result would be cached [18:03] jashkenas: All the implementations I've seen fall in between an order and two orders of magnitude slower than the good interpolation-style templating engines. [18:04] jashkenas: hence ... my request to have Aikar add his lang to the bakeoff. [18:04] Aikar: jashkenas: well my system caches everything to html it can, and then you come back and fill in dynamic content [18:04] Aikar: ill bookmark that page [18:04] Aikar: but this was designed for node [18:05] Aikar: so it would require work to seperate it out some to get it on that page [18:05] Aikar: but mines gonna kinda be fast considering that sites test case would result in a fully cached string in my engine lol [18:05] jashkenas: Aikar: I don't think so ... all of the templates in that test are "cached". [18:06] jashkenas: But I hope you come up with an improvement. [18:06] Aikar: jashkenas: no, i mean, under that case, my engine simply does document.write(''); [18:06] Aikar: and thats it [18:06] jdalton has joined the channel [18:06] jashkenas: this is about interpolating data into HTML ... not about just storing a string. [18:07] Aikar: oh i didnt see the shared variables part [18:08] Aikar: that site doesnt even work for me [18:09] Aikar: all test error [18:09] jashkenas: revision 47? http://jsperf.com/dom-vs-innerhtml-based-templating/47 [18:09] jashkenas: that's the last known good one for me. [18:10] jashkenas: It's a wiki, so folks often publish broken revisions. [18:10] davidascher has joined the channel [18:11] Imperion has joined the channel [18:13] xSmurf: cool I cleaned up the xmpp bytestream code and added inbound support :D all I'm missing now is IBB fallback, not sure if it's really worth it [18:13] sriley: that doesnt have ejs? :( [18:13] jashkenas: sriley: it's a wiki -- go for it. [18:14] MattJ: xSmurf: congrats :) [18:14] temp02 has joined the channel [18:15] felixge has joined the channel [18:15] felixge has joined the channel [18:15] felixge: mikeal: ping [18:16] jchris has joined the channel [18:17] Aikar: it does [18:17] Aikar: jash linked 47 [18:17] Aikar: its on 57 now [18:17] Aikar: with ejs [18:19] jashkenas: hey -- 57 does work -- thanks for telling me. he must've revised it. [18:19] jamescarr: ejs [18:19] jamescarr: ewwww ;) [18:20] mnbvasd: hmm jade template fails in opera... [18:20] jashkenas: the meld one doesn't work. [18:20] jashkenas: needs some tune-ups. [18:20] Aikar: neither worked for me on firefox, i had to use chrome [18:20] mnbvasd: xSmurf: urly? [18:21] chapel: lol [18:21] Aikar: it said the variables were not defined [18:21] chapel: I added ejs [18:21] jashkenas: neigher does the chain one. [18:21] chapel: but it was sloppy [18:21] chapel: and I think I ruined the whole test chain [18:22] mnbvasd: hmm, it seems opera is quite slow (odesn't supprise me). [18:23] hornairs has joined the channel [18:23] muhqu has joined the channel [18:25] JusticeFries has joined the channel [18:25] richcollins has joined the channel [18:26] xSmurf: mnbvasd: check me out on github [18:26] jashkenas: here's a revised version with the tests that weren't working removed: http://jsperf.com/dom-vs-innerhtml-based-templating/59 [18:27] xSmurf: but I have yet to merge and push the new changes [18:27] xSmurf: I'll get to it soon [18:27] jashkenas: (JUP, Meld, Chain) [18:27] mnbvasd: xSmurf: aye found you aar :) [18:27] xSmurf: MattJ: thanks, I just hadn't had time ti get back to it for a bit [18:27] chapel: jashkenas: how do you remove tests? [18:29] jashkenas: just delete the title and content, and they seem to go away. [18:29] mnbvasd: xSmurf: are you using https://github.com/astro/node-xmpp for the xmpp lib? [18:29] jashkenas: gee, it would be nice if jsperf's source were on github. [18:29] chapel: heh jashkenas [18:29] chapel: you removed a few of mine [18:29] xSmurf: mnbvasd: yes node-xmpp-client sits on top of node-xmpp [18:29] chapel: but Im fine with it [18:29] chapel: cause I was mostly just playing [18:30] jashkenas: they weren't working. sorry. [18:30] chapel: in opera? [18:30] jashkenas: I don't mean JS error ... I mean that the templates weren't rendering the correct value. [18:30] xSmurf: mine is a fork which adds a few things to the core and in/out bound bytestream support (xep 0065/0095) [18:30] jashkenas: try pasting in the test into a JS Console, in your revision. [18:30] chapel: ah, well no worries, would rather have a good test, than bad tests [18:30] jashkenas: The HTML they generated wasn't right -- yeah, agreed. [18:32] zzak has joined the channel [18:32] zzak has joined the channel [18:32] mAritz: do they all cache? i was just about to start learning jquery templates. but seeing that it's the slowest in those tests, i think i'm not going to do that. :D [18:32] mnbvasd: xSmurf: cool.. [18:33] mnbvasd: I've been having trouble getting md5-digest to work, looking at the code in that, I'm doing the same thing :-/ [18:33] jashkenas: mAritz: yes -- I was shocked by that as well. Especially because they evolved from micro-templates ... which are among the best performing. But hey ... give Microsoft a bit of code to run with ... and look what happens ;) [18:33] chapel: heh [18:33] Christopher_Bisc: hey guys, i can call express in terminal, but when i run node app.js it says it can't find express (express is required in app.js) [18:34] chapel: doT was the fastest and node compatable [18:34] chapel: can someone put dust on there? [18:34] chapel: http://akdubya.github.com/dustjs/ [18:35] chrischris has joined the channel [18:35] sudoer has joined the channel [18:35] mnbvasd: oh that is shiny [18:35] jashkenas: that website just crashed my browser. [18:35] jashkenas: every time. [18:35] mAritz: jashkenas: actually, micro-templating isn't that fast either in my test. ~40 times faster than jquery templates, but doT.js and jqote2 are both 20 times faster than micro-templating [18:36] jashkenas: mAritz: what browser -- that's not what I see at all. [18:36] mAritz: chrome 8 [18:36] xSmurf: mnbvasd: are you using node_hash wrapper library? [18:36] mnbvasd: jashkenas: safari? [18:36] xSmurf: it works great for me [18:36] xSmurf: wraps around crypto [18:36] mnbvasd: xSmurf: no, I'm trying to just use crypto. [18:36] xSmurf: ah ok [18:36] xSmurf: I was lazy :p [18:36] jashkenas: mnbvasd: yep. [18:36] tk has joined the channel [18:37] mnbvasd: may look at that. [18:37] mAritz: jashkenas: they both have ~ 800k ops/sec. micro-templates have 40k and jquery templates 1k. [18:37] xSmurf: probably should get around that to clear the dependency though [18:37] sstephenson: you can't test async code with jsperf [18:37] mnbvasd: jashkenas: yeah, I've found that safari is about as stable as a skits on suicide watch since my last update :( [18:37] sstephenson: you'll fire off the call but jsperf won't wait for it to finish [18:37] mnbvasd: I'm on opera full time as I don't like chrome or ff on the mac :( [18:37] jashkenas: sstephenson: that's the do* templates? [18:38] sstephenson: I think so, yeah [18:38] jashkenas: oh, ha. cheating. [18:38] sstephenson: also dustjs [18:38] jashkenas: no -- I think they're synchronous. [18:38] jashkenas: doTtemplate(sharedVariables); works. returns a string. [18:38] mnbvasd: xSmurf: I've been working on tls so I can connect with plain text auth instead :) [18:39] mnbvasd: psi connects just fine now, and I can chat with google talk users.... though I can't seem to handshake propperly with google :-/ [18:39] jashkenas: the main difference at the top end is between templates that use "with" and ones that don't. [18:42] mAritz: jashkenas: so i basically don't even really have a choice and have to use doT or jqote2?! :D [18:42] joelklabo has joined the channel [18:44] tmzt: xSmurf: that's the socks5-based protocol? [18:45] maushu has joined the channel [18:46] nonnikcam has joined the channel [18:48] stepheneb has joined the channel [18:50] booo has joined the channel [18:50] cloudhead has joined the channel [18:50] blueadept has joined the channel [18:53] mikeal: felixge: pong [18:54] mikeal: felixge: you need to submit a talk for nodeconf :) [18:55] cloudhead has joined the channel [18:56] AAA_awright_ has joined the channel [18:57] maushu: Is StackVM around? [18:57] maushu: Someone please poke me if he arrives. [18:57] tim_smart has joined the channel [18:57] joshfng has joined the channel [18:58] papandreou has joined the channel [19:00] Qbix1 has joined the channel [19:01] pomodoro has joined the channel [19:02] charlenopires has joined the channel [19:02] xSmurf: mnbvasd: cool [19:02] xSmurf: tmzt: yes socks5 bytestreams [19:04] cloudhead has joined the channel [19:05] yhahn has joined the channel [19:06] cloudhead: is http.createClient deprecated in 0.3? [19:06] pyrotechnick: theres new API in 0.3.6 [19:06] pyrotechnick: thats all i know [19:06] cloudhead: hmm [19:06] _jdalton has joined the channel [19:06] pyrotechnick: check docs bro [19:07] pyrotechnick: thanks for your projects BTW [19:07] pyrotechnick: loving them [19:07] pyrotechnick: for anyone whose projects we've used when we go beta i am going to send a gift ^w^ [19:07] pyrotechnick: what would you like [19:07] polotek: cloudhead: not decrecated [19:07] polotek: there is a new api [19:07] polotek: but the old one should still be supported [19:07] polotek: but I think there's a few holes right now [19:08] cloudhead: pyrotechnick: hah thanks, what you working on? [19:08] cloudhead: polotek: cool, yea, it seems like the new API is just a wrapper around createClient [19:09] cloudhead: I have so much code which uses createClient, I'm hoping I won't have to change it [19:10] pyrotechnick: cloudhead: MMO [19:10] q_no has joined the channel [19:10] pyrotechnick: webgl [19:10] pyrotechnick: aiming for june/july [19:11] cloudhead: pyrotechnick: oh nice! [19:11] pyrotechnick: yep [19:12] pyrotechnick: coffeescript/coffeekup/less [19:12] cloudhead: how's working with webgl? [19:12] pyrotechnick: a dream [19:12] cloudhead: really? [19:12] polotek: cloudhead: I'm refactoring my twitter client to use an adapter api [19:12] pyrotechnick: ive waited my whole life for 3d on the web and here it is [19:12] jamescarr: a dream come true :-P [19:12] isaacs has joined the channel [19:12] polotek: based on mikeal's request [19:12] polotek: but the new node api is slightly different from that [19:12] jamescarr: doh [19:12] polotek: kinda sucks :/ [19:13] cloudhead: yea : / [19:13] cloudhead: pyrotechnick: how's browser support? [19:13] pyrotechnick: in june [19:14] maushu: webgl is like a wild horse. [19:14] pyrotechnick: it will be FF4 chrome 10 safari/mobile [19:14] pyrotechnick: so [19:14] maushu: chrome 9 should work too. [19:14] pyrotechnick: everyone except opera and IE [19:14] jamescarr: lol [19:14] jamescarr: chrome 9 [19:14] pyrotechnick: yeah it will be in 9 [19:14] pyrotechnick: but 10 will be out by then — crankshaft.... [19:15] pyrotechnick: atm it's chrome 8 [19:15] pyrotechnick: ff 4 [19:15] pyrotechnick: webkit nightly [19:15] pyrotechnick: fennec [19:15] pyrotechnick: thats about it [19:15] pyrotechnick: we have the luxary of targeting proper browsers [19:15] maushu: I think I have a rotating cube around. [19:16] maushu: Oh, here it is: http://www.graphnode.com/stuff/webgl/cube.html [19:16] polotek: maushu: how many days did that take ;) [19:16] maushu: Hmm, an afternoon. I think. [19:16] maushu: I did work with ogl before so... [19:16] polotek: "Could not initialise WebGL, sorry :-(" [19:16] maushu: Your browser sucks. [19:16] maushu: Be wild, use chrome beta. [19:16] russ_nyc has joined the channel [19:16] polotek: Chrome 9 os x [19:16] philipharrison has joined the channel [19:16] maushu: Seriously? Hmm. [19:17] maushu: Maybe webgl support still haven't arrived osx? [19:17] polotek: no idea [19:17] polotek: oops, nope wrong browser [19:17] polotek: this is 8 [19:18] maushu: ... [19:18] polotek: ACTION has too many browsers installed [19:18] maushu: Try with 9. [19:18] cloudhead: pyrotechnick: yea that's good [19:18] SunDragon has joined the channel [19:18] maushu: Enjoy the non-interactive rotating cube. [19:18] SunDragon: How do I wait on a child process in node.js? [19:18] karboh has joined the channel [19:18] polotek: ff4 is easier [19:18] polotek: works there [19:19] maushu: So, watching the pretty cube? [19:19] polotek: although that's a rotating square, not a cube :) [19:19] pyrotechnick: SunDragon: child process? [19:19] pyrotechnick: webworker? [19:19] pyrotechnick: wanna jump in #three.js [19:19] maushu: polotek, then its a ff bug. [19:19] maushu: I think I've heard about it. [19:19] Solsys has joined the channel [19:19] polotek: hmm [19:20] polotek: I'll try chrome 9 in a bit [19:20] JusticeFries has joined the channel [19:20] SunDragon: pyrotechnick: child_process.exec() [19:20] SunDragon: not a web worker [19:20] maushu: browserling only has ff3.5 and c7. ;_; [19:20] bingomanatee: ACTION seeking web work [19:21] tanepiper: Real developers run Chrome 10 :p [19:21] bingomanatee: real server side developers maybe [19:21] pyrotechnick: SunDragon: three.js and child_process are almost completely unrelated [19:21] tapwater has joined the channel [19:21] bingomanatee: Client side devs run with the herd [19:21] pyrotechnick: what are you trying to do exactly [19:21] pyrotechnick: three.js doesnt run in node and child_process doesnt run in the browser [19:21] maushu: SunDragon, node.js quits before the child is done? [19:21] SunDragon: pyrotechnick: I am trying to run a text editor and wait for it to finish [19:22] pyrotechnick: why did you say three.js [19:22] pyrotechnick: oh man [19:22] pyrotechnick: i'm going nuts sorry dude [19:22] pyrotechnick: exec gets a callback when its done [19:23] pyrotechnick: {exec} = require 'child_process' [19:23] tanepiper: ACTION wants to do something with three.js, webgl and nodejs when he gets time to play [19:23] pyrotechnick: exec 'mate', -> console.log 'done' [19:23] MrTopf has joined the channel [19:23] chapel: tanepiper: real developers run chrome dev channel, or chromium [19:23] pyrotechnick: chromium nightly [19:23] pyrotechnick: everynight [19:23] pyrotechnick: cron job [19:23] chapel: I would, but I like mp3 support [19:23] maushu: real developers build their own browser. [19:24] chapel: real developers use node to scrape websites [19:24] chapel: and read the results [19:24] maushu: real developers connect a rj45 line directly to their brain. [19:25] SunDragon: pyrotechnick: the problem with that is that I end up with a nest of callbacks [19:25] Athox has joined the channel [19:25] pyrotechnick: i dont think there's a sync exec [19:25] tanepiper: chapel: chrome 10 is chrome dev chan :) [19:25] pyrotechnick: dont be afraid of callbacks SunDragon [19:25] pyrotechnick: it is node.js afterall [19:25] chapel: sure tanepiper [19:25] tanepiper: 10.0.642.2 dev [19:26] pyrotechnick: maybe grab a flow library if you're struggling [19:26] pyrotechnick: but don't be afraid of callbacks [19:26] chapel: callbacks are fun once you learn them [19:27] polotek: SunDragon: investigate some of the async control flow helpers [19:27] dthompson has joined the channel [19:27] pomodoro has joined the channel [19:28] polotek: http://www.infoq.com/articles/surviving-asynchronous-programming-in-javascript [19:28] SunDragon: asynchronous programming was around long before javascript, ex: TCL [19:29] maushu: I think thats just specific for javascript. [19:29] maushu: Not saying that async javascript was here first. [19:30] SunDragon: i was told to learn and to not be afraid, that implies that it is something new [19:30] SunDragon has left the channel [19:30] maushu: For some people, it is. [19:30] maushu: Specially people having problems with it. [19:32] ossareh has joined the channel [19:33] polotek: TCL makes me eye twitch [19:37] Evet: which framework you use in client-side to build multiplayer fancy games? [19:38] bingomanatee: I've created a specific MVC project on Git - its essentially the MVC example from Express with slight refactoring but I hope to add component centric features to it fairly soon. [19:38] bingomanatee: https://github.com/bignomanatee/mvc if you're curious. [19:38] springify has joined the channel [19:38] bloho_afk: polotek: i dont understand why people hate async.. if you have 5 levels of nested callbacks, you fail at abstraction =( [19:39] pyrotechnick: Evet: 2d or 3d? [19:39] Evet: pyrotechnick: both [19:39] pyrotechnick: FOSS or proprietry [19:39] polotek: bloho_afk: it shouldn't happen often, but it's not impossible to need 5 nested calls [19:39] Evet: pyrotechnick: both [19:40] pyrotechnick: graphics or full-stack game engine? [19:40] aaronblohowiak: polotek: i understand that you can have 5 nested calls in the trace of the program, but i dont think you should have 5 levels of indenting in your source.. [19:40] Evet: pyrotechnick: graphics [19:40] pyrotechnick: ok [19:40] pyrotechnick: let me make a bit of a table [19:40] pyrotechnick: some cells will be blank [19:41] pyrotechnick: but i can fill out most of them i hope [19:41] pyrotechnick: give me 5 [19:41] polotek: aaronblohowiak: yeah, I agree, once you understand the fundamentals of async you should start learning how to organize code around it [19:41] Evet: okay [19:41] aaronblohowiak: polotek: ^.^ i think people are used to object composition, but not function composition.. ie: people need to read SICP chapters 1-3 [19:41] djacobs7 has joined the channel [19:42] polotek: haha, indeed [19:42] polotek: it's free! [19:42] bingomanatee: IOC is based on functional composition. [19:43] bingomanatee: So if you know Gang of 4 you know it. [19:43] aaronblohowiak: I should write Blohowiak's guide to treating JavaScript like a weak Scheme or a C with functions that close their scope [19:43] bingomanatee: Why not. [19:44] bingomanatee: Actually I think having a support and content blog somewhere for node would be cool. [19:44] aaronblohowiak: bingomanatee: i think many GoF fans prefer using objects to encapsulate behavior in the Strategy pattern or Chain of Responsibility, instead of functions [19:44] aaronblohowiak: bingomanatee: more than howtonode.org ? [19:44] bingomanatee: I guess thats functional. Kind of rough still though,. [19:45] aaronblohowiak: jashkenas: why doesn't coffescript use named funtions instead of assigning functions to local variables ? [19:45] aaronblohowiak: bingomanatee: do you have an example of such a blog / support from another community? [19:45] polotek: the section on streams is also pretty interesting to compare to the node streams implementatin [19:46] neynenmo has joined the channel [19:46] aaronblohowiak: polotek: i'd upvote an article comparing those =) [19:46] jashkenas: aaronblohowiak: because named functions are broken in IE. [19:46] polotek: what do you mean by "support and content" blog? [19:46] aaronblohowiak: jashkenas: my sword of righteous fury will smite IE [19:46] jashkenas: aaronblohowiak++ [19:46] v8bot: jashkenas has given a beer to aaronblohowiak. aaronblohowiak now has 2 beers. [19:46] polotek: have you seen http://howtonode.org/ [19:46] tmzt: bingomanatee: cool [19:47] jashkenas: aaronblohowiak: also, function hoisting is often undesirable... [19:47] jamescarr has joined the channel [19:47] tmzt: so does anybody know how to group like objects or people based on profiles? [19:47] aaronblohowiak: jashkenas: you're right then that js environs need better ways of hinting debugger [19:47] markstory has joined the channel [19:47] pyrotechnick: google docs documents cant do tables... [19:47] jacobolus has joined the channel [19:47] jashkenas: So, V8 has already fixed that problem. [19:47] polotek: jashkenas: function expressions don't hoist though right? [19:47] jashkenas: polotek: that's correct. [19:48] polotek: I really just got a handle on the difference not too long ago :) [19:48] jashkenas: var x still hoists undefined ... [19:48] bingomanatee: for another community - well the PHP docs themselves are annotatable. [19:48] jashkenas: but that's not too too bad. [19:48] bingomanatee: I think Adobe has set the high mark for community based documentation [19:48] aaronblohowiak: bingomanatee: link? [19:48] bingomanatee: adobe.com? [19:49] jashkenas: aaronblohowiak: V8 does a really good job of naming all your functions in the stacktrace ... you just need a named constructor, and you're good to go. [19:49] bingomanatee: http://www.adobe.com/communities/ [19:49] polotek: bingomanatee: that style of docs is the best I think. persistent api info supplemented by community comments [19:49] jashkenas: aaronblohowiak: hence the special wrapper to support named constructors for coffee classes. [19:49] bingomanatee: Even Ruby's online documentation is imperfect [19:49] tmzt: if be cool is node could make up names based on the lexical scope [19:49] polotek: php benefits greatly from this. [19:49] aaronblohowiak: jashkenas: ahhh, makes sense now. thanks for sharing the knowledge about this [19:49] zzak: bingomanatee: leave rubys doco outa this ;) [19:49] bingomanatee: yeah - that is really what I like. You have integrated official documentation and community feedback. [19:50] dtrasbo has joined the channel [19:50] bingomanatee: no. [19:50] zzak: ;-; [19:50] bingomanatee: I think it would be funny to do a Ruby documentation site in node. [19:50] bingomanatee: But when I took up Flash the online docs were invaluable. [19:50] zzak: they are still trying to get yard support in core [19:50] bingomanatee: Hopefully when I get Noogle out there it will fill that space. [19:51] zzak: but rdoc.info is actually pretty good [19:51] bingomanatee: We will see. [19:51] mraleph: *sigh* people casually comparing apples and oranges negatively affect my blood pressure... [19:52] aaronblohowiak: bingomanatee: noogle? [19:52] sechrist has joined the channel [19:52] jashkenas: mraleph: eh? [19:53] bingomanatee: I'm indexing the IRC channel. [19:53] bingomanatee: I have the basic algorithm working - I just have to flesh out the express stuff. [19:54] mraleph: jashkenas: ah. I've noticed comparison between webserver written in ada (somebody still uses this oldschool crap?) and node.js... [19:55] cronopio has joined the channel [19:55] aaronblohowiak: mraleph: http://www.reddit.com/r/programming/comments/f74nf/aws_ada_web_server_trumps_nodejs_in_a_simple/ ? [19:55] aaronblohowiak: i accidentally trolled the static language crowd =( [19:55] bbttxu has joined the channel [19:57] polotek: it's not stupid to compare how 2 different technologies solve the same problem [19:57] mraleph: aaronblohowiak: yep. that one... I've even forced myself to remember my reddit password :-) [19:57] sivy has joined the channel [19:57] mraleph: polotek: it's not stupid if you do it the right way. [19:57] polotek: the problem I have is that raw speed isn't how anyone should be choosing a technology [19:58] DracoBlue has joined the channel [19:58] polotek: it's not like people are sitting around going "man I'd love to use ada but it's so slow" [19:58] aaronblohowiak: polotek++ [19:58] v8bot: aaronblohowiak has given a beer to polotek. polotek now has 3 beers. [19:58] polotek: mraleph: it's even instructional when people do it wrong [19:59] c4milo1 has joined the channel [19:59] polotek: if your honest attempt to set things up is wrong or inefficient, that speaks to how intuitive the technology is [19:59] aaronblohowiak: polotek: that is a big problem we have with Lift: people have a hard time just getting running =( [19:59] polotek: and the inevitable "apples and oranges" detractors also provide lots of good info [20:00] polotek: I'd rather have some bad benchmarks and lots of good follow up info [20:00] polotek: then no info at all [20:01] mraleph: hehe. I am looking from the different angle... When I was working on JVM I was upset by discussions where people tried to bully Java with C++, now I don't care about Java but now I am upset when people try to bully JS (or node.js) with other languages :-) [20:01] polotek: aaronblohowiak: you use Lift? or you're one of the maintainers? [20:02] aaronblohowiak: polotek: i'm the latest committer, helping @dpp to bring jruby to lift [20:02] texodus has joined the channel [20:02] mnbvasd: ACTION dances [20:02] mnbvasd: I did md5digest... [20:02] mnbvasd: it turns out you shouldn't split on '=', as you can eat away at challenges :-/ oops. [20:02] polotek: mraleph: haters gonna hate [20:02] femtooo has joined the channel [20:02] _jdalton has left the channel [20:03] polotek: don't let em get to you :) [20:03] mraleph: polotek: yeah... but I can't sleep when somebody is wrong on the Internet :-) [20:03] polotek: aaronblohowiak: I read the "seven things" tutorial on lift recently [20:03] polotek: I'm interested in scala [20:03] polotek: but lift is doing too much [20:04] polotek: I don't like my server-side framework to dictate what happens on the client [20:05] aaronblohowiak: polotek: i hear you on that; it is a very different approach. more similar to ASP.NET and JSF [20:05] polotek: aaronblohowiak: pro tip: don't associate yourself with either of those technologies ;) [20:06] aaronblohowiak: polotek: haha, yea. it is uncool. i think there is something to be gained by understanding the other 80% of the world [20:06] perlmonkey2: building node on an amazon micro instance my set the poor thing on fire. [20:07] aaronblohowiak: perlmonkey2: that is good feedback. memory usage assploded? [20:07] polotek: I've tried several times to experiment with .net [20:07] polotek: it doesn't take long before I give up either frustrated or infuriated [20:08] polotek: I'll try again soon [20:08] aaronblohowiak: polotek: i am doing a knowledge share with a full-time .NET programmer -- i teach him RoR, he teaches me .NET [20:08] polotek: it just doesn't fit my mental model of web development [20:08] mraleph: polotek: C# recently became a very nice language [20:08] aaronblohowiak: mraleph++ [20:08] v8bot: aaronblohowiak has given a beer to mraleph. mraleph now has 1 beers. [20:08] polotek: aaronblohowiak: interesting, maybe I should suggest that at my job [20:08] aaronblohowiak: type-checked function pointers for the winssss [20:08] polotek: we're split between .net and php [20:09] polotek: mraleph: I have no beef with C# [20:09] desaiu has joined the channel [20:09] polotek: taken by itself it's actually a better java in some ways [20:09] Bonuspunkt: plz tell me when u talk about .net and web u dont mean asp.net webforms [20:09] perlmonkey2: aaronblohowiak: holding at about 450MB and the instance has 613. [20:09] mraleph: java is oldschool nowadays... stagnation and decay. [20:09] aaronblohowiak: perlmonkey2: 450 RSS or total mem usage? [20:10] Ond has joined the channel [20:10] perlmonkey2: aaronblohowiak: total mem usage [20:10] aaronblohowiak: mraleph: same issue with windows; backwards compatibility is a shackle [20:10] aaronblohowiak: perlmonkey2: cpu pegged? [20:10] mraleph: HotSpot on the other hand is a pretty nice piece of compiler construction wisdom... [20:10] polotek: mraleph: it's not stagnant, it's just that the "improvements" they're making aren't useful to anyone ;) [20:10] perlmonkey2: aaronblohowiak: hah, yes [20:10] jacobolus has joined the channel [20:10] polotek: perlmonkey2: are the micro instances single core? [20:11] perlmonkey2: polotek: dual [20:11] polotek: try running make with JOBS=1 [20:11] polotek: just learned you could do that recently [20:11] polotek: should restrict it to one thread [20:12] cloudhead has joined the channel [20:12] desaiu: http://dpaste.com/343758/ that is the error i get when i try running this code: http://dpaste.com/343754/ [20:12] desaiu: someone mind helping me? [20:12] perlmonkey2: polotek: no they are single core, but for "short periods" you get more access to the total cpu on the host. [20:12] perlmonkey2: not sure what this means: http://aws.amazon.com/ec2/#instance [20:13] polotek: desaiu: typo state -> stat [20:14] warz has joined the channel [20:15] jamescarr: mraleph, that's a broad generalization [20:16] desaiu: polotek: the code is coming from pedro's video here: http://vimeo.com/16209304 he is using fs.stat [20:17] polotek: desaiu: that's fine, I mean in your server handler. state.size [20:17] pjackson: Can I get the name of the current file [20:17] polotek: should be stat.size [20:17] pjackson: s/$/?/ [20:17] polotek: that's the return object from your fs.stat call [20:18] desaiu: aha! [20:18] desaiu: thank you polotek :) [20:19] polotek: pjackson: __filename [20:19] desaiu: "state is not defined", duh [20:19] polotek: js errors aren't always the most helpful. but sometimes they mean just what they say :) [20:19] aaronblohowiak: in the smalltalk environments, they would give a warning if you have an identifier that hasn't occured anywhere else in the system. [20:20] aaronblohowiak: that seems like a high easy/useful ratio feature [20:20] djfurman has joined the channel [20:20] unomi has joined the channel [20:20] Aria has joined the channel [20:21] polotek: smalltalk is really nice [20:21] polotek: haven't worked with it since college [20:21] polotek: but I remember feeling like it always just made sense [20:21] aaronblohowiak: let's have a moment of silence for that fallen hero [20:22] polotek: http://www.donothingfor2minutes.com/ [20:23] aaronblohowiak: ;) [20:23] aaronblohowiak: i'll do that when i'm sailing later today [20:24] djfurman has left the channel [20:24] polotek: ACTION doesn't remember what he was doing before [20:24] Fuld: polotek, that site would work better if it were something captivating like a picture of a beautiful woman. Say, Madonna. [20:25] aaronblohowiak: polotek: you were comparing node streams to the sicp notion of streams and writing a blog post about it [20:25] Fuld: The problem is the image there is pretty boring. [20:25] aaronblohowiak: Fuld: i think the point is to be bored [20:25] aaronblohowiak: s/bored/empty [20:26] polotek: aaronblohowiak: haha, I'm not smart enough to do that subject justice [20:26] polotek: Fuld: you're not supposed to be looking at the image. you're supposed to be clearing your mind [20:26] aaronblohowiak: polotek: ;) what was that about incorrect comparisons still being useful ;) [20:27] polotek: maybe a picture of Sarah Palin. that always puts me in the mind of empty heads [20:27] Fuld: polotek: Hmm. What does clearing really do? Help you see things from a different perspective? [20:27] saikko has joined the channel [20:27] polotek: Fuld: I like to think of it like a RAM clear [20:27] bmizerany has joined the channel [20:27] tokumine has joined the channel [20:28] polotek: aaronblohowiak: touche sir [20:28] polotek: I've never gone though the sicp stream exercises [20:29] polotek: it's on my "really should happen but probably won't" list of things to do [20:29] richcollins has joined the channel [20:29] boaz has joined the channel [20:29] kiddphunk has joined the channel [20:30] TheEmpath2 has joined the channel [20:30] saschagehlich has joined the channel [20:30] aaronblohowiak: ditto v.v [20:30] Fuld: I wonder how much money that guy is making with http://astore.amazon.com/donotfor2min-20 [20:31] Fuld: (The ad at the end) [20:31] c4milo1 has joined the channel [20:32] Fuld: I unfortunately can never clear my mind. I live in a gigantic 1,100 apartment building that is really loud and there's no where quiet to go in NYC [20:32] perlmonkey2: interesting....I get about 100 pages per second when running ab -c 100 against https://github.com/visionmedia/express/blob/master/examples/route-middleware/app.js on the amazon micro instance. [20:32] polotek: If I finish this round of updates to evented-twitter I'm gonna do it [20:33] aaronblohowiak: polotek: \(^.^)/ [20:33] Fuld: In the modern world, there is no silence anymore. [20:33] polotek: I've tried to get into meditating a few times [20:33] aaronblohowiak: Fuld: that's why i moved out of the city into the stillness of a rose-lined street [20:33] polotek: I think it's really hard for me [20:33] polotek: so much to think about [20:33] Fuld: aaronblohowiak: Has that improved your concentration ability? [20:34] Fuld: polotek: I actually take math exams to meditate. [20:34] aaronblohowiak: Fuld: yes, and ability to sleep and feel calm. i could never *really* achieve a sense of calm inthe city [20:34] polotek: reading fiction or watching movies is the only time I feel like my brain isn't working too hard [20:34] Fuld: I enjoy exams. Something about a quiet room and the simplicity of an exam. [20:35] polotek: Fuld: comes from narrow focus I guess. I math exams too [20:35] aaronblohowiak: polotek: ever go sailing? [20:35] aaronblohowiak: there's something to be said for being at the mercy of the whims of nature, especially for the control-freak tendancies programming encourages [20:36] Fuld: Most of the time my focus is very broad, especially as the sole web developer for several NYC businesses [20:36] polotek: nah, black people don't really do boats :P [20:36] Fuld: :) [20:36] polotek: sorry folks. sometimes that makes people uncomfortable [20:37] Fuld: polotek, np I'm black too :) [20:37] aaronblohowiak: Fuld: it is hard to concentrate when you're always jumping from task to task [20:37] aaronblohowiak: polotek: yea, your blackness does make me uncomfortable ;) [20:37] polotek: that's what's happening to me right now [20:37] Fuld: aaronblohowiak, yeah. [20:37] polotek: chatting with you guys [20:37] polotek: IM with a friend [20:37] Fuld: haha [20:37] aaronblohowiak: hahaha [20:37] polotek: trying to code [20:37] polotek: failing [20:38] Fuld: polotek: We'll quit IRC together and code. [20:38] aaronblohowiak: yea, i am waiting for 0.3.6 to finish compiling. time to eliminate this distraction and get down to business [20:38] Fuld: polotek: You first. [20:38] Fuld: j/k :p [20:39] polotek: I'm very comfortable with my blackness [20:39] polotek: fits me like a second skin [20:39] polotek: OH! [20:39] bloho_afk: polotek: ROFL [20:39] polotek: ACTION is on fire [20:40] hdon has joined the channel [20:40] bloho_afk: ACTION is failing at concentrating [20:41] polotek: here's a question for folks [20:41] polotek: what do you hate about twitter libraries you've used. [20:41] polotek: trying to remove the suck from evented-twitter [20:42] bloho_afk: polotek: some that assume you will only use one api key at a time =( [20:42] tc77 has joined the channel [20:43] polotek: bloho_afk: you mean consumer credentials? [20:43] polotek: good point [20:43] polotek: I was assuming that too :) [20:44] polotek: https://github.com/polotek/evented-twitter/issues/issue/9 [20:44] TheEmpath2: ACTION is programming UI elements from scratch. [20:44] TheEmpath2: FUN FUN [20:45] polotek: what's the easiest way to retrieve twitter access token/secret for an account you have the user/pass for? [20:45] langworthy has joined the channel [20:45] temp01 has joined the channel [20:47] davidc_ has joined the channel [20:47] mscdex: node.js rules! [20:48] opengeard has joined the channel [20:48] rydgel has joined the channel [20:49] joelklabo has joined the channel [20:50] rydgel has joined the channel [20:52] Fuld: mscdex: Not yet, but we will very soon. [20:52] Fuld: 2012 is the year of node.js on the web :) [20:52] xonecas has joined the channel [20:53] xonecas: howdy folks [20:53] lumino: Fuld: try 2011 [20:54] Metapony has joined the channel [20:54] xonecas: I'm trying to compile node with ssl support but, even after I installed libssl-dev and libssl0.9.8 (i'm on ubuntu) ./configure still says it can't find openssl. Any ideas on what I should try next? [20:54] mnbvasd: xonecas: just try to build it, it did suggest it found other crypto stuff didn't it? [20:55] xonecas: Checking for function SSL_library_init : yes [20:55] xonecas: Checking for header openssl/crypto.h : yes [20:55] xonecas: you mean those lines [20:55] xonecas: ? [20:55] mnbvasd: yeah.. I get this: [20:55] mnbvasd: Checking for openssl : not found [20:55] mnbvasd: Checking for function SSL_library_init : yes [20:55] mnbvasd: Checking for header openssl/crypto.h : yes [20:55] aaronblohowiak has joined the channel [20:55] mnbvasd: but it compiles fine and crypto defo works :D [20:56] zzak: mnbvasd: apt-get install openssl ? [20:56] mnbvasd: openssl [20:56] mnbvasd: OpenSSL> [20:56] xonecas: same with me, so if I go ahead and build it, I can access https:// with http.client? [20:56] zzak: `which openssl`? [20:56] mnbvasd: openssl version [20:56] mnbvasd: OpenSSL 0.9.8o 01 Jun 2010 [20:57] Metapony: Hi all, I'm having a problem installing node.js... can anyone help? I'm on windows and am getting an error with environment.py when I run the make commend... [20:57] mnbvasd: xonecas: well I'm not quite sure of the syntax, but yeah, you can do https, atleast with teh tls module [20:57] Fuld: Node.js shall become the John Galt of the web! [20:57] Me1000 has joined the channel [20:58] Metapony: I did set SHELL=/bin/bash but I'm still getting it... [20:58] tanepiper: woop! my patches finally made it into Cradle :D [20:58] xonecas: mnbvasd: I know the syntax, but if I don't have https support I get an http error when trying to access https:// adresses [20:59] xonecas: I'll let you know how it works out [20:59] tanepiper: anyone getting errors in npm with 0.3.6 ? [20:59] softdrink has joined the channel [20:59] tanepiper: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. [20:59] xonecas: tanepiper: I get issues with the unstable and npm [21:00] pjackson: polotek: ta [21:00] xonecas: missing modules and such [21:00] fairwinds has joined the channel [21:01] jchris has joined the channel [21:01] pt_tr has joined the channel [21:01] polotek: tanepiper: that's feature [21:02] polotek: to make sure you meant to add that many listeners [21:02] polotek: pjackson: ? [21:02] mscdex: Fuld: psh. that was a factual statement i made [21:02] polotek: tanepiper: feature added to node, not npm [21:02] femtoo has joined the channel [21:02] fairwinds: hi. I am using ejs in express. Is is possible to use more than one layout file? [21:02] bingomanatee: yes [21:03] pjackson: polotek: "__filename" [21:03] bingomanatee: fairwinds: I don't remember exactly how but the layout filename can be passed as a parameter to render. [21:03] mraleph: Fuld: who is John Galt? [21:03] fairwinds: yeah, was hoping for something like that [21:04] tanepiper: polotek: well yea, it's not breaking anything at least, but getting lots of stack traces - but i'm sure it'll get resolved [21:04] mscdex: http://i27.tinypic.com/2yzn2u8.jpg [21:04] mscdex: ! [21:04] Metapony: I'm getting "Build failed -> task failed (err #2) but I've tried the steps on the install wiki to fix it... [21:04] tanepiper: mscdex: hehe :) [21:05] polotek: Metapony: need more info [21:05] davidwalsh has joined the channel [21:06] Metapony: It fails with keyError: 'os': ...? [21:06] mscdex: isn't cygwin borked on 0.3.x anyway? [21:06] mscdex: or at least the last few 0.3.x releases [21:07] mikeal has joined the channel [21:07] mscdex: er - the other way around - 0.3.x borked on cygwin :> [21:09] charlenopires has joined the channel [21:09] fairwinds: bingomanatee: res.render('page', { layout: 'mylayout' }); [21:09] springify has joined the channel [21:10] Metapony: polotek: What info do you need? [21:10] texodus has joined the channel [21:11] polotek: Metapony: a gist of the error output, some info about your environment [21:11] bingomanatee: thats the thing [21:12] TheEmpath2: so hierarchy of UI [21:12] TheEmpath2: Viewport -> Scene -> ViewContainer -> ViewObject [21:12] TheEmpath2: ya? [21:12] TheEmpath2: but a ViewContainer can be a ViewObject [21:12] polotek: mscdex: I think you're right [21:12] polotek: I've never tried to build on cygwin anyway [21:12] TheEmpath2: ACTION curses Flex for being his first UI language. [21:12] Metapony: polotek: I could try to do a screenshot, can't copy/pastebin the shell window... sec... [21:13] TheEmpath2: mscdex: I hate your name. Your command in DOS gave me nothing but heartache in the mid 90s. [21:14] papandreou: TheEmpath2: It ate all your precious memory, just like node-imap :) [21:14] mnbvasd: papandreou: node-imap? [21:15] papandreou: mnbvasd: https://github.com/mscdex/node-imap [21:15] papandreou: mnbvasd: Quite promising, but doesn't stream yet [21:16] papandreou: mnbvasd: Will try using it for a bigish project at work soon [21:17] mnbvasd: papandreou: cool :) [21:17] xonecas: https://gist.github.com/791490 [21:17] xonecas: any ideas why that doesn't work? [21:17] mnbvasd: I'd kinda like an imap server.. [21:18] papandreou: xonecas: Missing a comma after "true" [21:18] Metapony: polotek: Here's my error: http://bayimg.com/OaDJMaADh [21:19] papandreou: xonecas: May I recommend mikeal's request library? [21:19] polotek: +1 request [21:19] xonecas: papandreou: I just need to access a https site [21:19] xonecas: I don't see why that doesn't work [21:20] xonecas: the callback never gets caled, it just stays stuck at the begining [21:20] polotek: Metapony: like I said, don't have much cygwin experience [21:20] polotek: but this error is pretty clear [21:21] polotek: the env object isn't getting set with your os [21:21] polotek: not sure how that happens on cygwin [21:21] papandreou: xonecas: For one thing the url you're trying to get returns a redirect -- request supports that. [21:22] Metapony: polotek: thanks... I'll try something [21:22] polotek: Metapony: also this is the v8 build that's crapping out, not node [21:22] polotek: you could maybe search for info on building v8 in cygwin [21:22] Metapony: polotek: I don't know what v8 is... but I'll try a restart, maybe windows didn't set the eniro vars correctly on install [21:23] polotek: haha, that's a first [21:23] polotek: v8 is the javascript engine that powers node [21:23] polotek: the one that runs in Google Chrome [21:23] xonecas: papandreou: ok i'm convinced to not re-invent the wheel. where can I find mikael's request util? [21:23] polotek: npm install request [21:24] xonecas: is he on github also? [21:24] mikeal has joined the channel [21:24] papandreou: xonecas: https://github.com/mikeal/node-utils [21:24] polotek: npm view request [21:24] polotek: :) [21:25] polotek: I always forget that request is a submodule in that node-utils package [21:25] papandreou: xonecas: Btw. which node version are you running? The https client is missing from some of the 0.3.x releases. [21:25] mikeal: node-utils is going away in a month or so [21:25] mikeal: it'll move to mikeal/request [21:25] mikeal: and pool isn't necessary anymore [21:25] polotek: +1 [21:25] papandreou: mikeal: Cool [21:26] xonecas: papandreou: just built 2.6 [21:26] papandreou: xonecas: That should work. I wonder why your example was broken. [21:27] papandreou: mikeal: Btw. I took the liberty of forking node-utils to fix a few request bugs and add a couple of features: https://github.com/papandreou/node-utils [21:27] xonecas: I think its because I was requesting port 80 under https [21:28] xonecas: it should've been 443 [21:28] xonecas: (i think) [21:28] andrzejsliwa has joined the channel [21:28] papandreou: xonecas: Ah, you're right. Just got it to work :) [21:28] xonecas: mikeal: awesome library, plenty of reading material eheh [21:28] xonecas: papandreou: \o/ [21:28] wilmoore has joined the channel [21:29] xonecas: you're the reciepient of my first gist :-p [21:29] mikeal: wow [21:29] mikeal: github fail [21:29] mikeal: http://dl.dropbox.com/u/503516/Screenshots/r.png [21:29] papandreou: xonecas: What an honor :) [21:30] cloudhead has joined the channel [21:30] papandreou: mikeal: I hope that wasn't me :) [21:31] tanepiper: haha, this is awesome: http://thecomputerboys.com/wp-content/uploads/2010/12/programmers-coloring-book.pdf [21:31] mikeal: haha, i doubt it [21:31] mikeal: papandreou: becuase github is so broken i'm gonna have to pull this in to a branch [21:31] xonecas: mikeal: I get that a lot when I'm tethering from my phone... something fails to load under slower connections I think [21:31] polotek: I'm not getting that [21:31] polotek: xonecas: yeah that makes sense [21:31] tanepiper: mikeal: is push/pull not working either? it was working the other day when their frontend was down [21:31] mikeal: lemme see [21:32] polotek: either that or an ssl problem [21:32] tanepiper: i think they are having issues with their web servers [21:32] polotek: cause github is all https now [21:32] Metapony has joined the channel [21:32] polotek: github is a complicated beast [21:33] aconbere has joined the channel [21:34] xonecas: http://xonecas.com/github it works :-) Thank you papandreou polotek mikeal for your help :-) [21:34] mikeal: papandreou: adding semicolons makes isaacs cry :) [21:34] Fuld: What's wrong with semicolons? [21:35] bingomanatee: they make the file longer which makes your app take longer to boot [21:35] papandreou: mikeal: It does? Well, I kinda regret pushing that commit before all the others, I freaked out because I'm used to jslint pre-commit hooks. [21:36] Fuld: bingomanatee: lol [21:36] mikeal: jslint makes me wanna punch a baby [21:36] mikeal: papandreou: this js developer at disqus is working on a fork of jslint that looks real nice [21:36] mikeal: it modularized everything and allows you to use flags to turn off and on everything [21:37] mikeal: papandreou: you broke setHost [21:37] ayalque has joined the channel [21:37] mikeal: btw, i don't mind taking the semicolon patch [21:37] mikeal: i actually don't care one way or the other [21:37] mikeal: the main style issue i do is comma first [21:38] ayalque: hello.js - i was wondering if there is a node.js "best-practice"/module/technique for cahce-busting [21:38] papandreou: mikeal: My colleague also did a jslint fork to allow us to do switch fallthrough and declare functions in loops when we really need to: https://github.com/bramstein/jslint [21:38] polotek: mikeal: that sounds awesome [21:39] papandreou: mikeal: Did I break setHost as part of the redirect fix? [21:39] mikeal: you changed where it gets defined, and in the else where it was set to false you're setting it to true [21:39] mnbvasd: ohh cool. [21:39] mnbvasd: must look at jslint. [21:40] bradleymeck has joined the channel [21:40] stepheneb has joined the channel [21:40] Fuld: What's the best way to load JSON from a file? [21:41] papandreou: mikeal: The d604e0363 patch? To me it looks like the logic accomplishes exactly the same as before. It was mostly to get rid of the double 'var' declaration. [21:41] pyrotechnick: JSON.parse(fs.readFileSync(PATH)) [21:41] Fuld: pyrotechnick, awesome :) [21:41] pyrotechnick: or [21:41] mnbvasd: pyrotechnick: NO BAD pyrotechnick [21:41] xonecas: Fuld: I use fs.readFile and JSON.parse in the 'end' callback [21:41] polotek: pyrotechnick: I just wrote that exact line 5 min ago [21:41] mikeal: papandreou: i don't know the commit hash because I'm looking at a branch diff between your master and mine [21:41] pyrotechnick: and [21:41] xonecas: Fuld: use the async version :-) [21:41] pyrotechnick: yeah [21:42] pyrotechnick: sorry thats not the best way [21:42] pyrotechnick: but i dont like doing multiliners in irc [21:42] pyrotechnick: i get blamed for spamming [21:42] polotek: depends on what you're doing [21:42] Fuld: What happens to your app if you use sync? It can't respond to other clients? [21:42] polotek: I'm writing tests [21:42] pyrotechnick: if its just a test [21:42] pyrotechnick: sync is ok [21:42] pyrotechnick: makes ur tests lighter [21:42] pyrotechnick: unless its a benchmark [21:42] xonecas: Fuld: yeah sync is a blocking action [21:42] pyrotechnick: sync will be ok [21:42] papandreou: mikeal: I just changed "if (something) {var setHost=true} else {var setHost=false}" to "var setHost=false; if (something) {setHost=true}". Looks the same to me? [21:42] zikes has joined the channel [21:43] xonecas: I only use sync when loading files into memory before I start the server, when the server is on, I try to use async versions always [21:43] papandreou_ has joined the channel [21:43] mriley has joined the channel [21:44] mnbvasd: yeah, I use sync for that, otherwise you've gotta launch the rest of your server from the callback, which is a bit sucky. [21:44] Fuld: Is async code just more annoying to write because we think procedurally? [21:44] xonecas: mnbvasd: true :-) [21:44] Fuld: The English language is very linear, after all. [21:44] Fuld: Or any language [21:44] xonecas: Fuld: YES :-) also errors don't bubble up as expected, so beware ! [21:45] mnbvasd: async singlen threaded is quite easy, it's really how we work... [21:46] xonecas: ACTION is out for lunch [21:46] mnbvasd: we go put the coffee machine on, go for a shower, get out when the coffee is ready and drink it. [21:46] bingomanatee: having a problem cloning christkov: https://github.com/christkv/node-mongodb-native/info/refs not found: did you run git update-server-info on the server? [21:47] L_star has joined the channel [21:47] mikeal: papandreou: using ('attr' in blah) is much slower than if (blah.attr) [21:47] mikeal: i just benchmarked it to make sure [21:49] fairwinds: I wonder if I am barking up wrong try by trying to use more than one layout.ejs What I am looking to do is dynamically include js and css. Does anyone have a good technique for this. [21:49] benburkert has joined the channel [21:49] papandreou: mikeal: Ok, I didn't know that. Isn't it very hard to measure a difference? [21:49] fairwinds: so need to manipulate what is getting into header [21:50] mikeal: you run it like 10K times you can see :) [21:50] texodus has joined the channel [21:50] mikeal: papandreou: https://gist.github.com/791526 [21:50] papandreou: mikeal: But the semantics are a bit different. "if ('body' in options) ..." isn't equivalent to "if (options.body) ..." because the latter evaluates to false when options.body is the empty string, which is what I wanted to fix. [21:51] mikeal: no it doesn't [21:51] mikeal: empty string will evaluate true [21:51] papandreou: mikeal: However, "if (typeof options.body === 'undefined')" would also do the trick, how does that fare? [21:51] stagas has joined the channel [21:51] mikeal: empty string is true [21:51] polotek: mikeal: nope [21:51] papandreou: mikeal: No it won't :) [21:51] mikeal: since when? [21:51] polotek: since always :) [21:52] maushu has joined the channel [21:52] polotek: false values are null, undefined, 0, '' [21:52] polotek: and false of course [21:52] polotek: v8: !!"" [21:52] v8bot: polotek: false [21:52] polotek: v8: !![] [21:52] v8bot: polotek: true [21:52] polotek: yep, always gotta double check that one [21:52] mikeal: what the fuck [21:53] fairwinds: where my ejs has been body and some vars. guess I could just make the css and js links vars and inject those structures [21:53] texodus has joined the channel [21:53] Bonuspunkt: uhm what happens if i type v 8 : while(true) {} ? [21:54] xonecas: fairwinds: I find dust.js to be faster and more versitile than ejs, I use it to dynamically build html [21:54] polotek: papandreou: I'm pretty sure using typeof and === would still be fast than the in operator [21:54] xonecas: it would work for your scenario there [21:54] polotek: Bonuspunkt: let's not do that [21:54] mikeal: https://gist.github.com/791526 [21:54] mikeal: !== undefined [21:54] mikeal: is probably best [21:54] xonecas: Bonuspunkt: v 8 would take a long *while* to answer :-P [21:55] polotek: yes, the one nice thing typeof gives you is it won't error if the variable hasn't been declared [21:56] polotek: v8: foo === undefined; [21:56] v8bot: polotek: ReferenceError: foo is not defined [21:56] papandreou: mikeal: Haha, I just forked the gist and concluded the same :) [21:56] polotek: v8: typeof foo === 'undefined'; [21:56] v8bot: polotek: true [21:56] polotek: but if you're using object properties it doesn't matter [21:56] DracoBlue: v8: typeof foo.bar === 'undefined'; [21:57] v8bot: DracoBlue: ReferenceError: foo is not defined [21:57] Timmmm has joined the channel [21:57] mikeal: also, reading this [21:57] mikeal: i found a bug in maxClients [21:57] mikeal: in my code and yours [21:57] polotek: haha [21:57] mikeal: sorry, maxRedirects [21:57] polotek: assuming your object actually exists [21:57] mikeal: doesn't support 0 [21:57] DracoBlue: ^^ [21:58] polotek: v8: ({}).foo === undefined; [21:58] v8bot: polotek: true [21:58] papandreou: mikeal: Ah, yeah, I changed that line without fixing the bug, shame on me :) [21:58] isaacs has joined the channel [21:59] papandreou: isaacs: ;;; [21:59] DracoBlue: v8: var undefined = true && foo === undefined; [21:59] v8bot: DracoBlue: ReferenceError: foo is not defined [21:59] isaacs: papandreou: hi [22:00] papandreou: isaacs: Hi, that didn't make you cry :) [22:00] mikeal: also [22:00] isaacs: papandreou: nah. i'm ok with semis. i contribute to node, after all :) [22:00] perlmonkey2 has joined the channel [22:00] isaacs: papandreou: but that comment would never make it as a pull req for npm ;) [22:01] Bonuspunkt: v8: require('fs').readdirSync('.') [22:01] v8bot: Bonuspunkt: ReferenceError: require is not defined [22:01] pquerna: v8: (a{return (a())})() [22:01] v8bot: pquerna: SyntaxError: Unexpected token { [22:01] echosystm has joined the channel [22:01] isaacs: v8: (function a (){return (a())})() [22:01] v8bot: isaacs: RangeError: Maximum call stack size exceeded [22:01] papandreou: isaacs: Hehe :). I guess you really hated Dean Edwards' triple semicolon hack back in the day. [22:02] isaacs: papandreou: what was the triple semi hack? [22:02] paupau has joined the channel [22:02] Timmmm: Hi, I'm trying to get cloud9 (an online IDE that uses node.js) to work. Something tries to write to /var/tmp/ which I don't have permission for. Does anyone know if it is node.js doing this (maybe caching?) or cloud9? [22:02] mikeal: wow [22:02] mikeal: slicing is faster than regex [22:02] mikeal: https://gist.github.com/791539 [22:02] paupau: Is there any good way to ensure I don't leak my Redis client connection? Currently calling client.quit(); on every possible path and it's getting ugly [22:03] mike5w3c_ has joined the channel [22:03] mikeal: papandreou: ^^ [22:03] pquerna: v8: a{return (a());try {a()} catch (e) {a()}; [22:03] v8bot: pquerna: SyntaxError: Unexpected token { [22:03] pquerna: dammit [22:03] papandreou: isaacs: His packer (like YUICompressor) would strip out lines beginning with three semicolons so that you could have debug code in there that wouldn't make it to production, like ";;; if (somethingIsBroken) console.log("you clown");" [22:03] Timmmm: mikeal: Isn't that what you'd expect? [22:03] isaacs: papandreou: oh, that's kind of a cool idea, actually [22:03] isaacs: papandreou: since you'd never do that intentionally otherwie [22:03] richcollins has joined the channel [22:03] isaacs: *otherwise [22:04] pquerna: v8: function a{return a()};try {a()} catch (e) {a()}; [22:04] v8bot: pquerna: SyntaxError: Unexpected token { [22:04] paupau: function a(){ ? [22:04] papandreou: isaacs: Yeah... Just sucks because it's line based, you cannot remove those lines from an ast. [22:04] pquerna: v8: function a(){return a()};try {a()} catch (e) {a()}; [22:04] v8bot: pquerna: RangeError: Maximum call stack size exceeded [22:04] pquerna: v8: function a(){return a()};try {a()} catch (e) { return e}; [22:04] v8bot: pquerna: SyntaxError: Illegal return statement [22:05] papandreou: mikeal: Oops, did I miss something? [22:05] papandreou: mikeal: Or was that some kind of smiley? You young ppl [22:05] isaacs: pquerna: what are you trying to do? [22:05] mikeal: you moved the slice comparisons to regex, but slice is faster :) [22:05] mikeal: i like the change for responseBodyStream [22:06] papandreou: mikeal: There's gotta be a better way, that was so ugly :) [22:06] mikeal: to call the callback on response rather than end [22:06] paupau: idea: call .quit() on http client connection close [22:06] mikeal: it's pretty clear what it's doing [22:06] paupau: seems kind of hacky tying it to http client though [22:06] papandreou: mikeal: Yeah, otherwise you don't get the right response streamed [22:06] polotek: isaacs: is there a way to see all activated modules with npm? [22:06] isaacs: polotek: npm ls active installed [22:07] mikeal: i'd like to find a better option name for noBuffer [22:07] mikeal: the work buffer is used for like 3 things allready [22:07] papandreou: mikeal: Yeah, me too [22:07] pquerna: isaacs: trying to wait for django tests to finish [22:07] mikeal: onResponse? [22:07] mikeal: returnResponse? [22:08] Fuld: Wouldn't node.js make a good web server for serving simple .html files? Like, better than Apache in scaling [22:08] pquerna: isaacs: we have them down to 5 minutes, but its an ungodly long process really... all the time spent in ORM mostly dicking with mysql. [22:08] mikeal: someone should write tests for me :) [22:08] polotek: err, I was using ls activate instead of active. [22:08] polotek: might be time for a nap :) [22:08] paupau: Fuld: yeah you get the benefit of not one-thread-per-connection but you might as well use nginx or something then [22:09] DracoBlue: mikeal: in firefox/ubuntu slice+regex are at same speed, indexOf is ~25% faster. https://gist.github.com/791545 interesting ;-). [22:09] pquerna: Fuld: node.js doesn't have good things like common use of sendfile(), mmap'ed files, good SSL support (yet), good access control, etc that most people want in webservers. [22:09] MattJ: Fuld: why would Node be better than Apache at serving static files? [22:09] papandreou: mikeal: How much faster is the slice thing than the regexp? Also when it isn't 'http:' so that it has to evaluate the second expression? [22:09] Fuld: paupau: I wonder if anyone's made a web server for node.js and put it on github. Like, with configuration / permissions handling and all [22:10] mikeal: yours is only checking for https [22:10] pquerna: node is a great specialized application server, but for 'general' webserver use cases, I think its niave to really think its competitive, at least at the 'base' level. [22:10] paupau: Hmm, I wonder. I kind of doubt it though. I bet everyone's using nginx and not reinventing that wheel. Also memory leaks. [22:10] polotek: Fuld: not that I've seen but that would be interesting [22:10] mikeal: also, it has to check for "http:" and "https:" [22:10] mikeal: you can't get away with just http and https because there are edge cases [22:10] papandreou: mikeal: I'm sure I put a question mark into that regexp :) [22:11] polotek: mikeal: you can get away with for quite a while :) [22:11] mikeal: also, textmate hates that regex [22:11] Fuld: Memory leaks are bad in node.js? :o [22:11] mikeal: it puts a big red line at the end of that line :) [22:11] Fuld: Well, v8 I mean [22:11] papandreou: mikeal: Aaaw, but it's so short and concise :) [22:11] paupau: well not memory leaks so much as [22:11] paupau: not much point garbage collecting an httpd [22:11] mikeal: polotek: i actually hit that edge cases a few years ago and it took days to debug :) [22:12] paupau: there's only memory leaks if you have dangling references, which are tricky to avoid [22:12] papandreou: mikeal: What if the regexp literal is lifted up before the request function? [22:12] mikeal: that would most likely be faster [22:12] mnbvasd: http://bee.5sh.net/adie/xmpp/xmpp-server-2011-01-22-220434.tar.gz [22:12] mikeal: i don't really know regex [22:12] pdelgallego has joined the channel [22:12] mikeal: is that matching "http:" and "https:" [22:12] mikeal: with the colon? [22:12] mnbvasd: erm oops.. well if anyones intrested... meant to be another window ;) [22:13] jashkenas: interestingly enough ... lifting regex literals into local variables, even in a tight loop, doesn't make much of a difference in modern JS engines. [22:13] jashkenas: I used to be religious about it ... but no longer. [22:13] polotek: jashkenas: I assume they're stashed like symbols [22:13] mikeal: it makes a huge difference in SM sometimes [22:14] mikeal: which doesn't matter for node :) [22:14] DracoBlue: @papandreou: tested it in firefox, lifted up regexTest: 1467, kept it this way: 1005. I didn't expected it to be _slower_! [22:14] fairwinds: xonecas: thanks. I will take a look. [22:14] jashkenas: bingo. [22:15] wdperson has joined the channel [22:16] davidascher has joined the channel [22:17] hosh_work has joined the channel [22:17] ayalque: so before i implement this mtime based chache busting mechanism poorly by myself - does anyone want to put in a word or two please? [22:18] mikeal: wait, it's SLOWER? [22:18] papandreou: mikeal: Yes, it is. Hmm, I find the regexp approach to be ~4 times faster that the slicing and dicing: https://gist.github.com/2f0a6a839aa04fc022f9 [22:19] papandreou: DracoBlue: Oh, you beat me to it :) [22:19] jashkenas: local variable lookup versus inlined regex literal. [22:19] jashkenas: I think you'll find the same in chrome as well. [22:19] polotek: you guys should put this stuff on jsperf.com [22:19] jashkenas: polotek: I think there is one... [22:19] paupau: ayalque: ? [22:19] mikeal: i'm showing it a little faster? [22:20] ayalque: paupau: yes! ayalque! that's me! [22:20] polotek: joshthecoder: tweepy is pretty nice [22:20] papandreou: DracoBlue: Ah, they might be able to do some crazy inlining because they're sure that the regexp is always the same. [22:20] paupau: ayalque: watcha implementan [22:20] polotek: ayalque: you're talking file-based cache? [22:20] DracoBlue: papandreou: guess so ;-) didn't expected that :-/ [22:20] polotek: or in memory cache of files [22:21] jashkenas: http://jsperf.com/cached-vs-uncached-regex [22:22] jashkenas: where cached is faster in most, but not all browsers. [22:22] tlrobinson has joined the channel [22:22] admc has joined the channel [22:22] ayalque: no, im talking about adding blabla.js? + mtime dynamically when rendering my html header so browsers like ff will have to get new file versions after i change them [22:22] b_erb1 has joined the channel [22:22] paupau: ayalque: ooh, tricky. [22:22] polotek: cached is faster on chrome 8 [22:23] b_erb1: is there a possibility to dispatch HTTP requests directly to a known agent? [22:23] paupau: ayalque: you're sure it caches based on query params? if so I don't see an issue [22:23] polotek: faster on firefox 4 [22:23] ayalque: paupau: so what do you when you change a js or css or any other static file [22:23] ayalque: question mark [22:23] mikeal: https://gist.github.com/791557 [22:24] mikeal: regexTest: 170 [22:24] mikeal: hoistTest: 151 [22:24] paupau: ayalque: well, you see, I leave this number on it, and then I increment it. manually. sucks, I know [22:24] paupau: I was considering putting git hashes on them instead [22:24] polotek: in firefox 3.6 there's no difference [22:24] mikeal: i'm only testing in node [22:24] polotek: running the perf test that jashkenas just sent [22:25] ayalque: paupau: hrmff "manualy" .. what is that word? [22:25] mikeal: i wonder if you wrap it in a function it'll actually be faster in SM [22:25] ayalque: :( [22:25] paupau: ayalque: why back in my day-- [22:25] mikeal: since it gets traced [22:25] b_erb1: anyone into the new http.Agent stuff? [22:25] mikeal: papandreou: you don't have anything more for me to merge right? [22:26] mikeal: i'm going to make some changes and then merge [22:26] bingomanatee: Whats the best way to detect an array vs. a general object? [22:26] ayalque: paupau: so why would it be very tricky to get the mtime of the static file before rendering the page.. would that take forever? [22:26] paupau: ayalque: oh, sorry, I didn't mean tricky in that way [22:27] paupau: ayalque: I mean "ah, nice trick!" [22:27] papandreou: mikeal: No that'll be all. It was actually all about the "noBuffer" feature :). How about "returnRawResponse" or something? [22:27] bingomanatee: nm - foudn it in underscore [22:27] mikeal: bingomanatee: typeof == object and .length !== undefined [22:27] mikeal: that's kind of long [22:27] polotek: bingomanatee: I use _ pretty heavily in node [22:27] mikeal: i already have options with super long names [22:28] ayalque: paupau: and the manual number you're changing, you have it per file? and you just "remember" to change it after you change the file? [22:28] paupau: ayalque: I know, it's pretty awful [22:28] paupau: I've been just doing that because I'm only versioning one .js file right now [22:28] paupau: but yeah... [22:29] paupau: I should get off my lazy butt and get git hashes on that shit [22:29] papandreou: mikeal: Hmm, I suck at names, should we take a quick poll? [22:29] sriley has joined the channel [22:30] DracoBlue has left the channel [22:31] ayalque: paupau: hehe ok thanks a lot! [22:31] blueadept2 has joined the channel [22:31] mikeal: onResponse [22:31] mikeal: ? [22:31] paupau: ayalque: WAIT YOU'RE CALLING stat() ON EVERY CLIENT CONNECTION YOU'LL KILL US ALL NO AYALQUE STOP COME BACK-- [22:31] mikeal: actually [22:31] mikeal: i have a good idea [22:32] ayalque: paupau: hehehe [22:32] papandreou: mikeal: Then ppl would expect it to take a function? [22:32] papandreou: mikeal: Let's hear it :) [22:32] mikeal: yes [22:32] mikeal: so, if onResponse is true then we'll only call on response and we'll use the main callback [22:32] mikeal: if it's set to a function you can have a callback for onResponse and for onEnd [22:33] bradleymeck has joined the channel [22:33] ayalque: paupau: no i was thinking more like doing it when the server is starting (so yeah it won't be super dynamic - just after server goes down/up) [22:33] papandreou: mikeal: Hmm... If you get the response object you'd probably rather attach an 'end' handler to that instead. [22:33] paupau: ayalque: that's pretty much what I do [22:34] paupau: ayalque: I have a CLIENT_VERSION in my config file and I pre-render my templates at server startup [22:34] papandreou: mikeal: I'm a bit worried about the "on" part, it's a bit of a wtf that you can also set it to true [22:34] paupau: ayalque: also my build system uses CLIENT_VERSION to make the appropriate client-v${CLIENT_VERSION}.js and compact it etc [22:35] paupau: mtime is a good idea though [22:35] texodus has left the channel [22:36] ayalque: paupau: no, wait, what, i'm talking about checking the mtime automatically and not changing something manually - also i have *several* static files that may change or not change separately and must have a cache busting number of their own wow that was long sorry [22:37] paupau: paupau: yeah, I get it [22:37] paupau: er [22:37] paupau: ayalque: * [22:37] ayalque: :) [22:37] paupau: my debug binary actually uses inotify to reload the server when I change stuff [22:37] paupau: but I'm not using that for my prod server yet [22:37] ayalque: paupau: ok thank you a lot for your time and cpu and resources etc... [22:38] paupau: ayalque: NO STOP I WANT MORE IDLE BANTER [22:38] paupau: ACTION spams [22:38] paupau: so yeah uh anyone have opinions about a good way to ensure I don't leak Redis client connections? [22:39] paupau: you have to call .quit() on them or they'll sit there and leak [22:39] paupau: so I'm doing that on every possible success or failure case [22:39] ossareh has joined the channel [22:39] paupau: with some helpers for wrapping callbacks [22:39] paupau: but it kind of sucks [22:39] papandreou: mikeal: Did you make a decision about the noBuffer/onResponse thing? [22:39] paupau: is there a node.js way to ensure resource finalization? [22:39] mikeal: papandreou: just wait, i'll have a diff soon [22:39] mikeal: i'm changing some of the semantics [22:40] ayalque: paupau: i'll be here if you want to tell me about some other manual things you do as a programmer [22:40] papandreou: mikeal: Ok, cool :). I'd suggest removing the 'responseBodyStream' feature, but you'd probably break someone's code. [22:40] paupau: ayalque: well you see I have these thoughts in my head and they're not yet in the computer and I have to MANUALLY TRANSMIT them into this weird encrypted form that never works the way I want [22:41] mikeal: i like responseBodySream [22:41] mikeal: er Stream [22:41] mikeal: it pumps for you [22:41] ayalque: paupau: coming soon - singularity [22:41] papandreou: mikeal: But you lose control of pause/resume, and you don't get notified when the pump is done. [22:42] paupau: cleaning up all your open connections with httpClient.on('close'): good idea (y/n)? [22:42] mikeal: papandreou: doesn't matter most of the time [22:42] mikeal: also, you can just listen for end on the stream you pass in [22:43] mikeal: most of the time you just pass in a file write stream [22:43] saikat has joined the channel [22:44] mikeal: besides [22:44] mikeal: the next version of this the api will change and you won't do it this way [22:44] papandreou: mikeal: Well ok, as long as you have both possibilities :) [22:44] papandreou: mikeal: Looking forward to see what you come up with [22:44] liar has joined the channel [22:44] allengeorge has joined the channel [22:44] mikeal: var x = require({url:adsf}) [22:45] mikeal: req.pipe(x) [22:45] mikeal: x.pipe(fs.createWriteStream('asdf')) [22:45] papandreou: mikeal: I like it :) [22:45] warz has joined the channel [22:45] mikeal: most of the time you'll just [22:46] fairwinds: haven't tried this idea, wondering if a simpleware could not inject css and js into head. Had done something similar in python with WSGI [22:46] mikeal: request({url:'http:blah'}).pipe(fs.createWriteStream('asdf')) [22:46] papandreou: mikeal: My app completely avoids the file system :) [22:47] mikeal: if you're using it as a proxy, you would just do .pipe(response) [22:47] papandreou: mikeal: That's a really nifty API, when is it going to land? [22:47] fairwinds: wow, I wrote simpleware, this should be middleware, heh :-) [22:47] mikeal: i'm moving the repo [22:47] mikeal: so it'll be github.com/mikeal/request [22:48] mikeal: and this will only working 0.3.6+ and 0.4 [22:48] mikeal: cause it'll be built for the new http api [22:48] papandreou: mikeal: More google friendly too, except Google's correcting your name to "mikael" [22:48] mikeal: haha [22:48] bingomanatee: where is a good place to find the api of the Javascript Error object? [22:49] eirikur has joined the channel [22:49] Aria: Hah. [22:49] Aria: Good. Luck. [22:49] Aria: It's inconsistent across implementations at best. [22:49] mikeal: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error [22:49] papandreou: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error [22:49] papandreou: heh [22:49] mikeal: jinx! [22:49] bingomanatee: thanks all [22:50] papandreou: The slightly more verbose form of "+1" [22:51] bingomanatee: +1 > 1 [22:51] papandreou: v8: +1 > 1 [22:51] v8bot: papandreou: false [22:51] kippi has joined the channel [22:52] kippi: hey [22:52] paupau: v8: require('fs') [22:52] v8bot: paupau: ReferenceError: require is not defined [22:52] brapse has joined the channel [22:52] gkatsev: just v8 not node [22:52] paupau: ohnoes [22:52] gkatsev: though, it runs on node [22:52] kippi: are there any good examples of node.js running as a http server. I really want to be able to point node at a directory and serve the content, js/html/images [22:53] gkatsev: see something like node-static [22:54] paupau: has anyone used the raw tcp-forwarding extension for nginx? [22:54] kippi: node-static the best thing out there to do this job? [22:54] gkatsev: there are a few like node-static I believe [22:55] papandreou: kippi: Connect or Express with the staticProvider is also nice, except if you want to gzip. [22:55] admc has joined the channel [22:55] papandreou: kippi: I don't know how it stacks up against the others in terms of performance, but it's pretty solid. [22:55] kippi: hmm gzip would be nice [22:55] paupau: https://github.com/yaoweibin/nginx_tcp_proxy_module er this one [22:56] w0rse: papandreou: gzip is working with staticProvider as well [22:56] papandreou: kippi: gzip's a bit of a pain point for all of them, I think. [22:56] gkatsev: https://github.com/ry/node/wiki/modules#web-frameworks-static has a list of a few [22:56] paupau: wondering if I can use it with socket.io [22:56] ajpiano has joined the channel [22:56] w0rse: papandreou: they call it staticGzip [22:57] papandreou: w0rse: Yeah, I got it working too after node-compress was fixed, but the overhead is big, and it gzips regardless of response body size. [22:58] w0rse: papandreou: there's a handy option to gzip only certain file types (like only css and js) [22:58] papandreou: w0rse: I'm still crossing my fingers for first class gzip support in node, but I probably shouldn't hold my breath. [23:05] temp02 has joined the channel [23:05] altamic has joined the channel [23:05] liar has joined the channel [23:08] paupau: man, github's payment interface is slick [23:09] cloudhead has joined the channel [23:09] Metapony: I'm having problems installing onto cygwin [23:11] xSmurf: anyone using node-Imagemagick? [23:11] warz: is haproxy a good choice for a load balancer in front of socket.io and nodejs? [23:12] yx has joined the channel [23:13] Metapony: Yes! Got it installed!!! [23:13] kippi has left the channel [23:13] yozgrahame has joined the channel [23:14] polotek: Metapony: nice, what was your issue? [23:14] tmzt: paupau: where is this debug binary? [23:14] tc771 has joined the channel [23:14] paupau: tmzt: ? [23:14] tmzt: that reloads the server [23:14] paupau: tmzt: oh that [23:14] paupau: hmm I don't have that public [23:14] Metapony: polotek: On the wiki page here https://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) I had to apply the patch mentioned at the bottom [23:15] paupau: I could clean it up and open source it I suppose [23:15] polotek: cool [23:15] paupau: hmm [23:16] paupau: it's very project-specific right now though [23:16] paupau: also it's a .c file [23:16] paupau: wonder why I didn't write it in node [23:17] xSmurf: blarg this isn't working :( trying to fetch an image from http and resize it [23:19] arpegius has joined the channel [23:23] tim_smart: Node fibers, urgh [23:23] c4milo1 has joined the channel [23:24] pdcawley has joined the channel [23:25] tanepiper: +1 tim_smart [23:25] mraleph: jesus christ [23:26] mraleph: holy fibers [23:26] boaz has joined the channel [23:26] mraleph: what really surprises me is that nobody implements them _right_ everybody takes easy way: pthreads [23:27] paupau: tmzt: https://github.com/pshc/builder [23:27] tim_smart: I like my node evented thanks [23:28] TheEmpath2 has joined the channel [23:28] TheEmpath2: lets talk inheritance! was callee() deprecated? [23:28] tim_smart: Its like node with the node philosophy [23:28] tim_smart: *without [23:28] paupau: coroutines though oh man [23:28] mraleph: dao that can be expressed with words is not true dao [23:29] mraleph: s/dao/tao/ [23:29] tanepiper: anyone who does this needs to go back to the DOM and try it there, then they can come back with their head bowed in shame [23:29] polotek: tim_smart: I don't think it's that bad [23:29] polotek: it's not completely against the node pattern [23:29] polotek: it's still single execution thread [23:29] polotek: only 1 fiber can execute at a time [23:30] awenkhh has joined the channel [23:30] tim_smart: polotek: Yeah it's not *that* bad, but it's still an attempt to avoid callbacks. [23:30] awenkhh has joined the channel [23:30] tim_smart: Its like refusing to eat your vegetables. [23:31] polotek: some folks definitely want to avoid callbacks [23:31] polotek: but that's not the only reason to like fibers [23:31] polotek: I don't like them because it's actually more work [23:31] jetheredge has joined the channel [23:31] polotek: harder to follow the control flow in my opinion [23:32] tim_smart: I found if you write heavy async code well, it looks kinda nice. [23:32] softdrink has joined the channel [23:32] mraleph: you can combine fibers with callbacks for the best spaghetti in the world :-) [23:32] mikeal: papandreou: fixed [23:33] mikeal: and pushed [23:33] mikeal: i'd appreciate an extra pair of eyes [23:33] mikeal: and maybe a little testing [23:33] mikeal: before I push another release [23:33] joelklabo has joined the channel [23:34] xSmurf: yep, nothing I can see to do will make node-imagemagick accept a binary buffer for input :( [23:34] bradleymeck has joined the channel [23:34] papandreou: mikeal: Seems like you're calling options.onResponse twice? [23:36] warz: im new to nodejs and js in general. is it recommended that i use async.js? [23:36] warz: is this something most people use [23:37] maushu: If you like it, use it. If you don't like, don't use it. [23:37] maushu: There is no standard regarding what libs to use. [23:37] MikhX has joined the channel [23:37] tanepiper: warz: async.js is only one of many, it may not suit your style [23:37] maushu: Well, besides express as web server. [23:38] maushu: I myself I prefer IT RAW! [23:38] maushu: kekekekekeke [23:39] tanepiper: Shimmy Shimmy Ya [23:39] tanepiper: Shimmy Ya Shimmy Yah [23:39] aelaguiz has joined the channel [23:39] tim_smart: I only use async libraries when wanting to do multiple things in parallel [23:39] aelaguiz: as far as synchronization primitives is there any standard, ie semaphore? [23:39] polotek: dammit [23:40] polotek: now I gotta listen to that [23:41] polotek: aelaguiz: you don't need semaphores or locks or any of that. [23:41] polotek: node is single-threaded [23:41] tanepiper: One thread to rule them all, and spark over multicore to bind them [23:42] TheEmpath2: is using var Child = Class.extend({}); an efficient way to leverage inheritance? [23:42] paupau: is anyone aware of a streaming image thumbnailer? does such a thing exist? [23:42] paupau: i.e. generate a thumbnail of an image as it's uploaded [23:42] polotek: TheEmpath2: most folks don't use a Class library [23:42] polotek: but the overhead of using one depends on the library [23:42] TheEmpath2: polotek: how can i get some semblance of inheritence? [23:43] mikeal: hey [23:43] mikeal: papandreou: where? [23:43] polotek: I'm not saying you should use one. I'm just saying most folks don't [23:43] polotek: shouldn't* [23:43] polotek: use it if it works for you [23:43] mikeal: does anyone from NodeCamp remember who the dude was who had reverse engineered the kinect camera and had it hooked up to node? [23:44] aelaguiz: polotek: Yes I do, need to lock access to a database [23:44] polotek: aelaguiz: ? [23:44] tanepiper: mikeal: http://labs.blitzagency.com/?p=2634 > [23:44] tanepiper: ? [23:44] papandreou: mikeal: if (options.onResponse) options.onResponse(null, response); and then again 3 lines further down (github line numbers are broken in Chrome, argh) [23:44] TheEmpath2: polotek: im in the process of creating UI elements where i have things like DisplayObjects. buttons, modals, and bars are children of DisplayObjects. I'd like ot leverage inheritance to make coding easier [23:44] polotek: yeah I hear you [23:44] polotek: are you looking for suggestions of class libraries? [23:45] polotek: I don't use them so I wouldn't know what to recommend [23:45] polotek: I use util.inherits [23:45] polotek: which is in node and very simple [23:45] TheEmpath2: not really suggestions. kinda looking for peoples experience with what is the most optimal in terms of overhead and processing [23:45] mikeal: isn't that in another if else? [23:46] TheEmpath2: ACTION is a stickler for speed and performance. [23:46] davidascher has joined the channel [23:47] polotek: TheEmpath2: https://github.com/polotek/evented-twitter/blob/master/lib/evented-twitter.js#L339-355 [23:47] ezmobius has joined the channel [23:47] papandreou: mikeal: Ah, yes, sorry [23:47] polotek: util.inherits just uses javascript prototype inheritance [23:48] polotek: so the only real overhead is looking up properties up the prototype chain [23:48] TheEmpath2: sys.inherits is like copyPrototype? [23:48] mikeal: basically [23:48] polotek: take a look at it, it's really simple [23:48] eikke has joined the channel [23:49] tanepiper: util.inherits should only be called once as well, since the module will be cached so the overhead is only on the first call (afaik) [23:49] Metapony: I've just got node.js installed under cygwin, but am trying to install npm too... anyone know of a good guide (or advice?) [23:50] softdrink1 has joined the channel [23:50] polotek: Metapony: how did you try to install it? [23:50] polotek: did you try the oneliner? [23:51] polotek: curl http://npmjs.org/install.sh | sh [23:51] Qbix1 has joined the channel [23:51] derferman has joined the channel [23:51] papandreou: mikeal: Hmm, doesn't quite work out of the box with my test case. I'm looking into it [23:52] polotek: Metapony: checkout the readme https://github.com/isaacs/npm#readme [23:52] Metapony: polotek: yeah, I tried the whole curl http://npmjs.org/install.sh | sh way and it said it was installed, but I can't run npm on the commend line... [23:52] polotek: and I recommend changing the root directory where it installs packages [23:53] polotek: if the install ran cleanly it might mean it installed the cli but it's not in your path [23:56] Evet has joined the channel [23:56] xSmurf: I'm a fucking idiopt [23:57] Metapony: polotek: I've installed node to ~/node should I be in this dir when I install npm??? [23:57] mikeal: papandreou: thanks for looking in to it [23:57] mikeal: i really need some tests :) [23:58] polotek: Metapony: no [23:58] polotek: but what I don't know is if npm will detect the location itself [23:58] polotek: or if it assumes the usual install location [23:58] polotek: I would be surprised if isaacs didn't handle that