[00:00] rikarends: micheil: yeah i know, i just wanna stay away from IO code [00:00] rikarends: micheil: unless i have to [00:00] micheil: rikarends: the event.h is a compat layer [00:01] [[zzz]] has joined the channel [00:01] rikarends: my timezone is 2AM [00:01] drudge_ has joined the channel [00:01] rikarends: GMT+1 or something [00:02] micheil: rikarends: okay, so, same as rubin. [00:02] micheil: *ruben [00:03] rikarends: anyway. ttyl :) zztime. [00:03] micheil: rikarends: we should talk more later. talk to ruben about it / me. [00:04] aconbere has joined the channel [00:04] CIA-94: node: 03Ryan Dahl 07master * rae802e3 10/ Makefile : Improper use of CFLAGS - http://bit.ly/bvBy5g [00:04] echosystm has left the channel [00:04] CIA-94: node: 03Ryan Dahl 07dumper * r1acef43 10/ src/node_io_watcher.cc : increase iovcnt (+7 more commits...) - http://bit.ly/dlcgBQ [00:05] echosystm has joined the channel [00:05] echosystm: guys, can someone point me in the right direction on how to delegate cpu-intensive tasks? [00:05] rnewson has joined the channel [00:05] rnewson has joined the channel [00:05] echosystm: is webworkers available yet? [00:06] rbranson: rabbitmq [00:06] justinf200 has joined the channel [00:07] Tim_Smart has joined the channel [00:07] jfd1 has joined the channel [00:09] saschagehlich has joined the channel [00:12] [[zz]] has joined the channel [00:13] bpot has joined the channel [00:18] tmpvar: i r ninja too [00:22] ryah_: echosystm: http://github.com/pgriess/node-webworker [00:22] echosystm: i tried that one ryah_ , it seems the websocket package doesnt exist [00:22] echosystm: has its name changed or something? [00:25] quirkey has joined the channel [00:26] jesusabdullah has joined the channel [00:26] ryah_: hm [00:27] ryah_: websocket? [00:27] ryah_: i don't know [00:27] echosystm: there seems to be "worker" by cramforce and "webworker" by pgriess [00:27] echosystm: do you know which of these is most mature/developed? [00:27] ryah_: yeah, probably the pgriess one is better [00:27] rauchg_ has joined the channel [00:28] echosystm: ok [00:28] echosystm: cheers [00:28] braddunbar has joined the channel [00:29] mtodd has joined the channel [00:39] robotarmy has joined the channel [00:44] dxld has joined the channel [00:44] softdrink has joined the channel [00:44] softdrink has joined the channel [00:51] bbttxu has joined the channel [01:00] sarmiena has joined the channel [01:01] bbttxu has joined the channel [01:01] dxld has left the channel [01:04] [[zz]] has joined the channel [01:06] cloudhead has joined the channel [01:15] quirkey has joined the channel [01:32] Tim_Smar1 has joined the channel [01:34] robotarmy has joined the channel [01:38] pedrobelo has joined the channel [01:39] MikhX has joined the channel [01:42] bgriffith has joined the channel [01:47] rwaldron has joined the channel [01:48] softdrink has joined the channel [01:51] bgriffith has joined the channel [01:54] bgriffith has joined the channel [02:04] stepheneb has joined the channel [02:13] Evet has joined the channel [02:20] eee_c has joined the channel [02:22] cardona507 has joined the channel [02:28] themiddleman has joined the channel [02:33] boaz has joined the channel [02:33] robotarmy has joined the channel [02:36] elijah-mbp has joined the channel [02:36] janm has joined the channel [02:36] ehaas has joined the channel [02:39] braddunbar has joined the channel [02:43] noahcampbell has joined the channel [02:44] shaver: weird [02:45] shaver: when I run a redis command from redis-cli, it completes very quickly [02:45] shaver: and doing it through node used to be just as fast earlier [02:45] shaver: but now takes like multiple seconds [02:45] shaver: very odd [02:45] mjr_: try setting redis.debug_mode = true; [02:45] mjr_: on the module [02:45] shaver: OK! [02:45] mjr_: Then you can see the wire protocol [02:46] shaver: I was watching on redis via "monitor" [02:46] shaver: the commands were right, at least [02:46] mjr_: So on the module, not on the client. It applies to all clients. [02:46] shaver: yep [02:47] shaver: oh, hmm [02:47] shaver: I wonder if I am actually a victim of a firefox websocket bug here [02:49] Anti-X: unpossible [02:51] softdrink has joined the channel [02:55] shaver: mmm [02:58] shaver: yes, I was JSON-encoding the results object by accident [02:58] shaver: which is not a good idea [02:59] deepthawtz has joined the channel [03:00] gwoo has joined the channel [03:04] mikeal has joined the channel [03:07] aconbere has joined the channel [03:09] echosystm has joined the channel [03:10] mikeal has joined the channel [03:11] saikat has joined the channel [03:13] quirkey has joined the channel [03:21] gilesgoatboy has joined the channel [03:22] robotarmy has joined the channel [03:25] gilesgoatboy: is there a simple way I can just get node to turn "http://www.foo.com" into "http%3A%2F%2www.foo.com%2F"? i mean aside from the obvious regex [03:25] shaver: v8: encodeURIComponent("http://www.foo.com") [03:25] v8bot: shaver: "http%3A%2F%2Fwww.foo.com" [03:26] gilesgoatboy: awesome! muchas gracias [03:27] jrockjiggz has joined the channel [03:40] mikeal has joined the channel [03:41] paul_irish has joined the channel [03:45] shimondoodkin has joined the channel [03:48] meso has joined the channel [03:51] meso has left the channel [03:51] cloudhead has joined the channel [03:51] ivan has joined the channel [03:53] banjiewen has joined the channel [03:56] meso has joined the channel [04:01] mjr_ has joined the channel [04:02] ryah_: ACTION likes that ubuntu has clang 2.8 packages already [04:04] Tim_Smar1: What is ryah_ doing on ubuntu? [04:04] Tim_Smar1: testing? [04:05] ryah_: Tim_Smar1: that's what i use [04:05] ryah_: http://github.com/pgriess/node-webworker [04:05] shaver: nice [04:05] ryah_: er.. accidental paste [04:05] Tim_Smar1: ryah_: Oh cool. Do you use gnome? [04:05] ryah_: Tim_Smar1: awesomewm [04:11] gwoo_ has joined the channel [04:11] gwoo_ has joined the channel [04:15] path[l] has joined the channel [04:16] shaver: node + redis = holy fuck that's fast [04:18] Tim_Smart: shaver: What client are you using? [04:19] AAA_awright has joined the channel [04:19] shaver: mjr's [04:21] sivy has joined the channel [04:31] saschagehlich_ has joined the channel [04:44] pedrobelo has joined the channel [04:57] bbttxu has joined the channel [04:59] chapel: http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html [04:59] paul_irish has left the channel [05:02] unomi has joined the channel [05:04] sudoer has joined the channel [05:05] pedrobelo has joined the channel [05:08] shirro has joined the channel [05:12] isaacs has joined the channel [05:13] deepthawtz has joined the channel [05:13] shaver: micheil: what's the recommended way to find out the peer IP address from websocket-server? just want it for logging [05:15] micheil: wow. [05:15] micheil: shaver: you sir, have impeccably good timing. [05:15] shaver: I could grovel through _req.socket or whatever [05:15] shaver: I'm handsome, too [05:15] micheil: ACTION just got up from a sleep. [05:16] micheil: okay, why IP [05:16] shaver: I'm about to go down for one [05:16] micheil: IP of a client? [05:16] shaver: yeah [05:16] shaver: getpeername(socket), basically [05:16] micheil: client._req.socket [05:17] shaver: conn._req.socket? [05:17] micheil: uh, yes [05:17] shaver: ah, hmm [05:18] micheil: shaver: would it be helpful for me to add a reference to the socket? [05:18] micheil: (it would increase the memory foot print per connnection slightly) [05:19] shaver: I was thinking about a client descriptor, lazily allocated on first get, that had socket endpoints and version [05:20] shaver: you could just give a method that reached down to it, don't need to store another ref I think [05:20] micheil: you do have version [05:20] micheil: conn.version [05:20] micheil: it's a getter only [05:20] micheil: it's there [05:21] shaver: ah, right [05:21] micheil: there's also ID (which will be changing so I can better handle horizontal scaling) [05:21] shaver: yeah, I've been using id for some diagnostics [05:21] shaver: it's handy [05:21] micheil: it is. [05:22] micheil: but soon it'll be something like process id + remote port [05:22] micheil: currently it's just remote port [05:22] shaver: that must collide something awful [05:22] micheil: (so if you do a netstat or lsof, then the client id will be the remote port) [05:22] micheil: it doesn't collide at all [05:23] micheil: provided you only have one server [05:23] shaver: two clients using the same remote port? [05:23] shaver: oh, local port [05:23] shaver: wait, no [05:23] micheil: not happening. [05:23] shaver: local port is 8000 or whatever [05:23] shaver: why not happening? [05:23] micheil: it's a really great (hack I guess) to get an id [05:23] micheil: conn._req.socket.remotePort [05:24] shaver: (clientA, 5555, server, 8000) and (clientB, 5555, server, 8000) are legal sockets, with the same remotePort [05:24] micheil: http://nodejs.org/api.html#stream-remoteaddress-236 [05:24] shaver: only the full 4-tuple has to be unique [05:24] shaver: yeah [05:25] shaver: *that's* unique, if you only listen on one port locally [05:25] micheil: I don't think you'll get two remote ports. [05:25] shaver: but the portNumber alone isn't [05:25] micheil: or, at least, I never been able to produce collision without reaching max file descriptors [05:25] shaver: remoteAddress isn't unique either [05:25] shaver: you can't collide from a single client [05:25] micheil: no [05:26] micheil: but thousands of clients [05:26] shaver: you can do it with two, with netcat [05:26] micheil: and if you can, then all chances of message routing are gone. [05:26] mbrochh has joined the channel [05:26] shaver: because of id collision? yeah [05:26] micheil: shaver: prove it? [05:26] micheil: no [05:26] micheil: because the socket's need to be unique channels [05:27] shaver: the sockets are unique [05:27] amerine has joined the channel [05:27] shaver: a socket is unique if it has a 4-tuple that's unique [05:27] micheil: okay, and how do you identify them? [05:27] shaver: by the 4-tuple [05:27] shaver: (for a single server that manages a single listen() socket, by the pair (client IP, client port) [05:27] micheil: remoteAddress and remotePort are the results off... [05:27] shaver: getpeername() [05:28] noahcampbell has joined the channel [05:28] Aria: Windows prior to XP will collide ~automatically. They start at port 1134. [05:28] shaver: yeah [05:28] Aria: I'm sure there are smartphones just as dumb. [05:28] shaver: old sunos, too [05:28] shaver: smartphones mostly work through a proxy somewhere, but yeah [05:29] shaver: give me a server to connect to, I'll open sockets from two different machines with the same remote-to-the-server port [05:30] AAA_awright: Are there any IRC client web frontends written with Node.js? [05:30] Aria: Same here. I've plenty of IPs, and bind() before connect() is easy. [05:30] Aria: AAA_awright: I dunno, but I was going to create one soon if not [05:31] AAA_awright: Aria: In particular, one that you can login to, do you know of Quassel? [05:31] micheil: var s = new Stream({ fd: peerInfo.fd, [05:31] micheil: type: self.type, [05:31] micheil: allowHalfOpen: self.allowHalfOpen }); [05:31] micheil: s.remoteAddress = peerInfo.address; [05:31] micheil: s.remotePort = peerInfo.port; [05:31] micheil: it'd have to be unique. [05:31] Aria: I don't offhand, AAA_awright [05:31] shaver: remote address+port is unique for a given socket fd [05:31] shaver: here: [05:32] micheil: shaver: do you have a peice of code / a terminal command I can use to induce a collision? [05:32] AAA_awright: Aria: It has a core that connects to IRC servers and a client that attaches/detatches to the core, and automatically sets /away if no one is attached, pretty cool design [05:32] shaver: http://gist.github.com/656172 [05:32] shaver: sure [05:32] Aria: Nice. Like cgiirc that doesn't stink [05:32] shaver: I just did "nc -p 5555 hostname 8000" from two machines [05:32] micheil: in which case the ip's are different [05:32] shaver: yes [05:33] micheil: anyway, web browsers don't do that, so it's some what safe. [05:33] shaver: ? [05:33] micheil: but. It is changing. [05:33] shaver: OSes pick ports at random from their ephemeral range [05:33] shaver: you can certainly collide [05:33] AAA_awright: Aria: Except my 1.3GB sqlite database is blocking networking long enough for my connections to timeout, and there is no web frontend... I was thinking of writing one with Node.js that uses gzipped logs (or a database maybe) and a web frontend, with next-generation goodies like desktop notifications from Javascript [05:34] Aria: Nice. [05:34] shaver: ok, bedtime for me I think [05:34] Aria: I'd love such a thing. [05:34] micheil: shaver: actually. I see what's happening there. [05:35] micheil: shaver: okay, issue confirmed. (oversight on my behalf) [05:35] shaver: glad we had this chat, that sort of thing would be soul-destroying to find in production at scale [05:37] micheil: http://github.com/miksago/node-websocket-server/issues/issue/31 [05:37] shaver: thanks for the websockets module, btw -- was a big help getting this stuff up [05:37] micheil: shaver: I'm going to be making the connection ids come from the manager soon instead. [05:37] micheil: although, the next version will be using 0.3.0 [05:38] micheil: and won't be backported probably. [05:38] shaver: I'm on 0.3.0 now [05:38] micheil: okay. that's fine then [05:38] shaver: there are some lingering uses of 'sys' in one of my modules [05:38] shaver: wish that warning had file/line info [05:39] micheil: you could. [05:39] micheil: just edit the code, find the console.log for it [05:39] micheil: and make it throw. [05:40] micheil: (we didn't want to do that just yet though) [05:40] shaver: yeah, I mean without making it fatal [05:40] micheil: oh [05:40] micheil: no luck then, possibly. [05:40] shaver: I agree that it would be painful to make it fatal now [05:40] shaver: I don't know if v8 has API for that [05:41] micheil: hmm.. [05:41] shaver: the debug API must, I guess [05:41] micheil: if (!sysWarning) { [05:41] micheil: var e = new Error(); [05:41] micheil: sysWarning = "The 'sys' module is now called 'util'. It should have a similar interface."; [05:41] micheil: util.error(sysWarning, e); [05:41] micheil: } [05:41] micheil: maybe? [05:42] shaver: that will report the line of the "new Error()" [05:42] shaver: will it show the stack? [05:44] micheil: not sure. probably not. [05:44] micheil: other thing todo is a search in your project tree for require("sys") [05:44] micheil: and require('sys') [05:44] micheil: brb [05:46] shaver: yeah, b'night [05:47] Tim_Smart: ryah_: How goes dumper? [05:48] Me1000 has joined the channel [05:52] zentoooo has joined the channel [05:58] mtodd has joined the channel [05:59] jchris1 has joined the channel [06:04] micheil: hey Tim_Smart [06:10] sarmiena has joined the channel [06:17] cferris has joined the channel [06:25] echosystm has joined the channel [06:25] echosystm: dudes, im getting this issue with npm [06:25] echosystm: http://github.com/mde/geddy/issues/issue/34 [06:26] echosystm: or this one [06:26] echosystm: http://github.com/mde/geddy/issuesearch?state=open&q=command+failed#issue/46 [06:26] echosystm: (more recent) [06:26] echosystm: anyone ever seen this before and suggest how i might fix it? [06:27] mtodd has joined the channel [06:30] bradleymeck has joined the channel [06:36] mbrochh has joined the channel [06:37] sarmiena: anyone know why this might be happening when trying to install from git repo? ./configure [06:37] sarmiena: configure: error: cannot find macro directory `m4' [06:41] sivy has joined the channel [06:50] echosystm has joined the channel [07:01] stepheneb has joined the channel [07:04] micheil: sarmiena: no [07:04] micheil: is this windowS? [07:07] sarmiena: no [07:07] sarmiena: centos5 [07:07] Aria: There is a AC_CONFIG_MACRO_DIR([m4]) now in configure.ac [07:07] Aria: And no m4/ directory in the distro. [07:08] Aria: sarmiena: try a 'mkdir m4' and see if that helps [07:08] sarmiena: Aria: i see. so i have to find out what the macro_dir is and create it in my file system? [07:08] Aria: Just a stab in the dark there. [07:08] micheil: sarmiena: hmm.. [07:08] Aria: (and if so, what version of autoconf do you have?) [07:08] micheil: sarmiena: being a unix, I'd expect it to configure properly [07:08] ngw has joined the channel [07:08] sarmiena: it's linux though [07:09] micheil: sarmiena: yeah. it seems odd [07:09] sarmiena: autoconf 2.59 [07:09] Aria: Never underestimate the power of autoconf's weirdness. [07:09] sarmiena: hehe [07:09] Aria: Once you get a configure script it usually works just fine. But getting that out of autoconf can be funky [07:09] micheil: sarmiena: check that you have autoconf [07:10] micheil: and that it's 2.6 [07:10] sarmiena: micheil: centos5 only supports 2.59 [07:10] micheil: okay [07:10] sarmiena: where did you get 2.6 from though? [07:10] sarmiena: is that what you have? [07:11] janm has joined the channel [07:11] micheil: I have 2.61 [07:11] micheil: os x [07:11] sarmiena: i see [07:11] micheil: nws autoconf -V master [07:11] micheil: autoconf (GNU Autoconf) 2.61 [07:11] sarmiena: hmm [07:11] micheil: (ignore nws and master there, they are shell things) [07:12] Aria: Hm. I don't get it with node HEAD on my PLD linux box, autoconf 2.68. Looks like autoconf 2.59 is pickier. [07:12] Aria: No surprise there to me. [07:12] sarmiena: i see [07:12] Aria: does a mkdir m4 make it work? [07:12] sarmiena: lemme see [07:13] sarmiena: ugh indeed it does [07:13] sarmiena: lol [07:13] sarmiena: thank you [07:14] micheil: sarmiena: interesting issue. [07:14] Aria: You are welcome. [07:14] micheil: sarmiena: can you please report it as an issue on the github: http://github.com/ry/node/issues [07:14] micheil: and email the nodejs-dev@googlegroups.com mailing list with a link to the bug report. [07:14] Aria: (Bet ryah has one in his repo, but git ignores empty directories) [07:15] SamuraiJack has joined the channel [07:15] micheil: ryah_: it's not in .gitignore [07:16] micheil: erm [07:16] micheil: Aria: [07:16] micheil: (and we would've added it there, I'm sure.) [07:16] Tprice has joined the channel [07:16] Aria: Oh, I know. but git won't represent an empty dir. [07:16] Tprice has left the channel [07:16] Aria: Git's dumb sometimes. [07:16] Aria: (you have to put a flag file in it) [07:17] sarmiena: will do sirs [07:17] nXqd has joined the channel [07:18] nXqd: wow, I do need help here, how can I load my 404.html when client failed to enter a wrong address [07:19] mde has joined the channel [07:20] nXqd: hey guys, anyone here [07:22] Aria: Nobody here but us noders. [07:22] Aria: No idea what you're asking though, nXqd [07:22] micheil: hmm.. http://jsperf.com/test-createid2/4 [07:22] nXqd: Aria: I mean, when client enter : http://localhost/wrong > server will load 404.html instead [07:22] nXqd: how can i implement that :D [07:23] Aria: Well, read the file, write it to the response. [07:23] micheil: well, you'd need to know what right addresses are [07:23] Aria: fs.openReadStream, response.write, and sys.pump might be your friend here. [07:24] chapel: hmm micheil create3 is infinite [07:24] micheil: chapel: not at all. [07:25] micheil: I get 1.7 million ops / s [07:25] chapel: http://i.imgur.com/tfXMX.png [07:25] micheil: 0.6 for create id [07:25] micheil: and 0.4 for create4 [07:25] chapel: infinite [07:25] micheil: oh, yeah [07:25] micheil: chrome is. [07:26] micheil: chapel: you have chrome 8? [07:27] chapel: yeah [07:28] micheil: hmm.. [07:29] micheil: chapel: yeah, I'm not sure if 66% slower means much. [07:30] micheil: actually. [07:30] chapel: ran it again http://i.imgur.com/KxKGQ.png [07:30] Utkarsh has joined the channel [07:30] micheil: Under any logical circumstances, you couldn't exceed 1.3 million connections per second [07:31] micheil: although, at the same time, Math.random()*1000 will eventually conflict. [07:33] micheil: chapel: this is to fix an issue with connection id addressing in node-websocket-server [07:33] marshall_law has joined the channel [07:34] micheil: where as a counter should never conflict. [07:34] micheil: I guess I can always make it better later. [07:35] micheil: but for now 1.3.53 fixes the issue with nc -p 5555 server port [07:35] sudoer has joined the channel [07:35] kawaz_air has joined the channel [07:39] micheil: so yeah, key space is a bigger issue then speed. [07:43] nXqd: anyone knows how to write a redirect in nodejs [07:44] nXqd: I've searched but it point me to expressjs , I think I should write it in nodejs first [07:44] Jonasbn_ has joined the channel [07:51] matjas has joined the channel [07:59] masahiroh has joined the channel [08:01] Max-Might has joined the channel [08:01] SubStack: nXqd: res.writeHead(301, { Location : '/mooooo' }) [08:02] SubStack: or something like that [08:06] tlrobinson has joined the channel [08:08] unomi has joined the channel [08:12] Druid_ has joined the channel [08:12] nXqd: SubStack: It seems not work 'Location' : '/404.html' right ? [08:12] Superman_ has joined the channel [08:12] nXqd: 404.html is my 404 [08:12] Superman_: I installed the ndoe.js with cygwin [08:13] Superman_: but don't know how to run the node.js and compile and run the node programs [08:13] Superman_: any help will be appreciated [08:15] Superman_: node node node node [08:15] Superman_: on cygwin how it will work [08:15] Superman_: how can i run it and test the programs [08:15] Superman_: ?????????? [08:16] disq has joined the channel [08:16] disq has joined the channel [08:16] nXqd: SubStack: So I have to write a res when the req is 404.html ? [08:17] SubStack: what [08:17] matjas has joined the channel [08:17] SubStack: nXqd: if you mean to say that you need to handle the route for /404.html somehow then yes [08:19] nXqd: that's what I want, when I writeHead, the url changes to localhost:xxx/404.html [08:19] SubStack: yes [08:19] SubStack: that is how redirects work [08:19] nXqd: and this time I'll load the 404.html if the uri.pathname === 404 ? [08:19] Tim_Smart: Superman_: You need kryptonite. [08:20] Superman_: what is that? [08:20] SubStack: 07:43:40 < nXqd> anyone knows how to write a redirect in nodejs [08:20] Superman_: my OS is windows xp [08:20] frodenius: :D [08:21] SubStack: oh whoops, misread [08:21] nXqd: SubStack: somehow My english is not good so I can't express clearly. but it like the other site on the internet, when you load wrong address, it'll direct you to 404.html file , I try your writeHead, my 404.html in ./404.html . And I try the address file:// and it still doesn't work :) [08:21] SubStack: nXqd: also connect/express are really easy to set up to serve static files [08:22] nXqd: SubStack: yes, that's what I want . but http header only provides information right ? [08:22] SubStack: well file:// probably would never work for security reasons [08:23] nXqd: SubStack: thanks, so I must write my whole nodejs to express ? [08:23] kkaefer: apart from http://github.com/ry/node/wiki/Modules#i18n, are there any other l10n/i18n modules? [08:27] mikeal has joined the channel [08:29] mikeal has joined the channel [08:29] [[zz]] has joined the channel [08:32] mikeal1 has joined the channel [08:34] aconbere has joined the channel [08:38] mbrochh has joined the channel [08:42] Max-Might has joined the channel [08:43] MikhX has joined the channel [08:48] [[zz]] has joined the channel [08:51] femtoo has joined the channel [08:52] unomi has joined the channel [08:54] qFox has joined the channel [08:54] mbrochh has joined the channel [08:59] zomgbie has joined the channel [09:01] tekky has joined the channel [09:02] SamuraiJack has joined the channel [09:03] micheil: ryah_: ping. [09:04] micheil: actually, it's too early. [09:12] altamic has joined the channel [09:12] Evet: how to build a memcache server? [09:13] Max-Might has joined the channel [09:19] ajsie has joined the channel [09:20] d0k has joined the channel [09:23] ajsie: what formatting is the .md files using: http://github.com/isaacs/npm/blob/master/doc/developers.md [09:23] faust45 has joined the channel [09:24] Evet: Tim_Smart: youre using nginx front of node, right? [09:24] Tim_Smart: Evet: I have yes. [09:25] Tim_Smart: I only have one Node app running at the moment, and that is on no.de [09:26] micheil: ajpiano: that would be Gruber's Markdown [09:27] Evet: Tim_Smart: im trying to make node.js serve app over tcp, since nginx' proxy_pass doesnt support keepalive. does it make sense? [09:27] kawaz_air has joined the channel [09:30] micheil: Evet: on no.de, the node processes are running direct to the port. [09:31] Nohryb has joined the channel [09:31] Tim_Smart: Evet: Maybe take a look at haproxy. [09:32] micheil: haproxy dies on websockets.. [09:33] olivvv_ has joined the channel [09:34] olivvv_: hi, Im doing : http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [09:34] olivvv_: and I m in this error : Unable to Remap to Same Address as Parent [09:34] olivvv_: in the solution it is written : sing dash or ash as a shell run: [09:34] olivvv_: *Using dash or ash [09:34] olivvv_: what is that ? [09:35] olivvv_: dash? ash ? [09:35] guybrush: olivvv_: shells [09:35] guybrush: like bash (which may be more poopular) [09:36] guybrush: `echo $SHELL` will tell you on what you are [09:38] olivvv_: in the ms-dos window ? I m on vista... [09:38] guybrush: sorry i dont have any idea about cygwin [09:38] mAritz has joined the channel [09:39] guybrush: you installed cygwin right? [09:39] guybrush: just type cygwin in your start-windows-thing and it should pop up [09:40] guybrush: then you will be in a shell i guess [09:40] Tim_Smart: micheil: Seems this guy is using haproxy + websockets just fine http://www.mail-archive.com/haproxy@formilux.org/msg02754.html [09:40] micheil: draft 75 maybe, but draft 76 is broken [09:41] micheil: iirc. [09:43] mAritz: micheil: why is everything broken? :( [09:43] KOBA789 has joined the channel [09:43] rikarends has joined the channel [09:43] micheil: mAritz: draft 76 sends message body, without declaring it. [09:43] micheil: it's against HTTP spec, and breaks most http parsers [09:43] mAritz: yes, but why is everything broken? ;D [09:43] micheil: huh? [09:44] mAritz: (more of a fundamental question, since you also broke the sad news about ssl in node to me) [09:44] micheil: mAritz: well, ssl been broken from the start of node [09:44] micheil: but it's being fixed. ask Tim_Smart and pquerna [09:44] mAritz: yep :( [09:44] pquerna: try the branch out [09:44] pquerna: test it [09:45] mAritz: Tim_Smart: why is everything broken? (oh god, maybe i should stop) [09:45] micheil: as in, they have it working. [09:45] micheil: they just need testers before merging [09:45] Tim_Smart: mAritz: Why is there povety in the world? [09:45] pquerna: (time to sleep, panda costume = great success) [09:45] micheil: pquerna: do we have a ssl+upgrade test? [09:45] mAritz: Tim_Smart: yeeey, a good answer! :D [09:48] Tim_Smart has joined the channel [09:50] mikew3c has joined the channel [09:50] Evet: Tim_Smart: is haproxy really better than nginx? [09:51] jigz has joined the channel [09:51] micheil: Evet: different, not better [09:51] Tim_Smart: Evet: At load balancing / proxying yeah. [09:51] micheil: haproxy is for load balancing / proxying, not for serving sites like nginx [09:51] Evet: i know, micheil [09:52] micheil: Tim_Smart: would it make sense to have an fs.copy(fd, fd) [09:52] micheil: like, copy file from fd1 to fd2 [09:52] micheil: (with callbacks and stuff) [09:52] stephank has joined the channel [09:53] Tim_Smart: Probably more sensible to have (path, path) [09:53] micheil: hey, Tim_Smart, in src/node.cc, on line 1880, can you change eio_set_max_poll_reqs to 100 (it is currently 10) [09:54] micheil: and then make test? [09:54] micheil: Tim_Smart: uh, yeah, that's what I meant, my bad [09:54] mikew3c has joined the channel [09:54] micheil: fs.copy("somefile", "anotherfile", callback) [09:54] Tim_Smart: But yeah, not sure if copy() is a core thing. [09:54] micheil: copy isn't in libeio [09:55] micheil: but it is in IO::AIO, which is the reference implementation, I'm told [09:57] zentoooo has joined the channel [10:00] femtooo has joined the channel [10:02] mikew3c has joined the channel [10:03] micheil: my god is perl code crazy [10:04] micheil: you have like have of it in .xe files [10:04] Max-Might has joined the channel [10:04] micheil: then you have the other half in a .pm file [10:07] herberty has joined the channel [10:08] chapel: http://highscalability.com/blog/2010/10/28/notes-from-a-nosql-evening-in-palo-alto.html [10:08] chapel: NoSQL took away the relational model and gave nothing back. Using NoSQL for complex data puts way too much pressure on the programmer. [10:09] frodenius: depends [10:09] guybrush: why should it give anything back? it's not like everyone HAS to use nosql [10:10] guybrush: it is just another backend-tool [10:10] ph^ has joined the channel [10:10] frodenius: when you develop for a relational datastore and no experience with it, there is a lot of "pressure" on yout too [10:10] chapel: either way, the programmer has to design things [10:10] guybrush: right and it gives you back nothing :p [10:10] micheil: I'd say more pressure for developing on sql over nosql [10:11] micheil: ACTION learn databases on nosql. [10:11] frodenius: when you're used to design your structures and algorithms for non-relational stores, it will be easy [10:11] micheil: pretty much. [10:11] chapel: personally I like how mapreduce works [10:11] micheil: I've never really used mysql or sqlite (or any of the other sql variants) [10:12] guybrush: I used mysql pretty much, it is not bad at all for me [10:12] frodenius: fun thing is, you can use mysql for nosql design patterns too, aka as a key-value store and it performs ok [10:13] guybrush: true [10:13] dahankzter has joined the channel [10:13] chapel: the big issue with sql is scalability [10:13] chapel: when you need to scale, the whole reason behind using sql db's gets lost [10:13] guybrush: my projects are not the big so far [10:13] kixxauth has joined the channel [10:15] Tim_Smart: Hmm I might give awesomewm a shot when I upgrade Ubuntu... [10:17] Superman_ has left the channel [10:17] ako has joined the channel [10:18] micheil: Tim_Smart: could switch to archlinux :P [10:18] Tim_Smart: Naw. [10:20] micheil: haha [10:24] Jonasbn_ has joined the channel [10:24] unomi has joined the channel [10:26] Evet: Tim_Smart: one node.js per cpu behind haproxy, makes sense? [10:27] Evet has joined the channel [10:28] agnat has joined the channel [10:34] olivvv_: can somebody help with cygwin issue ? I'd like to know what means "Using dash or ash as a shell run:" on this page http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [10:35] Max-Might has joined the channel [10:35] mraleph has joined the channel [10:36] kawaz_air has joined the channel [10:36] mbrochh has joined the channel [10:38] mAritz has joined the channel [10:44] rikarends: olivvv: compiling nodejs on windows is really easy [10:44] rikarends: install cygwin with basic build tools and python [10:44] rikarends: ./configure [10:44] rikarends: make [10:44] rikarends: make install [10:44] rikarends: insert git clone http://github.com/ry/node before that or downloading the tarball [10:45] rikarends: cygwin is a fake linux env [10:45] rikarends: btw we have prebuilt node 0.2.4 binaries for windows here github.com/ajaxorg/node-builds [10:45] micheil: morning rikarends [10:45] rikarends: 'afternoon [10:45] rikarends: almost [10:45] micheil: welll.. [10:46] javruben: officially still morning ;) [10:46] micheil: (it's actually almost 10pm here) [10:46] olivvv_: rikarends:but I have an issue installing cygwin itself, and I do not understand the solution provided [10:46] rikarends: what issue installing cygwin [10:46] olivvv_: what means "Using dash or ash as a shell run:" [10:47] rikarends: it means please use a unix-like shell to run it [10:47] olivvv_: on this page : http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows) [10:47] rikarends: ie whatever the icon is that cygwin puts on your desktop [10:47] rikarends: is probably right [10:47] rikarends: cygwin shell = bash i think [10:48] olivvv_: ok, I ll try, I was confused by : dash or ash [10:48] rikarends: oh right [10:48] rikarends: that part. yeah cygwin often doesnt install right [10:49] rikarends: ok so here is what you do. start a cmd prompt and type cd cygwin\bin [10:49] rikarends: ash [10:49] rikarends: rebaseall [10:49] rikarends: so yeah you do have to manually start ash or dash [10:49] rikarends: to run that command [10:50] rikarends: so what is says there in the doc is correct [10:50] markwubben has joined the channel [10:51] olivvv_: rikarends: http://gyazo.com/4614225d192ba43f30d6f24eda71eb29.png [10:52] rikarends: yeah you probably dont have rebaseall installed [10:52] rikarends: see if you can install it in cygwin installer [10:52] rikarends: just run it [10:52] rikarends: i wonder how many times i would have had to explain this if we wouldnt put windows node binaries in cloud9 :) [10:54] xla has joined the channel [10:54] olivvv_: well I still dont get it : http://gyazo.com/ada68787318507b5a20a64cf6e575fc3.png [10:54] rikarends: yes well you are halfway now [10:54] rikarends: close that window [10:54] rikarends: run cmd again [10:55] unomi has joined the channel [10:55] rikarends: cd cygwin\bin [10:55] rikarends: ash [10:55] rikarends: run /bin/rebaseall -v [10:55] rikarends: actually if you just follow what they say on your screen [10:56] rikarends: that is usually a good starting point :) [10:56] oal has joined the channel [10:57] disq has joined the channel [10:58] rikarends: imho they should run rebaseall from the cygwin installer [10:58] rikarends: this is a bit tedious [11:02] olivvv_: rikarends: http://gyazo.com/35069ec143f6bf618e4f4d006c87d41f.png do I have to reinstall something from setup.exe ? [11:02] rikarends: no [11:02] rikarends: type ls [11:02] rikarends: whats it say [11:02] olivvv_: ls : not found [11:03] rikarends: joy [11:03] rikarends: ./rebaseall -v [11:03] olivvv_: yeah [11:03] rikarends: type /cygdrive/c/cygwin/bin/rebaseall [11:03] olivvv_: seems to work [11:03] rikarends: k [11:04] olivvv_: thanks ! [11:04] rikarends: please edit the docs [11:04] rikarends: so you would be able to follow it [11:04] rikarends: for the next guy :) [11:05] adam__ has joined the channel [11:06] unomi has joined the channel [11:11] disq has joined the channel [11:12] Max-Might has joined the channel [11:13] olivvv_: done [11:13] olivvv_: failed [11:14] zorzar has joined the channel [11:14] Jonasbn_ has joined the channel [11:14] rikarends: what failed now [11:14] rikarends: install missing deps if you need [11:14] rikarends: also if you just wanna run nodejs you can also just grab our binary builds [11:16] olivvv_: ok, I failed at editting it right but its fixed now [11:16] olivvv_: ok, i need to restart now [11:22] Max-Might has joined the channel [11:27] Raevel has joined the channel [11:31] draco2003 has joined the channel [11:31] mr_daniel has joined the channel [11:32] franck34: silly question [11:32] Max-Might has joined the channel [11:32] jfd1 has joined the channel [11:32] franck34: how do i code something like if (!typeOf(foo)!='Object')) using node.js ? [11:33] franck34: typeof oups [11:34] Tim_Smart: v8: typeof typeof [11:34] v8bot: Tim_Smart: SyntaxError: Unexpected end of input [11:34] stride: franck34: (typeof foo === 'object') [11:41] Utkarsh has joined the channel [11:42] okuryu has joined the channel [11:43] Max-Might has joined the channel [11:44] svnlto has joined the channel [11:45] jacobolus has joined the channel [11:45] femtoo has joined the channel [11:47] aliem has joined the channel [11:50] Moominpapa: Just thought I'd let people know: That segfault compiling npm yesterday... only applies to trunk. Doesn't segfault when you compile v0.3.0. [11:55] cognominal has joined the channel [11:57] SamNZ has joined the channel [11:59] disq has joined the channel [11:59] disq has joined the channel [12:08] franck34: stride: thx [12:15] muhqu has joined the channel [12:17] StanAngeloff has joined the channel [12:19] faust45 has joined the channel [12:25] unomi has joined the channel [12:30] pufuwozu has joined the channel [12:30] Anti-X has joined the channel [12:37] jfd1 has joined the channel [12:46] disq has joined the channel [12:46] disq has joined the channel [12:46] janm has joined the channel [12:47] pufuwozu has joined the channel [12:50] marek1 has joined the channel [12:51] dannycoates has joined the channel [12:56] saschagehlich_: is there a way to find out whether a file has been required by another file or whether it's called directly with node? [12:58] micheil: saschagehlich_: what do you mean? [12:59] micheil: node keeps no exact list of what's loaded [12:59] saschagehlich_: okay, that's what I wanted to know [12:59] Tim_Smart: require.cache? [13:00] Tim_Smart: saschagehlich_: All code is a 'module' in node, you just need to check if it is the main one. [13:00] saschagehlich_: Tim_Smart: ah okay, cool [13:00] saschagehlich_: what do you use for testing? at the moment I'm writing my own stuff with asserts and try..catch [13:01] micheil: saschagehlich_: I use this: http://gist.github.com/653692 [13:01] Anti-X: why do you wanna care if a module has been loaded or not? [13:02] saschagehlich_: micheil: and what does a test file look like? [13:02] micheil: just like the node.js tests [13:02] saschagehlich_: never done testing yet btw [13:02] micheil: neither. [13:02] micheil: it's pretty much just assert() [13:02] saschagehlich_: okay [13:02] micheil: so, if something fails, then that test dies, and reports the error. [13:03] saschagehlich_: yea that's what I'm doing atm [13:03] micheil: which is fine. [13:04] micheil: you could also try using test.py [13:05] micheil: but it doesn't really give you much [13:05] micheil: just timeouts on tests and stuff [13:05] saschagehlich_: okay, one more thing: https://gist.github.com/19f08648c546e61ae1dd [13:05] saschagehlich_: this will not catch the error since the assert failure is in a callback... how would you handle that? [13:06] micheil: you store states [13:07] micheil: also, you don't need the try/catch [13:07] micheil: node will just crash and give you the error any way [13:07] micheil: (try it.) [13:07] saschagehlich_: well yes I know but what I want to do is to catch whether a test was successful or not and store it in redis or sth like that [13:07] saschagehlich_: so for that I have to try catch, right? [13:08] marek1: hi, does anyone know where the http.ServerResponse.ok function is defined ? [13:08] micheil: uhh.. [13:08] micheil: marek1: one moment, which node version? [13:08] marek1: 0.2.4 [13:08] micheil: saschagehlich_: nup [13:09] micheil: saschagehlich_: process.on("uncaughtException") [13:09] cnu has joined the channel [13:09] marek1: I see it in a 'ni' example, they do res.ok instead of res.writeHead [13:09] micheil: marek1: okay, I'll be with you in a moment. [13:09] micheil: saschagehlich_: http://nodejs.org/api.html#event-uncaughtexception-56 [13:09] stride: what's 'ni'? [13:10] marek1: stride: http://github.com/chetan51/ni [13:10] saschagehlich_: micheil: ah great, didn't know about that event. thanks :) [13:10] micheil: saschagehlich_: it's all documented. [13:11] stride: marek1: that's something defined by their library I believe [13:12] micheil: stride: yeah [13:13] stride: although I don't see anything on it in Ni.js [13:13] marek1: stride, micheil: i grepped for it but did not find it [13:13] micheil: yeah [13:13] micheil: I think it's in Quip or Connect [13:14] stride: ah, or Step [13:14] stride: Quip or Connect? where are you seeing those micheil? [13:14] micheil: in the example. [13:14] micheil: http://github.com/caolan/quip [13:15] micheil: right there. [13:15] stride: ah, ok [13:15] marek1: its in quip ! [13:15] marek1: thanks [13:16] mif86 has joined the channel [13:19] ajsie has joined the channel [13:20] shripadk has joined the channel [13:22] shripadk: what is the implication of using setTimeout for something like delayed job in node? Good, bad or ugly? [13:22] micheil: shripadk: well, depends on your application [13:22] micheil: for some applications, it can work fairly well. [13:22] micheil: For others, it can be very bad. [13:23] shripadk: what if the timeouts result in days? [13:23] Evet has left the channel [13:24] shripadk: so i should look for something like redis (persistent) for jobs i guess... [13:25] herbySk has joined the channel [13:25] micheil: shripadk: describe to me your application, then I'd be able to advise. [13:25] stride: setTimeout wont even take such long periods correctly iirc [13:25] dgathright has joined the channel [13:26] shripadk: well... its a realtime tracking app... need to notify users after a period of time using sockets.. thought of using redis... then wondered in the baked-in setTimeout works well! [13:27] micheil: shripadk: in which case, I would say something setup with an hourly look ahead [13:28] micheil: so, your maximum timer will be 60 minutes [13:28] micheil: or, just try write it with nextTicks [13:28] shripadk: the time is chosen by the user... for instance he can chose to notify him after a month... in which case i guess setTimeouts fail... [13:28] omarkj has joined the channel [13:28] shripadk: what about persistence? if my server dies? [13:28] micheil: process.nextTick(function(){ getEventsFor(Date.now()) process... }) [13:28] micheil: but that's a hack [13:29] micheil: shripadk: the thing you'd really want is something like resque [13:29] shripadk: is there a resque implementation in [13:29] Tim_Smart: nextTicks for timers? Ew. [13:29] shripadk: node??? [13:29] micheil: no [13:29] micheil: but it's open source. [13:29] micheil: read the ruby code. port it. [13:29] shripadk: k :) [13:30] Tim_Smart: coffee-resque [13:30] shripadk: oh! i found one... by technoweenie [13:30] shripadk: yeah [13:30] shripadk: nice [13:30] micheil: Tim_Smart: I was thinking next ticks via libev [13:30] Tim_Smart: setTimeouts already use libev [13:31] micheil: yeah [13:31] micheil: I was more thinking something else in libev I've read about [13:31] herbySk: What's the problem here? I see it as a typical use for simulation calendar - persist it in something trivial like nStore, set timeout to the first event in calendar and that's it... or it isn't? [13:31] herbySk: shripadk: ^^^ [13:32] micheil: Tim_Smart: for ex. http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#code_ev_periodic_code_to_cron_or_not [13:33] shripadk: herbySk: in-process? [13:33] shripadk: what if my server dies? [13:33] micheil: what if redis dies? [13:33] herbySk: sjripadk: then you restart it and use the stored data [13:33] micheil: bbiam. [13:33] shripadk: herbySk: oh it persists to disk! [13:34] shripadk: kk [13:34] shripadk: cool... checking out nStore [13:36] herbySk: which raises the question: is there some well-known daemon that watches for processes that _should_ run and restarts them if they die? in unix environment? [13:41] frodenius: herbySk: monit [13:41] leeeb has joined the channel [13:42] herbySk: frodenius: thanx [13:45] micheil has joined the channel [14:01] unomi has joined the channel [14:14] jacobolus has joined the channel [14:16] javruben has joined the channel [14:16] TomsB has joined the channel [14:17] bentruyman has joined the channel [14:17] micheil: anyone know how you'd access an Objective-C api from within C? [14:18] mbrochh has joined the channel [14:21] ajsie: anyone that has used modules in package.json ? [14:24] ajsie: oh now it worked .. i have to run "npm link" again [14:25] bradleymeck has joined the channel [14:26] jacobolus has joined the channel [14:30] jfd1 has joined the channel [14:32] janm has joined the channel [14:32] chapel: how would I open and read a file, parsing each line into an array, and check something, if my check goes through write a new line to the file? [14:33] tlrobinson_ has joined the channel [14:35] bradleymeck: does it write lines to the end? [14:36] chapel: well I guess I could just make it csv [14:36] chapel: might be easier [14:37] mbrochh has joined the channel [14:37] chapel: what about writing to the end? [14:38] chapel: should I just open the file, take the contents into memory, add to the end of the contents in memory and rewrite it to file? [14:38] bradleymeck: generally just stream the file with appends on the end [14:39] chapel: I haven't done much with node for writing files, and tbh any low level file writing in any language for some time [14:39] dnolen has joined the channel [14:40] bradleymeck: reading whole thing into memory at once / writing whole thing at once is going to be a bit wasteful compared to chunks if it is anything but tiny [14:41] chapel: well, its a small file, and is short term, at least for now [14:41] chapel: though I would like to know how to do it right [14:41] chapel: any modules/libraries that do it that I can grok? [14:42] bradleymeck: idk of any that would do that specifically for you, the fs stuff works pretty easy, an i have a csv reader lying about somewhere [14:42] bradleymeck: ACTION digs [14:43] chapel: not looking for one to do it for me, but just something that uses fs in a similar manner to what I want, so I can look at as an example [14:44] bradleymeck: oh, nope not off top of my head, might want to look at some logger modules though [14:44] hoodoos: hey there, anyone here uses riakjs? [14:45] saschagehlich has joined the channel [14:47] saschagehlich has joined the channel [14:48] adambeynon has joined the channel [14:49] rpflo has joined the channel [14:53] saschagehlich has joined the channel [14:54] boaz has joined the channel [15:00] drudge_ has joined the channel [15:02] janm has joined the channel [15:02] rpflo has joined the channel [15:03] saschagehlich has joined the channel [15:06] ctp has joined the channel [15:20] rpflo has joined the channel [15:20] mikew3c has joined the channel [15:21] mattcodes has joined the channel [15:21] softdrink has joined the channel [15:25] Druid_: http://www.youtube.com/watch?v=rr06IyWMf4Y&feature=player_embedded [15:29] janm has joined the channel [15:30] micheil: anyone know about node C extensions post the configure rewrite? [15:33] mattcodes has joined the channel [15:34] jchris has joined the channel [15:36] softdrink has joined the channel [15:37] programble has joined the channel [15:37] programble has joined the channel [15:37] shripadk: well... i just added basic delayed_job functionality to technoweenie's coffee-resque... pls fork n contrib: http://github.com/shripadk/coffee-resque [15:37] ooooPsss has joined the channel [15:39] sivy has joined the channel [15:39] shaver: hmmm [15:40] shaver: it looks like a stream is getting an ETIMEDOUT [15:40] shaver: and reporting the error to its server [15:40] shaver: but then throwing anyway, and killing my node :-( [15:43] ysynopsis has joined the channel [15:45] ysynopsis has joined the channel [15:45] StanAngeloff has joined the channel [15:47] micheil: ryah_: did this commit actually happen? http://github.com/ry/node/commit/e4bf9bcab0ddf422ca86c96a673cc358071586d2 [15:49] micheil: shaver: you'd need to catch the error [15:50] micheil: shaver: also, fixed node-websocket-server [15:50] mattcodes has joined the channel [15:51] mikew3c has joined the channel [15:53] rnewson has joined the channel [15:55] shaver: micheil: but none of my code is on the stack -- not sure where to catch it [15:55] micheil: shaver: could you show me your code? [15:55] shaver: yep, gisting [15:56] shaver: http://hg.mozilla.org/users/shaver_mozilla.com/bzsearch/file/tip/server/websocket.js#l127 is where I register the error reporter [15:56] shaver: http://gist.github.com/656754 is the stack trace for the ETIMEDOUT [15:57] bradleymeck: micheil its still using node-waf I think [15:58] micheil: shaver: how long is that timeout? [15:58] micheil: like, if you do a log of the time the client joins and the time the error happens [15:59] shaver: I don't know what triggered it [15:59] janm has joined the channel [15:59] shaver: probably a client connecting and not sending anything [15:59] micheil: hmm, does it reoccur? [15:59] shaver: just restarted the server, it was down overnight [16:00] shaver: so we'll see! [16:00] micheil: make sure you log when the client joins [16:01] micheil: shaver: and is this the latest nws? [16:01] micheil: 1.3.53 [16:01] shaver: in the more general case, how do I catch exceptions from the event loop, so that I can reset myself appropriately (or, in the case of that error, just log and ignore) [16:01] micheil: process.on("uncaughtException" [16:01] shaver: 1.3.53 [16:01] shaver: er, 52 [16:01] shaver: I can upgrade [16:01] micheil: http://nodejs.org/api.html#event-uncaughtexception-56 [16:01] micheil: upgade. [16:01] micheil: I did add in better error handling (just) [16:01] shaver: done [16:02] micheil: I bet I know where the error happens. [16:02] micheil: I emit two error events. [16:02] micheil: manage:error and connection:error [16:02] mattcodes has joined the channel [16:02] micheil: there is no server:error [16:03] shaver: something emitted it [16:03] shaver: because I logged it! [16:03] micheil: actually. yes there is. [16:03] micheil: my bad. [16:03] micheil: server:error proxies manager:error [16:03] micheil: hmm.. [16:03] micheil: I wonder if I can make the manager listen / proxy the connections? [16:04] micheil: so, the bubbling would be: [16:04] micheil: connection:error -> manager:error -> server:error [16:05] micheil: hmm, in order to do that, I'd need to implement a EventEmitter.prototype.hasListener("error") [16:05] shaver: though, again, server:error is firing, but the exception is still propagating [16:05] micheil: yeah [16:05] micheil: because connection:error isn't listened [16:05] shaver: oh! [16:05] shaver: OK [16:06] micheil: currently it's two events [16:06] shaver: that makes sense [16:06] micheil: I just realised that. [16:06] shaver: I should listen to conn:error [16:06] shaver: and just drop the connection [16:06] micheil: listen to both. [16:06] micheil: I'm going to fix it now. [16:06] shaver: server errors should cause me to restart the http server, I think [16:06] micheil: because that's just borked. [16:06] micheil: currently it's doing: [16:06] micheil: connection:error & manager:error -> server:error [16:07] micheil: -> indicating the default listener [16:07] micheil: I'm thinking it'd be better to do: [16:07] micheil: connection:error -> manager:error -> server:error [16:07] overra has joined the channel [16:08] micheil: that'd decouple the server / manager / connection further. [16:09] aconbere has joined the channel [16:09] micheil: good damn is rebasing this stuff going to be a pain in the ass. [16:09] micheil: (I've got a devel branch that's well disconnected from HEAD [16:12] micheil: oh. shit. [16:13] micheil: just realised I forgot to merge development and master before doing the 1.3.53 release. [16:15] micheil: shaver: I should have v1.4.00 out soon. [16:15] shaver: ugh [16:15] shaver: 1.3.53 is broken [16:15] micheil: how? [16:15] shaver: node.js:265 [16:15] shaver: throw new Error("Cannot find module '" + request + "'"); [16:15] shaver: Error: Cannot find module './mem-store' [16:15] micheil: uhh, one sec. [16:16] micheil: do you need the connect datastore? [16:16] micheil: I think I've removed this in devel. [16:16] shaver: no, I don't [16:16] shaver: I bet others do [16:16] micheil: okay. [16:16] micheil: well, it's being deprecated. [16:17] shaver: deprecated, or removed? [16:17] micheil: removed. [16:17] micheil: it should never have been in core. [16:17] micheil: it'll now be at github.com/miksago/nws-memstore [16:18] micheil: I need to create that repo. [16:18] dtrasbo has joined the channel [16:20] micheil: if people need it, it's here. http://github.com/miksago/nws-memstore [16:21] micheil: shaver: okay, this is going to take a few hours to get working. [16:21] shaver: that's fine, I've rolled back [16:21] micheil: shaver: the next version's actually going to have tests. [16:21] yviktorov has joined the channel [16:22] micheil: just listen for both connection and server error events [16:22] ooooPsss: hey. what's the test framework for node? soma? sona? [16:23] micheil: shaver: basically my devel branch splits the server and connection parts off relying on each other [16:23] micheil: ooooPsss: there's no test framework [16:23] micheil: ooooPsss: the project uses test.py to run tests (tools/test.py) [16:27] dtrasbo: amazing - there's *always* a conversation going in here [16:27] janm has joined the channel [16:27] sudoer has joined the channel [16:30] ooooPsss: ok thnx micheil [16:31] micheil: ooooPsss: I do have a gist that shows a simple way to do testing. [16:31] micheil: http://gist.github.com/653692 [16:32] micheil: (that's the new makefile I'll be using for node-websocket-server) [16:32] isaacs has joined the channel [16:33] bgriffith has joined the channel [16:34] jfd1 has joined the channel [16:34] faust45 has joined the channel [16:35] softdrink has joined the channel [16:38] path[l] has joined the channel [16:38] micheil: also, v1.4.00 of node-websocket-server will support both node 0.2.4 and 0.3.X [16:38] micheil: (sans SSL support in 0.2.4) [16:49] mjr_ has joined the channel [16:55] saschagehlich has joined the channel [17:05] aurynn has joined the channel [17:05] Moominpapa has joined the channel [17:10] jacobolus has joined the channel [17:11] rnewson has joined the channel [17:11] rnewson has joined the channel [17:20] evanmeagher has joined the channel [17:24] Yuffster has joined the channel [17:26] ryah_: micheil: no it didnt [17:26] micheil: okay [17:27] micheil: prior to finding a major issue in node-websocket-server, I was trying to go through the pull queue to see what had and hadn't been merged [17:31] arlolra has joined the channel [17:36] cognominal has joined the channel [17:37] murphy has joined the channel [17:40] murphy has joined the channel [17:44] sugardave has joined the channel [17:45] JohnDav: has anyone found the reason for process assertions with socketio :/ ? [17:46] micheil: JohnDav: what do you mean? [17:47] JohnDav: http://gist.github.com/642990 [17:47] JohnDav: micheil: [17:47] micheil: that is really a bastard of a thing. [17:47] micheil: (process.assert()) [17:47] micheil: kills the stack badly. [17:48] JohnDav: i know.. it's the only thing left in making the server stable [17:48] JohnDav: uncaughtException catches it... but for some reason, the server doesnt stay stable for long after that [17:48] micheil: yeah [17:48] micheil: just looking into it, I'll be a few minutes. [17:48] JohnDav: k [17:51] micheil: ryah_: could you take a look at this? [17:51] micheil: I think we've seen and fixed this on ry:master [17:51] micheil: ryah_: http://gist.github.com/642990 [17:51] JohnDav: really? [17:52] micheil: JohnDav: yeah. I think so. [17:52] JohnDav: I'm on 0.3.0 [17:52] micheil: :/ [17:52] JohnDav: I was told those changes wouldnt affect this error by ryah_ [17:53] micheil: hmm, [17:53] drudge_ has joined the channel [17:54] nico-_ has joined the channel [17:55] micheil: I think it may be something weird with socket.io [17:55] micheil: http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/transports/websocket.js#L28 [17:55] JohnDav: this was 0 earlier [17:55] micheil: JohnDav: anyway, hopefully post node-websocket-server 1.4.00 (releasing later today) [17:56] micheil: hopefully socket.io will use nws [17:56] micheil: try changing it back to 0 [17:56] micheil: see if that fixes it. [17:56] JohnDav: oh ok thats cool [17:56] shaver: micheil: so how does one run the test suite for nws? [17:56] JohnDav: k [17:56] micheil: shaver: test suite? [17:56] shaver: yikes [17:56] micheil: shaver: there isn't one at the moment. [17:57] micheil: yes, I know. big issue. [17:57] shaver: that explains how 1.3.53 didn't start up :-) [17:57] micheil: when I originally went to write the tests, all the test frameworks failed [17:57] JohnDav: micheil: is it the same nws by isaacs? [17:57] micheil: so, I couldn't test. [17:57] micheil: JohnDav: I'm the node-websocket-server / nws author. [17:57] shaver: believe it or not, people wrote tests before there were handy test frameworks [17:58] JohnDav: oh! cool [17:58] JohnDav: :) [17:58] JohnDav: can't wait! [17:58] micheil: shaver: yeah, I know. And I'm feeling it now that I didn't write tests. [17:58] micheil: shaver: I do have a strategy in place now to write the tests for node-websocket-server [17:58] matjas has joined the channel [17:59] rauchg_ has joined the channel [17:59] micheil: shaver: I *think* I've rebased the master to my devel. [17:59] micheil: so, I should be able to progress with that bubbling stuff I was talking about. [18:00] aubergine has joined the channel [18:03] nrstott has joined the channel [18:05] rauchg_: JohnDav: [18:05] rauchg_: im ready to release [18:05] rauchg_: but i want to address the timer.callback thing [18:05] Max-Might has joined the channel [18:05] rauchg_: did you log anything else beyond exceptions ? [18:08] JohnDav: rauchg_: [18:08] JohnDav: yes [18:09] jakehow has joined the channel [18:10] micheil: rauchg_: release what? [18:10] rauchg_: socke.tio 0.6 [18:10] micheil: ah [18:11] Anti-X: 6y [18:11] micheil: ryah_: is there any reason why we really need to do the array changing thing? [18:11] rauchg_: but i'm sometimes getting a weird assertion [18:11] rauchg_: with Timer.callback [18:11] rauchg_: :/ [18:11] micheil: uh, the array changing thing in events [18:11] micheil: rauchg_: I think it's because of your insanely high setTimeout() on the socket. [18:12] Anti-X: rauchg_, it's an error in lib/net, i don't think it's socket.io-specific [18:12] rauchg_: micheil: nop [18:12] micheil: setTimeout(0) does work [18:12] ryah_: micheil: ? [18:12] rauchg_: that was something i thought could avert it [18:12] micheil: but only call it after ws accepts it [18:12] micheil: ryah_: currently if there is one event listener, when you add, we convert it to an array [18:12] micheil: etc. [18:12] ryah_: micheil: hmm? [18:13] ryah_: where? [18:13] micheil: ryah_: is there any really big detriment to just always having it as an array [18:13] micheil: lib/events.js [18:13] micheil: 63-72 [18:13] Anti-X: actually it would save a check on emit [18:13] Anti-X: since you don't have to check whether it's a function or array [18:13] micheil: for the fast case, just do: [18:13] micheil: this._events.type.length == 1 [18:14] ryah_: micheil: yes, it's a big win [18:14] micheil: else { for(events) [18:14] shaver: micheil: what's the state of the art in compressing websocket messages? [18:14] micheil: ryah_: I'm just implementing some bubbling for events, and it's kinda annoying [18:14] ryah_: single event emitters are basically as fast as x.on_event [18:14] micheil: shaver: I don't know to be honest [18:15] micheil: okay. [18:15] kayue has joined the channel [18:15] micheil: ryah_: so, accessing Array.length is slow? [18:15] ryah_: this is a blazing hot path [18:16] ryah_: this code is being run very very often [18:16] micheil: yeah, I'm just curious. [18:16] ryah_: the unnecessary array is too much [18:16] micheil: okay [18:16] micheil: that's fine then. [18:16] ryah_: i want to take out that newListener [18:16] ryah_: is anyone using it?: [18:17] meandi has joined the channel [18:18] aurynn: newListener globally? [18:19] micheil: ryah_: not I. [18:19] micheil: and I haven't seen code use it for ages. [18:19] micheil: ryah_: also, if you want to have newListener, just monkey patch it. [18:20] micheil: (it ends up far faster, oddly) [18:20] kayue has left the channel [18:20] ryah_: nod [18:21] micheil: ryah_: I'm trying to implement a thing where I can bubble events from one event emitter to another [18:21] aurynn: I use newListener, but it's for a cheap hack, in one place. I've an idea to use it to do terrible things. [18:22] stride: micheil: bubble? [18:22] micheil: so, if there's no listeners on the first emitter for the event, then emit the event on the second emitter [18:22] micheil: so, I can do things like: connection:error -> manager:error -> server:error [18:22] micheil: : notation an event [18:22] micheil: and -> notation where the event may bubble to. [18:23] stride: hm, I think I still have some hacky monkeypatch stuff for that on gist somewhere [18:24] stride: micheil: http://gist.github.com/503897 [18:25] micheil: no [18:25] stride: it basically introduces a new handler at the source of the event and calls it on another one [18:25] micheil: this is transparent [18:26] micheil: ryah_: when is there never going to be _events on an EventEmitter? [18:26] stride: what's your approach? [18:27] micheil: oh, wait. I see. [18:27] stride: overwriting emit()? [18:27] micheil: stride: yeah. [18:27] micheil: stride: similar to node-eventstream [18:28] stride: ah, so on emitter level instead of event level? sounds nice, too [18:31] micheil: non-tested: http://gist.github.com/656954 [18:31] micheil: essentially like DOM Event's bubbling [18:32] micheil: and I explicitly only want it to bubble if the current emitter can't handle it. [18:32] micheil: as otherwise I can crash the node instance. [18:32] stride: looks good :) [18:33] jimt_ has joined the channel [18:33] SubStack: hmmm all my _events hacks will break [18:33] stride: I'd suggest calling it setBubble instead of addBubble if it only supports one target [18:34] stride: SubStack: for dnode? [18:34] SubStack: a few in there [18:35] stride: micheil: is _events[type] removed when the last handler for type is removed? or is it just an empty array in that case? [18:35] micheil: yeah [18:35] micheil: stride: eventEmitter is incredibly efficient on memory [18:36] micheil: stride: well, I'm not writing this bubbling for everyone, I have a specific use case. [18:36] hoodoos: v8: parseInt(08) [18:36] v8bot: hoodoos: 8 [18:36] hoodoos: v8: parseInt('08') [18:36] stride: hmkay :) [18:36] v8bot: hoodoos: 0 [18:36] hoodoos: why's so? [18:37] micheil: because [18:37] shaver: in the first case, parseInt sees "8" [18:37] micheil: parseInt('08', 10) [18:37] micheil: v8: parseInt('08', 10) [18:37] v8bot: micheil: 8 [18:37] hoodoos: micheil, you tamed it, thanks :) [18:37] shaver: in the second, it sees "08" which selects octal [18:37] shaver: in which 8 is not a valid digit [18:37] shaver: so it stops parsing [18:37] hoodoos: coward! [18:37] hoodoos: :)) [18:37] hoodoos: well, thanks guys :) [18:38] rcy has joined the channel [18:39] micheil: odd. [18:39] micheil: some how I broke Server.listen../ [18:39] bartt has joined the channel [18:40] noahcampbell has joined the channel [18:41] micheil: is EventEmitter.on in 0.2.3? [18:42] stride: [root@speicher ~]# grep "EventEmitter.prototype.on" node-v0.2.3/lib/events.js [18:42] stride: EventEmitter.prototype.on = EventEmitter.prototype.addListener; [18:43] micheil: hm.m. [18:46] micheil: that's kooky. [18:46] micheil: the server listens, but never fires the listening event [18:47] jimt has joined the channel [18:47] micheil: hmm.. [18:48] micheil: that's odd. My monkey patch breaks node. [18:50] rauchg_: micheil: [18:50] rauchg_: it seem setTimeout only works from the 'connection' handler [18:50] rauchg_: seems* [18:50] micheil: something to do with how I was overriding the emit method. [18:50] micheil: hmm.. [18:51] micheil: that's a problem then. [18:52] micheil: ryah_: would you agree? [18:53] micheil: v8: foo = {}; foo.x [18:53] v8bot: micheil: undefined [18:53] micheil: k [18:53] micheil: rauchg_: I think I know why. [18:54] micheil: timeout.unenroll only happens if socket._idleNext is set [18:54] quirkey has joined the channel [18:55] rauchg_: it's a problem because this way im killing the timeout for all connections :P [18:55] micheil: yeah [18:56] micheil: rauchg_: I moved mine to the upgrade & checkedUpdate handler [18:56] JohnDav: lol [18:56] rauchg_: it's too late by then i think [18:56] rauchg_: the process doesn't exit [18:57] JohnDav: rauchg_: could the this.connection is null and this.connection is undefined errors be related to this ? [18:57] rauchg_: can request.connection be undefined ? [18:58] cloudhead has joined the channel [18:59] bnoordhuis has joined the channel [18:59] micheil: rauchg_: well, initially, req.socket._idleTimeout sohuld be undefined [19:00] micheil: (you should probably use req.socket over req.connection) [19:00] rauchg_: why is that [19:00] rauchg_: i thought they were === [19:00] micheil: because there's a note above that line, saying that one should be deprecated [19:01] rauchg_: ohh [19:01] rauchg_: i see [19:01] meandi2 has joined the channel [19:01] micheil: rauchg_: hmm, I think setTimeout(0) should work anywhere. [19:02] zemanel has joined the channel [19:02] tmpvar has joined the channel [19:04] vol0da has joined the channel [19:04] rauchg_: is there a different between the socket [19:04] rauchg_: passed by the `upgrade` event [19:04] rauchg_: and req.socket ? [19:05] micheil: no [19:05] micheil: only one doesn't have the http ondata listeners [19:07] micheil: wow. I just epically failed bad. [19:10] micheil: hmm, for some reason I'm just not getting events any more. [19:12] frode has joined the channel [19:13] inarru has joined the channel [19:14] micheil: rauchg_: okay, I think I've got somewhere on this bubbling. [19:15] rauchg_: i think you were right [19:15] rauchg_: you can call setTimeout from anywhere [19:15] rauchg_: i wasn't destroying a conncetion properly [19:15] rauchg_: which was leaving my tests hanging [19:15] rauchg_: but [19:15] rauchg_: it's strange [19:15] ph^ has joined the channel [19:15] rauchg_: because i dont think setTimeout is behaving properly still [19:16] inarru has joined the channel [19:17] micheil: woah. [19:17] micheil: that is weird. [19:17] micheil: some how I'm globally modifying a loaded module. [19:17] micheil: like, it propagates to node core. [19:17] micheil: that's not meant to happen. [19:18] bentruyman has joined the channel [19:19] kersny has joined the channel [19:20] heavysixer has joined the channel [19:21] gbot2 has joined the channel [19:23] micheil: rauchg_: also, nws fixes that timeout issue. [19:23] micheil: (iirc) [19:23] rauchg_: aren't you disabling it [19:23] rauchg_: for all connections ? [19:23] rauchg_: http://github.com/miksago/node-websocket-server/blob/master/lib/ws.js#L71 [19:24] micheil: old code. [19:24] rauchg_: oh [19:24] micheil: fixed in the new version. [19:24] rauchg_: oh [19:24] rauchg_: `development` [19:24] rauchg_: that's nice [19:24] micheil: see the development [19:24] micheil: yeah [19:24] rauchg_: i'm gonna use that soon too [19:24] micheil: although, I have to delete that branch [19:24] rauchg_: most people don't understand my master is unstable and try to use it regardless :p [19:24] micheil: I've just spent 3 or 4 hours rewriting it all. [19:25] micheil: rauchg_: because after v1.3.50, I broke stuff. [19:25] rauchg_: aren't you supposed to disable keepaliv with setKeepAlive(false) ? [19:25] micheil: and then development diverged from master [19:25] rauchg_: i see [19:25] micheil: we want keep alive. [19:25] micheil: iirc. [19:25] rauchg_: really ? [19:26] micheil: stream.setKeepAlive(enable=false, [initialDelay]) [19:27] micheil: that way node will probe the socket to make sure it stays open [19:27] micheil: ACTION really needs to add anchors to the new docs. [19:27] micheil: see the end of: http://static.brandedcode.com/node-doc/net.html [19:28] evanmeagher: could i get some feedback on this? http://github.com/evnm/node/commit/63d4a809dcb0e834639981f569dbbe623ad1fa9c [19:29] micheil: evanmeagher: umm.. [19:29] micheil: you know I've already done that? [19:29] evanmeagher: i reworked node's command-line argument parsing to use getopt instead of manually traversing argv [19:29] evanmeagher: news to me [19:29] micheil: I already did it. [19:29] evanmeagher: lol [19:29] micheil: you probably broke v8-options [19:29] evanmeagher: v8-options seems to work. it's not ideal in any way, though. [19:30] micheil: I submitted a pull request, but we found that the v8 options broke [19:30] micheil: I'm now trying to find out off mraleph about if we can patch v8 to check for flags [19:30] rauchg_: micheil: Setting 0 for initialDelay will leave the value unchanged from the default (or previous) setting. [19:30] rauchg_: isn't keep alive enabled by default ? [19:30] rauchg_: for http connections [19:30] micheil: rauchg_: I don't think so. [19:31] mraleph: micheil: why don't you want to pass remove_flags == true to existing V8 API? [19:31] micheil: not for any connections, based off a code check [19:31] micheil: mraleph: because then node would respond first to v8 flags [19:31] micheil: like --help [19:31] micheil: and --version [19:32] micheil: I need to handle those from node. [19:32] micheil: evanmeagher: at any rate, I will say this: I think I lost my patch. [19:32] mraleph: micheil: ok. that makes sense. [19:33] evanmeagher: micheil: gotcha. good to know now that it's being handled, lest i put more time into it :P [19:33] micheil: so, at last case, I wanted a v8::IsFlag(char*) [19:34] zomgbie has joined the channel [19:35] mraleph: micheil: well you can submit a patch, most probably it'll be accepted. [19:35] micheil: mraleph: so, then I could exact the flag, and call v8::SetFlag(name, value) [19:35] micheil: or something [19:36] micheil: mraleph: meaning you could also programmatically set flags without even opt parsing [19:37] micheil: mraleph: in deps/v8/src/flag.cc, see the function [19:37] micheil: FindFlag? [19:37] micheil: static Flag* FindFlag(const char* name) { [19:37] micheil: (I see it on line 333) [19:38] micheil: basically IsFlag would be that, public, and it'd return a bool instead [19:39] micheil: evanmeagher: something else that's a factor there is that getopt_long probably isn't windows friendly [19:39] micheil: evanmeagher: I was thinking it might be wise to implement a flag parser for node itself (that uses the v8 flag parser) [19:40] micheil: but I don't know the full details of the flag definition stuff [19:44] micheil: realising how much some of your code sucked isn't fun. [19:48] Me1000 has joined the channel [19:50] zomgbie has joined the channel [19:52] Craig` has joined the channel [19:52] Craig`: Hey guys. [19:53] micheil: rauchg_: check this out.. [19:53] micheil: http://d.pr/uZn1 [19:53] micheil: almost have bubbling working. [19:55] micheil: ryah_: that screenshot also shows the utter carnage that newListener is. [19:57] micheil: also, http://d.pr/ex1J [19:58] tmpvar: woah, what are you doing there micheil? [19:58] micheil: tmpvar: allowing you to bubble events up to other emitters. [19:59] ashb: hmmm any docs on the assert module? [19:59] ashb: oh yes i just missed it [19:59] Craig`: hmm i keep wanting to use javascript instead of other languages for the tasks i do, but some things just aren't going to happen, ie. modding gta vice city means editing the scm files, and that'd involve me having to write a wrapper in javascript. [19:59] tmpvar: micheil, interesting, so the server could catch events from request/response if they allow them to bubble? [19:59] micheil: ashb: http://static.brandedcode.com/node-doc/assert.html [19:59] ashb: micheil: yeah found it, thanks [19:59] micheil: tmpvar: that's the idea [19:59] tmpvar: sounds nifty [20:00] micheil: but it doesn't happen automatically [20:00] micheil: and it doesn't happen for all events [20:00] micheil: emitter.addBubble(evttype, bubbleEmitter) [20:00] ashb: oh hmmm its dying before it gets to that [20:00] tmpvar: hrm, is that to avoid the overhead of bubbling? [20:00] micheil: so, in node-websocket-server, i do: connection.addBubble("error", manager) [20:01] micheil: tmpvar: although, it stops propagation [20:01] micheil: if you do: connection.on("error") [20:01] micheil: it shouldn't bubble. [20:01] micheil: make sense? [20:01] mikeal has joined the channel [20:02] micheil: mikeal: bubbling is awesome. [20:02] tmpvar: micheil, sorta [20:02] mikeal: hrm... [20:02] tmpvar: it seems like if you handle the error in the connection, you could choose whether or not to cancel propagation [20:03] mikeal: we don't want to go down that road [20:03] mikeal: i think we actually have a great proposal [20:03] femtooo has joined the channel [20:03] micheil: like. http://d.pr/iEJk [20:03] mikeal: which is that we pass the error foward through pipe [20:03] mikeal: and we have it throw if the only listeners are listeners from pipe [20:03] micheil: mikeal: different bubbling. [20:03] Gehhilfe has joined the channel [20:04] mikeal: and you can add a listener yourself with a property that makes it look like a pipe listener [20:04] micheil: http://gist.github.com/657063 [20:05] micheil: so, on an eventemitter that inherits with bubbling [20:06] micheil: you can call: emitter.addBubble(type, target) [20:06] micheil: and it'll emit the evt on target instead [20:06] micheil: if the current emitter doesn't have a listener for it. [20:06] tmpvar: right [20:07] micheil: I think that's pretty sweet. [20:08] tlrobinson has joined the channel [20:10] tmpvar: micheil, I'm sure its useful, although my (broken) brain cant think of a use case atm [20:10] stepheneb has joined the channel [20:10] micheil: it is useful [20:10] micheil: I want to be able to bubble events from different segmented systems [20:10] micheil: I have three parts, connection, manager, server [20:10] micheil: the flow should be: [20:11] micheil: connection:error -> manager:error -> server:error [20:11] micheil: so, you can catch the error at any of connection, manager or server [20:12] mikeal: no [20:12] mikeal: this is too complicated [20:12] micheil: wfm. [20:12] mikeal: we went through this whole thing where we tried adding events and methods [20:12] mikeal: and it's just too much [20:12] micheil: not at all. [20:13] mikeal: for one thing [20:13] micheil: this only bubbles if the current emitter has no listeners for the event [20:13] mikeal: i don't think we need this for non-streams [20:13] tmpvar: in either case, this *could* be implemented in userland [20:13] micheil: and the bubble to emitter does [20:13] micheil: mikeal: I'm not proposing this go in core. [20:13] mikeal: oh i see [20:14] ako has joined the channel [20:14] mikeal: yeah, i expected a higher level framework to come up with this at some point [20:16] mikeal: once we figure out streams [20:16] mikeal: i expect some really cool frameworks to pop up [20:18] micheil: mikeal: yeah [20:19] micheil: this bubble thing is cool, but still quite buggy. [20:19] stephank: cce: I decided to cheat, and simply bind libyaml: http://github.com/stephank/yaml.node [20:20] murz has joined the channel [20:20] mikeal: i want a streaming version of jsdom [20:20] murz has joined the channel [20:20] tmpvar: mikeal, me too. not sure how that would work though lol [20:20] mikeal: so, the important part IMHO is in the input [20:21] tmpvar: right, so you use a sax parser [20:21] mikeal: output is actually easy, but probably won't get used that often [20:21] Vladimir1 has joined the channel [20:21] evanmeagher: micheil: not that we want a google dependency, but I've heard good things about http://code.google.com/p/google-gflags/ [20:21] mikeal: because usually you want to create a dom, then do manipulations, then push it out [20:21] micheil: like newListener breaks it badly. [20:21] mikeal: at that point the whole thing is in memory [20:21] tmpvar: right [20:21] murz has joined the channel [20:21] Vladimir1: Hi! any kludge how to implement sticky sessions? [20:22] mikeal: but having to pull the whole base string in to memory, create the dom in one big call, then do stuff, i'd like that to be streamed [20:22] tmpvar: mikeal, that is possible now [20:22] tmpvar: er.. streaming it [20:22] micheil: evanmeagher: good find [20:22] mikeal: i only know of that body call [20:22] mikeal: where you have to pass it the whole thing [20:22] micheil: ryah_: for the optparser, http://code.google.com/p/google-gflags/ [20:23] tmpvar: its not fun, but something like: http://github.com/tmpvar/jsdom/blob/master/example/node-xml/run.js [20:23] tmpvar: so it builds as it streams.. assuming the parser is streaming as well [20:24] ashb: isaacs: `The "author" is one person.' What about when its not? [20:24] isaacs: ashb: then omit the author and provide two contributors [20:24] ashb: k. [20:25] micheil: mikeal / tmpvar: talk to javruben about xml parsing, I think. [20:25] isaacs: ashb: if you feel it should support a list there (since "contributor" basically implies "non-principal", whereas author is the principal owner of the project) then you can post an issue about it [20:25] isaacs: ashb: it wouldn't be a hard thing to change, and i'm not philosophically opposed. [20:25] ayo has joined the channel [20:26] ashb: isaacs: not sure i care. turns out my .json already has no author, 2 contrbs and 2 maintainers [20:26] tmpvar: mikeal, does that make sense? we could definitely build the dom in a streaming fashion.. but it requires a streaming parser :) [20:26] mikeal: we should figure out the calls that jQuery requires in the DOM [20:26] mikeal: and only implement those :) [20:26] mikeal: tmpvar: totally [20:26] isaacs: ashb: yeah, only very small subtleties of difference, really. [20:26] micheil: wooo! I got bubbling working [20:26] mikeal: i'd like a web framework that is mostly streaming and doesn't use a templating library ever [20:27] tmpvar: isaacs, have you ever seen this before? http://gist.github.com/657093 [20:27] isaacs: tmpvar: wowzers. [20:27] isaacs: nope [20:27] tmpvar: mikeal, i have a similar goal :) [20:27] tmpvar: isaacs, damn [20:27] isaacs: using some kind of crazy extensions or something? what's node -v say? [20:28] bradleymeck has joined the channel [20:28] isaacs: tmpvar: npm is 100% js. it should be unpossible to make a segmentation fault. [20:28] tmpvar: v0.3.1-pre [20:28] tmpvar: it blows up on the make uninstall .. which is strange [20:28] isaacs: tmpvar: that's extra strange, yes. [20:28] isaacs: tmpvar: well, either node has a bug, or unix is broken. [20:28] mikeal: seg fault is my favorite error [20:29] mikeal: the computer is just saying "shit is broken dude" [20:29] tmpvar: hah [20:29] isaacs: tmpvar: do this: gdb node, and then "loadargs ./cli.js uninstall", and then "run" [20:30] isaacs: oh, no, it's not at the uninstall, it's at the "cache clean" step [20:30] bnoordhuis: isaacs: shouldn't that be 'set args'? [20:30] ashb: gdb --args node ./cli.js uninstall [20:30] ashb: also works. [20:30] isaacs: oh, maybe [20:30] isaacs: awesome [20:30] isaacs: yeah, what these guys say. i have to do "help" every time i run gdb [20:30] tmpvar: ill give it a go [20:30] ashb: me too. --args is the only thing i consistently remember [20:30] ceej: anyone using mongoose 1.0? [20:30] isaacs: but it's --args node ./cli.js cache clean [20:31] ashb: hmmm i probably need a new name for markdown-js [20:31] ashb: thoughts? [20:32] ashb: (markdown-js being http://github.com/evilstreak/markdown-js/ ) [20:33] isaacs: ashb: for the git repo or the npm package name? [20:33] ashb: npm package name [20:33] ashb: (tho no reason to not rename the repo too) [20:33] isaacs: hey, vim users: when i'm in insert mode, and i press an up arrow key, it puts a A character on the previous line. what did i screw up? [20:34] ashb: over SSH? [20:34] isaacs: ashb: or locally, doesn't matter. [20:34] isaacs: i'm assuming there's some setting that does this, but i don't know what it is. [20:34] isaacs: TERM=xterm-color, using iterm [20:34] ashb: vim guessed your term mode wrong [20:34] dal9k has joined the channel [20:35] ashb: i think [20:35] isaacs: ashb: ok, but when i run "vimtutor" it works, and when i just do "vim filename" it doesn't. [20:35] jacobolus has joined the channel [20:35] isaacs: ashb: so there's some config somewhere doing the wrong thning [20:35] ashb: set compatible? [20:35] ashb: in both of those? [20:35] nico- has joined the channel [20:35] ashb: and alsoe :set term? [20:35] isaacs: ah, that's it [20:35] isaacs: compatible [20:36] isaacs: term=xterm-color [20:36] isaacs: :set compatible does it though. [20:36] ashb: fwiw i've got nocompat here [20:37] ashb: but you know: what ever solution works is best [20:39] tmpvar: isaacs, http://gist.github.com/657112 [20:40] isaacs: ashb: do arrow keys work in insert mode? [20:40] isaacs: ashb: or do they do stupid things? [20:40] ashb: isaacs: for me yes [20:40] isaacs: ok, then setting compatible is just resetting whichever *other* setting is messing that up [20:42] derencius has joined the channel [20:42] isaacs: tmpvar: that is absolutely 100% a nodejs or eio bug [20:42] isaacs: tmpvar: update frmo the latest ry/master, rebuild see if that fixes it. if not, share with ryan. [20:42] tmpvar: k [20:42] gerad has joined the channel [20:42] bpadalin_ has joined the channel [20:43] ceej: man I've tried everything and mongoose 1.0 just does not save data :/ [20:44] ashb: isaacs: try set t+ku= [20:44] isaacs: ashb: what's that do? [20:44] ashb: t_ku [20:44] ashb: sets what the 'up' key is [20:45] jayfresh has joined the channel [20:45] isaacs: t_ku ^[OA [20:47] ashb: set nottybuiltin perhaps [20:47] fangel has joined the channel [20:47] ashb: or try set nocompatible [20:47] ashb: (i'm just guessing now. for me it only happens on one or two servers so i just use hjkl when it does [20:49] nico- has joined the channel [20:52] SubStack has joined the channel [20:52] isaacs: well, i use hjkl when not in insert mode [20:53] isaacs: ashb: but if you're in typing mode, and need to move over one character, then escape is tedious [20:55] ossareh has joined the channel [20:57] tmpvar: isaacs, looks like we had linux 32 bit running on a 64 bit machine heh [20:57] isaacs: yikes! [20:59] Nevtus has joined the channel [20:59] Nevtus has joined the channel [21:00] seen- has joined the channel [21:01] micheil: ashb: make it streaming and contained in one file, and I could think about using it in the doctool. [21:01] micheil: (markdown-js) [21:01] ashb: micheil: it is contained in one file [21:01] micheil: awesome. [21:02] micheil: and you maintain this version? [21:02] ashb: the streaming part is harder is markdown is a bitch of a thing to parse [21:02] ashb: micheil: yeah [21:02] micheil: okay, and does it stream? [21:02] micheil: :D [21:02] ashb: see above :) [21:02] micheil: is that a yes, not yet or no? [21:03] ashb: its a not yet cos I can't think of a nice way of making it produce sensible chunks [21:03] ashb: i guess waiting till you get a blank line and then parsing that might be reliable [21:04] ashb: micheil: how important is streaming? [21:04] femtoo has joined the channel [21:04] micheil: isaacs: I think I've seen that stack trace before with libeio [21:04] micheil: ashb: quite. [21:04] ashb: actually thinking about it. markdown isn't strictly streamable [21:04] micheil: make it a state machine line by line parser [21:04] ashb: link resolving [21:05] ashb: this is a [forward reference] [21:05] ashb: [21:05] micheil: that's what looking at markdown looks like [21:05] isaacs: ashb: yeah, link resolving sucks. [21:05] ashb: [forward reference]: foo [21:05] isaacs: ashb: since the ref might be *anywhere* in the file, most often at the very very end. [21:05] ashb: micheil: not quite http://ashberlin.co.uk/blog/markdown-lists [21:05] micheil: ashb: think like jade.. [21:06] isaacs: i think for a markdown parser, it's perfectly appropriate to either say it just doesn't stream, or that forward references will halt the output until the ref is resolved. [21:06] ashb: hmmm for some reason i think there's a case where you have to 'look forward' before you make a decision [21:06] micheil: ashb: either that, or we implement a markdown that works [21:06] ashb: isaacs: what we actually do with references is store them as... [21:06] adambeynon has joined the channel [21:07] micheil: because, quite frankly, if you are using bad markdown in the documents, I'll feel like shooting you. [21:07] micheil: the docs should be readable in .md [21:07] ashb: ["link_ref", { ref : "foo", original: "[foo]" } ] [21:07] micheil: and those borked list examples are not easily readble. [21:07] ashb: micheil: i know, and i a gree [21:08] ashb: micheil: there's dialect support [21:08] ashb: but we wanted to be gruber fucktard compatible [21:08] dguttman has joined the channel [21:08] isaacs: ashb: for the lists, i think it's 100% appropriate to require a certain amount of reasonableness, and just emit errors if it doesn't obey. [21:08] micheil: also, for doctool, I've got my own linker running :) [21:08] isaacs: ashb: fucktard compatibility is overrated ;) [21:08] ashb: isaacs: sure. but it was the at that point a matter of pride [21:08] micheil: I would rather be less gruber / perl compatible and more node.js compatible [21:09] ashb: marku compatible was our next aim [21:09] ashb: (which emits errors) [21:09] ashb: but well it works so i haven't added any more to it [21:09] micheil: fsReadStream.pipe(markdownStream); markdownStream.pipe(fsWriteStream); [21:09] micheil: that's hot. [21:09] micheil: maruku? [21:10] ashb: a ruby one [21:10] micheil: yeah [21:10] micheil: you said marku [21:10] ashb: oh, typo [21:10] ashb: i make a lot of those :) [21:10] micheil: ashb: just be compatible with the ones that github wiki's use./ [21:10] bradleymeck has joined the channel [21:10] micheil: and I'll <3 you. [21:11] CIA-94: node: 03Ryan Dahl 07dumper * rb5d5568 10/ (3 files in 3 dirs): kinda working, some lame tests - http://bit.ly/ccFHJP [21:11] ashb: micheil: add a dialect for it ;) [21:11] micheil: ? [21:11] ashb: our other aim was to be able to support various dialects without haveing to re-write everything [21:12] micheil: sure thing. [21:12] micheil: but I am looking for a streaming markdown parser. [21:12] ashb: i could probably make it stream paragraph at a time very easily [21:12] ashb: but enotime [21:12] micheil: ashb: see: http://github.com/ry/node/blob/master/tools/doctool/doctool.js [21:13] ashb: cp.exec("mkdir -p "+build_root, function(err, stdout, stderr){ [21:13] ashb: wtf? [21:13] ashb: (sorry - it jumped out at me) [21:13] micheil: yeah. [21:13] micheil: easiest way to create the output directory [21:13] micheil: (it's a hack.) [21:13] ashb: what bit in particualr am i looking at [21:14] micheil: just the whole thing [21:14] micheil: like, currently I need to read it all into memory, which sucks a bit. [21:15] ashb: ah there we go. [21:15] ashb: thats the reason you need to look ahead [21:15] isaacs: ashb: the culprit is autoclose. [21:15] isaacs: (re: vim issues) [21:15] ashb: autoclose? [21:16] ashb: http://pastie.org/1262718 [21:16] ashb: micheil: how do you do that without looking ahead/buffering? [21:16] langworthy has joined the channel [21:16] micheil: uhh.. [21:17] micheil: state machine, but you also implement a peek() [21:17] micheil: function [21:17] micheil: which looks at the next line [21:17] ashb: how can you peek with streaming? [21:17] isaacs: micheil: the problem is, there might be 1000 lines [21:17] isaacs: you need to buffer it [21:17] isaacs: markdown is not a format for encoding streams of data. [21:17] micheil: I'm just saying it'd be awesome. [21:17] isaacs: it's a format for humans to type reasonably-sized html documents. [21:17] ashb: which isn't to say i can't make it stream, it would just have to delay emiting and buffer some of the time [21:18] micheil: ashb: okay, ignore streaming, just make an awesome markdown parser [21:18] ashb: done that already >_> [21:18] isaacs: you *could*, if you were, like, in-freaking-sane, implement something like the html parsing rules, and stream data in updating a DOM structure, and only emit the HTML for a given node once it's closed unambiguously.. [21:18] isaacs: . [21:18] micheil: that has clean code, and allows me to match custom tokens. [21:18] micheil: eg, @include [21:18] ashb: micheil: thats the dialect support stuff. [21:18] isaacs: otherwise i think markdown just has to be done in smaller chunks, and that's fine. [21:19] isaacs: that's why twitter doesn't stream the public tweet stream in markdown [21:19] ashb: isaacs: thats basically what we do, but right now we rely on having everything read ahead inthe list parser func [21:19] micheil: isaacs: yeah, fair fair [21:20] ashb: micheil: http://github.com/evilstreak/markdown-js/blob/master/lib/markdown.js#L1010 [21:20] micheil: ashb: okay [21:21] ashb: oh and also Markdown.buildBlockOrder( dialect.block ); [21:21] micheil: okay [21:21] micheil: ACTION can't really look right now too much [21:21] ashb: basically buildBlockOrder sets the rule precedence [21:22] micheil: isaacs: [21:22] micheil: type: error emitted from: Connection bubbled to: Manager [21:22] micheil: type: error emitted from: Manager bubbled to: Server [21:22] micheil: type: error emitted from: Server [21:22] micheil: that is the def. of awesome for me atm [21:22] ryah_: man, does writev have - like - no limit [21:22] ryah_: hmm [21:23] isaacs: ryah_: limits just restrict awesomeness. [21:23] isaacs: micheil: how do you define a bubbletarget? [21:23] micheil: isaacs: I override EventEmitter sort of [21:23] micheil: emitter.addBubble(type, bubbleTarget) [21:24] micheil: so, connection.addBubble("error", manager) [21:24] micheil: for the first bubble [21:24] isaacs: interesting. [21:24] isaacs: but not for all messages.. [21:24] isaacs: and then how does the listener know the original target? [21:24] micheil: it doesn't. [21:24] isaacs: don't tell me it's thing.on("event", function (e) { e.target })... [21:25] micheil: there's no way to tell the original target. [21:25] isaacs: i mean, we COULD go all kindsa dom on that noise. [21:25] isaacs: but... ew. [21:25] micheil: hmm, true. [21:26] micheil: but, dom events are ew. [21:26] micheil: but bubbling is cool. [21:26] isaacs: how do you prevent something from bubbling? [21:26] isaacs: ("you can't"?) [21:26] micheil: just don't add the bubble for it. [21:26] micheil: or listen for it [21:26] isaacs: i see [21:26] isaacs: it only bubbles if there are no listeners? [21:26] nico- has joined the channel [21:27] micheil: http://gist.github.com/657171 [21:27] micheil: it only bubbles if there are no listeners [21:27] heavysixer has joined the channel [21:27] micheil: the pure best usecase is to bubble errors [21:27] micheil: example: node websocket server [21:27] isaacs: it would be cool to have some kind of "npm install events++" or something, which gave you all the good aspects of dom events. [21:27] micheil: an error may happen on the connection [21:28] isaacs: default behavior, stop propagation, preventdefault, etc. [21:28] micheil: isaacs: I could easily write it, I think. [21:28] tmpvar: right, and do it correctly [21:28] davidwalsh has joined the channel [21:28] nico- has joined the channel [21:28] nico- has joined the channel [21:28] isaacs: the trick would be figuring out how to do it 100% in userspace, but still be useful for stuff like http requests, where you want to bubble connection errors and request errors to the client object. [21:28] isaacs: er, other way round [21:29] isaacs: connection -> client - [21:29] isaacs: . [21:29] isaacs: connection -> client -> request [21:29] nico- has joined the channel [21:29] isaacs: so i can do request.on("error", function (e) { if (e.target == client) was a client error }) [21:29] AAA_awright has joined the channel [21:29] micheil: isaacs: yeah [21:30] isaacs: i guess you could also just keep the "this" pointer on the original target. [21:30] isaacs: no, nvm, that's weird... [21:30] micheil: e.target == initial constructor [21:30] isaacs: yeah [21:30] isaacs: initial emitter, you mean? [21:30] micheil: yeah [21:30] micheil: as usually the initial constructor is the initial emitter [21:30] micheil: events.EventEmitter.call(this) [21:31] Vladimir1 has left the channel [21:32] micheil: but anyway, I'm happy with this for bubbling [21:33] micheil: v8: var a = {"a": 4, "b": 5}; a.length [21:33] v8bot: micheil: undefined [21:33] micheil: hmm [21:34] isaacs: v8> Object.defineProperty(Object.prototype, "length", {get:function () { return Object.keys(this).length }, enumerable:false}) ; ({a:1,b:2}).length [21:34] v8bot: isaacs: 2 [21:34] micheil: well, any way, that fulfills the requirements for node websocket server [21:36] boaz has joined the channel [21:41] admc has joined the channel [21:41] evanmeagher: are there any whitepapers related to libev/libeio? [21:45] hoodoos: i wonder why Mu creator made it static! [21:45] micheil: evanmeagher: umm, not really [21:45] micheil: ask on the libev mailing list [21:45] aurynn: Writing my own web framework seemed like such a great idea. [21:45] micheil: marc lehmann has been researching event loops for like 20 years or something [21:45] jacobolus has joined the channel [21:46] aurynn: Now it's just hurting my head. [21:49] robmason has joined the channel [21:50] bentruyman has joined the channel [21:54] micheil: isaacs: is index.js 100% supported in npm? [21:54] Anti-X: npm supports what node supports [21:54] isaacs: micheil: no,it's 100% supported in node ;) [21:55] micheil: okay [21:55] isaacs: micheil: npm uses it, though [21:55] isaacs: relies on it [21:55] micheil: but it works [21:55] micheil: I'm thinking I should use it for node-websocket-server. [21:58] micheil: isaacs: because I'm needing to export all the stuff in it out for other uses [21:58] micheil: (like, socket.io needs access to manager and connection [21:59] isaacs: micheil: so, if you supply a main module, then npm will link it to websocket-server/index.js, so that that's what you get when you do require("websocket-server") [21:59] micheil: okay [21:59] isaacs: micheil: you can also export other modules in a "modules" hash, or with { "directories" : {"lib" : "./my/modules/here" }} [21:59] micheil: how do I then access those modules? [22:00] micheil: var ws = require("websocket-server") [22:00] micheil: ws.? [22:00] isaacs: micheil: in nws, you always do everything with relative paths, as if youer' running in your dev dir. outside, you'd do wsFoo = require("websocket-server/foo") [22:00] micheil: okay [22:00] isaacs: micheil: it creates a folder of js files [22:00] isaacs: micheil: and subfolders work, too. require("npm/utils/semver") [22:00] micheil: so, I can not need to explicitly export it. [22:01] isaacs: right, just expose it [22:01] micheil: okay [22:01] micheil: and that's with.. [22:01] JimBastard has joined the channel [22:01] JimBastard: mmmm [22:01] micheil: "main": "./lib/ws" [22:02] micheil: "modules": {"directories": {"lib": "./lib/ws/"}} [22:03] micheil: oh, I see. [22:04] _1marc has joined the channel [22:05] femtooo has joined the channel [22:09] noahcampbell has joined the channel [22:09] nsm has joined the channel [22:12] SchizoDuckie has joined the channel [22:12] nico- has joined the channel [22:13] SchizoDuckie: hi all :) [22:13] SchizoDuckie: i got node 0.3 working on cygwin :) [22:14] mikeal has joined the channel [22:14] SchizoDuckie: but i have no clue if what i've done is correct [22:14] SchizoDuckie: anybody here that knows the inner workings? [22:19] aurynn: isaacs, can I use npm to install software locally? [22:20] isaacs: aurynn: yes. [22:20] isaacs: aurynn: npm install -h [22:24] aurynn: isaacs, awesome. I seem to be dumb and can't find the package.json docs, though [22:25] isaacs: aurynn: npm help json [22:29] aurynn: Awesome, thank you [22:32] SchizoDuckie: hi isaacs, aurynn [22:32] aurynn: hi [22:32] isaacs: hi [22:32] isaacs: Wow, the world really doens't approve of light-colored terminals, it would seem [22:32] SchizoDuckie: anyof you have knowledge of the cygwin build process? [22:32] isaacs: homebrew and almost every vim color scheme just assume that they're being displayed on black backgrounds. [22:33] SchizoDuckie: isaacs: praise the lord for alpha blending ;) [22:33] aurynn: I use a black-backed terminal [22:33] aurynn: my co-worker uses white [22:33] SchizoDuckie: i prefer black, but transparent [22:33] isaacs: mine's about #eee [22:33] isaacs: high-contrast makes my eyes twitch [22:34] aurynn: I need high-contrast. :\ [22:34] SchizoDuckie: i hate black on my 17"crt though [22:34] SchizoDuckie: it's so crappy that i can't almost distinguish between green, blue and black :P [22:35] tmpvar: is there a special task that I need to perform to get node to configure against libssl on osx? (0.3.1-pre branch) [22:35] isaacs: tmpvar: autoconf isn't picking it up? [22:35] tmpvar: nope [22:35] isaacs: hmm... [22:35] tmpvar: oh, i have an idea [22:35] _1marc has joined the channel [22:36] maxfell has joined the channel [22:36] Craig` has joined the channel [22:37] Craig`: hey. [22:37] maxfell: Ho [22:37] Craig`: lets [22:37] SchizoDuckie: ohai [22:38] Craig`: hmm, wondering what i should do with node, since i haven't been able to get jsdom/node-xml working my lyricsfly grabber isn't really working atm. [22:38] tmpvar: Craig`, whats up with jsdom/node-xml? [22:38] davidwalsh has joined the channel [22:39] Craig`: they just don't seem to work on my machine, with jsdom i get buffer errors. [22:39] Craig`: and node-xml i can't seem to find with require, (i think someone mentioned that it should have been installed to ~/.node_something but i didn't even ahve that directory [22:40] tmpvar: ~/.node_libraries [22:40] tmpvar: its not on your system by default (btw) [22:40] marshall_law has joined the channel [22:42] Craig`: yeah, i know. someone was saying that all node libaries downloaded should be going there, but i've just been using npm. [22:43] isaacs: Craig`: npm uses /usr/local/lib/node by default [22:43] Craig`: but coming to think about it, i installed jsdom with npm and that's not working, but i used git for node-xml, i'm sure. [22:43] isaacs: Craig`: npm config get root <-- that's where it puts stuff [22:43] Craig`: isaacs, yeah, i've got node-xml and jsdom in /usr/local/lib/node [22:43] SchizoDuckie: is there a web listing for npm packages? [22:43] StanAngeloff has joined the channel [22:44] tmpvar: SchizoDuckie, http://registry.npmjs.org [22:44] SchizoDuckie: yeah i found that, but it's just json [22:44] tmpvar: ah [22:45] SchizoDuckie: do you need to write your own js to read the site? :P [22:45] tmpvar: or [22:46] Craig`: so yeah i'd like to get node-xml working, as the idea of this simple program was to get a taste of node, but i can't even make a simple program yet :D [22:47] SchizoDuckie: Craig`: just try one of the other packages [22:47] Craig`: example. [22:47] SchizoDuckie: there are several parsers listed on the modules page [22:48] SchizoDuckie: http://github.com/ry/node/wiki/modules#parsers-xml pick one :P [22:50] isaacs: SchizoDuckie: there was something at npm.mape.me, and also http://nodul.es [22:50] isaacs: SchizoDuckie: i usually just use npm ls [22:50] Craig`: wanting to install sax-js, it said to install with npm, but `npm install sax-js` complains about 404 [22:50] isaacs: Craig`: npm install sax [22:50] Craig`: oh, thanks. [22:51] blackdog_ has joined the channel [22:52] tmpvar: boo, my Idea didn't work [22:52] SchizoDuckie: yeah i'm still orienting on what the best tools for my game server will be [22:52] tmpvar: no npm link for me [22:52] Craig`: when a library isn't available on npm, what should i do? cd to /usr/local/lib/node and then git it/ [22:53] isaacs: Craig`: that'll work sometimes [22:53] isaacs: Craig`: the motivation behind npm is that there isn't one way to install any random node module. [22:53] SchizoDuckie: i need a static web server, already got faye employed, and i'm looking into some remote debugging stuff and other sweetness that i can get to montior it [22:53] isaacs: Craig`: if it has a package.json file, you can npm install the tarball: npm install http://github.com/user/project/tarball/master [22:53] isaacs: Craig`: oryou can usually read the README file :) [22:54] Craig`: well, actually, what's the best module for what i'm wanting, basically all i want to do is to read the content of a given element. [22:55] SchizoDuckie: just a few more weeks isaacs, and then our multiplayer html5 tetrinet will go online |-) [22:55] Craig`: awesome^. [22:55] Craig`: i'd like to make some decent things with node, but i'm just starting, heh. [22:55] gkatsev: multiplayer html5 tetrinet? sign me up [22:55] SchizoDuckie: we're trying to get it to play on *everything* [22:55] Craig`: I would like to make a simple chat client. [22:56] SchizoDuckie: ipad, iphone, nokias, htc, desktop, there's even a CLI renderer lol [22:56] Craig`: what are you using for the graphics, canvas? [22:56] isaacs: SchizoDuckie: that's rad :) [22:56] SchizoDuckie: renderers are separated from the game engine Craig` [22:57] SchizoDuckie: so there's canvas for devices that support it, divs for internet explorer (...) and the ascii renderer for lynx [22:57] Craig`: I wouldn't know where to start with things like that. [22:57] SchizoDuckie: we started it at the html5gamejam [22:57] gkatsev: SchizoDuckie: why not hascanvas or something for IE? [22:57] gkatsev: or is that what it does? [22:57] SchizoDuckie: refusal to code to inferior tech gkatsev [22:57] Craig`: i'm interested in node and canvas games, but i just don't know where to start. [22:58] SchizoDuckie: well go find a node snake tutorial or so [22:58] Craig`: well, and webgl, but that's later plans. [22:58] gkatsev: Craig`: start at the top and work your way down [22:58] Craig`: at the, top? [22:58] SchizoDuckie: then get faye for node, and hook it up to make it multiplayer [22:58] SchizoDuckie: the pub/sub system is _brilliant_ [22:59] Craig`: the only webgl tutorials i've seen so far are giles' [22:59] SchizoDuckie: i get brililant comet performance even from a shady internet cafe in buenos aires to holland [22:59] Craig`: not complaining however. [22:59] SchizoDuckie: webgl is a whole different ballgame if you don't know how to do canvas at least [22:59] Craig`: yeah.. [22:59] softdrink has joined the channel [23:00] Craig`: I have no experience with 3d. [23:00] gkatsev: my first js experience was writing a small falldown game with js and canvas [23:00] SchizoDuckie: me neither, and i decided that i don't have the math skills for it now :P [23:00] Craig`: well, i guess i could cope with the math. [23:00] SchizoDuckie: me too, if only somebody could explain it to me in terms i can understand with examples i can relate to [23:01] Craig`: I mean, I understand programming fundamentals and wouldn't consider myself a newbie, just I haven't really ever made anything significant, the most complex thing being an irc bot, and we all know they aren't hard. [23:01] SchizoDuckie: that's where it went wrong in school [23:02] SchizoDuckie: anyway any suggestions for a node.js webserver with realtime monitoring? [23:03] evanmeagher has joined the channel [23:03] gerad: SchizoDuckie: whatcha mean? [23:03] gerad: SchizoDuckie: we did http://monitaur.net for rails rumble a couple weekends ago [23:03] SchizoDuckie: i'd like to have a web interface or so to see what's going on in realtime with the httpserver instance [23:03] sarmiena has joined the channel [23:03] gerad: SchizoDuckie: like routes that are being hit ? [23:04] SchizoDuckie: yeah stuff like that, anything like that available? [23:04] gkatsev: just run a VPS? or maybe heroku? [23:04] gerad: SchizoDuckie: http://getclicky.com [23:05] gerad: SchizoDuckie: like that? [23:05] SchizoDuckie: nah that's overkill :P [23:05] SchizoDuckie: i mean, you have a javascript webserver that plugs into your app with http.createserver [23:05] Craig`: also, although i don't have anywhere near the programminge xperience to do such a thing, but would anyone be interested in making an arduino-wrapper in javascript. [23:05] SchizoDuckie: did no one think to make a real-time webinterface with stats? [23:06] SchizoDuckie: in pure node.js i mean, no external monitoring tools [23:06] gerad: SchizoDuckie: so like http://newrelic.com but for node? [23:06] mif86 has joined the channel [23:06] gerad: SchizoDuckie: and not saas? [23:07] micheil: SchizoDuckie: there's not really anything like that [23:07] micheil: SchizoDuckie: most of those tools are built for something higher level then node's lowlevel stuff [23:08] gerad: micheil: with the possible exception of newrelic... though that's not node aware [23:08] micheil: gerad: exactly. [23:08] micheil: there is hoptoad [23:08] micheil: i guess [23:08] micheil: that's workable [23:08] gerad: micheil: true.. that's useful for sure [23:09] SchizoDuckie: nah that's just overkill [23:10] SchizoDuckie: i'd like some nice stats page later on to mointor how many people are online and so [23:10] SchizoDuckie: but i'll just build it myself then :P [23:10] gerad: SchizoDuckie: keep me posted about it :-) [23:11] mtodd has joined the channel [23:11] gerad: SchizoDuckie: could definitely use it... kinda like http://httpd.apache.org/docs/2.0/mod/mod_status.html [23:12] SchizoDuckie: gerad what do you mean? newrelic? [23:12] gerad: SchizoDuckie: mod_status is an apache plugin that gives you stats on you apache instance [23:12] gerad: SchizoDuckie: like requests per second [23:12] gerad: SchizoDuckie: through a web interface [23:12] gerad: SchizoDuckie: it's useful [23:12] SchizoDuckie: gerad: i use node.js as the webserver [23:12] gerad: SchizoDuckie: and the similar would be useful for node [23:13] SchizoDuckie: ah, that way [23:13] SchizoDuckie: yes, i'm aware of mod_status [23:13] SchizoDuckie: and i figured that somebody must have already creates domething clicker for node [23:13] SchizoDuckie: clicker == slicker [23:17] micheil: what was that lsof command to get open ports for a node process? [23:20] skampler has joined the channel [23:23] freeformz has joined the channel [23:23] ryah_: lsof [23:25] vol0da has left the channel [23:25] JimBastard: micheil: lsof -p 14144 | wc -l [23:25] JimBastard: like that [23:26] micheil: okay, what's the 14144 mean? [23:26] JimBastard: the pID [23:26] JimBastard: i just made one up [23:28] devinus_ has joined the channel [23:29] SchizoDuckie: http://github.com/SchizoDuckie/Node-CLI/blob/master/screenshot.png [23:29] SchizoDuckie: a sneak preview ;-) [23:30] tmpvar: wow [23:31] SchizoDuckie: ghehge thx [23:33] SchizoDuckie: the new version even has proper colors :P [23:33] SchizoDuckie: the idea is that we are going to make it insanely cross platform multiplayer [23:35] SchizoDuckie: as long as you have a reasonably steady connection you should be able to play live with 4 other players [23:37] nerdEd has joined the channel [23:38] evanmeagher: that's awesome. after scrabb.ly, i've been hoping for a tetris game like this. [23:40] jvolkman_ has joined the channel [23:41] jfd1 has joined the channel [23:45] rnewson has joined the channel [23:56] mbrochh has joined the channel [23:59] aconbere has joined the channel [23:59] ryah_: scoates: sick [23:59] ryah_: er [23:59] ryah_: that was meant for schizoduckie