[00:00] elliottcable: lol [00:00] elliottcable: You’re in a JS channel, Tautologistics, we’re used to line termination o_O [00:01] scudco has joined the channel [00:01] Tautologistics: No. Terminators change based on context [00:01] elliottcable: oh lol [00:01] Tautologistics: in erlang it could be nothing, ".", or ";" [00:12] Tautologistics has joined the channel [00:30] alexiskander has joined the channel [00:36] elliottcable: FFFF [00:36] elliottcable: “KeyError: 'VENDOR'” [00:36] dnolen has joined the channel [00:40] elliottcable: K, well, I did my best. Maybe I can get ryah_away to take a look at it later. [00:41] elliottcable: 3 hours is about my hard limit for staring blankly at C++ and Python build tools that I don’t understand. [00:41] elliottcable: anybody know if ryah_away prefers GitHub messages or e-mail or what? [00:42] jed has joined the channel [00:45] isaacs: elliottcable: send to the list [00:45] isaacs: what's going on? [00:48] elliottcable: isaacs: After a few hours of poking around in the scons/waf/whatever tools, I got this far: http://github.com/elliottcable/node/commit/11035f6da339f922328225fdc22dd471d6d342e7 [00:48] elliottcable: isaacs: unfortunately, that blows up on `make` with a cryptic error. [00:48] elliottcable: http://gist.github.com/254642 [00:50] elliottcable: afact the problem is that I duplicated the PREFIX setup here: http://github.com/elliottcable/node/blob/11035f6da339f922328225fdc22dd471d6d342e7/src/node_version.h.in#L12-13 [00:50] elliottcable: but build blows up on that file, so assumably the @VENDOR@ and @SITE@ are not getting replaced in-line. And I have no idea where in the clusterfuck-that-is-wafadmin the system is instructed to replace @PREFIX@ with the actual prefix as passed to --prefix [00:50] elliottcable: >,< [00:52] isaacs: yep, it's beyond me [00:54] elliottcable: )-: [00:54] elliottcable: god, I hate mailing lists. [00:54] elliottcable: ACTION starts poking around, tyring to figure out how to get this information onto there, in such a way as he’ll actually see any helpful replies… [00:55] isaacs: you should join the nodejs list [00:55] isaacs: do it in digest mode, scan the headlines every few days. [00:55] isaacs: it's a good practice. [00:59] jcrosby has joined the channel [01:03] aurynn: I just read everything [01:06] elliottcable: inimino: I’m on the list [01:06] elliottcable: aw shit, he left [01:06] elliottcable: aurynn: too much for me. I’m on quite a lot of mailing lists, they all get filtered to the sidelines. [01:06] alex-desktop has joined the channel [01:06] elliottcable: ACTION absolutely hates mailing lists [01:07] elliottcable: anyway, posted. [01:07] elliottcable: If any of you have any ideas, please post: http://groups.google.com/group/nodejs/browse_thread/thread/cf5ae41c5add16ac [01:09] jan____: deferreds! [01:11] alexiskander has joined the channel [01:11] aurynn: ACTION defers her opinion [01:11] elliottcable: lol [01:12] davidsklar has joined the channel [01:12] elliottcable: 83 fricking nicks [01:12] elliottcable: this place has grown o_o [01:12] logicuce has joined the channel [01:13] rictic has joined the channel [01:30] jcrosby has joined the channel [01:36] gwoo has joined the channel [01:46] jed has joined the channel [01:49] gwoo has joined the channel [01:56] logicuce has left the channel [02:13] rtomayko has joined the channel [02:18] shfx has joined the channel [02:19] Yuffster has joined the channel [02:28] jazzychad has joined the channel [02:37] jtaby has joined the channel [02:38] dnolen_ has joined the channel [02:41] jed has joined the channel [02:43] binary42 has joined the channel [02:47] RayMorgan has joined the channel [02:56] eddanger has joined the channel [03:29] Yuffster has joined the channel [03:32] jed: tlrobinson: it's mostly just a stub, but i took a first rough cut at a JSGI wrapper for node.js. [03:32] jed: tlrobinson: http://github.com/jed/http-jsgi/ [03:33] aurynn: This is awesome :) [03:33] jed: i'd really like to see node.js standardize on the easier parts of the spec. [03:33] jed: such as replacing req.uri with the JSGI equivalents. [03:34] jed: i'm not too sure how async fits, so i left it out for now. [03:34] aurynn: the best part of a new platform is, you can build all the libraries you like [03:34] jed: yeah, the low-levelness is definitely motivating. [03:35] jed: tlrobinson [03:35] aurynn: It probably won't standardize on JSGI - there'll be a better metaphor soon [03:35] aurynn: Someone ported WebMachine earlier today [03:35] jed: tlrobinson's approach to promises is, as i understand it, to return a promise instead of a response, where the callback returns the actual response. [03:36] jed: i don't know much about webmachine, will have to dig in. [03:39] jed: aurynn: does webmachine support streaming? [03:39] jed: aurynn: that's my biggest concern with JSGI. [03:39] aurynn: I don't know if nodemachine does streaming [03:42] sztanphet has joined the channel [03:46] jtaby_ has joined the channel [03:51] [i]chuck has left the channel [03:54] JoePeck has joined the channel [04:02] jed: aurynn: webmachine looks cool. watching the video now. [04:02] aurynn: :) [04:02] jed: aurynn: (but no continuous streaming, at least in the erlang version) [04:03] aurynn: the node version may be different [04:08] jcrosby has joined the channel [04:11] eddanger has joined the channel [04:22] dnolen has joined the channel [04:27] hassox has joined the channel [04:37] dnolen has joined the channel [04:39] quirkey has joined the channel [04:45] jtaby has joined the channel [04:55] bentomas has joined the channel [05:10] jed has joined the channel [05:10] inimino: ACTION grumbles about kids these days... not knowing how to use mailing lists [05:12] eddanger has joined the channel [05:12] bentomas: inimino: what are "they" doing wrong? Maybe they just haven't learned! [05:12] inimino: apparently IBM's lawyers sent Crockford a letter to ask if they could get an exception to the "no evil" clause [05:12] inimino: bentomas: yes, I think so [05:13] jan____: inimino: yeah, he sent him one. [05:13] inimino: bentomas: I think it's just an issue of not knowing how to use a decent email client (not that there really are any) and/or using primarily Webmail [05:13] jan____: s/him/them/ [05:13] inimino: yeah [05:13] aurynn: inimino, that's awesome [05:14] aurynn: inimino, also, there are no decent email clients. [05:14] inimino: I know :) [05:14] inimino: but getting one that sucks less is a start [05:15] bentomas: I'll never understand why everyone doesn't use GMail [05:15] aurynn: Well, it's not suitable for corporate emails. [05:15] scudco has joined the channel [05:16] jan____: bentomas: gmail doesn't work for me [05:17] bentomas: huh, well, I stand corrected! [05:18] inimino: ACTION does not use Gmail [05:18] bentomas: what do you all use? [05:19] aurynn: Thunderbird 3 [05:19] jan____: IMAP + Procmail + Mutt + Mail.app [05:19] aurynn: it's lurvely [05:20] inimino: mostly mutt and Thunderbird [05:20] inimino: unfortunately mutt's IMAP support never really works well for me [05:21] jan____: I use mutt on Maildirs that my IMAPd serves to mail.app [05:22] emyller: Gmail here. (+ Google Apps) [05:22] inimino: yeah I use mutt over SSH [05:23] bentomas: huh, never used Mutt before, but I'll give it a try [05:23] bentomas: what are its advantages? [05:25] inimino: it's unequaled for dealing with large volumes of mail [05:27] bentomas: inimino: was your complaint about "kids these days" targeted at anything in particular? this is the first time I have participated in a mailing list and am curious about what are the faux pas [05:28] inimino: bentomas: no, I was just remarking on someone complaining about mailing lists in the backscroll [05:29] bentomas: ahh! thanks for the help. [05:29] inimino: bentomas: though I do notice a fair amount of top-posting and people not trimming their replies on the mailing list [05:30] bentomas: inimino: yeah not trimming replies is a major pet peeve of mine [05:31] inimino: likewise [05:50] Micheil has joined the channel [06:10] aurynn: So to determine the byte size of a string, I walk the length of the string using charCodeAt and sum it? [06:10] aurynn: hm [06:10] aurynn: no, that isn't right [06:10] jed: there's a method off of process for that. [06:11] aurynn: which one? [06:11] Tautologistics has joined the channel [06:11] jed: aurynn: process._byteLength [06:11] inimino: _byteLength or something [06:11] inimino: but you would need to walk it and do UTF-16-to-UTF-8 math otherwise [06:12] inimino: (depending on how you got the string) [06:12] aurynn: _byteLength was it [06:12] aurynn: I assume that it handles the conversion for me? :) [06:12] jed: aurynn: yep. [06:13] jed: aurynn: you should be good. [06:13] aurynn: Awesome. Why isn't that in the doc? [06:13] scudco has joined the channel [06:13] aurynn: jed, thank you :) [06:13] jed: aurynn: (i've used this too: encodeURIComponent( str ).split( /%./).join("").length ) [06:13] inimino: well, assuming you have a UTF-16 string [06:13] jed: aurynn: no problem. i assume the underscore means they don't want it public? [06:13] inimino: normally in node what you want to do is avoid doing that kind of encoding/decoding in the first place [06:14] inimino: i.e. if the string is coming from a file you could use "binary" encoding to read it in and then you can just use .length [06:15] aurynn: yeah, _ generally means "private". But then why is it exported? [06:15] inimino: it's useful sometimes [06:15] jed: aurynn: i'd imagine someone probably asked for it to be exposed. [06:16] jed: aurynn: also, maybe it's the kind of thing better done in c++ than in javascript. [06:19] aurynn: Maybe [06:27] micheil_ has joined the channel [06:33] bentomas has left the channel [06:34] mahemoff has joined the channel [06:35] Micheil has joined the channel [06:41] micheil__ has joined the channel [06:41] micheil__ has left the channel [06:42] micheil__ has joined the channel [06:42] micheil__: hmm.. [07:04] aurynn: Woo [07:04] aurynn: My update of postgres.js still works for simple queries. [07:31] hober has joined the channel [07:39] scudco has joined the channel [07:57] voodootikigod has joined the channel [08:03] jcrosby has joined the channel [08:05] rictic has joined the channel [08:34] cmlenz has joined the channel [08:52] simoncpu_ has joined the channel [09:33] sveimac has joined the channel [09:35] teemow has joined the channel [10:31] tlrobinson: jed: cool i'll check it out [11:30] jtaby has joined the channel [11:46] saikko has joined the channel [12:02] pdelgallego has joined the channel [12:47] soveran has joined the channel [12:54] malkomalko has joined the channel [12:55] michaelk^ has joined the channel [13:01] soveran has joined the channel [13:26] sveimac has joined the channel [13:27] binary42 has joined the channel [13:35] rgl has joined the channel [13:35] rgl: hi [13:35] rgl: is there a way to serve static files (html/css/js)? eg. for quick demos. [13:40] jasondavies has joined the channel [13:46] ryah_away: rgl: there is an example in node_chat [15:06] ryah: snwoing in lübeck! [15:18] Tautologistics has joined the channel [15:29] rgl: ryah, thx. I'll look. [15:30] saikko has joined the channel [16:04] qFox has joined the channel [16:17] malkomalko has joined the channel [16:17] voodootikigod has joined the channel [16:17] jed has joined the channel [16:17] brandon_beacher has joined the channel [16:17] onar has joined the channel [16:17] mies has joined the channel [16:17] rgl has joined the channel [16:23] damien has joined the channel [16:31] RayMorgan has joined the channel [16:34] alex-desktop has joined the channel [16:38] bentomas has joined the channel [16:38] Micheil has joined the channel [16:49] scudco has joined the channel [16:54] Tautologistics has joined the channel [17:11] gwoo_ has joined the channel [17:13] jasondavies has joined the channel [17:15] rgl: ryah_away, humm the node_chat does not work with current master branche of nodejs. it says there is no process.fs.cat function [17:38] mediacoder: rgl: its posix.cat() now, but subject to change :-) [17:51] rgl: ah thx. it works now :) [18:06] erichocean has joined the channel [18:15] sudoer has joined the channel [18:30] claudio has joined the channel [18:31] claudio: Hey. Using the recente libxml.js, I've written a (working) XML-RPC client for node.js. Is anyone interested to see/audit it? (this is my first node.js module, so I don't knwo if I'm on the right track) :) [18:33] Connorhd has joined the channel [18:39] aurynn: claudio, awesome. :) [18:40] claudio: thanks :) [18:40] eddanger has joined the channel [18:41] claudio: I suppose I should open a github account, now... pant. [18:42] michaelk^ has joined the channel [18:48] trevor has joined the channel [18:58] cloudhead has joined the channel [18:58] Tautologistics has joined the channel [19:09] logicuce has joined the channel [19:10] logicuce: cxx is not a valid task generator -> ['command-output', 'cmd_output', 'cc', 'cmd', 'subst', 'copy'] [19:10] logicuce: I get above error while trying to build node.js in Ubuntu 9.04 [19:10] logicuce: just downloaded from Git [19:10] logicuce: :( [19:12] mediacoder: logicuce: install g++ [19:13] dnolen has joined the channel [19:13] logicuce: gcc won't do? [19:13] rgl has joined the channel [19:13] logicuce: ok looking into it [19:13] mediacoder: should work [19:14] logicuce: configure works correctlt [19:14] logicuce: I get error while 'make' is run [19:14] logicuce: configure should have raised issues if it was compiler related.. what say [19:14] logicuce: ? [19:15] logicuce: gcc is already installed [19:15] mediacoder: i dunno :-) i just rememebr reading this on the mailinglist [19:16] logicuce: hmm [19:16] logicuce: found this [19:16] logicuce: http://www.travisswicegood.com/index.php/2009/07/11/compiling-node-js-on-ubuntu-9-04 [19:16] aurynn: Hm. [19:16] aurynn: I suspect I'm generating bad queries. [19:16] mediacoder: logicuce: http://groups.google.com/group/nodejs/browse_thread/thread/28b1fcdaae1b5ade [19:16] ashb: build-essentials installed? [19:18] logicuce: ashb: dunno [19:18] logicuce: :( [19:18] logicuce: lemme see [19:18] logicuce: the link mediacoder gave talks about same problem though [19:19] mediacoder: yea, and installing g++ seem to have solved it for tis guy..thats why i suggested it, too :-P [19:20] logicuce: Thanks.. I am not that used to working in unix.. so taking my time to set up things [19:20] logicuce: :) [19:21] mediacoder: good luck :-) [19:22] michaelk^ has joined the channel [19:22] logicuce: So it seems build-essentials come up with g+ [19:22] logicuce: g++* [19:22] logicuce: that should work... downloading [19:22] logicuce: :) thanks guys [19:27] jcrosby has joined the channel [19:29] rgl has joined the channel [19:30] isaacs has joined the channel [19:42] logicuce: it worked and hello world also worked :) [19:42] logicuce: Thanks again guys [19:42] mediacoder: hehe, great :-) [19:52] soveran has joined the channel [20:07] aurynn: I'm trying to debug my network talking. Can I get what tcp is going to send out, in hex? [20:09] inimino: aurynn: wireshark [20:10] logicuce: if on windows then use MS Netmon [20:10] aurynn: on OSX. [20:18] aurynn: Oh, does Node have an objectDestroyed event? [20:23] teemow has joined the channel [20:27] sifi has joined the channel [20:28] sifi: anyone know of a good commandline parser in js? [20:28] inimino: aurynn: what is that? [20:29] aurynn: inimino, it would allow me to implement cleanup [20:29] aurynn: Basically analogous to sub DESTROY in perl, or __destroy__ in Python [20:30] inimino: ah, no there is nothing like that in JavaScript [20:30] aurynn: Right, which is why I wondered if node had an objectDestroyed event I could listen for [20:30] aurynn: myObj.addListener("objectDestroyed", someCleanupFunction); [20:30] inimino: I'm not sure how or why you'd implement that in a language that doesn't have it... [20:31] aurynn: In this case, so I can clean up remote resources [20:31] inimino: adding a hook to the garbage collector and checking callback functions on every collected object wouldn't be terribly efficient [20:32] inimino: can you just do the cleanup you need directly? [20:33] aurynn: Probably [20:34] aurynn: ACTION goes back to hacking on postgres-js [20:36] Tautologistics: aurynn: may be too late but two good choices for peeking at network traffic are ngrep and wireshark [20:36] michaelk^ has joined the channel [20:36] Tautologistics: Ah, wireshark's been mentioned [20:37] isaacs has joined the channel [20:38] mahemoff has joined the channel [20:45] aurynn: hm [20:46] rbranson_: unfortunately it's unlikely your long-lived objects will EVER be garbage collected in V8, unless you've got some serious churn [20:47] aurynn: so the V8 process will just grow? [20:47] rbranson_: it's very hesistant to actually GC [20:47] rbranson_: and most of the objects you're using to handle a single request will get allocated in the 'young' generation [20:48] aurynn: ACTION rewrites postgres-js to be hesitant with its network traffic [20:48] rbranson_: what most people want is an event when the refcount hits 0 [20:48] rbranson_: and V8 doesn't really count references [20:55] aurynn: Smarter GC than refcounting? [20:56] rbranson_: yeah, it traverses the object graph at GC time [20:56] alex-desktop: aurynn: Ref counting doesn't work if there can be circular references. [20:56] rtomayko has joined the channel [20:56] rbranson_: it can, but it gets tricky and expensive [20:56] alex-desktop: yeah [21:08] aurynn: It's so much fun to take someone's code, and rearchitect it completely. [21:17] ryah: people really want autoreloading code... [21:17] ryah: someone should build that into their framework [21:21] mediacoder: hm, there is one project on github [21:24] qFox: i dont suppose node can be "easily" installed and run adjecent to an existing lamp setup? [21:24] qFox: on centos, no less :/ [21:24] qFox: or windows, but i understand that's going to be impossible for now [21:25] qFox: like, have it run on a seperate port, not colliding with apache.. [21:25] qFox: but i suppose that'll cost too much configuration [21:26] rbranson_: i guess it depends on what you consider too much :) [21:27] qFox: i guess that answers my question :) [21:27] qFox: yeah i'm a bit alergic too cli-ing and having to setup everything, yknow. i just want to code [21:27] qFox: allergic [21:28] rbranson_: node itself is pretty easy to install [21:28] qFox: right now i'm not even sure whether my server has a python interpreter at all [21:28] rbranson_: it's a ./configure; make; sudo make install [21:29] qFox: rbranson_> sure, but will it screw up an existing apache config hosting on port 80? [21:29] rbranson_: no [21:29] qFox: then how does it serve [21:29] rbranson_: most of the time people setup a proxy [21:29] qFox: ACTION chuckles [21:29] rbranson_: so that, say, /node goes to port 8888, where your node is runnig [21:30] aurynn: Yay, proxay. [21:30] rbranson_: but you can just connect to it at the port it's listening [21:30] qFox: when i install it, what exactly happens? i mean, will it start running a daemon or anything? [21:31] aurynn: think of node as an interpreter. [21:31] aurynn: like python, or perl [21:31] qFox: sure, but i also think of it as a webserver [21:31] qFox: which is my concern.. [21:31] aurynn: It's not [21:31] aurynn: It's an interpreter/runtime [21:31] aurynn: upon which you can run webservers [21:32] rbranson_: yeah, your node script itself says "I am a web server, listen on this port" [21:32] rbranson_: not anything else [21:32] qFox: node acts as an interface to serve content? [21:32] rbranson_: nope, your code does [21:32] qFox: (forgive my wording :) [21:32] qFox: yeah, but through node [21:32] rbranson_: node.js just provides the ability to read files, listen on ports, etc [21:32] aurynn: Node is a programming environment [21:32] qFox: i mean, node has to have the internals to be able to serve the content externally [21:33] aurynn: Node is just a programming environment. [21:33] qFox: hm [21:33] aurynn: You can write code that talks TCP and serves HTTP content [21:33] qFox: okay [21:33] qFox: that makes sense (to me) [21:33] aurynn: Or you can write code that walks your filesystem and does interesting things, but never touches the TCP interface [21:34] qFox: anyone know whether it'll give problems on centOS? [21:34] qFox: and how i can test for a python interpreter :p [21:39] qFox: hmk [21:47] mediacoder: qFox: i have it running on centOS [21:48] mediacoder: no problems, might need newer python maybe [21:52] aurynn: Implementing the postgres protocol is taking some major brainpower. [21:53] qFox: mediacoder> how do i check whether the interpreter is of the correct version? [21:53] qFox: and how do you update it... i'm already pretty sure it wont be up to do [21:53] qFox: date. [21:53] mediacoder: try installing node/running waf :-) [21:54] qFox: i'm rather afraid installing it will b0rk something :/ [21:54] qFox: something i wont be able to fix myself [21:54] mediacoder: node wont..probably if you mess too much with python [21:55] qFox: ok but it will warn beforehand if python is too old, right? [21:56] mediacoder: yea, it wont run the waf stuff and wont install anything :-) [21:56] qFox: hmk [21:56] qFox: i'll give it a go then [21:57] RayMorgan has joined the channel [22:22] kriskowal has joined the channel [22:29] sudoer has joined the channel [22:53] gwoo has joined the channel [23:31] Tautologistics has joined the channel [23:40] aurynn: should I do [23:40] aurynn: var stmt = db.prepare("query") [23:40] aurynn: or db.prepare("query").addCallback(function working with the statement); [23:40] aurynn: ? [23:44] aurynn: I'm leaning towards var stmt = [23:45] eddanger has joined the channel [23:49] saikko has joined the channel [23:49] inimino: aurynn: it requires a TCP roundtrip to the server to prepare the statement? [23:50] aurynn: It requires 3 to do the prepare properly [23:50] inimino: seems that should be asynchronous then, no? [23:50] aurynn: yes [23:50] aurynn: I'm trying to figure out how [23:51] inimino: oh [23:51] aurynn: I can't find a good place to hang the asynchronous bits off of [23:51] dnolen has joined the channel [23:51] inimino: well var stmt = db.prepare() should be fine [23:52] inimino: then when it is first used, it will just have to wait for the prepare to come back [23:52] inimino: is the only thing you can do with a prepared statement bind/execute it? [23:52] rictic has joined the channel [23:52] aurynn: Pretty much, yes. [23:53] aurynn: Though theoretically you can hand it around, if you wanted [23:53] aurynn: var stmt = db.prepare("query").addCallback(function (stmt){ return stmt; }); [23:53] aurynn: ;) [23:54] rbranson_: stmt won't be the actual statement [23:54] rbranson_: since it's async [23:54] rbranson_: I don't think addCallback returns anything [23:54] inimino: so there will be something like stmt.execute( ...bindings..., callback) [23:54] inimino: it returns the promise itself [23:55] rbranson_: well, the prepare should I assume as well? [23:55] inimino: anyway, I don't think .prepare() needs to expose any callback [23:55] inimino: the only thing you can do with a prepared statement is use it, right? [23:55] inimino: so just expose the API for using it [23:55] inimino: the use of it is going to be async [23:57] inimino: so when it's used, it the prepare call to the db engine hasn't come back yet, you just wait until it has to send the next command [23:57] inimino: but you don't need to expose the 'prepare call came back from the db' to the API user [23:57] rbranson_: I see what you're saying [23:58] rbranson_: any subsequent calls can wait until it's actually prepared [23:58] aurynn: subsequent calls get buffered until it's prepared [23:58] inimino: yes [23:58] rbranson_: brilliant :D