[00:00] felixge: isaacs: you still need to know which module you were in [00:00] felixge: isaacs: otherwise relative requires will become broken [00:00] isaacs: felixge: hmmm.... just a second, lemme sketch this... [00:00] felixge: isaacs: my brain hurts already, please stop :D [00:00] felixge: :) [00:01] isaacs: haha [00:04] maushu has joined the channel [00:05] felixge: isaacs: how is this? http://github.com/felixge/node/commit/fb7d731165ef049ef6eb6f6452234c38d5665b5b [00:05] felixge: isaacs: that should allow to call the parent hijack function [00:06] felixge: I wouldn't want additional magic beyond that [00:08] isaacs: felixge: http://gist.github.com/644180 [00:08] isaacs: magic^ [00:08] __mn__ has joined the channel [00:09] felixge: isaacs: evil :) [00:09] isaacs: naw, that's good magic :) [00:10] isaacs: so, the idea there would be that, if you call require.hijack twice, it behaves as expected both times. [00:10] isaacs: the first one will happen, and if it doesn't hijack it, then the second one happens. [00:10] felixge: isaacs: I think calling hijack twice is exactly what I would call evil :) [00:10] isaacs: and if you do require.hijack over and over, you just get a line of people waiting to see if they can handle it [00:10] felixge: what is if you don't want the first function taking away control from you? [00:11] felixge: and you want the 2nd function to be the master instead of the slave [00:11] isaacs: felixge: then tough titty [00:11] isaacs: felixge: it's already gotten in front of you. you can't undo that now. [00:11] isaacs: it's too late. [00:11] felixge: Since I don't know an actual use case for either one this seems magic for the sake of magic [00:11] felixge: :) [00:12] isaacs: if you want to support un-hijacking, then you should just do require.hijack = function (path, req, self) [00:12] __mn__: what is hijack? [00:13] felixge: __mn__: terrorism for the module system [00:13] felixge: :) [00:13] __mn__: lol. [00:14] felixge: __mn__: basically an idea to allow overwriting the require() function [00:14] __mn__: o.0 [00:14] felixge: __mn__: one use case being unit testing where you want to replace the require calls your module-under-test makes with stub objects [00:15] __mn__: interesting. [00:15] felixge: isaacs: anyway, if you think this magic should go in - I'll do it and submit the thing to ryan. All I need is stubbing, and that can be done with or without magic [00:16] felixge: the other things one can do with this are experimental anyway [00:18] dquestions has joined the channel [00:18] felixge: isaacs: actually I really need to sleep now. And maybe it's best to have a night of sleep over this. So I'll be here again tomorrow to see if we both still think this is a good idea :) [00:19] __mn__: hey, is there any way to detect an err for file Sync functions? or can you only error test with async? [00:19] felixge: __mn__: try..catch should work [00:19] felixge: ACTION gn8 [00:19] __mn__: thanks. [00:20] sudoer has joined the channel [00:23] persson has joined the channel [00:24] banjiewen has joined the channel [00:26] TheEmpath: is it safe to think of process.nextTick as "Threading"? [00:26] TheEmpath: i have a event queue, and every server tick, i shift an event off it and execute it [00:26] JimBastard_: what are the chances of getting a sys depreciation message in for v3 ? [00:27] JimBastard_: 0.3.0 [00:27] TheEmpath: is this more efficient than dedicating an entire serverTick to iterating through all events in a process queue and executing all of them [00:27] JimBastard_: im trying to calculate how many hours it will take me to fix all those repos, fuuuuuudge [00:28] bradleymeck: theempath, it is not threading, it is queuing [00:28] __mn__: JimBastard_: as soon as mine went to 0.3.0-prealpha it gave me "soft migration errors" for sys -> utils [00:28] __mn__: where basically it wouldn't run my app. [00:28] __mn__: so I had to revert, super annoying. [00:28] TheEmpath: bascailly, im trying to get nonblocking process queuing [00:29] __mn__: hey, does anybody know anything about fs.link() ... it seems impossible for me to get it to work, it always gives me errors. [00:29] Tim_Smart has joined the channel [00:29] bradleymeck: the .nextTick events are about as optimal as you will get manually doing it, however it will prevent events from being dispatched while they are queued beware [00:32] isaacs: TheEmpath: no, it is not safe to think of process.nextTick as threading [00:32] isaacs: TheEmpath: node runs in a single thread. only one thing is ever happening at a time. [00:32] mbrochh has joined the channel [00:32] mbrochh has joined the channel [00:33] isaacs: TheEmpath: think of process.nextTick as a really really really fast setTimeout [00:33] AAA_awright: Threading on a single processor is roughly the same thing though [00:33] Tim_Smart: nextTick means computation can be split over multiple loop iterations. [00:34] Tim_Smart: But most people would suggest create a child/worker process to delegate to. [00:34] Tim_Smart: creating* [00:35] Tim_Smart: Hmm. Is there a unix command to find out how many cores a machine has? [00:37] c4milo: cat /proc/cpuinfo ? [00:38] Tim_Smart: Ah nice. [00:39] deepthawtz has joined the channel [00:39] mbrochh has joined the channel [00:39] JimBastard_: i gotta stop playing catch up with unit tests, its no fun [00:43] cognominal: Is there a standard way to do a sprintf in node or one of its packages? [00:46] c4milo: cognominal: what do you need to do ? console.log and str + str doesn't help you ? [00:47] c4milo: cognominal: ohh you need format numbers ? [00:47] cognominal: yup, things like that [00:47] evanmeagher has joined the channel [00:47] c4milo: cognominal: I don't know anything in node to do that :S [00:48] iheartnodejs has joined the channel [00:48] iheartnodejs: :-D [00:51] cognominal: i guess I need to learn to do a npm package from http://www.webtoolkit.info/javascript-sprintf.html [00:52] cognominal: see you tomorrow [00:52] isaacs: cognominal: s/sprintfWrapper/module.exports/ [00:53] isaacs: cognominal: or just look look at console.log's source [00:53] isaacs: . [00:53] isaacs: cognominal: also, you can do number.toString(base), too [00:53] isaacs: v8> (99).toString(60) [00:53] v8bot: isaacs: RangeError: toString() radix argument must be between 2 and 36 [00:53] isaacs: v8> (99).toString(36) [00:53] v8bot: isaacs: "2r" [00:54] isaacs: v8> parseInt("2r", 36) [00:54] v8bot: isaacs: 99 [00:54] bencc has left the channel [00:56] [[zz]] has joined the channel [00:59] melgray has joined the channel [01:00] agilandfast has joined the channel [01:02] dquestions has joined the channel [01:04] DozyPieman has joined the channel [01:04] alxc1 has joined the channel [01:06] chewbranca has joined the channel [01:12] TheEmpath: Tim_Smart: yes. thank you for the clarification. Currently I shift off the event queue, then handle it with a process.nextTick() call, that's about as atomic as i can get while creating the illusion of nonblocking [01:13] TheEmpath: basically, every nextTick shifts off the event queue and processes an event. [01:13] ajsie has joined the channel [01:13] jagwio has joined the channel [01:13] ajsie: JimBastard_: how is it going? [01:13] JimBastard_: sup [01:13] Tim_Smart: TheEmpath: nextTick ~= setTimeout(fn, 0) [01:13] TheEmpath: a little bit faster though, i hear by 1.5 times [01:13] JimBastard_ has joined the channel [01:13] JimBastard_: sup ajsie [01:13] Tim_Smart: Yes. [01:13] ajsie: great .. planning my app .. 5 days left [01:14] anomalyinc has joined the channel [01:14] __mn__: what is the difference between symlink and link? [01:14] ajsie: i meant 5 days left for your platform .. is it ready enough? [01:14] TheEmpath: and thats basically as close to a nonblocking queue im going to get? [01:15] JimBastard_: its been working for a while [01:15] JimBastard_: just polishing [01:15] JimBastard_: :-) [01:15] ajsie: so you will make the deadline? [01:19] __mn__: symlink vs. link ? [01:19] bradleymeck has joined the channel [01:23] __mn__: how do you create a "linkdata" to be used in the symlink function? [01:29] Twelve-60 has joined the channel [01:31] jimt has joined the channel [01:35] ryah_: okay. going to land something painful. [01:37] jimt_ has joined the channel [01:39] bradleymeck: sweet, growing pains [01:39] zentooo has joined the channel [01:40] twoism has joined the channel [01:41] CIA-31: node: 03Ryan Dahl 07master * r15594ea 10/ (24 files in 16 dirs): Replace WAF with make/autoconf - http://bit.ly/9n2W8c [01:41] jimt has joined the channel [01:42] Tim_Smart: <3? [01:42] ryah_: if only to punish users who think they should be running the dev branch [01:43] bradleymeck: hurrah [01:43] Tim_Smart: I just added request pipe-lining to my redis client, and got a speed increase of 2x in string ops. [01:43] Tim_Smart: (Database sets went from 50k ops a second to 90k) [01:43] [[zz]] has joined the channel [01:44] Tim_Smart: I was like OMG [01:46] mgbh has joined the channel [01:46] flippyhead has joined the channel [01:46] rbranson: http://img138.imageshack.us/img138/5936/setupke3.png [01:49] mgbh has left the channel [01:49] kriszyp has joined the channel [01:50] TheEmpath: finally, nonblocking process queue without locking [01:50] dannycoates has joined the channel [01:50] TheEmpath: or infinite cascading process.nextTick's based on user input [01:50] TheEmpath: \o/ [01:51] mgbh has joined the channel [01:54] TheEmpath: but i may have revealed an issue with socket.io given my setup... i'll work on isolating it, but this is the error i get when I disconnect 10 users simultaneously http://gist.github.com/644268 [01:54] jesusabdullah: What is this? [01:56] TheEmpath: i can reliably create broken pipes in socket.io when i do mass action, but i can't do it with a single connection [01:59] jimt_ has joined the channel [02:02] benreesman has joined the channel [02:03] benreesman has joined the channel [02:04] threeve has joined the channel [02:06] sh1mmer has joined the channel [02:07] ben_alman has joined the channel [02:11] indexzero has joined the channel [02:13] jakehow has joined the channel [02:17] ryah_: should probably just dump all the object files into build/release [02:17] ryah_: instead of trying to do this mkdir -p madness [02:18] ryanfitz has joined the channel [02:18] mbrochh has joined the channel [02:19] skm_ has joined the channel [02:20] skm_: how do you do subclassing in js? [02:20] skm_: object1.prototype = object2.prototype? [02:21] indexzero: Well it's a little different between node and the browser, but in node I prefer to do it this way [02:21] indexzero: http://blog.nodejitsu.com/using-sys-inherits-in-node-js [02:22] ryah_: JimBastard: a message is outputed on 0.3 when you require('sys') [02:22] ryah_: % ./node [02:22] ryah_: > process.version [02:22] ryah_: 'v0.3.1-pre' [02:22] ryah_: > require('sys') [02:22] ryah_: The 'sys' module is now called 'util'. It should have a similar interface. [02:22] CIA-31: node: 03Ryan Dahl 07master * rfcd0c3e 10/ test/pummel/test-base64-bigfile.js : [02:22] CIA-31: node: Remove test-base64-bigfile [02:22] CIA-31: node: Already tested in test/simple/test-buffer.js. Takes too long, uses too much [02:22] CIA-31: node: memory. - http://bit.ly/cKssuq [02:22] davidwalsh has joined the channel [02:23] indexzero: ryah_: Is this on the path to deprecation? [02:23] indexzero: it's not a huge change, but a little frustrating since almost everyone of my libraries uses sys somewhere [02:25] ryah_: indexzero: keep using sys - it will be months before this change goes into a stable release [02:26] Tim_Smart: Just use util in any new code you make. [02:26] Tim_Smart: Slowly phase out sys. [02:26] indexzero: ryah_: Ok, but the long-term plan is remove sys completely? [02:26] indexzero: renaming it to util? [02:26] ryah_: indexzero: yes, that's the intent [02:27] indexzero: ryah_: Ok, thanks [02:29] bpot has joined the channel [02:30] TheEmpath: any tutorials for socket.io on setting up an httpServer on one port and the socket server on another? [02:30] bradleymeck: just make 2 http.createServers [02:30] TheEmpath: yeah i've done that [02:30] __mn__: TheEmpath: socket.io automatically uses separate ports. [02:31] TheEmpath: o [02:31] TheEmpath: damn [02:31] TheEmpath: so much for that idea [02:31] __mn__: TheEmpath: so you can still use ajax calls inside the same client as socket calls. [02:31] deepthawtz has joined the channel [02:32] __mn__: TheEmpath: at least from what I've read & worked with. [02:33] TheEmpath: well im having a real spaz of a time trying to figure out a pretty arcane issue [02:33] __mn__: like? [02:33] TheEmpath: i can simulate dozens of connections with iframes, and when i disconnect them by closing the tab with hte iframe, my process queue becomes blocking and waits for each connection to disconnect [02:33] TheEmpath: and then continues handling events [02:34] TheEmpath: worse off, 4% of the time, its nonblocking [02:34] TheEmpath: 96% of the time, its blocking [02:34] TheEmpath: when its nonblocking, errors for broken pipes appear occasionally [02:34] TheEmpath: DU datagram errors and even the server crashes [02:35] __mn__: interesting, but... why not try using actual tabs? I mean, aside from testing a bunch of users... are you really using iframes? [02:35] TheEmpath: im using the iframes to generate multiple connections in a single tab [02:36] __mn__: and are your iframes inside of each other, or just a list of iframes? [02:36] TheEmpath: then i open 3 tabs that do the same thing, putting me at 30 connections [02:36] TheEmpath: each iframe connects to the socket.io server and established a flashsocket connection [02:36] __mn__: right, for your own testing purposes... but [02:36] __mn__: oh, I never got flashsocket to work actually so I turned it off. [02:36] TheEmpath: that way, i can simply close a tab to simulate mass people disconnectiong at the same time [02:37] __mn__: have you tried opening 10 tabs each with a single connection, then closing the window ... and see if the same problem happens? (aka if it is a iframe issue or a mass disconnection isue) [02:37] TheEmpath: im sory, i mean im using web socket with WebSocketMain.swf [02:37] ryah_: TheEmpath: someone was reporting that socket-io doesn't properly close connections the other day [02:38] TheEmpath: ryah_: that was me probably [02:38] TheEmpath: i've been having this issue for a week [02:38] ryah_: oh :) [02:38] TheEmpath: __mn__: also, these iframes generate pokes every 100ms [02:38] TheEmpath: so they send data [02:38] ryah_: this seems to fix it: http://github.com/LearnBoost/Socket.IO-node/commit/8b483789fee81706dbb20d504f5f4cdb5d2470c2 [02:38] ryah_: are you using that version? [02:39] TheEmpath: lemme check [02:40] TheEmpath: no im not [02:40] TheEmpath: should i just do a git pull from master? [02:40] ryah_: yes [02:40] TheEmpath: k [02:40] TheEmpath: 14 files changed, 684 insertions(+), 188 deletions(-) :( [02:41] TheEmpath: ACTION blows the dust off socket.io. [02:44] meso has joined the channel [02:44] chapel: has anyone used node-oauth with twitter? [02:45] TheEmpath: makes no different, ryah_ [02:45] Tim_Smart: ryah_: Do you know the threshold where V8 strings become slow to write? [02:45] Tim_Smart: (In bytes) [02:49] ryah_: Tim_Smart: ~100 ? [02:49] ryah_: :) [02:49] Tim_Smart: Compared to buffers? [02:50] ryah_: yeah [02:50] softdrink has joined the channel [02:51] chapel: hmm, so I am having trouble with node-oauth and twitter [02:51] Tim_Smart: OK. I'm trying to set a good threshold for redis query pipe-lining. [02:52] chapel: http://gist.github.com/644314 plain and simple code, used from here http://github.com/ciaranj/node-oauth/wiki/Example-usage-example-for-Tweeting-with-Twitter [02:52] chapel: but it doesn't work [02:53] steadicat has joined the channel [02:53] chapel: any idea what it might be? [02:54] sh1mmer has joined the channel [02:54] Me1000 has joined the channel [02:54] SINPacifist has joined the channel [02:56] sh1mmer: ryah_: ping [02:56] rbranson: TheEmpath: I was having the same issue.. :/ [02:57] Tim_Smart: ryah_: The annoying thing is, turning a string into a buffer makes it slower... [02:57] ryah_: sh1mmer: pong [02:58] ryah_: Tim_Smart: yeah - i mean - that's what happens internally when you write a string to a socket [02:58] ryah_: first it writes it to a buffer [02:58] TheEmpath: my process event queue happens all the time. i have a callback called execute which invokes process.nextTick() which then invokes execute again. after that, a event is shifted off and ran. so basically, each nextTick executes one event and calls itself back [02:58] Tim_Smart: ryah_: Then how come manually turning it into a buffer is even slower? [02:59] ryah_: there are some optimizations how it handles the buffers in net.js [02:59] Tim_Smart: Ah. [03:00] Tim_Smart: Well I found splitting my queries into ~500 bytes chunks then writing got the best results. [03:00] cataska has joined the channel [03:00] TheEmpath: rbranson: basically: function execute() { process.nextTick(function() { execute(); event = eventQueue.shift(); /* do stuff with it /*}); } [03:00] Tim_Smart: Then a nextTick cleans up any offcuts. [03:01] sh1mmer: I did an awesome thing today [03:01] ryah_: hopefully i'll get ths writev stuff working soon [03:01] sh1mmer: not that I did the awesome, that was predone [03:01] ryah_: and we'll be able to dump strings to socket [03:01] ryah_: directly [03:01] sh1mmer: but I got slime.vim working with node-repl [03:01] sh1mmer: it's rad [03:01] ryah_: (ascii ones anyway) [03:01] Tim_Smart: That would be very nice :) [03:01] TheEmpath: now this queue execution is totally separate from socket.io.. so why socket.io disconnections even affect this kinda boggle me [03:03] rbranson: TheEmpath: which node version are you running? [03:03] TheEmpath: v0.3.0-pre [03:03] twoism has joined the channel [03:03] isufy has joined the channel [03:03] Tim_Smart: Redis client benchmarks after I implemented pipe-lining: https://gist.github.com/b76fb590a7642e8fd387 [03:03] Tim_Smart: Mine is 'node-redis' [03:04] rbranson: i had problems with websocket connections hanging, so basically the server could accept 1024 connections and then need a restart [03:04] TheEmpath: gah [03:05] rbranson: node would use up a lot of CPU spinning accept() on those descriptors [03:05] rbranson: and GC would churn a lot [03:05] TheEmpath: :( [03:05] rbranson: that had all kinds of fun side effects [03:05] TheEmpath: sounds like i gotta write someone myself [03:05] o_o has joined the channel [03:05] rbranson: it's fixed in 0.2.4 and 0.3 [03:06] rbranson: and socket.io-node HEAD closes the connections which makes it even better [03:06] rbranson: since it doesn't leave them in CLOSE_WAIT state until timeout [03:07] ehaas has joined the channel [03:07] TheEmpath: woah, you're right [03:07] TheEmpath: that's silly faster [03:07] TheEmpath: it took in my 10 iframes really quickly [03:07] ryah_: TheEmpath: the new node? [03:08] TheEmpath: naw this updated version of socketio [03:08] ryah_: ah [03:08] ryah_: we need to start closing sockets by default [03:08] ryah_: (not leaving them half-open) [03:09] ryah_: i bet many people are doing that [03:10] rbranson: yeah I think most people sort of expect it now with dynamic languages [03:10] chapel: the tempalias guy that talked at jsconfeu said he had a socket leak issue [03:10] rbranson: could always have a property to disable the default close-on-destructor behavior [03:11] TheEmpath: here's an example of the log output. notice the micorseconds http://gist.github.com/644326 [03:11] TheEmpath: server pokes are like every ~30ms, but when disconnections happen in bulk, the whole thing halts [03:12] smith26 has joined the channel [03:12] __mn__: how come async functions don't have access to changing the value of its parent's variable? [03:12] CIA-31: node: 03Ryan Dahl 07master * r7eed71f 10/ TODO : add todo about half-open connections - http://bit.ly/dhjpJA [03:12] Wyverald has joined the channel [03:12] rbranson: nice [03:12] chapel: so anyone have any idea why node-oauth isn't working with twitter? [03:13] __mn__: does this mean I always have to use the sync version of functions to change a parent function's variable? [03:13] TheEmpath: you can use closures, i believe [03:13] TheEmpath: var self = this; [03:14] rbranson: yeah that's what closures are for [03:14] __mn__: TheEmpath: so you always have to use this then? thats kinda gay... [03:14] TheEmpath: sort of [03:14] rbranson: not really [03:14] TheEmpath: there are ways around it [03:14] rbranson: it actually makes sense [03:14] __mn__: yeah, it makes sense, but sorta annoying. [03:14] Tim_Smart: ryah_: Do you know why a node process's SIZE (in top) grows so big? [03:15] __mn__: thanks though. [03:15] TheEmpath: rbranson: so yeah, thats what i get and its unsettling because while socket.io connections are nonblocking... which is great... disconnecting appears to be blocking, which is bad for high loads of people that disconnection for, say, some advertising beacon server or something [03:15] rbranson: it allows closures to be passed around as binding/context-free [03:15] rbranson: TheEmpath: that's odd, that disconnection would be "blocking" [03:16] TheEmpath: i overhauled my entire execution queue to make sure it wasnt my code [03:16] TheEmpath: by passing events atomically to nextTick to be handled, i believe im preserving a nonblocking queue [03:16] TheEmpath: and this is shown with connections fitting in whenever [03:16] TheEmpath: but the disconnects just halt everything [03:17] banjiewen has joined the channel [03:18] modular has joined the channel [03:18] banjiewen has joined the channel [03:18] rbranson: i mean it's evented, so any code execution is going to "block" the loop [03:19] rbranson: so even socket.io could be doing something silly [03:20] Wyverald: Noob question here: I just read several articles about Node and now have a basic understanding of the asynchronous, event-loop model of Node. Basically Node hands costly operations, including file/socket IO and database operations, out and simply waits for the results, right? But what about when the operation is a complex calculation job that I'd like to code in Node? Would the calculation 'block' the entire process? [03:20] bradleymeck has joined the channel [03:20] Tim_Smart: Wyverald: Yes it would. [03:21] Wyverald: Tim_Smart: Is there a way around that? Something that employs the asynchronous model? [03:21] rbranson: a message queue and workers [03:21] Tim_Smart: And we generally recommend worker process[es] to handle complex computation. [03:21] rbranson: that is a more scalable and robust solution anyway [03:21] bradleymeck: plus for complex math you can use a more math oriented language :) [03:22] Wyverald: Ooh.. you mean like child processes? I think I saw such a module in the docs.. [03:22] Tim_Smart: You could write the computation in C++ as an addon. [03:23] rbranson: don't write an addon... it's a pain in the ass ;D [03:23] SubStack: or connect a worker process with rpc [03:23] SubStack: ^^^ easier [03:24] rbranson: RPC is such a scary term, implies blocking calls in my mind [03:24] TheEmpath: Wyverald: Look into map/reduce for Mongo to see heavy duty crunching [03:24] SubStack: also: ruby and perl implementations of dnode now exist [03:24] Wyverald: Does Node have a.. 'worker' module or something like that? [03:24] Tim_Smart: Wyverald: pgriess has a web-worker module. [03:25] Wyverald: Tim_Smart: Ooh thanks [03:25] bradleymeck: rbranson for simple calculations it is pretty darn easy once you write one [03:25] SubStack: rbranson: all the rpc systems worth using are asynchronous [03:25] rbranson: of course, but i'm old and talking about like Sun RPC [03:25] rbranson: so when someone says "RPC" that' sthe first thing that comes to mind [03:26] SubStack: yeah, so many rpc systems suck so much [03:26] bradleymeck: ipc is more what workers are doing [03:26] SubStack: rbranson: http://github.com/substack/dnode ^_^ [03:26] rbranson: bradleymeck: yeah once you write one and figure out the V8 environment [03:27] bradleymeck: mmm, is there a good queued stdin handler? [03:28] rbranson: i still think an MQ/worker pool model is best, but a little more work to setup [03:28] SubStack: bradleymeck: there's http://github.com/jesusabdullah/node-prompt [03:29] TheEmpath: handling 81 event requests per second :D [03:29] rbranson: you get monitoring and management tools for "free" [03:29] rbranson: and it can be made persistent, etc, etc [03:29] jamesarosen has joined the channel [03:30] rbranson: TheEmpath: is that what you're benching as peak or just what you're doing in testing? [03:30] bradleymeck: substack pretty nice, if it didnt have the .end it would be ideal [03:31] Tim_Smart: SubStack: Have you thought of using msgpack with dnode? [03:31] TheEmpath: here's what im building http://github.com/cainiac/Imhotep I was testing how many connections it could handle that dump info in it. now im testing single clients dumping massiv einfo at it with setInterval() on the client [03:31] Tim_Smart: Oh wait, browser support.. [03:31] TheEmpath: im at 160 event requests per second, but now new users can't get a response from the http server :( [03:31] TheEmpath: well they do, its just god awful slow [03:32] SubStack: Tim_Smart: hmmm msgpack looks neat and possible to support, just trickier for the browser side [03:33] jagwio has joined the channel [03:33] unhappyrobot has joined the channel [03:36] nolan_d has joined the channel [03:36] boaz has joined the channel [03:39] dnolen has joined the channel [03:39] TheEmpath: so what kinda benchmark tests are availible? basic resource watchers? anything that can simulate connections and generate heavy client loads? [03:40] chapel: okay, I figured out why oauth wasn't working with twitter [03:40] chapel: hrm [03:41] chapel: its jsdom [03:41] Aria: Oh? [03:41] chapel: I really don't know why or how [03:42] chapel: but if I require jsdom, oauth doesn't work [03:42] ryanfitz has joined the channel [03:42] chapel: I had the same problem with jsdom on another script, but it wasn't a high priority [03:42] chapel: tmpvar [03:44] Aria: Hm. Sounds like some namespace pollution, but I'm kinda surprised. [03:46] Raevel has joined the channel [03:46] matt_c has joined the channel [03:46] Tim_Smart: tmpvar must have forgot a 'var' somewhere :p [03:46] chapel: also ciaranj if anyone knows him, who made node-oauth, has his personal twitter account consumer and secret codes in one of the test files for oauth [03:47] chapel: not thinking about it, testing the jsdom issue, http://twitter.com/#!/ciaran_j/status/28657762556 [03:47] Raevel: hehe [03:48] FR6 has joined the channel [03:53] FR6: Someone know if we can pass an object with the ".send()" function of socket.io? [03:54] banjiewen has joined the channel [03:54] FR6: Because if I pass "so.send({'x': 10});" on the server side I will receive "[object Object]", but I can not do "obj.x". It tells me "undefined". [03:57] jamesarosen has joined the channel [03:59] Blink7 has joined the channel [04:01] kriszyp has joined the channel [04:03] FR6: I just found it, it was easy: JSON.stingify({x:10}) and then JSON.parse(...). [04:07] sudoer has joined the channel [04:12] sprout has joined the channel [04:16] FR6 has joined the channel [04:18] mbrochh has joined the channel [04:21] TheEmpath: the great disconnect blocking nonsesnse is at an end [04:21] TheEmpath: i've pinpointed it to be a firefox issue [04:22] TheEmpath: disconnecting ten socket.io clients from a tab bogs down firefox, therefore, additional requests are never sent [04:22] TheEmpath: i ran it in chrome, and 1.) loaded stupid fast and 2.) disconnected asynchronously [04:22] TheEmpath: \o/ [04:24] FR6 has joined the channel [04:26] chapel: hmm [04:26] chapel: anyone know why jsdom would be causing issues with node-oauth? [04:26] ryanfitz has joined the channel [04:33] rauchg_ has joined the channel [04:35] FR6 has joined the channel [04:35] bradleymeck: chapel unless you are messing with globals or have variable names in your own code coliding, it shouldnt [04:36] bradleymeck: colliding* [04:36] chapel: uhh, nope, mind testing for me? [04:36] chapel: install node-oauth [04:36] chapel: then run testb.js [04:36] chapel: it should work ootb [04:37] chapel: then edit it and add var jsdom = require('jsdom'); [04:37] chapel: and see if it continues to work [04:43] mikew3c has joined the channel [04:44] chapel: I have figured out what the difference is [04:45] Utkarsh has joined the channel [04:45] unomi has joined the channel [04:48] chapel: bradleymeck << http://gist.github.com/644420 that shows the difference between the header output from enabling jsdom and disabling it [04:49] chapel: basically it is cutting out the oauth header info [04:54] Tim_Smart: ryah_: Does the autoconf stuff change the way we build addons? [04:55] chapel: so I have figured out where it is breaking [04:55] evanmeagher has joined the channel [04:56] chapel: http://gist.github.com/644420 << if you go there, the code snippet is that is breaking with jsdom [04:56] chapel: anything look off? [04:58] necrodearia has joined the channel [04:59] chapel: thats really weird [05:00] chapel: orderedParameters[i][0].match('^oauth_') == "oauth_" renders true as it should without jsdom, but jsdom causes it to render false [05:02] gza has joined the channel [05:03] gza has left the channel [05:03] mape: Hmm anyone encountered ./configure: not found when using latest from github? [05:04] rbranson: it's not in the repo, you can use autoconf to build it though [05:05] Tim_Smart: autoconf && ./configure && make is failing on Ubuntu atm. [05:05] Tim_Smart: I might checkout 0.3.0 for now. [05:07] bentruyman has joined the channel [05:07] mikew3c_ has joined the channel [05:08] amerine has joined the channel [05:10] mde has joined the channel [05:12] mikew3c_ has joined the channel [05:12] mape: Hmm 3.0 isn't building, make: *** [build/release/src/node.o] Error 1 [05:13] Tim_Smart: mape: git checkout v0.3.0 && ./configure ... [05:14] Tim_Smart: Unless you like messing with build systems. [05:15] isaacs has joined the channel [05:16] mape: That seems to work better, guess I have to look over my little upgrade script [05:20] skm_ has joined the channel [05:22] TheEmpath: here's a cool error: node.js:27 - if (!x) throw new Error(msg || "assertion error"); [05:24] admc has joined the channel [05:25] mde has joined the channel [05:25] amerine has joined the channel [05:25] amerine has joined the channel [05:26] amerine has joined the channel [05:26] mikew3c_ has joined the channel [05:26] amerine has joined the channel [05:27] amerine has joined the channel [05:32] hzin has joined the channel [05:33] confoocious has joined the channel [05:34] mraleph has joined the channel [05:35] FR6 has joined the channel [05:36] Crshman_ has joined the channel [05:36] chapel: hmm [05:37] chapel: whats the bot command? [05:37] chapel: announcer clean the tubes [05:37] _announcer: Cleaning the tubes for great justice! [05:37] ayo: announcer make me a sandwich [05:38] ayo: :_ [05:38] chapel: :P [05:40] themiddleman has joined the channel [05:41] sonnym has joined the channel [05:42] stride: themiddleman: somebody was in here yesterday with the same line, is your stacktrace showing something in the socket timeout callback (net.js?) [05:42] stride: whops, @ TheEmpath - sorry [05:43] themiddleman: :D [05:43] stride: don't know if he already filed a ticket [05:43] TheEmpath: it took some digging [05:43] TheEmpath: but the issue was related to firefox [05:43] stride: .oO(thinking of github issues as tickets makes me so ITIL I could puke) [05:44] stride: TheEmpath: your assertion error was related to the browser? that's weird [05:44] TheEmpath: oh [05:44] TheEmpath: heh no thats different [05:44] vandenoever has joined the channel [05:44] vandenoever has joined the channel [05:44] TheEmpath: i had 4 computers connect to my box with a setInternval of 0ms [05:45] TheEmpath: the callback was a function that socket.send()s a request [05:46] TheEmpath: ran from 09/25/2010 07:04:03.986am to 07:15:45.676am [05:47] stride: and that triggert the assertion error? on which box? [05:48] stride: -t+d [05:48] TheEmpath: overall, my server was taking in about 70 requests per second and then it just died [05:48] TheEmpath: with that as the traceback [05:48] TheEmpath: the server crashed and generated that message [05:48] stride: only that? no longer stacktrace? [05:49] TheEmpath: that was http://gist.github.com/644467 [05:49] TheEmpath: thats hte stacktrace [05:50] stride: ah, yeah, exactly the same as the guy yesterday I think. that has to do with the idle timeout callback in net.js [05:50] murphy has joined the channel [05:51] kawaz_work has joined the channel [05:51] TheEmpath: phooey [05:52] stride: don't know how to fix that though, I don't quite grasp how that list is updated or why the "pointers" in it would break (which I assume triggers the assertion error) [05:52] TheEmpath: i also learned that process.nextTick appends data to a queue [05:52] TheEmpath: that is sliced [05:52] bpot has joined the channel [05:53] rubyphunk has joined the channel [05:53] TheEmpath: Caswell's fast queue is 30% faster on those push/shift options than hte native JS array [05:53] TheEmpath: could be implemented :D [05:54] TheEmpath: var nextTickQueue = []; in node.js:http://github.com/ry/node/blob/master/src/node.js#L34 [05:54] TheEmpath: http://jsperf.com/queue-vs-array-shift can help [05:56] stride: yeah, that or exposing some C++ implementation for fast versions of common data structures would be nice [05:57] mikeal has joined the channel [05:57] stride: although I don't know how big the cost of a good JS implementation vs. the invocation of C++ code is with node [05:57] TheEmpath: yes true [05:58] stride: does anybody know if there's a way to get the encoding that was applied to buffers (e.g. in data events) that come as a string into the event handler? [05:59] MiiCode2 has joined the channel [06:00] k23z__ has joined the channel [06:00] TheEmpath: yikes in this case its 97% faster http://jsperf.com/queue-vs-array-shift/2 [06:01] pquerna: treat calling c++ in node like you do a syscall in c [06:01] mikew3c has joined the channel [06:01] chapel: thats only gonna matter if you are doing a lot of shifts and trying to serve a lot? [06:01] pquerna: things popping in / out of objectwrap are quite slow [06:01] Utkarsh has joined the channel [06:02] TheEmpath: in the case of nextTick, that queue can fill up to pretty astronomical numbers [06:03] jetienne has joined the channel [06:07] alexb_ has joined the channel [06:10] chapel: so nextTick [06:10] chapel: hmm [06:10] masahiroh has joined the channel [06:11] chapel: I just figured out events, though I dont have them down pat [06:11] chapel: what exactly is nextTick, or how would I go about using it properly? [06:15] jansc has joined the channel [06:15] alexb_: It's the next loop [06:16] ph^ has joined the channel [06:17] alexb_: Like see how you can add listeners to things in your code below where they start? That is because it won't execute until the next tick [06:18] jansc has joined the channel [06:18] mbrochh has joined the channel [06:20] mraleph has joined the channel [06:20] jetienne: q. now that node got 2 versions, one stable another unstable, how can i call the .deb ? currently node 0.2.4 is nodejs.deb .... how to call nodejs unstable .deb ? [06:21] mape: Isn't it suppose to be the same? [06:22] dguttman has joined the channel [06:22] jetienne: mape: well one is 0.3.0 and the other is 0.2.4 so no [06:23] pquerna: nodejs02, nodejs03 [06:23] mape: Well that is why you have stable/experimental? [06:23] pquerna: but multi-sloting them would suck so much. [06:23] jetienne: multisloting = ? [06:24] Blink7 has joined the channel [06:24] pquerna: like how you can have pyhton 2.5 and 2.6 at the same time [06:25] evanmeagher has joined the channel [06:25] pquerna: it installs all the libs etc in separate paths [06:25] pquerna: and uses alternatives for /usr/bin/python [06:25] pquerna: (java does this too, etc) [06:25] jetienne: pquerna: hmm seems like a lot of work, but make sense [06:26] jetienne: nodejs and nodejs-unstable, with both at the same time being impossible... [06:26] jetienne: this one is easy to do :) [06:26] pquerna: sure [06:26] pquerna: a conflict is the easy way out :) [06:26] pquerna: but it makes it hard for other dependencies [06:26] pquerna: but /me shrugs [06:27] jetienne: nodejs-stable and nodejs-unstable, both providing a virtual nodejs [06:27] jetienne: and i have to start doing it for ubuntu 10.10 too [06:28] jetienne: ok will do that. have to run to a meeting [06:28] daglees has joined the channel [06:32] simme has joined the channel [06:34] mr_daniel has joined the channel [06:34] freeall has joined the channel [06:36] TomY has joined the channel [06:41] sudoer has joined the channel [06:41] SamuraiJack has joined the channel [06:46] Utkarsh has joined the channel [06:46] stride: hmm, in the assert module there's no way to check if a value equals one of the values in a list, right? [06:49] JojoBoss has joined the channel [06:50] leeeb has joined the channel [06:51] mikew3c has joined the channel [06:51] mikew3c_ has joined the channel [06:51] V1 has joined the channel [06:59] SINPacifist has joined the channel [07:05] Nohryb has joined the channel [07:08] felixge has joined the channel [07:09] saikat has joined the channel [07:12] delapouite has joined the channel [07:15] SINPacifist has joined the channel [07:15] Anti-X has joined the channel [07:15] evanmeagher has joined the channel [07:15] langworthy has joined the channel [07:15] evanmeagher has joined the channel [07:16] V1: Anyone running on a no.de server who is down? [07:16] Br|ce has joined the channel [07:16] d0k has joined the channel [07:16] Br|ce: hi [07:17] Anti-X: ho [07:17] Anti-X: and a bottle of rum [07:20] markwubben has joined the channel [07:21] chapel: ryah_ << did you get an email from techzing podcast? [07:21] chapel: you should go on it if you have the time [07:23] ivanfi has joined the channel [07:25] SamuraiJack_ has joined the channel [07:30] sschuermann has joined the channel [07:31] Druid_ has joined the channel [07:33] spetrea has joined the channel [07:34] skm_ has joined the channel [07:36] TheEmpath has joined the channel [07:45] viktors has joined the channel [07:45] ryah_: Tim_Smart: processes size grows so big? [07:46] ryah_: chapel: yeah, backed up on email [07:46] ryah_: chapel: reply soon :) [07:46] chapel: awesome [07:46] Tim_Smart: ryah_: Oh hey. Yeah after a week or so, it was around 2G [07:46] chapel: would love to hear it [07:46] Tim_Smart: The RSS doesn't grow past 10M though. [07:46] ryah_: is it growing though? [07:47] Tim_Smart: Yeah, SIZE grows. [07:47] Tim_Smart: Happens to every node app. [07:47] ryah_: we hav this strange case in solaris whre the size appears to grow in prstat (the equiv of top) but we thought i was a bug in prstat [07:47] ryah_: hm [07:47] ryah_: that's disconcerting [07:47] frode has joined the channel [07:48] virtuo has joined the channel [07:48] ryah_: can you pmap it? [07:48] Tim_Smart: ryah_: The case is on a no.de instance. I think it happens on linux as well (I regularly shutdown my laptop) [07:48] Tim_Smart: Yeah sure. [07:49] Tim_Smart: SIZE = virtual size right? [07:49] ryah_: yeah [07:50] Tim_Smart: Yeah it has grown to 5000M since I restarted it last. [07:50] Tim_Smart: Seems to grow linearly. [07:50] mAritz has joined the channel [07:51] Tim_Smart: As a completely different process that I restarted about a day or so after, is at 4000M [07:51] ryah_: on linux? [07:51] Tim_Smart: solaris - no.de [07:52] ryah_: solaris - i believe to be a bug in prstat [07:52] ryah_: would be interested if you see this in linux [07:52] ryah_: oh - i just checked chat.nodejs.org [07:53] Tim_Smart: Hmm. I actually have a Ubuntu box I have access to. [07:53] ryah_: 13423 ryan 1 59 0 75G 10M sleep 26:22 0.00% node [07:53] Tim_Smart: Haha. [07:53] ryah_: PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND [07:53] Tim_Smart: Is that on solaris also? [07:53] V1: 75G? [07:53] V1: o_o] [07:53] ryah_: however [07:53] ryah_: % pmap `pgrep node` | tail -1 [07:53] ryah_: total 14260K [07:53] jfd has joined the channel [07:54] ryah_: well, maybe this isn't a solaris bug... [07:54] Tim_Smart: ryah_: Yeah, nothing unusual here: https://gist.github.com/e311e855ce956dde4ebf [07:54] felixge: ryah_: it may be interesting to know that my buffer memory leak test is passing on Ubuntu, but not OSX. There could be buffer-related plattform issues [07:54] stride: somebody had a similar issue last week, I think he was running linux but I can't find the gist & nickname in the logs [07:54] ryah_: Tim_Smart: that's linux [07:55] aubergine has joined the channel [07:55] Tim_Smart: ryah_: Hmm. [07:55] Tim_Smart: Weird. [07:55] ryah_: felixge: hm - i don't know [07:55] ryah_: there could be some v8 platform issues [07:56] felixge: ryah_: the chat log bot has no issues on ubuntu, but that is running on: v0.1.18-18-gdc093ef [07:56] Tim_Smart: ryah_: So you think it is a bug in the monitoring tools? [07:56] tpryme has joined the channel [07:56] Tim_Smart: Because pmap seems to think so. [07:57] felixge: but I believe I've seen virtual memory grow for transloadit to 150M in the past [07:57] ryah_: doh [07:57] felixge: which may not be unreasonable, not sure [07:57] ryah_: Tim_Smart: nevermind that is solaris [07:57] ryah_: i forgot i moved that [07:58] CIA-72 has joined the channel [07:58] Tim_Smart: felixge: Yeah that is no-where near as bad as xxG [07:58] felixge: we need some good tools to find memory leaks ... [07:58] ryah_: so - anyway - back to the theory that it's a solaris bug [07:58] felixge: (awaits the deus ex machine) [07:58] matjas has joined the channel [07:59] felixge: * machina [07:59] Tim_Smart: ryah_: I can do a little experiment - create two idle processes, one on Ubuntu, one on a no.de instance, and compare a week later. [08:00] ryah_: Tim_Smart: okay [08:01] zomgbie has joined the channel [08:01] kjeldahl has joined the channel [08:01] Tim_Smart: Hmm actually. Maybe just have a semi-long setInterval running. [08:01] stride: felixge: http://github.com/FrankGrimm/node-mysql/commit/b3c64bbacf571db71a38971da429fc566836788e the missing handler for ENOTFOUND was causing make test to fail on my CentOS box, do you want a pull request or insert the two lines manually? [08:01] Tim_Smart: ls [08:01] ryah_: our resident solaris creator assures me that bad things happen when a process maps 75G of memory [08:02] ryah_: that it's a reporting error [08:02] jesusabdullah: That's a lot of memory! [08:02] Tim_Smart: OK experiment over. [08:02] ryan[WIN]: uh [08:02] ryah_: but if you see something with growing size on linux - i would be interested :) [08:03] Tim_Smart: OK, experiment resume. [08:03] stride: ryah_ / Tim_Smart: you might want to ask stagas when he comes online, he reported similar issues last week on cygwin [08:04] felixge: stride: a pull request where the fix in the readme is a seperate commit would be most welcome (and give you the credit for the work). Otherwise I can just put it in manually [08:04] felixge: stride: thanks for reporting this [08:04] omarkj has joined the channel [08:04] stride: oh, okay, I'll seperate the commits after lunch and do the pull request [08:05] felixge: ryah_: btw. node-mysql has been running in production for last 20+ hours - no issues so far :) [08:05] ryan[WIN]: ryah_, question on the solaris issue is it spawning external processes [08:06] ryah_: no [08:06] ryan[WIN]: ok [08:07] MikhX has joined the channel [08:08] ryan[WIN]: solaris has some neato memory leak detection stuff [08:08] ryah_: felixge: cool [08:09] ryan[WIN]: http://tread.files.wordpress.com/2007/05/dbx-cheatsheet-solaris1.pdf [08:09] ryan[WIN]: you may already be doing this so apologies if it's redundant [08:09] adambeynon has joined the channel [08:09] ryan[WIN]: dbx check -memuse [08:10] ryan[WIN]: and dbx check -access [08:10] chapel: has anyone used couchdb + _changes with node to do work? [08:10] stephank has joined the channel [08:10] MikhX has joined the channel [08:10] fbits has joined the channel [08:12] ntelford has joined the channel [08:12] alexb_ has joined the channel [08:13] ryah_: chapel: i think isaacs and mikeal are doing that [08:13] chapel: its mikeals talk at jsconfeu that I learnt about it [08:13] chapel: :) [08:14] Anti-X has joined the channel [08:14] chapel: but haven't found any good info on it, then again its more a couchdb issue than node [08:15] chapel: I plan on running my webapp as a couchapp, and use node for the backend processor, on demand [08:15] alxc1 has joined the channel [08:15] ryan[WIN]: ryah_, are you using "prstat -a" to show the resources used? [08:17] freeformz has joined the channel [08:19] mbrochh has joined the channel [08:19] Tim_Smart: OK, let the games begin http://gist.github.com/644594 [08:21] yatiohi has joined the channel [08:21] viirya has joined the channel [08:22] margle has joined the channel [08:23] mraleph has joined the channel [08:26] Tim_Smart: ryah_: Just a heads up, building on Ubuntu: https://gist.github.com/ecbc78c74925a9d081ac [08:26] MattJ has joined the channel [08:27] ryah_: Tim_Smart: 32 bit machine? [08:27] Tim_Smart: Yes. [08:28] ryah_: you need to set the arch in the Makefile [08:28] ryah_: haven't got it automated yet [08:28] Tim_Smart: Ah ok. [08:28] ryah_: you'll see it near the top [08:28] ryah_: eh, also where it's building v8 :) [08:28] aubergine has joined the channel [08:29] ryah_: s/arch=x86/arch=ia32/ [08:29] ryah_: fucking build systems. [08:29] ryah_: (obviously you can ehlp by patching it :)) [08:30] ryan[WIN]: ooo did someone say patch [08:30] Tim_Smart: So s/arch=x86_64/arch=ia32/? [08:31] alexb_: Is there a way to restart a process in script so I can avoid memory leaks [08:31] ryah_: Tim_Smart: the first "arch=" needs to be "arch=x86" [08:32] ryah_: the second two need to be arch=ia32" [08:32] ryah_: fun [08:32] Tim_Smart: Ah, success. [08:33] ryah_: i think rsm is planning on fixing that [08:33] Tim_Smart: Urgh compiler warnings drive me crazy. [08:33] ryah_: (the difference in arch naming between v8 and node) [08:33] Tim_Smart: I'm pedantic and have to make sure everything compiles cleanly. [08:37] Tim_Smart: ryah_: And you need to make a 'install' target? [08:39] ryah_: install isn't done, no [08:39] ryan[WIN]: i can make a quick c program that detects cpu things if that will help in any way [08:40] Tim_Smart: Heh I wonder how many programmers have gone crazy making a build system. [08:40] zomgbie has joined the channel [08:41] virtuo has joined the channel [08:41] Tim_Smart: Or - something else made them crazy, so they decided to work on a build system. [08:41] franck34: hi, is there something to urldecode a string in node.js ? [08:41] Tim_Smart: franck34: require('querystring') [08:42] Tim_Smart: http://nodejs.org/api.html#query-string-316 [08:42] franck34: great thx a lot [08:42] Tim_Smart: s/thx/thanks/ [08:42] chapel: well does he want to decode url escaped stuff [08:43] chapel: or parse url queries? [08:43] Tim_Smart: I need to make a script that runs that replace for irssi. [08:43] ryan[WIN]: Tim_Smart, hay [08:44] Tim_Smart: ryan[WIN]: Hi! [08:44] ryan[WIN]: http://proggit.pastebin.com/nDQYjzJG [08:44] ryan[WIN]: i used python because node already assumes python [08:44] franck34: mm chapel just decode url escaped stuff [08:44] ryan[WIN]: you could pipe that output and do like [08:44] chapel: frank, if you want to decode urlencoding like %20 to space, then use decodeuri [08:45] chapel: decodeURI() [08:45] ryan[WIN]: whatever = python detect.py then arch=whatever [08:45] franck34: ok thx [08:45] chapel: the inverse is encodeURI() [08:45] franck34: so it's myString.decodeURI() ? [08:45] ryan[WIN]: it's ghetto, but it will work [08:46] Tim_Smart: decodeURI(string) [08:46] Tim_Smart: There is also decodeURIComponent() [08:47] franck34: i'm confused. my supposed encoded string is ... well i have a "+" rather than %20 before decodeURI it [08:47] Tim_Smart: v8: encodeURI('!@#$%^&*()_+=') [08:47] v8bot: Tim_Smart: "!@#$%25%5E&*()_+=" [08:47] Tim_Smart: v8: encodeURIComponent('!@#$%^&*()_+=') [08:47] v8bot: Tim_Smart: "!%40%23%24%25%5E%26*()_%2B%3D" [08:47] franck34: v8bot: decodeURI('+'); [08:47] v8bot: franck34: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [08:47] stride: the ~Component version also encodes slashes and colons I think [08:48] franck34: v8bot: decodeURIComponent('+'); [08:48] v8bot: franck34: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [08:48] chapel: v8: decodeURI('+'); [08:48] v8bot: chapel: "+" [08:48] Tim_Smart: stride: The *Component is for converting to a query-string value. [08:48] ryan[WIN]: v8: sys.puts("lol"); [08:48] v8bot: ryan[WIN]: ReferenceError: sys is not defined [08:48] ryan[WIN]: :> [08:49] Tim_Smart: v8: console.log('lol') [08:49] v8bot: Tim_Smart: CONSOLE: ["lol"], OUTPUT: undefined [08:49] chapel: franck34 << just use a string.replace('+', ' '); [08:49] ryan[WIN]: v8: while(1) [08:49] v8bot: ryan[WIN]: SyntaxError: Unexpected end of input [08:49] keeran has joined the channel [08:49] Tim_Smart: v8: decodeURIComponent('+') [08:49] v8bot: Tim_Smart: "+" [08:49] ryan[WIN]: v8: while(1) { a = 1 } [08:49] v8bot: ryan[WIN]: Error: Timeout [08:49] ryan[WIN]: well there's that [08:49] chapel: v8: var x = 'string+string'; x.replace('+', ' '); [08:49] v8bot: chapel: "string string" [08:50] Tim_Smart: Who introduced + as spaces anyway? Damn you google. [08:50] aubergine has joined the channel [08:50] ryan[WIN]: v8: sys = require('sys'); sys.puts("lol"); [08:50] v8bot: ryan[WIN]: ReferenceError: require is not defined [08:51] franck34: thanks guys [08:53] ryan[WIN]: v8: function lol() { lol() } [08:53] v8bot: ryan[WIN]: undefined [08:54] Tim_Smart: ryan[WIN]: You might want to run the function. [08:55] ryan[WIN]: v8: function lol() { lol() } lol() [08:55] v8bot: ryan[WIN]: RangeError: Maximum call stack size exceeded [08:55] ryan[WIN]: v8: eval("function lol() { lol() } lol()") [08:55] v8bot: ryan[WIN]: RangeError: Maximum call stack size exceeded [08:56] ryan[WIN]: aw man [08:56] chapel: heh [08:56] chapel: v8: console.log('this is v8 failing'); [08:56] v8bot: chapel: v8 is no longer supported (except in PM). Try v8: or v8> [08:57] ryan[WIN]: v8: function lol(){a=""; for(i=0;i<135039503;++i) a+='a'; return a; } lol() [08:57] v8bot: ryan[WIN]: [08:57] ryan[WIN]: darn. [08:58] ryan[WIN]: v8: function lol(){a=""; for(i=0;i<13;++i) a+='a'; return a; } lol() [08:58] v8bot: ryan[WIN]: "aaaaaaaaaaaaa" [08:58] ryan[WIN]: v8: function lol(){a=""; for(i=0;i<1024;++i) a+='a'; return a; } lol() [08:58] v8bot: ryan[WIN]: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [Output truncated...] [08:58] ryan[WIN]: therrrre we go [08:58] DoNaLd` has joined the channel [08:58] chapel: ryan[WIN] << you can do that in pm btw [08:59] ryan[WIN]: yes but it's almost 5am [08:59] ryan[WIN]: space madness has set in [08:59] teemow has joined the channel [09:00] dquestions has joined the channel [09:00] DoNaLd` has joined the channel [09:03] cefn has joined the channel [09:04] Anti-X: uhm [09:05] Anti-X: why don't you just pass the counter as an argument to lol() [09:05] Anti-X: saves time [09:05] Anti-X: max count rather [09:06] matjas has joined the channel [09:07] hellp has joined the channel [09:09] franck34: i'm using Math.random() in a function, to generate a sessionid [09:09] franck34: is it possible that Math.random() give the same result ?? [09:09] franck34: id: Math.floor(Math.random()*99999999999).toString() [09:09] franck34: seem's that sometimes yes [09:09] franck34: not always [09:10] franck34: let's add +timestamp .. [09:10] chapel: v8: Math.floor(Math.random()*99999999999).toString() [09:10] v8bot: chapel: "79507179767" [09:10] franck34: again [09:11] chapel: v8: Math.floor(Math.random()*99999999999).toString() [09:11] v8bot: chapel: "44324900419" [09:11] franck34: seem's ok [09:11] franck34: strange [09:11] chapel: the only way I could see it not making duplicates, is store them in a temporary db or something [09:11] chapel: ACTION doesn't know much about handling sessions [09:12] Tim_Smart: Math.random is pretty horrible apparently. [09:14] stride: franck34: "Don't build your own session id generator." is a pretty good rule for other web development languages :) [09:14] stride: for node, I think the connect session middleware has a decent algorithm for it [09:14] franck34: stride: i add a check of session.id not already taken [09:14] franck34: seem's ok [09:14] franck34: but hard to reproduce [09:15] Tim_Smart: Just make a sha1 of a randomly generate string. [09:15] Tim_Smart: *generated [09:16] Tim_Smart: + remote IP etc. [09:16] stride: that may be sufficient for the pure functionality of "this id belongs to this request" but session ids should normally satisfy stuff like good distribution & non-predictability [09:16] franck34: agree [09:17] Tim_Smart: crypto.createHash('sha1').update(request.remoteAddress + ':' + random_string).digest() [09:17] franck34: session.id in the chat sample on node.js is not efficient [09:17] Tim_Smart: Something like that should be fine. [09:17] Anti-X has joined the channel [09:17] franck34: Tim_Smart: in my case, got a reverse proxy in front of, so remoteAdress is the same. But i added another header clientIPAddress, can i get it using request.headers.clientIPAddress ? [09:18] Tim_Smart: yes. [09:18] franck34: thx [09:18] franck34: s/thx/thanks [09:18] franck34: lol [09:18] alexb_: Would be cool if in listener events you could listen for 2 events in the same add listener [09:19] alexb_: On('quit, start', function() {}) [09:20] Tim_Smart: alexb_: on('quit', 'start', fn) is more practical. [09:20] Tim_Smart: Or an array. [09:20] Tim_Smart: But probably not something for node core. [09:20] alexb_: Or just spaces if events can't have spaces [09:21] Tim_Smart: Events can be any string. [09:21] alexb_: Ah yep your way makes sense then [09:21] MikhX has joined the channel [09:24] stride: franck34: http://research.microsoft.com/pubs/64680/gm05.pdf&pli=1 this paper describes the algorithm used to generate session IDs in tomcat, although I'd suggest using sha1 and a better PRNG than Math.random (just like SecureRandom in Java) for implementing it in node [09:26] omarkj has joined the channel [09:27] aubergine has joined the channel [09:40] MikhX has joined the channel [09:41] caolanm has joined the channel [09:44] eric_f has left the channel [09:45] shouvik has joined the channel [09:48] shouvik: Hi people [09:48] Nohryb: v8: function f () { f() }() [09:48] v8bot: Nohryb: SyntaxError: Unexpected token ) [09:48] shouvik: Can I use node.js to sync my data objects on two different client browsers? [09:49] Nohryb: v8: (function f () { f() })() [09:49] v8bot: Nohryb: RangeError: Maximum call stack size exceeded [09:49] alexb_: How do you know they are the same computer [09:49] alexb_: Or is it user account? [09:50] shouvik: User account [09:50] shouvik: I actually am very new to node.js [09:50] shouvik: saw a couple of implementations [09:50] alexb_: Yes then [09:50] shouvik: So far only as chat client [09:50] shouvik: so I am wondering if I can use it to sync objects [09:50] alexb_: Yes [09:51] shouvik: Sweet, how about, over facebook? [09:51] alexb_: What does that mean? [09:51] shouvik: http://canvas.hpage.com [09:51] shouvik: I have this example [09:52] shouvik: I its a canvas, on which when u click on the red squares, the animate down [09:53] shouvik: Now what I would like to do is, when changes are reflected on one side, the other side should also see the changes [09:53] alexb_: Yep can do that [09:53] shouvik: I supposed creating accounts is possible via node.js? [09:53] alexb_: Anything is possible with node.js [09:53] shouvik: lol [09:53] shouvik: Thats reassuring [09:53] shouvik: :) [09:54] Tim_Smart: That still doesn't mean everything is sensible with node.js ;) [09:54] unhappyrobot has joined the channel [09:55] shouvik: Lol [09:55] alexb_: I'd like to see a web server for dummies in node.js though, something that is pretty inflexible so you cant get yourself into trouble but still lets you write in JavaScript [09:55] shouvik: So u have a better idea? [09:56] Tim_Smart: alexb_: That is what ruby on rails is for. [09:57] shadow_walker has joined the channel [09:57] derencius has joined the channel [09:57] alexb_: Yeah that's what i mean, but ruby on rails is just a framework for ruby, why cant JavaScript have an equal framework [09:58] Nohryb: v8: n= 0; try { (function f () { f(n++) })() } catch (e) { n= [e.message, n] } finally { n } [09:58] v8bot: Nohryb: ["Maximum call stack size exceeded", 8557] [09:58] Tim_Smart: alexb_: Well there are a few frameworks around. [09:58] Tim_Smart: alexb_: Try Geddy. [09:59] Nohryb: v8: n= 0; try { (function f () { n++; f(); })() } catch (e) { n= [e.message, n] } finally { n } [09:59] v8bot: Nohryb: ["Maximum call stack size exceeded", 16044] [10:00] chakrit has joined the channel [10:01] alexb_: Looks cool but doesn't have a lot of details on the server part of the project, ie handling the multiple core stuff [10:02] alexb_: Grasshopper sounds promising [10:02] Tobias| has joined the channel [10:03] ooooPsss has joined the channel [10:04] shouvik: having issues install node.js [10:04] Tim_Smart: v8: typeof NaN [10:04] v8bot: Tim_Smart: "number" [10:04] shouvik: any clue what packages to install [10:04] shouvik: for missing openssl? [10:04] hukl has joined the channel [10:04] Tobias|: How does node.js fare in regards to multiple [10:04] Tobias|: cores? [10:04] Uierth_ has joined the channel [10:04] shouvik: on ubuntu [10:05] path[l] has joined the channel [10:05] Tobias|: I would think that given node.js is event driven, threading would be hypersupermegaawesome [10:06] Tobias|: However, I can't find any claims on google to support my thoughts [10:06] alexb_: You do it yourself [10:07] shouvik: Sorry, solved the issue [10:07] shouvik: was missing libglobus-openssl-dev [10:08] Nohryb: typeof NaN -> 'number' ??? LOL [10:09] TobiasFar has joined the channel [10:09] sschuermann has joined the channel [10:09] Tim_Smart: Tobias|: Node.js will never have threading. [10:09] Tobias|: o_O [10:09] Tobias|: Maybe I'm asking the wrong question [10:09] Tim_Smart: It has support for child processes / workers. [10:09] aubergine_ has joined the channel [10:10] Tobias|: I was thinking along the lines of it handling events across several cores, as opposed to only upon one [10:10] Tobias|: *That* is possible, right? :o [10:10] Anti-X: Nohryb, just like null is an object [10:10] Tim_Smart: No. Unless you have several processes, Tobias|. [10:10] alexb_: Workers are always going to be new processes? [10:10] hukl has left the channel [10:10] Tim_Smart: Yup. [10:11] Nohryb: yeah, but it's not called "Not an Object" :-)) [10:12] matjas has joined the channel [10:12] aubergine has joined the channel [10:12] chakie_work has joined the channel [10:12] chakie_work: hi folks [10:13] chakie_work: we've been looking at perhaps use node.js for the very simple server backend for a multiplayer turnbased game [10:13] Anti-X: good choice [10:13] Tobias|: Can I use child processes to distribute event calls across several cores? [10:13] chakie_work: the code ought to be no issue, but does anyone know of a good place to host it? [10:14] Anti-X: any cloud [10:14] alexb_: Ec2 [10:14] Anti-X: rackspacecloud is cheaper [10:14] sth: EC2 is slow [10:14] chakie_work: we could rent an own server or a virtual image somewhere, but easier would be a hosting site [10:14] Tim_Smart: Tobias|: You will have to implement your own tool to distribute the events using IPC. [10:14] Tobias|: That's perfectly fine [10:14] chakie_work: hm, never looked at rackspace, will head there [10:14] Tobias|: As long as it's possible :) [10:15] Anti-X: their admin site is fairly slow, but the accounts themselves are awesome [10:15] alexb_: I like ec2 but i haven't shopped around [10:15] Anti-X: you'll need to set up everything from scratch though, but shouldn't be a problem if you know your way around linux [10:15] Tobias|: My only concern was that I'd end up using only 1/8th of the server's resources if I used node.js, which I now believe is a false concern :) [10:15] alexb_: For me developer time dwarfs hardware costs [10:16] Anti-X: why are you afraid of not using all of the server? :P [10:16] Anti-X: that's a Good Thing [10:16] Tim_Smart: Tobias|: You will generally run out of network before saturating 8 cores. [10:16] Tobias|: Ahaha [10:16] Anti-X: run out of network hehe [10:17] Tobias|: Probably :P [10:17] Anti-X: "the internet is full, please try again later" [10:17] Tim_Smart: Yeah, running out of network. Who would have thought? [10:17] Tobias|: Although there's only four cores with hyperthreading, and my concern was that I'd only be using one of those cores [10:17] Tobias|: Either way; all is good now :) [10:17] Tim_Smart: Anti-X: Well with IPv4, that could very well happen ;) [10:17] Tobias|: Node.js looks like a cool thing to get into [10:18] Anti-X: no worries, i'm sure your server would find a way to use those cores [10:18] mbrochh has joined the channel [10:18] mbrochh has joined the channel [10:18] Anti-X: although it would probably be like hiring a 400 seat train to get down the street [10:19] chapel: Tobias| << http://developer.yahoo.com/blogs/ydn/posts/2010/07/multicore_http_server_with_nodejs/ food for thought [10:19] Tobias|: Awesome; chapel :D [10:19] Tobias|: Thanks :) [10:19] Anti-X: food for thought? didn't anyone tell you to not feed the animals? [10:19] Tobias|: :< [10:20] chapel: girl talk told me to do it [10:20] Tobias|: "Until node-v0.1.98, the best practice for utilizing multiple cores was to start up a separate NodeJS processes per core, each running an HTTP server bound to a different port" [10:20] Tobias|: Oh, ew :o [10:20] Tobias|: That would have been uncool [10:21] Jonasbn_ has joined the channel [10:22] chakie_work: rackspacecloud looks interesting, but it's quite unclear what you actually can run on them [10:22] Anti-X: you can run anything [10:23] Tim_Smart: Tobias|: It isn't much different to how we do things now. [10:24] chakie_work: Anti-X, the only mention they have about running anything is stuff done with some "cloud server api" [10:24] Anti-X: ah no [10:24] Anti-X: that's just so you can alter your accounts programmatically [10:24] Anti-X: set up new servers, etc [10:24] chakie_work: and that api looks like rubbish [10:24] chakie_work: aha [10:25] chakie_work: ok, looks like something to look more seriously at then [10:25] Anti-X: chakie_work you're given a shell, and it installs some *nix (debian, fedora, centos, red hat, freebsd. whatever.. it's a long list to choose from) for you, and then you can install whatever you want from there.. you're given root access to that instance [10:25] Anti-X: not sure how it works behind the scenes, but i imagine maybe some sort of partitioning [10:26] chakie_work: Anti-X: ack. i misunderstood it then. thanks for clarifying [10:27] Anti-X: i was totally green about what cloud really was until i actually got it working and then it was eureka! [10:27] chakie_work: :) [10:28] Tim_Smart: Still, not as nice as dedicated :p [10:28] Anti-X: true [10:28] Anti-X: but way cheaper [10:28] Anti-X: :p [10:28] Anti-X: two orders of magnitude cheaper [10:29] Anti-X: depending on traffic [10:30] alexb_: How much cheaper is rackspace than amazon [10:30] Anti-X: estimated monthly cost for me, on amazon was $70 for a really basic setup [10:31] Anti-X: and that was before traffic i think [10:31] Anti-X: or until 1gb [10:31] Anti-X: basic cost on rackspace including 1 gb traffic was <$15 [10:31] alexb_: Equivilant hardware? [10:31] Anti-X: slightly less memory [10:31] Anti-X: but not much [10:32] Tim_Smart: Or if you don't care for API's and stuff, just go to prgmr :p [10:32] alexb_: I like the Apis even though I don't use them a ton [10:32] alexb_: I also like s3 [10:34] Tim_Smart: Apparently linode is pretty good as well. [10:34] Anti-X: ooh prgmr was cheap! [10:35] Anti-X: and finally someone who realizes you probably don't need 10GB space with 64 MB ram [10:35] alexb_: I'm on reserved on amazon until next year so cant switch anyways :/ [10:36] Anti-X: they lured you in with their corporate deals, eh? [10:36] sideshowcoder has joined the channel [10:37] alexb_: Its a lot cheaper and I'm pretty happy with amazon so far [10:37] Anti-X: lol @ prgmr... their smalles package has 1.5 GB, and an asterisk: *Note, the OS install will consume 1-2GiB of this space, including a 512M swap file. The CentOS image is the largest, at about 1.4GiB. [10:38] Anti-X: leaving you with a healthy 100 mb [10:38] freeall has joined the channel [10:38] Tim_Smart: 64M of RAM is tiny though. [10:38] zomgbie has joined the channel [10:38] Anti-X: nice enough to start with during the 6 months you're developing and never quite getting to finish it [10:39] Anti-X: :P [10:39] Tim_Smart: I'm sure debian or ubuntu would give you a couple 100 mb extra :) [10:39] Anti-X: what's the command to check disk space? [10:39] stride: df -h [10:40] tpryme: shouvik: Take a look at dnode for syncing objects - http://github.com/substack/dnode [10:40] Anti-X: now is when you tell me some evil command [10:40] Tim_Smart: rm -rf /? [10:40] Tim_Smart: Worked for me. [10:40] Anti-X: hehe [10:40] Anti-X: too used [10:40] caolanm: Tim_Smart: I had to use sudo [10:40] Tim_Smart: You have to run as root though... [10:42] shadow_walker has joined the channel [10:42] Anti-X: debian+node takes 545 mb [10:43] rubyphunk has joined the channel [10:43] Anti-X: on my thing, that is [10:43] Tim_Smart: + 512 mb swap file... [10:44] Anti-X: not included apparently [10:45] Athox has joined the channel [10:46] agnat has joined the channel [10:51] rubyphunk_ has joined the channel [10:52] rubyphunk has joined the channel [10:59] Tobias|: http://dev.pastebin.it/63m0pp/raw/17543 [10:59] Tobias|: Is there a reason why the JS in this instance would be 20x slower than the PHP? [11:00] Tim_Smart: Tobias|: First s/sendHeader/writeHead/ [11:00] Tobias|: Not making sense to me; would have thought that the PHP + Apache in this instance would have been waaay slower [11:00] Tim_Smart: And second, PHP doesn't write to socket every echo :) [11:01] Tobias|: I see [11:01] Tobias|: One sec [11:01] ctp has joined the channel [11:01] Tim_Smart: Make sure you put an 'var' in front of your 'i' declaration. [11:05] Anti-X: deafonetically [11:05] Anti-X: doesn't node give a warning on that? [11:05] Tim_Smart: Tobias|: Are you using an old node version or something? [11:05] Tim_Smart: I haven't seen response.close() in a long time. [11:05] Anti-X: it should spew out messages "inexplicit global variable declaration" [11:06] Tobias|: Using an old example for an apparent tutorial on the internet; sorry :< [11:06] Tobias|: ACTION supposes it would now be prudent to ask if you knew of any good node.js tutorials [11:06] fermion has joined the channel [11:06] sveimac has joined the channel [11:06] Anti-X: they're all mostly outdated [11:06] Anti-X: funnily enough [11:06] Anti-X: unless you look at places like nodejitsu and howtonode [11:07] eee_c has joined the channel [11:07] Anti-X: not exactly tutorials i think, but at least lots of code snippets [11:07] Tobias|: Aha, Tim_Smart [11:08] Tobias|: Concatenating everything to an output buffer variable speeds things up dramatically [11:08] Tobias|: Not sure if that's the cleanest way to go about it [11:08] rubyphunk has joined the channel [11:08] Tobias|: But it definitely speeds it up [11:09] Tobias|: 1/4th PHP's speed atm; wondering how this can be sped up further [11:10] Tim_Smart: Tobias|: https://gist.github.com/1b75dfd3ec0dcc6b1e1c [11:10] Tim_Smart: Doing something similar? [11:11] Tobias|: Hm.. [11:11] Tobias|: At the moment I'm doing body = body + 'Hello world!\n' [11:11] Tobias|: Perhaps that's slower [11:12] Tobias|: I don't do JS -- yet :) [11:13] nsm has joined the channel [11:13] Tobias|: About the same speed [11:13] Tobias|: Don't think there's any difference there, as it is [11:13] Tim_Smart: How are you testing this? [11:13] zorzar has joined the channel [11:13] Tim_Smart: ab -n 1000 -c 100 or something? [11:14] sschuermann has joined the channel [11:16] Tobias|: Yes [11:16] Tobias|: Along those lines [11:17] Tobias|: This is on a single-core EEE 701 900MHz at the moment, however [11:17] Tobias|: So the stuff I mentioned earlier pertaining to multiple cores is irrelevant [11:20] Tobias|: I am using APC to cache PHP's bytecode; that could be affecting things. However, I certainly will be using that when this project ends up in production, so disabling it would be unfair [11:21] Tim_Smart: Sure. I'm just installing apache now to run a test. [11:26] SubStack: bwahaha I am coming up with stumpers to derail isaacs's flow control talk already [11:27] Tim_Smart: Flow control is a pretty generic topic. [11:28] Tobias|: http://dev.pastebin.it/q3pbpy/raw/17544 [11:29] Tobias|: Can shave off a couple of ms from the PHP with that, widening the gap [11:31] Tobias|: ACTION is thoroughly baffled [11:32] Anti-X: bafflified [11:33] Anti-X has joined the channel [11:35] margle: Tobias|: what are you attempting? [11:35] Max-Might has joined the channel [11:36] Tim_Smart: Tobias|: Ah yes. The old writing strings to socket problem. [11:36] Tobias|: Outputting 'Hello world!\n' 10,000 times then dumping it on the browser [11:36] Tobias|: Hm, Tim_Smart? :o [11:36] Tim_Smart: If you cache the output of the loop to a buffer, then write the buffer, it will be faster. [11:37] Tobias|: That's what I -am- doing :P [11:37] Tobias|: I'm putting it all in a variable then outputting the variable [11:37] Tobias|: (In JS, that is) [11:37] Tim_Smart: Nope. You are creating a string for each request. [11:38] Tobias|: I'm doing that with PHP too [11:38] Tim_Smart: Instead of a binary buffer. [11:38] Tim_Smart: Yes, but v8 strings are slow. [11:38] Tim_Smart: Fast to allocate, but slow to write to socket. [11:39] Tobias|: Wait; so how do I speed this up? [11:40] margle: Tobias|: check out the buffer stuff in nodes docs. [11:40] Tim_Smart: margle: That will make it slower, as buffer creation is expensive. [11:40] Tim_Smart: net.js already optimizes as much as possible string -> buffer conversion. [11:41] margle: aaah [11:41] mpavel has joined the channel [11:42] tpryme has left the channel [11:43] Tobias|: huh. [11:43] Tim_Smart: Tobias|: Try this: https://gist.github.com/1b75dfd3ec0dcc6b1e1c [11:43] Tobias|: Basically, doesn't this translate to NodeJS being slower than PHP for a large amount of tasks? o.O [11:43] Tobias|: *tries* [11:43] dnolen has joined the channel [11:44] Tim_Smart: Tobias|: Because node.js is a persistent process, you would never write code like that. [11:44] Tim_Smart: You could cache the output of the loop on app start up, put it in a buffer, then write that on every request. [11:45] kkaefer: Tim_Smart: that new code doesn't use the variable string [11:45] Tobias|: Seems much faster [11:45] Tim_Smart: It uses the variable 'buffer' [11:45] kkaefer: ah, true [11:45] kkaefer: but it still calculates body on each request [11:46] Tobias|: That's fine; kkaefer [11:46] Tobias|: 2-3 times faster than PHP now :) [11:46] Tim_Smart: kkaefer: Yeah, just to be fair to the PHP code [11:46] Tim_Smart: But PHP is much better at templating than node. [11:46] Tim_Smart: For the reason that strings are slow. [11:47] mpavel_ has joined the channel [11:47] charlenopires has joined the channel [11:47] aliem has joined the channel [11:51] stepheneb has joined the channel [11:52] Tobias|: Hm.. [11:52] Tobias|: ACTION needs to now consider if HPHP or node.js is faster [11:52] Tobias|: In regards to my application. Perhaps I'll just write it with both; could be fun [11:53] mpavel_: i have a project idea and need some references for learning node.js - i need to send updates to all clients connected to the server when one of the clients makes an update [11:54] mpavel_: i've been looking through the website and different resources, but couldn't really find anything usefull yet, any suggestions? [11:54] chapel: well Tobias| [11:54] chapel: what is your application? [11:54] chapel: speed really depends honestly [11:54] rasztasd has joined the channel [11:55] chapel: sometimes pure node.js vs php isn't the best comparison, since there are so many choices about how to do things [11:55] rasztasd: hi are there refactoring tools for node.js? [11:55] Tobias|: That's primarily my justification for considering writing it in both, then benchmarking the two [11:56] rasztasd: or a lint tool for node.js? [11:56] Tobias|: the only true thing that matters is that bottom line [11:56] skohorn has joined the channel [11:56] chapel: uhh rasztasd as far as I know, lint should work for node.js code, don't need a node specific linter [11:57] chapel: well what is your app, you can be generic [11:57] Tobias|: Is it commonplace to use memcached with node.js? [11:57] Tobias|: Or better to just assign variables? [11:57] chapel: well, its not unheard of [11:57] mikew3c has joined the channel [11:57] rasztasd: i haven't worked with node.js so far, but i want to know that is it possible to build a robust application [11:57] chapel: but if you want an in memory cache I would recommend redis [11:58] rasztasd: for me robust means [11:58] rasztasd: i can do at least some of the followings: unit test, refactoring, lint [11:58] rasztasd: i think jslint is fine [11:58] chapel: I am no expert on redis by any means, maybe Tim_Smart can answer that [11:58] chapel: you mean, use node.js to do those? [11:58] Tim_Smart: redis <3 [11:58] chapel: :) [11:58] Tobias|: Why redis over memcached? [11:58] chapel: didnt you write node-redis? [11:59] Tim_Smart: Yeah. [11:59] chapel: :P [11:59] Tim_Smart: I just added request pipe-lining. [11:59] chapel: I saw the benchmark earlier [11:59] Tim_Smart: Oh nice. [11:59] chapel: earlier being like yesterday I dont remember what time [11:59] Tim_Smart: Did I post it in this channel? [12:00] chapel: yeah [12:00] chapel: you compared node-redis node.redis redis-node and another one [12:01] anomalyinc has joined the channel [12:02] chapel: Tobias| << The basics: take memcached and add a disk backing, replication, virtual memory, and some cool additional data structures. Hashes, lists, sets, sorting, joining, transactions, yay! [12:02] chapel: http://systoilet.wordpress.com/2010/08/09/redis-vs-memcached/ [12:02] Tobias|: Disk backing? [12:02] chapel: not vetting that article [12:02] chapel: just a quick google search and copy page [12:02] chapel: paste [12:03] Tobias|: uh, chapel [12:03] Tobias|: Not the best article from your side of the argument [12:03] Tobias|: "After crunching all of these numbers and screwing around with the annoying intricacies of OpenOffice, I’m giving Redis a big thumbs down. My initial sexual arousal from the feature list is long gone." [12:03] Tobias|: :P [12:03] chapel: heh [12:03] chapel: again not vetting it, the comment still stands [12:03] chapel: that I pasted in here [12:04] chapel: but I am not that knowledgeable about redis tbh [12:05] drudge: good morning [12:05] chapel: hola Draggor [12:05] chapel: bah [12:05] chapel: fuck it [12:05] chapel: drudge [12:05] chapel: too many people [12:05] Tim_Smart: Tobias|: He obviously had a horrible redis setup. [12:05] Tim_Smart: Or his machine was utter crap ;) [12:06] Tobias|: Link contradicting benchmarks? :p [12:06] chapel: drudge, make linkinus tab complete recent speakers first [12:06] drudge: it's in there [12:06] chapel: :) [12:06] chapel: <3 [12:06] drudge: under Preferences > Keyboard [12:06] chapel: uhh, I have that checked [12:07] chapel: bleh this isn't linkinus support chan :P [12:08] okuryu has joined the channel [12:11] Tim_Smart: Tobias|: http://antirez.com/post/redis-memcached-benchmark.html http://www.ruturaj.net/redis-memcached-tokyo-tyrant-mysql-comparison [12:16] Nohryb has joined the channel [12:18] beawesomeinstead has joined the channel [12:18] meatmanek_ has joined the channel [12:18] MikhX has joined the channel [12:19] svnlto has joined the channel [12:19] mbrochh has joined the channel [12:21] Gruni has joined the channel [12:25] JohnDav has joined the channel [12:25] JohnDav: http://gist.github.com/642990 [12:25] JohnDav: getting this alot [12:25] JohnDav: im on 0.3.0 [12:26] kriszyp has joined the channel [12:28] mikew3c_ has joined the channel [12:31] Tobias|: That's interesting [12:31] svnlto has joined the channel [12:31] Tobias|: Node.js seems slower at doing calculations than PHP, too? [12:32] chapel: depends on what you are doing I would think [12:32] Tobias|: Either addition or multiplication of large numbers [12:32] quag has joined the channel [12:33] chapel: well time it [12:33] chapel: should be simple to do [12:33] Tobias|: I have been :P [12:33] chapel: inside or using ab? [12:33] Tobias|: ab [12:34] murphy has joined the channel [12:34] Tobias|: only one at a time, however [12:34] Tobias|: For ten trials [12:34] chapel: thats not the best way to test how long it takes [12:34] chapel: as you saw, how you order your operations and deal with things in node matters [12:35] chapel: put timestamps and compare the difference in seconds and microseconds [12:36] Tim_Smart: PHP is horribly slower at math here. [12:36] Tobias|: Although [12:37] Tobias|: Credit goes to node JS for operating with larger numbers [12:37] JohnDav: anyone got an idea about net.js assertion error? [12:37] Tim_Smart: (Doing a simple 1000 * 1000 / 1000, 1,000,000 times) [12:37] Tobias|: PHP just gives up after a while [12:37] Tim_Smart: JohnDav: No sorry. I have never got it before :) [12:38] JohnDav: Tim_Smart: Everything else seems to be super stable. If only I could somehow debug this assertion error [12:38] Tobias|: What about string operations in Node.js? Are those faster? [12:38] Tobias|: Hm.. [12:38] JohnDav: Im testing on a chat service with over a million monthly users [12:39] Tobias|: Maybe I'll concat hello world a few thousand times in both to see [12:39] Tim_Smart: Tobias|: Try this: https://gist.github.com/b7b1a6fbff58820f20c3 [12:40] JohnDav: this is what i get http://gist.github.com/642990 [12:40] Tim_Smart: JohnDav: Can't comment without seeing the code that causes it. [12:40] jetienne has joined the channel [12:42] margle: does anyone else have to launch the simulator twice from titanium? [12:42] margle: er [12:42] margle: wrong channel [12:42] gJ|Alex has joined the channel [12:43] Tobias|: Aha [12:43] Tobias|: I see [12:43] Tobias|: My previous benchmark *was* wrong [12:43] Tobias|: Node.js is faster at maths :) [12:43] Tobias|: Thanks for correcting me [12:43] Tobias|: Node.js also appears to be faster at concatenating strings [12:43] Tobias|: Upwards of 3x faster [12:43] Tobias|: That's cool [12:44] Tobias|: Very cool [12:44] Tim_Smart: Tobias|: Node.js would have been faster at your first benchmark if large strings weren't so slow. [12:44] Tim_Smart: If you did 'i < 100' you would see node.js overtake PHP as an example. [12:44] Tobias|: And I imagine if I use an output buffer in PHP for gzip compression, they'll become more equal in tha tregard [12:44] Tobias|: that* [12:45] drew has joined the channel [12:45] Tobias|: Maybe node.js is my solution [12:45] Anti-X has joined the channel [12:45] Tobias|: To be fair, HPHP would be significantly faster than PHP [12:46] Tobias|: So I'll have to compare it with that some time too [12:46] Tim_Smart: HPHP being hip-hop PHP? [12:46] Tobias|: HiPHoP [12:46] Tobias|: Yes [12:46] Anti-X: facepalm-php [12:46] Guest19215: anybody familiar with building nodejs on cygwin? I'm getting task failed {task: cc ev.c -> ev_1.o} [12:46] Tim_Smart: Well that is almost as fast as writing directly in C++... [12:47] Tobias|: Not quite [12:47] Tobias|: HipHop slows some things down dramatically [12:47] Tobias|: And even then, you have lighttpd/apache/nginx sitting inbetween the request and the script [12:47] Anti-X: lyk tiem!?!? [12:47] Tim_Smart: Tobias|: The thing is, Node.js didn't expect to be faster at computation, it strives at async io. E.g. database calls etc. [12:48] Tobias|: I'll need to check into those; too [12:49] Tobias|: On the whole, though, node.js is pretty damned cool :) [12:49] Tobias|: I like the concept of it [12:49] Tim_Smart: Yeah I just wish large strings were faster >.> [12:49] Tobias|: I'm thinking I might use it anyway just for that sake [12:49] Tobias|: hehe [12:50] malkomalko has joined the channel [12:52] jtsnow has joined the channel [12:52] Tobias|: I suppose given the nature of this that it's possible to share client/server side libraries? Not for anything dramatic, just a type of encoding [12:52] Gruni has joined the channel [12:52] rubyphunk has joined the channel [12:55] mraleph: Tobias|: there is a trick behind concatenation in V8. when you concatenate two strings a+b it does not really allocate a new string a copy all characters to it. instead it creates something called ConsString which just has pointers to a and b. [12:55] gJ|Alex has joined the channel [12:56] mraleph: it makes concatenation blazingly fast but this speedup comes with a price. [12:56] Tobias|: What I was testing was.. [12:56] Tobias|: var j = ''; for (var i = 1; i <= 1000000; i++) { j += 'hello world'; } [12:57] chapel: Tobias| << out of curiosity, what are you looking to build, you dont have to be too descriptive, but just a general idea of what type of app or functions you will be doing [12:57] Tobias|: Does this mean, however, that if I need to concatenate strings I'll need to clone the variables first? [12:57] chapel: v8: var j = ''; for (var i = 1; i <= 1000000; i++) { j += 'hello world'; } [12:57] v8bot: chapel: Error: Timeout [12:57] chapel: v8: var j = ''; for (var i = 1; i <= 10; i++) { j += 'hello world'; } [12:57] v8bot: chapel: "hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world" [12:57] Tobias|: Something which receives post data, gets a few hundred results from a DB, encodes that data, sends it back to the client [12:57] Tobias|: A few hundred times/second [12:57] Tim_Smart: Tobias|: https://gist.github.com/8da80b8a4499d4079364 [12:57] Tim_Smart: Which one is faster? [12:58] chapel: encodes? [12:58] mraleph: Tobias|: no. this optimization works transparently. [12:58] aubergine_ has joined the channel [12:58] Tobias|: Encodes [12:58] stride: JohnDav: you're the third reporting that assertion error, seems like a problem in the current master branch. I guess you should open an issue if nobody did that already [12:58] Tobias|: Something not too unlike serialize [12:58] chapel: like json encode? [12:58] Tobias|: Tim_Smart, your benchmark is flawed [12:59] Tobias|: echo("Done."); should be echo($body); [12:59] Tim_Smart: Heh it is too. [12:59] Tobias|: Similar, chapel [12:59] chapel: Tobias| << well you should look into couchdb [12:59] chapel: you can have couchdb be the 'server' [12:59] chapel: if you will [13:00] Tim_Smart: Tobias|: Doesn't seem to change anything. [13:00] chapel: and if you need backend stuff like processing, external api stuff, node.js is great for that [13:00] JohnDav: stride: i did already [13:00] JohnDav: 2 - 3 days back [13:00] Tobias|: Just making it a fair test; Tim_Smart. With your JS, you're outputting all of the Hello World!'s, but you weren't with your PHP [13:00] mraleph: if you first concatenate huuuge string and then flush it to a node.js buffer that might be a bit slow. but I am not sure. [13:00] JohnDav: btw, I'm using socket.io latest over node 0.3.0 [13:00] chapel: but with couchdb couchapps, you can send your data from the db in whatever format you want [13:01] chapel: well, html/xml/json/if you can make it [13:02] Gruni has joined the channel [13:02] Tobias|: Phew; lots of stuff I'm going to be delving into :) [13:02] Tobias|: will look into it, chapel :) [13:04] chapel: check out the couchdb + nodejs talk from jsconf eu [13:04] chapel: 2010 [13:04] chapel: he touches on couch apps a little [13:04] chapel: inspired me [13:04] chapel: :) [13:04] chapel: okay afk zzz [13:05] stride: Tim_Smart: that += is .= in your php code [13:06] stride: ab with n1000 c50 gives me 39ms (node) to 43ms (php) with the php code changed to the same behaviour as the node code [13:06] papyromancer has joined the channel [13:06] Tim_Smart: Yeah similar here. [13:07] Tim_Smart: 1600 req/s to 2100 req/s, node being the later. [13:07] Tim_Smart: But as the strings get larger, node slows down a lot. [13:08] Tim_Smart: V8 wasn't design with servers in mind ;) [13:08] Tim_Smart: *designed [13:08] stride: hm, seems like node just froze with n10000 c100 (no ulimit changed on the machine) :/ [13:08] skm_ has joined the channel [13:08] braddunbar has joined the channel [13:08] Tim_Smart: Hmm. I always test with c100 [13:08] SubStack: pow, now you can line-buffer on arbitrary streams with lazy [13:09] Tim_Smart: It seems ab breaks on c200 [13:09] sivy has joined the channel [13:09] tapwater has joined the channel [13:09] SubStack: just Lazy(em).lines.forEach(function (line) { /* ... */ }) // ! [13:10] ntelford has joined the channel [13:10] stride: Tim_Smart: c200 works on the php version here (although it obviously gets awfully slow) [13:10] chapel: you know what would be the true test, setup a websocket and stream in the results of the for loop as it happens, or chunked whatever, and then try to do the same with php. lol [13:10] stride: Tim_Smart: tried to adjust the timeout? [13:11] Tim_Smart: stride: ab just hangs on both php and node for about 3-9 seconds. [13:11] Tim_Smart: (On the last 1-3 requests) [13:11] ehaas has joined the channel [13:11] leeeb has joined the channel [13:12] stride: oh, right [13:13] papyromancer has joined the channel [13:14] mraleph: Tim_Smart: it is hard to make string operations equally efficient in all cases. In a sense V8 was optimized for common browser-side patterns. Rule of thumb is to avoid building huge strings especially if you do not plan to use them as strings. Build output inside buffer or something like that. [13:14] TomsB has joined the channel [13:15] Tim_Smart: mraleph: Yeah I'm aware of that. But what about large templates that changes on every request? [13:15] Tim_Smart: change* [13:16] Tobias|: "V8 increases performance by compiling JavaScript to native machine code before executing it, rather than to a bytecode or interpreting it. Further performance increases were achieved by employing optimization techniques such as inline caching. With these features, JavaScript applications running within V8 have an effective speed comparable to a compiled binary.[4]" [13:16] Tobias|: Hold on [13:16] Tobias|: Doesn't that mean it should be at near parity with HPHP? [13:16] Tim_Smart: Tobias|: Close, yes. [13:17] Tobias|: huh. [13:17] Gruni has joined the channel [13:17] Tim_Smart: Not quite as fast probably. [13:17] mraleph: Tim_Smart: I am pretty sure one can build an efficient templating engine just by avoiding using string as an accumulator. [13:18] Tim_Smart: mraleph: strings are pretty fast when manipulating them, it is just writing them to socket that is slow. [13:18] davidsklar has joined the channel [13:18] malkomalko: anyone do nod tests where they need to stub out something in the request? I can't figure out a proper way to do it [13:18] Tim_Smart: ryah_ is playing with a patch that directly gets the pointer to the data, and writes it to socket. [13:19] Tobias|: Back in a bit :) [13:19] aubergine has joined the channel [13:19] Tim_Smart: Until then, it has to go through a lot of machinery before it can be written. [13:19] jetienne_ has joined the channel [13:20] mraleph: Tim_Smart: yes. that is why I said that it is necessary to avoid building strings that are just going to be flushed into socket. [13:21] shripadk has joined the channel [13:21] Tim_Smart: mraleph: Yes, so the only other alternative is to cache the un-changing parts of the template as buffers, and perform multiple write calls. [13:21] nerdEd has joined the channel [13:22] Tim_Smart: Which is annoying, but a limitation we have to work around for the time being. [13:22] mraleph: Tim_Smart: but there also some other problems there. for example string in cons-form can occupy more space in memory than flat-form string. it also pressures GC to traverse cons-form string. [13:22] shripadk: anyone got node-msgpack http://github.com/pgriess/node-msgpack to build successfully? [13:23] mraleph: but that matters only for huuuuge cons-strings [13:24] jherdman has joined the channel [13:27] femtoo has joined the channel [13:28] kkaefer: what's the easiest way to write a full-screen cli app? [13:28] kkaefer: i.e. one that covers the entire console (window) [13:28] kkaefer: but upon exit, clears everything [13:28] kkaefer: like, for example, a text editor [13:29] Kami_: kkaefer, curses [13:30] beppu: http://github.com/mscdex/node-ncurses [13:30] kkaefer: ah, looks good [13:30] kkaefer: thanks Kami_ [13:30] mbrochh has joined the channel [13:31] Tim_Smart: mraleph: Hmm cons-strings are indeed a lot slower to write. [13:31] Tim_Smart: Does string += another; and string = string + another; do the same thing? [13:32] dnolen has joined the channel [13:32] Kami_: kkaefer, np. there is also a urwid library which makes constructing cli apps a bit more easier but it's for python :p [13:33] mwilliams_ has joined the channel [13:33] boaz has joined the channel [13:33] mraleph: Tim_Smart: that is expected. when you start reading (=copying to socket) cons-string V8 flattens it => this essentially leads to unnecessary allocation and copying. unnecessary because you are going to throw it out after writing. [13:34] mraleph: Tim_Smart: yes x += y; is equivalent to x = x + y. [13:34] Tim_Smart: Hmm if you could somehow side step cons-strings... [13:35] mraleph: Tim_Smart: ouch. I made a mistake. [13:36] necrodearia has joined the channel [13:36] mraleph: Tim_Smart: if you use API v8::String::Write it does not necessary flatten it. [13:37] necrodearia has joined the channel [13:37] mbrochh has joined the channel [13:37] mraleph: Tim_Smart: it always flattens if you access string chars from JS (e.g. with charCodeAt) [13:37] necrodearia has joined the channel [13:38] evanpro has joined the channel [13:39] Tim_Smart: I wonder how that compares to *String::Utf8Value(string); [13:39] ryanfitz has joined the channel [13:40] Gruni has joined the channel [13:40] mraleph: Tim_Smart: as far as I see from sources that would lead to copying to separate buffer without flattening. [13:41] zomgbie has joined the channel [13:41] mAritz: do you guys have a regex for normal strings? (like i want characters that are normally used in languages but no funky control characters or other weird utf-8 symbols that have no place in things like names, adresses, etc (smilies and such)) [13:41] Anti-X has joined the channel [13:42] stepheneb has joined the channel [13:42] mraleph: Tim_Smart: if you do *String::Utf8Value(string) only to flush result to socket this leads to some unnecessary copying. [13:42] Tim_Smart: Yeah. [13:42] Akufen has joined the channel [13:42] Akufen has joined the channel [13:42] keyvan has joined the channel [13:43] rauchg_ has joined the channel [13:45] mraleph: hopefully ryah_ patch will eliminate this overheads. you just kinda flatten cons-string directly to socket or something like that. [13:46] Tim_Smart: Hmm I haven't looked at the source yet, but how would String::NewExternal compare to our current buffer implementation? [13:46] Jonasbn_ has joined the channel [13:46] svnlto has joined the channel [13:47] Tim_Smart: I don't think it would differ too much. [13:48] mAritz: Tim_Smart: hey, how does biggie-orm handle unique check race-conditions? [13:48] svnlto has joined the channel [13:48] mraleph: Tim_Smart: external strings are immutable objects AFAIK [13:49] CrabDude has joined the channel [13:49] aheckmann has joined the channel [13:49] mraleph: Tim_Smart: thats the main difference with buffers which are mutable. [13:49] danoyoung has joined the channel [13:49] crohr has joined the channel [13:50] jetienne_ has joined the channel [13:50] Gruni has joined the channel [13:51] gJ|Alex has joined the channel [13:51] Tim_Smart: mAritz: Probably not very well. [13:52] Tim_Smart: If you are running in only one process, it will be fine though. [13:52] Tim_Smart: Actually, not sure on that one. [13:52] mAritz: nah, multiple processes :/ [13:53] mAritz: any chance you could implement it? [13:53] CrabDude has joined the channel [13:54] janua has joined the channel [13:54] necrodearia has joined the channel [13:54] janua has left the channel [13:55] Tim_Smart: Not anytime soon. [13:55] hellp has joined the channel [13:56] mAritz: :/ [13:56] omarkj has joined the channel [13:56] shripadk: compiled... never mind.. :P [13:57] Anti-X: yay got an interview for a node job [13:58] Anti-X: tell me the magic phrase that lands me the job :p [13:58] mAritz: "I'm sleeping with ryan and can make him implement anything we want." (works better if you're female, i guess.) [13:58] Tim_Smart: Scalable, high performance, HTML5, concurrent web app. [13:59] Tim_Smart: Just concat every awesome word together. [13:59] Tim_Smart: Hopefully it makes a awesome sentence. [14:00] margle: Anti-X: I would build stuff you can show them? [14:00] Anti-X has joined the channel [14:01] omarkj has joined the channel [14:01] matt_c has joined the channel [14:02] unomi has joined the channel [14:03] bradleymeck has joined the channel [14:05] Tim_Smart: mAritz: I mean I could do a setnx, but that has race conditions as well. [14:05] Tim_Smart: And it gets complicated fast. [14:05] mAritz: setnx is atomic?! [14:05] Tim_Smart: Yeah, but say you were half way through a save and it fails. [14:06] mAritz: Tim_Smart: yeah, my nohm solution is pretty fucked up. but it works. [14:06] Tim_Smart: Then you are left with hanging values you don't want. Which you then need to clean up. [14:07] Tim_Smart: And if the database drops out, you are screwed ;) [14:07] mAritz: okay, that would be a problem. but under what weird conditions would a save fail? and the worst that would happen is a blocked unique. (the corrupted save is more of a problem, isn't it?!) [14:09] aubergine has joined the channel [14:09] daglees has joined the channel [14:09] hoeru has joined the channel [14:09] mAritz: but seriously: uniques with race-conditions are a bit of a problem, don't you think? [14:10] Tim_Smart: I know I haven't finished uniques yet, it is on my todo list. [14:10] Tim_Smart: There are a few other things higher on that list though. [14:11] Tim_Smart: Before I do a release anyway. [14:11] jamescarr_ has joined the channel [14:11] aubergine has joined the channel [14:11] steadicat has joined the channel [14:11] evanpro has joined the channel [14:12] Uierth_ has joined the channel [14:12] ceej has joined the channel [14:12] rwaldron has joined the channel [14:13] Tim_Smart: Currently uniques are just using the standard 'index' paradigm. They should be using a hash. [14:13] skm_ has joined the channel [14:13] Tim_Smart: But first I want to get associations working correctly. [14:13] oal has joined the channel [14:14] noahcampbell has joined the channel [14:16] davidwalsh has joined the channel [14:18] dylang has joined the channel [14:19] mbrochh has joined the channel [14:20] cferris has joined the channel [14:21] Tim_Smart: mAritz: There is only one way around this, which is atomic transactions. That will take a bit of work to migrate. [14:22] Tim_Smart: I.e. WATCH + MULTI + EXEC. Meaning the entire save will fail if a key has changed. [14:23] jamescarr_: I could have sworn that nodejs had a method in fs module to copy files? [14:23] Tim_Smart: jamescarr_: readFile + writeFile = copy ;) [14:24] jamescarr_: :-P [14:24] jamescarr_: that doesnt work well for a full dir though does it? :) [14:24] jamescarr_: thats fine I suppose.. I'll just create a process to cp and copy [14:24] caolanm: use child_process to spawn 'cp -r' ;) [14:24] caolanm: ACTION is lazy [14:27] jamescarr_: I like that sys has become util, but... [14:27] TomY has joined the channel [14:27] yhahn has joined the channel [14:27] jamescarr_: it still feels like the module name is a "catch all" :S [14:27] evanpro has joined the channel [14:27] Anti-X: it is [14:27] jamescarr_: pump feels more like something to go in an io module [14:29] Anti-X: everything in sys is sort of io [14:29] ben_alman has joined the channel [14:29] Anti-X: except maybe inspect [14:31] yviktorov has joined the channel [14:31] Anti-X: which still is formatting the result for output [14:31] figital has joined the channel [14:33] Ari-Ugwu has joined the channel [14:34] Max-Might has joined the channel [14:36] mikew3c_ has joined the channel [14:37] shripadk: how do i store JSON with circular references in redis? I cannot JSON.stringify.. Is there any other way to store the JSON? [14:38] masahiroh has joined the channel [14:38] bradleymeck has joined the channel [14:38] dnolen has joined the channel [14:39] softdrink has joined the channel [14:39] TobiasFar has joined the channel [14:39] heavysixer has joined the channel [14:40] johngbrooks has joined the channel [14:41] noahcampbell has joined the channel [14:41] EyePulp has joined the channel [14:41] hellp has joined the channel [14:42] scnd has joined the channel [14:43] isufy has joined the channel [14:44] mikew3c has joined the channel [14:45] nuba_: vz [14:45] gerred has joined the channel [14:45] pquerna: ryah_: har har har; a hearty laugh to the autoconf branch merged, and first thread on it suggests the rest of the auto* world : [14:45] pquerna: :D [14:46] almaisan-away has joined the channel [14:49] Athox has joined the channel [14:51] ajpiano has joined the channel [14:53] Jonasbn_ has joined the channel [14:53] TomY_ has joined the channel [14:55] Twelve-60 has joined the channel [14:56] kriszyp_ has joined the channel [14:57] jtsnow_ has joined the channel [14:58] joshthecoder has joined the channel [15:00] isufy has joined the channel [15:00] nuba has joined the channel [15:02] steadicat has joined the channel [15:03] cognominal has joined the channel [15:03] unomi has joined the channel [15:03] sonnym has joined the channel [15:06] jagwio has joined the channel [15:07] c4milo: anybody who is using spark ? [15:10] Draggor1 has joined the channel [15:12] bradleymeck has joined the channel [15:13] Anti-X has joined the channel [15:14] tj has joined the channel [15:15] shadow_walker has joined the channel [15:16] CrabDude has joined the channel [15:17] mikew3c has joined the channel [15:21] Yuffster has joined the channel [15:23] dguttman has joined the channel [15:23] mikew3c_ has joined the channel [15:26] meatmanek_ has joined the channel [15:27] steadicat has joined the channel [15:27] jamescarr_: hmmm... is there a good jslint vim plugin out there? [15:28] isufy has joined the channel [15:28] isufy has left the channel [15:28] dquestions has joined the channel [15:30] aubergine_ has joined the channel [15:31] isaacs has joined the channel [15:32] aurynn has joined the channel [15:33] simme has joined the channel [15:40] svnlto has joined the channel [15:42] sprout has joined the channel [15:43] jakehow has joined the channel [15:44] EyePulp has joined the channel [15:46] tmpvar has joined the channel [15:47] Jonasbn_ has joined the channel [15:50] twoism has joined the channel [15:50] Draggor2 has joined the channel [15:51] elijah-mbp has joined the channel [15:52] evanmeagher has joined the channel [15:52] cognominal: This may be of interest to the developper of node.js : http://cpansearch.perl.org/src/MLEHMANN/EV-4.00/Changes [15:53] jacobolus has joined the channel [15:54] tmpvar: cognominal, why? [15:54] amerine has joined the channel [15:55] sam_ has joined the channel [15:56] cognominal: I think node.js uses libev [15:57] tjholowaychuk: yup [15:57] yhahn has left the channel [16:00] meandi has joined the channel [16:00] Anti-X: again, i thought magic [16:00] Anti-X: why you gotta ruin my dreams [16:01] steadicat has joined the channel [16:01] nerdEd has joined the channel [16:05] simme has joined the channel [16:06] davidascher has joined the channel [16:06] matjas has joined the channel [16:09] aurynn: Everything is magic until you need to know how it works. Then the world gets a little smaller and a little colder. [16:10] Tobias|: I disagree [16:10] nerdEd has joined the channel [16:10] svnlto has joined the channel [16:10] Tobias|: We already are doing in this day and age what was previously considered 'magic' [16:11] Tobias|: Consider your favourite piece of code; your understanding of why it's awesome is what makes it so awesome [16:11] Tobias|: ACTION stops being off-topic, goes back to what he was doing [16:12] lakin has joined the channel [16:16] stephank has joined the channel [16:17] ph^ has joined the channel [16:19] aubergine has joined the channel [16:19] mbrochh has joined the channel [16:19] bpot has joined the channel [16:22] flippyhead has joined the channel [16:23] aubergine_ has joined the channel [16:24] noahcampbell has joined the channel [16:25] heavysixer has joined the channel [16:25] twoism has joined the channel [16:26] banjiewen has joined the channel [16:26] tekky has joined the channel [16:26] steadicat has joined the channel [16:27] Nohryb has joined the channel [16:28] Jonasbn_ has joined the channel [16:29] alcuadrado has joined the channel [16:30] daniellindsley has joined the channel [16:31] alcuadrado: help with canvas drawImage anyone? [16:32] akahn has joined the channel [16:33] TheEmpath has joined the channel [16:34] davidascher has joined the channel [16:36] pquerna: ryah_: ugh, the autoconf stuff? no node_g, no ssl? [16:36] Jonasbn_ has joined the channel [16:36] kschzt has joined the channel [16:36] saschagehlich has joined the channel [16:36] akahn: What are people using for HTML parsing in node.js? I see jsdom + jQuery; are there other options to consider? [16:37] saschagehlich: hey, did anyone ever experience that ClientResponse.headers is only responding _one_ set-cookie header when there are multiple headers? [16:37] pquerna: akahn: http://github.com/polotek/libxmljs/wiki [16:38] akahn: pquerna: thanks, i'll give that a try [16:38] stride: alcuadrado: what's up with drawImage? [16:38] sprout has joined the channel [16:39] jbenesch has joined the channel [16:39] alcuadrado: I just want to draw a clipped image [16:39] alcuadrado: but the drawn image size is wrong [16:39] alcuadrado: and it gets resized whevener I resize the browser [16:40] stride: clipped as in https://developer.mozilla.org/en/Canvas_tutorial/Using_images#Slicing ? [16:41] kkaefer: I know this is completely not the spirit of node, but is there a sleep() method? ;) [16:41] pquerna: kkaefer: setTimeout [16:41] Raevel: kkaefer: you can use timeouts... [16:41] alcuadrado: stride, yes, like that [16:41] kkaefer: Raevel: I know about that, nad process.nextTick [16:41] mikedeboer has joined the channel [16:42] stride: alcuadrado: resizing can be avoided by setting absolute sizes on the canvas I guess [16:42] kkaefer: but that doesn't interrupt execution [16:42] dmcquay has joined the channel [16:42] stride: kkaefer: from another process kill -STOP or kill -CONT maybe [16:42] Raevel: well, if you base your execution on timeouts it does :-) [16:42] alcuadrado: stride, to the canvas element width css? [16:42] alcuadrado: with* [16:43] deepthawtz has joined the channel [16:43] stride: alcuadrado: yep, can't think of other reasons why the content would resize, that should stop when the container (canvas) doesn't resize anymore [16:45] murphy has joined the channel [16:46] Br|ce_ has joined the channel [16:46] Wizek: Can I have Multi-dimensional *dynamic* array in javascript? Something like this: var ary=new Array(); ary[1][3][2] = 'BAR' [16:46] alcuadrado: stride, it has an absolute size [16:46] digitalspaghetti: Wizek: no [16:47] davidsklar has joined the channel [16:47] evanmeagher_ has joined the channel [16:47] isaacs has joined the channel [16:47] Wizek: digitalspaghetti: Any possible workaround? [16:48] sudoer has joined the channel [16:48] digitalspaghetti: loops, i'm afraid [16:49] rpflo has joined the channel [16:50] gkatsev: Wizek: you can have an array of arrays. [16:50] digitalspaghetti: http://www.webcheatsheet.com/javascript/arrays.php#multidim [16:50] alcuadrado: stride, it was that you should set the CSS size and width and height attributes =) [16:50] gkatsev: people should stop using new Array() :( [16:51] Raevel: yes :( [16:51] gkatsev: also document.write [16:51] isaacs: ryah_: so, do we need to run autoconf in the dir before ./configure now? [16:51] Raevel: new Array(int) is confusing++ [16:51] isaacs: ryah_: because ./configure says that it's not a thing [16:51] bartt has joined the channel [16:51] tjholowaychuk: autoconf should generate it [16:53] Wizek: what's the problem with new Array()? [16:53] DrunkDwarf has joined the channel [16:54] davidsklar has joined the channel [16:54] isaacs: ok [16:55] isaacs: also, "install" is missing. [16:55] isaacs: ugh [16:55] isaacs: i gotta, like, *copy* stuff? by hand? jeez... ;) [16:56] mraleph1 has joined the channel [16:57] jchris has joined the channel [16:57] gkatsev: Wizek: it is clunky and requires an extra function call. var arr = []; works just as well and is faster :) [16:58] gkatsev: same with new Object(); var obj = {}; is better [16:58] Raevel: Wizek: new Array("2") => ["2"]; new Array(2,3) => [2,3]; new Array(2) => [undefined, undefined] [16:58] Raevel: gkatsev: is arr = [] really faster? [16:59] Raevel: is not just sugar for new Array()? [16:59] pquerna: ryah_: https://gist.github.com/a43e08f524385b9b159f [16:59] gkatsev: Raevel: i think it is but I am not 100% sure. [16:59] jstemmer has joined the channel [16:59] gkatsev: but using object/array literals is better/cleaner. [17:00] gkatsev: brb [17:00] rbranson: the only reason [] would be faster is at the parser level, which only gets ran once [17:01] kriszyp has joined the channel [17:02] isaacs: new Array(len) is actually worthwhile sometime. [17:02] isaacs: sometimes [17:02] isaacs: if you know exactly how long it's going to be, and it's big, and speed matters, then new Array(len) will pre-allocate all the space you need, rather than relying on it auto-increasing with every push() [17:03] isaacs: but I guarantee that's not your bottleneck ;) [17:03] tjholowaychuk: rbranson: i think it would be slower actually [17:03] rbranson: isaacs: I'll give you that :) [17:03] tjholowaychuk: but nothing that is even remotely important [17:03] rbranson: right [17:03] rbranson: it's infintesimal [17:03] isaacs: yeah. use [] [17:03] isaacs: it's nicer looking [17:03] isaacs: software should be written for humans to read, and only incidentally to be run by computers. [17:04] rcy has joined the channel [17:04] bradleymeck: optimize bottlenecks, if you need to optimize onto implementation level tweaks, you are probably doing it wrong or trying to do too much [17:05] isaacs: rule one of optimization: premature optimization is evil. rule two of optimization: it's premature. [17:05] sechrist: Are there Thrift bindings for node? [17:05] mikeal has joined the channel [17:05] bradleymeck: as an aside, anyone have a currently working example of streaming off of twitter, everything im throwing at it is giving 401s [17:06] Raevel: gkatsev: turns out it's just sugar: "Let array be the result of creating a new object as if by the expression new Array() where Array is [17:06] Raevel: the standard built-in constructor with that name. " [17:06] Raevel: but yeah, definately cleaner with [] [17:06] bradleymeck: _announcer clean the tubes! [17:06] _announcer: Cleaning the tubes for great justice! [17:07] sechrist: you don't want the tubes clogged up [17:08] strmpnk has joined the channel [17:08] bradleymeck: yea, but i want to see announcer's current source lol, i cant get the darn streams working, and maushu is awol [17:11] ph^ has joined the channel [17:12] TangoIII has joined the channel [17:12] TangoIII has left the channel [17:16] maximus has joined the channel [17:17] PyroPeter has joined the channel [17:17] Guest6631: node.js:27 if (!x) throw new Error(msg || "assertion error"); ^ Error: assertion error at node.js:27:17 at Timer.callback (net:141:29) at node.js:604:9 [17:17] Guest6631: this error is crashing my app frequently :( [17:18] tekky has joined the channel [17:19] bradleymeck: are you giving blank callbacks to setTimeout/Interval? [17:19] gerred has joined the channel [17:19] isaacs: Guest6631: that's a failed assert. can you share your code that is causing this to happen? [17:20] isaacs: Guest6631: my guess is that it's the process.assert in setTimeout that makes sure that your arguments are valid. [17:20] isaacs: (it'd be better to throw a "badarg" or something) [17:21] stride: isaacs: pretty sure that's the socket timeout handler in net.js [17:22] c4milo has joined the channel [17:22] isaacs: oh, that could be [17:22] isaacs: but it's definitely an assert somewhere [17:22] stride: seems to occur with 0.3.x for some people [17:23] stride: yeah, there are two asserts in that callback, some integrity issue with the socket timeout list or something [17:23] gkatsev: Raevel: ok, cool, good to know. [17:24] meandi has joined the channel [17:27] PyroPete1 has joined the channel [17:28] vnguyen has joined the channel [17:28] hoodoos has joined the channel [17:29] CIA-72: node: 03Paul Querna 07master * r9977831 10/ (Makefile config.mak.in configure.ac): Add HAVE_OPENSSL flag to makefile - http://bit.ly/8Zzvsl [17:29] bradleymeck: mmmm so with the new make based stuff, how do we compile addons? [17:30] anomalyinc has joined the channel [17:30] tjholowaychuk: bradleymeck: I asked ryan if node-waf was sticking around, and i guess it is [17:30] mikew3c has joined the channel [17:30] pquerna: a svn revision from CIA? [17:31] ryah_: isaacs: autoconf, yes [17:31] saikko has joined the channel [17:31] ryah_: bradleymeck: node-waf will stay [17:32] ryah_: pquerna: yes, it's going to take some time to catch up to where we were [17:32] ryah_: pquerna: but i can't keep up with master - i had to merge it [17:33] ehaas has joined the channel [17:33] benburkert has joined the channel [17:34] hoodoos: hey guys, I wanted to ask if try..catch has any overhead during code execution? As far as I can tell there's no overhead at all. Look at this simple test http://pastebin.com/WJ1ejBs1, what do u think? [17:35] Jonasbn_ has joined the channel [17:35] norviller has joined the channel [17:35] pquerna: hoodoos: at a guess, I'd vote that v8 is optimizing it out. [17:36] Raevel: hoodoos: probably negligible [17:36] hoodoos: test proves it [17:36] hoodoos: if no exception being thrown, no overhead is visible [17:36] bradleymeck: http://jsperf.com/try-catch-statment, http://jsperf.com/trycatch/5, http://jsperf.com/try-catch-and-if-else [17:36] pquerna: test proves that an empty code block has no overhead :) [17:37] hoodoos: well, it's another question :) [17:37] bradleymeck: god i need to make a jsperf client for node [17:37] Raevel: pquerna: are you saying v8 does runtime optimizations? [17:37] hoodoos: would be great :D [17:38] hoodoos: hmm, overhead is visible now.. need to operate with higher values I guess [17:38] bradleymeck: raevel it does some, but the steps at which to engage them are poorly defined [17:38] bradleymeck: the one you are guaranteed is dot operators though [17:40] hoodoos: bradleymeck, do you think it's a deadly overhead? :) i just mean if I need to enclouse something with try..catch and spent 5 seconds for it or otherwise optimize code logics to make it never fail for 2 hours, should I spent 2 hours if I have plenty of work to do? :) [17:40] shadow_walker has joined the channel [17:40] bradleymeck: hoodoos i think it affects ALL code inside of it, so for small ops it is not brutal, for anything sizable it is pretty painful [17:41] hoodoos: ah! [17:41] hoodoos: i got it, it depends on code inside.. [17:41] pquerna: ryah_: is there a plan of action on http.js and streams? It seems to still inherit from net.Stream, and for all this pipe stuff to work.. it shouldn't (?) [17:41] hoodoos: bradleymeck, I just have no idea how try..catch works.. Need to read on it [17:42] hoodoos: is there anything to read on that related to javascript? [17:42] agnat has joined the channel [17:42] ehaas has joined the channel [17:43] bradleymeck: basically you can think of it as overhead for every operation, generally small overhead but on everything [17:43] Wizek: How can I pass variables into anonymus functions? [17:43] bradleymeck: call the function [17:43] hoodoos: Wizek, like usual ones :) [17:43] jesusabdullah: (function(x,y) {whatever}).call() I think? [17:43] gkatsev: perhaps these can be asked in ##javascript? idk if people mind or what not. [17:43] gkatsev: jesusabdullah: you don't even need the .call [17:44] jesusabdullah: Oh yeah, herp derp [17:44] hoodoos: gkatsev, i guess it's v8 related.. [17:44] bradleymeck: v8: var x=function(){return arguments[0]};x(1) [17:44] v8bot: bradleymeck: 1 [17:44] gkatsev: jesusabdullah: (function(x){})(5) [17:44] jesusabdullah: (function(x,y) {whatever}(1,2) [17:44] jesusabdullah: Yeah [17:44] jesusabdullah: Soz, it's EARLY [17:44] jesusabdullah: and I haven't been sleeping very well [17:44] jesusabdullah: I guess? [17:44] jesusabdullah: idk [17:44] gkatsev: jesusabdullah: it's ok. .call works as well. [17:44] jesusabdullah: XD [17:44] Guest6631: isaacs: my code is mostly consisting of socket.io.. could it be that? [17:44] bradleymeck: i wonder if nested try catches are slower than single try catch [17:44] sechrist: jesusabdullah: finish dnode-python :) [17:45] SubStack: yep! [17:45] SubStack: ACTION scolds jesusabdullah  [17:45] stride: bradleymeck: why wouldn't they? [17:45] gkatsev: bradleymeck: is there really a point to nested try catches? since a try catch will catch ALL errors and you can't tell it to only catch some like in java/c# and similar [17:45] hoodoos: bradleymeck, should be slower, they spawn some object and work in some singleton.. currently reading this one https://groups.google.com/group/v8-users/browse_thread/thread/0dc2566b93667ac2?pli=1 [17:45] strmpnk has joined the channel [17:46] hoodoos: gkatsev, sometimes you need to test exact code and do something else inside global try..catch [17:47] Guest6631: is there any way to avoid process.assert crashing the app ? [17:47] mraleph1: hoodoos: code inside try/catch/finally does not matter. but entering and leaving try catch block is not a cheapest operation. [17:47] dguttman has joined the channel [17:47] hoodoos: mraleph, it's like 70% slower then without one [17:48] mraleph1: hoodoos: without what? [17:48] hoodoos: mraleph1, http://jsperf.com/try-catch-statment :) [17:49] rpflo has joined the channel [17:50] mraleph1: hoodoos: I would say that this is the cost of entering/leaving try-catch. it should not matter what you put inside. [17:51] bradleymeck: thats an outer trycatch though [17:51] trentm has joined the channel [17:51] hoodoos: mraleph1, for myself I found that it's kinda bad idea to wrap something inside something as comonly used as Stream.write e.g., but if it's calling to some business logic code (like authorizing credit card or anything you can imagine) you shouldn't care about overhead.. [17:51] hoodoos: unless you really want to process 45,382,292 transactions per second.. I bet you want, but not sure it's possible :D [17:52] trentm has joined the channel [17:53] felixge has joined the channel [17:53] felixge has joined the channel [17:53] trentm has joined the channel [17:53] jpld has joined the channel [17:53] jpld has joined the channel [17:53] felixge: ryah_: new Buffer('\0') -> creates a buffer of length 0 [17:53] felixge: ryah_: previously it would create a buffer with 1 byte (0) [17:53] hoodoos: maybe it's an epic fail, but I'm trying to build business related application on node.. :) [17:53] hoodoos: i mean implement business logic with it [17:53] TheEmpath: how do you setup repo "symlinks" like this in github? http://github.com/LearnBoost/Socket.IO-node/tree/master/support/ [17:54] bradleymeck: just include git submodules or git repos inside of yours [17:54] trentm has joined the channel [17:54] TheEmpath: o [17:54] TheEmpath: ill look up how to do that [17:54] TheEmpath: ty [17:55] dmcquay has joined the channel [17:55] Anti-X: frankie keeps putting out random shit [17:55] trentm has joined the channel [17:55] bradleymeck: lol nice [17:56] Anti-X: who's teasin him [17:56] bradleymeck: me, ive got a duplicate account [17:56] Anti-X: 'test' 13 hrs ago, 'wtf' 12 hrs ago, 'fail' 30 mins ago [17:56] trentm has joined the channel [17:56] Anti-X: also i think announcer died for real [17:57] Anti-X: i reset it earlier today but nothing [17:57] bradleymeck: trying multiple account cause twitter streaming is failing [17:57] Anti-X: either that or people stopped talking about node [17:57] heavysixer: is there a favorite node implantation for sessions? [17:57] felixge: ryah_: this was introduced in cf1db4f3043fce0474c421dc547b8bd2f9616354 [17:57] bradleymeck: heavysixer http sessions? connect middleware for it [17:57] trentm has joined the channel [17:57] heavysixer: bradleymeck: you mean like piggy backing of something like rails? [17:58] felixge: oh [17:58] bradleymeck: anti-x i cant get streaming to work right now on anything for twitter, might be something on their end [17:58] heavysixer: sharing a cookie between it? [17:58] Anti-X: bradleymeck, alright, definately their fault [17:58] bradleymeck: heavysixer, i mean since most ppl are using connect the middleware is easy [17:58] cardona507 has joined the channel [17:58] bradleymeck: it shares a cookie like most session stuff [17:58] felixge: ryah_: nvm, I need to do: new Buffer('\0', 'binary'). The fact that it worked previously was broken (because we don't throw errors on invalid utf8 sequences) [17:59] heavysixer: bradleymeck: ok i am super new to node so "connect" is a node specific middleware? [17:59] bradleymeck: it is a server framework [17:59] trentm has joined the channel [17:59] bradleymeck: it implements a middleware system [18:00] shadow_walker has joined the channel [18:00] trentm has joined the channel [18:00] heavysixer: bradleymeck: http://github.com/senchalabs/connect this? [18:01] marshall_law_ has joined the channel [18:01] trentm has joined the channel [18:02] bradleymeck: yes [18:02] trentm has joined the channel [18:02] langworthy has joined the channel [18:03] MikhX has joined the channel [18:03] trentm has joined the channel [18:05] trentm has joined the channel [18:05] Guest6631: how to install master now [18:05] Guest6631: ./configure returns no command [18:06] isaacs: pquerna: thanks, that bug was just annoying me this morning [18:06] isaacs: Guest6631: autoconf && ./configure && make install [18:06] trentm has joined the channel [18:06] tmpvar: i actually couldnt get make install to work [18:07] gkatsev: I have node installed from git, what's the best way to update it? or is just just 'git pull && ./configure && make && sudo make install'? [18:07] Guest6631: isaacs: you were right, it was socket timeout handler in net.js [18:07] tmpvar: it was on some old sh*tty redhat 4 machine though [18:07] Guest6631: causing that process.assert [18:07] Guest6631: any way to avoid the crash ? [18:07] trentm has joined the channel [18:07] isaacs: Guest6631: probably something like socket.on("timeout", handleTheTimeout) or socket.on("error", handleTheError) [18:07] isaacs: Guest6631: just a guess. [18:07] isaacs: tmpvar: oh, right, not make install [18:08] Guest6631: oh interesting [18:08] isaacs: "install" isn't there any more. coming soon. [18:08] strmpnk has joined the channel [18:08] trentm has joined the channel [18:09] trentm has joined the channel [18:10] admc has joined the channel [18:10] trentm has joined the channel [18:11] trentm: Guest6631: need to run "autoconf" to generate "configure" script now [18:11] jamescarr_ has joined the channel [18:12] trentm has joined the channel [18:12] teemow has joined the channel [18:12] Guest6631: thanks [18:12] jamescarr_: you are welcome [18:12] braddunbar has joined the channel [18:13] trentm has joined the channel [18:13] naturalethic has joined the channel [18:13] felixge: isaacs: you up yet? [18:13] isaacs: felixge: yeah, it's 11:13 am here in PST [18:13] felixge: isaacs: how do you feel about require.hijack this morning? [18:13] felixge: :) [18:14] isaacs: felixge: i still like it [18:14] isaacs: felixge: but i think that if it's going to be hidden, and set with a function, then it should be magically stackable. [18:14] TheEmpath: hrmmm (git clone http://github.com/ry/node node) says this (fatal: http://github.com/ry/node/info/refs not found: did you run git update-server-info on the server?) [18:14] tmpvar: node.git [18:14] isaacs: felixge: but i guess it's not really an option to just have it be a setter. [18:15] felixge: isaacs: alright, I'll prepare the patch and then we'll devise a plan to trick ryan into merging [18:15] TheEmpath: doh [18:15] tmpvar: TheEmpath, http://github.com/ry/node.git [18:15] isaacs: felixge: haha [18:15] isaacs: felixge: i can understand not wanting it to be stackable. that was a fun bit of functional code to write, though :) [18:15] felixge: isaacs: we could also use getters/setters [18:16] isaacs: felixge: Object.defineProperty(require, "hijack" ...) is not a good idea [18:16] isaacs: felixge: sends v8 into the slow path [18:16] felixge: isaacs: we just need the surrounding context, so a simple property won't work [18:16] isaacs: yeah [18:16] felixge: isaacs: ok [18:16] isaacs: also, require is not shared. [18:16] isaacs: each module gets a different require function that closes over it's module object [18:16] isaacs: so a simple property won't work [18:16] isaacs: your ghetto-style getter/setter is fine [18:16] felixge: :) [18:16] jamescarr_: ghetoo style? [18:17] isaacs: jamescarr_: it's just a regular function, but if you call it without any arg, you get the current value. [18:17] jamescarr_: you mean Foo.prototype.getCrap = function() { return this._crap; } [18:17] jamescarr_: yeah :) [18:17] isaacs: jamescarr: if you call it with an arg, you get the thing [18:17] spetrea-home has joined the channel [18:17] jamescarr_: oh yeah, those are ghetto [18:17] stride: felixge: have you already planned / wrote down thoughts on the API design for prepared statements in node-mysql? [18:17] isaacs: jamescarr: no, more like require.hijack = function (h) { if (!h) return requireHijack ; else requireHijack = h }) [18:17] aurynn: That reminds me [18:17] TheEmpath: (~/node$ ./configure) returns (bash: ./configure: No such file or directory) im using ubuntu 10.04 [18:17] felixge: stride: no [18:18] felixge: stride: I'm a little scared of it [18:18] aurynn: felixge, I need to talk to you about the node-mysql API design [18:18] isaacs: TheEmpath: autoconf [18:18] trentm: no "make install" with the recent Makefile changes? [18:18] TheEmpath: whats that [18:18] felixge: aurynn: shoot :) [18:18] isaacs: trentm: no, not yet [18:18] aurynn: felixge, I want to get the DB-driver writers together so we can hammer out a DBI spec [18:18] aurynn: and get consistent user APIs [18:18] stride: felixge: I'm a little scared of that protocol documentation, were those guys drunk? :) [18:18] sh1mmer has joined the channel [18:18] trentm: isaacs: k. Is there a plan there? I can help but don't want to duplicate [18:18] felixge: aurynn: hm. That'll be tough [18:19] trentm: TheEmpath: you need to run "autoconf" to generate the "configure" script [18:19] isaacs: trentm: i will be sending ryan a patch for make install shortly [18:19] trentm: coolio [18:19] felixge: stride: I think they were high on stuff that killed most of the authors of the spec so nobody could fix it ;) [18:19] TheEmpath: ty sorry this is a new cloud server [18:19] felixge: stride: that being said ... it could be worse ;) [18:20] felixge: aurynn: I mean basic connect(), query() should be easy [18:20] stride: felixge: heh, true. I'll just give it a shot and show you if I get usable results w/ tests, maybe it'll be at least good enough for reusing parts of it or something [18:20] felixge: aurynn: but the finer semenatics of queuing and error handling are a bitch [18:20] aurynn: felixge, queueing should be hidden. Error handling *definitely* needs a solid spec. [18:21] felixge: aurynn: well - queuing needs to be part of the spec if you want pause() / resume() [18:21] tmpvar: yikes, segfault on 0.3.1-pre [18:21] aurynn: felixge, what would pause/resume get you? [18:21] felixge: aurynn: let's say you have a query that returns 1 million rows [18:22] felixge: aurynn: it would be convenient to stop reading the results if you need to do something intense with each row [18:22] aurynn: ah, I'm used to the PG protocol, where I can hide that behind the prepare statements. [18:22] aurynn: and only grab a few records as I need [18:22] Sembiance: fugue looks nice :) [18:23] jamescarr_: fuck... I keep accidentally going to http://gist.com/ instead of gist.github.com [18:23] felixge: aurynn: anyway, having a common spec would be nice as connection pooling could be a shared abstraction [18:23] felixge: aurynn: so feel free to email me, I'd love to be helpful with that [18:24] eee_c has joined the channel [18:24] stagas has joined the channel [18:24] felixge: ACTION dinner [18:24] felixge: brb [18:24] stagas: yo [18:25] jamescarr_: some quick feedback, is there a better way to do this: http://gist.github.com/645434 [18:26] daniellindsley has joined the channel [18:26] pedrobelo has joined the channel [18:26] jamescarr_: the input array is basically a list of cell coordinates that are "alive" [18:28] kordless has joined the channel [18:30] braddunbar: "autoconf && ./configure && make" produces "src/node.cc:1862: warning: dereferencing type-punned pointer will break strict-aliasing rules" for me [18:30] braddunbar: anyone else getting this error? [18:31] qFox has joined the channel [18:33] isaacs: anyone else having trouble finding openssl? [18:34] sth: "finding"? [18:35] isaacs: oh, wait, now it's finding it.. [18:35] isaacs: sth: yeah, in the autoconf/configure/make process [18:35] mif86 has joined the channel [18:37] kordless_ has joined the channel [18:38] MikhX_ has joined the channel [18:39] marshall_law has joined the channel [18:40] themiddleman has joined the channel [18:40] ashleydev has joined the channel [18:41] saikat has joined the channel [18:41] shadow_walker has joined the channel [18:42] shadow_walker has joined the channel [18:43] jfd1 has joined the channel [18:43] TobiasFar has joined the channel [18:44] hellp has joined the channel [18:45] pquerna: isaacs: there is not support for using openssl from different prefixes or anything yet [18:46] isaacs: i see [18:46] pquerna: 'meh' [18:46] pengwynn has joined the channel [18:47] TheEmpath: i can ./configure and make node, but (make install) returns (make: Nothing to be done for `install'.) [18:47] pquerna: there is no make install in master right now [18:48] pquerna: use 0.2 or 0.3 release for that [18:48] TheEmpath: o [18:48] TheEmpath: well damn [18:48] pquerna: pretty much :) [18:49] trentm: isaac said he'll have a patch for "make install" soon [18:51] simme has joined the channel [18:51] ezmobius has joined the channel [18:53] femtoo has joined the channel [18:55] leepa has joined the channel [18:55] hassox has joined the channel [19:00] aubergine has joined the channel [19:00] joemccann has joined the channel [19:02] jamescarr_: argh... what's the fastest way to delete a given point (say [2,2]) from an array of points (like [ [0,0], [203,122], [2,2] ]) ? [19:02] jamescarr_: I thought I could do an indexOf, but I thought WRONG [19:02] banjiewen has joined the channel [19:04] aguynamedben has joined the channel [19:06] xicubed has joined the channel [19:07] chapel: array[2][2].shift() possibly [19:08] jamescarr_: oh sheesh [19:08] femtoo has joined the channel [19:08] jamescarr_: I been treating it as a list of tuples [19:10] chapel: v8: var a = {[1,2,3],[1,2,3],[1,2,3]}; array[2][2].shift(); [19:10] v8bot: chapel: SyntaxError: Unexpected token [ [19:10] chapel: hmm [19:10] temp01: {..} -> [..] [19:11] chapel: yeah [19:11] chapel: :P [19:11] chapel: I should be sleeping [19:11] chapel: code correctness - 80% [19:12] stride: jamescarr_: conway! \o/ [19:12] chapel: no shift [19:12] jamescarr_: stride, yes :) [19:13] heavysixer has joined the channel [19:13] jamescarr_: I'm practicing my craft today [19:13] jamescarr_: fuck it.. I'll just filter the whole damn thing till I fuigure it out :) [19:13] jchris has joined the channel [19:13] jamescarr_: chapel, shift wont really work in this case [19:14] chapel: yeah [19:14] chapel: splice [19:14] chapel: right? [19:14] Anti-X: nothing gets me in a better mood than cake! nom nom nom [19:15] Anti-X: we should just drop all food except cake [19:15] CIA-72: node: 03Micheil Smith 07master * r8da020d 10/ (lib/dgram.js lib/net.js src/node_net.cc): [19:15] CIA-72: node: Update node_net.cc to make us of node_constants.cc [19:15] CIA-72: node: also affects dgram which uses a constant from node_net.cc - http://bit.ly/aRm6aF [19:15] TheEmpath: damn i forgot how to install mongoose through npm [19:15] chapel: v8: var a = [[1,2,3],[4,5,6],[7,8,9]]; a[2].splice(2);a; [19:15] v8bot: chapel: [[1, 2, 3], [4, 5, 6], [7, 8]] [19:15] jamescarr_: chapel: the index is unknown [19:16] isaacs: TheEmpath: npm install mongoose [19:16] stride: jamescarr_: how about two for loops with var x = 5, cur; for(cur = (x++)-1; cur < x; cur++) { //... for calculating the 8 neighbour environment of x/y? [19:16] jamescarr_: I can't just get at 2 [19:16] chapel: okay [19:16] chapel: what are you searching for? [19:16] chapel: a number? [19:17] jamescarr_: I got it for now... different approach I took, not sure if it's better [19:17] stride: ah ok, how are you storing your universe? a nested array? [19:17] jamescarr_: nope... that's how I initialize it though :) [19:17] tyfighter has joined the channel [19:18] jamescarr_: my universe is only an array of cells that are alive [19:18] jamescarr_: and the bounds of the board [19:18] bentruyman has joined the channel [19:18] jamescarr_: the evolve method takes a callback so I can tie it into canvas :) [19:18] pedrobelo has joined the channel [19:18] gkatsev: jamescarr_: are you making a game of life? [19:19] mattc has joined the channel [19:19] chapel: v8: var a = [[1,2,3],[4,5,6],[7,8,9]]; a.forEach(function(b, i, a){var x = b.indexOf(5);if(x != -1) a[i].splice(x);a; [19:19] v8bot: chapel: SyntaxError: Unexpected end of input [19:20] stride: jamescarr_: post a link when you're done please, I did an awefully slow version for testing some canvas effects a few weeks back :) [19:20] jamescarr_: stride, will do [19:20] pedrobelo has joined the channel [19:20] jamescarr_: I'm giving a session on BDD with Jasmine at Rich Web this year, thought it might be fun to do a live demo of Game of Life :) [19:22] stride: yeah, always makes a great demo. and looks sufficiently shiny with a few transparent fills and neon-colors :) [19:22] mattmob has joined the channel [19:23] Anti-X: why does readFile on a dir just give you an empty string? [19:23] Anti-X: what's the point of that? [19:23] stride: what are you expecting instead? [19:23] Anti-X: exception [19:24] Anti-X: not readable [19:24] chapel: v8: var a = [[1,2,3],[4,5,6],[7,8,9]]; a.forEach(function(b, i, a){var x = b.indexOf(7);if(x != -1) {a[i].splice(x,1);}});a; [19:24] v8bot: chapel: [[1, 2, 3], [4, 5, 6], [8, 9]] [19:24] Anti-X: or even a file list to be weird [19:24] Anti-X: anything but empty string... [19:24] path[l] has joined the channel [19:25] chapel: jamescarr_ that is a simple way to remove one element out of a multidimensional array [19:26] Anti-X: i was gonna give a 403 on directory, but with it returning a string, it's sort of hard knowing that it's a directory.. empty files happen [19:26] Anti-X: i could do an fstat every time, but why waste time [19:26] SubStack: sparse[[x,y,z].join(',')] [19:26] SubStack: ACTION ducks [19:27] Anti-X: how dare you [19:27] chapel: haha [19:27] chapel: hey [19:27] chapel: I am all for new stuff [19:27] chapel: ACTION doesn't know all the cool tricks [19:27] stride: Anti-X: is that fstat expensive? it does that in readFile anyway, doesn't it? [19:28] Anti-X: in that case why make me do it twice [19:28] delapouite has joined the channel [19:28] TheEmpath: hrmmm im grepping for "sys" but can't find anything, yet i get this when i start my projects: The 'sys' module is now called 'util'. It should have a similar interface. [19:29] SubStack: O_O [19:29] wink_: TheEmpath: maybe one of your modules is using sys? [19:29] Anti-X: stride, it's not expensive per se, but it's a delay.. and with a smackload of traffic it could matter [19:29] TheEmpath: i grepped my stuff and im clean. maybe the 3rd parties? [19:29] Anti-X: it's fine that it's async, but damn [19:29] wink_: TheEmpath: yeah, most likely [19:29] Anti-X: what's the point [19:30] TheEmpath: cool ty [19:30] gbot2 has joined the channel [19:31] TheEmpath: oh yeah [19:31] programble has joined the channel [19:31] TheEmpath: hundreds of 'sys' calls in mongoose, socket, and mime [19:32] Anti-X: nice [19:32] stride: Anti-X: I doubt that would cause noticeable delay. filesystems are usually pretty good at answering multiple request of that sort [19:32] chapel: I see most people use sys for stdout [19:32] stride: if it really bugs you, change readFile to pass the stat object to the callback [19:32] chapel: when console.log or .dir are more than adequate [19:33] Anti-X: doesn't bug me, it just surprised me [19:34] Anti-X: i can do another check, which is for extension... but that makes the server non-distributable.. which by all means is fine.. making it for myself [19:35] Anti-X: it's sort of apache light for node :p [19:35] Anti-X: takes rewrite files and all [19:35] chapel: its funny [19:36] chapel: you could take node, and make apache light, make it also take .js files in a certain dir and serve them like php files :P [19:36] chapel: that would be funny [19:36] Anti-X: haha [19:36] Anti-X: no way [19:36] chapel: not saying do it [19:36] tmpvar: i am [19:36] tmpvar: do it! [19:36] chapel: just saying the fact that its possible [19:36] sivy: DO IT' [19:36] sivy: DO IT NOW [19:36] chapel: :P [19:36] chapel: afk [19:36] tmpvar: [19:37] chapel: haha [19:37] sivy: <%= sys.inspect (foo) %> [19:37] chapel: I would laugh if someone did it [19:37] Anti-X: i have a 'procedures.js' file, which exports a function(req, res), and if that returns true, i call it quits, and false i go looking for a file by that request path [19:37] sivy: actually, that's pretty much EK=JS [19:37] hassox has joined the channel [19:37] sivy: ugh [19:37] sivy: EJS [19:37] sivy: (new tiny keybaord is killing me) [19:38] Anti-X: you need to water it [19:38] Anti-X: so it grows [19:38] tjholowaychuk: clear [19:38] Anti-X: or trim your fingers [19:39] Anti-X: put them in a pencil sharpener [19:40] stride: [19:40] Aria has joined the channel [19:43] richcollins has joined the channel [19:43] jherdman has joined the channel [19:43] murz has joined the channel [19:44] zomgbie_ has joined the channel [19:44] zomgbie_ has joined the channel [19:44] saschagehlich has joined the channel [19:45] saschagehlich: do you think node.js can handle file streaming and file downloads at the same time (with about 20 requests per second)? [19:45] aurynn: Probably. [19:46] bradleymeck: anyone else having trouble with oauth twitter streaming apis? [19:46] bradleymeck: nodejs is fine with pumping stuff saschagehlich, probably a lot more than 20 [19:47] saschagehlich: bradleymeck: okay, thank you. will see if it supports as soon as it's in production [19:49] TheEmpath: a curious turn of events. i got my brand new server running, got all of the junk it needs to run. and it serves pages http://67.23.45.138:8000 [19:50] TheEmpath: but when it tries to access http://67.23.45.138:8000/socket.io/socket.io.js, chrome returns Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. [19:50] hassox has joined the channel [19:50] danielzilla has joined the channel [19:50] TheEmpath: its not a 404. its just blank [19:52] jakehow has joined the channel [19:54] Me1000 has joined the channel [19:55] hornbeck has joined the channel [19:57] pquerna: ryah_: with new 'pipes', can data chunks be strings or buffers only? Who in a pipe should do the encoding? should pipe()? [19:59] agnat has joined the channel [20:01] felixge: isaacs: just applied your require magic -> segmentation fault :) [20:05] felixge: 400 people in here [20:05] felixge: wow [20:05] felixge: party time [20:05] jamescarr_: yep, its growing fast [20:05] halfhalo: ACTION plays music [20:05] felixge: jamescarr: I remember when we were like 10 guys in here :) [20:05] jamescarr_: eventually the hip crowd we don't even know yet will take over [20:05] jamescarr_: with the coffee script all over [20:05] jamescarr_: :-P [20:06] felixge: jamescarr: noooo [20:06] felixge: jamescarr: I mean coffee script is cute ... but it just feels weird [20:06] felixge: ;) [20:06] jamescarr_: a "Node.js in Action" book that introduces coffeescript as must have and uses it throughout the rest of the book :) [20:06] felixge: jamescarr: ha [20:07] tjholowaychuk: ew lol [20:07] felixge: jamescarr: I don't think there will ever be a node.js book [20:07] felixge: not as long as the API evolves as crazy fast [20:07] felixge: :) [20:07] felixge: It takes a little madness to write one write now [20:07] felixge: but I think a few people are working on it [20:08] tjholowaychuk: yeah writing one right now would be a bad idea, by the time its published things will be so different [20:08] felixge: tjholowaychuk: yeah [20:08] jamescarr_: tjholowaychuk, this already becomes an issue with scala [20:08] felixge: I'm thinking about writing a ultra-geeky e-book about writing streaming parsers in node on day [20:08] felixge: but I'm afraid that's a day in a parallel universe with more time [20:08] felixge: :) [20:08] jamescarr_: there's 3 good scala books out now, a lot of the examples dont work anymore in scala 2.8.0 [20:09] jamescarr_: tjholowaychuk, hows the Node book you started coming though? I havent looked [20:09] tjholowaychuk: jamescarr_: it was just a little ebook [20:09] felixge: well, I actually think the API will settle soon. At least I think we are close to feature complete [20:09] felixge: so there may be a few more rounds of bikehedding stuff around [20:10] felixge: but the main stuff should settle [20:11] jamescarr_: well, one could just write a book and freeze it at the current stable, instructing readers to use that version to follow along [20:11] felixge: jamescarr: sure, only to find out npm won't install anymore [20:11] felixge: :D [20:11] jamescarr_: even though things will change, they'd still get a good hold on it [20:11] tjholowaychuk: I had envisioned my little ebook having branches/tags that match node etc [20:11] tjholowaychuk: but yeah, I dont think anyone has time lol [20:11] felixge: I guess you could freeze the version of npm being installed [20:11] evanpro has joined the channel [20:12] TheEmpath: does npm install socket.io cover all the submodules as well? [20:12] tahu has joined the channel [20:12] shadow_walker has joined the channel [20:12] felixge: TheEmpath: it should [20:12] jamescarr_: TheEmpath, it should [20:12] bradleymeck: doubt it [20:12] jamescarr_: The_Surfer, it did the last time I installed it [20:12] bradleymeck: nm then [20:12] TheEmpath: hrmm [20:12] TheEmpath: im getting blank files trying to access socket.io.js [20:12] TheEmpath: lemme try the cdn [20:13] saschagehlich: is there a way to tell clientrequest to follow "location" headers? or is there a module that can do something like that [20:13] saschagehlich: ? [20:14] jamescarr_: saschagehlich, yes, I faced this problem last month... [20:14] trotter has joined the channel [20:14] jamescarr_: I dont remember the solution, but I know the request module utilizes following "location" headers [20:15] errorhandler has joined the channel [20:15] felixge: saschagehlich: there is a module called 'request' [20:16] errorhandler: How do you update node? [20:16] felixge: errorhandler: git pull && make clean && ./configure && make install [20:16] felixge: your usage of sudo may vary [20:16] TheEmpath: well the cdn works... but so does my XSRF prevention lol so i can't use that [20:17] saschagehlich: felixge: is request on github? [20:17] errorhandler: @felixge thanks [20:17] felixge: saschagehlich: afaik [20:18] felixge: saschagehlich: http://github.com/mikeal/node-utils/tree/master/request/ [20:19] mikeal: npm install request [20:19] saschagehlich: felixge: is it stable / did you try it yet? [20:19] felixge: saschagehlich: it is being considered for the node core [20:19] felixge: saschagehlich: and afaik mikeal uses it quite a lot to talk to couchdb [20:19] felixge: saschagehlich: other than that - no idea [20:20] mikeal: lots of people use it [20:20] cloudhead has joined the channel [20:20] saschagehlich: well but it actually doesn't support encoding [20:20] saschagehlich: or am i wrong? [20:21] derencius__ has joined the channel [20:21] stagas has joined the channel [20:22] mikeal: encoding? [20:22] mikeal: not automatically [20:22] masahiroh has joined the channel [20:23] saschagehlich: hum I'd use it if it supported binary responses.. [20:23] bradleymeck: mikeal have you tried oauth for tweetstream? [20:24] mikeal: saschagehlich: it supports binary responses [20:24] mikeal: just pass in the output stream and it'll pump to it [20:25] mikeal: bradleymeck: i really hate oauth, but i'm gonna have to add support [20:25] mikeal: i just don't have time right now [20:25] bradleymeck: cause i cant get it to work and thats all i got, tried converting code, if i get it working ill throw a patch [20:26] dquestions has joined the channel [20:26] igorgue has joined the channel [20:29] saschagehlich: mikeal: okay, thank you so far. I'll try it [20:29] rsms has joined the channel [20:30] markt has joined the channel [20:31] jimt_ has joined the channel [20:34] aho has joined the channel [20:34] nuba has joined the channel [20:37] petrpan has joined the channel [20:37] petrpan: hi stupid question, how do you remove null-terminating characters from strings? [20:38] petrpan: e.g. new Buffer(2); [20:38] SubStack: that is a buffer not a string [20:38] petrpan: buf[0] = '0x30' [20:38] petrpan: buf[1] = '0x00' [20:38] SubStack: that... [20:38] SubStack: what [20:38] petrpan: i know but once its buf.toString() [20:39] petrpan: the null character is still there [20:39] SubStack: BUFFERS DO NOT WORK THAT WAY [20:39] petrpan: explain to me then [20:39] SubStack: buf[0] = 0x30; buf[1] = 0x00 [20:39] bradleymeck: v8: var h="\u0000\x00";h.replace(/\x00/g,"") [20:39] v8bot: bradleymeck: "" [20:39] bradleymeck: v8: var h="\u0000\x00";h.replace(/\x00/g,"").length [20:39] v8bot: bradleymeck: 0 [20:40] felixge: petrpan: buffers don't need a null termination in order to be string-castable [20:40] felixge: petrpan: so your example should be: new Buffer([0x30]).toString() [20:41] felixge: (passing an array to the constructor allows you to set the length and bytes of a buffer at the same time) [20:41] petrpan: I know they don't, but the buffer i'm working with has one in anyway and its messing with my unit tests [20:41] felixge: petrpan: buffer.slice to rescue? [20:41] evanpro has joined the channel [20:42] felixge: v8: var b = new Buffer([0x30, 0x00]); b.slice(0, 1).toString(); [20:42] v8bot: felixge: ReferenceError: Buffer is not defined [20:42] felixge: ah this is just a v8 shell [20:42] felixge: not a node one [20:42] felixge: lame [20:42] felixge: :) [20:43] SubStack: agree! [20:43] SubStack: it should have all of npm in it too [20:43] petrpan: the buffer i'm working with wont necessarily have one in so I need a more generic solution with strings [20:43] felixge: petrpan: well the code bradleymeck pasted will work for that [20:44] SubStack: make two buffers [20:44] felixge: (removing all 0 bytes) [20:44] felixge: petrpan: but this seems to be a problem specific to your code [20:44] ryah_: pquerna: ideally the 'data' events should be buffers [20:44] CIA-72: node: 03isaacs 07master * r446d2ec 10/ (Makefile config.mak.in): Add make install - http://bit.ly/cOUJeM [20:44] petrpan: yeah just tried it out now, thanks bradley :) [20:45] dgoodlad has joined the channel [20:46] masahiro` has joined the channel [20:47] petrpan: getting that last unit test passing is a good feeling :) [20:47] nuba has joined the channel [20:48] SubStack: ACTION pokes _announcer  [20:48] brianmario has joined the channel [20:49] onar has joined the channel [20:50] svnlto has joined the channel [20:51] evanpro_ has joined the channel [20:52] TheEmpath: may i request clarification for the socket.io setup? is if you are hosting your own socket.io, which i am [20:53] TheEmpath: but i dont understand what path im supposed to put in there. shouldn't /socket.io/socket.io.js just work? [20:54] zomgbie_ has joined the channel [20:54] tmpvar: TheEmpath, depends on where socket.io is relative to your base url [20:54] brianc has joined the channel [20:54] tmpvar: if its right on the base then /socket.io/.. should work [20:54] TheEmpath: its athrmmm [20:54] TheEmpath: the base url is /home/user/imhotep. socket.io is at /usr/local/lib/node/socket.io [20:55] TheEmpath: well those are the dirs [20:55] TheEmpath: i dunno how they translate to urls [20:55] tmpvar: neither do I [20:55] TheEmpath: :( [20:56] meandi2 has joined the channel [20:56] rauchg_ has joined the channel [20:57] TheEmpath: more specifically socket.io.js is here /usr/local/lib/node/.npm/socket.io/0.5.3/package/example/client/socket.io.js [20:58] TheEmpath: i just dunno how to map to it given the [21:18] TheEmpath: and yet, when i do it, its a blank file [21:19] saschagehlich: !v8 var a = "b"; [21:19] saschagehlich: v8: var a = "b"; [21:19] v8bot: saschagehlich: undefined [21:21] brianc has left the channel [21:21] TheEmpath: man wth this is irritating. it was working for like three weeks and now its just all jacked to hell [21:22] _mythz has joined the channel [21:26] TheEmpath: whats hte difference between http://github.com/LearnBoost/Socket.IO and http://github.com/LearnBoost/Socket.IO-node [21:29] saschagehlich: the current node version on github can't configure? [21:29] tmpvar: run autoconf [21:30] eee_c has joined the channel [21:30] isaacs: saschagehlich: autoconf && ./configure && make install [21:30] isaacs: er, not "install" (yet) [21:30] saschagehlich: ty [21:31] saschagehlich: well, you should add that to the readme then.. ;) [21:31] isaacs: oh, hey, 446d2ec19c92f8553c42f27629effb2e631e588c has make install [21:31] isaacs: awesome [21:32] tmpvar: niiice [21:32] chapel: isaacs << are you using couchdb as a couchapp and _changes to start nodejs jobs? [21:32] isaacs: chapel: no [21:32] chapel: oh :( [21:32] chapel: are you using a couchapp at all? [21:32] chapel: :P [21:33] chapel: someone mentioned you when I brought it up [21:33] isaacs: chapel: i am. the npm registry is a couchapp. [21:33] chapel: ah, makes sense [21:33] isaacs: chapel: it's at http://isaacs.couchone.com/jsregistry/_design/app [21:33] isaacs: the app, that is [21:34] chapel: I am looking into making a couchapp for my app, and as mikael (sp?) brought up in his talk, watch _changes to spawn jobs in node.js [21:34] saschagehlich: let me test my node bot.. [21:34] nodejs has joined the channel [21:34] nodejs: Hey, I'm a node.js irc bot. Let me compile your node code with !node [yourcode]. [21:35] saschagehlich: !node console.log("blurb"); [21:35] nodejs: saschagehlich: blurb [21:35] isaacs: !node require("fs") [21:35] nodejs: isaacs: Code compiled, no errors. [21:35] saschagehlich: hehe wait a second [21:35] chapel: not sure why gif doesn't work, npm install gif, errors out isaacs (I know its probably not your issue) [21:35] saschagehlich: it's not safe yet ;) [21:35] isaacs: !node require("fs").readdir(".") [21:35] nodejs: isaacs: Code compiled, no errors. [21:35] halfhalo: lol [21:35] isaacs: !node console.log(process.cwd()) [21:35] saschagehlich: that was just a try *g [21:35] isaacs: hehehe [21:35] tmpvar: !node require("http").createServer(function(req)) { console.log("GOT ONE!"); }).listen(9876) [21:35] tjholowaychuk: !node process.exit(1) [21:35] isaacs: saschagehlich: just fyi... javascripters are DICKS [21:36] chapel: lol [21:36] chapel: yeah v8 is seriously restricted, and for good reason [21:36] saschagehlich: isaacs: I know that and I knew you would try that *g [21:36] isaacs: saschagehlich: we will try to take apart your server, not because we want to do harm, just because we're curious [21:36] chapel: :) [21:36] saschagehlich: isaacs: so help me to improve it [21:36] isaacs: hehehe [21:36] isaacs: have you see jefe? [21:36] tmpvar: !node console.log("hello"); [21:36] tmpvar: !node hello [21:36] isaacs: not sure if it's up to date [21:36] isaacs: tmpvar: it exited [21:36] halfhalo: ACTION used jefe for his bot [21:36] tmpvar: boooo [21:37] isaacs: tmpvar: at 14:35 [21:37] chapel: jefe? [21:37] tmpvar: haha [21:37] chapel: ah [21:37] sh1mmer has joined the channel [21:37] chapel: You mess with Jefe and Jefe messes with you. [21:37] isaacs: saschagehlich: so, one way would be to have a snapshotted vmware image or something, and then have it reset to the snapshot every minute or something [21:37] AAA_awright has joined the channel [21:38] isaacs: saschagehlich: if you really wanna have require("fs") work in the bot, thatis [21:38] saschagehlich: all: stop trying, it already leaved *g [21:38] gbot2: saschagehlich: spidermonkey: Error: SyntaxError: missing ; before statement: stop trying, it already leaved *g .....^ [21:38] isaacs: wait, what? [21:38] isaacs: gbot2 responds to "all:"? [21:38] saschagehlich: lol? [21:38] isaacs: all: 7 + 1 [21:38] gbot2: isaacs: spidermonkey: 8 [21:38] isaacs: wow. [21:38] chapel: hmm [21:38] isaacs: gbot2: 7 + 2 [21:39] hoodoos: all: 5 + 1 [21:39] gbot2: hoodoos: spidermonkey: 6 [21:39] isaacs: v8> 7+2 [21:39] v8bot: isaacs: 9 [21:39] isaacs: there are so many damn bots in this room [21:39] isaacs: ircretary: hello [21:39] ircretary: isaacs: Hello :) [21:39] chapel: all: while(a = 1){a = 1;} [21:39] gbot2: chapel: spidermonkey: Timeout. [21:39] hoodoos: hoodoos: 5 + 2 [21:39] bradleymeck: more boooots moooooore [21:39] hoodoos: 8 [21:39] chapel: :) [21:39] hoodoos: this one is kinda buggy.. [21:39] saschagehlich: what the hell. [21:39] bradleymeck: anyone have a sucess with oauthing a POST to twitter [21:40] chapel: bradleymeck << yeah [21:40] chapel: what do you need? [21:40] ryah_: jefe++ [21:40] v8bot: ryah_ has given a beer to jefe. jefe now has 1 beers. [21:40] chapel: node-oauth is what I used [21:40] igorgue has joined the channel [21:40] isaacs: v8bot++ [21:40] v8bot: isaacs has given a beer to v8bot. v8bot now has 5 beers. [21:40] isaacs: v8bot++ [21:41] v8bot: v8bot is getting too many beers. Don't let v8bot get drunk! [21:41] saschagehlich: isaacs: okay, good idea (vmware image) [21:41] chapel: would e hilarious if v8bot got drunk and then would fudge its math [21:41] ph^ has joined the channel [21:41] TheEmpath: ACTION sigh. [21:41] isaacs: saschagehlich: there may be some ways to get jefe to do that job for tyou [21:41] chapel: be [21:41] TheEmpath: socket.io.js simply cannot load [21:41] hoodoos: v8bot++ [21:41] v8bot: v8bot is getting too many beers. Don't let v8bot get drunk! [21:41] TheEmpath: and nothing i try helps [21:41] hoodoos: how much till it leaves? [21:41] TheEmpath: it just isn't f*ckin possible [21:41] cardona507: don't make the bot puke :) [21:42] isaacs: TheEmpath: i have trouble believing that it is not possible to load socket.io [21:42] isaacs: TheEmpath: empirical results disagree with that assertion [21:42] TheEmpath: isaacs: http://67.23.45.138:8000 is the page [21:42] TheEmpath: http://67.23.45.138:8000/socket.io/socket.io.js is where it should be according to ten hojillion tutorials, examples, and git repos [21:42] TheEmpath: and yet, a blank page every single time no matter what i do [21:43] chapel: is socket.io.js dynamically generated? [21:43] isaacs: TheEmpath: without seeing the code for this thing, i can't really help you with it [21:43] TheEmpath: lemme provide highlights one sec [21:44] isaacs: TheEmpath: i mean, how are you serving all the other code? [21:44] isaacs: the /client.js and such? [21:44] chapel: bradleymeck << you were asking about twitter and posting to it? [21:44] TheEmpath: i have no damn idea [21:44] konobi: doesn't socket.io turn requests under /socket.io into websocket requests? [21:44] TheEmpath: the http server works ifine [21:44] TheEmpath: socket.io has no idea about anything [21:44] konobi: by default it takes over /socket.io/* [21:44] TheEmpath: i believe also that socket.io intercepts requests and routes them [21:44] Wizek: If I create a node.js http server, how can I tell the browsers not to look for favicons? [21:45] isaacs: Wizek: you can't. [21:45] chapel: just serve a favicon [21:45] isaacs: Wizek: all browsers will at least try to ping /favicon.ico [21:45] cardona507: tell em what else the've won Al! [21:45] chapel: give it a blank gif renamed .ico [21:45] jimt_ has joined the channel [21:45] konobi: you can also stick it in a meta tag, iirc [21:45] chapel: yeah [21:45] chapel: but they usually ping for the file too [21:45] hoodoos: Wizek, use lynx :) [21:45] isaacs: konobi: with firefox and chrome, at least, it doesn't load the meta tag until *after* loading the page, and at that point, it's already downloaded the favicon.ico [21:45] dysinger has joined the channel [21:46] isaacs: konobi: it fetches the favicon as soon as the dns is done, in parallel with the main request [21:46] chapel: unless it doesn't exist at the default spot and the metatag has a different location [21:46] isaacs: konobi: or loads it from cache, which it keeps *FOR DAMN EVER*, even if you hard-refresh [21:46] konobi: yar [21:46] isaacs: favicons are served in a separate sqlite file [21:46] isaacs: *stored [21:47] igorgue has joined the channel [21:48] igorgue_ has joined the channel [21:49] dmcquay has joined the channel [21:49] TheEmpath: isaacs: here is a short example of the basic things im doing to get socket.io connected [21:49] TheEmpath: http://gist.github.com/645850 [21:49] konobi: TheEmpath: socket.io takes over /socket.io* [21:50] TheEmpath: yes, it should [21:50] TheEmpath: but something else is missing [21:50] konobi: move your socket.io.js to somewhere that isn't under /socket.io [21:51] TheEmpath: but wouldn't that ruin dependancies? [21:52] TheEmpath: these are all the locations of socket.io http://gist.github.com/645858 [21:52] konobi: TheEmpath: http://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/listener.js#L114-145 [21:53] dmcquay has joined the channel [21:53] TheEmpath: so its a fixed position that socket.io has to be in? [21:53] pquerna: code review on if anyone is up for it... [21:54] pquerna: https://gist.github.com/948fb019710245f88152 is an example server [21:55] TheEmpath: konobi: i need more context. does that means that socket.io demands that these files are in a fixed directory, independant of requires.unshift()? [21:55] konobi: TheEmpath: socket.io.js is the Socket.io client library [21:55] konobi: what you're dealing with is the server library [21:55] konobi: therefore, you need both, as described in the Socket.io-node README [21:56] TheEmpath: but not in the socket.io readme [21:56] cataska has joined the channel [21:56] konobi: Requirements [21:56] konobi: Node v0.1.103+ [21:56] konobi: Socket.IO client to connect from the browser [21:57] TheEmpath: so this goes back to my very initial question [21:57] TheEmpath: npm install socket.io does -NOT- install all the dependancies [21:58] konobi: sure it does... but the browser client is not a required dependency [21:58] TheEmpath: unless im supposed to connect to socket.io with.. i dunno... smoke signals [21:58] konobi: it's optional [21:58] Anti-X: it should be required [21:58] Anti-X: if nothing else then for not having to debug a non-error [21:58] TheEmpath: thank you for clearing that up [21:58] TheEmpath: i'll get on it after this meeting [21:58] konobi: i use websockets without browsers [21:59] konobi: i'd rather not have to download and install a random dependency [21:59] konobi: especially since it's not a nodejs dependency, but a web app dependency [21:59] isaacs: TheEmpath: node is also a websocket client, you know :) [22:01] Tim_Smart has joined the channel [22:01] bradleymeck: im about to smack twitter with a lead pipe [22:02] saschagehlich: looks like jefe is compiling the code with v8 and not with node? [22:03] sudoer has joined the channel [22:04] hsuh has joined the channel [22:04] Blackguard has joined the channel [22:06] amerine has joined the channel [22:06] johngbrooks has joined the channel [22:07] Wizek: On a html server, why passing an array to response.end(FOO); wont work, but response.end(""+FOO); will? [22:08] isaacs: Wizek: because FOO is not a string or buffer, perhaps? [22:08] isaacs: (just a wild guess) [22:08] Wizek: Yea, array of numbers. But what's the problem with that one? [22:09] jacoblyles has joined the channel [22:09] isaacs: Wizek: you can't write() an array of numbers. [22:09] isaacs: Wizek: it has to be a string or buffer. [22:10] Wizek: But I can console.log() it. Why can't I write it? [22:10] Wizek: isaacs: And also, how can I buffer it? [22:10] Tim_Smart: JSON.stringify() [22:11] isaacs: Wizek: because write() is not the same as console.log :) [22:11] isaacs: Wizek: socket writes must be either strings or buffers. [22:11] isaacs: Wizek: any other type of thing will go boom. [22:11] zemanel has joined the channel [22:12] Wizek: Tim_Smart: That doesn't seem to work over here [22:13] isaacs: Wizek: so, is your array of numbers something that you want to stringify like "[1,2,3]", or does it represent a stream of bytes? [22:13] Wizek: the former [22:13] isaacs: Wizek: then response.end( JSON.stringify([1,2,3]) ) [22:14] isaacs: Wizek: or call .toString() [22:14] isaacs: FOO.toString(), or ""+FOO, or FOO+"" [22:14] isaacs: a lot of ways to stringify something in js [22:14] Wizek: okay, thanks :) [22:14] Wizek: Also, why doesn't it provide with an error message? [22:15] Tim_Smart: We would recommend JSON.stringify though, it is a more widely accepted data format. [22:15] isaacs: Wizek: no good answer for that one :) [22:15] Wizek: When write() gets something not good? [22:15] isaacs: Wizek: patch welcome, i'm sure :) [22:15] isaacs: Wizek: it can't just toString() everything, because with buffers you actually want to pass the raw bytes through [22:15] evanpro has joined the channel [22:15] isaacs: but it'd be nice if it emitted an error event or threw or something [22:17] scnd has joined the channel [22:18] sivy: ok, stupid express question. I added the staticProvider in my app.config, do I need a route for it as well? [22:18] sivy: tjholowaychuk ^^ ? [22:18] Tim_Smart: It seems node just does a typeof === 'string' check, if it fails, assumes it is a Buffer. [22:19] tjholowaychuk: sivy: nope [22:19] sonnym has joined the channel [22:19] stepheneb_ has joined the channel [22:20] sivy: tjholowaychuk: hm. i have a route on /:placeholder that's eating the /static request [22:20] sivy: ACTION expects the answer "don't do that" [22:21] tjholowaychuk: sivy: you can either put the staticProvider above use(app.router) <-- (if you even have that) or next() within that route [22:21] tjholowaychuk: to pass control to staticProvider [22:22] sivy: ah [22:22] sivy: ok [22:22] tjholowaychuk: or you need to disambiguate [22:22] twoism has joined the channel [22:23] ysimonson has joined the channel [22:25] creationix has joined the channel [22:25] igorgue has joined the channel [22:25] bradleymeck: i swear to god twitter, if you dont make oauth resemble the spec or rest apis, why even use them [22:27] creationix: anyone know how to use an osx laptop to locate an 802.11g client [22:27] creationix: I know the client's mac address and it's connected to my local AP [22:27] creationix: but I can't find it [22:28] halfhalo: I hate osx's network thing, its crap with windows pc's [22:28] halfhalo: and creationix, congrats about the job [22:28] creationix: (my children have misplaces my iPod Touch yet again) [22:28] creationix: halfhalo: thanks, I'm excited [22:29] halfhalo: hah... [22:29] digitalspaghetti: tjholowaychuk: now that 0.3 is out, will you be updating express any time soon? :D I'm getting some 'weird' bugs :p [22:29] tjholowaychuk: digitalspaghetti: i dont really get why we have tags in the unstable branch [22:29] digitalspaghetti: for example I have a post route that 404's, then works when you request it the next time [22:30] digitalspaghetti: yea, i'm thinking i should probably go back to 0.2.x for now (which means i need to change all my utils back to sys but oh well :P) [22:30] tjholowaychuk: to me 0.3.0 should represent 0.3.x becoming stable, and moving on to 0.4.x [22:30] digitalspaghetti: fairy snuff [22:31] Tim_Smart: digitalspaghetti: Just do: `git checkout v0.3.0 && ./configure ..` [22:31] Tim_Smart: That uses waf. [22:31] Tim_Smart: Oh wait, wrong problem. [22:32] Wizek: can I do .replace() in JS for RegExp? [22:32] Tim_Smart: Yeah. string.replace(regex, replace string/function) [22:32] digitalspaghetti: ACTION hates regexs [22:33] ajpiano has joined the channel [22:33] aurynn: That's like hating bicycles, or hammers. They're useful tools. [22:33] Wizek: sometimes they are useful. But still need to learn them [22:33] digitalspaghetti: yea, they are powerful but so are nuclear bombs [22:33] digitalspaghetti: doesn't mean they are good for you :D [22:33] Tim_Smart: regex's are very fast in v8 [22:34] aurynn: Nuclear bombs gave us fission reactors, which gave us radiation treatment for diseases. [22:34] Tim_Smart: Compared to other JS VM's anyway. [22:35] nodejs has joined the channel [22:35] nodejs: Hey, I'm a node.js irc bot. Let me compile your node code with !node [yourcode]. [22:36] saschagehlich: !node while(true) {} [22:36] nodejs: saschagehlich: Timed out. [22:36] saschagehlich: hm. try to kill him. [22:36] TheEmpath: konobi: i cloned socket.io-node with --recursive to the /usr/local/lib/node/socket.io-node path and it made no difference. socket.io.js still returns a blank file [22:36] _mythz: !node while(i++<10){console.log("hello")} [22:36] nodejs: _mythz: ReferenceError: i is not defined [22:37] halfhalo: !node require('fs').readDir('/') [22:37] nodejs: halfhalo: TypeError: object is not a function [22:37] _mythz: !node var i=0; while(i++<10){console.log("hello")} [22:37] nodejs: _mythz: TypeError: Cannot call method 'binding' of null [22:37] _mythz: grrrr [22:37] saschagehlich: huh [22:37] Wizek: Hah, had some headache to write regex only to find out .replace only replaces the first it encounters :D [22:37] rsms: ryah_: pibng [22:38] rsms: ping* [22:38] Tim_Smart: Wizek: Set the global flag. [22:38] _mythz: !node var i=0; while(i++ <10){sys.print("hello")} [22:38] nodejs: _mythz: ReferenceError: sys is not defined [22:38] digitalspaghetti: mind if i try break it? [22:38] saschagehlich: digitalspaghetti: try, but don't kill my mac ;) [22:38] Wizek: Tim_Smart: you mean WhiteFlag=true; so that node knows I gave up? :D [22:38] Tim_Smart: v8: 'repeat repeat'.replace(/repeat/g, 'stop') [22:38] v8bot: Tim_Smart: "stop stop" [22:39] digitalspaghetti: well i might kill the channel with this test [22:39] rsms: ryah_: I've finally got everything together, with $arch normalization (thus cross compilation possible) and creation of libnode.a (dynamic library creation still WIP). [22:39] _mythz: !node var sys=require('sys'); var i=0; while(i++ <10){sys.print("hello")} [22:39] nodejs: _mythz: TypeError: object is not a function [22:39] _mythz: wth [22:39] TheEmpath: is there any modern documentation that actually works on how to setup socket.io? [22:39] digitalspaghetti: !node while(true) { console.log('foo'); return true;} [22:39] nodejs: digitalspaghetti: TypeError: Cannot call method 'binding' of null [22:39] saschagehlich: _mythz: no require [22:39] alxc1: !node (function(sys){sys.print('print');})(require('sys')) [22:39] nodejs: alxc1: TypeError: object is not a function [22:39] pquerna: after I opened stdin, ho am I supposed to close it? [22:39] saschagehlich: wait a sec [22:39] saschagehlich: wtf is that... [22:39] _mythz: how can i print? [22:39] TheEmpath: i github, google, nothing has anything that actually works at all [22:39] pquerna: var stdin = process.openStdin(); stdin.end(); <- results in Error: ENOTSOCK, Socket operation on non-socket [22:40] _mythz: !node var i=0; while(i++ <10); i [22:40] nodejs: _mythz: Code compiled, no errors. [22:40] _mythz: !node var i=0; while(i++ <10); return i [22:40] nodejs: _mythz: Code compiled, no errors. [22:40] _mythz: !node var i=0; while(i++ <10); return i; [22:40] nodejs: _mythz: Code compiled, no errors. [22:40] saschagehlich: lol okay [22:40] _mythz: i don't get it, how do we see the result? [22:40] saschagehlich: give me a sec [22:41] saschagehlich: I did some bad things there [22:43] TheEmpath: is there any special place the socket.io-node has to be checked out to? [22:43] ysimonson has joined the channel [22:44] TheEmpath: any concurrent docuemntation on how to set it up? this trial and error business is beyond frustrating [22:44] nerdEd has joined the channel [22:45] Tim_Smart: saschagehlich: We already have 'v8:', and 'js>', I'm not sure we need another one :p [22:45] Tim_Smart: js> 'test' [22:45] gbot2: Tim_Smart: "test" [22:45] Tim_Smart: v8: 'test' [22:45] v8bot: Tim_Smart: "test" [22:46] saschagehlich: js> new Buffer("blurb"); [22:46] gbot2: saschagehlich: Error: ReferenceError: Buffer is not defined [22:46] saschagehlich: js> JSON.stringify({ hello: "yea" }) [22:46] gbot2: saschagehlich: "{\"hello\":\"yea\"}" [22:46] Tim_Smart: js> is spidermonkey, v8 is node [22:46] gbot2: Tim_Smart: Error: SyntaxError: missing ; before statement: is spidermonkey, v8 is node ...^ [22:46] TheEmpath: !node // make socket.io setup comprehensive, a bit more intuitive, and better documented because this is enough to start a world war [22:46] nodejs: TheEmpath: Code compiled, no errors. [22:46] saschagehlich: oh well it knows Json. cool :D [22:46] creationix: js> "v8:'hi'" [22:46] gbot2: creationix: "v8:'hi'" [22:46] saschagehlich: Tim_Smart: v8 isn't node [22:47] Tim_Smart: v8: Buffer [22:47] v8bot: Tim_Smart: ReferenceError: Buffer is not defined [22:47] Tim_Smart: Hmm they need to make a decent sandbox., [22:47] charlenopires has joined the channel [22:48] Tim_Smart: saschagehlich: 'v8:' is running in a clean v8 context, with console.log injected. [22:48] Tim_Smart: Can't remember the author though. [22:48] ysimonson: anyone have a recommendation for a node.js irc library? [22:48] TheEmpath: does anyone have time to help me comrehensively troubleshoot socket.io connections? i've been trying everything for like 3 hours now and nothing works [22:48] Tim_Smart: rauchg_: ^ [22:48] jesusabdullah: ysimonson: Yeah [22:49] TheEmpath: every single tutorial i've come across simply doesn't work. it just dont. it fails and socket.io.js always, always, always returns a blank file [22:49] saschagehlich: TheEmpath: any errors? [22:49] rauchg_: TheEmpath: [22:49] TheEmpath: no errors [22:49] rauchg_: master or 0.5.3 ? [22:49] jesusabdullah: ysimonson: npm install irc :v [22:49] TheEmpath: i wish ther was errors [22:49] rauchg_: if you're using 0.5.3 you serve socket.io.js with something like connect [22:49] rauchg_: socket.io at master serves the client for you [22:49] ysimonson: jesusabdullah: thanks [22:49] rauchg_: /socket.io/socket.io.js [22:50] jesusabdullah: ysimonson: Yeah, no problem [22:50] TheEmpath: rauchg_: whichever npm install socket.io provides [22:50] Tim_Smart: rauchg_: I thought you had a CDN these days :) [22:50] TheEmpath: 0.5.3 [22:50] rauchg_: Tim_Smart: yep but flash is giving me a hard time [22:50] rauchg_: from a different domain [22:50] Tim_Smart: Hah always flash... [22:50] rauchg_: even though im using the "insecure" swf [22:51] TheEmpath: i serve socket.io.js with something like connect? i current have an httpServer running that the io.listen is bound to [22:51] TheEmpath: but that's not sufficient? [22:51] rauchg_: TheEmpath: nop [22:51] TheEmpath: aww dan it [22:51] rauchg_: socket.io only intercepts "realtime" requests [22:51] rauchg_: serving a file is a regular request-response [22:51] rauchg_: but 0.6 will also serve the file for ease of use [22:51] TheEmpath: so i have to create a special exception in my http server to route socket.io calls to something [22:51] rauchg_: i was hesitant to do it but then i realized [22:52] rauchg_: i can use load the client in node [22:52] rauchg_: get the version number [22:52] rauchg_: and use that as the ETag [22:52] saikat has joined the channel [22:52] rauchg_: so it's cached and all. [22:52] TheEmpath: so how can i resolve this? [22:52] rauchg_: use connect staticProvider [22:52] TheEmpath: if there is an example, that would be infinitely more helpful [22:52] rauchg_: and serve socket.io.js [22:52] rauchg_: or [22:53] rauchg_: git clone --recursive the `master` branch [22:53] braddunbar has joined the channel [22:53] rauchg_: and point the