[00:00] satori_: ACTION just looks like a homeless person when he grows a beard [00:00] Dylanrw: the parrot staves off the homeless impression [00:00] Dylanrw: you gota get a parrot [00:01] _announcer: Twitter: "New blog post: Defining Getters and Setters in NodeJS http://blog.james-carr.org/2010/07/19/defining-getters-and-setters-in-nodejs/" -- jamescarr. http://twitter.com/jamescarr/status/18952785426 [00:01] Dylanrw: ACTION looks like a dirty mexican when he grows a beard [00:01] satori_: I used to go out with a girl who owned a cockatoo. That damn parrot hated my guts. It used to stalk me, and it really really hurts when a parrot bites you [00:01] Dylanrw: (parrot cant help that) [00:02] mscdex: maybe it was parrotting its owner? [00:02] mscdex: :P [00:02] tilgovi has joined the channel [00:02] satori_: heh. It was a jealous bird. [00:07] Dylanrw: I'm using Colloquy on mac, these disconnects make arrow thwack noises. I feel like custer sitting here. [00:09] _announcer: Twitter: "Learning about node.js at @clouddevgroup and getting mind blown. It's a full blown network server not just for HTTP but tcp too" -- Michael D. Hall. http://twitter.com/just3ws/status/18953267610 [00:10] aheckmann has joined the channel [00:11] _announcer: Twitter: "Get Ready for the Node.js Knockout at Joyent's San Francisco Offices - Joyent HQ is now Knockout HQ! http://post.ly/nuPz" -- node knockout. http://twitter.com/node_knockout/status/18953366247 [00:13] pgriess: ryah: thoughts on moving pause/resume + event buffering into EventEmitter? [00:14] creationix: ryah: I think httpParser is eating my input again [00:15] creationix: here is the output from my connect app [00:15] creationix: about this time my session (the one who's headers are all over the page) dies [00:16] creationix: http://creationix.com/wth.png [00:16] creationix: I guess I should link the actual output ;) [00:17] creationix: ryah: the user agent got more than it should [00:19] nwhite has joined the channel [00:19] creationix: ryah: here it is as text https://gist.github.com/47ccc0e6120ae73dc719 [00:20] creationix: it's all in the User-Agent header [00:26] nwhite: is there a good reason why require() does not absolutize the path? [00:27] nwhite: require('../a') and require('./a) create two different scopes [00:27] nwhite: is this intended behavior? [00:27] sh1mmer: nwhite: yes [00:27] nwhite: why? [00:27] sh1mmer: so you have have a 'local' version of something [00:27] sh1mmer: and a global verison [00:27] sh1mmer: e.g. stable vs dev [00:28] mscdex: but those are both relative paths :S [00:28] sh1mmer: mscdex: I wasn't going to point it out :D [00:28] ryah: creationix: ? [00:28] ryah: pgriess: ? [00:28] creationix: ryah: http_parser is failing me again [00:29] creationix: and this time I caught it [00:29] creationix: sadly no raw pcap capture yet [00:29] creationix: https://gist.github.com/47ccc0e6120ae73dc719 [00:29] creationix: I've got the content of several http requests in the User-Agent header [00:29] ryah: creationix: where is it broken? [00:30] ryah: creationix: hard to parse this [00:30] pgriess: ryah: rather than adding pause/resume to http_parser, what do you think about adding this to EventEmitter? [00:30] creationix: ryah: the gist is my app access log [00:30] ryah: pgriess: eh. [00:30] creationix: it should only show common log format lines [00:31] ryah: pgriess: doesn't sound very reasonable... [00:31] creationix: but the HTTP headers are part of the User-Agent header [00:31] pgriess: ryah: it would be nice to give the ability to pause/resume to any emitter rather than trusting each to implement correct semantics (ordered delivery, etc) [00:31] ryah: pgriess: event emitters don't know anything about pause() or resume() [00:31] creationix: ryah: look at the end of line 5 [00:31] creationix: no quote [00:31] pgriess: ryah: they would if i added a pause/resume impl to EventEmitter [00:31] creationix: it's not till line 867 [00:31] MattJ: pgriess: As I understand it, pause() prevents reading from the socket, not delivering events [00:32] pgriess: ryah: i'll wait until you're done w/ creationix [00:32] ryah: creationix: hm [00:32] ryah: creationix: okay - but this isn't enough info to debug it [00:33] isaacs: nwhite: in the next version, a node will be unique based on its absolute filename, not just the require argument. [00:33] isaacs: nwhite: that patch was accepted today [00:33] rauchg_: oh is that your patch ? [00:33] isaacs: yessir [00:33] _announcer: Twitter: "Worst thing about node.js is doing heavy ruby stuff and getting frustrated with how slow everything is" -- Mel Gray. http://twitter.com/melgray/status/18954560219 [00:33] rauchg_: for the longest time i thought it was intended behavior for some reason [00:33] nwhite: awesome [00:33] isaacs: nwhite: note, it does NOT do a "realpath" to resolve symlinks. [00:33] rauchg_: and i relied a lot on require.paths.unshift [00:33] isaacs: that's tricky, slow, and unnecessary. [00:33] pgriess: mattj: yes, as implemented, pause is stream-specific. but i think generalizing the concept could be useful [00:33] rauchg_: to create `global` scopes [00:34] creationix: ryah: what do you need [00:34] creationix: It took me about 5 hours to reproduce it, but I can try again [00:34] bmizeran_ has joined the channel [00:34] MattJ: pgriess: When would you want to pause() the http_parser and not the underlying stream? [00:34] ryah: creationix: i really need a pcap file or at least a curl -i or something [00:35] isaacs: ryah: what's this that you're trying to reproduce? [00:35] creationix: not sure how curl would help, but I can pcap it [00:35] creationix: what pcap line should I use [00:36] _announcer: Twitter: "Multi-Core HTTP Server with NodeJS (Yahoo! Developer Network Blog): Briefly, NodeJS is a server-side JavaScript r... http://yhoo.it/9hkwI3" -- tom serona. http://twitter.com/selvan_tengy/status/18954717734 [00:36] creationix: isaacs: http parser bug I found [00:36] shimondoodkin has joined the channel [00:36] creationix: https://gist.github.com/47ccc0e6120ae73dc719 [00:37] creationix: the 800 lines in the middle are the "User-Agent" string node gave me [00:37] pgriess: mattj: this is contrived, but say you need to make a network request to determine how to receive body data. you need to make this request after receiving the req. in this way you'd be unable to handle 'data' events from the req (or would have to buffer them manually) [00:38] creationix: isaacs: do you have experience logging raw traffic? [00:39] isaacs: creationix: not very much [00:39] mikeal has joined the channel [00:39] creationix: mjr_: ^ [00:40] creationix: mjr_: I know you know about pcap ;) [00:40] pgriess: creationix: what do you want to know about pcap? [00:40] creationix: Just how to log enough traffic to a file to help ryah reproduce the error in http parser [00:41] creationix: I use ngrep but it hides information [00:41] creationix: probably not enough to reproduce [00:41] pgriess: creationix: use tcpdump -C [00:41] pgriess: creationix: this will capture all packets and create a new capture file once the previous one grows to a given size [00:41] pgriess: (say 16mb or whatever) [00:42] pgriess: creationix: you can then use tcpslice to grab packets from a given time range (and tcpsplice knows how to span file) [00:42] creationix: pgriess: sounds good, this takes a very long time to reproduce [00:42] pgriess: creationix: grab timestamps from your busted logs [00:42] creationix: pgriess: can tcpdump filter by port? [00:42] pgriess: use -W as well, actually [00:43] pgriess: creationix: -W will use the files as a circular buffer (e.g. -W 5 will retain only the last 5 files) [00:43] pgriess: creationix: yeah [00:43] mjr_: creationix: I am way into pcap. What do you want to know? [00:43] pgriess: creationix: try this [00:44] creationix: mjr_: I'm trying to record raw http traffic so I can generate a test case for a bug in http_parser [00:44] mjr_: My http_trace program that comes with 'npm install pcap' will dump a lot of great stuff. [00:44] pgriess: creationix: tcpdump -i eth0 -s 0 -w foo.pcap -C 16 -W 8 "port 8080" [00:44] creationix: the bug will happen any time in a 12 hour window on a specified port [00:45] mjr_: But I use node's http parser. [00:45] mjr_: What sort of pattern are you looking for? [00:45] pgriess: creationix: that will capture on eth0, write to foo.pcap and use 8 x 16mb files for only port 8080 traffic [00:45] creationix: mjr_: I've seen a couple cases where it misses newlines when parsing headers [00:45] pgriess: creationix: anyway i gotta run. hopefully that gives you enough to figure out the rest w/ mjr_ [00:45] creationix: mjr_: here is my access log from eariler https://gist.github.com/47ccc0e6120ae73dc719 [00:46] creationix: pgriess: thanks [00:46] isaacs: mjr_: hey, your http_trace program... it doesn't work in the latest node. modules *must* end in either .node or .js now. [00:46] mjr_: oh? Which part doesn't end in either of those? [00:46] _announcer: Twitter: "@melgray What are you using node.js for?" -- Robby Colvin. http://twitter.com/geetarista/status/18955290546 [00:46] isaacs: mjr_: examples/http_trace [00:47] mjr_: oh, but that's a bin. That has to be .js as well? [00:47] isaacs: mjr_: oh.... i get it... npm is creating a shim, not a symlink. [00:47] isaacs: hrg. [00:47] isaacs: because it has the #! to node in the top [00:47] isaacs: tha'ts actually how it was alwasy supposed to work, but never did [00:48] mjr_: creationix: I don't know what to do with that big gist you just sent. [00:48] isaacs: mjr_: it took me a while to figure it out, too [00:48] creationix: mjr_: the gist is part of my access log [00:48] mjr_: Do you want something that just logs all headers by sniffing the wire? [00:48] creationix: the 800 lines in the middle are the header value for "User-Agent" that node gave me [00:48] creationix: obviously it messed up and ate too much data [00:49] creationix: mjr_: I need something outside of node that gives me a better log that what I got in the gist, my access log isn't enough to reproduce the problem [00:51] mjr_: one sec [00:51] skampler: how about a logging tcp proxy written with node? [00:52] isaacs: aha. it's only a 1-line patch to node to make require("./foo") work for a file called "foo" (not .js or .node) [00:53] mscdex: why would you want to do that? [00:53] isaacs: mscdex: so that you can have a bin file with no extension, that works when run directly, and also works when proxied to, and uses relative require() calls [00:54] geojeff has joined the channel [00:54] zapnap has joined the channel [00:55] mscdex: so you're calling a binary executable and a node module by the same name, both without extensions? [00:55] mscdex: :S [00:55] isaacs: mscdex: no, it's just a node module, with a shebang, and 0755 [00:55] isaacs: mscdex: so you can do ./foo or require("./foo") and have it work the same way [00:55] mscdex: oh [00:56] isaacs: mscdex: i wouldn't've thought it was a big deal, but then today, i find that npm 0.1.20 breaks mjr_'s http_trace example program that comes with pcap [00:57] shimondoodkin: is there a way to convert html(with image table with background and some text) to html5 canvas(to retore it 30 degrees later)? [00:58] dnolen_ has joined the channel [00:59] _announcer: Twitter: "@lazycoder yep Sinatra 4.4ish secs vs node.js's 0.17ish secs handled same load. But not yet ready for prod use, but still awesome" -- Michael D. Hall. http://twitter.com/just3ws/status/18955961657 [01:00] creationix: mjr_: that's a long sec... [01:00] ryah: pgriess: i don't want the pause/resume stuff in event emitter [01:01] ryah: i think the parser is a good place for that [01:01] ryah: i get what you're going for - but i think people can just be careful about emitting data. [01:02] ryah: creationix: to solve your problem - or at least to rule out a parser error - i need to see the data being transfer on the line [01:02] mjr_: creationix: people in my office, almost done [01:02] creationix: ryah: yeah, that's what I'm trying to get [01:02] creationix: but It's a really hard to reproduce bug [01:02] creationix: I just need to log everything and hope it happens again [01:03] ryah: yeah [01:03] creationix: it has to be the parser though, nothing else can cause http protocol data to get stuck into a single header value [01:03] ryah: maybe [01:03] ryah: hard to imagine how [01:03] ryah: maybe the client is broken [01:04] creationix: ryah: perhaps, I've seen it on iPad safari and desktop safari [01:04] benburkert has joined the channel [01:04] creationix: but if so node shouldn't barf on it [01:06] mscdex: it should merely spew instead? :P [01:10] ChrisRicca has joined the channel [01:11] mjr_: creationix: OK, back [01:11] creationix: alright [01:11] mjr_: So how much data does it take to trigger this? [01:12] creationix: hmm [01:13] Apage43 has joined the channel [01:13] creationix: mjr_: maybe around 10k requests [01:13] creationix: it's hard to tell [01:13] ryah: ACTION away [01:14] mjr_: creationix: a way to do this would be to just modify node to log all of the data before it calls execute() on the parser. [01:14] mjr_: But I'm all about capturing packets, so if you want me to set you up with a header logger, that's easy enough. [01:14] creationix: mjr_: I'd rather just use ngrep or tcpdump [01:14] mjr_: How large are the requests? [01:15] creationix: mostly it's ajax polls with small responses [01:15] dneighma_ has joined the channel [01:15] creationix: tcpdump -i eth0 -w - "port 5050" [01:15] creationix: seems to give me the raw data [01:16] mjr_: if the requests are all small, you might as well just log them all with tcpdump to a pcap file [01:16] creationix: I do need timestamps in there somehow though [01:16] mjr_: pcap format has timestamps. [01:17] JimBastard has joined the channel [01:17] mjr_: which line in that giant gist has the problem? [01:17] creationix: mjr_: really? [01:17] creationix: mjr about 3 - 800 [01:18] creationix: mjr_: end of line 5 actually [01:18] creationix: it's like it missed the \r\n after the user agent [01:18] mjr_: ohhhh, so that whole thing is a user agent string from line 5? [01:18] _announcer: Twitter: "node.js debugger http://github.com/dannycoates/node-inspector" -- Hernan Garcia. http://twitter.com/theprogrammer/status/18957077383 [01:18] creationix: mjr_: yep [01:18] mjr_: woah [01:20] mjr_: I like how there's also a clearly mangled query string in there of [Object object] [01:20] mjr_: :) [01:20] JimBastard: githubs fork queue applies are funky like 3 day old cheese fries [01:20] creationix: mjr_: yeah, that's a bug in our client side code, unrelated ;) [01:21] ditesh|cassini has joined the channel [01:22] mjr_: OK, so just have tcpdump save the whole thing into a pcap file. It'll be 10 or 20MB, and then you should have caught one of the bad sequences. [01:22] creationix: mjr_: so once I see the error, and have a rough timestamp of when it happened from my other logs, how do I find in in the pcap dump? [01:23] mjr_: well, then you'll need to have tcpdump or wireshark or whatever re-play that pcap file. [01:23] _announcer: Twitter: "@kwbeam Welcome to JavaScript. Are you using Node.js yet??" -- Zach Leatherman. http://twitter.com/zachleat/status/18957326297 [01:23] mjr_: tcpdump -A is probably fine. [01:23] creationix: dang, did it again and I didn't have pcap running! [01:24] mjr_: creationix: can you just run http_trace on there as well, or is the request rate too high? [01:24] creationix: what's http_trace? [01:24] mjr_: npm install pcap [01:24] robotarm_ has joined the channel [01:24] creationix: it's about 2 rps [01:24] creationix: not too fast [01:24] creationix: npm doesn't work for me [01:24] mjr_: that'll give you a program called "http_trace" which you can use to decode HTTP. [01:25] mjr_: But it uses node's http parser, though a different path. [01:25] mjr_: If it's a bug in node's parser, you'd expect http_trace to get mangled as well. [01:25] creationix: true [01:25] mjr_: oh, but npm doesn't work for you. [01:25] mjr_: you could do ti the manual way and clone this: http://github.com/mranney/node_pcap [01:26] mjr_: then run node-waf configure build [01:26] creationix: mjr_: ok, so "tcpdump -A "port 5050" > 5050.pcap" should work? [01:26] mjr_: sudo examples/http_trace en0 "tcp port 5050" [01:26] mjr_: no, that's not pcap format [01:27] mjr_: I mean, whatever. That's probably fine too. [01:27] mjr_: -A means "decode to ASCII if possible" [01:27] mjr_: So call the file 5050.txt or something, because .pcap files are something else. [01:28] mjr_: sudo tcpdump -s0 -i en0 -A tcp port 5050 > 5050.txt [01:28] pzich has joined the channel [01:29] mjr_: But it'd be great if you could also get http_trace working, because I'm trying to make it useful for exactly this kind of thing. [01:29] creationix: mjr_: alright it's running [01:30] mjr_: oh, should probably also add -n so it doesn't get stuck waiting for reverse DNS. [01:30] mjr_: tcpdump can easily get sad that way. [01:30] isaacs: mjr_, creationix: the patch i just emailed to the list will make pcap's http_trace work with npm again. or you can add a ".js" on the end. [01:30] creationix: isaacs_home: no, I can't get npm working on my server [01:32] creationix: mjr_: I'm not -A is a good idea, it might hide information ryan needs to reproduce it [01:32] creationix: *not sure [01:33] bmizerany has joined the channel [01:35] _announcer: Twitter: "Pub/Sub for Ruby and NodeJs - A Pub/Sub model for Ruby and NodeJs, looks very cool! http://tumblr.com/xgxdsq8ac" -- Jack Russell SC. http://twitter.com/jackhq/status/18958027026 [01:37] mjr_: creationix: so did it work? [01:37] creationix: not sure it has the data I want [01:37] creationix: I don't see timestamps [01:38] mjr_: When I run tcpdump -A, I get a timestamp on every line. [01:38] creationix: mjr_: but with -A I see lots of .... instead of binary stuff [01:38] creationix: will that be enough to reproduce the problem [01:38] mjr_: oh right. Yeah, that sucks [01:39] mjr_: I guess that's why dumping it into a .pcap file wins. [01:41] creationix: mjr_: well with pcap at least I get everything, how do I do that? [01:41] pzich has joined the channel [01:41] mjr_: So I guess: tcpdump -w 5050.pcap -n -s0 tcp dst port 5050 [01:41] mjr_: might also need -i if its not the default interface. [01:41] paulwe has joined the channel [01:43] creationix: seems ok, I assume the timestamps and stuff are in the binary parts [01:43] mjr_: yeah, should be [01:43] luddep has joined the channel [01:44] mjr_: Can you also throw http_trace at it? [01:45] creationix: wireshark can read pcap files right? [01:46] mjr_: oh yes [01:46] mjr_: can it ever [01:46] mscdex: haha [01:47] creationix: yeah, I'll just have pcap for now, then when something happens, I'll have to dig the data out [01:47] creationix: probably download it to my laptop and use wireshark [01:48] bmesh has joined the channel [01:51] Apage43 has joined the channel [01:54] Blink7 has joined the channel [01:54] jesusabdullah has joined the channel [01:55] isaacs has joined the channel [01:56] _announcer: Twitter: "I hope you'll node.js jetty can not." [ja] -- edvakf. http://twitter.com/edvakf/status/18959205343 [01:59] mklappstuhl has joined the channel [02:00] meso has joined the channel [02:06] mjr_: ryah: I've restored http://db.ranney.com/ now that the querystring bug is fixed. [02:06] mjr_: or anybody else who cares. [02:06] mklappstuhl: hey [02:07] mklappstuhl: can anyone recommend me a good introduction to event-oriented programming? [02:10] _announcer: Twitter: "Just realized that java and .net have been out for >10 years and don't have a pkg manager. Node.js has been out for < 1 year and has had 2" -- Scott Koon. http://twitter.com/lazycoder/status/18960037888 [02:12] jesusabdullah: XD [02:13] jesusabdullah: mklappstuhl: Playing with javascript in general is probably a good place to start! In browser and out! [02:13] aheckmann has joined the channel [02:14] jesusabdullah: Dammit mjr left [02:14] jesusabdullah: that's BA [02:15] mklappstuhl: isn't there quicker way to learn about listeners, event emitting etc [02:16] jesusabdullah: What do you mean? [02:16] _announcer: Twitter: "@lazycoder has anyone gotten Node.js to work on Windows without Cygwin?" -- Kevin Darty. http://twitter.com/kdarty/status/18960365106 [02:16] jesusabdullah: You mean, a tutorial on events? [02:17] mscdex: !tweet @kdarty not yet [02:17] ajpiano has joined the channel [02:17] chilts: mklappstuhl: the first thing to do is the Hello World example on the front page of http://nodejs.org/ [02:18] chilts: that has examples of events straight away [02:18] jesusabdullah: Then just do a quick browse through http://nodejs.org/api.html [02:18] charlenopires has joined the channel [02:19] _announcer: Twitter: "one of our best meetings. @dukesalehouse food and beer was great. @jsuchy did a a great job presenting and demoing node.js. good times." -- Cloud Dev Group. http://twitter.com/clouddevgroup/status/18960561447 [02:20] jesusabdullah: What did mjr use for plotting there? flot? [02:21] mscdex: [02:21] mscdex: ;-) [02:21] mscdex: a lot of flot [02:21] tmpvar has joined the channel [02:22] sh1mmer has joined the channel [02:22] ryah: mjard: yey [02:22] ryah: er [02:22] ryah: that was directed towards mjr [02:23] shimondoodkin has joined the channel [02:23] Xavura has joined the channel [02:23] ajpiano has joined the channel [02:23] Xavura: Anyone have any idea why I'm getting crypto:3638 - return new Hash(hash); - TypeError: undefined is not a function [02:27] robotarm_ has joined the channel [02:28] mscdex: Xavura: gist the code you're using [02:28] Xavura: Think it's because I didn't have libssl-dev before compiling [02:28] Xavura: trying now [02:29] mscdex: that would probably do it too [02:35] Xavura: yeah that did it [02:36] lhardy has joined the channel [02:36] lhardy has joined the channel [02:40] mtodd has joined the channel [02:48] Xavura2 has joined the channel [02:48] Xavura2 has left the channel [02:50] JimBastard has joined the channel [02:50] JimBastard: all hail king neptune and his water breathers [02:50] JimBastard: whats the easiest way to sha up a password so i can store it in plain text? [02:51] chilts: easy and quick would be to create a salt and do md5(salt + pw) and store that [02:52] chilts: of course, if you do that, it's not in plain text anymore :) [02:52] JimBastard: http://github.com/waveto/node-crypto? [02:52] chilts: JimBastard: some people do two rounds of hashing, but it depends on your use case [02:52] JimBastard: lol thanks chilts [02:52] JimBastard: http://github.com/waveto/node-crypto/blob/master/test.js#L14 [02:52] chilts: no worries ... of course, that's the 2sec intro, there's is _lots_ to read around crypto and passwords (most of which I don't know) [02:52] chilts: :D [02:53] JimBastard: looks pretty good to me, lets test [02:53] JimBastard: so welcome to the node.js room [02:53] JimBastard: hope you have been enjoying your stay [02:53] chilts: who me? [02:53] JimBastard: :-) [02:53] chilts: I linger lots :) [02:53] chilts: wrote me a nice queuing system in Node ... I should put it in npm [02:53] chilts: http://github.com/appsattic/sensi [02:54] chilts: am gonna do a notification system soon [02:54] tmpvar: isaacs_home, you around? [02:54] JimBastard: coool [02:54] JimBastard: so are there any native js sha implementations [02:54] JimBastard: c add on is weak [02:54] chilts: ACTION shrugs [02:54] chilts: dunno [02:55] dneighman has joined the channel [02:56] ddilinger has joined the channel [02:57] ddilinger: Hi, curious if there are any higher level interfaces to the httpClient ? Basically i would like to request web pages without dealing with http response codes and whatnot, figure its common there must be an abstraction ontop of http.createClient [02:58] ddilinger: something more like curl and less like telnet :P) [02:59] JimBastard: ddilinger: http-console [02:59] JimBastard: but thats a command line tool [02:59] JimBastard: buts its fucking awesome [02:59] JimBastard: there is restler, not sure if its been updated [02:59] ddilinger: hmm, but even command line i should be able to go into the source and run it from some code [02:59] JimBastard: nooo [03:00] JimBastard: oo [03:00] JimBastard: http.client is easy [03:00] JimBastard: im going [03:00] ddilinger: well, its not too dificult, its just not as easy as it could be. I see no reason i should have to deal with 301 redirects and whatnot directly [03:01] halorgium: ddilinger: checkout http scoped client [03:01] ddilinger: i will, along with restler, thanks for the ideas [03:03] ddilinger: ahh, the readme for http scoped client sounds just like what i was looking for [03:03] robotarm_ has joined the channel [03:03] saikat has joined the channel [03:04] marshall_law_ has joined the channel [03:08] zmbmartin has joined the channel [03:09] steadicat has joined the channel [03:13] marshall_law has joined the channel [03:15] ddilinger: from http://github.com/technoweenie/node-scoped-http-client there is a bit of sample code that does 'cli.get()(function(err, resp, body) { sys.puts(body) });' I've never seen that usage 'funcname()(lamda func)' in javascript, what does it do? [03:15] brianmario has joined the channel [03:18] SubStack: cli.get() just returns a function that itself takes a function as an argument [03:18] Tekerson: ddilinger, cli.get() returns a function, which is then called with a function (lambda) as an argument [03:19] SubStack: function f () { return function (g) { g('moo') } }; f()(function (x) { sys.puts(x) }) // prints moo [03:19] ddilinger: ahha, interesting. knew could return functions just didn't realize could call them directly like that. Usefull although maybee not very clear :) [03:22] ctp_ has joined the channel [03:30] apipkin has joined the channel [03:30] robotarm_ has joined the channel [03:30] mjr_ has joined the channel [03:30] apipkin has left the channel [03:34] sudhirj has joined the channel [03:42] admc has joined the channel [03:47] rtomayko has joined the channel [03:47] dnolen_ has joined the channel [03:48] tekky has joined the channel [03:49] softdrink has joined the channel [03:50] tekky: tmpvar: got a job! :) [03:51] SubStack: tekky: that's too bad! [03:51] SubStack: jobs -_- [03:51] tekky: SubStack: no... unemployed basically since December and 4months behind on house note... job === good [03:52] SubStack: oh house notes are pesky [03:52] SubStack: ACTION is in startup mode [03:52] isaacs has joined the channel [03:52] ddilinger: much rather rent a place where they can toss you for only 1 month behind eh? :P [03:53] ddilinger: at least with a house you have many more protections letting you have a place to live [03:53] satori_ has joined the channel [03:54] tekky: ddilinger: heh, true, but I was just tired of throwing away 10-15k a year in rent/utils [03:54] ddilinger: yea, i throw almost 17k/yr in rent ... its painfull [03:54] tekky: but now my new job is 2hrs away.... so may be finding yet another place and renting this one out [03:55] ddilinger: ouch, yea you prob want a new place. 2 hours is done by many, but liked by none [03:55] SubStack: 17k? holy crap [03:55] ddilinger: silicon valley :) [03:56] SubStack: ACTION is $3.6k / year [03:56] ddilinger: hmm, for that i could get a closet in someone elses 1 bedroom apartment [03:56] eisd_: SubStack: what? $3600/yr in rent? where do you live? [03:57] _announcer: Twitter: "Successfully serving gzip'd static files with node.js! Github repo pending. #jswin" -- Keegan Watkins. http://twitter.com/keeganwatkins/status/18966274649 [03:57] tekky: eisd_: pays for really nice internet in his parents house? :P [03:57] ewdafa has joined the channel [03:57] SubStack: eisd_: Fairbanks, AK [03:57] SubStack: nah, have roommates though [03:57] chilts: I'm about US$12k/yr ... which is sad [03:57] mostlygeek has joined the channel [03:57] satori_: ACTION pays around AU$13K in Sydney [03:57] SubStack: actually Fairbanks has rather steep rent compared to other places in the US [03:57] chilts: and I live in NZ where we get paid less [03:57] _announcer: Twitter: "Just learned a little node.js, Javascript server-side ... that madness" [es] -- Agustin Feuerhake. http://twitter.com/AgustinF/status/18966310184 [03:57] SubStack: on account of how much it costs to heat stuff [03:57] chilts: satori_: yeah, it sucks aye? [03:57] satori_: uhuh [03:58] ddilinger: it varies though .... i could probably move to north dakota and find enough work online to pay the cheap rent in the middle of nowhere, but who wants to live in the middle of nowhere ? :) [03:59] satori_: I would live in the middle of nowhere quite happliy if I had broadband [03:59] Dylanrw: could pull a count of montechristo [03:59] chilts: same [03:59] chilts: SubStack: you look like you're pretty much in the middle of nowhere, that right? [03:59] Dylanrw: come out from seclusion all crazy smart [04:00] ddilinger: Anchorage might actually count as somewhere :) [04:00] ddilinger: err, fairbanks [04:01] _announcer: Twitter: "Node.JS WebSocket Example for SceneJS at GitHub - http://bit.ly/9kpREs" -- Lindsay Stanley Kay. http://twitter.com/xeolabs/status/18966542432 [04:04] xer0xM has joined the channel [04:05] tekky: ddilinger: I think AK counts as middle of nowhere regardless of where it is :P [04:05] sudoer has joined the channel [04:05] SubStack: satori_: if only internet didn't suck so much here [04:05] SubStack: 1 Mbit down for $80 / month bundled with a useless landline [04:05] SubStack: and for the past week it's been laggy as hell [04:06] satori_: ouch [04:06] isaacs: If you write code, and you're not in the SF Bay Area in CA, USA, yor'e in the middle of nowhere. [04:06] SubStack: isaacs: seems like it [04:06] tekky: isaacs: what about Austin, TX? :P [04:06] satori_: isaacs: I am starting to see that this is true. [04:06] isaacs: people talk about austin or boulder or nyc or boston. [04:06] isaacs: those places are nice, but they're no silicon valley or SF [04:07] isaacs: just in terms of density. [04:07] tekky: boulder == not much there last I checked.... [04:07] isaacs: i mean, there's tech there, but there's ONLY tech here. it's like being an actor in LA [04:07] isaacs: it's the mecca [04:07] isaacs: sf has other interesting stuff, too, of course, i mean, it's a city. [04:07] satori_: I have been told by others that SF and Sydney share many common attributes in terms of the attitudes of their respective citizens [04:07] tekky: Austin is SV on a smaller scale... [04:07] isaacs: tekky: yeah. and a mouse is an elephant on a smaller scale. [04:07] SubStack: the point of SV is its scale I thought [04:07] isaacs: shrinking the scale changes what's relevant about it [04:08] tekky: SubStack: hardly a good analogy [04:08] isaacs: tekky: twas my analogy.... ;P [04:08] isaacs: but the point is, if you have "like SV, but less", then it's not like SV, because the fact that it's not less is what makes it relevant. [04:09] isaacs: a lot of movies get made in San Diego. but in LA, every waiter and valet is an actor. [04:09] xer0xM has joined the channel [04:09] isaacs: and half the people you meet are sound engineers or film techs or producers or whatevdr. [04:09] SubStack: s/actor/extra/ [04:09] tekky: isaacs: woops my bad :P [04:10] isaacs: SubStack: hehe [04:10] isaacs: SubStack: my brother in law is actually a working actor. acting pays his mortgage. but he also does other stuff, because acting is flaky work. it's like being a contractor. [04:10] tekky: isaacs: my point was that Austin has the same stuff, its just not aged quite as much yet :P [04:10] satori_: Neal Stephenson was right. America does three things better than anyone else. Movies, Software, and High Speed Piiza delvery. [04:11] Apage43: did you get really fast pizza from somewhere lately? [04:11] chilts: satori_: I've also heard that about San Fran and Wellington (and I agree, I've been to SF, it was cool) :) [04:11] creationix has joined the channel [04:12] isaacs: tekky: i have a feeling there's only room in this world for one mega tech hub. [04:12] Apage43: yeah [04:12] Apage43: SF bay is all techland. [04:13] Apage43: NYC is financialand. [04:13] tekky: isaacs: not necessarily [04:13] isaacs: nyc has a lot of tech. but it also has a lot of everythign else. [04:14] isaacs: a LOT of everythign else. [04:14] Apage43: the tech in nyc exists largely because of the finance industry [04:15] Apage43: not to say it doesn't spawn some crazy awesome stuff [04:16] dnolen_ has joined the channel [04:16] isaacs: in silicon valley, you're tech, or you're the help. [04:16] Apage43: yeah [04:17] Apage43: i met some guy the other day who was a worker in a data center [04:17] satori_: and even the help probably dabbles in some async programming on the side? [04:17] Apage43: and even he does some programming [04:17] satori_: heh [04:17] Apage43: he's mostly there to like, do cabling and lifting [04:18] Apage43: ACTION spending some time in the bay. [04:18] Dylanrw: I met a cabby on the way from SF to SJ and he was a coder :P [04:18] Apage43: Was living in northwest arkansas previously. [04:19] satori_: Will write HTML foor food. [04:19] satori_: spelling mistakes are extra though. [04:19] Apage43: working in IT at wal-mart [04:20] _announcer: Twitter: "I think in javascript thanks to node.js, @jquery, and @mixestmusic :)" -- David Trejo. http://twitter.com/ddtrejo/status/18967560270 [04:20] ddilinger: are there any 'practical' limits on the ammount of stuff you can do async? I was playing with a basic web crawler and i find if i limit it to 10 connections at a time it works fine, but when i bump it up to 100 async connections(different domains) i get 30+ timeouts/dns errors/etc. [04:21] Apage43: ddilinger: depends on how well you avoid blocking [04:21] derferman has joined the channel [04:21] ddilinger: hmm, not much blocking going on although i suppose i dont know what happens inside libxml.node [04:22] ddilinger: libxmljs.node even [04:22] Apage43: and outside of blocking just how fast your code hands control back [04:22] satori_: are you using SAX push parsing or buffering? [04:23] ddilinger: at this point just libxml.parseHtmlString() and then a find to extract anchors [04:23] Apage43: you might try an evented xml parser (node-expat) :[ [04:23] Apage43: er :] [04:23] satori_: so you are buffering you http responses before parsing them. [04:23] ddilinger: in the future maybee more, but i'm just kind of playing with node.js to see if it could work for an upcoming project [04:23] satori_: A push parser approach may be more effient and perform better [04:23] dnolen_ has joined the channel [04:24] ddilinger: yea, the http responses are stored into a single text, and then when its done it parses, push parser sounds interesting though [04:24] satori_: you can just push each chunk into the parser as it arrives and respond to events [04:24] satori_: ...for new elements and attributes etc. [04:24] ddilinger: interesting [04:25] satori_: lower mem use too. [04:25] ddilinger: and with the push parser, does it store the parsed tree or just do events and throw away everything else? throw away is fine just curious how it works [04:25] satori_: it throw aways everything [04:25] satori_: it's up to your code to keep state [04:26] satori_: and respond to the stuff your interested in [04:26] satori_: there is no DOM to speak of [04:26] ddilinger: thats just fine, DOM is fairly ugly [04:27] satori_: you can't use xpath either...... you have to keep track of where you are in the document heirarchy yourself. [04:27] satori_: not that difficult though...... pretty simple when you just want to extract anchors [04:27] ddilinger: yea, for just anchors i dont think i will need much state at all [04:28] technoweenie has joined the channel [04:28] technowe_ has joined the channel [04:28] bpot has joined the channel [04:29] sudhirj has joined the channel [04:29] sudhirj has left the channel [04:35] dnolen_ has joined the channel [04:37] sh1mmer has joined the channel [04:39] benburkert has joined the channel [04:44] satori_: Who is doing interesting things with html video and node? anyone? [04:44] hassox has joined the channel [04:45] _announcer: Twitter: "can't use node for same reason - too much daily shiny there, too. going to try to use couchapps & fab.js & the basho gear, i think." -- grantmichaels. http://twitter.com/grantmichaels/status/18968835435 [04:47] sh1mmer: that seems like a false economy [04:47] sh1mmer: switching platforms because you can't block out interesting things in it's community [04:48] satori_: Tweet him back then :P [04:53] JimBastard has joined the channel [04:53] |Bolt| has joined the channel [04:54] JimBastard: so indexzero somehow broke the broodmother build and made the reverse-proxy act mean. does anyone know what having an http.client request not respond at all mean? no events firing for response, data, or end. is that a timeout? [04:55] JimBastard: im busting out the proxy debugger tool right now to make sure the request is actually firing [04:58] isaacs: anyone here know a LOT about homebrwe? [04:58] isaacs: the npm homebrew package is kind of messed up. doing weird stuff, doesn't work right, etc. [04:59] JimBastard: what is it doing? [04:59] [[zzz]] has joined the channel [04:59] isaacs: well, it creates a shell script that calls the executable it writes, which is...weird. [04:59] isaacs: like a shim to a shim. [04:59] isaacs: basically, it should be able to use npm to install itself. [05:00] JimBastard: maybe thats for other packages that cant do that [05:00] isaacs: maybe... [05:00] isaacs: i can't figure out to just tell Homebrew "put all the code here, then run this command, and get out of my way" [05:02] isaacs: i should just do what homebrew does with macports and say "it doesn't work like that" [05:02] [[zzzz]] has joined the channel [05:07] _announcer: Twitter: "Doing more debian node.js related packaging QA. Yes node.js is in debian unstable right now - apt-get install nodejs." -- Dave Beckett. http://twitter.com/dajobe/status/18969926011 [05:08] [[zzz]] has joined the channel [05:10] sztanpet has joined the channel [05:12] khug has joined the channel [05:15] [[zzzz]] has joined the channel [05:18] [[zzz]] has joined the channel [05:19] hassox has joined the channel [05:21] joshbuddy has joined the channel [05:24] mikeal has joined the channel [05:25] benburkert has joined the channel [05:30] Blink7 has joined the channel [05:31] bean0r1___ has joined the channel [05:40] jesusabdullah: When did /r/programming start to suck? [05:40] jesusabdullah: :( [05:41] mscdex: cannot access /r/programming: No such file or directory [05:42] jesusabdullah: WAT [05:42] jesusabdullah: cd $REDDIT/r/programming [05:42] eely has joined the channel [05:48] bean0r1___ has joined the channel [05:48] jetienne has joined the channel [05:50] sudoer has joined the channel [05:50] rvanrooy has joined the channel [05:51] rvanrooy: anyone working with sessions in connect? [05:56] CIA-64: node: 03Ryan Dahl 07master * r7067a71 10/ (3 files in 3 dirs): [05:56] CIA-64: node: Specify env differently in execFile [05:56] CIA-64: node: Callbacks should always be the last argument. - http://bit.ly/ahIgSU [05:57] amerine has joined the channel [05:57] CIA-64: node: 03Ryan Dahl 07eventsource * r929d929 10/ (lib/fs.js src/node_stat_watcher.cc src/node_stat_watcher.h): StatWatcher to use EventSource (+599 more commits...) - http://bit.ly/c2AsHO [05:58] tyfighter has joined the channel [05:59] lucas- has joined the channel [06:00] joshthecoder has joined the channel [06:01] halorgium has joined the channel [06:01] adamholt has joined the channel [06:05] [[zzz]] has joined the channel [06:07] micheil has joined the channel [06:08] liesen has joined the channel [06:15] _announcer: Twitter: "Multi-Core HTTP Server with NodeJS and Some tricks for getting JavaScript to scale ! #WebDev #JS http://yhoo.it/9NqIB3" -- Farzad E.. http://twitter.com/dNetGuru/status/18972870208 [06:16] khug has joined the channel [06:17] devongovett has joined the channel [06:20] _announcer: Twitter: "eventually come of age or comet http://devthought.com/blog/2009/12/nodejs-and-the-websocket-protocol/" [ja] -- umi. http://twitter.com/umihara666/status/18973083607 [06:25] mikeal has joined the channel [06:27] rvanrooy_ has joined the channel [06:37] _announcer: Twitter: "node.js の 最新 バイナリ Windows (Cygwin 环境 含 版) http://dl.dropbox.com/u/341900/nodejs/nodejs-0.1.101-cygwin-full.zip" [af] -- Toshihiro Shimizu. http://twitter.com/meso/status/18973810847 [06:45] WALoeIII has joined the channel [06:46] teemow has joined the channel [06:48] pdelgallego has joined the channel [06:48] jaja has joined the channel [06:49] jaja has joined the channel [06:50] jetienne: anybody using connect ? do you hav e the connect executable installed ? or available somewhere ? [06:50] lachlanhardy has joined the channel [06:50] Blink7 has joined the channel [06:51] lachlanhardy has joined the channel [06:57] _announcer: Twitter: "nodeJS looks pretty sweet! Javascript isn't just for the browser!" -- Jonathan. http://twitter.com/mcbutterbuns/status/18974640789 [06:57] Tekerson: jetienne, it's not an executable, it's a node.js script (ie. javascript) [06:57] jetienne: Tekerson: ok is it installed for you ? do you know where it is in the source ? [06:58] Tekerson: it installed to /usr/local/bin/connect for me, is that what you're asking? [06:58] felixge has joined the channel [06:58] jetienne: Tekerson: it is not installed here. and the Makefile nor the source doesnt have any bin/ [06:59] Tekerson: ah, not sure. I'll have a look. [07:00] Tekerson: I do have a bin/ in the source. could be an old version though, updating. [07:02] jetienne: http://github.com/senchalabs/connect <- i got it from there (url from one of the authors) [07:02] b_erb has joined the channel [07:03] Tekerson: yeah, looks like it's changed since I installed it. Seems to be in lib/connect [07:04] Tekerson: it's a module, so index.js wouldbe the main file. [07:04] naveen has joined the channel [07:04] jetienne: Tekerson: yep but this is the library not the executable [07:05] Tekerson: there is no executable. it is a node.js script. [07:05] jetienne: Tekerson: hehe :) lets not argue on file permission [07:05] jetienne: Tekerson: in anycase connect is not in the repo [07:06] jetienne: Then to run it, save that snippet as app.js and either use the connect executable in the bin dir or create a simple runner file server.js. <- from connect own docs [07:06] Tekerson: yeah, see what you're saying. The version I have has a script with e shebang... doesn't seem to be there now. [07:07] jetienne: ok i will ping the authors when they are back [07:07] naveen: qq: has anyone attempted to write any thrift client in node ? [07:08] jetienne: naveen: never heard of anyone doing it. there is a contrib page in wiki, where you can check [07:08] jetienne: http://wiki.github.com/ry/node/ [07:08] _announcer: Twitter: "JavaScript, JavaScript, everywhere http://davidchambersdesign.com/61/ #javascript #nodejs #sproutcore" -- David Chambers. http://twitter.com/davidchambers/status/18975158130 [07:09] naveen: jetienne: thanks! [07:11] mjr_: naveen: I've heard people talking about thrift before. There was some talk of it on the mailing list a while back. [07:12] mjr_: Also I've heard a lot of grumbling about it because it's harder than JSON. [07:12] naveen: mjr_: thanks, I did find the message on the mailing list, last message was Jun 10. was wondering if there was any more activity since.. [07:13] mscdex: naveen: yeah, apparently someone had started on one in that thread... [07:13] mscdex: maybe contact them and see if they ever got anywhere with it [07:13] _announcer: Twitter: "are there already view helpers for #nodejs #expressjs" -- Sascha Depold. http://twitter.com/sdepold/status/18975359796 [07:13] naveen: re: harder than JSON: understandably so.. [07:13] naveen: mscdex: good idea. thanks [07:16] christophsturm has joined the channel [07:16] mscdex: has anyone here had experience with long poll and android? [07:28] k23z has joined the channel [07:29] satori_ has joined the channel [07:30] [[zzzz]] has joined the channel [07:35] beanie___ has joined the channel [07:37] paulwe has joined the channel [07:38] tpryme has joined the channel [07:39] tpryme: Anyone here using expressjs? [07:40] cirwin has joined the channel [07:40] nuxusr has joined the channel [07:41] nuxusr: is there a way to update packages installed with npm? [07:41] TomY has joined the channel [07:45] [[zz]] has joined the channel [07:47] zmbmartin: tpryme: I have been messing with expressjs [07:48] tpryme: zmbmartin: do you know what the irc is for it? [07:48] virtuo has joined the channel [07:49] mscdex: eh? [07:49] zmbmartin: tpryme: I don't know that there is one. I could be wrong. [07:51] zmbmartin: tpryme: did you need something? [07:51] tpryme: zmbmartin: no, just developing a lot in it right now and was looking for the irc for the future [07:52] zmbmartin: ;) [07:52] cirwin: newb question: "what's ab? and how do I install it?" - it's hard to google for [07:52] cirwin: or is it the apache http server benchmakring? [07:52] k23z: why is faye not in npm ? [07:53] _announcer: Twitter: "http://friendagon.com/ to manage its followers easily # twitter (and it made # nodejs)" [fr] -- Jean-Louis Huynen. http://twitter.com/gallypette/status/18977005319 [07:53] zmbmartin: tpryme: express author hangs out in here quite a bit. [07:53] mscdex: cirwin: it's apache bench. it's in the apache2-utils package [07:53] cirwin: mscdex: thanks [07:53] _announcer: Twitter: "Useful and fun explanation of Node.js http://bit.ly/cDdmwQ" -- Paul Grayson. http://twitter.com/pheater/status/18977042851 [07:54] tpryme: zmbmartin: cool, good to know; what's his uname? [07:54] zmbmartin: tpryme: his name is tjholowaychuk [07:54] tpryme: zmbmartin: thanks [07:54] zmbmartin: :) [07:55] cirwin: on git master, I get one failing test - is that expected? [08:00] tpryme: cirwin: that happened on my machine, too [08:00] tpryme: cirwin: for the last 2 masters i pulled [08:00] cirwin: ok, I see the same failure in the latest release http://dpaste.org/eQ3V/ [08:00] cirwin: ACTION /ignores and gets on with the fun [08:01] admc has joined the channel [08:02] _announcer: Twitter: "yahoo is taking nodejs quite serious: http://j.mp/9RiNDU" -- Siegmund Führinger. http://twitter.com/0xx0/status/18977392278 [08:10] _announcer: Twitter: "The NEW black. Node.js http://tiny.cc/wxb48" -- Dan. http://twitter.com/Danno_75/status/18977715443 [08:14] V1 has joined the channel [08:17] Blink7 has joined the channel [08:19] Tim_Smart: Hmm is EventSource for the whole error debacle? [08:29] tpryme: zmbmartin: Have you tried the newest expressjs using connect? [08:30] jetienne: expressjs is a layer on top of connect, or a completly distinct projec t? [08:32] tpryme: jetienne: both. expressjs is built using connect middleware plus is a distinct project [08:32] jetienne: ok thanks [08:32] tpryme: jetienne: like rack and rails [08:33] tpryme: jetienne: or rack and sinatra [08:33] zmbmartin: tpryme: I have been messing with 1.0.0beta. That uses connect [08:34] tpryme: zmbmartin: any luck with extracting form data using it? I'm trying the new params 3rd arg for app.post(...), and can't see my form data in there [08:35] zmbmartin: Yes I have been trying to use mongoose with express and I was able to get form data from app.post [08:35] felixge has joined the channel [08:37] zmbmartin: tpryme: I have not used anything other then mongoose with express. I am a big fan of mongo ;) [08:38] tpryme: zmbmartin: you'd still need to access form data incoming from the browser, though, whatever datastore you use [08:39] zmbmartin: tpryme: right I used req.param() for it. [08:40] tpryme: zmbmartin: and that extracts form data in the newest express beta on connect? [08:40] zmbmartin: It is working for me. [08:42] Tim_Smart has joined the channel [08:42] rsms has joined the channel [08:44] paulwe has joined the channel [08:45] rvanrooy has joined the channel [08:47] zmbmartin: tpryme: did that work out for you? [08:47] tpryme: zmbmartin: no :P [08:47] tpryme: zmbmartin: peeked at the source, too, request.js, which is really simple [08:48] mitkok has joined the channel [08:48] tpryme: zmbmartin: I must be making a mistake elsewhere. maybe in some custom middleware [08:48] tpryme: zmbmartin: do you know of a good debugger for node.js? [08:48] rvanrooy: have you guys got sessions working with express? [08:48] zmbmartin: tpryme: no I don't gist your app.post [08:49] zmbmartin: rvanrooy: I have not dove into that yet. [08:49] mscdex: woot! pv + node = win! [08:50] tpryme: rvanrooy: yeah, but ended up rolling my own [08:50] rvanrooy: did you use the connect session api? [08:50] tpryme: rvanrooy: check http://extjs.github.com/Connect/session.html [08:51] tpryme: rvanrooy: no, i rolled my own [08:51] tpryme: rvanrooy: cuz I wanted to store the entire session on the client's cookie [08:51] rvanrooy: tpryme: I have, I just have no idea how to access the functions exposed by the session middleware [08:51] tpryme: rvanrooy: which doesn't fit well with the express session api [08:52] tpryme: rvanrooy: the session middleware adds a session method to req [08:52] tpryme: rvanrooy: so via req.session [08:52] tpryme: rvanrooy: try getting it to work with their default MemoryStore first [08:53] rvanrooy: tpryme: would I access session variables req.session.username? [08:53] rvanrooy: tpreyme:and would that persist over the session? [08:53] tpryme: rvanrooy: you set req.session.username = "xyz" [08:54] tpryme: rvanrooy: that is saved in memory if you us express' session's memorystore [08:54] stagas has joined the channel [08:54] tpryme: rvanrooy: that wont persist if you restart your app [08:54] rvanrooy: tpryme: thanks, I'll give that ago. [08:54] rvanrooy: tpryme: and how would you delete the session? [08:56] tpryme: tpryme: req.session.destroy() [08:56] tpryme: rvanrooy: req.session.destroy() [08:56] tpryme: rvanrooy: It's all here: http://extjs.github.com/Connect/api.html [08:58] rvanrooy: tpryme: great! thanks [08:59] tpryme: zmbmartin: You have to include connect.bodyDecoder in app definition [08:59] zmbmartin: ahh, ok [09:01] hellp has joined the channel [09:02] caolanm has joined the channel [09:03] stagas: wow you can middle click the back button in ff [09:03] stagas: [09:06] javajunky has joined the channel [09:07] robinduckett: stagas: yeah I found that like a week ago after using ff for years [09:08] stagas: works on chrome too, probably on most browsers, very useful, I used to duplicate tab and then go back which is a pain [09:08] robinduckett: anyone interested in my standalone compile function to parse an html file and run / output scripts ala hypertext preprocessor? [09:08] rvanrooy: tpryme: it now works sometimes and not others... Is there a way to commit the session? [09:14] MattJ has joined the channel [09:19] _announcer: Twitter: "No Twitter libraries for Node.js that support OAuth? Seems odd..." -- Harry Marr. http://twitter.com/harrymarr/status/18980534912 [09:21] mAritz has joined the channel [09:22] rvanrooy: tprryme: ok, I see that the session ID changes after every refresh. Shouldn't that persist? [09:26] mAritz: rvanrooy: no. session ids should change to prevent session grabbing/guessing [09:27] hassox has joined the channel [09:27] rvanrooy: mAritz: right, so how would I persist session data server side? [09:27] saikat` has joined the channel [09:29] mAritz: change the session id on the server as well?! [09:30] rvanrooy: mAritz: if I do req.session.username = "xyz" how do I access that when the page reloads? [09:30] mAritz: btw: changing it every request might be a too much, depending on what operations the server has to do to change it. most articles i've read suggest somewhere between every 2-5 requests. [09:30] mAritz: console.log(req.session.username) ? [09:31] mAritz: that is, if you have something that manages your sessions [09:31] mischievious has joined the channel [09:31] rvanrooy: I'm supposed to have. Using connect-redis [09:32] _announcer: Twitter: "node.js, couchdb and pitončik. prazdnik soul:)" [sr] -- Serge. http://twitter.com/traut_/status/18981098526 [09:33] mAritz: rvanrooy: you mean connect with the redis session store? [09:34] rvanrooy: mAritz: yup [09:34] rvanrooy: mAritz: I think I found the error though [09:34] rvanrooy: TTL was way too short [09:34] mAritz: rvanrooy: that could be a reason as well. :D [09:35] rvanrooy: mAritz: thanks! [09:35] saikat` has joined the channel [09:35] mAritz: does connect change the session id after x requests? if not, i might just write a quick patch for that. work is boring right now :D [09:35] _announcer: Twitter: "Clojure, Node.js and Concurrency Fail http://bit.ly/8Ypp6m #clojure #nodejs" -- Régis Gaidot. http://twitter.com/rgaidot/status/18981221299 [09:35] mAritz: rvanrooy: np... didn't really solve your problem though :D [09:37] tpryme has joined the channel [09:37] javajunky: ^^^ quite a good article that, I still dislike the clojure syntax though :( … same as coffeescript to my mind [09:38] _announcer: Twitter: "@ Rgaidot here is concurency in nodejs http://developer.yahoo.net/blog/archives/2010/07/multicore_http_server_with_nodejs.html" [ro] -- Jerome Etienne. http://twitter.com/jerome_etienne/status/18981353697 [09:42] rvanrooy: mAritz: any idea why changing the maxAge property to more than 800 ms would make express hang? [09:44] mscdex: node + pv + "comet" = realtime data backup process monitoring [09:44] mscdex: :-D [09:47] mAritz: rvanrooy: express? i thought connect? :D [09:48] rvanrooy: express using connect [09:48] mAritz: rvanrooy: uhm... isn't that a bit overkill? what does express offer that connect doesn't? and don't they collide in some areas? [09:49] bvleur has joined the channel [09:49] rvanrooy: I'm using express mainly as a router, express is being built on top of connect, I didn't integrate the stacks [09:51] robinduckett: hey guys [09:51] robinduckett: quick question [09:52] mAritz: rvanrooy: oh, okay. last time i checked/used express was a little before connect. didn't know what changed there. but connect has routing capabilities, you know that, right?! [09:52] aliem has joined the channel [09:52] robinduckett: script.runInNewContext, is it blocking? i.e. if I have a script in there that does a setTimeout, will it block whilst it's executing that script? [09:52] rvanrooy: I do, I just started using express with a prior app. express is being ported to run on top of connect [09:55] robinduckett: I'm going to keep a running log of every question asked in this channel, simply because pretty much any question I've asked personally falls on deaf ears :) [09:55] robinduckett: it's cool, I'll find out myself, and then I won't share next time someone asks. [09:55] mAritz: robinduckett: setTimeout is async, but i guess you knew that. since the very essence of node is async code execution, i'd guess runInNewContext is async as well or is planned to be. (don't take my word for it though) [09:56] mAritz: robinduckett: having a bad day, aren't we? :D [09:56] satori_: Well he has a point. I *do* know all the answers, and I'm not telling anyone either. [09:57] rvanrooy_ has joined the channel [09:57] gwoo has joined the channel [09:58] mAritz: satori_: what is the solution to N=NP? TELL ME! [09:58] satori_: nope. [09:58] satori_: (ok a clue..... it's easier than you would think) [09:58] _announcer: Twitter: "Reading: Display your website visitors in realtime on a googleMap using node.js http://bit.ly/9c9cX0 Looking forward to try out some node.js" -- Henning Thies. http://twitter.com/henningthies/status/18982176405 [09:59] mAritz: satori_: really? so instead of impossible it is a little easier than impossible? :P [09:59] SubStack: mAritz: there's no solution, it's just a proporition that is either true or false [09:59] satori_: hehe. Thats what you think. [09:59] SubStack: bah keyboard [10:00] mAritz: god damnit, that doesn't help at all. clues are supposed to help! [10:00] robinduckett: mAritz: 45 minutes late to work and I fell over this morning due to a sinus infection affecting my balance [10:00] satori_: I've said too much. [10:00] robinduckett: so not too good a day no [10:00] robinduckett: sorry [10:00] robinduckett: I tested it [10:00] robinduckett: and my set timeout went away [10:01] _announcer: Twitter: "I appear to be implementing something that is essentially ActiveRecord but for nodejs. Hum.." -- Daniel Assange. http://twitter.com/Lemmata/status/18982275372 [10:01] robinduckett: i.e. the script finished and did not output anything rather than blocking the process until it did [10:01] robinduckett: Does the script object have events? [10:01] robinduckett: can I put an event on it as to artificially block completion of the script until the new context script is done? [10:04] jsilver has joined the channel [10:06] mAritz: robinduckett: hmm... if the settimeout is just ignored, that sounds like a bug. [10:06] mAritz: but i'm sure satori_ could help you :D [10:08] rvanrooy has joined the channel [10:08] sveisvei has joined the channel [10:10] robinduckett: just reading http://github.com/ry/node/blob/master/src/node_script.cc to see if it has any gems [10:12] maushu has joined the channel [10:15] robinduckett: can't replicate the setTimeout being ignored outside of my script so it's probably my code [10:16] mscdex: of course it has no gems, it's javascript, not ruby! [10:16] mscdex: :-D [10:16] robinduckett: ahah [10:16] robinduckett: Actually that was C++ code [10:16] robinduckett: :P [10:16] mscdex: v8 [10:16] mscdex: ;-) [10:16] robinduckett: basically [10:16] raph_amiard has joined the channel [10:17] robinduckett: My problem is, that if I set some variable in the sandbox, I can't read it until the setTimeout is done, but the script skips forward [10:18] robinduckett: http://gist.github.com/482773 [10:18] robinduckett: "2 more seconds" never gets output [10:19] robinduckett: and the script _should_ be taking 4 seconds to complete, but it actually only takes 2 [10:19] robinduckett: real 0m2.046s [10:19] robinduckett: Am I just misunderstanding how it's supposed to work? [10:19] gwoo has joined the channel [10:27] robinduckett: Any clues? Anyone? [10:27] _announcer: Twitter: "undefined variables in #nodejs expose them self as [object global] ( after a Obj.toString ) Nice to know when you need to validate args" -- Arnout Kazemier. http://twitter.com/3rdEden/status/18983431524 [10:29] bvleur: robinduckett: Don't know anything about the context and sanbox stuff, but isn't the last line run immediately, before the timeout has passed and output is set? [10:29] bvleur: of is runInNewContext supposed to be blocking? [10:29] bvleur: s/of/or [10:30] javajunky: not sure why you expect it to take 4 secs . ? [10:30] javajunky: Won't both those setTimeouts effectively fire immediately after each other (after a 2 second pause ?) [10:30] javajunky: to reduce issue possibilities swap to console.log rather than sys.puts .. [10:30] javajunky: ah, I see bvieur has already said that ;) [10:35] robinduckett: javajunky, okay so if that's how it's supposed to work, how am I supposed to get any meaningful information out of the sandbox variable in this kind of situation? [10:35] javajunky: no idea, never used it ;) [10:35] robinduckett: It seems rather pointless to even have a sandbox utility if there's never going to be any way to use it meaningfully. [10:36] satori_: Sandboxing works fine. (though you need to do it in a child proc for real sandboxing) [10:36] javajunky: I'm not entirely sure I follow, your issue is with your setTimeouts firing not when you expect them too ? how does that render sandboxing useless ? [10:37] robinduckett: No [10:37] robinduckett: the setTimeouts fire when I expect them to [10:37] stride: robinduckett: the time you output your cariable "output" it simply is empty, use a callback or something [10:38] stride: s/cariable/variable/ [10:38] robinduckett: stride: how do you suppose I use a callback? [10:38] huyhong has joined the channel [10:39] javajunky: pass a reference to it into the contexts ? [10:39] robinduckett: hmm [10:39] stride: robinduckett: by using setTimeout within your original context followed by a function to call, instead of the other way around, which is what you currently do - want an example? [10:39] robinduckett: not sure if that will work but I will try it [10:39] robinduckett: stride: yes please [10:40] tahu has joined the channel [10:41] maushu: Hmm, I'm going to use redis for most data and mysql for high-value data (accounts, etc). [10:42] robinduckett: maushu: i'mma just use variables for mah dater [10:42] robinduckett: :P [10:42] stride: robinduckett: http://gist.github.com/482773#comments excuse the formatting :) [10:42] maushu: robinduckett: Remind me to not be your user. [10:44] robinduckett: You love me really :D [10:45] robinduckett: stride: thanks but not really what I was getting at [10:45] robinduckett: like, at all [10:45] robinduckett: I'll show you what I was trying now [10:46] stride: could you elaborate on what you want to achieve? my code is just a fix for the output statement in your original [10:46] Egbert9e9 has joined the channel [10:47] robinduckett: stride: how to get the information in the sandbox FOR scripts which are blocking [10:47] _announcer: Twitter: "[Js 人 気 情报] orlandov's node-mongodb at master - GitHub http://bit.ly/awTn4i # javascript" [de] -- jsMagazine. http://twitter.com/jsMagazine/status/18984305877 [10:48] fermion has joined the channel [10:50] stride: don't get it, sorry. you asked how to use the sandboxed output and the new version does exactly that. there's nothing blocking in your code either [10:51] stride: if you want it to take 4 seconds, nest the setTimeouts [10:51] robinduckett: stride [10:51] robinduckett: https://gist.github.com/482773/2264b36e75ccbb13394b01b0bf8980fce45b1c12 [10:51] javajunky: yeah to be honest I'm confused now [10:51] robinduckett: That now works as expected [10:51] robinduckett: However, I don't want to have to rely on a callback inside the eval'd script in order to access the data in the sandbox [10:52] robinduckett: The main problem here is, that this part of node is ill documented and doesn't seem to work in a way that is logical. [10:53] stride: so, essentially, you want my version, without moving the setTimeout [10:53] javajunky: robinduckett: it *appears* from the outside to be consistent [10:53] stride: that's not possible other than the way you do it according to the documentation imho, which seems fairly complete on the script stuff [10:53] robinduckett: stride: yeah, because you can't access the actual sandbox var from inside that callback, it returns as "sandbox" variable is undefined [10:54] robinduckett: and I'd need to access the entire sandbox variable [10:54] stride: robinduckett: that would be logical as it is defined in your regular scope and it's members are used to create the sandbox environment [10:59] robinduckett: okay, so it's logical, it's well documented.. but it doesn't do what I want it to do :P [10:59] javajunky: robinduckett: ah quite probably ;) … what about workers ? [11:00] jwm has joined the channel [11:00] robinduckett: I just want to have a callback when the script is finished running [11:01] javajunky: there's an event for that I think [11:01] javajunky: oh, no wait, perhaps there isn't. [11:01] robinduckett: on the script object? nah I've checked [11:01] robinduckett: it would be SO awesome if there was :( [11:02] javajunky: process.on('SIGHUP'. .. [11:02] javajunky: perhaps [11:02] robinduckett: I suppose I could dump it out to a child process then check when it exits, but then could I get the data back? [11:02] robinduckett: as an object? [11:02] javajunky: a childprocess definitely emits an ex..indeed [11:02] javajunky: stdin, stdout, stderr [11:02] javajunky: :( [11:02] robinduckett: That makes me sad. [11:02] Egbert9e9: How do I get the stable version of git out of git? [11:02] Egbert9e9: err.. stable version of node.js [11:03] robinduckett: git clone git://github.com/ry/node innit? [11:03] robinduckett: pick a branch [11:03] bvleur has joined the channel [11:03] jesusabdullah has joined the channel [11:03] mattly has joined the channel [11:03] zum has joined the channel [11:04] Egbert9e9: so it's remotes/orgigin/stable? [11:04] Egbert9e9: origin [11:04] javajunky: followed by git checkout v0.0.101 [11:05] javajunky: um wtf [11:06] javajunky: git clone git://github.com/ry/node [11:06] javajunky: git checkout v0.0.101 [11:06] javajunky: ? [11:06] Egbert9e9: the website offers v0.1.101, so I guess that's the one I should get? [11:06] javajunky: ah sorry my tag name is probably wrong, I hadn't noticed it was 0.1 already [11:07] maushu: ...wat. [11:07] javajunky: chortle, its been o.1 for like ever [11:07] Egbert9e9: oh, it's alright. I appreciate you help. [11:07] robinduckett: Egbert9e9: if you just do git clone git://github.com/ry/node it will grab the latest stable [11:07] maushu: And it will be for a loong looooong time. [11:07] maushu: ryah is such a troll. [11:08] Egbert9e9: I have a bit trouble groking event based programming [11:08] maushu: When it reaches 0.1.999 it will end up with 0.1.1000, you will see! [11:08] javajunky: robinduckett: technically it will grab *everything* and by default point to master/HEAD which almost by definition is unstable. [11:08] Egbert9e9: I'm used to write very short bash or python scripts -_- [11:08] robinduckett: javajunky: never had any trouble doing it that way :D [11:09] javajunky: robinduckett: sure, thats cool, but for someone knew, if they're going to raise issues they need to be against a proper tag, to avoid confusion [11:09] omarkj has joined the channel [11:09] hojberg has joined the channel [11:09] robinduckett: then download the stable from the website [11:09] robinduckett: job's a goodun [11:11] stride: robinduckett: just glanced over at the source of the script module, don't see an event for you there, sorry [11:11] K`` has joined the channel [11:11] K``: hello there. [11:13] K``: is there a way to make a server (written using node.js) to handle -HUP signal so that it allows to rotate log files? [11:14] stride: process.on('SIGHUP', function () { [11:15] K``: yeah, but how to make it re-open output file? [11:16] stride: close() ist and open() it again? [11:16] K``: eg if command was: "node fancyserver.js > fancy_access.log &", a simple renaming of fancy_access.log won't make node recreate it (because it is being accessed using file descriptor) [11:17] K``: process.stdout.close(); process.stdout.open(); ? [11:17] stride: ah, I see what you mean, no idea, sorry [11:17] jashkenas has joined the channel [11:17] jashkenas: isaacs_home: around? [11:20] stride: K``: if you don't find a solution I suggest dropping the piping on OS level and handle the file yourself within node, there you have access to close() and open() :) [11:20] micheil has joined the channel [11:20] K``: that seems to be the way, yes. [11:24] aheckmann has joined the channel [11:26] eee_c has joined the channel [11:27] Neil has joined the channel [11:27] jashkenas has left the channel [11:27] _announcer: Twitter: "Must Read for all Web Developers: Multi-Core HTTP Server with NodeJS http://bit.ly/dkU0cZ" -- skprasad. http://twitter.com/skprasad/status/18986189923 [11:33] Tim_Smart has joined the channel [11:36] mklappstuhl has joined the channel [11:39] tmedema has joined the channel [11:40] tmedema: Hi folks, I was wondering if there are any other node.js programmers here interested in the stock market.. :) [11:41] robinduckett: tmedema: sup [11:41] tmedema: Just wanted to have a chat in pm [11:45] mscdex: tmedema: expecting a node IPO soon? ;-) [11:45] tmedema: I think you misunderstood me mscdex, I actually mean node programmers who other than programming are also interested in the stock market [11:46] tmedema: Stock market as in unrelated to node [11:46] mscdex: hehe [11:47] javajunky: but no doubt some exciting application opportunity ;) [11:47] tmedema: ^^ [11:47] tmedema: Stock market APIs are expensive [11:47] tmedema: Which is why I'm looking for help [11:49] mape: guess scraping is out of the question [11:49] tmedema: It is if you need to do a lot of queries [11:49] robinduckett: yeah you really need access to a premium API [11:50] tmedema: And the source you want to scrape from is probably delayed a lot mape [11:50] mape: yeah [11:50] K``: some-why process.on('SIGHUP', function() { ... }); does not intercept kill -HUP ; [11:52] mape: tmedema: probly a lot of rules against rebroadcasting the bought APIs as well? [11:52] _announcer: Twitter: "@ Sourcode waiting for hosting the Node.js Thailand has seen a native of ครับ. http://heroku.com/ already available." [th] -- Thai Pangsakulyanont. http://twitter.com/dtinth/status/18987441309 [11:52] mape: Or reselling [11:52] tmedema: mape: yeah, though personally I'm not interested in that [11:58] K``: any clues? [11:59] |Bolt| has joined the channel [12:09] K``: aaah, had to use process.addListener(... [12:11] blackdog has joined the channel [12:13] dnolen_ has joined the channel [12:14] mscdex: K``: yep, .on() wasn't added until after 0.1.100 [12:14] K``: thats strange becouse i just compiled 101 [12:15] pkrumins: anyone knows how to do something like this: [12:15] pkrumins: return scope.Close(Handle(false)); [12:15] pkrumins: otherwise i need to do it in two steps: [12:15] pkrumins: Handle val = Boolean::New(false) [12:15] pkrumins: ; [12:15] pkrumins: return scope.Close(val) [12:16] pkrumins: oh perhaps scope.Close(Boolean::New(false)) [12:16] pkrumins: ACTION triez [12:16] mscdex: heh [12:17] V1: tmedema: You could try and see if you could leverage Yahoo's YQL for the stocks [12:17] satori_: You can use scope.Close(True()) i think [12:17] robinduckett: Boolean::New(false)? [12:17] satori_: True() and False() work too [12:17] robinduckett: C++ is legitimately ridiculous [12:17] pkrumins: robinduckett: no it's not [12:17] pkrumins: robinduckett: it's v8 that uses that style [12:17] pkrumins: satori_: aha! didn't know of those [12:17] robinduckett: s/C++/V8 [12:18] tmedema: V1: I can get stock data from yahoo. Problem is they delay by 20 mins and do not show asian and middle eastern stocks. [12:20] satori_: robinduckett: using v8 with c++ means using classic OO and prototype based OO at the same time. it's a bit a headfuck at first. [12:22] mklappstuhl: tmedema: for realtime data you have to pay right? [12:22] tmedema: mklappstuhl: unfortunately yes [12:23] mscdex: tmedema: what about the google finance api? [12:24] tmedema: mscdex: only returns data from your personal portfolio [12:24] mklappstuhl: mscdex: probably same problem as with yahoo's [12:24] tmedema: and what mklappstuhl said [12:25] tmedema: the biggest problem to me is not that its not realtime, but rather that they do not show asian stocks [12:25] mklappstuhl: tmedema: what do you want to build btw? [12:25] tmedema: mklappstuhl: no public app, just want to analyse [12:26] Tim_Smart: Is there an authoritative source for finance data? [12:27] Tim_Smart: Well be finance data I mean the stock market. [12:27] phiggins has joined the channel [12:27] Tim_Smart: *by [12:28] tmedema: Tim_Smart: no, all exchanges have a monopoly on their own data [12:28] tmedema: They sell real-time data per contract [12:28] Tim_Smart: Urgh. [12:29] tmedema: It's not a transparent economy unfortunately [12:29] tmedema: the world economy that is [12:29] mklappstuhl: tmedema: what does such a contract cost [12:30] tmedema: mklappstuhl: I don't think you can get such contract directly as a private investor.. you probably have to own a big company.. anyway you can get the data from companies who do have the contracts, eg. internationalbrokers.com -- you need to deposit 10K USD and 500 a month for the basic API [12:31] mklappstuhl: haha [12:31] ddollar has joined the channel [12:32] kriszyp has joined the channel [12:32] mscdex: yahoo finance has asian stocks [12:32] mscdex: was there one in particular you're looking for? [12:32] mscdex: or checking for? [12:34] tmedema: No mscdex , but an example is Riken (TYO:6462) [12:34] tmedema: So the symbol is 6462 if I'm correct [12:35] tmedema: mscdex: http://www.wikinvest.com/wiki/Tokyo_Stock_Exchange [12:35] gf3 has joined the channel [12:36] tmedema: Japan has the second largest stock exchange in the world [12:36] tmedema: Yet Yahoo does not seem to offer data for tokyo [12:36] tmedema: nor google [12:36] tmedema: as far as I know [12:37] mscdex: hmmm, they have some asian exchanges but maybe not TYO [12:37] tmedema: (hint web devs) [12:37] mscdex: google does i think [12:37] SubStack: japan also has the second largest nominal gdp by country [12:38] mscdex: tmedema: http://www.google.com/finance?q=TYO:6462 [12:38] _announcer: Twitter: "Translation of documents Node.js API into Russian: http://wp.me/pfjwm-hn" [ru] -- Serge Shirokov. http://twitter.com/kurokikaze/status/18990070945 [12:38] tmedema: mscdex: yeah I know about that unofficial api [12:39] mscdex: ? [12:39] mscdex: it's the same google finance page as for u.s. stocks [12:39] V1: Does anyone here have access to a V8 shell / console? [12:39] tmedema: Oh mscdex I thought you linked http://www.google.com/finance/info?q=TYO:6462 [12:39] mischievious has joined the channel [12:40] mscdex: well whatever works :P [12:40] mscdex: V1: you mean node repl or ? [12:40] tmedema: I shall give it another try, thanks [12:40] V1: nope pure V8 [12:40] _announcer: Twitter: "@ Demetr1us in the next few hours will put on GitHub HTAML. My port * nizatora "Jade" with Node.JS to PHP5.3, devoid of the above deficiencies." [ru] -- ever.zet. http://twitter.com/everzet/status/18990212529 [12:41] V1: Object.prototype.toString.call( undefined ); <-- I wonder node outputs the [object global] or that V8 takes care of that [12:41] _announcer: Twitter: "The next study session. WebSocket If you do, the server side, node.js Ruby Do you want to skip that thought of implementation. You made the decision api or server-side only, get a lot done on the client side." [ja] -- Yuichi Katahira . http://twitter.com/katahirado/status/18990245645 [12:41] V1: i wonder if* [12:42] muhqu has joined the channel [12:43] chrischris has joined the channel [12:43] V1: It would be more consistent with the rest of Obj.toString responses if [object global] would have been [object Global] just like [object Array] [12:44] hdon has joined the channel [12:45] K``: bye. [12:46] mAritz: mauschu: could you tell your pet to not post japanese twits? they're 99% of the time completely useless. (that is 1% more than english twits. and yes, normal people call them tweets... who cares? :P ) [12:48] JimBastard has joined the channel [12:54] V1 has left the channel [12:54] V1 has joined the channel [12:54] V1 has left the channel [12:54] _announcer: Twitter: "Note to self - try and spend some time this month learning some node.js" -- Alex Gibson. http://twitter.com/alex_gibson/status/18991050991 [12:54] V1 has joined the channel [12:54] V1: -_- wrong button [12:54] V1 has left the channel [12:55] V1 has joined the channel [12:55] V1: -_- [12:56] mscdex: tmedema: it seems you can also use the Google Spreadsheet API to access stock quote info too [12:57] tmedema: I know mscdex, then again there is a very easy json api [12:57] pkrumins: just released node-bufferdiff -- determine if two buffers are equal, fast (as fast as memcmp() is). [12:57] tmedema: so access is not the problem mscdex [12:57] mscdex: ok [12:57] tmedema: thanks though [12:57] tmedema: I am going to work with google again for a while see how it goes [13:01] jherdman has joined the channel [13:01] ben_alman has joined the channel [13:03] _mythz has joined the channel [13:06] pdelgallego has joined the channel [13:07] tmedema: mscdex: I remember the problem with google. For example, systemair (symbol SYSR).. yahoo: http://finance.yahoo.com/q?s=SYSR.ST google: http://www.google.com/finance?q=STO:SYSR [13:08] tmedema: Now I'm not sure what party is wrong. Either google is right, the company is no longer listed. Or yahoo is right and google simply doesn't list it's data [13:08] tmedema: Though yahoo's data here seems broken [13:09] tmedema: Or maybe not.. not sure. [13:09] V1: wtf.. I thought NaN stood for Not a Number.. Seems like JavaScript thinks otherwise: Object.prototype.toString.call( NaN ) => '[object Number]' [13:10] Lazesharp: isn't NaN a number object that holds an erroneous representation? [13:11] kersny has joined the channel [13:13] V1: Probably but still weird that something like "not a number" actually represents a number [13:15] davidsklar has joined the channel [13:15] tmedema: V1 probably because a float has to be a number [13:15] behmann has joined the channel [13:16] zapnap has joined the channel [13:17] V1: tmedema: That would make sense [13:19] virtuo has joined the channel [13:21] _announcer: Twitter: "It's gonna rock when webOS gets Node.js at its core." -- Kyle Simpson. http://twitter.com/getify/status/18992840779 [13:30] Connorhd_ has joined the channel [13:30] _announcer: Twitter: "Looks like yahoo intend to do with nodejs request route." [zh-CN] -- Zizon. http://twitter.com/zizon/status/18993419313 [13:30] argon_ has joined the channel [13:30] argon_: Connorhd_ hi! [13:30] Connorhd_: hi [13:36] Neil__ has joined the channel [13:46] pgriess has joined the channel [13:46] gf3: V1: http://img.gf3.ca/59a427698702131d70cbe269123e79d8.png [13:47] hpoydar has joined the channel [13:47] gf3: V1: probably a combo of Object's toString output and http://img.gf3.ca/c9c0f2bcf2fbd755d79f7886606a5a88.png [13:49] maushu: Hai gf3! [13:49] gf3: yao maushu, soup? [13:49] maushu: NaN is not a number dammit. [13:50] maushu: *N*ot *a* *N*umber <- HINT. [13:50] maushu: Slap that bot around. [13:51] davidwalsh has joined the channel [13:51] _announcer: Twitter: "Running a full backup so I can easily replace my dev box with the new iMac i5 that arrives today!! Quad Core node.js hacking soon.." -- Dav Glass. http://twitter.com/davglass/status/18994869289 [13:51] jesusabdullah has joined the channel [13:52] _announcer: Twitter: ""Interview with a devil"... node.js and the middle-end http://bit.ly/b2SAvO" -- Kyle Simpson. http://twitter.com/getify/status/18994977232 [13:55] mattvermaak has joined the channel [13:56] JimBastard: V1: NaN hell, lol [13:57] JimBastard: V1: for numbers, check ou tthese tests http://github.com/Marak/javascript-fu/blob/master/test/isFu-test.js#L61 [13:59] kriszyp has joined the channel [14:02] V1: Thanks gf3 and JimBastard ;D [14:02] jherdman has joined the channel [14:02] JimBastard: V1: i'd really love to finish that library i linked you, its been like 80% done for a while [14:02] JimBastard: helps out in a lot of tricky type cases [14:02] JimBastard: where you get unpected results [14:04] V1: I basically just needed someway of validating arguments that where send to a function. But i just settled with object Number. If users going to supply me with NaN instead of a number they are just dumb fucks. [14:05] mklappstuhl has joined the channel [14:05] JimBastard: yeah V1 we have isNumber() [14:06] V1: But the library looks nice JimBastard, will certainly come in useful sometime :) [14:06] JimBastard: implementing that one method once is quick and easy though, you dont need al ib [14:06] JimBastard: a lib [14:06] JimBastard: yeah V1 its just been hard to finish it, no time / no immediate need [14:06] JimBastard: its a tool to help people who dont know JS very well [14:08] V1: One thing I see wrong with your library is the isDefined function [14:08] V1: var defined = "undefined"; isDefined( defined ) [14:09] V1: That will most likely be true. [14:09] micheil: you'd need to strictly check for var === undefined [14:09] maushu: JimBastard: So, my archenemy. How is your project going? [14:10] V1: JimBastard: This is how validate if argument is truely undefined: http://github.com/3rd-Eden/node-memcached/blob/master/lib/utils.js#L43 [14:10] quirkey has joined the channel [14:10] JimBastard: V1: if there is an issue you should comment on the line / commit. dont have time to look now in standup lol [14:10] _announcer: Twitter: "Wow, dead simple Web Sockets for #ruby or #node.js. http://faye.jcoglan.com/" -- Joe McCann. http://twitter.com/joemccann/status/18996246258 [14:10] JimBastard: maushu: very well. [14:10] JimBastard: :-D [14:11] V1: Will do JimBastard [14:11] maushu: JimBastard: LIES! I WILL DESTROY YOU! MWAAHAHAHAHAHAHAHA [14:11] k23z: maushu: ? [14:12] maushu: k23z: What? Never seen friendly competition? [14:12] virtuo has joined the channel [14:12] k23z: er [14:13] _announcer: Twitter: "Seriously, if NodeJS/Ruby fibers seem neat to you, head over to http://bit.ly/dCqcnQ to get your mind blown." -- Kimberly . http://twitter.com/kimweber8/status/18996457579 [14:14] ceej has joined the channel [14:15] _announcer: Twitter: "Who's coming with me?? Node.js 48hr competition: http://nodeknockout.com/" -- Adam Crabtree. http://twitter.com/CrabDude/status/18996589444 [14:16] _announcer: Twitter: "Node Knockout: 48 hr node.js competition, who's interested in teaming up? http://nodeknockout.com/" -- Dallas JS. http://twitter.com/DallasJS/status/18996655204 [14:23] _announcer: Twitter: "Node.js examples: Wargamez http://bit.ly/bcjNtN Hummingbird http://bit.ly/dmUvzM Lazeroids http://bit.ly/dgZp6J Github http://bit.ly/dwyhpc" -- Dallas JS. http://twitter.com/DallasJS/status/18997171901 [14:27] behmann_ has joined the channel [14:29] quirkey has joined the channel [14:30] joshbuddy has joined the channel [14:31] tekky has joined the channel [14:33] bradleymeck_ has joined the channel [14:35] b_erb has joined the channel [14:35] ChrisRicca has joined the channel [14:37] bradleymeck_: it tars up when you publish things [14:37] bradleymeck_: mt [14:39] siculars has joined the channel [14:41] TheEnd2012 has joined the channel [14:44] robinduckett has joined the channel [14:45] robinduckett: yo [14:46] steadicat has joined the channel [14:47] mAritz: *testing wargamez* [14:47] maushu: NIEN [14:47] mAritz: :( [14:47] maushu: ACTION fires at mAritz. [14:48] mAritz: does it only recognizes some names? [14:48] maushu: No. [14:48] mAritz: but? [14:48] mAritz: why is it ignoring me? [14:48] maushu: It doesn't like you. [14:48] maushu: mAritz: pow! [14:48] mAritz: :*( [14:48] mAritz: maushu go moo! [14:49] maushu: ACTION pokes mape. [14:49] mape: mAritz: ? [14:49] mAritz: wargamez doesn't show me [14:49] mape: * maushu [14:49] mAritz: oh wait... camouflage tent might be the reason. 1 sec [14:50] mAritz: nope, still nothing [14:50] maushu: Or the geoip doesn't work for you. [14:50] maushu: Stop using the internet on mars. [14:50] mAritz: *shakes fist* [14:51] mAritz: maybe the openair festival outside my window is jamming the signals? [14:51] sudoer has joined the channel [14:54] maushu: mAritz: The big brother eye can't see you with that festival there. [14:54] rwaldron has joined the channel [15:04] devongovett has joined the channel [15:04] [[zz]] has joined the channel [15:06] mAritz: maushu: should i use mongodb 1.4.4 or 1.5.5? are there any important new features in 1.5.5? [15:07] bradleymeck_: is there a way fro script.runInNew Context to reuse the same context without clearing it [15:07] quirkey_ has joined the channel [15:09] CrabDude has joined the channel [15:13] mtodd has joined the channel [15:20] ThePub has joined the channel [15:21] ThePub has joined the channel [15:22] ewdafa has joined the channel [15:24] Yuffster has joined the channel [15:24] cleverscale has joined the channel [15:25] jspiros has joined the channel [15:25] cleverscale: Hi #Node.js [15:26] sveimac has joined the channel [15:26] cleverscale: does anyone know how to limit stream rate like in "curl --limit-rate"? [15:27] _announcer: Twitter: "some things people are making with #node.js and #html5 http://bit.ly/9VqrSl http://bit.ly/agPxkz http://bit.ly/c204gx" -- nathan. http://twitter.com/webr3/status/19001801651 [15:27] charlenopires has joined the channel [15:27] benburkert has joined the channel [15:28] robinduckett: cleverscale [15:29] robinduckett: trickle? [15:30] cleverscale: @robinduckett, thank you, i'll look at this [15:31] fdmanana has joined the channel [15:32] _announcer: Twitter: "@DallasJS Scary thought, competing in nodejs ko means that @jresig, and Brenden Eich will see our app, and our code >.< /faints" -- Stephen Middleton. http://twitter.com/Rixius/status/19002178776 [15:32] cirwin has joined the channel [15:34] maushu: I wonder if graphnode is such a good name. Hmmm. [15:34] micheil: graphnode? [15:34] maushu: My startup name. [15:35] maushu: It's completely original, well, besides being used in java classes. [15:35] maushu: :p [15:35] micheil: eww.. java :P [15:35] micheil: I'm brandedcode / ideocase [15:35] cleverscale: does anyone know how to limit stream rate with Node.js like in "curl --limit-rate"? [15:35] aurynn has joined the channel [15:35] micheil: cleverscale: explain that functionality please. [15:36] cleverscale: I'm doing a server that uploads a file to a client and I'd like to limit the download rate [15:36] maushu: cleverscale: The number of bytes per interval of time? [15:37] cleverscale: limit on upload/download rate in kbps for example [15:37] bradleymeck_: stream.pause [15:37] maushu: Well, you are pumping the file into the socket, right? [15:38] maushu: Count the number of bytes, if it reaches the limit inside a second (use setTimeout or setInterval) make it pause. [15:38] cleverscale: ok, the server download a stream from S3 and forward to client [15:39] Ori_P has joined the channel [15:39] cleverscale: thank you maushu [15:40] cleverscale: however due to slow start of http I'll obtain lower rate [15:40] JimBastard has joined the channel [15:40] cleverscale: ok, i'll set a higher limit but [15:41] cleverscale: oups, slow start tcp [15:41] maushu: Unpause it every second or so... well it's a little complicate, you need to juggle a time interval with the file download. [15:42] cleverscale: yes and polling is not exactly Node.js idea... [15:42] maushu: Let's see... make the setInterval of one second unpause the stream every time and in the downloader pause the stream everytime it reaches the byte limit. [15:42] maushu: That should work. [15:44] cleverscale: it works but it uses kind of every second measure which is not so scalable, or am I wrong? [15:44] maushu: Use the sys.pump to pump the bytes from the file stream to the downloader stream.. no wait, I don't think you can pause the pump in the middle. [15:44] maushu: cleverscale: Define scalable and how it relates to the second. [15:44] jesusab-work has joined the channel [15:45] maushu: The second is not an "second". It's every second since the download started. 1000 ms. [15:46] maushu: Of course, if you have a really fast server you will probably upload the file in the first 200ms and the rest will be idle. Good thing node.js is async that means the rest of the time can be used to upload *other* users. [15:46] cleverscale: if I make on operation every second for every concurrent download, it's not scalable for me, from a theoretically point of view [15:46] cleverscale: but maybe I'm wrong [15:47] maushu: Hmmm, I don't see it. [15:47] maushu: When you pause the stream other streams from other users get their turn. [15:47] maushu: They would get their turn either way, since the stream pumping is async. [15:48] cleverscale: ok, got it, it's scalable from a system point of view [15:48] tjholowaychuk has joined the channel [15:48] CrabDude has joined the channel [15:48] maushu: Unless you read the file in sync or send the file in sync, it should work. [15:49] maushu: (Hint: Never say that nothing will go wrong. Murphy is always listening.) [15:49] cleverscale: I was looking at overall complexity (many measures) [15:49] bean0r1___ has joined the channel [15:49] _announcer: Twitter: "Interesting - node.js knockout - Server-side Javascript competition: http://ht.ly/2e0oK #javascript #node.js #ruby" -- Manu Sporny. http://twitter.com/manusporny/status/19003430494 [15:50] cleverscale: thank you for advises [15:51] cleverscale: I'll try throughput compared to "curl --limit-rate" [15:52] cleverscale: does anyone know if "QoS" (like "curl --limite-rate") is planned in a further version of Node.js ? [15:53] _announcer: Twitter: "That's good. Now it makes sense. I somehow found a weakness Node.JS" [ja] -- KOBA789. http://twitter.com/koba789/status/19003669535 [15:55] MikeSmith has joined the channel [15:55] JimBastard: cleverscale: dont cross the streams [15:56] bradleymeck_: cleverscale pause does what you want even curl uses timers behind the scenes, the OS will buffer what it gets in even if it is over the limit [15:56] _announcer: Twitter: "Nginx + Node.JS × (Perl + PHP + Ruby + Python) = strongest. In other words, Nginx to proxy the Node.JS of httpd, Node.JS hope to hit the interpreter. Oh, very efficient (a mystery" [ja] -- KOBA789. http://twitter.com/koba789/status/19003881587 [15:56] bradleymeck_: anyone have an idea of how to start a repl that is inside a Script.runInNewContext? [15:57] cleverscale: Thank you bradleymeck_ [15:57] ChrisRicca: I love the translated twitter bot. [15:57] cleverscale: @JimBastard: ??? [15:57] MikeSmith: ACTION wonders why http://wargamez.mape.me thinks he's in Australia [15:57] amerine has joined the channel [15:57] bradleymeck_: proxy? [15:57] JimBastard: ChrisRicca: :-) [15:58] SubStack: wow awesome [15:58] JimBastard: !translate English:Spanish give me tacos please [15:58] _utility: por favor dame tacos [15:58] JimBastard: i got a little translate module http://github.com/Marak/translate.js [15:59] JimBastard: nothing too special, but it wraps google nicely [15:59] SubStack: ACTION wonders why he doesn't show up on the map [15:59] JimBastard: SubStack: i saw your update btw, good stuff. we were talking about our RMI stuff last night, we are still a few months away from that, but we are gonna do something for sure [16:00] jesusab-work: rmi? [16:00] SubStack: ^_^ [16:00] JimBastard: remote method invocation [16:00] jesusab-work: ah [16:00] SubStack: JimBastard: whereat? [16:00] jesusab-work: nodejitsu? [16:00] SubStack: oh neat [16:00] JimBastard: SubStack: ? you mean where im planning on using? [16:00] JimBastard: yeah nodejitsu [16:00] SubStack: er, where were you talking, I mean to say [16:00] SubStack: ah right [16:00] technoweenie has joined the channel [16:01] JimBastard: we might just rip out a small part of your lib / write it ourselves since there is already a json-rpc api in play [16:01] JimBastard: we might have a protected api method for rmi [16:01] SubStack: nifty [16:01] SubStack: yeah, the scrubber should be easy to rip out [16:01] jesusab-work: So, possibly dumb question: Does javascript have a notion of slicing? Like, a[0:4] in python or a(1:4) in matlab? [16:02] tjholowaychuk: JimBastard: which jsonrpc lib are you using? [16:02] JimBastard: jesusab-work: slive on arrays? [16:02] jesusab-work: Yeah [16:02] SubStack: jesusab-work: a.slice(0,4) [16:02] jesusab-work: ah [16:02] jesusab-work: thanks! [16:02] bradleymeck_: jesusab not really it does copies [16:02] JimBastard: tjholowaychuk: im using journey right now, but journey doesn't "enforce" the rpc part [16:02] jesusab-work: I'm okay with copies [16:02] JimBastard: was thinking of patching it, still considering [16:02] tjholowaychuk: JimBastard: gotcha [16:02] jesusab-work: CLOSE ENOUGH. [16:02] JimBastard: json-rpc is just a wrapper pretty much, its somewhat trivial [16:03] technoweenie has left the channel [16:03] tjholowaychuk: hm yeah just looks like a router that always responds with json [16:03] tjholowaychuk: I have a json rpc 2.0 implementation [16:04] cirwin: ACTION thinks he is missing something obvious - how do I get http.Client to timeout? [16:04] JimBastard: cirwin: thats a good question [16:05] cirwin: it seems I want to call destroy() on the stream - but I don't know how to do that [16:05] JimBastard: i cant remember the exact solution, fuck. i was having that problem last night too [16:05] richcollins has joined the channel [16:07] khug has joined the channel [16:10] jakehow has joined the channel [16:10] PyroPeter has joined the channel [16:13] bradleymeck_: client.connection.destroy? [16:14] tjholowaychuk: Rauch man in here? [16:15] tyfighter has joined the channel [16:15] mostlygeek has joined the channel [16:16] MikeSmith: !translate English:Japanese give me tacos please [16:16] _utility: 私にタコスを与えてください。 [16:17] powdahound has joined the channel [16:18] bradleymeck_: does tautologistics htmlparser have a streaming out (saxlike interface)? [16:18] Yuffster has joined the channel [16:18] MikeSmith: !translate Japanese:English 僕にたこをあげて [16:18] _utility: You give me a kite [16:20] derferman has joined the channel [16:21] rwaldron has joined the channel [16:23] rwaldron has left the channel [16:23] JimBastard: MikeSmith: how off is it lol [16:25] cirwin: bradleymeck_: thanks a lot [16:25] SubStack: JimBastard: also what is nodejitsu [16:25] JimBastard: www.nodejitsu.com [16:25] naveen has joined the channel [16:25] SubStack: times out [16:26] JimBastard: i think there is a DNS issue for international [16:26] SubStack: "This webpage is not available." [16:26] JimBastard: automagic application deployer for node.js apps. [16:26] JimBastard: one sec [16:27] JimBastard: try http://nodejitsu.com/ maybe [16:27] JimBastard: im actually not sure why some people cant resolve the url, its strange [16:27] JimBastard: what happens when you ping www.nodejitsu.com ? [16:27] JimBastard: SubStack: nodejitsu is primarly powered by broodmother (http://github.com/Marak/broodmother) [16:27] JimBastard: we havent released the source code yet, but its pretty well along. have had alpha version running in production for a while [16:27] SubStack: ping: unknown host www.nodejitsu.com [16:28] jesusab-work: Weird [16:28] JimBastard: PING www.nodejitsu.com (174.143.181.51): 56 data bytes [16:28] jesusab-work: Works great for me >_< [16:28] JimBastard: i think its rackspacecloud dns [16:28] jesusab-work: I can load Keanu like nobody's business [16:28] JimBastard: SubStack: does this work? www.asciimo.com [16:28] SubStack: jesusab-work: odd, from campus? [16:28] JimBastard: the www record for asciimo actually should show keanu [16:28] jesusab-work: SubStack: Hell yeah from campus [16:29] SubStack: could be ACS being fail again [16:29] jesusab-work: Speaking of asciimo, I saw something yesterday [16:29] jesusab-work: hold on [16:30] SubStack: JimBastard: that works [16:30] jesusab-work: JimBastard: http://caca.zoy.org/wiki/toilet [16:30] jesusab-work: I'm guessing asciimo is pure JS though, huh? [16:30] JimBastard: --filter gay [16:30] JimBastard: lol [16:30] JimBastard: yeah jesusab-work its pure JS [16:30] jesusab-work: (Well, if it's for the browser) [16:30] jesusab-work: *nod* [16:31] JimBastard: but check this out, one sec [16:31] JimBastard: jesusab-work: http://i.imgur.com/Ovkol.png [16:32] JimBastard: not that detailed. toliet might be worth looking into eventually [16:32] JimBastard: so you can apply color'd filters or something [16:32] JimBastard: i dont want to get toooo crazy [16:32] JimBastard: its just ascii art [16:32] JimBastard: ive got some other features on the back burner for that [16:32] jesusab-work: Hah [16:32] jesusab-work: colors AND ascii! [16:32] jesusab-work: Now that's just crazy [16:32] JimBastard: img=>ascii text is a big one [16:32] jesusab-work: Yeah, was just looking at stuff to do that [16:32] jesusab-work: 's how I found toilet [16:32] WALoeIII has joined the channel [16:32] jesusab-work: same dudes made libcaca [16:33] creationix has joined the channel [16:33] JimBastard: all hail creationix [16:33] JimBastard: jesusab-work: asciimo works on the server with node.js too [16:34] creationix: JimBastard: sup [16:34] JimBastard: it does console output [16:34] JimBastard: just saying hello [16:34] SubStack: for why? [16:34] rednul has joined the channel [16:35] bradleymeck_: mmm recommendations on a sax parser that somewhat handles screwy html? [16:35] pkrumins: hey creationix, did you figure out that slowliness of 1000000 array elements? [16:35] pkrumins: creationix: just curious. [16:35] creationix: pkrumins: it ended up not being the array at all [16:36] creationix: It was 1000000 process.nextTick events [16:36] creationix: that internally shifts off the queue for each one [16:36] pkrumins: oh [16:36] creationix: and shift is horrible with large lists [16:36] creationix: (so I guess it was an array, but not the one I was looking at) [16:37] qFox has joined the channel [16:37] creationix: I think process.nextTick will be a lot faster when ryah get's done refactoring events to play nice with dtrace [16:38] brianmario has joined the channel [16:38] manveru: bradleymeck_: libxml? [16:38] pkrumins: roger [16:39] manveru: bradleymeck_: not sure if there are bindings for node though [16:40] jesusab-work: manveru: There are. I was looking for them the other day! [16:40] jesusab-work: bradleymeck_: ^^ [16:43] benburkert has joined the channel [16:46] ben_alman has joined the channel [16:47] bpot has joined the channel [16:48] pavan_ has joined the channel [16:49] jesusab-work: Oh man, I just discovered laseroids [16:49] jesusab-work: The sound effects are killer! [16:49] jesusab-work: "Pew! Pew!" [16:49] bradleymeck_: w = win [16:51] bpot_ has joined the channel [16:53] tjholowaychuk: ACTION looks at Geddy's internals [16:57] jesusab-work: I'm looking at wargamez.mape.me, and [16:57] jesusab-work: are a bunch of you in Austin? [16:57] dgathright has joined the channel [16:57] bradleymeck_: moi [16:57] jesusab-work: Hah! [16:57] jesusab-work: I was there just a few weeks ago :) [16:57] jesusab-work: HUMID! [16:57] jesusab-work: and jacked up streets [16:57] bradleymeck_: cozy [16:57] jesusab-work: but I had a good time [16:58] bradleymeck_: nice :) [16:59] bradleymeck_: bbq is amazing here so i aint got any complaints [16:59] jesusab-work: I went to, umm [16:59] jesusab-work: shit, what's that place? [16:59] stepheneb has joined the channel [16:59] jesusab-work: It's like [16:59] jesusab-work: somebody's barbecue and general store [16:59] tjholowaychuk: aheckmann: yo [16:59] jesusab-work: I think there are a few of them [16:59] jesusab-work: but that was fun [16:59] jesusab-work: I had a Hell of a time finding coffee within walking distance of where I was, though! [17:00] jesusab-work: I ended up asking /r/austin for help [17:00] bradleymeck_: where were you ? [17:00] jesusab-work: Houndstooth is awesome, though! I recommend it. [17:00] jesusab-work: Umm, corner of Guadalupe and MLK [17:00] jesusab-work: So, there was a place not too far up the street [17:00] jesusab-work: but I wasn't huge on it [17:00] JimBastard: sends a missle at jesusab-work [17:00] jesusab-work: The one with the robot seats [17:00] SubStack: hot climates suck for finding coffee [17:01] jesusab-work: Yeah, it was weird. There *are* good coffee places in Austin. Like, there's a coffee snob subculture there [17:01] jesusab-work: but there's enough urban sprawl that you have to actually search them out, or at least go for a drive [17:01] jesusab-work: whereas in Alaska you can often throw a rock randomly and hit a drive-through coffee stand [17:01] jesusab-work: ...anyway. [17:01] gf3: well you could drive to canada and get Tim Hortons [17:02] jesusab-work: I COULD [17:02] gf3: EASY [17:02] jesusab-work: I still haven't tried Tim's [17:02] jesusab-work: I'd like to though! [17:02] gf3: Don't do it [17:02] gf3: It's the goddamn worst [17:02] jesusab-work: pffsht [17:02] gf3: tjholowaychuk: yao [17:03] jesusab-work: Can't be worse than the AT&T Conference Center hotel coffee! [17:03] tjholowaychuk: gf2: what up [17:03] jesusab-work: God that shit was gross [17:03] gf3: tjholowaychuk: could I see that link to your CI server? [17:03] gf3: jesusab-work: trust man, it's addictive, but terrible [17:03] bradleymeck_: bleh, expat and libxml are too strict [17:03] jesusab-work: hah [17:03] mjr_ has joined the channel [17:03] tjholowaychuk: gf3: nevaaa :p howcome? [17:03] jetienne has joined the channel [17:04] gf3: tjholowaychuk: hah, I was actually interested in the design [17:04] tjholowaychuk: gf3: really? it does not have much of a design lol http://ec2-75-101-226-182.compute-1.amazonaws.com:8889/ [17:04] benbinary has joined the channel [17:05] gf3: tjholowaychuk: that's why it's so beautiful [17:05] tjholowaychuk: fair enough :D [17:05] benbinary has joined the channel [17:06] gf3: tjholowaychuk: thanks [17:06] tjholowaychuk: gf3: np [17:06] Fhoughersoguhesg has joined the channel [17:06] Lazesharp: hmm, does http.ServerResponse.write() chunk data automatically? [17:06] jansc has joined the channel [17:07] Xavura has joined the channel [17:08] _announcer: Twitter: "48 hours. The # 4-Coder node.js Contest. More info at http://nodeknockout.com/" [de] -- Tim Latz. http://twitter.com/iuvare/status/19008825003 [17:09] jesusab-work: Oh man, six weeks [17:09] jesusab-work: It'll be cool to see what comes outta that [17:09] jesusab-work: SubStack, pkrumins: Wanna node knockout? :v [17:09] SubStack: perhaps [17:10] jesusab-work: Not to distract from stackvm, but [17:10] jesusab-work: could be fun! [17:10] pkrumins: what is it? [17:10] jesusab-work: http://www.nodeknockout.com [17:10] SubStack: 48 hours, build something awesome [17:10] jesusab-work: Basically, yeah [17:10] pkrumins: build nodechess?! [17:10] pkrumins: could do that! [17:11] jesusab-work: Hmm! [17:11] jesusab-work: I should really get my hands dirty with dnode [17:11] jesusab-work: so I can play along [17:12] jesusab-work: Jesus, lotta groups [17:12] SubStack: pkrumins: yes [17:12] SubStack: this [17:12] jesusab-work: chess?! [17:12] JimBastard: !tweet @iuvare i heard nodeknockout was already over and the NYC Nodejitsu Ninjas won every single prize [17:12] jesusab-work: But ONLY if it's like battle chess [17:12] jesusab-work: WAT [17:13] SubStack: batchess was awesome [17:13] jesusab-work: OH MAN THOSE ARE FIGHTIN WORDS [17:13] SubStack: s/was/is still/ [17:13] creationix: JimBastard: abusing the system again I see [17:13] jesusab-work: batchess? [17:13] JimBastard: creationix: the system can't hold me back! [17:13] jesusab-work: dammit dr. Beuler, I need you! [17:13] SubStack: jesusab-work: the dos program I thought you were refering to [17:13] jesusab-work: Oh [17:13] JimBastard: i know these two guys who are juding the contest, im going to send them strippers and booze [17:13] jesusab-work: it might've been [17:13] jesusab-work: I saw it on Mac OS 8 or so [17:13] JimBastard: total bribe time [17:14] blaze-x: I'm wondering if there is an idiom to make calls synchronious? I have read about promises, they have been removed IIRC. [17:14] JimBastard: blaze-x: careful, ryah might hunt you down [17:14] JimBastard: blaze-x: i dove pretty deep into that rabbit hole [17:14] JimBastard: you should just give up on the syntax sugar and accept the async [17:15] SubStack: blaze-x: just build a fluent interface [17:15] jesusab-work: I thought I saw some libraries [17:15] blaze-x: JimBastard: well, I'm trying to, I suppose this is one of these 'goto' questions :) [17:15] JimBastard: blaze-x: i got you, one sec [17:15] blaze-x: but I need to output to STDERR like, _now_ [17:15] stagas has joined the channel [17:15] JimBastard: blaze-x: knock yourself out http://gist.github.com/443256 [17:15] blaze-x: so I could collapse a tree of lambda's but that would make me code like a monkey just to get my output in a variabe [17:16] blaze-x: JimBastard: thank you [17:16] JimBastard: lol..... [17:16] SubStack: er, why would output be async? It usually doesn't return. [17:16] JimBastard: have fun with that goto [17:16] JimBastard: i feel evil [17:16] isaacs has joined the channel [17:16] blaze-x: JimBastard: exactly what I needed, thanks. [17:16] JimBastard: blaze-x: whats your issue exactly? [17:17] JimBastard: blaze-x: lol wut no, that was me trolling you [17:17] _announcer: Twitter: "[Js Popular Information] Multi-Core HTTP Server with NodeJS (Yahoo! Developer Network Blog) http://bit.ly/drchjf # javascript" [ja] -- jsMagazine. http://twitter.com/jsMagazine/status/19009403895 [17:17] creationix: Step is awesome [17:17] jesusab-work: Step! [17:17] jesusab-work: That's what I was thinking of! [17:17] rauchg_ has joined the channel [17:17] blaze-x: JimBastard: I know I know, just that I'm learning the language, I might recode later, just need a quick sync() now [17:17] jesusab-work: blaze-x: http://github.com/creationix/step [17:17] blaze-x: JimBastard: well, I'm writing my 'warn' function, as I do in any language I'm trying to learn [17:17] JimBastard: i gotta grab some food, someone please make sure that blaze-x doesnt use that JS GOTO code i sent him [17:18] creationix: blaze-x: node has sync versions of many of the functions, but they will kill your event loop in any real load [17:18] JimBastard: or try to write sync methods [17:18] blaze-x: JimBastard: and, well, since vim has syntax highlighting, and f(){}.toString() works... well :) [17:18] DozyPieman has joined the channel [17:18] creationix: but it's impossible to wrap an async function to look sync [17:18] creationix: in node at least [17:18] blaze-x: I don't really need to be sync, but I have trouble wrapping my mind around this, maybe someone can enlighten me: [17:18] creationix: blaze-x: well, Step helps [17:18] creationix: the truth is, it's a hard problem and there is no good solution [17:19] JimBastard: blaze-x: you gotta read some articles about flow control [17:19] creationix: I've made half a dozen control-flow helper libraries [17:19] JimBastard: aye [17:19] JimBastard: howtonode.org [17:19] JimBastard: ^^ [17:19] JimBastard: lunche, brb [17:19] creationix: yeah, my earlier articles explain some of my early attempts [17:20] creationix: blaze-x: also if you come from Dojo, there are promises too, they just don't have "wait()" [17:20] blaze-x: I wrote this: var vim = spawn(....); vim.stdin.write('f() { 1+1}'); Now I want to get the output [17:20] creationix: http://github.com/kriszyp/node-promise [17:20] creationix: blaze-x: add a listener for data events on stdout [17:20] blaze-x: I know I could do vim.stdout.on('data',....); but that would be too late in return [17:20] creationix: blaze-x: what do you mean too late? [17:21] blaze-x: creationix: ok, and how do I know the listener is done? (ie: not vim.on('exit') [17:21] creationix: all streams have "data" events and an "end" event [17:21] blaze-x: well, vim colorizes my output (just for fun code, nothing serious), I need to get that in a variable and output it too [17:21] Blink7 has joined the channel [17:21] creationix: blaze-x: yeah, so write an async function, it takes a callback [17:21] creationix: then on each data event buffer the result [17:21] blaze-x: but I am quite sure I'm missing something obvious here. I do a lot of functional programming in perl, but must admit that I'm not a lisper yet [17:22] tmedema: is there an API to get the current system time ? [17:22] creationix: then on "end" combine the buffer and pass it all to the callback [17:22] stagas: what's the event when the client closes the tab / leaves the site [17:22] creationix: blaze-x: it's not about functional vs oo, it's just events and callbacks [17:22] creationix: node is mainly about blocking vs non-blocking [17:22] creationix: tmedema: there is the js Date class [17:22] blaze-x: I'm going to give it another shot, see where it gets me, [17:22] creationix: Date.now() will give you a unix timestamp [17:23] stagas: is there any? [17:23] blaze-x: one thing though, node ROCKS! :) [17:23] xer0xM has joined the channel [17:23] creationix: blaze-x: yes, it takes some getting used to [17:23] gf3_ has joined the channel [17:23] tmedema: ah alright creationix, I'm not using javascript but I can probably wrap it [17:23] creationix: tmedema: I'm sure libev has something [17:24] creationix: tmedema: it's gettimeofday at the kernel level I think [17:24] tmedema: I need to call a child process then? [17:24] creationix: tmedema: or better look at the v8 api [17:24] creationix: tmedema: what are you writing? [17:25] jspiros has joined the channel [17:26] mklappstuhl has joined the channel [17:26] blaze-x: hmmm... I think I still don't got it, say I already have this: f(a,b,c) { sys.puts a+b+c }; and I changed it to do this: f(a,b,c) { sys.puts a+b+vim_color(c) } [17:26] blaze-x: vim_color is a spawned process. [17:26] CIA-64: node: 03isaacs 07master * rd75b63b 10/ (3 files in 3 dirs): [17:26] CIA-64: node: Support including modules that don't have an extension. [17:26] CIA-64: node: This way, require("/foo") will work if there is a "foo.js", or a file named [17:26] CIA-64: node: simply "foo" with no extension. - http://bit.ly/aqydqW [17:26] tmedema: creationix: basically need to app to tell me whether it is between GMT- 7 08:30 and 16:00, if so for howmuch longer and if not howlong till its 08:30 GMT - 7 again. My system will be at GMT + 2 so I just need to get system time and convert it [17:27] creationix: blaze-x: non-blocking/async function don't return the value [17:27] creationix: you can't use them inline like that [17:27] tilgovi has joined the channel [17:27] blaze-x: creationix: ok, that I understand. [17:27] creationix: you have to give them a callback and then when it's called put the data together [17:27] pkrumins: ACTION SubStack and jesusab-work have signed up for node.js KO! [17:28] blaze-x: creationix: could you give an example of what direction you would code in? [17:28] jesusab-work: whoo [17:29] creationix: blaze-x: https://gist.github.com/beddc944da994340082c [17:29] creationix: does this make sense? [17:29] jesusab-work: Any of you ever look at LabVIEW? It's used for instrumentation and automation usually [17:30] creationix: tmedema: is it a node app (written in js) [17:30] jesusab-work: It uses a graphical dataflow kinda language [17:30] tmedema: creationix: it is compiled to js yeah, I write it in haXe though [17:30] jesusab-work: Which isn't exactly awesome for doing anything nice in, but you can also literally *see* the asynchronous parts [17:30] tmedema: I will create a javascript date wrapper creationix [17:30] blaze-x: creationix: it does, that what I also have written, now I'm wondering how to glue these ie [17:30] creationix: tmedema: then you still have access to the Date class I think [17:30] tmedema: yes I do creationix, I just have to make a wrapper [17:31] tmedema: for strictly typed coding [17:31] gf3_ has joined the channel [17:31] stagas: tmedema: http://github.com/visionmedia/ext.js has some date functions (scroll down) [17:31] creationix: tmedema: haxe is cool, haven't tried it with node yet though [17:31] jesusab-work: o_o;; [17:31] tmedema: thanks [17:32] blaze-x: f(a,b,c) { var colorized; colorise(c,function(x) { colorized = x }); sys.puts(a+b+colorized) } // will that work? I don't see it [17:32] softdrink has joined the channel [17:33] stagas: sys.puts(..) should be in the colorise callback [17:33] blaze-x: that's why I asked about the sync idiom, sys.puts needs to wait for colorized. I suppose one could move all the sys.puts inside their respective handlers, but that would make it infeasable to sort stderr output [17:33] creationix: blaze-x: https://gist.github.com/beddc944da994340082c [17:33] creationix: updated [17:33] blaze-x: stagas: I see, that's what I was thinking also, but it's not feasable to do so (ie: logging needs to stay together) [17:34] blaze-x: maybe I'm missing a major point here, especiall since 'warn' is line-sync on most systems [17:34] creationix: well, if you want blocking highliting, you can't shell out to a child process [17:34] creationix: you have to implement it in pure js [17:35] blaze-x: creationix: that I know how to do! (MJ Dominus higher order perl is magical for this) [17:35] creationix: blaze-x: sys.debug and sys.err are sync/blocking [17:36] creationix: blaze-x: but there will always be the case where you need to access something over I/O [17:36] creationix: and then you'll have to use non-blocking code [17:37] creationix: blaze-x: you can have a write queue internally, and pull the items off the queue, send then off to be highlighted, and write then to the console as they come back [17:37] creationix: that's how sys.puts works internally [17:37] blaze-x: I don't have anything against non blocking code, I've lived in POE and Coro for a while, [17:37] creationix: it's non-blocking, but all messages will end up in order [17:37] mattly has joined the channel [17:37] creationix: yeah, no coros here [17:37] blaze-x: yes, I was thinking of writing an accumulator for that [17:37] jesusab-work: Hmm! [17:37] jesusab-work: ACTION takes note [17:38] ewdafa has joined the channel [17:38] blaze-x: since well I don't really need the while char[x] to be sync, just linesynced output would be nice; [17:38] blaze-x: but I know what I should be looking for then, thank you guys for all the help! [17:39] V1 has joined the channel [17:39] creationix: blaze-x: good luck, sounds like you know what you're doing [17:39] blaze-x: yes, it sounds :) but AFAICT you _know_ what you are doing, I've been reading a lot of your work online the last week. [17:40] creationix: :) I'm just really good at SOUNDING like I know what I'm doing ;) [17:40] blaze-x: hrhr lol [17:40] _announcer: Twitter: "Checking out multi-core HTTP Server capabilities with NodeJS: http://yhoo.it/a9Woj9 (check out NodeJS at http://nodejs.org)" -- breakdance jedi. http://twitter.com/breakdance_jedi/status/19010887970 [17:41] ryah: we really need to get this process.title shit working. [17:41] ryah: s/we/me [17:41] ryah: had the m upside down. [17:41] creationix: ryah: I gave up on it [17:41] ryah: it's hard [17:41] creationix: just added a --comment flag to spark [17:41] _announcer: Twitter: "I love the idea of @node_knockout anyone need a team member/want to start one? I must confess I'm very new to #nodejs, but hack js all day!" -- Jason McLeod. http://twitter.com/jasonmcleod/status/19010946191 [17:41] ryah: i can land a simple patch.. [17:42] ryah: but i think we should do the right thing on osx [17:42] creationix: I only host on linux where it really matters [17:42] mostlygeek has joined the channel [17:43] creationix: but it would be neat if I could update the title at time [17:43] creationix: *runtime [17:45] creationix: ryah: if you can get it work at least on ps in linux, that would be a win [17:45] ceej has joined the channel [17:45] blaze-x: process.title == perl($0) ? [17:45] ryah: blaze-x: yes [17:45] ryah: creationix: yeah, maybe just stub out the osx one... [17:46] ryah: you ahve no idea how crazy it is in osx [17:46] creationix: I've started that rabbit hole, that's when I gave up ;) [17:47] ryah: http://gist.github.com/483283 [17:48] creationix: hmm, dragons [17:49] creationix: it's not a rabbit hole, it's a dragon cave [17:49] dgathright_ has joined the channel [17:50] teemow has joined the channel [17:50] JimBastard: yo hackernews is some serious bullshit [17:51] JimBastard: they took down rauchg_ 's post [17:51] JimBastard: http://devthought.com/blog/2010/07/attribution/ [17:51] cirwin has joined the channel [17:51] ChrisRicca has joined the channel [17:51] jesusab-work: What post? [17:52] jesusab-work: Oh, JimBastard: Saw you on that proggit post about the yahoo thing [17:52] jesusab-work: People sure are dumb :( [17:53] [[zz]] has joined the channel [17:55] jxson has joined the channel [17:55] mostlygeek has joined the channel [17:55] ryah: creationix: yes. osx is a terrible operating system. [17:55] ryah: simply mind blowing that every programmer in using it. [17:55] creationix: shiny [17:56] SubStack: ACTION uses the lennuchs [17:56] creationix: I just want hardware that works with the os [17:56] creationix: I tried linux for over 10 years and about as many distros [17:56] ryah: suspend is very nice. i agree [17:56] ryah: and painless wifi connections [17:56] SubStack: ACTION alias suspend='sudo pm-suspend --quirk-s3-bios && xscreensaver-command -lock' [17:56] creationix: I even dropped $1400 for a laptop that came with linux pre-installed and "supported" [17:56] creationix: still has driver issues [17:57] creationix: that and I was a web dev, and safari doesn't run on linux [17:57] creationix: at least chrome is close these days [17:57] jesusab-work: SubStack: How did you fix laptop closing on linux? [17:57] JimBastard: ryah: you want me use windows 7? [17:57] softdrink has joined the channel [17:57] creationix: osx runs on pcs [17:58] jesusab-work: My girlfriend keeps closing my laptop when she moves it, forgetting that it always hangs when it tries to suspend :( [17:58] creationix: especially netbooks [17:58] jesusab-work: :/ [17:58] SubStack: something in /etc/acpi/lid.sh I think [17:58] Xavura has left the channel [17:58] liesen has joined the channel [17:58] mklappstuhl has joined the channel [17:58] jesusab-work: hmm [17:58] Validatorian has joined the channel [17:58] creationix: the point is that in linux it's a pain to get your hardware working, and most the time you never get it 100% working [17:58] jesusab-work: I'll have to look at that [17:59] jesusab-work: My netbook is mostly there [17:59] creationix: but I agree, OSX sucks as a posix system [17:59] benbinary has joined the channel [17:59] jesusab-work: drivers suck though [17:59] jesusab-work: for the wireless, I mean [17:59] jesusab-work: Also, I have Cisco's vpnclient on there, and, well [17:59] jesusab-work: Cisco sucks when it comes to offering an Actually Working vpnclient [18:00] jakehow has joined the channel [18:00] softdrink has joined the channel [18:00] maushu has joined the channel [18:01] jwm: jesusab-work: turn off suspend on shut [18:02] jwm: that is silly to have on [18:02] jesusab-work: Yeah! That's what I need to fix [18:02] Validatorian: isaacs: how can I list the modules I have installed via npm? [18:02] jesusab-work: Never figured out how, though [18:02] jesusab-work: I just never shut my laptop XD [18:02] isaacs: Validatorian: npm ls installed [18:02] mklappstuhl: creationix: why does osx suck as a posix system (just out of curiousity) [18:02] Validatorian: <3 [18:02] isaacs: :) [18:02] jwm: osx doesn't suck as a posix system? [18:02] isaacs: Validatorian: npm ls dumps out a bunch of info. the args to it are just simple non-regexp greps. [18:02] ryah: broken, buggy [18:03] jwm: darwin is posix compliant [18:03] creationix: mklappstuhl: well, I guess mostly it sucks when you're used to linux's flavor of unix, but there are things that are a lot harder than they should be [18:03] ryah: jwm: lol [18:03] isaacs: Validatorian: so, "npm ls installed latest" would show you the installed projects that are up to date, for example. [18:04] creationix: I mean, the default terminal app is horrible, especially with keybindings [18:04] jwm: I haven' had much problems with terminal.app [18:04] jwm: except I use iterm [18:04] tpryme has left the channel [18:04] jwm: and that I have had problems with [18:04] jwm: I like blurry bg though [18:05] Validatorian: isaacs: Just to be sure -- if I clone a repo, then install it with 'npm link' -- I can update the module with 'git pull' and the updated module will be used in npm, right? [18:05] isaacs: Validatorian: yes [18:05] Validatorian: great, thanks [18:05] isaacs: but you'll want to re-link if it has compilation step or something, of course. [18:05] mklappstuhl: creationix: ok, terminal.app is bullshit :D nobody can argue against :D [18:05] isaacs: iTerm, ftw! [18:06] mklappstuhl: isaacs: how does reposting work in irc ;) [18:06] V1: I can't see anything wrong with my Terminal ;( [18:06] jwm: terminal.app is way less buggy than iterm [18:06] isaacs: actually, Snow Leopard's terminal.app is pretty nice. [18:07] isaacs: i just got imprinted with iterm's keyboard shortcuts, and retraining is tricky. [18:07] jwm: yeah except for the scrollbars you can't get rid of [18:07] mklappstuhl: jwm: i never had problems with iTerm [18:07] jwm: I didn't use term.app before snow leopard [18:07] mklappstuhl: okay, i got to go, bye [18:07] jwm: I don't like OSX much though [18:08] jwm: because it's not stable [18:08] jwm: not as much as linux heh [18:09] mostlygeek_ has joined the channel [18:09] mjr_: creationix: did you capture your header parsing bug? [18:10] creationix: ryah: so I'm digging through http_parser.c, I can't see any code that would make it miss \r\n [18:10] creationix: mjr_: no, I'm thinking about just generating data and hitting the parser with it till it dies [18:10] creationix: that should be faster right? [18:10] mjr_: I guess. But I thought it happened regularly? [18:11] creationix: mjr_: I caught it twice in the logs, but only because it was the cookie or user-agent headers [18:11] creationix: I don't log all the headers [18:11] mjr_: If it happens even every hour, it'll be far more reliable to capture the raw data from pcap. [18:11] creationix: mjr_: more like every 4-12 hours [18:11] creationix: but I think I'll put an assert that checks all the headers looking for \r\n [18:11] creationix: that should NEVER happen [18:12] mjr_: Sure, but you need the raw data that was fed to the parser. [18:13] javajunky has joined the channel [18:13] creationix: mjr_: yeah, I'll leave pcap running, but then I'll know when it happens [18:13] creationix: I think it's happening more than I'm noticing [18:15] sveisvei has joined the channel [18:15] _announcer: Twitter: "Joyent's Ryan Dahl talking Node.JS, the JavaScript-based web server tomorrow here at the Redfin SF office: http://bit.ly/bLFfDQ (Please RT!)" -- Sasha Aickin. http://twitter.com/xander76/status/19012945629 [18:16] rgl has joined the channel [18:17] admc has joined the channel [18:18] demolithion has joined the channel [18:20] ryah: creationix: http_parser is heavily tested, more so than any other part of node [18:20] ryah: so i would be really surpised if it's broken there [18:20] creationix: ryah: yeah, but I don't know what else would give me raw http data in my header values? [18:20] ryah: me either.. [18:20] creationix: maybe something before http_parser? [18:21] creationix: in the net framing [18:21] ryah: we need something repeatable [18:21] creationix: ryah: working on it [18:21] creationix: a pcap file should be enough [18:21] ryah: and or at least a trace [18:21] ryah: that would rule out the parser [18:21] zapnap has joined the channel [18:21] ryah: i admit, it does look like a parser issue [18:21] creationix: and I'm throwing an exception as soon as I get a header with \r\n in it [18:21] aconran has joined the channel [18:22] ryah: it could be some buffer overflow thing [18:22] mjr_: My theory is that this is a buffer / slicing / overflow issue. [18:22] mjr_: ha [18:23] creationix: I've seen it on mobile safari and desktop safari, both with a header near the end of the headers list [18:23] creationix: safari has long user agent strings [18:23] _announcer: Twitter: "It's fucking black magic! My node.js Stream parser just works, out of the box. o_O. #codingwithmyeyesclosed" -- Arnout Kazemier. http://twitter.com/3rdEden/status/19013396407 [18:25] mjr_: ryah: did you see that I restored the poorly named http://db.ranney.com/ ? [18:25] creationix: got one! [18:25] creationix: http://gist.github.com/483342 [18:26] creationix: alright now to download the pcap file [18:26] ryah: mjr_: yes - thanks [18:26] creationix: sadly not much of a stack trace [18:26] ryah: mjr_: already sent it to someone as a dem [18:26] ryah: o [18:27] mjr_: Whoops, sorry about that. [18:27] mjr_: It got stuck behind that querystring bug, which thankfully got fixed quickly. [18:28] micheil: what do you think, for testing node-websocket-server, I have a few tests written with Vows to test server-side functionality, and then a series of in browser tests (backed by qUnit or DOH) [18:28] micheil: ? [18:28] ChrisRicca has joined the channel [18:28] javajunky has joined the channel [18:29] creationix: mjr_: ryah: http://creationix.com/5050.pcap near the end [18:29] creationix: I killed the server on the first illegal header [18:30] aho has joined the channel [18:30] JimBastard: creationix: do you have a few minutes to talk over pm? im having a crazy issue with the way we setup our event emitter. if we wrap any of the dispatcher.emit calls in a setTimeout the whole chain fails [18:30] JimBastard: if not its cool [18:30] creationix: JimBastard: maybe in a bit, I need to get this bug report to ryah [18:30] JimBastard: its possible we have a node bug in here too, either that are just a fundemental mistake in the way we setup the control flow [18:31] JimBastard: drop me a ping on gchat when you can. hopefully we'll have it solved by then [18:31] cirwin has joined the channel [18:32] rolfb has joined the channel [18:32] creationix: JimBastard: sure thing [18:32] mjr_: creationix: looking at the pcap file, it's hard to tell which one it is [18:33] JimBastard: its just soo strange, we are setting up a new app to isolate the issue. it looks like adding any latency when dispatching events breaks [18:33] JimBastard: which makes no sense, it should be all setup right [18:33] mjr_: creationix: like, the timestamps in the pcap don't match the timestamps in your gist. [18:33] creationix: that's strange, it's all on my maptop [18:34] creationix: mjr_: ok, I updated the gist to include the entire end of my access.log [18:34] mjr_: so the gist says 18:25:07 GMT, and the pcap says 11:24:15. So maybe there's a GMT -> PST conversion in there, but still tlhe minutes don't line up. [18:34] ryah: which request is it? [18:35] mjr_: oh, maybe you didn't leave tcpdump running long enough [18:35] creationix: mjr_: I let it running for a while after the server crashed [18:35] creationix: It said 0 packets dropped [18:35] mjr_: The pcap ends at 24:15.62, and your error is at 25:07 [18:36] creationix: mjr_: does pcap buffer heavily? [18:36] creationix: my node app killed itself as soon as it saw the bad header [18:36] mjr_: Sort of. The way that tcpdump uses libpcap buffers like crazy. [18:36] mjr_: There's a way to use pcap to not buffer like crazy, which is what my pcap tools do. [18:37] creationix: mjr_: http://gist.github.com/483342#file_pcap [18:38] mjr_: creationix: I think you lost the critical part in tcpdump's output buffer [18:39] creationix: mjr_: ok, should I try again, maybe restart the server after it crashed to push more data through? [18:39] mjr_: "0 packets dropped by kernel" means that the kernel was able to copy your requested packets from your ethernet card into the bpf driver without dropping anything. [18:39] creationix: or just not kill tcpdump [18:39] mjr_: yes, that would be a good thing. Restarting the server should force more data through. [18:39] creationix: I can copy the file while it's still running right? [18:39] mjr_: I dunno, maybe. [18:39] creationix: ok, I'll try flushing it [18:41] javajunky: creationix: did tjholowaychuk point you at the connect-auth stuff I pointed, I've got some concerns about what I had to do to get it in there [18:42] creationix: javajunky: not yet [18:42] javajunky: creationix: its messy atm, got a lot of express-style stuff still in it. [18:42] creationix: javajunky: was the connect api not flexible enough? [18:42] javajunky: but it gives twitter, github,facebook, yahoo, digest, basic, foursquare, janrain SSO out-of-the-box ;) [18:43] javajunky: creationix: I just had to do some stuff that I guess you'll feel is wrong ;) [18:43] javajunky: particularly : http://github.com/ciaranj/connect-auth/blob/master/lib/auth.js#L30 [18:43] MattJ: creationix: mjr_: iirc -U tells tcpdump not to buffer [18:44] javajunky: creationix: which I did, so I could do : http://github.com/ciaranj/connect-auth/blob/master/lib/auth.strategies/twitter.js#L16 [18:44] creationix: mjr_, I'll try that next [18:44] mjr_: Might as well try that. [18:44] creationix: javajunky: interesting [18:44] pgriess: creationix: still trying to get tcpdump working? [18:45] creationix: pgriess: I was so close, but the buffer ate the critical data [18:45] JimBastard: ohh shiiii.... got a reproducible node bug i think! should have repo up shortly [18:45] mjr_: On OSX there is a huge buffer between libpcap and tcpdump that you can't control. You can control the output buffering at least with -U. [18:45] _announcer: Twitter: "You create a server and TCP / IP clients using only Javascript? http://nodejs.org" [pt] -- Lawrence Lagerlof. http://twitter.com/llagerlof/status/19014662648 [18:46] grahamalot has joined the channel [18:46] creationix: mjr_: something keeps killing my sessions and it's not triggering my header lint [18:47] creationix: maybe it's truncating my cookie value [18:47] JimBastard: !tweet @llagerlof yes!!!! gogo node.js! [18:48] mlangenberg has joined the channel [18:48] maushu: JimBastard, he deleted the tweet. lulz. [18:48] JimBastard: http://twitter.com/llagerlof/ [18:48] JimBastard: he remade it [18:49] maushu: And announced detected it as a repeat. [18:49] creationix: Alright, got another one [18:53] creationix: https://gist.github.com/6bc68e7f501377b3bb71 [18:53] creationix: this time I hit the server with / request till I saw them in the pcap file [18:53] creationix: should be flushed through [18:53] mjr_: wow, it mangled x-requested-with [18:54] creationix: yeah, it's a different header every time [18:55] mjr_: It's too bad that your requests don't have any sort of unique key on them [18:55] fdmanana has joined the channel [18:55] mlangenberg: I am considering node.js for a chat system backend to serve about 10k users (replacement for Juggernaut). What are my options for keeping a local disk storage of all chat messages? (in order to let a user view the history of a chat room) [18:55] benburkert has joined the channel [18:55] creationix: mjr_: sent link in pm [18:56] creationix: mjr_: yeah, just the timestamp huh [18:56] SubStack: mlangenberg: http://wiki.github.com/ry/node/modules#database [18:56] voodootikigod: hey [18:56] voodootikigod: any of you fools at oscon [18:56] creationix: mjr_: and added more to the gist https://gist.github.com/6bc68e7f501377b3bb71#file_z_after.log [18:57] mjr_: voodootikigod: I wish I was at oscon. Does that help? [18:57] voodootikigod: nada [18:57] mjr_: hmmm [18:58] mjr_: creationix: what's z-after for? [18:58] mlangenberg: SubStack: wow, quite some options to checkout! Thanks. [18:58] creationix: mjr_: that was my log after I restarted the server and flushed data through [18:58] creationix: just for context [18:58] mjr_: oh, OK [18:59] mjr_: too bad you don't have sub-second timestamps in your access log [18:59] creationix: ACTION is still downloading wireshark [18:59] Validatorian: anybody run into this with Express? Error: Cannot find module 'connect/utils' [19:00] tjholowaychuk: Validatorian: install connect [19:00] creationix: mjr_: yeah, that would help [19:00] mjr_: I think this is good enough [19:00] tjholowaychuk: Validatorian: or $ curl -# http://expressjs.com/install.sh | sh [19:01] rauchg_ has joined the channel [19:01] creationix: mjr_: my fear is that it has nothing to do with the actual data, but is a timing issue in the packets [19:01] mjr_: creationix: found the bad request. It looks fine. [19:01] creationix: but I guess pcap will grab the individual packets [19:01] mAritz: what am i supposed to do against jslint complaining about a too long line if the line is a regular expression? [19:01] mjr_: Can you please try my http_trace program and see if it gets confused? [19:01] mjr_: My theory is that it won't. [19:02] creationix: mjr_: easier said than done, but I can try [19:02] mAritz: i only see the possibility of new Regex('asdasd' + \n'asdasd2'); or is there another way? [19:02] mjr_: But if you get a different mangling every time from node, there's something else going on. [19:02] mjr_: I'll pm you, no need to bother everybody else with this. [19:02] Validatorian: isaacs: I'll submit a ticket if I need to, but off the top of your head, know what this is about? npm ! Error: ENOENT, No such file or directory '/usr/local/lib/node/.npm/connect/0.2.1-LINK-26633a47/package/bin/connect' [19:03] Validatorian: running 'npm link' in connect repo clone [19:03] Validatorian: still shows up in npm ls installed though [19:03] chrischris has joined the channel [19:04] tjholowaychuk: Validatorian: no clue, I just use npm install / rm thats about it [19:04] Validatorian: tjholowaychuk: I'm linking, rather than installing, so I can keep updating express/connect with 'git pull' [19:05] tjholowaychuk: Validatorian: ah gotcha [19:06] derferman has joined the channel [19:09] Validatorian: I think it's due to the whole /lib thing -- now redis-node-client isnt' working, same error -- it's looking for redis-client in /package but needs to look in /package/lib [19:09] cirwin has joined the channel [19:09] Validatorian: isaacs_home: thoughts? [19:09] JimBastard: hey ryah are you insanely busy today? we've been experiencing a very strange issue, its fully documented here, created a new repo to illustrate it. its possible im doing something extremely stupid, but its also possible there is a node bug. im leaning towards stupidity. http://github.com/indexzero/node-latency-bug [19:09] JimBastard: if anyone else wants to take a look, any help would be much appreciated [19:10] rwaldron has joined the channel [19:11] JimBastard: http://github.com/indexzero/node-latency-bug/blob/master/index.js#L39 is the money shot [19:11] mscdex: a new repo just for a bug? [19:11] voxpelli has joined the channel [19:11] rtomayko has joined the channel [19:11] saikat has joined the channel [19:11] JimBastard: mscdex: yeah, we need to solve this [19:11] siculars has joined the channel [19:12] zmbmartin: tjholowaychuk: how do I load external js files into app.js in express? [19:13] indexzero has joined the channel [19:13] tjholowaychuk: zmbmartin: im going to tweak the blog example to show this a bit, ive had a few people ask [19:13] JimBastard: hail indexzero [19:13] JimBastard: tjholowaychuk: you feel like flexing that big canadian brain of yours at all? [19:13] indexzero: wattup JimBastard [19:13] tjholowaychuk: JimBastard: haha why whats up? heading for lunch right away though [19:14] JimBastard: trying to figure out http://github.com/indexzero/node-latency-bug/blob/master/index.js#L39 [19:14] maushu has joined the channel [19:14] indexzero: yeah, I think I found a potential node bug [19:14] JimBastard: the second we put latency around an event emitter call it breaks our http server [19:14] JimBastard: im still confident im just a retard [19:14] indexzero: reverse proxy really [19:14] pgriess: creationix: pointer to the connect/spark cla? [19:14] tjholowaychuk: ah boo to lazy to read that [19:14] tjholowaychuk: lol [19:14] indexzero: it's true, you did write that code [19:14] JimBastard: its cool tjholowaychuk , ill let you know how it works out [19:15] JimBastard: bugging a few people right now >.< [19:15] creationix: pgriess: http://wiki.github.com/senchalabs/connect/ [19:15] tjholowaychuk: :D [19:15] creationix: at bottom [19:15] indexzero: ACTION was up till 4am isolating the issue >.< [19:15] JimBastard: indexzero: i stole most of the proxy from Mikeal, we can blame him when he comes to visit [19:15] indexzero: haha [19:15] V1: Is it normal that the Array.forEach doesn't work with Associative Arrays [19:16] creationix: V1: does it skip over non number keys? [19:16] JimBastard: V1: i dont think JS has AA's , its just json or an array of objects? [19:16] softdrink has joined the channel [19:16] creationix: V1, there is always Object.keys(myobj).forEach() [19:16] creationix: works for any object [19:17] V1: var data = []; data['key'] = "value"; data.forEach(function(){ i don't work }) [19:17] V1: I would have thought the forEach would also support associative arrays [19:17] pgriess: creationix/tjholowaychuk: this cla references "connect" in the title but nowhere else -- is this intended to cover all senscha projects? or just connect? [19:19] mikeal has joined the channel [19:19] creationix: pgriess: good question, let me check [19:19] creationix: I would imagine it's for all senchalabs stuff [19:20] creationix: pgriess: email sent, I should hear back soon [19:20] V1: "forEach executes the provided function (callback) once for each element present in the array".. That should included associative array's as well . But than again, I might understand it wrong. But it sounds like a bug to me [19:20] JimBastard: hrmm indexzero i might know whats wrong [19:20] JimBastard: it might just be scope, trying now [19:21] pgriess: creationix: thx [19:21] pgriess: http://github.com/senchalabs/spark/issues#issue/1 is, of course, the reason that i'm asking ;) [19:21] cirwin: V1: you're not doing what you think you're doing [19:21] creationix: pgriess: yeah, just saw that one [19:21] bradleymeck_: V1 js doesnt have Associative arrays, just Objects which may be used like them [19:21] creationix: pgriess: would love your help [19:22] bradleymeck_: Object.keys(obj).forEach(function(key){var value = obj[key]; ... work w/ key,value ...}) [19:22] cirwin: for (var key in obj){} [19:22] V1: Good point, my bad.. But it still think it's awkward :p [19:23] creationix: cirwin: for..in works, but is really slow because it grabs everything in the prototype chain [19:23] creationix: forEach over the Object.keys is actually faster [19:23] JimBastard: nope that didnt help, WTF [19:23] cirwin: creationix: the complaint was about syntax not performance [19:24] creationix: cirwin: well, my favorite syntax is to create a Object.prototype.forEach that internally uses Object.keys for a for(;;) loop [19:24] creationix: and it's the second fastest solution too [19:24] cirwin: neat idea [19:25] creationix: cirwin: http://github.com/creationix/proto/blob/master/lib/proto.js#L29 [19:25] creationix: and since node supports Object.defineProperty it doesn't even break for..in for other code [19:25] mau has joined the channel [19:30] stepheneb has joined the channel [19:35] sudhirj has joined the channel [19:38] bradleymeck_: anyone seen tmpvar recently? [19:38] gf3: creationix: you're missing some bind-age :) http://github.com/gf3/utools/blob/master/lib/utools.js#L14-37 [19:38] CIA-64: node: 03Robert Keizer 07master * r5ebf604 10/ src/node_stdio.cc : Added process.binding('stdio').getRows() - http://bit.ly/bJ3Yza [19:38] creationix: pgriess: ok, heard back about the cla [19:39] creationix: it's for all senchalabs products, is that fine or do you want one for connect/spark specific? [19:39] creationix: s/products/projects/ [19:41] pgriess: creationix: not sure. i'll have to ask. i'd personally prefer one for all products as that reduces my friction with legal, but i'm not sure if they'll go for that [19:41] creationix: pgriess: cool, it's one for all at the moment [19:41] pgriess: creationix: anyway, thx. it'll probably take me a week or two to turn this around [19:42] stepheneb has joined the channel [19:42] CIA-64: node: 03Sam Shull 07master * r8acea26 10/ src/node_version.h : Add parenthesis to NODE_VERSION_AT_LEAST - http://bit.ly/aoRDRH [19:43] dgathright has joined the channel [19:43] JimBastard: bradleymeck_: last night [19:44] JimBastard: we were working out some carena stuff [19:44] JimBastard: hes around [19:45] mostlygeek has joined the channel [19:45] sudhirj: creationix: is there a cla for contributing to connect? [19:48] tjholowaychuk: mmm espresso [19:51] javajunky: tjholowaychuk: about to rip out my connect-auth specs, about to toss a coin between vows and espresso ..opinion ? ;) [19:51] tjholowaychuk: javajunky: if your doing heavy http stuff expresso for sure [19:51] khug has joined the channel [19:54] javajunky: hmm well I tend to mock what I can [19:55] ryan_gahl has joined the channel [19:56] programble has joined the channel [19:56] tjholowaychuk: thats the beauty of it you dont have to [19:56] tjholowaychuk: so if it works it works, not fudged up from faulty mocks etc [19:56] tjholowaychuk: depends though i mean try both for sure [19:57] tjholowaychuk: im curious for some feedback [19:57] Validatorian: tjholowaychuk: To use ejs, I just install it and name the view file 'file.ejs' right? I'm having a few issues (not rendering as html, and unable to declare variables from within the .ejs file) [19:57] javajunky: tjholowaychuk: yah but most of connect-auth involves 3rd party http servers, so I Can't see how I can avoid mocking them (not without putting all my api keys in the tests) [19:58] javajunky: tjholowaychuk: espr esso not in npm yet [19:58] javajunky: ? [19:58] tjholowaychuk: Validatorian: yeah you should be able to: res.render('foo.ejs'), remember though use { layout: false } if you dont want one [19:58] sudhirj: javajunky: try expresso, with an x [19:58] tjholowaychuk: Validatorian: otherwise it assumes layout.ejs in that case [19:58] tjholowaychuk: javajunky: ya sorry, im handy.... [19:59] tjholowaychuk: spelling skills to the max, at least that one was in the dictionary :) [19:59] Validatorian: tjholowaychuk: I have a layout.ejs already (was layout.html.ejs, renamed to layout.ejs) [20:00] tjholowaychuk: Validatorian: hm.. is rendering anything at all? [20:00] Validatorian: oh -- did the syntax change from <%= to <%- ? [20:00] javajunky: sudhirj: cheers, do [20:01] javajunky: err s/do/doh/ [20:01] Validatorian: well, it's spitting out the HTML as plaintext [20:01] tjholowaychuk: Validatorian: I added <%- for non escaped stuff, I prefer for things to be escaped by default with <%= [20:01] creationix_ has joined the channel [20:02] tjholowaychuk: Validatorian: it should be html by default but try res.contentType('.html') first [20:03] sudhirj: anyone who's run the examples in express (say the jade example), were you able to run it without explicitly adding the jade/lib to the paths? [20:03] cirwin has joined the channel [20:03] sudhirj: I seem to need explicitly add the lib folders or all the plugins i'm using [20:03] Validatorian: tjholowaychuk: forcing it like that worked, interesting [20:04] tjholowaychuk: Validatorian: shit, might be a bug there then [20:04] _announcer: Twitter: "testing persistencejs for #nodejs" -- Sascha Depold. http://twitter.com/sdepold/status/19019008481 [20:05] Validatorian: EJS is still bombing when I use a script like this: <% var foo = "bar" %><%= foo %> [20:05] Validatorian: Caught exception: SyntaxError: Unexpected identifier [20:05] tjholowaychuk: well you should not really define stuff in a view anyways [20:05] tjholowaychuk: but ya ejs is probably buggy its super new [20:06] mikeal has joined the channel [20:06] _announcer: Twitter: "collected and tagueou nodejs as 'Multi-Core Server with HTTP NodeJS' http://busk.com/0P_J" [pt] -- rodrigomilfont. http://twitter.com/rodrigomilfont/status/19019084200 [20:06] tjholowaychuk: and has had little love since I dont like ejs lol but its at http://github.com/visionmedia/ejs [20:06] bradleymeck_: is there a repl.stop()? [20:07] JimBastard: STOP [20:07] JimBastard: hammer time [20:07] JimBastard: :-D [20:07] JimBastard: getting coffees [20:07] tjholowaychuk: ACTION gots coffees [20:07] Validatorian: I've tried a few templating languages, and I like ejs the most, thus far [20:07] tjholowaychuk: :p sucka [20:07] SubStack: oh shit coffee, don't tempt me [20:07] tjholowaychuk: Validatorian: fair enough! :) it's simplicity is appreciated, im just not a fan of the syntax [20:07] SubStack: ACTION has already had too much [20:08] tjholowaychuk: Validatorian: feel free to patch up that repo though if you come across bugs [20:08] jesusab-work: SubStack: too much what? [20:08] tjholowaychuk: ill try and figure out what Express is doing with that html response [20:08] tjholowaychuk: SubStack: I have like 6 cups a day haha im going to die [20:08] jesusab-work: ah [20:08] SubStack: tjholowaychuk: only 6? [20:08] tjholowaychuk: haha yes [20:08] Validatorian: okay, I might be able to avoid setting variables in views -- how would I use a javascript function? Currently I'm doing var myfn = function(in) { return in + '-modified' }; in the view... [20:08] jesusab-work: I'm actually cutting back! [20:09] jesusab-work: Down to one cup in the morning, and a caffeinated drink in the afternoon [20:09] benbinary has joined the channel [20:09] jesusab-work: ACTION is half-proud [20:09] Validatorian: within the view, that is, not client-side [20:09] mjr_: bradleymeck: I think you just close the stream that repl is started on. [20:09] tjholowaychuk: Validatorian, you have a few choices, you can pass { locals: { myfn: function(){} }} [20:09] tjholowaychuk: and use it in the view as myfn() [20:09] tjholowaychuk: OR you can do require('express/view').helpers.myfn = function(){} [20:09] tjholowaychuk: and use it the same awy [20:10] mjr_: bradleymeck: looking at the code, it actually does stream.destroy. lib/repl.js:116 [20:10] Validatorian: ah, nice -- thanks tjholowaychuk [20:10] whoahbot has joined the channel [20:10] rtomayko has joined the channel [20:10] tjholowaychuk: Validatorian: also you can app.set('view engine', 'ejs') and change res.render('foo.ejs') to res.render('foo'), removes the need for extensions throughout unless your using [20:10] tjholowaychuk: a non-default template [20:11] _mythz has joined the channel [20:14] V1: Yes i write my TODO's in json format, just because i can [20:14] V1: ooops, wrong channel [20:14] JimBastard: creationix: i think my solution lies in http://github.com/senchalabs/connect/blob/master/lib/connect/middleware/staticProvider.js#L55 [20:14] JimBastard: tjholowaychuk: ^^ [20:15] JimBastard: thunk time, i think [20:22] aliem has joined the channel [20:22] EyePulp has joined the channel [20:22] EyePulp: yo ho ho [20:22] javajunky has joined the channel [20:22] JimBastard: sup EyePulp [20:23] EyePulp: not much - starting my node education [20:23] EyePulp: you? [20:23] bradleymeck_: is there a way to share the event loop w/ a child process...(if we know the events are independant / one time use) [20:23] JimBastard: welcome to the node.js room [20:24] bradleymeck_: indeed, welcome [20:24] JimBastard: EyePulp: im chillin like a villian ,workin on libraries [20:24] JimBastard: http://github.com/marak [20:24] JimBastard: :-D [20:24] EyePulp: JimBastard: nice! [20:24] ako has joined the channel [20:25] EyePulp: +1 for channel friendliness - it means you haven't been corrupted by having to spoon feed answers *too much*.... not yet at least. =) [20:26] jesusab-work: Yeah, they've been real nice [20:27] JimBastard: EyePulp: im somewhat immune to noobs, my noobhammer weighs about 200 tons and is made from a meteor [20:27] jesusab-work: Speaking of, I have a noob question: Suppose I have a bunch of functions I want to export. Is there a good way to do this other than, export.a=a; export.b=b; etc? [20:27] JimBastard: yeah jesusab-work for sure [20:27] bradleymeck_: beware, also we need to get a !faq/noob [20:27] jesusab-work: Haha [20:27] JimBastard: you can just put them all on an obj and export that [20:27] EyePulp: JimBastard: Nice... I'll give you an itchy hammer-finger quite quickly. [20:27] EyePulp: =P [20:27] jesusab-work: Yeah :) [20:27] javajunky: tjholowaychuk: I'm loving your new enforced coding styles [20:27] bradleymeck_: jesusab module.exports {a:a,b:b...} [20:28] jesusab-work: No equals? [20:28] JimBastard: var foo = {}. foo.p = p; exports = foo; [20:28] tjholowaychuk: javajunky: haha :) [20:28] tjholowaychuk: ? wtf is that lol [20:28] stepheneb has joined the channel [20:28] jesusab-work: ACTION tries to remember that [20:29] jesusab-work: There weren't too many functions, so the way I did it isn't TOO bad [20:29] javajunky: == grin [20:29] JimBastard: jesusab-work: this is why code editors have regex replaces [20:29] jesusab-work: huh? [20:29] tjholowaychuk: oh :) [20:29] javajunky: so yeah lol [20:30] EyePulp: A simple question about the node.js chat demo - I notice it constantly climbing in memory footprint (according to process.memoryUsage()) as more messages are added - is this purely related to in-memory storage of message history or is there some other source of growth at play? [20:30] jesusab-work: Oh [20:30] jesusab-work: duh [20:30] jesusab-work: Yeah :) [20:30] jesusab-work: I really need to get more comfy with regexps [20:30] bradleymeck_: eyepulp, in memory storage most likely [20:30] SubStack: jesusab-work: perldoc perlretut [20:31] SubStack: also perlreref [20:31] JimBastard: EyePulp: i would think it levels off around 30mbs or so [20:31] JimBastard: and stops climbing [20:31] zerovirtual has joined the channel [20:31] SubStack: sadly only perl suppoprts a lot of the fancier syntax [20:32] JimBastard: ive been running http://chat.nodejitsu.com/ for over two months [20:32] jesusab-work: bah! perldoc >_< [20:33] jesusab-work: I've read through lots of stuff on *how* to use regexps [20:33] jesusab-work: It just doesn't stick is all [20:33] JimBastard: regex is for sadist [20:33] JimBastard: lol [20:33] kersny has joined the channel [20:33] tjholowaychuk: hahah [20:34] tjholowaychuk: no way lol [20:37] _announcer: Twitter: "http://nodeknockout.com <= Something like Rails Rumble, but with node.js." -- Nico Hagenburger. http://twitter.com/Hagenburger/status/19020765640 [20:38] rolfb has joined the channel [20:39] JimBastard: my noobhammer weighs about 200 tons and is made from a meteor. #bastardfacts [20:41] bradleymeck_: hehe knockout page has too many sponsers and broke its layout on some team pages [20:41] JimBastard: time to knockout some sponsers [20:43] _announcer: Twitter: "Just pushed out a "working" get / set implementation of #nMemcached, memcached for #nodejs. Work in progress : http://is.gd/dzPvQ" -- Arnout Kazemier. http://twitter.com/3rdEden/status/19021115622 [20:44] javajunky: ughh I'm tired, struggling with scope tonight ( [20:45] bradleymeck_ has joined the channel [20:46] bradleymeck_: scope issues? [20:47] pavan_ has joined the channel [20:47] ctp has joined the channel [20:51] cloudhead has joined the channel [20:51] jakehow has joined the channel [20:53] creationix: JimBastard: ok, I'm back, did my connect code help with your problem? [20:53] JimBastard: creationix: i think that might solve it, its the same issue for certain. its just a matter of adapating it for my use case [20:53] JimBastard: im trying to wrap my head around it now [20:54] JimBastard: we are doing it slightly diffirenty, but its the same problem i think [20:54] creationix: yeah, I would rather pause actually block events, but that's still an ongoing debate [20:55] javajunky: bradleymeck: yeah just trying to do stupid things that aren't allowed with prototypes etc. … need sleep ;) [20:56] mattvermaak: has mongoose got findAndModify support yet? [20:57] chrischris has joined the channel [20:58] chrischris has joined the channel [20:58] tekky has joined the channel [20:58] _announcer: Twitter: "You're invited! Ryan Dahl speaking at Redfin's San Francisco office on Node.JS: Wednesday, July 21 at 6 p.m. http://bit.ly/c3f3Mm" -- glennkelman. http://twitter.com/glennkelman/status/19021963306 [21:00] huyhong has joined the channel [21:01] ryan_gahl: yo creationix [21:02] creationix: ryan_gahl: sup [21:02] ryan_gahl: why, in Connect, when using a router, is there no access to next() within the handlers? [21:02] creationix: ryan_gahl: there is [21:02] creationix: it's the fourth arg [21:03] ryan_gahl: in other words, if using a router and the path matches but other logic dictates next() should be called, how best to do so? [21:03] ryan_gahl: req, res, params, next? [21:03] creationix: ryhttp://github.com/creationix/sousaball/blob/master/app.js#L55 [21:03] ryan_gahl: looks like it's err to me [21:04] tjholowaychuk: ryan_gahl: should be able to, express uses this as well [21:04] creationix: ryan_gahl: actually I should link to the sousaball app, I rewrote it this weekend to use latest connect and stuff [21:04] ryan_gahl: hmm, ok, guess i was just reading the code wrong [21:04] creationix: tjholowaychuk: should we link to http://github.com/creationix/sousaball/blob/master/app.js on the wiki or something [21:04] creationix: maybe a section on apps using connect? [21:04] tjholowaychuk: yeah that might be good we can reference Express on there too [21:04] tjholowaychuk: or I guess "frameworks using Connect" [21:05] rgl has joined the channel [21:05] stepheneb has joined the channel [21:05] creationix: "software built on connect" [21:06] creationix: ryah: good news, I don't think the bug is in http_parser [21:07] creationix: ryah: mjr_'s node_pcap doesn't die but http.Server does https://gist.github.com/76e914a44c15ef09ce87 [21:07] _announcer: Twitter: "who's coming to @AustinJS tonite?! should be a great one. Node.js nom nom nom." -- Kyle Simpson. http://twitter.com/getify/status/19022454339 [21:08] bmizerany has joined the channel [21:08] visnup has joined the channel [21:08] ryan_gahl: so looking at this line: http://github.com/senchalabs/connect/blob/master/lib/connect/middleware/router.js#L65, next() is not the next middleware in the stack then, it's the next defined route in the router... and only after all routes are exhausted it goes to the next middleware? [21:08] tjholowaychuk: ryan_gahl: thats correct, its the next "matching" route [21:08] tjholowaychuk: then continues down the stack [21:09] tjholowaychuk: might be nice to provide reference to the original next() fn [21:09] ryan_gahl: yeah, to reduce the overhead of checking more routes when some logic says not to [21:09] benburkert has joined the channel [21:09] tjholowaychuk: params list is already quite large haha but hmm [21:09] bradleymeck_: !tweet @getify moi / gf [21:10] JimBastard: bradleymeck_: you are bringing your woman to a JS meetup? [21:10] ryan_gahl: how about next(true) == bypass other routes [21:10] JimBastard: i did that once [21:10] bradleymeck_: my girl programs just as much as me [21:10] ryan_gahl: although that messes with your err checking [21:10] tjholowaychuk: ryan_gahl: that could work, we can easily do a === true check [21:11] ryan_gahl: because you're not checking for instaceof Error [21:11] ryan_gahl: there ya go [21:11] ryan_gahl: triple equals FTW [21:12] ChrisRicca has joined the channel [21:13] _announcer: Twitter: "@getify What's Node.js? Never heard of it. Especially not constantly over the last ten months." -- Andrew Dupont. http://twitter.com/andrewdupont/status/19022762260 [21:13] ryan_gahl: so I'm using Connect via npm right now (refactoring to submodule usage later)... me doing such a patch requires getting unlazy, which will be difficult today (not gonna lie)... you going to remember or want to me to get off my ass? :) [21:13] ryan_gahl: git pull ... ugh such work [21:14] creationix: ryan_gahl: use Ivy [21:14] ryan_gahl: ? [21:14] cirwin: if a Stream is destroy()ed before the dns lookup returns, it throws an exception - is that exception catchable? [21:14] creationix: it's got a much newer connect than npm [21:14] ryan_gahl: oh jeez [21:14] creationix: http://github.com/creationix/ivy [21:14] ryan_gahl: another pm [21:14] ryan_gahl: man oh man [21:14] ryan_gahl: um, no [21:14] tjholowaychuk: just clone lol [21:14] ryan_gahl: would rather submodule [21:15] creationix: ryan_gahl: no, it's not a package manager [21:15] ryan_gahl: ok, clicking link... [21:15] creationix: it's a node distro with modules embedded via submodules [21:15] javajunky: ryan_gahl: to get around it git clone connect and make install it, tjholowaychuk suggested this to me yesterday and it worked very well, the npm package is basically fubared ;) [21:15] creationix: in fact, I plan to integrate npm into Ivy for third party libraries [21:16] tjholowaychuk: javajunky / ryan_gahl: I think the just wants to work on a feature, so no need to even make install it [21:16] bvleur: If I first do net.createConnection(..) and then add a listener for the connect event, isn't it possible for the connect event to fire in between the two? [21:17] teemow has joined the channel [21:17] ryan_gahl: yeah, i'm just going to do straight submodule it [21:17] bvleur: and if so.. how can I add a connect listener before hand? [21:17] cloudhead: is there a better way to do this: http://github.com/cloudhead/http-console/commit/9b7b8abd64268c914d2135e66f3d814426823a0b ? [21:18] dmcquay has joined the channel [21:18] eee_c has joined the channel [21:18] ryan_gahl: so anyway, I take it you'd rather I do this patch then? [21:18] cloudhead: getting the readline prompt to display after the buffer is flushed is a little iffy [21:18] tjholowaychuk: ryan_gahl: either that or post an issue, im busy ATM but could probably get to it soonish [21:18] ryan_gahl: tj: are you ok with pull requests? [21:19] tjholowaychuk: ryan_gahl: just remembered with have a CLA, it will be a small patch just add an issue ill get to it asap [21:19] zmbmartin: tjholowaychuk: when should I check to blog example about including an external js file? I am trying to play with mongoose and express together and I want to put each mongoose model in it's own folder but have app.js load them? [21:19] tjholowaychuk: unless you want to do the CLA business [21:20] ryan_gahl: tj: an Extjs CLA? [21:20] creationix: ryan_gahl: for any senchalabs project [21:20] tjholowaychuk: zmbartin: that should just be a simple require() no? I was going to add to the example to show how to span routes from several files [21:20] ryan_gahl: right sencha, sry [21:20] creationix: http://wiki.github.com/senchalabs/connect/ [21:20] creationix: at the bottom [21:20] tjholowaychuk: zmbmartin: but for models etc you could easily just do var MyModel = require('./models/mymodel') [21:20] JimBastard: was the node.js CLA planned? it seemed to spring up right about the same time i had my whole little issue [21:21] ryan_gahl: creationix: can we email a scanned copy? [21:22] creationix: ryan_gahl: yep, send it to me [21:22] javajunky: signed CLAs are undoubtedly a PITA (I accept the neccesity) ..but its like my bloody mortgage provider, why do they think my physical written signature proves or means anything ? .. my PGP key would be more useful ;) they'll let me fax a signature over to them, but one accept a digital one online *sob* [21:22] mscdex: self.on('hunger', function() { process.nextTick(function() { food.eat(); }); }); [21:23] creationix: javajunky: the CLA for node allows digital signature via some google service [21:23] mscdex: i think that's just a google doc [21:23] creationix: mscdex: nextTick might not be fast enough [21:23] mscdex: with a form on it or something [21:23] creationix: maybe [21:23] zmbmartin: tjholowaychuk: I keep getting errors? [21:24] creationix: this http header issue is driving me insane! [21:24] javajunky: creationix: really, thats interesting (that yahoo one didn't, last time I gave up on contributing back a load of patches to the editor (memory leaks) ) [21:24] stepheneb has joined the channel [21:24] tjholowaychuk: zmbmartin: that model stuff has nothing to do with Express :s should be able to just require it like a regular module [21:25] creationix: does anyone have a clue about how buffers could get mixed up in a way that caused the http_parser to get confused? https://gist.github.com/76e914a44c15ef09ce87 [21:26] _announcer: Twitter: "@andrewdupont Actually, I've kept myself pretty ignorant about Node.js. It seems gimmicky to me, but maybe @joemccann can change my mind." -- Andy Couch. http://twitter.com/andycouch/status/19023554738 [21:26] ryan_gahl: creationix: thx, signing CLA shortly, will email... and then can I do pull requests for any mods I make, or what's the preferred patch mechanism for Connect? (yes, this one is tiny, but just wondering in general as I know ry doesn't like pull requests even though they're the BOMB) [21:27] creationix: ryan_gahl: I like pull requests [21:27] ryan_gahl: yay [21:27] ryan_gahl: ok cool [21:27] creationix: just try to match the code style [21:27] creationix: it's pretty vanilla [21:27] mscdex: heh [21:27] ChrisRicca has joined the channel [21:27] ryan_gahl: no worries, i'm a jslint, semicolons, no fucking comma-first, guy [21:27] amb_ has joined the channel [21:27] mscdex: ACTION shakes a fist at comma-first [21:27] tjholowaychuk: ryan_gahl: git am style is good [21:28] bradleymeck_: ACTION shakes a fist at comma last [21:28] mscdex: ACTION shakes a fist at no semicolons [21:28] ryan_gahl: ACTION slaps bradleymeck with a limp trout [21:28] ryan_gahl: or is that a dead trout? [21:29] mscdex: it's le tired [21:29] bradleymeck_: ACTION enjoys seeing missing commas by going down the same column rather than correcting both column and row [21:29] Xavura has joined the channel [21:29] ryan_gahl: ACTION never misses a comma [21:29] JimBastard: !tweet @andycouch ignorance is not bliss when it comes to node.js my friend. [21:30] JimBastard: ryan_gahl: apparently neither does jslint [21:30] ryan_gahl: ACTION is getting back to pseudo-productivity [21:30] tjholowaychuk: ryan_gahl: 876e9c1 has the change [21:30] ryan_gahl: damn you tj! [21:30] ryan_gahl: lol [21:30] huyhong has left the channel [21:30] ryan_gahl: i was gonna sign a CLA for this [21:31] ryan_gahl: but thanks :) [21:31] tjholowaychuk: :S [21:31] tjholowaychuk: :D * [21:31] mscdex: mood swing! [21:31] ryan_gahl: even when i _try_ to get unlazy, i can't [21:35] _announcer: Twitter: "Just pushed a few awesome (although, under-tested) changes to the node-websocket-server development branch: http://is.gd/dzSKa #node.js" -- Micheil Smith. http://twitter.com/miksago/status/19024073453 [21:36] khug has joined the channel [21:36] javajunky: does Object.defineProperty work on references to functions ? .. I'd (perhaps naively) expect it to…. [21:36] micheil: ryan_gahl: sign the CLA anyway. [21:36] JimBastard: http://www.youtube.com/watch?v=9nleVmEfVK8 [21:36] micheil: I couldn't get access to an Array.defineProperty, so, not sure. [21:37] ryan_gahl: micheil: yep, forking and pulling connect in as submodule now too [21:38] franksalim has joined the channel [21:38] micheil: ? [21:39] mscdex: micheil: it's Object.defineProperty [21:39] javajunky: mscdex: yeah, but can I [successfully] pass a function to that ? [21:40] mscdex: i don't see why not [21:40] mscdex: a function is an object [21:40] aho has joined the channel [21:40] mscdex: ACTION shrugs [21:40] JimBastard: ACTION hugs [21:40] tjholowaychuk: javajunky: what are you trying to do? [21:41] javajunky: http://pastebin.com/8c2dCcJF [21:41] javajunky: tjholowaychuk: I'm mainly trying to rip-off connect's index.js the way it pulls in the middleware, I like that [21:41] javajunky: was intending to pull in the default auth.strategies. [21:42] tjholowaychuk: javajunky: ohhh, its just a getter that requires the mod [21:42] javajunky: oh right [21:42] javajunky: ..no wait, what ? ;) [21:43] micheil: oh, yeah, bradleymeck_ that latest commit gave better Storage api access. [21:43] bradleymeck_: :D [21:43] micheil: bradleymeck_: re, nws [21:43] micheil: you can now pass it a constructor. [21:44] khug has joined the channel [21:44] micheil: and in order to cleanup, you need a method called Store.prototype.destroy(connection.id); [21:44] micheil: ACTION is off. [21:45] JimBastard: __ [21:45] JimBastard: /\ \ __ [21:45] JimBastard: ___ ___ \_\ \ __ /\_\ ____ [21:45] JimBastard: ughh fail [21:45] JimBastard: everytime i forget [21:45] JimBastard: with the leading / [21:45] JimBastard: ughh [21:45] JimBastard: okay ill try again [21:45] tjholowaychuk: javajunky: its just this but autogenerated var Foo = { get bar(){ return require('./bar'); }}; [21:46] mscdex: ascii flood! [21:46] jesusab-work: D: [21:46] javajunky: tjholowaychuk: yeah I get what its doing, I just don't understand why I can't get it to work :( [21:46] tjholowaychuk: javajunky: hmm :( [21:46] micheil: tjholowaychuk: I really need to make better use of getters and setters in NWS [21:46] JimBastard: __ [21:46] mscdex: __defineGetter__ :-D [21:46] JimBastard: /\ \ __ [21:46] JimBastard: ___ ___ \_\ \ __ /\_\ ____ [21:46] JimBastard: /' _ `\ / __`\ /'_` \ /'__`\ \/\ \ /',__\ [21:46] JimBastard: /\ \/\ \ /\ \L\ \/\ \L\ \ /\ __/ __ \ \ \ /\__, `\ [21:47] JimBastard: \ \_\ \_\\ \____/\ \___,_\\ \____\/\_\ _\ \ \ \/\____/ [21:47] JimBastard: \/_/\/_/ \/___/ \/__,_ / \/____/\/_//\ \_\ \ \/___/ [21:47] JimBastard: \ \____/ [21:47] JimBastard: \/___/ [21:47] JimBastard: almost [21:47] mscdex: EXCESS FLOOD [21:47] tjholowaychuk: micheil: I pretty rarely use them actually, mostly because __defineGetter__ etc is annoying lol [21:47] mscdex: huhu [21:47] micheil: tjholowaychuk: well, you are using them by using the get/set keywords [21:47] jesusab-work: JimBastard: How'd you do that? [21:47] admc has joined the channel [21:48] tjholowaychuk: micheil: yup, I like that syntax [21:48] mscdex: i prefer __define(G/S)etter__ because it stands out more [21:48] JimBastard: jesusab-work: MAGIC HAX [21:48] JimBastard: AOL 3.0 BABY [21:48] JimBastard: CUSTOM BAS FILES [21:48] JimBastard: i mean [21:48] JimBastard: http://asciimo.com [21:48] micheil: well, yeah, I really need to use them more. [21:48] jesusab-work: >:O [21:48] jesusab-work: hehe [21:48] JimBastard: jesusab-work: you've seen that lib right? [21:48] jesusab-work: But, javascripted irc client? [21:48] jesusab-work: That's what I mean [21:48] JimBastard: ohh no, just micro [21:48] JimBastard: years of RTS [21:48] jesusab-work: I've actually been thinking about trying to do something similar with my bot [21:48] JimBastard: would be easy to make it a greasemonkey type script [21:49] jesusab-work: Should probably port it to Jerk [21:49] jesusab-work: Yeah [21:49] JimBastard: just loop up the call [21:49] jesusab-work: Been meaning to look at greasemonkey again [21:49] JimBastard: jesusab-work: it already works as a node.js module [21:49] JimBastard: jesusab-work: dont bother [21:49] jesusab-work: Hah [21:49] jesusab-work: alright [21:49] jesusab-work: I did like 8 years ago [21:49] JimBastard: yeah [21:49] jesusab-work: didn't know wtf I was doing [21:49] JimBastard: for sure, 8 years ago it was awesome [21:49] jesusab-work: hacked away at someone else's script [21:49] jesusab-work: You remember Hackaday? [21:49] JimBastard: its a but lame now though, not sure what other people think [21:49] JimBastard: i think so [21:49] jesusab-work: They at least used to make all their text lower-case [21:49] JimBastard: firebug = greasemonkey [21:50] jesusab-work: so the script went and found the bullshit toLower() function and nullified it [21:50] jesusab-work: It was pretty awesome [21:50] _announcer: Twitter: "The Great Ryan Dahl to Speak Wednesday on Node.JS http://bit.ly/9XgA2N" -- Jonathan D. Nicholas. http://twitter.com/jondnicholas/status/19024936912 [21:50] _announcer: Twitter: "The Great Ryan Dahl to Speak Wednesday on Node.JS: Having recruited key architects from Facebook and Twitter for e... http://bit.ly/cVhFNL" -- Redfin. http://twitter.com/Redfin/status/19024937371 [21:50] mscdex: dupe! [21:50] mscdex: ACTION nudges maushu [21:50] rolfb has joined the channel [21:50] maushu: ACTION is the nudged. [21:51] maushu: mscdex, No, quite different. [21:51] mscdex: eh? [21:51] maushu: One is a lot bigger than the other. [21:51] mscdex: they point to the same end url [21:51] maushu: The only way to check for these dupes is to check the links. [21:52] mscdex: and start with the same text [21:52] maushu: I don't check those. [21:52] mscdex: :S [21:52] maushu: THEY DIFFERENT. SHUDAP. [21:52] zmbmartin: tjholowaychuk: I know it is not express. It is me because I do not know what I am doing. if I require it --> var mymodel= require('./models/mymodel') how do I use that. I just keep getting errors? I am a new to js [21:52] javajunky: tjholowaychuk: so now it works ;) magic arggh [21:52] JimBastard: maushu: how is your secret project going [21:53] tjholowaychuk: javajunky: haha weid man [21:53] maushu: Secret? [21:53] maushu: It was never secret. [21:53] JimBastard: shhhh [21:53] maushu: Oh right, right. [21:53] JimBastard: you'll ruin the secret by saying that [21:53] benburkert has joined the channel [21:53] maushu: The humming bird flies sideways in the green sky. [21:54] javajunky: hoo-rah turns out sys.inspect ignores properties defined with defineProperty ..painful red-herring. [21:54] maushu: Anyways, I need to finish the pre-launch landing page. [21:54] tjholowaychuk: javajunky: they are non-enumerable by default [21:55] fdmanana has joined the channel [21:55] javajunky: tjholowaychuk: *AHH* so if I set the enumerable up it'll just appear, christ I need to brush up on my ES5 [21:56] rtomayko has joined the channel [21:56] hassox has joined the channel [21:56] tjholowaychuk: javajunky: depends on how inspect is implemented though, im not sure of the details [21:56] tjholowaychuk: javajunky: if it uses for/in its a different story than if it uses Object.keys() [21:57] creationix: tjholowaychuk: I'm pretty sure it uses Object.keys [21:57] creationix: so stuff up the prototype chain won't be visible [21:57] creationix: but anything enumerable will be there [21:57] borior has left the channel [21:57] javajunky: yeah it was all to do with that enumerable not being true *sigh* [21:57] creationix: and if you pass true as the second argument to sys.inspect, it will show non-enumerable stuff [21:58] javajunky: ooo nice, did not know that [21:58] javajunky: I think I'll leave these enumerable, it makes it easier on the consumer in this case (was it a deliberate choice in connect not to have the merged middlewares enumerable ? ) [22:00] EyePulp: any sneaky ways to get notice when the server.js it's running has changed and reload it? Something to remove the manual restart step during dev? [22:01] EyePulp: er, "get Node to notice" [22:01] mscdex: tjholowaychuk: if a property is non-enumerable it won't show up in Object.keys() or for..in [22:01] mscdex: from my experience anyway [22:01] jesusab-work: EyePulp: Yeah, hold on [22:01] Dmitry2 has joined the channel [22:02] jesusab-work: EyePulp: http://github.com/lrbabe/node-DJs [22:02] zmbmartin: basically what I want to do if anyone can help me is move the mongoose.model out to its own file like models/test.js --> http://gist.github.com/483665 everything that I have tried gets me no where thanks [22:02] tjholowaychuk: mscdex: no i know, but Object.keys() is the object's props AFAIK it doesnt touch the proto [22:02] jesusab-work: Using it on my IRC bot. Works pretty well actually [22:03] jesusab-work: Doesn't deal with my bot crashing though XD [22:03] ChrisRicca has joined the channel [22:03] Blackguard has joined the channel [22:03] tjholowaychuk: zmbmartin: I have no experience with mongoose sorry man [22:03] EyePulp: jesusab-work: cool! just what I needed [22:04] jesusab-work: EyePulp: Yeah, me too XD [22:05] creationix: what happens when I do buffer.toString('ascii', 0, 0) ? [22:05] creationix: I should get an empty string right? [22:06] pgriess: creationix: yes [22:06] pgriess: creationix: do you not? [22:06] creationix: nope [22:06] creationix: https://gist.github.com/0b7af4890fa1a6415d16 [22:06] creationix: I put this trace in http.js https://gist.github.com/bff95c853ab0e5e9a80f [22:07] EyePulp: so what's the best way to set up my node dev environment? I have a folder with the node checkout which I pull and rebuild occasionally, but what about all the plugins I'll be adding as I build my first project? I'm thinking a node-plugins directory that I somehow add to the node path and then can point to - I guess I just don't want copies of every plugin in every project [22:07] JimBastard: EyePulp: node is an exe now [22:07] JimBastard: you dont build inside the node folder [22:07] mau has joined the channel [22:07] JimBastard: you build anywhere you want [22:07] JimBastard: EyePulp: you should maybe install npm [22:08] JimBastard: which is a node package manager [22:08] pgriess: creationix: i see toString('ascii', 0, 0) returning the entire buffer [22:08] pgriess: creationix: not sure if that's causing what you're seeing, but its def a bug [22:08] creationix: EyePulp: http://github.com/creationix/ivy [22:08] EyePulp: JimBastard: interesting [22:08] creationix: pgriess: exactely [22:08] JimBastard: EyePulp: creationix linked you to his own env that comes with some batteries included [22:08] creationix: it's causing my http headers to eat tons of http data [22:08] pgriess: creationix: cool. fixing now. in my mania to fix 0-string support in buffers, i missed Buffer.toString() [22:08] creationix: EyePulp: just clone ivy and add/remove modules that you like [22:08] mjr_: wow [22:08] pgriess: creationix: i'll fix now [22:09] EyePulp: I'm a python guy, so I'm pro batteries-included [22:09] mjr_: Could this 0-len buffer thing have caused this corruption? [22:09] EyePulp: =) [22:09] JimBastard: EyePulp: depends what you are trying to do [22:09] JimBastard: and how low level you want to dive in [22:10] JimBastard: http://github.com/isaacs/npm [22:10] creationix: mjr_: only thing I'm not sure of is how does data get consumed when length is 0 [22:10] Validatorian: JimBastard: How is roles.js coming along? [22:10] mjr_: Also, why is it getting called at all for len === 0? [22:10] mjr_: That seems like the bigger issue. [22:10] JimBastard: Validatorian: ive put it on the back burner until i have my use case [22:11] creationix: looks like it will break when a packet starts with \r\n [22:11] JimBastard: Validatorian: hopefully ill need roles management before the end of next month [22:11] JimBastard: without auth + users, its not very complex code [22:12] JimBastard: you can peep the repo to see what im doing, but i have a feeling you need a turn-key solution [22:12] pgriess: anyone familiar w/ v8 know where/how toString() gets defined? no "toString" symbol references in node/src/**/* [22:12] EyePulp: creationix / JimBastard - thanks for the links [22:12] pgriess: ryah ^ [22:12] javajunky: tjholowaychuk: cheers for the help there, http://github.com/ciaranj/connect-auth/commit/9261317fcd37a019160487cca4f39236ad75e175 I like that idiom for pulling stuff in without forcing dependencies, or even doing it immediately, cute. [22:12] creationix: really? [22:12] ryan_gahl: all these pms and managed project thingies ultimately just make it harder to keep all code up to date, and of course don't aid in contributing patches to the various projects... i favor vanilla git [22:13] Validatorian: JimBastard: yea, looked at it earlier today -- I'll do what I can to use what you've done, but I'll certainly need it sooner than end of next month [22:13] creationix: ryan_gahl: well, mine is designed to be managed by each user, you simply pull the submodules at will [22:13] creationix: or add new ones [22:13] creationix: you don't have to wait for me to update it [22:13] tjholowaychuk: javajunky: np, if you used ruby its pretty much autoload :Foo, 'path/to/foo' works pretty good tho [22:13] ryan_gahl: creationix: which is how vanilla git works [22:13] JimBastard: Validatorian: yeah, like....if you have a requirements document or a specifications document ill try to help you out and see what i can do. but i dont see how that project could help you without having other pieces in place [22:13] creationix: ryan_gahl: Ivy is vanilla git with a couple bash scripts [22:14] ryah: pgriess: toString() ? [22:14] ryan_gahl: then it's more like vanilla with caramel ribbons in it, git [22:14] tjholowaychuk: ryan_gahl: I prefer submods to any PMs too [22:14] ryan_gahl: :) [22:14] ryah: pgriess: it's defined in v8 [22:14] JimBastard: i have mixed feelings on ivy [22:14] pgriess: ryah: there's a v8::Value::ToString() [22:14] pgriess: ryah: yeah ok [22:14] mjr_: ryah: I think creationix's corruption issue has to do with the 0-length buffer changes recently. [22:14] ryah: mjr_: ah [22:14] Validatorian: JimBastard: yea -- I'm not sure myself yet. [22:14] JimBastard: its a good thing ultimately, but it might be a bit premature. also, its gonna be a pita to maintain [22:14] creationix: or rather a 0-length buffer bug that got missed [22:15] JimBastard: but im not the maintainer, so huzaah [22:15] softdrink: are there any plans to standardize on a single package management system? [22:15] pgriess: mjr_: not a recent change. this is unrelated to my fixes [22:15] pgriess: mjr_: this is a day-0 Buffer bug [22:15] pgriess: (afaict) [22:15] creationix: JimBastard: what's hard to maintain, other than making node binaries, it's 0 overhead [22:15] ryan_gahl: softdrink: no, but the closest to that so far has been npm [22:15] JimBastard: softdrink: npm is the defacto one [22:15] ryah: pgriess: is that all you wanted to know? [22:15] JimBastard: creationix: assuming you all those submodules stay maintained [22:16] pgriess: ryah: yeah. i might need some c++/v8 help figuring out how to override that in a node datastructure, but i'll fight w/ it for a while before bugging you [22:16] creationix: ryah: basically toString(encoding, 0, 0) doesn't work [22:16] creationix: it returns the entire buffer [22:16] JimBastard: i do think its a cool idea though, i was talking about the exact same thing the other day [22:17] ryah: pgriess: just override it in js [22:17] JimBastard: creationix: it would be really cool to use that model and have people roll their own builds [22:17] pgriess: ryah: ah. that's a much better idea [22:17] creationix: JimBastard: that's the idea [22:17] JimBastard: creationix: word up, im gonna think more about that [22:17] mjr_: ryah: sometimes it seems that the parser it adding a 0 byte buffer to a header value. [22:17] creationix: JimBastard: clone it per project, and then you have node and all your libraries embedded right there, all managed and versioned with git [22:17] mjr_: This is where creationix gets those crazy long header values. [22:18] mjr_: And because of this toString(enc, 0, 0) thing, it gets really crazy. [22:18] JimBastard: you could in theory setup a git project though and have it be an NPM package? [22:18] creationix: ryah: https://gist.github.com/bff95c853ab0e5e9a80f gives https://gist.github.com/raw/0b7af4890fa1a6415d16/b57e8acc882b68e249234a925e35eaf9747bb07d/access.log [22:18] pgriess: creationix: testing patch now [22:18] creationix: pgriess: sweet [22:18] khug has joined the channel [22:18] JimBastard: anywho, im out for the day, be back in a few hours for JS sexy time [22:18] creationix: I'm thinking parser.onHeaderValue shouldn't be called in the first place for 0 length slices [22:19] EyePulp: heh - thanks for the pointers JimBastard [22:19] creationix: but fixing the bug in toString is good either way [22:19] Astro has joined the channel [22:19] ryah: creationix: do yu have a repeatable test yet? [22:19] creationix: ryah: mostly [22:19] JimBastard: anytime EyePulp , make sure to check out the modules page on the node wiki as well [22:19] jah_ has joined the channel [22:19] EyePulp: roger that [22:19] cirwin has joined the channel [22:19] creationix: the 40k chunk needs to end right before a \r\n [22:19] creationix: in the headers [22:20] creationix: it's hard to set up since I don't know how to control the chunks [22:20] mjr_: creationix: in onHeaderValue() can you check for len === 0 and return early? [22:20] mjr_: Just to see if this fixes the problem. [22:20] creationix: mjr_: sure, that should fix it [22:21] benbinary has joined the channel [22:21] phiggins has joined the channel [22:21] mjr_: So I think this is going to be hard to reproduce, because it requires a packet to begin with \r\n [22:21] mjr_: while the parser is in waiting for the end of a header. [22:22] ryan_gahl: hey creationix: another patch idea [22:22] ryan_gahl: so, here's the pattern I'd like to abstract: http://github.com/senchalabs/connect/blob/master/lib/connect/middleware/staticProvider.js#L55 [22:23] creationix: ryan_gahl: yeah, mikeal had an idea for a helper function that wrapped the stream or something [22:23] softdrink: fair enough [22:25] lucas-: yoovette foto vadnaag! [22:25] ryan_gahl: my idea is to make a .beginBuffering(req) and endBuffering(req) method pair on the main Connect exports object [22:25] ryan_gahl: simple [22:25] lucas-: apologies, ssh lag, wrong screen [22:25] jah_: i have a scoping question. i've got a snippet of code: var goblin = 42; var repl = require('repl'); repl.start(); Is goblin accessible in repl? [22:25] ryan_gahl: method names are up for debate [22:25] tjholowaychuk: ryan_gahl: they could go in connect/utils maybe [22:26] mtodd_ has joined the channel [22:26] creationix: ryan_gahl: if http pause actually buffered events internally, then it would just be req.pause() and req.resume() [22:26] creationix: I'm pretty sure ryah wants this added [22:26] ryan_gahl: good point [22:26] streblo has joined the channel [22:26] tjholowaychuk: creationix: arent those methods there? (maybe they just dont do anything) [22:27] tjholowaychuk: I tried that a few days ago expecting it to work and was all wtf.. [22:27] creationix: tjholowaychuk: it's there, but currently it leaks an event or two [22:27] tjholowaychuk: creationix: ah :) [22:27] pgriess: creationix: patch just sent to list [22:27] ryan_gahl: alright, then it sounds like for now i keep my helpers at my project level and wait for that to work [22:28] mklappstuhl has joined the channel [22:28] creationix: pgriess: cool [22:29] creationix: pgriess: so where was Buffer.prototype.toString implemented before [22:29] creationix: not in V8? [22:29] pgriess: creationix: lib/buffer.js [22:29] creationix: ahh [22:29] creationix: so you just fixed it inline [22:29] pgriess: creationix: i was having nightmares of overriding v8::Value::ToString() [22:29] pgriess: creationix: yeah [22:29] pgriess: creationix: the bug was that we were checkign for (!length) rather than (length === undefined) [22:29] pgriess: creationix: but i fixed the other 0-length stuff while i was in there [22:30] creationix: pgriess: awesome [22:31] isaacs has joined the channel [22:32] creationix: ryah: ping [22:33] ryah: yo [22:33] creationix: what calls parser.onHeaderValue in http.js? [22:33] creationix: the c code? [22:33] mjr_: yes [22:33] ryah: parser.execute() [22:34] bradleymeck_: lord overriding v8::Anything is pain [22:34] creationix: ryah: should me put an if in there to not call onHeaderValue is length is 0? [22:34] creationix: s/me/we/ [22:34] ryah: you dont the m and w confused too [22:34] ryah: s/dont/got/ [22:34] isaacs: Validatorian: it'd be good to post an issue, yes. [22:35] isaacs: Validatorian: off the top of my head, it's probably that a certain file isn't there and it thinks it is [22:35] ryah: creationix: we could - i'd like to fix the underlying issue [22:35] ryah: and more importantly have a test [22:35] ryah: so we can avoid this in the future [22:35] creationix: ryah: like what's causing 0 length events? [22:35] Validatorian: isaacs: Seems to be a /lib issue -- I created a link from the ./lib/file.js to ./file.js and it worked [22:36] creationix: my issue was caused by a bug in toString I'm pretty sure [22:36] creationix: pgriess: patch should fix that, but my question is what is creating events with no length [22:36] ryah: creationix: the packet might end at the beginning of a header.. [22:36] creationix: yes, it is [22:36] isaacs: Validatorian: ok, can you *definitely* post an issue, then? with the error and what you did to fix it? that sounds odd. at the very least, i'd like to investigate it. [22:36] isaacs: and i'll forget if you don't post it :) [22:36] creationix: so if that's a perfectly valid case, then it's simply a bug in toString [22:36] Validatorian: isaacs: sure :) [22:40] CIA-64: node: 03Peter Griess 07master * r56f200a 10/ (lib/buffer.js test/simple/test-buffer.js): [22:40] CIA-64: node: Fix Buffer.toString() on 0-length slices. [22:40] CIA-64: node: - Buffer.toString('ascii', 0, 0) incorrectly returns the entire contents [22:40] CIA-64: node: of the buffer. Fix this. [22:40] CIA-64: node: - Provide similar behavior to Buffer.write() and Buffer.copy() when [22:40] CIA-64: node: dealing with 0-length in valid and invalid byte ranges. - http://bit.ly/d5kI6v [22:40] ryan_gahl: wait a minute here [22:41] ryan_gahl: creationix: i think the logic for that event buffering is a bit flawed [22:41] creationix: ryah wohoo! [22:41] creationix: ryan_gahl: what paet? [22:41] creationix: *part [22:41] _announcer: Twitter: "node.js and npm notes - On ubuntu install the following: cmake build-essential Install node.js: git clone... http://tumblr.com/xgcduza0z" -- Craig W. http://twitter.com/mind_scratch/status/19028028772 [22:41] _announcer: Twitter: "node.js and npm notes http://post.ly/o3Og" -- Craig W. http://twitter.com/mind_scratch/status/19028028794 [22:41] creationix: ACTION is testing his app to see if the patch fixes it [22:41] ryan_gahl: meaning, if something upstream has already attached listeners to the data event... those handlers will get executed twice, no? [22:42] jesusab-work: cmake? What? [22:42] creationix: ryan_gahl: yeah [22:42] ryan_gahl: so that's no good [22:42] creationix: not likely to happen, but I guess it's possible [22:42] micheil: ryan_gahl: removeAllListeners(event) rebind listeners [22:42] creationix: the only safe solution is to have a way to either internally buffer the events, or be able to replace the stream with a proxy [22:43] creationix: micheil: well, that's no good either [22:43] ryan_gahl: ok, so here's where my patch a while back to eventEmitter that included a .suppress() and unsuppress() method pair would be nice [22:43] creationix: too messy and you don't know about other layers [22:43] Tim_Smart has joined the channel [22:43] creationix: ryan_gahl: yep, and if pause/resume worked that way it would be great for this use case [22:43] ryan_gahl: (ryah ignored it) :) [22:44] pgriess: ryah_gahl: heh, i was just about to work on a patch to do the same (though it would buffer events internally) [22:44] pgriess: ryan_gahl: rejected on what grounds? [22:44] ryan_gahl: this could all be done at the eventEmitter level [22:44] pgriess: ryan_gahl: agreed [22:44] ryan_gahl: and be generic for other uses [22:45] pgriess: ryah_gahl: totally [22:45] pgriess: n [22:45] ryan_gahl: pgriess: on the grounds that it was "features" [22:45] romainhuet has joined the channel [22:45] pgriess: that's awfully crotchety [22:45] pgriess: :D [22:45] creationix: ryan_gahl, pgriess: I already went down this road [22:45] ryan_gahl: all it was missing was the queuing and re-emitting of events [22:45] creationix: it's implemented already in most the streams [22:45] ryan_gahl: which should be optional [22:45] creationix: just not the http ones [22:46] pgriess: creationix: its not a stream issue for http. its an http_parser issue [22:46] pgriess: creationix: which is what makes it trickier. dumping this into an emitter would solve this in the general dase [22:46] ryan_gahl: it should be generic [22:46] ryan_gahl: i.e. eventEmitter level [22:46] mikeal has joined the channel [22:46] huyhong has joined the channel [22:46] ryan_gahl: it can apply to more than just streams [22:47] creationix: that was my thinking to [22:47] creationix: too [22:47] huyhong has left the channel [22:47] creationix: ask ryah [22:48] creationix: pgriess: my app hasn't crashed so far, I think your patch fixed it [22:48] ryan_gahl: eventEmitter.suppress(eventName, buffer) where buffer is a boolean indicating whether events should be queued while suppressed [22:48] pgriess: creationix: i thought it took you hours to repro? [22:48] ryan_gahl: ryah: can I make this patch now? [22:48] creationix: pgriess: I've gotten faster at it [22:48] creationix: about 2-10 minutes now [22:48] pgriess: ryan_gahl: ah that'd be nice. i was just going to pause/buffer/resume all events emitted, not event-by-event [22:48] pgriess: ryan_gahl: but i like the more granular interface [22:49] ryan_gahl: yeah, it comes in very handy [22:50] blaze-x: is the code for CIA-64 on github somewhere? (ie the git update notification) [22:50] ryan_gahl: meh, need to sign the node CLA too anyway [22:50] Tim_Smart has joined the channel [22:51] micheil: ryan_gahl: what did I tell you? :P [22:51] ryan_gahl: ok, have to go home for dinner before wife suppresses ME [22:51] ryan_gahl: will come back to this eventEmitter.suppress / request.pause business tonight, l8r [22:52] micheil: well, actually, EventEmitter._events = [] if attached events > 1, so, just shift() instead of push() [22:53] micheil: eg, EventEmitter.prototype.addListenerBefore = function(event, callback) [22:53] bradleymeck_: url.parse is giving me bad juju on localhost after a path.join... [22:53] micheil: if that method is called, and attached events =< 1, create new array and shift [22:53] micheil: bbl. [22:59] ben_alman has joined the channel [23:02] chrischris has joined the channel [23:02] chewbran1a has joined the channel [23:04] _announcer: Twitter: "At #raleigh.rb waiting for @aaronheckmann to extol the virtues of Express and Node.js. Should be fun." -- Mark Imbriaco. http://twitter.com/markimbriaco/status/19029423772 [23:06] chewbranca has joined the channel [23:06] chewbranca_ has joined the channel [23:07] creationix: mjr_: I want to bundle node_pcap with ivy? [23:08] mjr_: sure, why not [23:08] creationix: why did I put a question mark on that? [23:08] mjr_: I don't know? [23:08] creationix: anyway, I have some technical problems [23:08] jesusab-work: What's node_pcap? [23:08] creationix: mjr_: what exactely is the compiled part [23:08] creationix: and I'm assuming it's required? [23:08] mjr_: jesusab-work: http://github.com/mranney/node_pcap [23:09] mjr_: creationix: yes, the magic of node_pcap is that it binds node to libpcap, which is a C library for raw packet capture. [23:09] jesusab-work: sweet! [23:09] creationix: ok, so I want to include pre-built binaries [23:09] creationix: since ivy is a binary distribution [23:09] mjr_: jesusab-work: check out http_trace in there, for an example of what you can do with it. [23:10] tjgillies has joined the channel [23:10] mjr_: creationix: yeah, you'll need to compile pcap_binding.cc into pcap_binding.node, which is native code. [23:10] creationix: does it pull in pcap staticly of dynamic link? [23:10] creationix: though I guess it doesn't matter since osx and linux seem to come with pcap out of the box [23:11] mjr_: It uses whatever the default compile / link flags are, so probably dynamic linking if you have a shared lib version of libpcap on your computer. [23:11] charlenopires has joined the channel [23:11] mjr_: Most linux does not come with pcap. [23:12] mjr_: er, libpcap. [23:12] creationix: hmm, so I'd want to force a static build then [23:12] mjr_: OSX does as of 10.6. Before that, people used macports or whatever we did before homebrew came out. [23:12] jesusab-work: neat, mjr_ [23:12] mjr_: I think you'll want to do static linking, yeah. [23:12] creationix: dang, this sounds hard [23:12] mjr_: nah, it's easy [23:13] mjr_: just link with --static [23:13] pquerna: not for a shared library [23:13] pquerna: if you want a subset of librries its linking in to be static [23:13] mjr_: assuming you have a non-shared version of libpcap on your computer, I guess. [23:13] creationix: mjr_: also, ivy doesn't use package.json, it just assumes that executables are in /bin and modules are in /lib [23:14] markwubben has joined the channel [23:15] mjr_: yeah, I guess that's odd. Also, OSX only comes with shared libpcap. [23:15] creationix: mjr_: if you maintained a repo that contained pre-built binaries and structured your code to be the format I expect, I could include, but that's a lot to ask [23:15] charlenopires has joined the channel [23:17] tjgillies: how do you print to STDOUT? [23:17] creationix: tjholowaychuk: console.log() [23:17] tjholowaychuk: creationix ? [23:17] creationix: sorry, tjgillies console.log() [23:17] tjholowaychuk: haha [23:18] mjr_: creationix: I can get you a binary if you want, but the dynamic linking thing sucks. It sort of defeats the purpose of what I think you are trying to provide. [23:18] tjgillies: creationix, thnx [23:18] _announcer: Twitter: "Multi-core HTTP Server with Node.js http://j.mp/9eTRjc" -- Masaki YOSHIDA. http://twitter.com/ReSTARTR/status/19030266185 [23:18] creationix: mjr_: I'll have to think about it some more [23:18] mjr_: Next time we meet up in person, let's hash it out. [23:18] creationix: mjr_: I'll be at the node presentation tomorrow, you going to be there? [23:18] mjr_: Oh, I didn't know about it. When / where? [23:19] creationix: mjr_: http://www.facebook.com/#!/event.php?eid=106330769408119&index=1 [23:19] jesusab-work: Is there a con goin' on? [23:20] jesusab-work: neat! [23:20] _announcer: Twitter: "# Nodejs very cool thing, I think on it in the near future there will be some sort of a WEB OS" [ru] -- Vladimir. http://twitter.com/sparrowpublic/status/19030402704 [23:20] hellp has joined the channel [23:21] pquerna: record it on video :) ? [23:21] mjr_: creationix: I might be able to make it, but probably not. If you want to come by a bit earlier and chat, that would work for me, like 5-6 or something. [23:21] charlenopires has joined the channel [23:21] creationix: maybe, I'll be fighting traffic [23:22] EyePulp: so how do I make npm point to a proper registry (or does it point to one by default) and then how do I search for packages? I'm reading through the md help files, but failing [23:22] creationix: EyePulp: it points to one by default [23:22] EyePulp: creationix: perfect [23:22] creationix: EyePulp: and this points to some of it http://npm.mape.me/ [23:23] creationix: not sure how complete the site is [23:24] webandy has joined the channel [23:24] EyePulp: creationix: danke. so is there no way to search available packages from within the npm command line? [23:24] creationix: EyePulp: there might be, not sure [23:24] creationix: ask isaacs_home [23:25] EyePulp: creationix: ah - the responsible party =) thanks [23:25] webandy: I'd like to use a Rails application and have after_save events that post to Node without the need for a middle queue layer.......but then have connected WebSocket browsers to node (using the websocket stuff) receive the update. what is the best way to have rails app talk to node server.....just HTTP post at it? [23:25] creationix: webandy: sounds good [23:25] jesusab-work: webandy: Why not? [23:25] rauchg_: webandy: sounds good [23:26] webandy: ok cool.....so I probably just need a POST endpoint, then a different endpoint that WebSocket browsers can connect to.....seems easy enough [23:26] creationix: webandy: you can even do two different http servers on different ports [23:26] lachlanhardy has joined the channel [23:26] rauchg_: webandy: correct, some hidden endpoint [23:27] rauchg_: like creationix says, you can listen on 8080 and not have that port exposed to the interwebs for example [23:27] isaacs: EyePulp: npm ls [23:30] EyePulp: isaacs: thanks -that did it [23:31] jlilly has joined the channel [23:33] ako has joined the channel [23:34] r1ngzer0 has joined the channel [23:39] ironfroggy has joined the channel [23:39] tjholowaychuk: http://expressjs.com/guide.html now has a somewhat less PITA guide menu lol [23:39] tjholowaychuk: scroll down and it will roll up [23:41] maushu: Holy crap, that is one heavy page. [23:41] tjholowaychuk: sure is [23:41] tjholowaychuk: lags the shit out of my ipad [23:41] maushu: Split into multiple pages for the love of the universe! [23:41] joemccann has joined the channel [23:42] tjholowaychuk: nevaaaa [23:42] joemccann: quick, doing presentation on node.js for Austin JS in 1 hour [23:42] joemccann: i need a list of people you should follow for node.js [23:42] joemccann: currently i have [23:42] maushu: joemccann, NODE.JS IS AWESOME! Presentation over. [23:42] joemccann: @ryah, @izs, @creationix, @tjholowaychuk [23:43] maushu: felix? [23:43] tjholowaychuk: whats this @shit going down for [23:43] joemccann: maushu: haha...true...gonna cover high level (hello world demo), Express (with demo), and Web Sockets (with demo) [23:43] tjholowaychuk: ohh [23:43] joemccann: twitter [23:43] joemccann: lol [23:43] maushu: joemccann, @felixge [23:44] _announcer: Twitter: "There are only 5 job postings on all of craigslist related to node.js - Reminds me of rails 5 years ago" -- Mel Gray. http://twitter.com/melgray/status/19031793433 [23:44] joemccann: maushu: thx [23:44] isaacs: joemccann: woo! good luck! [23:45] maushu: joemccann, you have a list of people here: http://wiki.github.com/ry/node/node-users [23:45] maushu: Knock yourself out. :p [23:45] joemccann: ACTION just accidentally knocked myself out [23:45] isaacs: !tweet @melgray WOW FIVE!? That's gotta be some kind of new record!! [23:46] maushu: joemccann, *himself [23:46] maushu: Dammit, use 3rd person when ACTIOning. [23:46] maushu: It makes me twitch if you don't. [23:46] joemccann: isaacs: btw, your twitter handle on that node users list is that composer in LA [23:46] isaacs: joemccann: the handles in () are irc handles, not twitter handles (necessarily) [23:46] maushu: isaacs, in a couple years... node.js everywhere! [23:47] joemccann: isaacs: thx [23:47] isaacs: the link that says "twitter" points to me properly [23:47] joemccann: maushu: my bad scrambling like OJ evading the cops in a Ford Bronco getting AustinJS up and running tonight [23:47] maushu: lulz [23:49] creationix: joemccann: have fun, presenting on node makes for instant success [23:49] mattly has joined the channel [23:49] _announcer: Twitter: "@nodejsbot I take it back, 3 of the job postings were expired. Only 2 posts related to node.js" -- Mel Gray. http://twitter.com/melgray/status/19032159924 [23:50] joemccann: creationix: thx! [23:51] _announcer: Twitter: "I'm thinking using something like #redis for low-value data and #mysql for high-value data. MySql makes me twitch though. #node.js #nosql" -- Diogo Gomes. http://twitter.com/graphnode/status/19032251670 [23:53] ChrisRicca has joined the channel [23:53] _announcer: Twitter: "On another news, announcer in the #nodejs irc channel hasn't crashed yet! I think I will use it as the first example project for graphnode." -- Diogo Gomes. http://twitter.com/graphnode/status/19032390844 [23:54] zack_ham has joined the channel [23:55] maushu has joined the channel