[00:00] vahe has joined the channel [00:01] bartek: Ah ok, my problem was I was setting the listener on server, not req [00:02] dyer has joined the channel [00:06] bartek: Ok, now to make sure I understand this. I have a node instance that also has socket.io listening on the server declared. I want to send json data to my node (which I've now figured out) but then I want to take that data and broadcast it to my socket.io clients? It seems like this isn't the right way to think of it, because the req.on('data', ...) that I'm getting the data in has no notion of client.broadcast(..) ? [00:06] raidfive has joined the channel [00:06] pedrobelo has joined the channel [00:07] dguttman has joined the channel [00:07] jpld has joined the channel [00:08] dguttman has joined the channel [00:09] dguttman_ has joined the channel [00:10] langworthy has joined the channel [00:10] dguttman has joined the channel [00:13] tmpvar: bartek, something like https://gist.github.com/910953 [00:14] bartek: Oh [00:14] philhawksworth has joined the channel [00:14] bartek: I can broadcast from the socket like that? Sweet. [00:14] bartek: So simple, thanks tmpvar :) [00:14] tmpvar: np! [00:15] perezd: cloudhead2: cloudhead_ cloudhead u around? [00:15] cloudhead2: perezd yea [00:15] perezd: can I DM you for a moment? [00:15] cloudhead2: sure [00:15] kriszyp has joined the channel [00:16] disq has joined the channel [00:18] dguttman_ has joined the channel [00:18] MikhX has joined the channel [00:19] unlink has joined the channel [00:19] unlink has joined the channel [00:20] dguttman has joined the channel [00:21] flat_ has joined the channel [00:25] flat_: piscisaureus: Thanks. Problem solved. It wasn't node's fault after all -- it was my C program. I hadn't known that the Linux kernel line-buffers stdout on the console, but fully buffers it on the pipeline by default. fflush(stdout) saves the day. Thanks for pointing me in the right direction. [00:25] timmywil has joined the channel [00:25] flat_: SubStack: ditto. [00:25] piscisaureus: np [00:28] tjgillies: Object # has no method 'bodyParser' [00:28] tjgillies: :( [00:28] gmanika has joined the channel [00:29] not_zpao has joined the channel [00:30] ohtogo has joined the channel [00:30] skm has joined the channel [00:33] astropirate has joined the channel [00:34] postwait has joined the channel [00:35] davidvanleeuwen has joined the channel [00:36] tjgillies: maybe time to update node [00:37] zcopley_ has joined the channel [00:38] techwraith: That looks like an express issue [00:38] samcday: tjgillies, They renamed it [00:38] techwraith: What version of express are you using? [00:38] techwraith: or maybe not [00:38] techwraith: lol [00:39] samcday: Connect 1.0 - bodyDecoder is now bodyParser. Maybe you're running an older version of Connect. [00:39] tjgillies: it worked on my newer install [00:39] samcday: sudo npm up [00:39] tjgillies: oh npm up [00:39] tjgillies: thats the bloody command [00:39] tjgillies: thnx [00:39] samcday: =) [00:39] samcday: welcome [00:39] techwraith: I think npm install will install the latest too [00:40] tbranyen: using github in ie5.5 is not pleasant [00:40] Charuru: sudo npm up upgrades everything? [00:40] tbranyen: >_> [00:40] dguttman has joined the channel [00:40] Charuru: does it upgrade npm itself? [00:40] dguttman has joined the channel [00:40] tbranyen: Charuru: yeah it will if it needs to [00:41] Charuru: nice thanks [00:42] Charuru: can i use npm to upgrade node itself? [00:42] Me1000 has joined the channel [00:42] marajit has joined the channel [00:43] tbranyen: theoretically its possible, but i don't think any packages exist that do that [00:43] Jamool has joined the channel [00:44] Charuru: would be nice as a feature :) [00:45] darshanshankar has joined the channel [00:45] tbranyen: compiling node in windows 2000 virtual machine [00:45] tbranyen: this is gonna be slowww [00:46] kmiyashiro has joined the channel [00:46] Charuru: why? [00:46] systemfault: tbranyen: Oh shit, why? :( [00:47] broofa has joined the channel [00:49] diego_ar has joined the channel [00:51] mscdex: tbranyen: psh that's nothing [00:51] mscdex: tbranyen: i compile node on an nt4 server vm [00:51] mscdex: :) [00:51] mscdex: in cygwin mind you [00:51] briznad has joined the channel [00:51] marajit has left the channel [00:51] mscdex: nt4 is missing too much stuff for mingw builds [00:51] mscdex: :( [00:52] tjgillies: lol: npm ERR! Just tweeting a tiny part of the error will not be helpful. [00:52] gmanika: ok... why? [00:52] tbranyen: mscdex: i gotta get my ibm xt booted up and compile it on that! [00:52] maushu_ has joined the channel [00:53] tbranyen: too bad the hd is like 500kb or something [00:53] gmanika: I wonder if node supports serial ports [00:53] samcday: gmanika, There's a lib for that [00:53] tbranyen: or mb [00:53] tbranyen: i can't remember [00:53] samcday: gmanika, https://github.com/voodootikigod/node-serialport [00:53] tbranyen: a 10MB Seagate ST-412 hard drive [00:53] tbranyen: lol [00:54] gmanika: gasp [00:54] tbranyen: not quite enough to install node :( [00:54] samcday: gmanika, The guy who wrote that will be presenting it at Nodeconf [00:54] tbranyen: yeah chris puts on jsconf as well [00:54] tbranyen: hope he talks about it there [00:54] heythisisdave has joined the channel [00:55] gmanika: that is too awesome [00:55] Jamool_ has joined the channel [00:55] samcday: Agree ;) [00:55] tbranyen: mscdex: 9 minutes [00:55] tbranyen: not too bad [00:56] themiddleman_itv has joined the channel [00:57] mscdex: heh [00:58] techwraith: anyone here use node_redis? [00:58] gazumps has joined the channel [00:59] Jamool_ has joined the channel [00:59] samcday: tbranyen, I got gitteh cloning repos over HTTP :D [01:00] tbranyen: ya i saw your commit that's dope [01:00] samcday: And the Git protocol too, but I can't finish that version, since git protocl doesn't transmit pack indexes [01:00] tbranyen: you gotta write a replacement git with node [01:00] samcday: And generating them basically requires me to be able to parse packfiles (including ofs and sha1 deltas) [01:00] samcday: Hehe maybe :p [01:01] samcday: I'm a little hesitant to do any more though, since I saw that one of the guys doing libgit2 work atm is interested in implementing remotes in libgit2 for gsoc [01:01] samcday: I just can't help myself though >< [01:01] tbranyen: yeah there was a lot of interest on the mailing list for that [01:01] tbranyen: i didn't read much into it tho [01:02] samcday: Yeah. Then again, a libgit2 version wouldn't be as sexy and parallel I suppose :p [01:02] cellvia has joined the channel [01:02] samcday: And more importantly, who cares about ugly C code! js ftw! [01:03] tbranyen: heh thank god everything is moving towards thin bindings [01:03] perlmonkey2 has joined the channel [01:03] samcday: Yeah :D [01:03] samcday: It was remarkably simple to do the protocol implementations actually [01:03] samcday: Ironically the dumb HTTP one is harder, since all the logic is client-side [01:04] sleeplessinc has joined the channel [01:04] samcday: But that's where node.js power shined - I could just queue up dozens of http requests on keepalive connections and kick-back, wait for them to return [01:04] samcday: Then I just took advantage of the libgit2 bindings to walk through raw packfiles, load commits, etc [01:05] zcopley has joined the channel [01:06] Poetro has left the channel [01:08] bartek: tmpvar: (Sorry I had to step out), looking back at your example here: https://gist.github.com/910953 -- When I send a curl request to this, the request never gets a response? The console.log is called and I can see the data coming in on the server end, but yah .. no response? [01:10] pt_tr: Is there a recommended way of running non-js applications from node? [01:10] hij1nx has joined the channel [01:11] samcday: pt_tr, Depends what application. [01:11] samcday: Generally, if it has a command-line binary, you can use node's excellent child_process stuff to spawn the binary and stream data in/out of it,. [01:11] perezd: ryah: [01:11] samcday: (in a sexy evented non-blocking manner) [01:11] perezd: u available? [01:12] eventi has joined the channel [01:12] pt_tr: samcday: If I'd like to run something like I'd run it from the terminal [01:12] pt_tr: What would I do? [01:12] samcday: pt_tr, Yep, child_process is definitely for you. [01:12] pt_tr: Cool, thanks [01:12] samcday: pt_tr, http://nodejs.org/docs/v0.4.5/api/child_processes.html, behold. [01:12] pt_tr: Magic [01:12] samcday: =) [01:12] maushu__ has joined the channel [01:13] ryanfitz has joined the channel [01:15] marajit has joined the channel [01:16] marajit: what encoding options are their for fs.readFile()? [01:16] marajit: binary, and ? [01:17] techwraith: Does anyone know how to get a list of zsets with node_redis? [01:17] ckknight: 'utf-8' is one, marajit [01:17] bnoguchi: techwraith: Check the tests [01:18] marajit: ckknight: is there a list somewhere? don't see on nodejs.org [01:18] samcday: marajit, there is. [01:18] samcday: http://nodejs.org/docs/v0.4.5/api/buffers.html#buffers [01:18] ryah: perezd: what's up? [01:19] perezd: ryah: having some issues with the tls.js in 0.4.5 [01:19] perezd: doing PUT / uploading data stream of png through https [01:19] perezd: getting https://gist.github.com/757319a09ecdfecf00eb [01:19] techwraith: bnoguchi: not in there as far as I can tell [01:19] ryah: perezd: email node-dev, I don't want to look into it right now [01:20] perezd: kthx [01:20] ryah: perezd: or open an issue on github [01:20] marajit: samcday, there it is. thanks [01:20] TheIronWolf has joined the channel [01:21] samcday: marajit, Welcome! :) [01:21] marajit: samcday, ckknight. any idea why my css isn't showing when i add doctype html declaration? it works fine without node [01:21] samcday: marajit, link? [01:22] ckknight: node is irrelevant to the resultant HTML [01:22] samcday: ckknight, not necessarily, depends how he's loading/rendering resources. [01:22] bnoguchi: techwraith: As an alternative, I wrote this redis client a while back - full featured - https://github.com/bnoguchi/redis-node [01:22] bnoguchi: techwraith: But I would suggest sticking with node_redis [01:23] matschaffer has joined the channel [01:23] techwraith: bnoguchi: Yeah, I saw that one too. Do you know what command I would send to redis to get a list of sorted sets that I have? looking through redis.io now, but any help would be appreciated :) [01:23] bnoguchi: zrange [01:24] Yuffster has joined the channel [01:24] ljounce has joined the channel [01:24] marajit: samcday http://piratepad.net/3897l9ZYpf [01:25] marajit: ckknight. i changed nothing, but only loading the page raw works. wouldn't the mime type in headers matter? [01:25] samcday: marajit, Well one thing before we go any further [01:25] samcday: Any reason you aren't using express static middleware? [01:25] techwraith: bnoguchi: No, that gets all the elements in a sorted set, I'm looking for a command that actually gives me a list of sorted sets that exist. [01:25] samcday: It pretty much does exactly what you're doing there [01:25] ckknight: marajit: yeah, if you don't specify the correct Content-Type, it'll show wrong [01:25] samcday: s/express/connect [01:26] marajit: samcday: advantages? [01:26] bnoguchi: techwraith: A list of the keys? [01:26] samcday: marajit, It does what you're doing in one line of code? :) [01:26] techwraith: yeah [01:26] samcday: And it handles content-type too [01:26] bnoguchi: techwraith: In that case [01:26] marajit: link? [01:26] samcday: Sec. [01:26] bnoguchi: techwraith: you have to stick to a naming convention for your zset keys [01:26] samcday: marajit, https://github.com/senchalabs/connect/blob/master/lib/middleware/static.js [01:27] bnoguchi: techwraith: Otherwise, you can't just ask for all keys that map to zsets [01:27] arrty has joined the channel [01:27] techwraith: Ah, I'll build my own list then, thanks [01:27] samcday: marajit, It also supports content ranges and other stuff, it's robust and well tested, and it works without worrying about it :) [01:27] bnoguchi: techwraith: Then just use the keys command [01:28] tmpvar: does anyone here know coolaj86 ? [01:28] bnoguchi: techwraith: , matching on the naming convention [01:28] bnoguchi: techwraith: http://redis.io/commands/keys [01:28] samcday: marajit, and it's this simple to use: http://senchalabs.github.com/connect/middleware-static.html [01:31] dgdo has joined the channel [01:32] skm has joined the channel [01:32] dgdo has left the channel [01:33] darshanshankar has joined the channel [01:33] dgathright has joined the channel [01:34] marajit: samcday: what if I want to invoke a db. what method? [01:34] raz: hmm [01:34] raz: anyone know how to use asset manager with coffeescript files? [01:34] raz: or is there an alternative to asset manager? [01:35] marajit: should I use mongoose, or does express have its own middleware for that? [01:36] samcday: marajit, You mean to load assets from a db? [01:36] wasabista has joined the channel [01:36] samcday: You'd have to knock something up of your own I think. There might be somethign around for whichever db you choose touse. [01:36] samcday: to use* [01:37] kiba has joined the channel [01:39] marajit: oh ok. so i'm confused about routing. If i want to add these static file server routes, then doesn't that conflict with other routing like to db? [01:40] marajit: can't have listeners on the same port [01:41] marajit: samcday: will this work? http://piratepad.net/3897l9ZYpf [01:42] samcday: marajit, other way around [01:42] marajit: ? [01:42] samcday: But that shouldn't be a problem anyway btw, static provider serves assets under /public [01:43] Nexxy has joined the channel [01:43] Nexxy has joined the channel [01:43] marajit: did you change something? looks the same [01:45] samcday: Didn't realize I could edit it ;) [01:45] samcday: anyway, the idea is, the first handler that matches a route gets it. [01:45] patzak has joined the channel [01:45] marajit: for some reason I though connect would take exclusivity [01:46] samcday: So, if you had a static file called /test.html, but you wanted to render a page from db with that name instead, just make sure your route matching test.html (the one that will do db stuff) is defined before the static middleware [01:46] jimt_ has joined the channel [01:46] timmywil has joined the channel [01:48] zorzar_ has joined the channel [01:48] charlenopires has joined the channel [01:48] yozgrahame has joined the channel [01:51] F1LT3R has joined the channel [01:52] jimt has joined the channel [01:53] patzak has joined the channel [01:56] warz has joined the channel [01:56] warz has joined the channel [01:59] tmpvar: bradleymeck, yo, are you around? [02:00] marajit: samcday: connect sorted the doctype issue [02:00] samcday: marajit, Sexcellent :) [02:04] techwraith: Any ideas what would cause this: [02:04] techwraith: node.js:134 [02:04] techwraith: throw e; // process.nextTick error, or 'error' event on first tick [02:04] techwraith: ^ [02:04] techwraith: TypeError: Cannot call method 'emit' of undefined [02:04] techwraith: at CleartextStream. (http.js:1195:9) [02:04] techwraith: at CleartextStream.emit (events.js:64:17) [02:04] techwraith: at Socket.onerror (tls.js:874:17) [02:04] techwraith: at Socket.emit (events.js:64:17) [02:04] techwraith: at Array. (net.js:824:27) [02:04] techwraith: at EventEmitter._tickCallback (node.js:126:26) [02:04] techwraith: ? [02:05] marajit: techwraith: rather don't post lengthy code in irc. use something like http://piratepad.net/ [02:05] techwraith: http://piratepad.net/8l89tNf2jt :) [02:06] marajit: techwraith: where's your code [02:06] jimt has joined the channel [02:06] techwraith: I'm using the node-loggly lib to make the request [02:08] copongcopong has joined the channel [02:08] mscdex: holy crap [02:09] mscdex: somehow my readme just went away [02:09] mscdex: gah! [02:10] yozgrahame has joined the channel [02:11] marajit: techwraith: can't you break that line up, then debug easier [02:11] techwraith: It's happening in the run function (which is the one that actually makes the http call) [02:11] techwraith: but the callback gets called just find [02:12] techwraith: *fine [02:13] techwraith: after it's done though. It basically happens after the app has nothing left to do. [02:14] jimt_ has joined the channel [02:14] jaket has joined the channel [02:16] mellowsoon has left the channel [02:18] james_gary has joined the channel [02:18] willwhite has joined the channel [02:19] dyer has joined the channel [02:19] seivan has joined the channel [02:19] dyer has joined the channel [02:21] orospakr has joined the channel [02:23] briznad has joined the channel [02:23] jtsnow has joined the channel [02:23] zakabird has joined the channel [02:25] andi5 has joined the channel [02:26] kiba: hmm [02:29] kiba: hmm [02:29] kiba: on my development machine [02:29] kiba: I used 127.0.0.1 [02:29] kiba: but when I need to use it in production [02:29] kiba: environment [02:29] lorhko has joined the channel [02:29] kiba: I need to use the domain name for websocket [02:29] kiba: any idea on how to handle the difference in environment? [02:29] okuryu has joined the channel [02:31] signatureEater has joined the channel [02:34] k1ttty has joined the channel [02:35] Zebra10 has joined the channel [02:36] Zebra10: Anyone know a module around for converting a an html to json? [02:36] Zebra10: an html document to a json representation * [02:36] systemfault: Zebra10: Doesn't make any sense. [02:36] jimt has joined the channel [02:36] Zebra10: no no [02:36] systemfault: :/ [02:36] Zebra10: i mean taking an html document and creating a json object out of the dom [02:37] systemfault: Ahhh [02:38] diego_ar has left the channel [02:38] Zebra10: I guess jsdom would contain the document object... [02:39] briznad has joined the channel [02:40] mscdex: Zebra10: either use jsdom or run html tidy on the input and use something like libxmljs to parse the tidied output [02:41] mdwright_laptop1 has joined the channel [02:43] burny has joined the channel [02:43] newy has joined the channel [02:48] Zebra10: mscdex: libxmljs is the one. thanks [02:48] diegoviola has joined the channel [02:48] diegoviola has left the channel [02:50] newy has joined the channel [02:53] figital has joined the channel [02:53] MMZ has joined the channel [02:53] sirkitree has joined the channel [02:54] eaton_ has joined the channel [02:54] eaton_ has joined the channel [02:57] jimt has joined the channel [02:58] jetienne has joined the channel [02:58] k1ttty has joined the channel [02:58] zcopley has joined the channel [02:59] saschagehlich has joined the channel [03:00] aguynamedben has joined the channel [03:01] Emmanuel__ has joined the channel [03:01] jaket_ has joined the channel [03:02] mjr_ has joined the channel [03:03] luke` has joined the channel [03:03] sivy has joined the channel [03:04] tbranyen: samcday: were you able to compile node with the gdb flag? [03:05] samcday: tbranyen, Actually yes! [03:05] tbranyen: Eff [03:05] k1ttty has joined the channel [03:05] samcday: Ryan fixed it yesterday [03:05] tbranyen: oh lol [03:05] samcday: He gisted the patch. [03:05] tbranyen: that would explain it [03:05] samcday: One sec. [03:05] samcday: https://gist.github.com/raw/909185/4023efb5fce25c14e2ab9e20d0da3e945a14f032/0001-fix-gdbjit.patch [03:05] samcday: Booyah [03:05] tbranyen: thanks man [03:05] samcday: Np. [03:06] samcday: Pro tip, you can actually run node_g with --gdbjit flag [03:06] samcday: And when you get stack traces, it'll include js stack trace too [03:06] tbranyen: doooopeee [03:06] samcday: node_g luv u long tym. [03:06] tbranyen: so much better than "program exited" [03:06] samcday: Agree! [03:06] mjr_: That's so badass [03:06] samcday: mjr_, See I thought so too :p [03:07] samcday: I may have emitted a nerdy "SQUEEEE" when ryan told me that yesterday :p [03:14] jakehow has joined the channel [03:15] ohtogo has joined the channel [03:15] tbranyen: I love how much work goes into making python2 shit work in arch because of their lame python3 as default decision [03:16] robhawkes has joined the channel [03:16] tbranyen: sweet that patch worked, cheers! [03:16] shiawuen has joined the channel [03:18] Nexxy has joined the channel [03:18] Nexxy has joined the channel [03:21] graysky has left the channel [03:21] darshanshankar has joined the channel [03:22] signatureEater: you know what I could use right now? [03:22] maushu__: Time to port Node.js to Node.Java? [03:22] dyer has joined the channel [03:22] techwraith: Real time stats dashboard coming along :) [03:22] maushu__: Or are we talking about the drink? [03:22] signatureEater: another callback!! [03:23] signatureEater: callbacks anonymous [03:23] tbranyen: sweet just got my ipaq booted up [03:23] tbranyen: wonder if node runs on that! [03:23] harth has joined the channel [03:23] tbranyen: need a new youtube series, "will it node?" [03:24] blkcat: 'callback dust - don't breathe this' [03:29] mjr_: Man, I've been breathing a lot of callback dust today. [03:29] mjr_: Working on a Riak library that I hope I can open source. [03:29] ryah: jquery deffereds. [03:30] andi5: mjr_: Does it include support for Riak Search? [03:30] ryah: seems like enough of a standard to me:) [03:30] skiz has joined the channel [03:30] ryah: http://api.jquery.com/category/deferred-object/ [03:30] andi5: I know that there is already a pretty matured Riak binding [03:31] mjr_: Yeah, there already is one, but it didn't work the way I wanted it to. [03:31] kriszyp has joined the channel [03:31] tbranyen: jquyery deferreds rule [03:31] tbranyen: they were very well thought out imo, except for the then function [03:32] mjr_: That does look pretty reasonable. [03:32] tbranyen: two callbacks (success,failure) doesn't make much sense to me when you get access the status codes in the success callback [03:32] andi5: mjr_: Do you think Riak is faster than Mongo? [03:32] mjr_: andi5: the main reason I started working on a Riak thing is I want/need more sophisticated connection pooling logic to make the most of node talking to a Riak cluster. [03:32] themiddleman has joined the channel [03:32] zemanel has joined the channel [03:33] mjr_: Oh, Mongo is probably faster for most things. [03:33] mjr_: And easier to use. [03:33] ryah: tbranyen: what's the difference between then() and done() ? [03:34] tbranyen: not sure looks the same to me heh [03:34] mjr_: ryah: are you finding the need yet for most sophisticated connection pools for your new distributed clustery work? [03:34] andi5: mjr_: This is my impression, and this is why I use Mongo as persistence layer, and will use Riak Search for text indexing [03:34] ryah: mjr_: yes [03:34] ryah: mjr_: but i think it's just a few lines of code in my app [03:34] tbranyen: looks like done only gets called if all deferreds are resolved successfully [03:34] tbranyen: no failure callback [03:34] mjr_: andi5: the main thing I want though is near arbitrary scalability along with the availability, and I don't see any other database that does this as well as Riak. [03:34] blueadept: does anyone else have tabbing issues with github and jade files? [03:35] mjr_: andi5: but it's way harder to use than Mongo is, for sure. [03:35] mjr_: ryah: I guess some people use things like haproxy, but for some reason that really bothers me. [03:35] andi5: mjr_: Yes, I like the whole concept of being able to plug in storage backends [03:35] sub_pop has joined the channel [03:36] cha0s has joined the channel [03:36] ryah: mjr_: hm - for connection pools? [03:36] mjr_: I want the functionality of a load balancer inside my node clients. [03:36] andi5: mjr_: But surely much easier than using Sphinx/Lucene for fulltext indexing [03:36] ryah: ah - yeah in my app i don't try to load balance - i just maintain a pool in case multiple connections happen to be open [03:37] mjr_: So they keep at least one open connection to every backend, and then round robin thoguh them. [03:37] mjr_: ryah: sees like you are going to want that eventually though [03:37] mjr_: some sort of node-directed load balancing I mean [03:37] ryah: hm.. my connections don't talk much [03:37] ryah: mostly for status updates,etc [03:38] mjr_: not for the cluster maintenance, but for whatever work people are going to want to do on top of your neat cluster of nodes. [03:38] luke` has joined the channel [03:38] ryah: mm, yeah.. maybe [03:38] newy has joined the channel [03:38] ryah: two tls connections != better than one tls connection, i think [03:38] mjr_: heh [03:39] sechrist has joined the channel [03:39] mjr_: We took a bunch of downtime recently when a server died, and it took WAY longer to get the backup online than it should ahve. So high availability is on my mind lately. [03:39] mjr_: Kind of a hard problem. [03:40] ryah: yeah [03:40] ryah: ACTION looks at his broken demo [03:40] kmwallio has joined the channel [03:40] cha0s: hey i'm curious... what do you guys think the node community/ecosystem needs that it doesn't have now? [03:41] tbranyen: official merchandise [03:41] mscdex: tbranyen: which ipaq? [03:41] tbranyen: mscdex: 5555 [03:41] cha0s: tbranyen, lol [03:41] tbranyen: first time i've booted it in years [03:41] mjr_: I'm part of the node community, and I can personally say that I need an iPad 2. Does that help? [03:41] tbranyen: call your grandma, mine is mailing me an ipad [03:42] tbranyen: sometimes all it takes is a phone call [03:42] signatureEater: I'm downloading the new ipad right now [03:42] newy has joined the channel [03:42] mjr_: I'll try that. [03:42] mscdex: tbranyen: ah, i still have a 4355 somewhere :-D [03:42] tbranyen: oh the 4xxx series were awesome [03:42] tbranyen: i was a poor highschooler that bought pdas instead of a car [03:43] mscdex: heh [03:43] mscdex: my first device was a windows ce 2.01 palm-size pc :-D [03:43] tbranyen: damn that is old school [03:44] tbranyen: those were great devices in theory [03:44] blkcat: oh man, i had one of those [03:44] blkcat: an hp jornada something [03:44] mscdex: it was a uniden unipro pc-100a [03:44] andi5: Do you guys know Schneider Amstrad? [03:44] andi5: No Harddisk, booting windows with disks. [03:44] mscdex: black and white with a backlight that had a whine [03:44] mscdex: but it had a built-in 33.6kbps modem! [03:44] blkcat: haha, mine too :) [03:44] mscdex: so i could log on AIM and stuff :D [03:45] mscdex: i still have a couple of nec mobilepros to get rid of [03:45] mscdex: and a netbook pro [03:45] mscdex: heh [03:45] mscdex: back before netbook was a common term [03:45] tbranyen: hmmm if i have a segfault shouldn't node_g --gdbjit give me a stacktrace? [03:46] robbimac has joined the channel [03:46] blkcat: mscdex: if you're ever going to chuck them let me know and i'll take them off your hands ;) [03:46] newy has joined the channel [03:47] mscdex: i'm still waiting for the new jlime linux port to materialize for the netbook pro [03:47] mscdex: :S [03:48] norviller has joined the channel [03:48] saschagehlich_ has joined the channel [03:48] mscdex: i wonder if node compiles on netbsd.... [03:49] ryah: ive decided to move to freebsd this week [03:49] ryah: which should help the freebsd build :) [03:49] tbranyen: heh, what's compelling you to do that [03:50] ryah: dtrace, zfs [03:50] mscdex: heh [03:50] mscdex: yay! [03:51] mscdex: if node compiles on netbsd, then i could run node on one of these mobilepros here. that would be crazy..... slow :-p [03:51] blkcat: heh, i remember installing netbsd on a couple of mac iicis. [03:51] blkcat: took about five hours to untar everything [03:51] robbimac: question: can node open an tcp/udp connection to another service or would one have to call c++ to accomplish that [03:51] tbranyen: wow zfs has some real issues with getting on linux [03:52] tbranyen: licensing bananas [03:52] robbimac: i think i just found my answer, but curious if anyone has any experience doing this with node: (node.js.org/docs/latest/api/net.html#net.createConnection [03:52] aho has joined the channel [03:53] ryah: robbimac: yes, yo ucan create a tcp connection [03:55] samcday: ryah, When I use `gdb --args node_g --gdbjit `, it takes like 15 seconds for gdb to execute before I see anything happening [03:55] samcday: Whereas without --gdbjit it takes like .5 seconds :P Is that normal? [03:55] ryah: samcday: the gdb plugin has to do a lot of crazy stuff [03:55] mjr_: robbimac: node has full TCP and UDP support, and it also does a pretty good job of HTTP. [03:56] ryah: samcday: generate ELF objects for each chunk of executable code in V8's heap - from what I understand of it [03:56] samcday: ryah Yeah I noticed that when I tried interrupting it. So is it always gonna be that way? Or is the jit stuff experimental and being worked on etc [03:56] robbimac: thanks, i'm just getting into Node for an IT project my company is looking for [03:57] ryah: samcday: mraleph built it - you should ask him [03:57] samcday: ryah, roger that! Thx [03:57] ryah: samcday: he's not here now. i believe it's just a proof of concept at the moment but could be improved [03:57] robbimac has left the channel [03:58] ryah: of course - it's pretty deep stuff to dive into [03:58] samcday: ryah, I kinda find it hard to ask someone why something I could never build isn't fast enough for my liking :P [03:58] ryah: it's beyond my abilities [03:58] samcday: So I think I'll need to figure out a nice way to phrase the question :p [03:59] mjr_: That gdb JIT stuff is amazing. I browsed the first patch that went around and just shook my head in astonishment. [03:59] mjr_: Some people REALLY understand computers. [04:00] samcday: Agreed. I'm sure when you decompose it, most of the concepts are straightforward (duh) but it gets pretty mind boggling when you consider the complexity of V8 :D [04:03] mike5w3c has joined the channel [04:08] softdrink has joined the channel [04:09] indutny has joined the channel [04:12] mhooker has joined the channel [04:13] indutny has joined the channel [04:19] MikhX has joined the channel [04:22] darshanshankar has joined the channel [04:24] unomi has joined the channel [04:27] markc has joined the channel [04:28] eaton has joined the channel [04:29] figital has joined the channel [04:29] shiawuen has joined the channel [04:32] AAA_awright_ has joined the channel [04:32] burny has joined the channel [04:35] techwraith: Does anyone know if console.log takes a callback? [04:36] tbranyen: techwraith: no it doesn't it takes N number of params [04:36] tbranyen: and each are printed [04:36] AAA_awright: techwraith: Take a look at the source, yes it does, it takes printf style arguments iirc [04:36] gwoo has joined the channel [04:36] tbranyen: AAA_awright: thats not a callback? [04:36] AAA_awright: Callback? [04:36] AAA_awright: What did I read >_> [04:36] tbranyen: haha [04:37] techwraith: lol [04:37] techwraith: Thanks guys :) [04:37] AAA_awright: exports.log = function() { process.stdout.write(format.apply(this, arguments) + '\n'); }; [04:38] AAA_awright: Format is printf-style [04:38] AAA_awright: I thought [04:39] AAA_awright: Yeah: [04:39] AAA_awright: > console.log('%d', "12 pigs"); // NaN [04:39] AAA_awright: > console.log('%s', "12 pigs"); // 12 pigs [04:40] deedubs has joined the channel [04:40] deedubs: anyone know if the assert extensions from expresso have been extracted? [04:41] newy has joined the channel [04:45] asabil has joined the channel [04:55] bingomanatee has joined the channel [04:56] jonpacker has joined the channel [04:58] sreeix has joined the channel [05:00] kiba: what's a good way to daemonize a node.js server? [05:04] mscdex: kiba: i use upstart on ubuntu servers [05:05] sag3 has joined the channel [05:05] kiba: I am on debian [05:05] kiba: but I could install upstart [05:05] kiba: I am not seeing the benefit [05:06] sechrist has joined the channel [05:06] ryah: i love how this pow.cx project installs itself in launchd [05:06] ryah: i predict a new trend [05:06] ryah: launchd, upstart, smf auto attaching [05:07] mscdex: kiba: there's also some solutions written in node, like forever: https://github.com/indexzero/forever [05:07] ryah: ACTION commissions a node module to be built [05:08] Aria: Oh man. Things I would write if I had any free time. [05:08] mscdex: kiba: fwiw, here is the upstart config i generally use for my node-based services: https://gist.github.com/753111 [05:08] Aria: ACTION hopes things get sane here soon [05:09] ryah: it's too bad the unix people didn't invent upstart [05:09] ryah: and it was just some posix standard now [05:09] mscdex: heh [05:09] kiba: ACTION uses forever as he cannot figure out why he would use one of the many myraid option [05:10] mjr_: upstart is like 80% there [05:10] mscdex: kiba: i use upstart because it's already installed with ubuntu [05:10] ryah: use what you have [05:10] kiba: 210 BTC out of 1200 BTC pledged until my next game project that happens to use node.js [05:10] mjr_: That's why I use it as well. It's init on ubuntu, after all [05:11] mjr_: Although I am tempted to use freebsd to get dtrace. [05:11] mjr_: But absolutely everybody and everything runs Linux, its just so much easier. [05:11] sechrist: anybody know how to execute code in an iframe from the webkit console? [05:11] sechrist: I'm either dumb or this isn't possible [05:12] sechrist: mjr_: i've considered bsd myself and came to the same conclusion :\ [05:12] kiba: hmm, I still have not debug my game [05:12] idefine has joined the channel [05:13] kiba: err [05:13] kiba: figure out what's going on [05:13] sechrist: everybody that uses bsd for their inf absolutely love it [05:13] mjr_: sechrist: it seems like it's probably better technically, but a lot harder to make different software work on it. Probably faster too, once you get it all working. [05:14] sechrist: I've also heard the same about node on solaris systems [05:14] mjr_: And yet, people keep using Linux. Why is this? [05:14] tbranyen: linux has yet to give me problems? [05:14] sechrist: it's not about problems [05:14] mjr_: Yeah, Linux doesn't give me any problems either, but it just lacks certain sophisticated things like dtrace and zfs. [05:15] tbranyen: zfs is slowly on its way [05:15] Nexxy has joined the channel [05:15] sechrist: Why do I do C++ debugging on a mac instead of linux with gdb? because xcode's instruments kick ass [05:15] sechrist: and people run certain things on bsd for dtrace [05:15] mjr_: pquerna used Instruments.app to save my servers many gigabytes of free memory. [05:15] sechrist: exactly. [05:16] gattuso has joined the channel [05:16] amackeraz has joined the channel [05:16] sechrist: I actually used instruments on node awhile back [05:16] sechrist: to figure out why SSL connections leaked memory [05:16] sechrist: stupid credentials [05:16] mjr_: Yeah, I have too. Sometimes it tells you useful things. Other times it just says, "V8" [05:17] sechrist: reuse it and I was fine [05:17] mjr_: Poor node SSL [05:17] mjr_: Someday it's going to grow up and leave the house [05:18] mjr_: And we'll look back on these days and smile. [05:18] sechrist: well this was before the rewrite [05:18] sechrist: <= 0.2 days [05:19] sechrist: I'm afraid to use my mac as a testbed for stress testing node apps/race conditions due to bsd being so much different than my production environment [05:19] sechrist: and I've seen people in here cite mac-specific issues [05:19] sechrist: for general development it helps drastically though [05:20] eee_c has joined the channel [05:20] isaacs has joined the channel [05:21] tbranyen: valgrind has pretty useful for me and debugging [05:21] tbranyen: for* [05:21] sechrist: tbranyen: it's not click click boom here's the object that's leaking [05:21] tbranyen: sechrist: haha nope [05:21] tbranyen: i should give instruments a try [05:21] tbranyen: i have a hackintosh on this box [05:21] jbergstroem has joined the channel [05:21] larsemil has joined the channel [05:21] sechrist: also valgrind requires the application to end before a report iirc [05:21] sechrist: instruments does it realtime [05:22] sechrist: immensely useful [05:22] tbranyen: sechrist: i think its possible to pipe valgrind data into supported tools for realtime analysis [05:23] tbranyen: i could be wrong about that tho [05:23] tbranyen: http://kcachegrind.sourceforge.net/cgi-bin/show.cgi/KcacheGrindIndex << gonna give that a shot at some point [05:23] tbranyen: looks useful [05:23] beejeebus has joined the channel [05:23] sechrist: ooh that's pretty [05:24] tbranyen: last time i tried instruments was for an iphone app i was helping out with at work [05:24] tbranyen: didn't think of using them for node stuff [05:25] sechrist: I don't see how it could be useful for debugging node applications though [05:25] shaverAway has joined the channel [05:25] sechrist: node itself sure [05:25] tbranyen: C++ extensions [05:25] sechrist: if you have some closure loop killing your memory you'll just be a v8:: mess in profilers [05:25] sechrist: oh, right [05:28] bentkus has joined the channel [05:29] sechrist: mjr_: what are you using infrastructure wise for voxer? nagios, ganglia, cacti, etc? [05:29] delian66 has joined the channel [05:29] dyer has joined the channel [05:30] jakehow has joined the channel [05:30] sechrist: cloudkick looks pretty awesome but pricy for bootstrapping [05:36] seivan has joined the channel [05:42] dgathright has joined the channel [05:44] zubairov has joined the channel [05:44] warz has joined the channel [05:45] gazumps has joined the channel [05:46] dekervit has joined the channel [05:49] indutny has joined the channel [05:57] mytrile has joined the channel [05:58] dekervit: I'm streaming a file directly from mongodb, do you have an idea why the throughput decreases so much ? [05:58] dekervit: On localhost it starts at 3MB/s and decrease slowly to 500 KB/s after 1 minute :s [05:59] dekervit: I'm thinking of the driver (node-mongodb-native) it seems it allocates new memory for each chunk... [06:01] JianMeng has joined the channel [06:01] dekervit: here's a bit of code, if somebody pass by : http://pastebin.com/0b2VFAns [06:02] sechrist_ has joined the channel [06:02] mjr_: sechrist: we use Nagios, Cacti, and an increasingly large number of custom built tools [06:02] mjr_: sechrist_: lots of data gets fed into Redis, and then some d3.js to visualize it. [06:03] sechrist_: woah d3.js looks sick [06:04] warz has joined the channel [06:04] mjr_: d3 is really great, but it requires a lot of work to get going. [06:04] sechrist_: well I mean I want to build badass 323 debugging tools and luckily I only need to write them once and iterate [06:04] sechrist_: what's difficult about getting it going? [06:04] sechrist_: formatting your data in such a way that it's usable? [06:05] coreb has joined the channel [06:05] sechrist_: also it's selection looks strange.. I'm so spoiled by sizzle [06:05] mjr_: yeah, it's not like you have all of the wrappers and formatters set up for common data types. [06:05] mjr_: It's very low level [06:06] sechrist_: I see.. are there any higher level abstractions built on top of this that you're aware of? [06:06] cossovich has joined the channel [06:07] sechrist_: also does this handle data streams? [06:07] mjr_: I don't know of any. It's still a very new and actively developed project. [06:07] sechrist_: or just big chunks of json [06:07] mjr_: It is able to deal with dynamic data where you add in new values and old ones fall off the end [06:08] mjr_: Like maybe you fetch new data with xhr/ws and the graph magically updates and animates [06:08] mjr_: But it's not free. You need to understand a bunch of pieces of it first. [06:08] mjr_: Free in terms of dollars, but not time. [06:09] zcopley has joined the channel [06:10] andi5 has joined the channel [06:10] AAA_awright: Allow me to paraphrase; d3.js is some spiffy software! [06:12] mjr_: sechrist_: I see you on #riak, are you using it? [06:12] sechrist_: I am heavily heavily heavily scoping it out [06:12] sechrist_: I don't want to regret my decision in 6 months [06:13] sechrist_: but man, scaling every other kind of "nosql" datastore seems like a painful process [06:13] mjr_: Yeah, that's my situation as well [06:13] sechrist_: Tomorrow I plan to check out the Search and learn more about Link Walking [06:13] mjr_: Except that I'm pretty convinced that I'm going to do Riak. [06:14] mjr_: It's a pretty big mental shift, lacking real secondary indexes. [06:14] sechrist_: I'm convinced too I just need to work through it myself [06:14] sechrist_: for me to mentalize what I am missing by doing this [06:14] sechrist_: I don't want my guys saying they want feature x and have to tell them "well guys.... " [06:15] mjr_: Search is cool, but it's kind of not done yet. The other stuff seems really solid and works well, as long as you use it correctly. [06:15] sechrist_: yeah that's another thing.. I want to know best practices and at least pick up a little erlang before i'm 100% comfortable [06:15] sechrist_: i've been to a few riak meetups here in the bay area and none of them are really deep enough for me to glean enough from so I just need to build little apps and try various things [06:16] mjr_: It's pretty fun tech to work with. [06:16] sechrist_: the lack of cached views and stuff like that bothers me as well as I pretty much _have_ to have redis int he mix [06:16] sechrist_: and redis, as everybody knows, is hard to HA [06:16] mjr_: Or you can build your own secondary index explicitly [06:16] mjr_: Which I think is what people do. [06:16] mjr_: Or use redis/memcache [06:16] sechrist_: If I could have like a couchdb-esque progressive mapreduce on riak [06:16] sechrist_: it would be a nobrainer [06:17] mjr_: I believe they are working on that and will have something out in a few months. [06:17] coreb: redis is hard to what? [06:17] coreb: why couchdb and not mongodb? [06:17] mjr_: That's what I hear. [06:18] mjr_: I'm sort of concerned about mongodb, because it doesn't seem like preserving data is their primary concern. [06:18] tmpvar: mjr_, seems better as of late [06:18] mjr_: It's probably fine now though. [06:18] tmpvar: mjr_, there was always the option to tweak the fsync as well [06:18] tmpvar: fsync rate* [06:18] mjr_: sure [06:19] mjr_: Seems like Riak or Cassandra have the right idea with the quorum model. [06:19] coreb: mjr_: you need replication for that [06:19] mjr_: But it sure does come at a huge cost of reduction in features and ease of use. [06:19] tmpvar: coreb, i think with the latest release, single instance durability has been improved [06:20] tmpvar: mjr_, yeah.. depends on what you need i guess [06:20] jonpacker has left the channel [06:20] mjr_: It absolutely does depend on what you need. That's why there are many different "new databases". [06:21] coreb: too many, really [06:21] mjr_: Understanding for what each is better is hard. [06:21] mjr_: Yeah [06:21] ryah: it seems online compaction is an important feature [06:21] coreb: I use mongodb and I'm pretty satisfied with it [06:21] ryah: does mongo do that now? [06:22] saschagehlich has joined the channel [06:22] mjr_: ryah: just doing online compaction is nice, but CouchDB's online compaction thoroughly kills my computers. [06:22] mjr_: Blows through all of the kernel's block cache. [06:23] mjr_: And reduces response time dramatically. [06:23] mjr_: But it all happens without taking the database down, so that's nice. [06:23] coreb: ryah: looks like it's planned for 1.9; https://jira.mongodb.org/browse/SERVER-2120 [06:24] mjr_: Lots of people seem really happy with mongo. [06:24] mjr_: Seems kinda fun to play with because of the interesting way you query it. [06:25] coreb: what, with the document matching? [06:25] mjr_: yeah [06:25] coreb: yeah, it's pretty easy [06:26] coreb: I find myself spending a lot less time doing data layer work when mongodb is involved, compared to orm (shit) [06:26] __tosh has joined the channel [06:29] stagas has joined the channel [06:31] k1ttty has joined the channel [06:32] newy_ has joined the channel [06:34] Joe4node has joined the channel [06:34] Joe4node: Hello guys [06:35] ryah: Joe4node: hi [06:35] Joe4node: I have a simple question , How do i get the IP address of the client connecting to the http server ? I tried req.headers['x-forwarded-for']; and req.connection.remoteAddress; [06:36] Joe4node: but it did not work? any idea ? [06:36] Joe4node: @ryah, Hi [06:36] tfe_ has joined the channel [06:36] tfe_ has joined the channel [06:36] Joe4node: i am on version 0.4.5 [06:36] rchavik has joined the channel [06:37] Joe4node: @ryah: Hi i am using node on cygwin [06:37] sechrist_: mjr_: so you [06:37] sechrist_: you [06:38] sechrist_: you're using couchdb now*? [06:38] sechrist_: because bigcouch is my primary comparison against riak [06:38] mjr_: Joe4node: remote_address = req.socket.remoteAddress || req.socket.socket.remoteAddress; [06:38] mjr_: sechrist_: I don't believe that anybody outside of Cloudant has figured out BigCouch, have they? [06:38] mjr_: BTW, BigCouch is super cool. [06:39] sechrist_: yeah I don't know.. I briefly talked to mikeal about it at the meetup where I met you and he claimed it was a real company behind it [06:39] Joe4node: mjr_: Thanks , it worked [06:39] sechrist_: but that doesn't mean the version on github is the one they're focusing on :) [06:39] mjr_: Yes, we are using CouchDB now. It is a nice database with many nice features. [06:39] mjr_: If you like replication and syncing, it's tough to beat CouchDB. [06:40] mjr_: Full mesh replication with intermittent connectivity. It's quite something. [06:40] sechrist_: don't you have to tell couchdb to replicate every time it starts? [06:40] mjr_: Yeah, that part is stupid, but the next release supposedly fixes that. [06:40] Joe4node: mjr: isn't the IP info supposed to be in the HTTP connection ? [06:40] sechrist_: also how does couchdb horizontally scale (ignoring bigcouch)? [06:41] sechrist_: seems like replication only lets you have HA with vertical scaling [06:41] jonpacker has joined the channel [06:41] XaKBooT has joined the channel [06:41] sechrist_: scaling data not so much query load [06:41] sechrist_: petabytes for example [06:41] AAA_awright: Joe4node: Why would IP information be in the HTTP headers [06:41] mjr_: I'm not that familiar with the details of BigCouch. It does claim to do horizontal scaling though, and it preserves the original API with views and even changes feed. [06:41] AAA_awright: IP is... IP level, port is TCP level above that [06:42] mjr_: Joe4node: that's only if you are behind a load balancer or proxy [06:42] ajpiaNOU has joined the channel [06:42] mjr_: Couch changes feed is also really cool. [06:42] XaKBooT has joined the channel [06:43] mjr_: I believe it'll scale the query load as well. [06:43] mjr_: Assuming you can figure it out and figure out how to do the operational stuff on it. [06:43] Joe4node: so direct connection will find the ip info in the socket but a load balancer will add the IP to the http header? [06:44] Aria: Yeah. Since it's got the IP packets flowing from the client to it, and then from it to you, if oyu want to find out the original, it has to put it somewhere. [06:44] mjr_: Joe4node: the IP will always be in req.socket, but it might be the IP of your load balancer. Many load balancers and proxy servers add an HTTP header as they proxy. [06:44] tmpvar: hey Aria [06:44] Aria: HEy, tmpvar! [06:44] mjr_: sechrist_: we are going with Riak + Redis and a whole shitload of node. [06:45] tmpvar: Aria, hows the workload/ [06:45] Aria: Finally dropping. [06:45] Joe4node: is there a standard for where i can find the ip behind a load balancer ? [06:45] tmpvar: nice! [06:45] Aria: Yeah. About time. [06:45] Aria: Running a small business is seriously like 70% overhead. Enough to make you crazy. [06:45] tmpvar: no kidding, its been 8 or so months now [06:46] tmpvar: haha [06:46] Joe4node: Aria: what kind of business you are running ? [06:46] tmpvar: yeah, i cant even fathom running an isp in a remote area [06:46] Aria: I run a small ISP, consultancy and computer repair shop in rural colorado. [06:46] ako has joined the channel [06:46] OneBraveHog has joined the channel [06:47] AAA_awright: Nice [06:47] Joe4node: Aria: wireless ? [06:47] Aria: DSL. [06:47] Aria: Couple other folks got Wireless. I don't envy them the maintenance headaches. [06:47] tmpvar: lol [06:47] Joe4node: Aria: what are you using node for ? [06:47] Aria: (Snowshoe to 11,000 feet in midwinter...) [06:47] Joe4node: lol yeh i don;t want to be there [06:48] Aria: Joe4node: SMTP server in development, chat server in development, jabber bots, web apps, filtering proxy, web scraping. [06:48] tmpvar: Aria, html5 parser.. [06:48] Aria: Well, yeah, and that. [06:48] tmpvar: :P [06:48] Aria: But that's a means to an end or ten. [06:48] tmpvar: right [06:49] tmpvar: you hear about mozilla working towards a js only dom? [06:49] Aria: I didn't! [06:49] Aria: Wow! [06:49] tmpvar: (with proxies we'd be fast, jsdom) [06:49] tmpvar: yeah, let me dig this up [06:49] Joe4node: and why you are using node for all of those ? arn;t there other ready to use softwares that do that well ? [06:49] Aria: (Mmm!) [06:49] bingomanatee: An interesting article on making pseudo random tiling: http://designfestival.com/the-cicada-principle-and-why-it-matters-to-web-designers/ [06:49] Aria: Joe4node: Depends on how much monitoring and logging you want to insert into the middle of 'em. [06:49] Aria: (And how much you want to plumb them together.) [06:50] Joe4node: is it because it is fun and have more control to build from scratch ... somthing is cool about node i do not know what [06:50] bingomanatee: SO I am taking a survey: do you guys think http://nodejs.wikia.com/wiki/Node.js_Wiki is (a) awesome (b) interesting, if a little redundant with the status quo or (c) an utter waste of time [06:51] Aria: D) hosted on Wikia and automatically slightly suspect? [06:51] tmpvar: Aria, this was my entry point: https://github.com/andreasgal/dom.js -- but im still looking for the blog post [06:52] XaKBooT has joined the channel [06:52] bingomanatee: I didn't realize Wikia was suspicious. I didn't even know it exited til this week. [06:52] Aria: Ooh. [06:52] bingomanatee: I'm not obiating your feedback.... [06:52] Aria: Lots of wikia sites seem to be vaguely search-engine bait rather than human-oriented. [06:52] coreb: AAA_awright: if you're behind a reverse proxy, or similar [06:53] bingomanatee: Well I made it 100%, so my actual ambitions is to help the human race. [06:53] Aria: Oh nice. [06:53] XaKBooT: please help me i have three problems with node : first i need to make node generate full html pages without any templates does somebody have good advice [06:53] bingomanatee: I thought a user editible repository for node info outside of git would be useful. [06:53] pdelgallego has joined the channel [06:54] Aria: XaKBooT: "without templates"? then just write them on a stream, ne? [06:54] bingomanatee: Even if I had to start by ripping off all the published node stuff I could find (with permission) from other sources. [06:54] tmpvar: XaKBooT, what sort of data are you working with? [06:55] XaKBooT: yes but it is big routine to write a code that will generate HTML5 pages just in time [06:55] coreb: XaKBooT: then why won't you use a template [06:55] Aria: Wow, interesting stuff, tmpvar. [06:56] tmpvar: Aria, the blog post is out of the reach of my memory banks :( [06:56] XaKBooT: coreb, does node have some modules that can use templates? [06:56] tmpvar: but it describes using harmony proxies in firefox to move away from a c++ dom [06:56] coreb: XaKBooT: express.js [06:56] tmpvar: to avoid the js->c bridge [06:56] tmpvar: and go fast [06:56] XaKBooT: tmpvar, i work on making vlone of twitter node.js+Redis DB [06:57] XaKBooT: sorry clone [06:57] tmpvar: funny, because jsdom is 1000x slower than chrome :( [06:57] Aria: Nice. [06:57] Aria: Heh. Yeah. [06:57] tmpvar: yeah, its shameful [06:57] XaKBooT: coreb thank you very much but does it support html 5 [06:57] coreb: XaKBooT: you create html 5 stuff yourself, support is about browsers [06:58] sag3 has joined the channel [06:58] tmpvar: without proxies we're dead in the water.. trying to manage crazy mutation events and such [06:58] andi5: tmpvar: Don't mind, you did a great job! [06:58] XaKBooT: coreb: ok [06:58] tmpvar: andi5, its not over dude ;) [06:58] Aria: Yeah. Yay proxies! [06:58] andi5: tmpvar: Yeah I can imagine - porting it to a native node module would be awesome ;) [06:59] tmpvar: andi5, im planning my next move.. we can go faster.. [06:59] tmpvar: andi5, perhaps.. [06:59] tmpvar: if we think about that though [06:59] tmpvar: it becomes less of a benefit [06:59] coreb: tmpvar: what's your project? [06:59] tmpvar: jsdom [07:00] tmpvar: so the idea would be to cross the c border as few times as possible [07:00] tmpvar: the problem is, everyone wants to execute scripts [07:00] tmpvar: which is it node (js) [07:00] tmpvar: so every action has to cross the bridge [07:00] tmpvar: which is slow as hell [07:01] Aria: Why /is/ that so slow? [07:01] Aria: I've still not read enough v8 to know that. [07:01] tmpvar: Aria, im not sure of the benchmarks.. ive not done one yet [07:02] XaKBooT has left the channel [07:02] Aria: ACTION nods. [07:02] tmpvar: i know its why ry moved the net code out of c into js though [07:02] Aria: Yeah. [07:02] coreb: tmpvar: what's the objective, to replace the browsers' dom implemenation at runtime? [07:02] Aria: I just want to understand how and why. [07:02] tmpvar: coreb, no [07:02] tmpvar: coreb, to have a proper dom on the server side [07:02] tmpvar: and that is much easier said than done [07:02] Aria: I need to read what changed with crankshaft, so I can understand how they're keeping things that cross the barrier fast, even if it is case specific [07:03] tmpvar: crankshaft is still only 32bit, no? [07:03] Aria: Is it? [07:03] Aria: I thought X64, too. [07:03] tmpvar: i dip in and out of keeping up to date [07:04] tmpvar: Aria, found it: http://www.aminutewithbrendan.com/pages/20110330 [07:05] tmpvar: misses jsdom completely, but eh.. f-him ;) [07:05] tmpvar: we (as a collective 10 person group) have only been working on it for a year [07:05] insin has joined the channel [07:06] coreb: f the father of js, hehe [07:06] markc has joined the channel [07:06] tmpvar: well, thats my point [07:06] tmpvar: i guess i could take it up with him [07:07] tmpvar: but f-that, im here. [07:07] coreb: call him, inform him of your view [07:09] qFox has joined the channel [07:09] tmpvar: ok, but that doesn't really solve my immediate issue [07:09] tmpvar: of speed [07:10] tmpvar: ill raise him on the horn [07:11] coreb: maybe he has speed suggestions for you, feeling bad for ignoring jsdom [07:12] vahe has joined the channel [07:14] tmpvar: coreb, lo [07:14] tmpvar: Aria, html5 [07:15] tmpvar: where are we, and where are we going? [07:15] Aria: Mostly good, I need to finish encoding handling, and would love it if buffers were stringier, or strings were faster to construct. [07:15] tmpvar: jumping that damn boundry [07:15] Aria: Yeah. [07:16] tmpvar: its slow, i told ya [07:16] tmpvar: ;) [07:16] Aria: I'd love the ability to create invalid attributes, since the html5 parsing spec requires it. But that requires a separate API or hacks. [07:16] Aria: Oh, I know it. [07:16] tmpvar: to what depth? [07:16] tmpvar: can we regex it away? [07:16] Aria: Yeah. HTML5 allows "anything" pretty much. [07:16] Aria: All kinds of crazy shit. [07:16] tmpvar: wtf [07:16] tmpvar: well.. [07:17] tmpvar: the w3c dom level 1 does now [07:17] tmpvar: s/now/not [07:17] Aria: I can get you specifics of what it'd push in there, but basically, "I wanna make invalid attributes" would do it ;-) [07:17] tmpvar: lmfao [07:17] tmpvar: how? [07:17] tmpvar: i have a basic regex that works [07:17] tmpvar: lets just adress this [07:17] Aria: Oh, you can end up with attributes named things like < and = and -. [07:18] tmpvar: its been open for a year [07:18] Aria: Oh man. That long already? Geez. [07:18] tmpvar: what? [07:18] tmpvar: are you fing serious? [07:18] Aria: I am serious. [07:18] tmpvar: that is not good man. [07:18] Aria: Firefox parses this way, too. You can't create those nodes from JS, but you can from HTML parsing. [07:19] Aria: Yeah. Total WTF, though I get why they did it. Totally forgiving parser. [07:19] blkcat: i think you have the option to say 'fuck it' when presented by markup that blatantly idiotic [07:19] tmpvar: Aria, can we just flip the middle finger to 1% of the world [07:19] tmpvar: ? [07:19] Aria: blkcat: Scrape sites that use it with zombie. Then add your name to the people on the ticket ;-) [07:19] Spion_ has joined the channel [07:19] Aria: Well, we might be able to just hack the problem instead of raising. [07:19] tmpvar: hrm [07:19] blkcat: Aria: your response - 'patches accepted' :) [07:19] Aria: But it does go contrary the spec. [07:20] Aria: blkcat: Or "I wanna fix that, but it means coming up with a way to interface with jsdom" [07:20] tmpvar: to the dom spec, yes [07:20] tmpvar: it really does [07:20] tmpvar: lets meeet [07:20] Aria: Or to the html5 spec. They're in direct conflict. [07:20] tmpvar: somewhere in the middle [07:20] tmpvar: they are [07:20] tmpvar: so.. [07:20] tmpvar: where are these fuckers? [07:20] Aria: Or, well, html5 assumes you can do wtf ever you want to the DOM and it only exposes it later. [07:20] tmpvar: lets to crack some skulls [07:21] tmpvar: s/to/go [07:21] tmpvar: that is not represented in a dom level [07:21] tmpvar: im avoiding level3 btw [07:21] Aria: Yeah? [07:21] Aria: It's kinda complex and crazy. [07:21] tmpvar: because its just more namespaces and shit. [07:21] tmpvar: level2 core is mostly shit. [07:21] tmpvar: and made us im guessing 10% slower [07:21] Aria: I still like that solution -- let me make invalid attributes somehow. They can raise once I'm done with 'em. [07:22] Aria: Heh. Oy. [07:22] tmpvar: you want to roll with escaping them? [07:22] tmpvar: or should we get involved [07:22] Aria: Escaping? [07:22] tmpvar: im ok with diving into w3c land [07:22] tmpvar: sorry thats the wrong word [07:22] tmpvar: i dont event know what that is called [07:23] tmpvar: html5 attr -> w3c attr [07:23] Aria: ACTION nods. [07:23] Aria: Here's a simple test case that fails: [07:23] Aria: [07:23] tmpvar: of course that fails [07:23] Aria: Hehe. [07:24] tmpvar: i wont even got into it [07:24] tmpvar: so basically, we have found a rift [07:24] Aria: Hehe. Yeah. [07:24] tmpvar: lets approach this appropriately [07:24] Aria: I think it'd work if I had a way to create those nodes with calidation turned off. [07:24] tmpvar: (with fury) [07:24] Aria: That's basically how safari deals with it. (try it -- it parses that doc just fine.) [07:25] Aria: But make any change to it (web inspector included) and that attribute vanishes or won't let you set an equally assinine case. [07:25] tmpvar: so you are saying this is part of the re-flow algo? [07:26] Aria: Re-flow? No, that's a visual thing. [07:26] tmpvar: part of the display algorithm? [07:26] gf3 has joined the channel [07:26] Aria: It's parsing -- but basically, all this weirdness is NOT exposed in the public DOM [07:26] tmpvar: what if you select $("<=bar") [07:26] tmpvar: what happens [07:26] Aria: But the parser in FF and Safari is making nodes that are weird. [07:26] tmpvar: because that is fucked [07:26] tmpvar: excuse my lang. [07:26] tmpvar: but seriously.. [07:26] derferman has joined the channel [07:27] tmpvar: lol [07:27] tmpvar: ok [07:27] tmpvar: sorry i just read through what you said [07:27] Aria: Hehe. [07:27] Aria: It really is. Understandable, but fucked. [07:28] tmpvar: agreed. [07:28] Aria: Hehe. jQuery hates $('<=bar') [07:28] Aria: But that's jquery. [07:29] Aria: However, document.childNodes[0].attributes['<'] [07:29] Aria: . <=​"bar" [07:30] Aria: But document.childNodes[0].setAttribute('<', 'bar') [07:30] Aria: Error: INVALID_CHARACTER_ERR: DOM Exception 5 [07:30] tmpvar: lol [07:30] tmpvar: priorities [07:30] Aria: Yeah. This is why I haven't fixed this yet. [07:30] tmpvar: 1) fast [07:30] tmpvar: 2) comliant [07:30] Aria: Well, no validation is fast ;-) [07:30] tmpvar: :P [07:31] tmpvar: make it afast :) [07:31] Aria: And if the API is private between html5 and jsdom, it's compliant. [07:31] tmpvar: afast even [07:31] tmpvar: yes [07:31] tmpvar: lets do that [07:31] tmpvar: i know how bad that sounds [07:31] Aria: I'd be happy with a DOMImplementation.createStupidAttributeNode [07:31] tmpvar: fork html5 [07:31] sag3 has joined the channel [07:31] tmpvar: lets get crazy [07:31] Aria: Hehe. [07:32] tmpvar: seriously.. [07:32] tmpvar: the parser is a big deal in this world [07:32] tmpvar: are you fast? [07:32] tmpvar: can you be fast? [07:33] Aria: I'm not fast yet. Yes, I can be fast. [07:33] Casperin has joined the channel [07:33] tmpvar: do you care more than node-htmlparser? (yes) [07:33] Aria: (Yes) [07:33] Aria: I want correct over fast. But I really want fast. [07:33] tmpvar: i believe [07:33] tmpvar: i hear that [07:33] tmpvar: which is why we conflict [07:33] tmpvar: but thats ok [07:33] tmpvar: it really is, we just need a plan [07:34] Aria: Hehe. Yeah. [07:34] tmpvar: trust me im ok with html5 [07:34] tmpvar: im waiting for you to sell it to me :) [07:34] tmpvar: its crazy [07:34] Aria: Oh, fun. latest jsdom gives me lots of Wrong document exceptions when I run my test suite. [07:34] tmpvar: can we do it [07:34] Aria: Yes! [07:34] Aria: I really want it to be hands-down the best choice. [07:34] tmpvar: yes? [07:34] tmpvar: ok [07:34] tmpvar: lets work on that [07:35] Aria: My goal is within 20% of the fastest parsers speed wise, and correct while doing so. [07:35] tmpvar: just so i know [07:35] tmpvar: ok [07:35] tmpvar: correct is good [07:35] tmpvar: im just worried about the crazy ness [07:36] tmpvar: ok [07:36] tmpvar: so lets do this [07:36] Aria: Heh, yeah. I want to keep that to a minimum. [07:36] Aria: Attribute nodes are the one crazy bit. [07:37] tmpvar: i have no problem dropping you as a default [07:37] tmpvar: we just have to figure out this crazy bull shit with html5 vs jsdom [07:37] Aria: dropping meaning 'not using'? [07:37] Aria: Heh, yeah. [07:38] zubairov has joined the channel [07:38] Aria: That's about the only crazy I can think of. Attribute, and possibly node names. [07:38] tmpvar: haha [07:38] tmpvar: ok [07:38] Aria: Oh. And then there's "how do you construct a script node and not run it until it's ready" [07:38] Aria: But that's it. [07:38] tmpvar: well the jsdom will occupy much of the time [07:38] Aria: You get to live in happy unicode land and not deal with encodings. [07:38] tmpvar: so dont worry too much [07:38] tmpvar: we need proxies [07:38] Aria: Yeah. We so do. [07:38] tmpvar: to be effective [07:39] tmpvar: i should have stayed in az [07:39] Aria: Heh. Yeah? [07:39] tmpvar: i could be texting my responses while i jump off of rocks into water [07:39] tmpvar: in some fashion [07:39] Aria: Okay, that just makes me envious. [07:40] tmpvar: yeah, but now im in ny [07:40] Aria: Alright, as an aside-- why would var doctype = this.document.implementation.createDocumentType(name, publicId, systemId); [07:40] Aria: this.document.appendChild(doctype); -- give me Wrong document exceptions? [07:40] zubairov has joined the channel [07:40] tmpvar: land of.. step on your grandmother [07:40] Aria: Heh. Fun. (Oh, man, timezone hell -- it's late here!) [07:40] Aria: (I'll be in Boston this summer or fall, more than likely.) [07:40] tmpvar: its later here ;) [07:40] Aria: Exactly! [07:41] tmpvar: if you want to meet, ill throw ya a beer heh [07:41] tmpvar: or 4 [07:41] Aria: Hehe. I so do, at some point. [07:41] tmpvar: :) [07:41] tmpvar: ok, anyhow.. [07:41] Aria: This'd be more fun with a sheet raised and in person. [07:41] newy_ has joined the channel [07:41] tmpvar: no, your case makes no sense [07:41] Aria: Which one? [07:41] tmpvar: Alright, as an aside-- why would var doctype = this.document.implementation.createDocumentType(name, publicId, systemId); [07:42] tmpvar: thats hard to tell [07:42] tmpvar: you know you should gist ;) [07:42] Aria: Heh, I should. I figure two lines is acceptable, and three needs a gist. [07:43] Aria: https://github.com/aredridel/html5/blob/master/lib/html5/treebuilder.js#L91 [07:43] Aria: More than a gist, that's in published code. [07:44] msucan has joined the channel [07:44] Aria: The equivalent code works in Safari. [07:45] tmpvar: Aria, lol [07:46] tmpvar: sounds like you need to figure out where we need to interact [07:46] tmpvar: sooner is better [07:46] Aria: Oh? How so? [07:46] tmpvar: no? [07:46] Aria: I'm not sure what you mean. [07:46] tmpvar: maybe i misread the past 15 mins [07:47] Aria: I'm happy banging this out wherever and whenever (though it's getting late here). Meeting up in person will have to wait 'til I move east, sadly. [07:47] sh1mmer has joined the channel [07:48] tmpvar: do you have a nodeconf ticket? [07:48] Aria: I don't. [07:48] tmpvar: could you go it you had one? [07:48] Aria: I ... don't know. [07:48] delian66 has joined the channel [07:48] tmpvar: may 5 [07:49] tmpvar: i may .. be able to punch some donkeys [07:49] Aria: Oof. Soon. Very likely not, if only because I need to get my business shut down somewhat before I move. [07:49] tmpvar: and make it happen [07:49] Aria: I wish my entire life wasn't upside down. Heh. [07:49] tmpvar: yeah [07:51] sreeix has joined the channel [07:57] mikeal has joined the channel [07:59] jetienne has joined the channel [08:00] tmpvar: mikeal, yo [08:00] mikeal: heya [08:02] Kawohi has joined the channel [08:02] Kawohi: How would node.js help a custom made forum ? [08:03] coreb: Aria: business going poorly? [08:04] Aria: Yeah. Got boned by the local telco a few years back. [08:04] Aria: The debt finally became crippling. [08:04] darshanshankar_ has joined the channel [08:05] Aria: So time to go move to a big city, work for someone else and do interesting things. [08:05] skm has joined the channel [08:06] coreb: what are you going to work with? [08:06] Aria: Well, in my dream world, node.js ;-) [08:06] markwubben has joined the channel [08:06] Aria: But I'm set on Boston, so I don't get to be quite so picky. [08:06] caolanm has joined the channel [08:07] SamuraiJack has joined the channel [08:07] tmedema has joined the channel [08:07] tmedema: Morning folks. I'm trying to create a simple module, like so: exports = function(server, everyone) { //logic here } in someFile.js [08:08] tmedema: when I then do require(someModule)(server, everyone); I'm getting " object is not a function " [08:08] coreb: boston doesn't have a large it business? [08:08] andi5: tmedema: module.exports = function ... [08:09] tmedema: andi5: oh? it does not seem to be used like that at http://nodejs.org/docs/v0.4.5/api/modules.html#modules [08:10] tmedema: that does seem to solve it though :) I must be confused with how the exports should be set [08:10] andi5: tmedema: You can extend exports, but you reset it this way [08:10] tmedema: andi5: Ahhh that makes sense! Thanks a lot. [08:11] jaket has joined the channel [08:12] Kawohi: How would Node.js help my custom *forum software [08:13] beawesomeinstead has joined the channel [08:13] Aria: Kawohi: Depends. how much realtime stuff do you do? How much do you like having the same language on client and server side? [08:15] konobi: how much imagination do you have? [08:15] Kawohi: Okay. Hold ON cause I'm a noobie at this. realtime? explain a bit? lang in code? PHP & Ruby on Rails and Javascript. [I'm learning and this is my first big project]. I'm trying to see what node.js can do. [08:15] teemow has joined the channel [08:16] Aria: node is good at doing things in reaction to events. Data in? Data out. [08:16] mc_greeny has joined the channel [08:16] Kawohi: Example? [08:16] Aria: So whereas, say, PHP sits and spins and waits for database connections to return data and such, good for simplistic top-down read-request-write-response scripts... [08:17] Aria: ... node is good at moving data around as it comes in. [08:17] Aria: Chat server is a nice canonical example. Lots of little bits of data, delivered in a timely way. [08:18] Kawohi: Alright. [thats why I see so much ..chats in node.js on hackernews..] but my forum will be pretty big. would node.js help a lot? [08:18] Aria: Depends. What does your forum do? [08:19] konobi: Kawohi: would haskell help? [08:20] konobi: the "language" or "runtime" is unimportant... it's the capabilities of the runtime that determine it's usefulness [08:20] Kawohi: My forum software hasn''t been created yet. I'm still in the process of thinking of what it will do. [08:20] konobi: once you understand those capabilities, you can see how you can apply them to your projects [08:20] Kawohi: Alright thanks [08:21] konobi: Kawohi: ie, if you don't grasp it... have a play with a few of the examples [08:21] konobi: experimenting++ [08:21] v8bot: konobi has given a beer to experimenting. experimenting now has 1 beers. [08:22] d0k has joined the channel [08:22] Kawohi: doesn't know much JS at all. Plan on studying hard on it. ...going stright to Node.js is a bad idea you think? [08:23] konobi: nope [08:23] Aria: Nah. It's good. [08:23] Aria: node is actually really simple. Weird if you're not used to programming with events, but not bad at all. [08:23] konobi: at least you won't have to deal with the nightmare that is the DOM up front [08:24] danheberden has joined the channel [08:24] coreb: event driver programming is hard to grasp when not used to it [08:24] coreb: it's a lot more complicated to understand than threading [08:24] coreb: driven* [08:24] Kawohi: ~ So would should I study first? [08:25] stonebranch has joined the channel [08:25] coreb: I don't know what your basis is [08:25] Kawohi: Very basic..... I only know html&css. [08:25] coreb: hm [08:26] Kawohi: But I quit my job and have time to fully study on it [08:26] sako has joined the channel [08:26] coreb: well, I'd focus on object oriented programming first [08:26] sako: hey guys, what are some good tutorials for programmers just discovering node.js? [08:26] Kawohi: On JS or PHP? [08:26] sako: im interested in playing around with node.js + redis, i see there is a nice package manager (npm) [08:27] coreb: Kawohi: neither, I suggest python [08:27] sako: python +1 [08:27] konobi: smalltalk... scheme! [08:27] sako: Kawohi: you are new to programming? [08:27] Kawohi: I heard python was good. But I really am interested in Ruby & Rails though. [08:27] Kawohi: Yes. [08:27] sako: lol [08:27] kaichenxyz has joined the channel [08:28] sako: do yourself a favor and steer clear of ruby as your first language [08:28] konobi: just pick something and stick to it [08:28] Kawohi: I know. Its on my list tho [08:28] coreb: ruby's an equivalent of python [08:28] konobi: it doesn't matter which one it is [08:28] coreb: but, python has a wider appeal, I think [08:28] konobi: learning the concepts is much more important than the specific language [08:28] sako: eh i guess... better yet Kawohi check out python and ruby and pick whichever syntax looks better.. you can do the same things with both [08:28] coreb: konobi; indeed [08:28] Kawohi: I have linux installed so now I can dive much deeper into programming now [08:29] Kawohi: It was kind of hard on windows [08:29] sako: Kawohi: you got step 1 out of the way :) [08:29] Kawohi: haha [08:29] sako: now install ruby and python and start reading the official tutorials.. both are great [08:29] coreb: hehe, the os doesn't matter at all [08:29] sako: coreb: not true, i learned python so much more by making shell scripts [08:30] sako: why on earth would anyone want to make shell scripts on windows [08:30] Casperin: why do you suggest python over nodejs? I'm in sort of a similar boat, but to my nodejs looks a lot more fun, and I already have some experience with js from frontend development [08:30] coreb: sako: would windows stop you programming python _in any way_? [08:30] sako: nah [08:31] Casperin: to me* [08:31] sako: Casperin: understand that python is a language and nodejs is a framework-ishhhhh [08:31] coreb: when it comes to learning programming, focusing on the os is way off base [08:31] konobi: Casperin: for someone who has never done _any_ programming before? [08:31] Aria: Someone needs to write a LJsTHW. [08:31] Kawohi: ON my windows 7 machine, Programs was buggy that ran on python. I kept getting error messages. Doesn't happen now since i'm on linux/ubuntu [08:31] jimt_ has joined the channel [08:32] sako: anyway F the OS [08:32] sako: hes right dont matter [08:32] sako: soooo... you guys recommend some good tutorials outside of the litttle getting started deal on the main site [08:32] Casperin: sako: right.. nodejs is a framework for js… kind of like django is for python. I'm just wondering, since I don't want to waste time on the wrong thing :) [08:32] konobi: check the resources page on the wiki [08:32] coreb: Kawohi: that's not because of windows, probably because of your python version or something, maybe you hadn't even installed it [08:32] sako: konobi: thanks [08:32] coreb: python comes with most linux distros [08:33] Casperin: and unix :) [08:33] Kawohi: I did :/ [08:33] konobi: Casperin: nodejs is a runtime environment for javascript [08:33] Casperin: well.. it comes on a mac :P [08:34] konobi: it has "framework" elements... but it's definitely a runtime env [08:34] coreb: Kawohi: well, anyway, stick to your linux now that you've got things working, but don't think that windows itself was the problem [08:34] Kawohi: alrighttt. thanks guys for the help [08:36] Aria: Yeah, windows wasn't the problem. Things using GTK, perhaps, though. They never are quite native on Windows. [08:36] Casperin: can you guys help me with a problem? I installed nodejs, npm, express, sass, and jade. Seems like a really wonderful mix (though I'm unfamiliar with jade still)… but now I get this error while running the server (when a browser hits the url). It does deliver the page, but then it crashes. Let me cp the error [08:37] Casperin: node(15001,0xa032b540) malloc: *** error for object 0x35000f4: incorrect checksum for freed object - object was probably modified after being freed. [08:37] Aria: Goodness. Which node? [08:37] jetienne: who to implement spdy in node ? [08:37] Jamool_ has joined the channel [08:37] jetienne: pquerna: you take the ticket ? :) [08:37] Aria: jetienne: I'd been considering it, especially now that SSL is stabilizing. [08:37] Casperin: Aria: me? [08:37] jetienne: Aria: go! :) [08:38] cha0s: Hey guys, is there a way to get stdin without it echoing? Like if I want to write a little utility to take a password on the command-line? [08:38] jetienne: Aria: i havnt even looked at the proto [08:38] Aria: Casperin: Yeah. [08:38] Casperin: the one from github. v0.5.0-pre [08:38] Aria: jetienne: It's pretty simple. A binary reformulation of HTTP, pretty much. Plus multiple streams, the usual way one would do that. [08:38] jetienne: Aria: but for sure if google starts announcing more it should be more stable. pquerna had knowledge on the proto from memory [08:38] Aria: Casperin. Ah, interesting. Looks like you hit a bug. Does it happen with 0.4.x? [08:39] sechrist has joined the channel [08:39] Aria: jetienne: Yeah. It's really simple. The trickiest part is that it's triggered during SSL negotiation -- you set an SSL "next protocol" option. [08:39] Casperin: I'm completely new (installed first time last night).. so I haven't got a clue. I'm not even certain I could install 0.4 [08:39] jetienne: Aria: as aproximation, how long to code it ? 2-3 weeks ? or more 2months ? [08:39] Aria: Casperin: from github, just git checkout 0.4.6 [08:39] konobi: Casperin: 0.5.0x is the unstable branch [08:39] Aria: jetienne: 2-3 weeks. I saw a sample implementation in Ruby today. [08:40] Casperin: the interesting thing is that it only happens when I try to run some express app. [08:40] konobi: 0.4 is stable [08:40] Casperin: I see [08:40] Casperin: I'll do a reinstall and get back to you then :) [08:40] jetienne: Aria: oh ok. well +1 for you :) [08:40] Casperin: Is there anything I can do to help fix the bug btw? [08:40] Aria: valgrind and find where the memory corruption happens. [08:41] jetienne: 0.4.6 is out ? [08:41] Aria: Not a trivial bug, I bet. [08:41] Aria: Oh. Maybe 0.4.5. I coulda dreamed 0.4.6. [08:41] Kawohi: OH btw. I'm new to github. What is cloning and forking? Can it be used just to bookmark ? I can't really understand the docs much on it. [08:41] konobi: 0.4.5 [08:41] sechrist: sechrist++ [08:41] v8bot: sechrist: Don't cheat! You can't give a beer to yourself. [08:41] jetienne: ok cool [08:41] sechrist: v8bot: sys.puts('yo'); [08:41] v8bot: sechrist: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [08:41] sechrist: v8: sys.puts('yo'); [08:41] v8bot: sechrist: ReferenceError: sys is not defined [08:41] sechrist: v8: require('sys').puts('yo'); [08:41] v8bot: sechrist: ReferenceError: require is not defined [08:41] jetienne: v8: console.log("bla" [08:41] v8bot: jetienne: SyntaxError: Unexpected end of input [08:41] jetienne: v8: console.log("bla") [08:41] v8bot: jetienne: "bla" [08:42] sechrist: v8bot and not nodebot [08:42] sechrist: sigh [08:44] cha0s: got it, "require('tty').setRawMode(true)" =) [08:44] stephank has joined the channel [08:45] Casperin: how do I checkout v.0.4 from github? :-/ [08:45] konobi: http://nodejs.org/#download [08:45] Aria: git checkout v0.4.5 [08:45] Aria: Or download the tarball. [08:46] Aria: Night! [08:48] Casperin: tarballing it is… [08:51] matjas has joined the channel [08:52] Casperin: merde… node -v says it's still v. 0.5.0-pre :( [08:53] adambeynon has joined the channel [08:57] void_ has joined the channel [09:00] Kingdutch has joined the channel [09:00] Casperin: I'm too stupid for this shit. I download v.0.4.5.tar.gz from github. I ./configure it, I make and I make install. And still it tells me it's version 0.5 [09:01] cha0s: Try this: ./configure --prefix=/usr [09:01] cha0s: then sudo make install at the end [09:02] Casperin: it's "making" [09:02] cha0s: i'm guessing your old one installed in /usr and then the latest one in /usr/local, just a guess though [09:03] Casperin: sounds very reasonable. I haven't been using sudo (or not) all the time [09:04] cha0s: You should only use sudo when necessary, like installing into the system [09:04] cha0s: don't use sudo make, just sudo make install [09:04] Casperin: that's what I'm doing now :) [09:04] delian66 has joined the channel [09:04] cha0s: k [09:04] Casperin: but I had some problem with node not being added to $PATH, so I tried a sudo install last night (didn't help) [09:05] Casperin: … I could cry. It still says it's v. 0.5-pre [09:05] cha0s: do this: which node [09:06] Casperin: /Users/g/local/node/bin/node [09:06] cha0s: oh, mac... well i'm more of a linux guy [09:06] Casperin: me too actually [09:07] cha0s: that seems like a weird place for it though, i think you must have added that location to $PATH before system paths [09:07] Casperin: macs are good for frontend though [09:07] Casperin: yeah, I did… I added it to .bash_profile [09:07] Casperin: manually [09:07] cha0s: well you should yank that out [09:07] cha0s: and let it use the system one... [09:08] Casperin: I was about to tell that it wouldn't return anything now (because it didn't last night)… but it actually did: /Usr/bin/node [09:08] Casperin: and now I get the right version :) [09:08] cha0s: yup, it should work [09:08] cha0s: woohoo [09:08] Casperin: yay! \o/ [09:09] Casperin: do I need to run node as sudo then? [09:09] cha0s: congrats, hope it doesn't crash now ;) [09:09] Casperin: sudo node app.js [09:09] cha0s: only if you want to bind on ports < 1024 [09:09] Casperin: okay, well.. that doesn't matter [09:11] Jamool has joined the channel [09:11] Casperin: wow… I can't install npm now. I get all sorts of errors [09:12] cha0s: what kind of errors? [09:12] Casperin: ah.. sudo BOTH places [09:12] Casperin: sudo curl http://npmjs.org/install.sh | sudo sh [09:12] Casperin: forgot the last sudo [09:13] cha0s: the curl line doesn't need a sudo ;) [09:13] cha0s: also, you probably want to put something like this in .bashrc: export NODE_PATH="/usr/lib/node_modules" [09:15] Casperin: it crashed again! [09:16] Stan____ has joined the channel [09:16] cha0s: well in this case i guess there's only one choice left: get a real OS. ;) just kidding [09:16] Casperin: hehehe yeah… this is not the first time I've been about to throw this mac out the window [09:17] Casperin: Sounded cool when they told me that company policy was to provide every employee with a MacBook. Now I'm less thrilled [09:17] Casperin: node(18044,0xa032b540) malloc: *** error for object 0x34006c4: incorrect checksum for freed object - object was probably modified after being freed. [09:18] Casperin: that's the error, in case it might be interesting [09:18] cha0s: there's some way to run stuff in gdb, but someone else will know more than me about that [09:18] Casperin: gdb? [09:18] Casperin: I have a full day at home here, so I think I'll just pull out my old thinkpad, install the new ubuntu, and then go for nodejs on that one [09:19] sveimac has joined the channel [09:19] unlink has joined the channel [09:19] unlink has joined the channel [09:19] cha0s: that might be less pain overall [09:21] Kawohi: Hey guys how do I uninstall OpenOffice? [09:21] Kawohi: ~ wrong irc [09:21] Kawohi has left the channel [09:23] mAritz has joined the channel [09:23] Casperin: npm uninstall OpenOffice :P [09:24] dve has joined the channel [09:27] XaKBooT has joined the channel [09:27] XaKBooT: qq all [09:28] torgeir has joined the channel [09:28] tmedema: Hmm, how should I add client-side javascript logic to an express/jade app? [09:28] tmedema: I mean, what is the recommended way? [09:28] criswell has joined the channel [09:30] stagas: tmedema: what do you mean? [09:30] francescop has joined the channel [09:31] tmedema: stagas: well, should I simply host a static javascript file and include that with a script tag to the jade view? [09:32] francescop has left the channel [09:33] stagas: tmedema: yeah the script tag is needed anyway, but if you need something like a dynamic script check out https://github.com/visionmedia/express-expose [09:33] tmedema: stagas: hmm I am using now.js for that [09:34] tmedema: it's slightly confusing with jade, as you actually write server side javascript in the "html" file [09:34] stagas: now is like an rpc though, expose is serving it as if it was static [09:35] herbySk has joined the channel [09:35] skm has joined the channel [09:36] tmedema: stagas: would you put the static javascript file (the client side one) in the same folder as the corresponding jade view? [09:37] maxter has joined the channel [09:37] stagas: tmedema: no you should have a dedicated public/ folder [09:37] FireFly|n900 has joined the channel [09:37] tmedema: stagas: hmm, then how do you keep the relation with the jade views? [09:38] tmedema: for example, I hava a client side javascript script that interacts with certain elements of a jade view [09:39] stagas: tmedema: jade views aren't related to anything, you can render them on any route [09:39] tmedema: stagas: yes, but my javascript file is related to a specific jade view [09:39] tmedema: it relies on certain elements set by that specific jade view [09:39] Jamool_ has joined the channel [09:40] torgeir: mongoose experts around? [09:42] stagas: tmedema: just insert a script tag and reference to that js file in relation with the public static folder [09:44] torgeir: adding unique: true to my mongoose schema keeps throwing TypeErrors "Cannot call method 'forEach' of undefined", checkMaster_::0::undefined from inside of the node-mongodb-native driver, suggestions? [09:44] tmedema: stagas: would you name the javascript files to the view that they correspond with? [09:44] liquidproof has joined the channel [09:45] stagas: tmedema: if it helps [09:46] tmedema: stagas: alright, just wondering how you folks approach this situation [09:46] synkro has joined the channel [09:48] mraleph has joined the channel [09:54] mike5w3c_ has joined the channel [09:57] skm has joined the channel [10:09] Leo_ has joined the channel [10:13] Wizek has joined the channel [10:14] k1ttty has joined the channel [10:14] torgeir has left the channel [10:16] Wizek_ has joined the channel [10:16] lorhko_ has joined the channel [10:20] Wizek has joined the channel [10:27] bentkus has joined the channel [10:30] torgeir has joined the channel [10:32] Emmanuel__ has joined the channel [10:43] rubydiamond_: Anybody in the room? [10:43] rubydiamond_: wanted to know is this example https://gist.github.com/911289 shows real power of node.js ? [10:45] onr has joined the channel [10:45] tokumine has joined the channel [10:47] Emmanuel__ has joined the channel [10:48] [AD]Turbo has joined the channel [10:51] samcday: rubydiamond_, Whatcha mean? [10:51] Emmanuel_ has joined the channel [10:53] mdwright_laptop has joined the channel [10:54] [AD]Turbo: hi noders :) [10:54] V1 has joined the channel [10:57] ntelford_ has joined the channel [10:58] Gruni has joined the channel [10:58] jetienne has joined the channel [10:59] baudehlo has joined the channel [11:03] jarek_ has joined the channel [11:04] jarek_ has joined the channel [11:04] jarek_: Hi [11:04] jarek_: following snippet will execute the code from run.js: [11:04] jarek_: require('./node_modules/run/run.js'); [11:05] jarek_: but how can I pass addition argument to it? [11:05] jarek_: a/addition/additional [11:09] deedubs has joined the channel [11:09] ashb_ has joined the channel [11:12] samcday: jarek_, You don't [11:12] samcday: The easiest way to do what you're thinking is this: require("./node_modules/run/run.js")(your, args, here); [11:13] samcday: Then in your module you do module.exports = function(your, args, here) { // implementation } [11:13] samcday: Otherwise you could just put stuff in process.env [11:14] zubairov has joined the channel [11:15] kriszyp has joined the channel [11:16] jarek_: this is a third party modules, so editing it is probably a bad idea [11:17] jarek_: I just find it annoying that every time when I want to start my app I have to type "./node_modules/.bin/runjs server.js" [11:17] mikl has joined the channel [11:17] mikl has joined the channel [11:17] jarek_: I guess I will have to create an alias in .bashrc instead [11:20] jarek_: yeah, it works now [11:20] jarek_: I have added this to .bashrc: [11:20] jarek_: alias start='./node_modules/.bin/runjs' [11:21] jarek_: and now I can run my app with "start server.js" [11:21] samcday: Ah nice :) [11:24] seivan has joined the channel [11:26] gmanika has joined the channel [11:27] MarkMenard has joined the channel [11:38] Remoun has joined the channel [11:42] rubydiamond_: Guys how to write this in coffeescript [11:42] rubydiamond_: https://gist.github.com/dcd05bffbbc96e636791 [11:44] rubydiamond_: samcday: there? [11:44] rubydiamond_ has joined the channel [11:46] beawesomeinstead has joined the channel [11:48] kuebk^ has joined the channel [11:51] wasabista has joined the channel [11:52] some1else has joined the channel [11:54] zubairov has joined the channel [11:54] jzaefferer has joined the channel [11:55] MattJ has joined the channel [11:57] Croms has joined the channel [11:58] XaKBooT has joined the channel [11:58] jetienne has left the channel [12:01] sveisvei has joined the channel [12:02] torgeir has left the channel [12:08] Croms_ has joined the channel [12:12] unomi has joined the channel [12:14] ji0n has joined the channel [12:16] suckerpunch has joined the channel [12:17] jschoolcraft: rubydiamond: http://mindynamics.github.com/js2cs/example.html ? [12:17] rubydiamond: jschoolcraft: tried that.. [12:18] rubydiamond: partially helpful [12:18] jschoolcraft: ah, well [12:18] rubydiamond: breaks for some complex syntax [12:20] amackera_away has joined the channel [12:21] telemachus has joined the channel [12:21] pdelgallego has joined the channel [12:22] joeshaw has joined the channel [12:27] liquidproof has joined the channel [12:30] V1 has joined the channel [12:31] gf3 has joined the channel [12:33] okuryu has joined the channel [12:34] matjas has joined the channel [12:36] zkirill has joined the channel [12:37] shaunau_ has joined the channel [12:40] postwait has joined the channel [12:44] V1: Why on earth is the 'util' module required on each console.log / info / warn etc call? o_O that makes.. no sense [12:45] V1: Iknow the module is cached after one call, but still [12:46] fairwinds has joined the channel [12:47] saschagehlich: Gnaaaah I hate rails. I want to go back to node :( [12:48] suckerpunch has joined the channel [12:51] V1: just rm -rf rails / [12:51] V1: ;D [12:51] FireFly has joined the channel [12:53] nephics has joined the channel [12:55] charlenopires has joined the channel [12:58] telemachus: Why would I get this warning when first installing npm? npm WARN Not installed in /Users/circe/local/node-v0.4.5/lib/node_modules npm [12:59] telemachus: I know it's not installed there yet - I'm installing it. [12:59] telemachus: (More seriously, just wondering if I'm doing it wrong...) [13:01] mattly has joined the channel [13:06] xla has joined the channel [13:07] shaunau_: V1: that rm looks like it will trash the entire OS not just rails. [13:07] akashiraffee has joined the channel [13:10] eldar has joined the channel [13:11] bartek has joined the channel [13:13] RusAlex has joined the channel [13:14] rafacv has joined the channel [13:15] asabil has joined the channel [13:16] Stan____: How to reproduce a broken pipe error? [13:21] CrazyGoogle has joined the channel [13:23] shiawuen has joined the channel [13:27] hvgotcodes has joined the channel [13:29] nephics: Stan____: could you be more specific? [13:29] Croms: Bloody hell, why does JSON.stringify output such unreadable code? [13:31] Stan____: nephics: I need to write a test case for request which fails because of broken pipe, so I can figure out how to fix this issue. [13:32] xandrews has joined the channel [13:32] prettyrobots has joined the channel [13:32] nephics: do you have some boiled down example of the code that is failing? [13:33] Stan____: not really [13:33] nephics: I guess the purpose is to fix the bug, rather than writing a test case? [13:34] Stan____: Yes. But it kind of happens at random and I don't know exactly when. [13:34] nephics: is it an incoming http request handler that fails with broken pipe? [13:35] tmedema: If anyone knows about the difference between util.pump and stream.pipe could you maybe have a look at my thread here: http://groups.google.com/group/nodejs/browse_thread/thread/17074342f01fe313 ? [13:36] Stan____: nephics: I believe it is a multipart/related PUT request to CouchDB. [13:37] nephics: is it on receiving the couchdb response or is it on sending the request to couchdb that you get the broken pipe error? [13:38] Stan____: I'm not sure. [13:39] Stan____: I'll have to check on that. [13:39] xla has joined the channel [13:39] nephics: are you interfacing couchdb thorugh a module that somebody wrote, or is it your own direct call to couchdb? [13:41] Stan____: Yes. I'm using mikeal/request [13:41] charlenopires has joined the channel [13:44] nephics: does the stack trace point to a place in mikael's code? [13:44] jimt has joined the channel [13:45] Stan____: No. [13:45] Stan____: It says: Error: EPIPE, Broken pipe [13:45] Stan____: at Socket._writeImpl (net.js:159:14) [13:45] Stan____: at Socket._writeOut (net.js:449:25) [13:45] Stan____: at Socket.flush (net.js:528:24) [13:45] Stan____: at Socket._onWritable (net.js:608:12) [13:45] Stan____: at IOWatcher.onWritable [as callback] (net.js:188:12) [13:45] m64253 has joined the channel [13:46] MMZ has joined the channel [13:47] losing has joined the channel [13:48] V1: shaunau: ssst ;) [13:49] nephics: Stan____: are you piping the body of the put request? [13:51] Stan____: not this request [13:51] tobym has joined the channel [13:51] coreb has joined the channel [13:51] Stan____: I use pipes to read another request. [13:51] galaxywatcher has joined the channel [13:52] nephics: is that other request before or after the failing request? [13:53] Stan____: It's hard to tell because they run in a loop, one request after another. [13:53] ji0n has joined the channel [13:54] Stan____: That's why I thought I would be easier if I had a failing scenario. [13:54] XaKBooT has joined the channel [13:55] nephics: Stan____: maybe related to this: http://groups.google.com/group/nodejs/browse_thread/thread/865f98c8f874cb09/59371cd84c94abd1 [13:56] Stan____: Thanks I'll check it out. [13:56] Lagnus has joined the channel [13:56] nephics: though the issue is said to be fixed in the node version 0.1.94 :-/ [13:57] nephics: Stan____: see also http://markmail.org/message/qhleegglhz3mkv57#query:+page:1+mid:gx6g5hcgtzqskifa+state:results [13:57] tmedema: What Express/Connect router regular expression would be used for all routes except for those ending with .js or .css? [13:58] suckerpunch has joined the channel [13:59] robhawkes has joined the channel [14:02] jimt has joined the channel [14:02] dyer has joined the channel [14:03] shaunau_ has joined the channel [14:07] jimt_ has joined the channel [14:09] jetheredge has left the channel [14:10] piscisaureus has joined the channel [14:11] jzaefferer has joined the channel [14:11] jarek has joined the channel [14:11] jarek has joined the channel [14:11] jarek: Hi [14:12] jarek: is there a module that would allow me to load modules in client side the same way as on server side? [14:12] jarek: like this: [14:12] jarek: var mymodule = require("mymodule"); [14:12] piscisaureus has joined the channel [14:12] jarek: so far I have found "Browserify" module, but... [14:13] unomi has joined the channel [14:13] jarek: it looks like it is merging all js files which makes debugging harder [14:13] jarek: are there any alternatives? [14:15] m64253 has joined the channel [14:16] ohtogo has joined the channel [14:17] jonpacker: there's a bunch [14:17] jonpacker: take a look at https://spreadsheets.google.com/ccc?key=0Aqln2akPWiMIdERkY3J2OXdOUVJDTkNSQ2ZsV3hoWVE#gid=0 [14:20] mscdex: jarek: were you still looking for an ftp module for node? [14:20] jarek: jonpacker: does any of the support the same syntax as node.js? [14:20] jarek: mscdex: yeah [14:20] mscdex: jarek: https://github.com/mscdex/node-ftp [14:21] jarek: mscdex: you have just written it? O_o [14:22] jonpacker: jarek: try http://requirejs.org [14:22] jonpacker: I haven't used it myself so I don't know that it does it exactly how you want [14:23] jarek: jonpacker: I remember testing require.js some time ago [14:24] jarek: jonpacker: it was a bit heavy [14:24] jarek: jonpacker: but perhaps I have take another looks at it [14:24] dgathright has joined the channel [14:24] jarek: s/looks/look [14:25] Twelve-60: saw this in some code.. cant find any documentation about it: var Script = process.binding('evals').Script; [14:25] bradleymeck has joined the channel [14:27] mscdex: jarek: i did the other day :) [14:27] charlenopires has joined the channel [14:27] jarek: mscdex: thanks for publishing it, the api seems to have everything I need [14:28] jarek: mscdex: have you thought about distributing it via npm? [14:28] Vladimir1 has joined the channel [14:29] mscdex: jarek: yeah, just haven't gotten to it yet [14:30] norviller has joined the channel [14:30] rfay has joined the channel [14:30] jarek: mscdex: great [14:30] jarek: mscdex: thanks again for sharing it ;) [14:31] jarek: now I'm going to give it a try [14:32] telemachus: !src [14:32] nodelog: Source is here: http://github.com/felixge/nodelog [14:33] telemachus: !src [14:34] eee_c has joined the channel [14:34] shaunau_: mscdex:impressive work [14:35] H4ns has joined the channel [14:35] steph021 has joined the channel [14:36] seivan has joined the channel [14:36] robertkeizer: Ho hum.. hello everyone. [14:37] H4ns: Hi - I have an architectural question regarding the use of events.EventEmitter - In my system, I have several agents that send and receive messages through a hub, which is an EventEmitter. All of them listen for the same events and send events of the types that they also listen to. Now, what I don't want is that an agent receives messages that it has sent itself. This seems like a common pattern, but I fail to see a good way how EventEmitter can [14:37] H4ns: used for that. [14:37] H4ns: Any ideas would be appreciated. Maybe I'm overlooking something. [14:38] micheil: who's behind the node-ctype library? [14:38] robertkeizer: h4ns: Depending on what exactly your passing, it might be worth while passing an identifier.. [14:40] H4ns: robertkeizer: Right, but that'd put the burden on the sender and I'd like to avoid that. One solution would be to wrap the on() and emit() methods in the hub and let it handle that transparently for the clients. [14:41] H4ns: Well, that should be easy and straightforward. robertkeizer, thank you for listening! [14:41] ryanfitz has joined the channel [14:41] MikhX has joined the channel [14:41] zalez has joined the channel [14:41] gattuso has joined the channel [14:42] robhawkes has joined the channel [14:46] xandrews has joined the channel [14:50] SamuraiJack has joined the channel [14:53] jtsnow has joined the channel [14:53] jennings has joined the channel [14:56] robertkeizer: Hmm, having issues with __defineGetter__, since I have a recursive function and the callback is asynchronous - so when the callback gets called the variable has been overwritten already.. and I can't seem to find a way around it. [14:57] gattuso has joined the channel [14:57] stagas: robertkeizer: copy it before the callback and use that [14:58] sreeix has joined the channel [14:59] robertkeizer: stagas: It's in a for loop, and I've tried using a unique identifier - but the when the callback is run it doesn't see any ( since its just a getter ) and doesn't take any arguments.. [15:00] stonecobra has joined the channel [15:00] jb55 has joined the channel [15:01] stagas: robertkeizer: use a regular method instead of the getter [15:02] jennings has joined the channel [15:03] robertkeizer: stagas: I think I might have to.. [15:03] robertkeizer: I was really hoping to be able to get linux.sysctl().net.ipv4.conf.all.forwarding to work.. and such. [15:04] robertkeizer: Without having to use linux.sysctl().net.ipv4.conf.all.forwarding(). [15:05] beejeebus has joined the channel [15:08] SamuraiJack has joined the channel [15:10] zalez: Hi, I'm trying to understand where node.js/npm finds its C library dependencies. The library is libpng and it's sitting in /opt/local/lib. Both the linker and $LIBRARY_PATH know about the path, CPATH is set to /opt/local/include and still npm install png yields: Checking for library png : not found [15:11] zalez: npm seems to go through anyway, but when I actually try to use png.node it exits with a reference not found error. [15:11] |sWORDs| has joined the channel [15:12] |sWORDs|: I'm having some trouble in using step.js with mysql, can anyone spot what I'm doing wrong? http://pastebin.com/kLTVQhda [15:12] markc has joined the channel [15:13] maushu has joined the channel [15:14] robertkeizer: zalez: Runtime perhaps? [15:14] robertkeizer: Although I don't think that would be an issue. [15:14] zalez: Trying if setting LINKFLAGS helps... [15:15] zalez: Hmm. Still not found. Seems like npm ignores the typical environment variables... [15:15] ryah: zalez: LD_LIBRARY_PATH ? [15:15] ryah: on macintosh DYLD_LIBRARY_PATH [15:16] robertkeizer: Could always use waf instead of npm, ie download the source instead of using npm to fetch and build. [15:16] zalez: Will try that, though that's not encouraged. (I'm on Solaris and crle is configured correctly to know about /opt/local/lib) [15:17] ryah: you might want to open up the wscript in the png lib and see how it's checking for libpng [15:17] ryah: could be trying to use pkg-config or something [15:17] zalez: yeah, will try that... [15:17] galaxywatcher has joined the channel [15:17] highermath_away has joined the channel [15:19] zalez: hmm, indeed pkg-config is not installed on the machine... [15:19] ryah: is this a joyent machine? [15:19] kriszyp has joined the channel [15:19] zalez: Yep. [15:20] CrazyGoogle: anyone here plays with nodejs-yui ? [15:20] |sWORDs|: ryah, I still wanted to get back to you on running node on Qnap, I've decided not to build a qpkg, because it's pretty easy to compile node on qnap anyway. /opt/lib/libpthread_nonshared.a as linkflags, ./configure --without-snapshot and make is all that's needed. [15:20] zalez: A-Ha. The wscript has a list of paths to go through and it doesn't include /opt/local [15:21] zcopley has joined the channel [15:21] devrim has joined the channel [15:22] flippyhead has joined the channel [15:23] robertkeizer: Defining getters in a for loop is a pain - especially with recursion. [15:23] jimt has joined the channel [15:23] zalez: Oh, it's worse: The libpng that's installed is not called libpng, it's libpng14.so etc. [15:28] |sWORDs|: I'm having some trouble in using step.js with mysql, can anyone spot what I'm doing wrong? http://pastebin.com/kLTVQhda [15:28] Schmallon has joined the channel [15:28] zalez: ok, one step closer. Told the wscript to look for png14 and to include the /opt/local/lib directory in its search. The check now runs through. Now trying to figure out how to actually include the library... [15:29] ljounce has joined the channel [15:35] m64253 has joined the channel [15:36] zalez: Cool. The rebuild went through and the resulting binary shows a dependency to libpng14.so according to ldd. Seems to have worked. Thanks! (Now the fact that I still see nothing is entirely my fault :) ). [15:37] maushu has joined the channel [15:38] mc_greeny has joined the channel [15:39] eventi has joined the channel [15:41] click_click: are development and production the only two NODE_ENV values that work? [15:43] SomeRandom has joined the channel [15:44] baudehlo1 has joined the channel [15:45] hij1nx has joined the channel [15:45] TooTallNate has joined the channel [15:48] micheil: ryah: you there? [15:49] astropirate has joined the channel [15:49] ryah: micheil: kind of [15:50] micheil: ryah: okay, uhh, early morning question for you: what amount of data would you recommend is the maximum that a network socket should have written to it at any given time? [15:51] micheil: (eg, you can't exactly write 1 Gb to a network socket at once, that's going to have to be fragmented.) [15:51] ryah: micheil: like, with socket.write() ? [15:51] micheil: yeah [15:52] ryah: the more the better, basically [15:52] ryah: assuming you're not filling up your memory with queued data to write [15:52] micheil: oh, okay. [15:52] ryah: you want to fill those packets [15:52] bradleymeck has joined the channel [15:52] micheil: just trying to make sense of the websocket's fragmentation rules. [15:52] ryah: node and the OS try hard to do that when given a lot of data [15:53] ryah: fragmentation rules? [15:53] micheil: actually, if a packet is split, will node receive it as multiple "data" events? [15:53] ryah: yes [15:53] micheil: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-06#section-4.4 [15:53] micheil: it's like "you can fragment messages, but as to when you do that, well, we don't particularly care" [15:54] micheil: in node-websocket-protocol (a sub-project of nws2), I'm thinking of allowing users of the library to be able to set maximum frame-lengths [15:54] ryah: micheil: you're always on top of TCP - so don't worry about packets [15:54] micheil: so if you write 1Gb to the formatter, then it'll actually emit multiple data events, each data event being a frame oh N length [15:55] micheil: (I actually honestly don't understand why there's the fragmentation stuff there though. [15:55] ryah: this is for multiple channels - so that one large message doesn't strangle the program [15:55] micheil: "multiple channels"? [15:56] ryah: multiple messages can be sent at the same time [15:56] ryah: apparently [15:56] ryah: which is good [15:56] micheil: hmm.. [15:57] micheil: that doesn't exactly help me. [15:57] hornairs has joined the channel [15:59] coreb: how many worker threads does a node.js server typically spin up? [15:59] ryah: coreb: between 1 and 5 depending on the amount of disk i/o [15:59] coreb: not dependent on cpu work? [16:00] ryah: no [16:00] ryah: the threads are only used to issue disk syscalls [16:00] perlmonkey2 has joined the channel [16:01] coreb: so node.js servers should do next to no algorithmic work then, strictly io [16:03] mike5w3c has joined the channel [16:03] ryah: coreb: most servers aren't compute bound [16:03] micheil: most servers are io bound [16:03] ralphholzmann: when passing a "mode" to fs.mkdir, is that a number or a string? Will "0755" work ? [16:03] coreb: but even for an event driven framework, wouldn't 1-2 threads per core make sense? [16:03] ryah: coreb: heavy computations should be deligated to something out of processes [16:04] micheil: ralphholzmann: iirc, strings will be auto-converted [16:04] ryah: coreb: the VM can only operate on one thread [16:04] gazumps has joined the channel [16:04] ryah: coreb: (like most languages) [16:04] micheil: coreb: eg, you could use something like web-workers or similar, and push to a task queue and get results back, perhaps rpc. [16:05] ryah: ralphholzmann: strings work - octal literals are being removed from javascript [16:05] micheil: ryah: ? [16:05] ryah: ACTION emits hate [16:05] micheil: you mean 0x00? [16:05] ryah: 0700 [16:05] micheil: oh [16:06] gmanika: why would anyone remove that? [16:06] micheil: because it is a bit confusing. [16:06] Gruni has joined the channel [16:06] coreb: ryah: like most languages? python, java, c# ++ all run in vms but support threading [16:06] micheil: 0700 == 448 [16:06] micheil: coreb: threading in node is spawning up another node instance and passing messages. [16:07] Emmanuel_ has joined the channel [16:07] micheil: the VM is single threaded, and doesn't work well across threads (based on the stuff I've read and heard) [16:07] coreb: I see [16:08] fly-away has joined the channel [16:08] ryah: coreb: many have a "GIL" [16:08] DTrejo has joined the channel [16:08] micheil: also, you'd probably get better performance as you're using passing messages on io sockets, rather then context / thread switching [16:08] suckerpunch has joined the channel [16:08] zemanel has joined the channel [16:09] micheil: ryah: Global Interpreter Lock? [16:09] ryah: yes [16:09] tmpvar has joined the channel [16:09] ryah: meaning - really only one thread at a time [16:09] coreb: yeah, but that only applies to c modules in python at least [16:09] ryah: all the complexity with none of the benifits :) [16:09] coreb: it doesn't apply with pure python code [16:09] ryah: benefits [16:10] ryah: you can get out of the GIL in python with a native module, yes [16:10] coreb: java and c# don't have gil-s [16:10] xandrews has joined the channel [16:10] DTrejo: hackNY is today, gonna be tons of people using node, especially with jimbastard+indexzero giving out invites :) [16:10] ryah: don't worry about threads. we don't have them. that is the singular purpose of this project [16:11] ryah: also - unless your calculating primes, don't worry about computation [16:11] ryah: you're underestimating how very fast CPUs are. [16:11] micheil: and.. uh, who actually calculates primes? [16:11] bradleymeck: execution of JS is single threaded, adding in Threads is a nightmare, coroutines is bearable. Serialization is a hit, but so is thread swapping (then again compute bound tasks are rare for what node is specialized in). I'm hopping uni-directional object passing gets added to v8 and we can somehow pass them faster. [16:12] micheil: (sounds more theory based then application based) [16:12] coreb: yeah, serialization is a typical cpu task [16:12] micheil: coreb: also, with the multi-process model that I suggested, you can then horizontally scale out across to many many servers, rather then being stuck to the one [16:13] ryah: people who worry about the overhead of serialization and protocol verbosity go into a particular box over there in the corner [16:13] bradleymeck: and across networks if you have cluster based solutions ~.~ (though i would try not to hit network) [16:13] ryah: ACTION points to it [16:13] ryah: bradleymeck, coreb go in there [16:13] bradleymeck: hehe, ryah i only care if its an extremely large object [16:14] micheil: JSON streaming is still awesome. [16:14] micheil: :D [16:14] ryah: it's next to people who worry about the sun exploding in millions of years [16:14] ryah: bradleymeck: don't send extermely large objects [16:14] bingomanatee: IT IS? [16:14] bingomanatee: OH MY GOD! [16:14] micheil: ACTION wishes he could work out the best part of the websocket protocol to actually go with. [16:14] micheil: the whole "you may be able to do this" is bs. [16:15] coreb: ryah; anyway, the reason for asking is that nginx uses a number of worker threads [16:16] bingomanatee: Isn't the point of socket.io to abstract that process, michell? [16:16] coreb: despite being async [16:16] ryah: coreb: correction: worker processes [16:16] ryah: we fully support the nginx model of load balancing [16:16] ryah: aka prefork servers [16:16] bradleymeck: micheil yes it is, you using yajl? [16:17] coreb: ryah; ah, yeah, indeed processes [16:17] micheil: bradleymeck: hmm, nup. [16:17] micheil: I'm not doing it. I just said it was cool. [16:17] micheil: bingomanatee: I'm the author of node-websocket-server. [16:17] micheil: (that's time #2 today that I've had to say that.) [16:17] bingomanatee: * [16:18] bingomanatee: the sad clown of mobile. [16:18] bingomanatee: ACTION feels better about leaning on REST :D [16:18] micheil: bingomanatee: I'm implementing the draft-06 of the websocket protocol at the moment, trying to figure out the specifics, because parts of the draft are like "you can do this, but we don't mandate it" [16:19] dnolen has joined the channel [16:19] bingomanatee: ah the russian roulette school o fspecifications? [16:19] micheil: something like that. [16:19] bingomanatee: Well - sticking to the mandated feature set is defensible. [16:19] eventi_ has joined the channel [16:20] micheil: the only thing that is mandated on fragmentation is that you have to support both fragmented and unfragmented messages [16:20] bingomanatee: Can you create a switch wherein you can move between full set systems and mandated systems? I know it sounds like the "Fork from hell" but its theoretically possible. [16:21] micheil: not really. [16:21] micheil: as fragmentation is a protocol level thing, but it's more so the "when it should be done" that's the issue [16:21] bingomanatee: Well, now I'm a bit lazy, but if I were you I would say, "If I stick with mandated features, my support burden is lower." [16:21] bingomanatee: And I'd sleep soundly. [16:21] micheil: it is mandated that you need to support fragmentation, it's just as to when you should fragment messages which is not defined. [16:22] bingomanatee: oh god. [16:23] bingomanatee: so who are the implementers in this case? Adobe, google and Microsoft, or a countless clown car of smaller vendors? [16:24] bingomanatee: well in any case if you want me to chip in and help let me know. [16:24] pita has joined the channel [16:24] micheil: implementors are the browser vendors, and people like me, martyn loughran, and brian mckelvey [16:24] fairwinds has joined the channel [16:24] micheil: martyn loughran does the EventMachine implementation [16:25] micheil: Brian McKelvey does the ActionScript 3 and alternative node.js version (released today) [16:25] losing has joined the channel [16:26] pita: What is better: some key value stores that saves data of the same structure, like tables. Or Many Stores that saves data that belongs to each other [16:26] Me1000 has joined the channel [16:26] suckerpunch has joined the channel [16:27] micheil: pita: depends on your data. [16:28] pita: ok other question: is it expensive to open many stores with nstore or node-dirty? [16:28] micheil: uhh.. no idea. [16:28] micheil: you'd have to benchmark it. [16:29] micheil: although, if you're doing key/value type data, I'd recommend using redis over nstore or node-dirty [16:29] darshanshankar has joined the channel [16:29] kriszyp has joined the channel [16:30] jakehow has joined the channel [16:30] pita: we have many key/values, we write a lot and we prefer databases we can ship with our programm native in node.js [16:30] micheil: hmm.. I can't see why, to be honest. [16:31] micheil: why build something in when it can be dedicated? [16:31] pita: my first try was alfred.js, but this didn't run on my computer and there is only one guy working on it [16:31] micheil: (unless it's a client-app, or downloadable style thing) [16:31] JJMalina has joined the channel [16:31] pita: now its a server application [16:31] pita: but we want many people install it [16:31] pita: and we want to make it as easy as possible [16:32] micheil: yeah, for key/value it couldn't be easier than redis. [16:32] k1ttty has joined the channel [16:32] micheil: http://redis.io/download [16:32] micheil: see the installation header [16:32] xastey has joined the channel [16:32] pita: as far as I understand redis, its more thought as a cache than a persistent database [16:32] micheil: you could even write something to wrap it. [16:33] micheil: it's a persistent datastore. [16:33] pita: but can only store strings or? [16:33] micheil: flushes to disk every N rules. [16:33] micheil: stores some complex data types [16:33] pita: json? [16:33] micheil: Redis is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain http://redis.io/topics/data-types#strings, http://redis.io/topics/data-types#hashes, http://redis.io/topics/data-types#lists, http://redis.io/topics/data-types#sets and http://redis.io/topics/data-types#sorted-sets. [16:33] micheil: json is a string. [16:33] c4milo1 has joined the channel [16:34] micheil: if you want indexed JSON, then you'll need one key-space to store your strings, and another to store the indexes [16:35] pita: and redis is easy to install? [16:35] micheil: your main storage for JSON would be a String data-type, with the key space being something like: [16:35] micheil: storage:MODEL:ID [16:36] micheil: then you'd have another namespace of: [16:36] micheil: storage:_indexes:MODEL which would be a list or set [16:36] losing has joined the channel [16:36] micheil: you'd have to write your own ORM to actually do the hard work though [16:37] micheil: but it is possible. [16:37] micheil: see: http://bret.appspot.com/entry/how-friendfeed-uses-mysql [16:37] micheil: and: http://jamesgolick.com/2009/12/16/introducing-friendly-nosql-with-mysql-in-ruby.html [16:38] unlink has joined the channel [16:38] pita: micheil: ok, that helps a lot. Thanks! [16:40] micheil: pita: you can then choose which fields of your json to index, and you store those indexes as referencing the documents ID [16:40] micheil: or Namespace [16:40] CrazyGoogle: indexeDB from chromium ? =) [16:40] micheil: storage:user:1 '{"name":"micheil","javascript":true}' [16:41] micheil: storage:_indexes:user:javascript // => [ 1 ] [16:41] micheil: storage:user:2 '{"name":"john","javascript":true}' [16:41] micheil: storage:_indexes:user:javascript // => [ 1, 2 ] [16:41] micheil: etc. [16:41] micheil: where [] is indicating a redis Set type. [16:42] micheil: and single quotes are redis String types [16:42] micheil: / => is for results [16:42] micheil: // => rather [16:43] perezd has joined the channel [16:44] yonran has joined the channel [16:44] norviller has joined the channel [16:45] warz has joined the channel [16:46] warz has joined the channel [16:47] eventi has joined the channel [16:47] micheil: ryah: buffer.copy is fairly fast and performant, right? [16:47] dahankzter has joined the channel [16:47] mhooker has joined the channel [16:48] ryah: micheil: well.. it's O(n) [16:48] micheil: :/ [16:49] ryah: you shouldnt be copying buffer stuff [16:49] ryah: i mean, if possibe [16:49] micheil: okay. [16:49] ryah: .slice() is faster [16:49] seivan has joined the channel [16:49] micheil: that means I should split up the payload and payload length calculations. [16:49] micheil: I had two buffers to concat. [16:51] ryah: yu should let socket.io do the concating [16:52] galaxywatcher has joined the channel [16:52] ryah: if they must [16:52] micheil: FFFFUUUUU. [16:52] micheil: some days I just really get the stabby feeling for socket.io. [16:52] micheil: ryah: I'm working on node-websocket-server. [16:53] ryah: ryan's rules for making servers: 1) don't block 2) don't copy data 3) don't allocate [16:54] ryah: since you're doing the low-level websocket server, you should not make any assumptions about how people want their messages [16:54] ryah: e.g. provide streams [16:55] ryah: but for the common case where 1 packet = 1 message, you should provide just a buffer [16:55] Charuru has joined the channel [16:56] harth has joined the channel [16:56] micheil: it'll be a stream interface, and it'll emit data events of buffers [16:57] ryah: but you still want the framing, i think [16:58] ryah: i mean 1 stream per message [16:59] micheil: 1 stream per message would be pretty inefficient no? [16:59] pdelgallego has joined the channel [17:00] ryah: that's why you should special case when a message is contained entirely inside a packet [17:00] tokumine has joined the channel [17:00] micheil: I'm not sure I understand you to be completely honest. [17:01] beawesomeinstead has joined the channel [17:01] beawesomeinstead has joined the channel [17:02] perezd has joined the channel [17:05] themiddleman has joined the channel [17:10] some1else has joined the channel [17:11] pomodoro has joined the channel [17:12] ardcore has joined the channel [17:13] micheil: ryah: hmm.. I still need to some how concat two buffers. [17:13] micheil: I have one for the headers, and one for the payload [17:14] micheil: and it seems wrong to write 2-10 bits to the network, then write the frame payload. [17:14] micheil: (header is at about a maximum of 10 bits [17:14] coreb: someone's having ffuu moments, I see [17:15] micheil: coreb: yeah :/ [17:16] beawesomeinstead has joined the channel [17:16] micheil: I'm pretty sick of people telling me to use socket.io for websockets when socket.io really sucks hard for websockets. [17:17] ardcore has left the channel [17:18] Silks has joined the channel [17:18] coreb: what was the reason for firefox ffuuing out websockets? [17:19] kriszyp has joined the channel [17:19] micheil: March 16, 2010 - socket.io started [17:19] micheil: April 13, 2010 - node-websocket-server started. [17:20] micheil: reason I started node-websocket-server? Because every other websocket implementation for node did not and still does not comply to specification or is not highly performant. [17:21] Lagnus has joined the channel [17:21] ryah: we should dlopen openssl instead of compile time linking it [17:21] horofox has joined the channel [17:22] micheil: coreb: the reason for firefox disabling websockets was two parted, a) due to the "security" hole proved via flash and java, and b) to ensure that there weren't as many different versions of the protocol in the wild. [17:22] micheil: ryah: I'm actually almost tempted to write node-websocket-protocol in C just for better performance. Not sure whether it's worth it really. [17:22] MattJ has joined the channel [17:23] micheil: ryah: thoughts on what I said about concating a maximum of 10 octets plus N octets? [17:24] hij1nx has joined the channel [17:25] newy_ has joined the channel [17:26] sako has joined the channel [17:26] micheil: a frame with a binary payload, the payload should be a Buffer [17:26] micheil: as that's how we work with binary data in node. [17:26] micheil: but then I have the headers, and they also need to be a Buffer, as they are binary as well. [17:27] hdon has joined the channel [17:29] micheil: ryah: is it actually responsible to send the headers as one socket.write and the binary Buffer as another? [17:30] steph021 has joined the channel [17:30] steph021 has joined the channel [17:32] tfe_ has joined the channel [17:32] tfe_ has joined the channel [17:32] micheil: ryah: considering you said socket.write as large an amount as possible [17:33] bartt has joined the channel [17:39] newy_ has joined the channel [17:39] bshumate has joined the channel [17:39] bshumate has joined the channel [17:40] ryah: micheil: i have to go, sorry [17:40] ryah: copying 10 bytes is not slow :) [17:41] fumanchu182 has joined the channel [17:42] some1else_ has joined the channel [17:42] micheil: but it's concat 10bytes plus something [17:42] micheil: not the other way around [17:42] perezd: trying to setup node locally so I can patch it, finding I can't figure out how to run waf [17:42] perezd: I get this error: Waf: The wscript in is unreadable [17:42] micheil: that's the issue. [17:42] perezd: must be doing something dumb... [17:43] sivy has joined the channel [17:43] micheil: headers + payload [17:43] micheil: headers = 2 to 10 bytes [17:43] micheil: payload = N bytes [17:43] jakehow has joined the channel [17:43] raidfive has joined the channel [17:46] Croms: Is there anybody here who uses external flat json files as their main key-value store / database? [17:46] sako: Please add /usr/local/lib/node to your NODE_PATH environment variable to have node libraries picked up. [17:46] sako: are there any libraries i would need in there? i see wafadmin? [17:47] sako: not really sure what that is.. [17:47] mikeal has joined the channel [17:47] perezd: sako: just add the node executable, yeah? [17:47] perezd: so you can run it [17:48] sako: i can already run node, it is in my path... but wasnt sure what exactly the NODE_PATH and the above is for.. [17:48] perezd: not sure you need it [17:51] raidfive has joined the channel [17:51] perezd: oh, i see what i was doing wrong [17:51] perezd: being too literal [17:52] sh1mmer has joined the channel [17:55] markc has joined the channel [17:56] liquidproof has joined the channel [17:57] piscisaureus has joined the channel [17:57] hellp has joined the channel [17:58] Croms: For the JSON aficionados; is this a good way of updating a value? https://github.com/dvennink/node-doodle/blob/master/handling-external-json-files/doodle.js [17:59] norviller has joined the channel [17:59] Croms: You will have to read the content of the entire file and write the entire file from scratch again. Feels a bit over-bloated to me to just update a single value. [18:00] rubydiamond: Friends..I want to write a simple IRC bot [18:00] rubydiamond: where can I get more info about it [18:01] hkeric has joined the channel [18:01] Kirklander has joined the channel [18:01] hkeric: ok i heard alot about node.js but i just cant figure out when and why i should use it... :z btw did you guys fix the windows port [18:02] piscisaureus has joined the channel [18:02] hij1nx has joined the channel [18:02] mythril has joined the channel [18:02] sako: hkeric: use it if you are from the future.. [18:03] hkeric: i stick to Comet and PHP :D ... for another month then i will join the future. [18:03] sako: just kidding, maybe look up some apps made with node.js.. also there are a lot of articles comparing node.js performance [18:03] mytrile has joined the channel [18:04] hkeric: Well i know node.js lets you basically write javascript without a browser... but is that the next solution instead of using Comet ? [18:04] hkeric: making node.js do the SQL checks and sending data to the user ... [18:04] hkeric: instead of pinging something_new.php each 5secs [18:06] sako: ya i dont even know how you would incorporate node.js with other language [18:06] sako: s [18:06] sag3 has joined the channel [18:07] Croms: rubydiamond: v8bot: https://github.com/eisd/v8bot [18:07] hkeric: so my users on my website could actually connect to a node.js server ? and listen for real-time commands, data.. ? [18:07] Lorentz has joined the channel [18:08] hkeric: im looking at some node.js chat examples but they only show the server code [18:08] zkirill has joined the channel [18:10] DTrejo has joined the channel [18:12] Yuffster has joined the channel [18:14] DTrejo has joined the channel [18:15] matschaffer has joined the channel [18:16] hkeric: montenigro off. [18:17] rworth: hkeric: see for example http://bit.ly/ii5OBh [18:18] hkeric: ^ [18:18] sag3 has joined the channel [18:19] hkeric: rworth: but where is the client i put inside my [18:19] hkeric: and which one is the server - ? [18:19] Croms: v8 "*high five*" [18:19] v8bot: Croms: v8 is no longer supported (except in PM). Try v8: or v8> [18:19] rworth: hkeric: for that see /demo/web [18:20] Croms: meh [18:20] hkeric: perfect. got it. [18:20] Croms: disrespecting a brother like that [18:20] kriszyp has joined the channel [18:21] bingomanatee: v8: var n = function(){n();}; [18:21] v8bot: bingomanatee: undefined [18:22] bingomanatee: var n = function(x){return x + n(x + 1);}; n(0); [18:23] bingomanatee: v8: var n = function(x){return x + n(x + 1);}; n(0); [18:23] v8bot: bingomanatee: RangeError: Maximum call stack size exceeded [18:23] bingomanatee: lazy v8bot. [18:23] ncb000gt has joined the channel [18:24] ncb000gt: dekz: ping [18:24] pdelgallego has joined the channel [18:25] jbergstroem has joined the channel [18:28] JJMalina has joined the channel [18:30] jbergstroem has joined the channel [18:31] patcito has joined the channel [18:32] suckerpunch has joined the channel [18:33] heavysixer has joined the channel [18:38] frodenius has joined the channel [18:39] skiz has joined the channel [18:42] kriszyp has joined the channel [18:42] mscdex: rubydiamond: i use node-irc [18:42] mytrile has joined the channel [18:44] coreb has joined the channel [18:46] liquidproof_ has joined the channel [18:52] perezd: anyone around? [18:53] ab has joined the channel [18:53] jrbaldwin has joined the channel [18:53] suckerpunch has joined the channel [18:54] mscdex: perezd: yep [18:54] perezd: mscdex: do you commit to Nodejs proper? [18:54] mscdex: i submit patches from time to time... [18:56] ab has left the channel [18:58] jiggliemon has joined the channel [18:58] suckerpunch has joined the channel [18:58] perezd: can I pm you? [18:59] perezd: mscdex: are you familiar with the TLS/HTTPS bug with callbacks on end not happening and the occassion socket explosion [19:00] perezd: its a bug in 0.4.5, but appears to be fixed in 0.5.0-pre [19:01] ncb000gt: perezd: i'm not really familiar with it, but, what's your question? [19:02] perezd: just wondering what the story is [19:02] perezd: https://gist.github.com/911661 [19:02] perezd: I have this test case I've written that illustrates a serious bug in HTTPS [19:02] perezd: but it appears to be fixed in 0.5.0 [19:02] perezd: so its been found, just wanted to hear about how it was fixed/identified [19:02] indiefan2a has joined the channel [19:03] ncb000gt: perezd: https://github.com/joyent/node/issuesearch?state=open&q=https#issue/728 [19:03] ncb000gt: ? [19:03] ncb000gt: that one [19:04] patzak has joined the channel [19:05] jiggliemon: anyone familiar with less.js intimately? [19:05] ryah: micheil: copying an unknown number of bytes is slow [19:05] perezd: ncb000gt: i don't think thats it [19:05] micheil: it only takes 2900 microseconds for a massive amount. [19:05] perezd: ncb000gt: I get them firing [19:05] micheil: ryah: I have no other options, really. [19:06] jiggliemon: im looking to concatenate a string w/ less.js https://gist.github.com/911664 [19:06] micheil: I don't want to be wasteful and just write like 10 bytes to the socket then hammer it with say 10,000 bytes [19:06] micheil: I'd rather just do it all at once [19:07] ryah: micheil: it's faster to call socket.write() twice [19:07] micheil: hmm.. [19:07] micheil: so, for all binary data over websockets, I'd emit to data events. [19:07] micheil: *two [19:07] ryah: copying an unbounded number of bytes is really bad [19:08] ncb000gt: perezd: have you tried removing cradle from the pipeline to see if it's a module issue? [19:08] micheil: ryah: https://gist.github.com/ed30b720ccb0162521a8 [19:08] perezd: i haven't really, but if you read the cradle code, its just calling https [19:08] micheil: currently I'm just returning it [19:08] perezd: ncb000gt: its really nothing to do with cradle, its no where involved [19:08] micheil: see line 164 [19:08] micheil: that's the copy right there. [19:09] cronopio has joined the channel [19:10] ryah: micheil: two writes doesn't mean two data events on the other side [19:10] ryah: necessarally [19:10] micheil: okay, fair enough [19:10] micheil: so, it's safe for me to pipe two data events to a net.Socket? [19:10] ncb000gt: perezd: are the acct creds accurate? [19:10] ncb000gt: for testing purposes? [19:10] ryah: micheil: yes [19:11] ncb000gt: i'm trying to run it locally (obviously the file is not found). [19:11] micheil: ryah: essentially I want to be able to have the formatter pipable to a net.Socket [19:11] perezd: ncb000gt: yes, you can use it [19:11] perezd: ncb000gt: its just a free cloudant account [19:11] coreb: I'm guessing that a write doesn't necessarily lead to a flush [19:11] ncb000gt: ok [19:11] ncb000gt: just making sure i wouldn't clobber anything [19:11] micheil: so, the interface I'm using is data events, where the single argument is a Buffer [19:11] ncb000gt: :) [19:13] robertkeizer: Ho hum. Hello everyone. [19:13] hij1nx has joined the channel [19:13] ncb000gt: fear my spam: [19:13] ncb000gt: ➜ 911661 git:(master) ✗ node nodehttpsfail.js [19:13] ncb000gt: created. [19:13] ncb000gt: attached. [19:13] ncb000gt: ➜ 911661 git:(master) ✗ node --version [19:13] ncb000gt: v0.4.5 [19:13] ncb000gt: perezd: that worked for me [19:13] ncb000gt: ... [19:14] perezd: ncb000gt: what did it print [19:14] jiggliemon: $seen cloudhead [19:14] ncb000gt: ^ [19:14] mscdex: perezd: i'm not familiar with the bug, sorry [19:14] hornairs has joined the channel [19:14] perezd: ncb000gt: oh, okay, did u run as HTTP? [19:14] perezd: try the commented out connection [19:14] perezd: run as HTTPS [19:14] ncb000gt: perezd: i ran as both [19:15] ncb000gt: and both worked [19:16] c4milo1 has joined the channel [19:16] xsyn has joined the channel [19:17] sh1mmer has joined the channel [19:17] robertkeizer: Has anyone written a small code snippet to be able to write to /proc/sys yet? Standard file system module gets bad file descriptors - I figure stream piping should work though. [19:19] akashiraffee: robertkeizer: huh. You could always write some kind of simple external prog, i guess that is stream to stdin of a process. [19:19] Spion__ has joined the channel [19:20] skiz has joined the channel [19:20] sveimac has joined the channel [19:20] some1else has joined the channel [19:21] perezd: anyone running 0.4.5 on a mac? [19:21] DoNaLd`: yes [19:21] c4milo1: perezd: yes [19:21] perezd: c4milo1: [19:21] perezd: can you run my test? [19:21] indiefan2a: anyone here pretty familiar withe the node-amqp module? [19:21] kriszyp has joined the channel [19:22] polyrhythmic has joined the channel [19:23] akashiraffee has left the channel [19:24] mikeal has joined the channel [19:24] perezd: anyone with mac version of node 0.4.5 who can test a bug for me? [19:25] robertkeizer: akashiraffeee: Yeah, just a simple writable stream works, but fs.write doesn't because of file descriptors.. [19:25] micheil: ryah: see the Documentation talk at codeconf? [19:25] ryah: micheil: no [19:26] micheil: oh, that's because it's at 2.45 duh..>_> [19:26] micheil: I've read the slides already, but I agree with what he's saying in his talk. [19:28] gazumps has joined the channel [19:29] pc1oad1etter has joined the channel [19:30] some1else has joined the channel [19:30] stonebranch has joined the channel [19:30] JJMalina has joined the channel [19:30] cloudhead2 has joined the channel [19:31] indiefan2a: anyone by chance know why direct exchanges declared via node-amqp would be different than direct exchanges declared in other language libraries using the same flags (durable)? i get a cannot redeclare with different options, even though the options are the same, and when i list_exchanges, some show up under a "direct" heading, while node.js's don't, but they still list as type 'direct' [19:32] pc1oad1etter: I think I'm doing something wrong with NPM. First time user here -- When i try to run a particular sample application I get a "Cannot find module" error. [19:33] pc1oad1etter: I did an npm link on that package's folder, though. and i see it in npm ls -- though it has an unmet dependency on jsgi [19:33] pc1oad1etter: I did an npm install on that, but it did not fix the problem. [19:33] ncb000gt: micheil: what is he saying? [19:33] ncb000gt: i haven't seen anything about it [19:33] Booths has joined the channel [19:33] pc1oad1etter: Any suggestions? [19:33] micheil: ncb000gt: see my twitter stream for the slides. [19:33] ncb000gt: micheil: also, link? [19:33] ncb000gt: ahh cool [19:33] ncb000gt: thanks [19:34] pc1oad1etter: log: http://pastebin.mozilla.org/1200568 [19:34] cloudhea1_ has joined the channel [19:34] cloudhea1 has joined the channel [19:36] ncb000gt: pc1oad1etter: looks like it's looking for goo [19:36] ncb000gt: whatever that is [19:37] pc1oad1etter: ncb000gt: Yep. I've downloaded it and did an npm link to it. [19:38] ncb000gt: pc1oad1etter: which version of npm are you using? [19:39] ncb000gt: a 1.0 rc? [19:39] pc1oad1etter: 1.0.1rc7 [19:39] dgathright has joined the channel [19:39] ncb000gt: try npm link -g [19:39] mhooker: how have people done object caching with node? I'm looking for inspiration, in terms of patterns [19:39] WRAz has joined the channel [19:40] mhooker: I've got a list of eventemitters, and it would be nice if there were some idioms around caching certain of their events [19:40] pc1oad1etter: ncb000gt: "Error: link should never be --global." [19:40] ncb000gt: pc1oad1etter: :) there you have it [19:40] ncb000gt: it's not linking globally [19:40] ncb000gt: just install it globally [19:41] ncb000gt: and if you make changes to it then reinstall it globally [19:41] abraham has joined the channel [19:42] maushu_ has joined the channel [19:43] some1else has joined the channel [19:46] m64253 has joined the channel [19:47] robbimac_ has joined the channel [19:48] robbimac_ has left the channel [19:50] ncb000gt: micheil: good set of slides there. i need to work on the docs for my projects. :) [19:50] micheil: ncb000gt: same, and I need to eventually work on the node.js ones [19:50] ncb000gt: micheil: yea, we all do [19:50] ncb000gt: :) [19:50] micheil: ncb000gt: watch out with @coda's slides though. they'll crash preview.app. [19:51] ncb000gt: haha [19:51] ncb000gt: good thing i run linux [19:51] ncb000gt: also, you trusted coda? [19:51] ncb000gt: first mistake [19:51] micheil: lol, what can I say? [19:51] ncb000gt: heh [19:51] micheil: he's just successfully crashed preview.app, and now safari. [19:52] ncb000gt: haha [19:55] jesusabdullah: I just noticed the topic of this channel [19:55] jesusabdullah: XD [19:55] yozgrahame has joined the channel [19:56] ji0n has joined the channel [19:56] pc1oad1etter: How is it possible to have an unmet dependency when the dependency is listed as installed? http://pastebin.mozilla.org/1200575 [19:58] pc1oad1etter: Hrm. installed again and that message went away. [19:58] jesusabdullah: Oh good [19:58] jesusabdullah: I was wtf-ing myself [19:58] pc1oad1etter: Still not able to find the 'goo' module but that's one less error. [20:03] burny has joined the channel [20:04] jimt has joined the channel [20:06] jrbaldwin has joined the channel [20:07] hij1nx has joined the channel [20:08] hkjels has joined the channel [20:08] flippyhead has joined the channel [20:09] hkjels: How do I use a variable within a selectorname in stylus? [20:09] ncb000gt: pc1oad1etter: how are you trying to load it? [20:09] jtsnow has joined the channel [20:10] mscdex: haha i love some of the comments in these RFCs sometimes... [20:10] mscdex: "Years in the tenth century, and earlier, cannot be expressed. This is not [20:10] mscdex: considered a serious defect of the protocol." [20:10] abraham has joined the channel [20:10] mscdex: :-D [20:10] heythisisdave has joined the channel [20:11] mscdex: this is in regards to last modified dates for files [20:11] mscdex: heh [20:11] hornairs has joined the channel [20:13] gilesgoatboy has joined the channel [20:14] jrbaldwin has joined the channel [20:14] ncb000gt: mscdex: huge oversight... [20:14] ncb000gt: <.< [20:14] ncb000gt: :) [20:16] mike_miller has joined the channel [20:16] DTrejo has joined the channel [20:16] ralphholzmann: Anyone have any tips on where to begin after receiving "FATAL ERROR: JS Allocation failed - process out of memory" ? [20:17] ralphholzmann: im stress testing my appp [20:17] ralphholzmann: processing 20mb files at a time [20:17] ralphholzmann: after the third one, I get that [20:17] ralphholzmann: Perhaps the garbage collector isn't quick enough [20:17] micheil: streams. [20:17] ralphholzmann: is there a way to explicitly free a buffer ? [20:17] micheil: you're storing too much in memory. [20:18] micheil: delete buffer should work [20:18] ralphholzmann: var someBuf = new Buffer( blah ); / ... lots of work ... / delete someBuf; ? [20:18] pquerna: so [20:19] pquerna: jetienne, was asking about spdy [20:19] warz has joined the channel [20:19] pquerna: i think it would be neat for node, but what I really want is a spdy -> http reverse proxy (as a project) [20:21] micheil: pquerna: it'd probably require a C based parser, no? [20:21] marcello3d has joined the channel [20:21] micheil: pquerna: also, any thoughts on gather metrics from things (looks at cloudkick a bit) [20:21] cloudhead_ has joined the channel [20:21] cloudhead has joined the channel [20:21] JimBastard has joined the channel [20:22] ncb000gt: https://github.com/3rd-Eden/node-SPDY [20:22] ncb000gt: ? [20:22] JimBastard: reporting in from the nyu hackathon [20:22] JimBastard: representing node [20:22] ncb000gt: hey Jim [20:22] ncb000gt: B [20:22] hkeric: oh no node is doomed [20:22] ncb000gt: to the astard [20:22] hkeric: :( [20:22] marcello3d: are there any good nyc node.js meetup groups or whatever? [20:23] ncb000gt: Also, yea, that module doesn't have anything in it [20:23] ncb000gt: heh [20:23] ncb000gt: i thought it did [20:23] pquerna: micheil: about collecting metrics in general, or about getting them from node.js things? [20:23] ncb000gt: but i was thinking of a different module [20:23] micheil: pquerna: in general, I've been playing with graphite, but looking for other solutions [20:24] pquerna: micheil: reconnoiter is what our stack is loosely based on for the collection of data side [20:24] pquerna: micheil: but our analyis and data stuff doesn't look very much like reconnoiter anymore [20:24] ncb000gt: pquerna: sorry, this is what i was thinking of https://github.com/kuno/node-spdy [20:24] ncb000gt: i believe etsy is using it [20:24] marcello3d: are there any spdy browsers? [20:24] marcello3d: does chrome use it? [20:25] pquerna: yes [20:25] micheil: pquerna: hmm, I'm wanting something that I can query against in realtime [20:25] marcello3d: how does chrome decide whether to use it or not? [20:25] marcello3d: accept-encoding? [20:25] micheil: and something that I can push metrics to via UDP [20:25] pquerna: micheil: well, so reconnoiter's default store is in postgres [20:25] pquerna: micheil: so, you can pull date out easily [20:26] pquerna: and it can pump that data over AMQP if you want to do other things with it [20:26] micheil: pquerna: I'm mainly after realtime metrics [20:26] pquerna: ah [20:26] marcello3d: https://github.com/kuno/node-spdy looks empty [20:26] ncb000gt: marcello3d: there is c code [20:26] pquerna: I'm not sure much really exists yet in the open source world for that kind of thing. [20:26] marcello3d: that says hello world? [20:26] micheil: pquerna: N number of namespaces, most metrics being things based on either time or dec/inr [20:26] pquerna: FlumeBase is pretty interesting, but very young. [20:26] marcello3d: https://github.com/kuno/node-spdy/blob/master/deps/spdy_parser/spdy_parser.cc [20:27] ncb000gt: marcello3d: hmm [20:27] marcello3d: and it seems to have its own http parser [20:27] pquerna: micheil: with Flume you could make a udp listener, push into it [20:27] marcello3d: which is kind of silly for node? [20:27] pquerna: micheil: and then do the real-time queries with flumebase [20:27] micheil: pquerna: hmm, okay [20:27] pquerna: but it was released last week [20:27] pquerna: we do similiar things, but our stackis built on top of ESPER [20:28] micheil: pquerna: reason for UDP is because I don't want my metrics to have much impact on my application [20:28] pquerna: right [20:28] micheil: pquerna: ESPER? [20:28] pquerna: http://esper.codehaus.org/ [20:28] pquerna: its like SQL over an event stream :) [20:28] ncb000gt: marcello3d: yea it does, doesn't it :) [20:28] micheil: pquerna: hmm.. [20:28] perlmonkey2 has joined the channel [20:29] marcello3d: wonder what the relationship between websockets and spdy is [20:29] marcello3d: if websockets can sit on top of spdy [20:29] pquerna: micheil: esper itself doesnt know about any transports etc; You must pump data into it however you want, you parse it into some kind of event structure, and then it evals the queries and can emit an event if something triggers [20:29] micheil: pquerna: is ESPER a stand-alone server? [20:29] pquerna: its more a library for the core-query-language [20:30] pquerna: flumebase is a more complete picture, but much less mature [20:30] micheil: marcello3d: yeah, there's work being done by chromium on websockets over spdy, not sure on the details though [20:30] marcello3d: kind of ironic, it sounds like with SPDY, multi-plexing static files over multiple domains will actually hurt you (unless they're the same IP) [20:30] pquerna: marcello3d: yeah, lemme find the chrome url [20:30] marcello3d: (from what I'm reading on http://dev.chromium.org/spdy/spdy-whitepaper ) [20:31] pquerna: marcello3d: chrome://net-internals/#spdy [20:31] heythisisdave has joined the channel [20:31] pquerna: marcello3d: if you are on a ssl-site on google, you should see them [20:31] marcello3d: oh interesting [20:31] marcello3d: yea, I see it for google docs [20:31] pquerna: marcello3d: and iirc, google is enabling it via next-protocol flag inside SSL itself. [20:32] marcello3d: interesting, so only in SSL? [20:32] pquerna: yea, right now at least [20:32] marcello3d: that net-internals thing is kinda interesting [20:32] pquerna: if they ever try to get it past IETF/etc I bet they will spec a non-ssl version [20:32] pquerna: but google hasn't been that interested in even trying that [20:33] marcello3d: the web needs more ssl anyway [20:33] marcello3d: it's so cheap these days [20:33] marcello3d: sounds like spdy would mitigate most of the overhead connection costs of ssl anyway [20:33] pquerna: well, it kills intermediaries [20:33] pquerna: caching proxies, etc [20:34] pquerna: although less used in the us/western europe, caching proxies are still important for many more bandwidth constrained areas [20:34] max_dev has joined the channel [20:34] pquerna: and not all of us can have 100 datacenters around the world to reduce latency [20:34] marcello3d: spdy or ssl? [20:35] pquerna: (but spdy helps there in general, but not having caching proxies will hurt) [20:35] pquerna: ssl in general [20:35] V1: ncb000gt: implementing SPDY in node is uttrly crap to pull off as you need to have proper SSL zlib bindings [20:35] marcello3d: hmmm [20:35] pquerna: V1: how so? [20:35] jiggliemon has joined the channel [20:35] V1: the headers from spdy are compressed using zlib [20:35] marcello3d: I guess having unencrypted signed http requests [20:35] jepo has joined the channel [20:35] marcello3d: is what we really need [20:35] pquerna: meh, thats... complicated. [20:36] brianloveswords has joined the channel [20:36] marcello3d: because a lot of stuff doesn't actually need to be encrypted, but authenticity is nice [20:36] marcello3d: cookies should be encrypted [20:36] marcello3d: proxies shouldn't know that [20:36] pquerna: really just need http 2.0.. and roy has a kid now so.... [20:36] ncb000gt: V1: gotcha, i haven't looked much at it, i was also mistaken about etsy using it (confused the tech being used) [20:36] marcello3d: http 2.0 will never happen [20:36] marcello3d: you need something backwards compatible [20:36] hkeric: Isnt google working on a new protocol [20:36] pquerna: called spdy [20:36] marcello3d: probably [20:37] marcello3d: spdy doesn't replace http though [20:37] pquerna: not yet [20:37] pquerna: but when 30% of your users have it [20:37] pquerna: maybe its worth adding [20:37] yozgrahame has joined the channel [20:37] pquerna: then servers have it [20:37] marcello3d: well [20:37] pquerna: then firefox has it [20:37] Aria has joined the channel [20:37] pquerna: and then we call it http 2.0 [20:37] marcello3d: you can implement spdy without changing your server [20:37] marcello3d: you can support both [20:37] pquerna: yes [20:37] marcello3d: it's just your apache/etc layer that needs to be updated [20:38] jarek has joined the channel [20:38] jarek has joined the channel [20:38] pquerna: so a good c library would be nice [20:38] V1: I already had attempted to create SPDY for node, that was for node 0.2 but that was when SSL sucked to much, so I canceled the project :p [20:38] marcello3d: does ssl still suck? [20:38] V1: thats the main reason why my node-spdy repo is empty.. [20:38] pquerna: no [20:38] jiggliemon has left the channel [20:38] pquerna: if you can make it stall, tell us [20:38] marcello3d: V1: are you `kuno`? [20:38] pquerna: make noise [20:39] V1: SSL is getting better and better in node.. I works, but it's not `awesome` yet [20:39] marcello3d: I haven't played with ssl on node [20:39] V1: marcello3d: I'm 3rdEden [20:39] marcello3d: still in early stage development :) [20:39] V1: @github [20:39] jjmalina has joined the channel [20:39] marcello3d: four oh four? [20:39] ncb000gt: Aha! [20:39] ncb000gt: :) [20:39] ncb000gt: 3rd-Eden [20:40] V1: The biggest downside at this point is that SPDY uses compressed headers, and zlib compression / decompression is blocking. [20:40] marcello3d: why is it blocking? [20:40] V1: So each connection that is made using SPDY to node, will block the process [20:40] V1: There are no async bindings :) [20:40] marcello3d: and why would you want it not blocking? [20:40] marcello3d: it's computation, not io, right? [20:40] V1: Because node uses a single event loop? [20:41] marcello3d: right? [20:41] V1: You don't want the main event loop to be blocking, you want to have high concurrency.. [20:41] pquerna: mm? [20:41] marcello3d: but it's pure CPU [20:41] marcello3d: you don't have a choice [20:41] pquerna: zlib decompression is pure cpu, its not blocking for _that_ long [20:41] pquerna: not for those kinds of small pieces of data [20:41] timcosgrove has joined the channel [20:42] marcello3d: it'd be slower to spin off a separate thread for it [20:42] marcello3d: in a high-cpu situation you'll want to run multiple nodes (you probably want to regardless) [20:42] marcello3d: or some kind of node worker pool [20:42] pquerna: anyways, with spdy i'd go functional before performance [20:42] pquerna: there isn't an ab equiv to benchmark it yet [20:42] pquerna: so like, no one is going to tweet about it being slow [20:43] marcello3d: yea [20:43] jjmalina has joined the channel [20:43] marcello3d: speaking of zlib, what libraries do people use for that? [20:43] pquerna: zlib [20:43] marcello3d: node compress is kinda crappy [20:43] pquerna: oh, node libraries :) [20:43] marcello3d: :) [20:43] pquerna: we could write one today [20:44] V1: pquerna: Yes you are aright, decompressing the header isn't that much of a deal. But you would also want to compress the body as you want to have an optimized data connections ( which is the main reason why you would want to have SPDY support i guess [20:44] pquerna: ryah has incdicated he wants one in the core multiple times [20:44] pquerna: and its already linked in via openssl [20:44] marcello3d: I've been using this one, but it doesn't support raw deflate [20:44] marcello3d: https://github.com/egorich239/node-compress [20:44] V1: Having a proper binding would be great pquerna [20:44] marcello3d: only gzip header'ed zlib [20:45] jetienne has joined the channel [20:45] pquerna: jetienne: ah, you missed all the spdy talk [20:45] marcello3d: the fork network on that node-compress library is ridiculous though [20:45] perezd has joined the channel [20:45] jetienne: pquerna: doh [20:45] V1: marcello3d: thats because the library is .. rather crapy :p [20:46] jetienne: pquerna: any plan to put it in node ? [20:46] marcello3d: pquerna: what's your relationship to node.js? [20:46] V1: jetienne: I would say, userland first than consider it for core when all the bugs are ironed out [20:47] jetienne: V1: node is all userland [20:47] marcello3d: spdy support in core node.js doesn't really make sense until there's more support/demand, imo [20:47] timcosgrove has left the channel [20:47] micheil: marcello3d: pquerna would be considered one of the core node.js developers [20:47] jetienne: but i understand the concept :) [20:47] micheil: or core contributors [20:47] jetienne: marcello3d: http is key in node. spdy is fast http [20:48] marcello3d: jetienne: but spdy isn't even remotely standardized/finalized [20:48] pquerna: damn, i was going to answer damsel in distress [20:48] pquerna: i don't think spdy in core makes sense yet [20:48] jetienne: marcello3d: same for websocket. and still it is a big thing of node [20:48] marcello3d: if anything, google should be sponsoring such a project [20:48] Aria has joined the channel [20:48] micheil: it's been mandated by ryah that websockets won't be in core. [20:48] pquerna: i think having a good/popular spdy library would be nice [20:49] marcello3d: http://hacks.mozilla.org/2010/12/websockets-disabled-in-firefox-4/ <- what about this? [20:49] pquerna: for all we know, google could kill spdy in 3 months [20:49] micheil: until then, I'm working on writing the best parser / generator for them. [20:49] pquerna: or rewrite half the spec [20:49] jetienne: for me websocket are in node-libs, because it is a seriously coded lib, well maintained [20:49] micheil: marcello3d: blog.pusherapp.com/2010/12/9/it-s-not-websockets-it-s-your-broken-proxy [20:49] V1: pquerna: the latest draft seems to be rather stable tbh [20:49] micheil: marcello3d: http://blog.pusherapp.com/2010/12/9/it-s-not-websockets-it-s-your-broken-proxy [20:49] jrbaldwin has joined the channel [20:49] ckknight: DTrejo: hey, I saw json-streamify and was wondering: since it's synchronous rather than async, what's the real benefit of it over JSON.stringify? [20:49] jetienne: marcello3d: this is a proof it isnt standard [20:49] pquerna: V1: they have said multiple times on the list they are rev'ing the version 2 draft, the've just not finished it yet [20:50] micheil: jetienne: which lib are you talking about? [20:50] Micfire: lol, I was just reading about SPDY and thought asking that is anybody doing SPDY with Node :D [20:50] matjas has joined the channel [20:50] pquerna: (they have said those changes will be _minor_, but still, its not a final spec) [20:50] Jamool has joined the channel [20:50] jetienne: micheil: node-libs... the missing project. all languages got lib. python/ruby/perl this is needed for stability and documentation [20:51] ncb000gt: ckknight: the purpose of the lib was to be able toe process a large json that was causing him to run out of available memory [20:51] jetienne: micheil: im pushing for a official lib for almost a year :) [20:51] micheil: jetienne: not sure I get you.. [20:51] ckknight: ncb000gt: okay, makes sense, then :) [20:51] pquerna: i'd just frame it this way, websockets isn't good in core yet, because no one is sure it will be there in 5 years yet. HTTP will be there in 5 years, hashing will be there in 5 years, TLS, process management, etc. [20:51] ncb000gt: ckknight: it would be better if it were async [20:51] ncb000gt: :) [20:51] micheil: jetienne: I'm currently working on node-websocket-protocol, which will be a streaming protocol implementation [20:51] jetienne: micheil: many things in ruby/python/perl arent done with their core... it is done with all the libs provided with them [20:52] ckknight: yeah, it seems like if it implemented a pull API rather than a push, it could be very useful for some things. [20:52] jetienne: micheil: node doesnt have that... this is the "missing part" [20:52] V1: I would say, once the websocket spec has been finalized and supported in IE and firefox, it would be ready for node js core.. [20:52] jetienne: micheil: ok... but why are you telling me that ? [20:52] micheil: jetienne: so what, you want to have a set of libraries bundled with node that are the missing parts? [20:52] marcello3d: jetienne: but in those cases, ruby/python/perl are the LANGUAGES [20:53] marcello3d: jetienne: node.js is a library of sorts on top of JS already [20:53] jetienne: marcello3d: cool that you know that. [20:53] Lorentz has joined the channel [20:53] jetienne: marcello3d: js is a langage too, what is your point [20:53] micheil: jetienne: I'm just curious about what people want regarding websockets. [20:53] marcello3d: node.js isn't a language [20:53] jetienne: marcello3d: sure [20:53] marcello3d: that's all. [20:54] jetienne: micheil: about websocket, i want them to be suppported [20:54] jetienne: micheil: currently websocket is badly supported in browser [20:54] micheil: actually, they are that badly supported. [20:54] jetienne: micheil: so socket.io is the workaround. the actual websocket protocol where it is shipped ? in a separate package or with node itself ? i dont think this is important [20:54] micheil: chrome + chromium still support websockets, as does safari [20:55] jetienne: micheil: because who will do only websocket ? nobody. we all do socket.io [20:55] Micfire: just use socket.io and be done with it :D [20:55] pquerna: +1 socket.io <3 [20:55] jetienne: micheil: so anyway an external package is needed [20:55] marcello3d: socket.io feels a bit bloated to me [20:55] micheil: jetienne: I do just plain websockets. [20:55] jetienne: micheil: you :) [20:55] jetienne: marcello3d: super [20:55] micheil: pusherapp.com do plain websockets (with a flash library client side as a fallback) [20:56] jetienne: micheil: serious ? [20:56] micheil: yes [20:56] jetienne: micheil: what do they do with all the other browsers ? [20:56] micheil: flash. [20:56] jetienne: no support ? only chrome ok ? [20:56] jetienne: ah ok [20:56] Micfire: micheil: how does that work with let's say mobile browsers without websockets? [20:56] jetienne: so they do socket.io [20:56] micheil: jetienne: it works fairly well. [20:56] jetienne: micheil: socketio :) [20:56] V1: not every browser suports flash.. That's the main reason why Socket.IO has allot of fallbacks [20:56] yozgrahame has joined the channel [20:56] jetienne: micheil: i dont really care about the implementation [20:56] micheil: Micfire: mobile browsers without websockets, well, we can live with that for now. [20:56] jetienne: micheil: i just want the concept to work [20:57] marcello3d: which mobile browsers have websockets? [20:57] jetienne: micheil: websocket to flash socket got good latency [20:57] micheil: V1: look at the majority of consumer computers, 99% will have flash installed. [20:57] jetienne: marcello3d: no and only 10% of browser got it on desktop [20:57] Micfire: marcello3d: 4.3 MobileSafari? [20:57] Micfire: or was it webworkers [20:57] Micfire: damn, can't remember which one was it :) [20:57] V1: micheil: Sure, most of them have flash installed, but not the correct version.. You need to have 10.0.0 + [20:57] jetienne: ok about that, lets talk about spdy more [20:57] micheil: Micfire: I can find out for you, if you want? [20:57] marcello3d: https://secure.wikimedia.org/wikipedia/en/wiki/WebSockets#Browsers_supporting_WebSocket [20:57] jetienne: who is about to code this ? [20:58] marcello3d: iOS 4.2 supposedly [20:58] marcello3d: wonder if android supports it [20:58] micheil: marcello3d: https://github.com/miksago/node-websocket-server/wiki/Browser-Support [20:58] marcello3d: if someone has an android device: http://websocketstest.com/ [20:58] V1: jetienne: I'm gonna pick up when I left with node-spdy once there is a proper zlib binding [20:59] marcello3d: micheil: that doesn't specify mobile browsers though [20:59] jetienne: V1: this would be great. would make node.js on the edge of network tech. like websocket, it was one of the first [21:00] marcello3d: zlib should really be part of node core [21:00] jetienne: marcello3d: no [21:00] micheil: marcello3d: I'll try and get people I know to update it. [21:00] jetienne: ACTION is determined to kill all silly discussion :) [21:00] marcello3d: jetienne: according to pquerna, it's already linked in [21:00] jetienne: marcello3d: no [21:00] V1: proper compression / decompression support in node is a must [21:01] jetienne: ok i stop :) [21:01] marcello3d: java has it built in, why not node.js :D :D :D [21:01] marcello3d: best argument ever. [21:01] V1: sending uncompressed data is just a waste of bandwidth.. [21:01] marcello3d: yea [21:01] jetienne: http for 3 compressions i think [21:01] jepo has joined the channel [21:01] jetienne: 2 gzip and another one [21:02] zkirill has joined the channel [21:02] marcello3d: you're missing words in your sentences [21:02] jetienne: deflate with the wrong name... poetry :) [21:02] V1: jetienne: gzip, raw deflate and zlib support is all that is needed [21:02] bradleymeck has joined the channel [21:02] marcello3d: http://en.wikipedia.org/wiki/HTTP_compression#Content-coding_tokens [21:04] jetienne: https://github.com/jeromeetienne/neoip/blob/master/src/neoip_compress/impl/deflate/neoip_compress_deflate.cpp#L74 mouamouamoua [21:04] jetienne: i found it back :) [21:04] jetienne: https://github.com/jeromeetienne/neoip/blob/master/src/neoip_compress/impl/deflate/neoip_compress_deflate.cpp#L40 <- for the silly details on deflate :) [21:05] bartek has joined the channel [21:05] Remoun has joined the channel [21:05] jetienne: my p2p support http deflate so nodejs should! :) [21:05] mike_miller has joined the channel [21:05] jetienne: ACTION is a bit excited because my webgl game is starting to look good :) [21:06] charlenopires has joined the channel [21:06] jetienne: going back to it :) [21:06] jetienne: have fun [21:08] jetienne has joined the channel [21:09] AAA_awright: Anyone know if any browsers support Efficient XML Interchange as a Content-encoding, or if that's even more efficent than other encodings? [21:13] tmedema has joined the channel [21:13] AAA_awright: jesusabdullah: You're into the plotting libraries, right? Do you know of any WebGL libraries for 3d plotting? [21:14] AAA_awright: Perhaps Node.js could get OpenGL-accelerated plotting :o [21:14] jesusabdullah: I don't know about WebGL, but I know of one that can do 3-d canvas plots [21:14] jesusabdullah: They're a bit unwieldy though. [21:14] AAA_awright: I was thinking for 3D parametric plots, with side projections and all [21:15] jesusabdullah: Sure [21:15] jesusabdullah: That'd be sweet [21:15] AAA_awright: But I don't know of anything like that [21:15] AAA_awright: Maybe you could have a Flash fallback [21:15] jesusabdullah: Makes me think: A paraview-ish program for the web would rock [21:15] AAA_awright: Interesting [21:16] jesusabdullah: http://www.canvasxpress.org/ [21:16] jesusabdullah: has the nice 3D plotting [21:16] jesusabdullah: but I used it for points [21:16] jesusabdullah: http://en.wikipedia.org/wiki/ParaView [21:16] jesusabdullah: That's a really common visualizer in the sciences. [21:16] jesusabdullah: Actually, i think the "legacy" Paraview format is more common than paraview itself, but, yeah [21:21] aleksey has joined the channel [21:26] fairwinds has joined the channel [21:26] DoubleV has joined the channel [21:30] sh1mmer has joined the channel [21:31] hvgotcodes: im using vows, (which is awesome btw). how do i get the process to exit at the end? it just keeps running [21:31] hvgotcodes: i have to ctrl+c it [21:32] fly-away has joined the channel [21:34] Aria: Got events outstanding? [21:35] AAA_awright: That's not Vows' fault, that's Node.js which is going to keep the event loop running while anything is listening [21:35] AAA_awright: hvgotcodes: If you have an HTTP server running, for instance, you need to chain on an additional test that ends that server [21:35] AAA_awright: Then Node.js will exit [21:36] hvgotcodes: AAA_awright: i have no node server running [21:36] AAA_awright: Well something is listening or hasn't been called [21:36] Stan____ has left the channel [21:37] dyer has joined the channel [21:37] dyer has joined the channel [21:38] hvgotcodes: my test is just verifying some browser js was ported correctly [21:38] hvgotcodes: so its literally just making sure i can instantiate some objects and call methods on them [21:38] hvgotcodes: AAA_awright: ^^ [21:39] willwhite has joined the channel [21:40] sako: node.js is pretty amazing lol [21:40] sako: been reading this tutorial all day... http://nodeguide.com/beginner.html and WOW [21:40] AAA_awright: idk... There's some pretty weird things that can happen [21:41] AAA_awright: hvgotcodes: Are you returning any values in your topics? Some returned values are treated as special [21:41] |sWORDs|: I'm having some trouble in using step.js with mysql, can anyone spot what I'm doing wrong? http://pastebin.com/kLTVQhda [21:43] AAA_awright: |sWORDs|: "Database.connect();" Where's the callback provided? [21:43] jesusabdullah: If you pull that out, |sWORDs|, I wouldn't be too surprised if it worked [21:43] asdfsafdsa has joined the channel [21:44] hvgotcodes: AAA_awright: yes [21:44] jesusabdullah: The only other thing I can think of is the meaning of "this" changing on you or something [21:44] |sWORDs|: AAA_awright: I thought that's a synchronous call, it works in the top one without waiting aswell [21:45] AAA_awright: |sWORDs|: That doesn't matter, how does Step know that? You have to call this(); [21:45] AAA_awright: |sWORDs|: Or rather, just merge it with the one below [21:45] AAA_awright: Step only breaks up asynchronous functions [21:46] |sWORDs|: From the step tuturial: "Then in the capitalize function we're doing synchronous work so we can simple return the new value and Step will route it as if we called the callback." So I might have to use return for a synchronous call without callback? [21:48] pdelgallego has joined the channel [21:49] |sWORDs|: And AAA_awright, tnx! I've been breaking my head over it all day (it's 23:49 here now) [21:49] AAA_awright: |sWORDs|: You know Node.js has some of the best debuggers I've ever seen [21:50] perezd: arg, this bug is killing me, try my damnedest to trace it out...I think this is a NodeJS/OS X issue [21:51] Rodtusker has joined the channel [21:51] |sWORDs|: I'm only used to program javascript on devices that have no debug at all, so the only thing I use as debug is console.log, Probably another thing I really need to look at. [21:52] joshthecoder has joined the channel [21:52] |sWORDs|: I'm pretty good at javascript, but the whole eventloop thing is making things a lot complicater. [21:52] jesusabdullah: You'll get used to it. [21:52] jesusabdullah: ^__^ [21:52] jesusabdullah: Truth be told, I debug with console.logs also [21:53] bingomanatee: I don't usually spam social links here but this is just TOO much fun not to share - http://seawitchery.tumblr.com/post/4070384205/i-started-out-clicking-strategically-and-by-the [21:53] SubStack: lumberjack! [21:53] |sWORDs|: jesusabdullah: Yeah I probably will, but for now I've decided to rewrite most code using step, because it's so hard to debug my spaghetti. ;) [21:54] saikat has joined the channel [21:54] tmedema: Is there any way to use an existing express http server to receive an incoming stream? I'm trying to properly handle a websocket or multipart file upload stream [21:54] hvgotcodes: it seems vows run takes a callback [21:54] hvgotcodes: can i just do process.exit(0) from it? [21:55] |sWORDs|: Anyway, of to bed for today and I'll have a fresh look tomorrow. [21:55] mike5w3c_ has joined the channel [21:57] mc_greeny has joined the channel [21:57] Aria: nice, bingomanatee [21:58] bingomanatee: Isn't it though? [21:58] jakehow has joined the channel [21:58] bingomanatee: it would be fun to Multiplayer with node. [21:59] abraham has joined the channel [22:00] perezd: cloudhead_: cloudhead_ yt? [22:00] Aria: Mmhm! [22:01] jetienne has left the channel [22:04] NuckingFuts has joined the channel [22:05] NuckingFuts: What IDE do you guys use? [22:05] wookiehangover has joined the channel [22:05] sorens3n: n++ [22:05] v8bot: sorens3n has given a beer to n. n now has 1 beers. [22:05] aho: komodo [22:05] NuckingFuts: I personally use Notepad++ too, but I've started to long for some more powerful features :/ [22:06] NuckingFuts: Namely better autocompletion [22:06] bingomanatee: Have you tried Notapad+++? [22:06] sh1mmer has joined the channel [22:06] bingomanatee: ACTION hasn't found too much in the way of node-friendly autocompletion. best to use your brain.  [22:07] wookiehangover: notepad lol [22:07] NuckingFuts: bingomanatee: Meh, I don't care it it's node-friendly, I just want something that'll autocomplete my own variables :/ [22:07] wookiehangover: vim OR NOTHING [22:07] NuckingFuts: wookiehangover: Vim is horrid [22:07] cloudhead: hvgotcodes: it depends how you're running your tests, but it should exit when everything is run [22:07] NuckingFuts: It makes my wanna puke whenever I use it [22:07] wookiehangover: ya, terrible editor [22:07] cloudhead: perezd: yea [22:07] wookiehangover: not powerful at all [22:07] perezd: cloudhead: I've been digging into that bug since last night [22:07] NuckingFuts: If I have to use a console editor, I use nano [22:08] Spion__ has joined the channel [22:08] NuckingFuts: But I'll take Notepad++ over that any day. [22:08] wookiehangover: gvim and mvim provide guis for you [22:08] perezd: I've got it down to a test case you can run yourself [22:08] bingomanatee: I wouldn't say vim is unpowerful -- it just defines user-unfriendliness. [22:08] perezd: cloudhead: https://gist.github.com/911661 [22:08] perezd: try that, flip between HTTP and HTTPS [22:08] perezd: and notice you do not see the console logs you should see [22:08] wookiehangover: it harkens back to a time where you have to learn how to use your editor [22:08] perezd: in HTTP, you'll see 2 console messages, in HTTPS, you see one. [22:09] perezd: however, they both succeed [22:09] ckknight: what do people recommend for restarting node during development? [22:09] wookiehangover: keep in mind you're programming, not writing a love letter [22:09] perezd: although, HTTPS occasionally throws an error [22:09] perezd: randomly [22:09] NuckingFuts: ckknight: I use Ctrl+C (SIGINT), then up, then enter [22:09] cloudhead: perezd: you should post an issue [22:09] NuckingFuts: I can do that in a matter of seconds nowadays [22:09] perezd: do u run os x ? [22:09] ckknight: NuckingFuts: I'd rather it be more automatic such that if I save a file in the directory, it could do that automatically [22:10] hvgotcodes: cloudhead: yeah its not exiting by itself [22:10] NuckingFuts: wookiehangover: The problem is that it takes a whole different paradigm to do that. [22:10] wookiehangover: professionalism? [22:11] NuckingFuts: wookiehangover: I mean that vim takes a modal mindset, which is not at all what we expect [22:11] themiddleman_itv has joined the channel [22:11] cloudhead: hvgotcodes: that means it's waiting for one of your tests to complete normally [22:11] tmedema: How do I receive incoming streams with a http server (express)? Eg. a multipart form upload [22:11] hvgotcodes: cloudhead: but it has already printed the results... [22:11] NuckingFuts: Anyone know of a way to integrate git into N++? [22:11] cloudhead: hvgotcodes: how are you running it? [22:12] DTrejo: ckknight: hey, so yeah, the question about syncronicity [22:12] hvgotcodes: vows thefile.js [22:12] cloudhead: hvgotcodes: via `node` or via `vows`? [22:12] hvgotcodes: sorry [22:12] hvgotcodes: i mean node thefile.js [22:12] ckknight: DTrejo: yes? [22:12] hvgotcodes: with a run() call [22:12] DTrejo: ckknight: the main reason for json-streamify is to minimize the amount of stuff in memory [22:12] cloudhead: hvgotcodes: can you share the code? [22:12] gilesgoatboy has joined the channel [22:12] hvgotcodes: cloudhead: sure hold on [22:12] DTrejo: ckknight: if you wanted to make it async, just do setTimeout(dostuff(), 0), or something? [22:13] DTrejo: and then it will be async [22:13] ckknight: DTrejo: nah, what I more mean is to somehow have it be a pull mechanism rather than a push, so that when something is ready to read more, a function could be called. Maybe I'm totally off-base, though. [22:13] NuckingFuts: OMG found something yay [22:14] DTrejo: ckknight: wait, explain more? when what is ready to be read more? [22:14] skiz: hey guys, trying to spec dynamic object generation with jasmine, any help would be appreciated: https://gist.github.com/b7c667028131cf90404b [22:14] ckknight: DTrejo: likely, a stream. [22:14] hvgotcodes: cloudhead: https://gist.github.com/b71b46aad73e7f1ae8dd [22:14] hvgotcodes: before i did export, i just called run [22:14] ckknight: DTrejo: but perhaps that's better handled at another level, I don't know. [22:15] DTrejo: ckknight: I'm not sure what the goal is? [22:15] perezd: cloudhead: https://github.com/joyent/node/issues/892 [22:15] c4milo1 has joined the channel [22:15] ckknight: DTrejo: yeah, I don't have a particular one in mind, it just seemed like json-streamify "should" be async [22:15] DTrejo: ckknight: when what is ready to be read more? [22:16] cloudhead: hvgotcodes: `node` works with run() and `vows` with export() [22:16] hvgotcodes: cloudhead: right -- i was doing node thefile.js when the run call was there [22:16] c4milo1 has joined the channel [22:16] SubStack: perhaps streamify could have a pause() and resume()? [22:16] abraham has joined the channel [22:16] cloudhead: hvgotcodes: API.login() - is that async or sync? [22:16] hvgotcodes: cloudhead: the login is finishing [22:16] hvgotcodes: sorry not finishing [22:16] hvgotcodes: async [22:16] SubStack: or however the native throttling works [22:17] cloudhead: hvgotcodes: yea so that's your issue, you need to pass it `this.callback` [22:17] ckknight: DTrejo: say you have a stream which is sent data at only 1K/s, rather than writing to it all up-front in a synchronous way, you'd pass some callback to the stream, which would then pull data out until it's "full", send it out, pull out more data until done. [22:17] cloudhead: hvgotcodes: and not return anything from that topic [22:17] baudwax has joined the channel [22:17] hvgotcodes: cloudhead can you modify the gist? [22:17] hvgotcodes: as a deom [22:17] hvgotcodes: demo [22:17] hvgotcodes: ? [22:17] cloudhead: yea 1 sec [22:17] hvgotcodes: cloudhead: thanx man [22:17] hvgotcodes: im doing so many things at once [22:18] hvgotcodes: setting up node to run on a vagrant vm, porting a browser library to node via bash script, and writing tests [22:19] cloudhead: hvgotcodes: https://gist.github.com/c68282fb6677248d30a2 [22:19] baudwax has left the channel [22:19] cloudhead: hehe [22:19] hvgotcodes: cloudhead: thanx [22:20] hvgotcodes: why is it returning the results? [22:20] hvgotcodes: if it hasnt returned? [22:20] cloudhead: hvgotcodes: because you did `return mockcontroller` [22:20] sveimac_ has joined the channel [22:20] cloudhead: hvgotcodes: so it assumes you're doing something sync [22:20] cloudhead: hvgotcodes: if your topic is async, you shouldn't return [22:20] hvgotcodes: aaaa [22:20] JimBastard has joined the channel [22:21] cloudhead: hvgotcodes: you should call `this.callback` instead [22:21] cloudhead: hvgotcodes: which is what I did in `endLogin` [22:21] hvgotcodes: cloudhead: roger that [22:21] hvgotcodes: now i need to figure out why its not returning [22:22] maushu_ has joined the channel [22:22] baudwax has joined the channel [22:23] robertkeizer: First publish of linux-utils to npm repositories. Linux utilities for nodejs :) [22:23] ichilton has joined the channel [22:25] cloudhead: Any idea why after deleting a module entry in require.cache the modules it requires are still somehow cached somewhere? [22:26] jjmalina has joined the channel [22:26] nsfx has joined the channel [22:26] sh1mmer has joined the channel [22:28] bingomanatee: Any mongoose people around? [22:28] saschagehlich has joined the channel [22:29] jesusabdullah: |sWORDs|: You may want to look at some of the other flow control libraries, by the way. I'm also aware of async.js and node-Seq [22:29] eventi has joined the channel [22:30] eventi: anyone have problems with the aws-lib install on npm? it apparently installs the dependencies, but then says it can't find xml2js [22:32] jimt has joined the channel [22:35] tobym has joined the channel [22:35] marcello3d has joined the channel [22:36] kriszyp has joined the channel [22:36] flippyhead has joined the channel [22:36] ohtogo has joined the channel [22:36] ckknight: using mongoose, is there a way to stick custom instance methods on a model? [22:37] jimt_ has joined the channel [22:37] bingomanatee: what kind of method? [22:38] ckknight: bingomanatee: say I have a model called Post, I want a method call url that would return its url for the specific Post. [22:39] vahe has joined the channel [22:39] ckknight: and said method would be defined by me and not affect the model in MongoDB itself [22:41] ckknight: actually, just attaching a method to Post.prototype seems to work. [22:42] bingomanatee: Yep there are plenty of examples of that in the docs [22:42] jgv has joined the channel [22:42] bingomanatee: http://mongoosejs.com/docs/virtuals.html [22:42] ckknight: didn't see that happen in http://mongoosejs.com/ [22:42] ckknight: ah [22:43] ckknight: okay then [22:43] sechrist has joined the channel [22:43] ckknight: well, I don't want it to be a getter, I want it to be a function [22:45] gkatsev: if I have a function, say, add(a,b), how can I make it async? well, other than adding a callback. Would I just do setTimeout(callback,10) as the last statement and give the callback my answer? [22:45] losing has joined the channel [22:45] ji0n has joined the channel [22:45] ckknight: gkatsev: what will the function do? that affects how you do the asynchrony. [22:45] timcosgrove has joined the channel [22:46] gkatsev: just add a and b. [22:46] ckknight: gkatsev: if it's just a CPU-oriented thing, should it even _be_ asynchronous? [22:46] gkatsev: I am just wondering conceptually. [22:46] ckknight: okay [22:46] timcosgrove has left the channel [22:46] sechrist has joined the channel [22:46] ckknight: yeah, var add = function(a, b, callback) { setTimeout(function() { callback(a + b); }, 10); }; [22:46] bingomanatee: do you want the function to return a value or do a procedure? [22:46] gkatsev: it probably doesn't need to be async and probably wont be. Just wondering how I would do it. Since just calling the callback directly won't really make it async. [22:47] ckknight: bingomanatee: referring to my thing? it'll just return a value. [22:47] bingomanatee: that is the definition of getter. [22:47] gkatsev: ckknight: cool. Just wanted to double check with someone who was not me. :) [22:47] ckknight: bingomanatee: I plan on having arguments. [22:47] bingomanatee: ah. [22:47] ckknight: so no, not a getter [22:48] bingomanatee: I'd argue that a function with the model as the first parameter might be a better solution. [22:48] ckknight: why? [22:48] kmwallio has joined the channel [22:48] bingomanatee: In general its best practice not to mix too much logic in with your model. [22:48] bingomanatee: Kind of the principle of MVC. [22:48] bingomanatee: information is passive. [22:49] ckknight: I've also heard fat-model skinny-controller, so I think it's mostly a subjective choice. [22:49] bingomanatee: but you can always just slap a function onto the model in a pre or post routine. [22:49] bingomanatee: Javascript lets you wield functions onto anything. I just wouldn't. . [22:49] ckknight: is there harm in just adding a function to the prototype? [22:49] ckknight: cause that works. [22:50] jimt has joined the channel [22:51] bingomanatee: then I suppose not as long as you respect mongo's namespace. [22:51] bingomanatee: mongoose's. [22:54] clark_ has joined the channel [22:54] darshanshankar has joined the channel [23:00] sdecastelberg has joined the channel [23:01] TheIronWolf has joined the channel [23:07] flippyhead_ has joined the channel [23:08] FireFly has joined the channel [23:09] k1ttty has joined the channel [23:11] perlmonkey2 has joined the channel [23:12] HAITI has joined the channel [23:12] Kinbote has joined the channel [23:13] [[zzz]] has joined the channel [23:13] hornairs has joined the channel [23:13] Aria has joined the channel [23:15] bnoguchi has joined the channel [23:15] fairwinds has joined the channel [23:16] perezd has joined the channel [23:16] norviller has joined the channel [23:18] zemanel has joined the channel [23:18] tomatogator has joined the channel [23:20] raidfive has joined the channel [23:21] mde has joined the channel [23:24] jgv has joined the channel [23:30] kmwallio has joined the channel [23:32] max_dev has joined the channel [23:33] jgv has joined the channel [23:33] c4milo1 has joined the channel [23:36] Croms has joined the channel [23:36] bingomanatee: ACTION is starting to question the schema-centric way mongoose works.... [23:36] no-gooder has joined the channel [23:37] kriszyp has joined the channel [23:39] c4milo1 has left the channel [23:42] NickP has joined the channel [23:44] flippyhead has joined the channel [23:46] hkeric: node anti-windows i heard :hmm :z [23:49] isaacs has joined the channel [23:50] bingomanatee: whats your point? [23:50] mc_greeny1 has joined the channel [23:50] Spion has joined the channel [23:58] cloudhead has joined the channel [23:58] newy_ has joined the channel