[00:03] fictorial: working through cleaning up the redis client with latest node and redis versions. anyone know what is wrong here? http://gist.github.com/349765
[00:08] mjr_: That looks mysterious to me.
[00:08] mjr_: net.js:649 seems to check for _readWatcher
[00:09] fictorial: Right
[00:09] fictorial: I'm not sure if the latest docs are up to date with HEAD so I'm looking through the source...
[00:10] rektide: _ry: you mentioned a patch to try on this concurrent httpClient issue i'm having ?
[00:10] mjr_: The docs on the website don't match head. The api.markdown file at HEAD matches a bit more closely.
[00:10] rektide: i dont see anything public new since last night when i tried
[00:11] fictorial: Yeah I meant the HEAD api.markdown actually.
[00:12] mjr_: I've been working on updating api.markdown. If you notice anything that's glaringly incorrect, let me know.
[00:14] rektide: xla: thanks for the mu hit, i've forgotten that a couple times already.
[00:14] rektide: my unit testing framework is almost awesome as fuck
[00:14] rektide: its only missing good templating
[00:16] RayMorgan: _ry: Now that AMQP is a disowned child are you planning on doing anything with ZMQ?
[00:16] fictorial: hmmm, I cannot figure out what the problem is - the tests in tests/simple works fine
[00:17] rektide: *sigh* what the christ
[00:17] konobi: RayMorgan: i doubt it... ZMQ is LGPL
[00:17] RayMorgan: or 0MQ
[00:18] RayMorgan: yeah, but it doesn't have to be bundled with Node
[00:18] rektide: is zedshaw the the patient-0 carrier of the 0MQ meta-memetic-virus ?
[00:19] rektide: iMatrix's test subject ?
[00:19] rektide: if so, splashing success on the mass attack memetic virus. total raize and burn, get everyone right away.
[00:19] mcarter has joined the channel
[00:20] rektide: hello michael
[00:20] rektide: i'm going to be doing a post-comet thing at jsconf
[00:20] rektide: i think you might be able to appreciate some of it; any chance you'll be there?
[00:21] mjr_: bah, everyone is going to jsconf except me.
[00:22] maritz: can anyone here help me with a small monit question? (or do they have an irc channel somewhere?)
[00:23] rtl has joined the channel
[00:23] maritz: i want to do 2 actions on a single if. is that possible? or do i have to clone the if and do each action on its own?
[00:24] orlandov: .
[00:27] orlandov: Tim_Smart: hey i was wondering you still had your non-compiling node-sqlite setup
[00:27] orlandov: so i can test a fix :)
[00:28] _ry: RayMorgan: i'm going to write my own mq
[00:28] _ry: not impressed with 0mq
[00:29] rektide: word
[00:30] rektide: i'm undecided whether its impressive or trendy that it supports SCTP
[00:30] rektide: i want to give it the nod on this on
[00:30] rektide: e
[00:30] orlandov: _ry: you're a beast
[00:30] _ry: i love writing little servers and a mq server is perfect
[00:30] _ry: i mean - it's almost trivial
[00:31] konobi: RDMA and infiniband would be fun... but meh
[00:31] rektide: it'd be a great test of eventemitters
[00:31] konobi: (RDMA is super awesome)
[00:31] RayMorgan: _ry: awesome
[00:31] _ry: i would't use node though. not going to beat any benchmarks with that
[00:31] RayMorgan: that should prove to be pretty fun
[00:31] RayMorgan: yeah
[00:32] orlandov: can't be worse than erlang :)
[00:32] orlandov: ACTION ducks
[00:32] rektide: there's that ending where the mad scientist gets locked in the tower, mad with his reasearch
[00:32] RayMorgan: you have to beat the benchmarks or it isn't a worthy MQ :)
[00:32] _ry: i think a node mq could beat rabbit :)
[00:32] rektide: you'll be at that stage when we or you yourself start the task in OpenCL.
[00:32] _ry: erlang is kinda slow from what i've seen
[00:33] _ry: but think about it - it's truely a simple program
[00:33] mjr_: I don't think fastness is erlang's goal.
[00:34] _ry: the one difficulty is wild card bindings
[00:34] _ry: you need to get a little CS-y
[00:34] orlandov: ACTION tries to think of how the pigeon-hole principle applies to this
[00:35] _ry: (well - i admit it can be made into a large problem if you allow all the features of AMQP - but i'd restrict it to a very small feature set)
[00:35] konobi: _ry: well... you could always so some sort of bitmask style thing... similar to how you would test if an IP was in a subnet
[00:36] _ry: konobi: hmm
[00:36] _ry: konobi: not sure how that'd translate to strings
[00:36] konobi: the strings are just identifiers
[00:38] _ry: konobi: oh
[00:38] _ry: konobi: hmm - maybe
[00:39] _ry: konobi: so you'd take 'xxx.yyy.zzz' and look up each component in a dictionary
[00:39] fictorial: _ry: what about 0mq are you not impressed with? I'm curious.
[00:39] fictorial: also, any idea what's up here? http://gist.github.com/349765
[00:39] konobi: konobi: something like that, yar
[00:39] orlandov: Tim_Smart: anyhow, i you get a chance could you try this patch: http://gist.github.com/349794 and see if that fixes your problem?
[00:39] orlandov: *if
[00:40] _ry: fictorial: iirc the client libraries were super funky blocking type things
[00:40] _ry: i guess that doesn't reflect on the server
[00:40] fictorial: ah, yes, they are that's true
[00:40] fictorial: right - the server is amazingly fast.
[00:40] konobi: still... LGPL
[00:41] fictorial: so what?
[00:41] konobi: LGPLv3 even
[00:41] konobi: fictorial: talk to a lawyer about trying to "ship" software that's LGPL
[00:41] _ry: konobi: ok so i have a queue and i bind it to 'xxx.*.zzz'
[00:41] fictorial: konobi: are you shipping 0mq? :-p
[00:42] konobi: fictorial: it would be a requirement
[00:42] _ry: it creates an entry in the dict "xxx" => 0x0001
[00:42] deanlandolt: konobi: what's the problem with "shipping" LGPL'd software?
[00:42] _ry: and an entry "zzz" => 0x0002
[00:42] fictorial: konobi: how so? you don't need to bundle it.
[00:42] _ry: hm
[00:42] fictorial: that's the point of lgpl anyway isn't it? that you dynamically link to it so an end-user can swap out the .so with a compatible abi?
[00:43] deanlandolt: it very explicitly allows you to...and 0mq even expands on the exception to eliminate any and all linking ambiguities
[00:43] fictorial: anyway I don't care :)
[00:43] fictorial: I rather hate license issues in general
[00:43] konobi: deanlandolt: it also give everyone the permission to reverse engineer all of your software
[00:44] konobi: anyways... it costs a chunk of money to get it past the lawyers
[00:44] deanlandolt: konobi: people always have permission to reverse engineer your software...but hear ya on the lawyers ;)
[00:45] deanlandolt: reverse engineering is (as far as i know) still legal...and i hope we can keep it that way :D
[00:45] orlandov: reverse engineering is a weird area anyway
[00:45] fictorial: are you actually "shipping" anything btw? I have a hard time envisioning client side 0mq deployments, especially considering one that's somehow bundled with node.js :)
[00:45] deanlandolt: the only two things that legally prevent it in any area are patents and the dmca
[00:45] konobi: MIT/BSD/APL/MPL... no lawyers required
[00:46] deanlandolt: konobi++ -- couldn't agree more :D
[00:46] deanlandolt: though the MPL is pretty similar to the LGPL in some respects
[00:46] konobi: reverse engineering is legal... but there are a HUGE amount of restraints around it... LGPL specifically grants a way around those restraints
[00:47] deanlandolt: hmm, interesting...hadn't ever heard that
[00:47] konobi: ACTION spent several weeks going back and forth with a OSS expert lawyer about the specifics of it
[00:48] deanlandolt: ACTION pities konobi
[00:48] konobi: we worked around LGPLv2 by writing wrapper programs... but you don't get that benefit with LGPLv3
[00:48] fictorial: has there been any precendents set in regards to this stuff or is just "expert opinion" at this stage
[00:48] fictorial: bah, that sucks!
[00:49] konobi: problem is that GPL/LGPL aren't written in lawyer speak
[00:49] orlandov: konobi: why do you hate RMS
[00:49] konobi: so there's not a lot of case law around it yet
[00:49] konobi: he's an arsehole in real life too
[00:49] deanlandolt: fictorial: there's very little case law in general...hell, they don't even have the case law sorted out w/ issues that /have/ seen the courtroom (e.g. clickthrough eulas)
[00:50] fictorial: heh, ok
[00:50] mjr_: I don't see how xGPL helps anybody. If you want people to use the software, you should let them use it however they want to. If you've given them the source code, then let them build it into their product.
[00:50] konobi: BSD is a free-er licence that GPL imho
[00:50] mjr_: right
[00:51] konobi: and in the majority of the case BSD hackers contribute back anyway
[00:51] deanlandolt: it depends on if you see software as a tool or a moral imperative i guess
[00:51] mjr_: I think GPL ends up hurting open standards because commercial types can't use existing implementations of standard stuff.
[00:51] konobi: bit of both really
[00:51] konobi: anywhos... gotta dash
[00:52] RayMorgan: I did a presentation at our local JS group on Node.js (will upload video later) but had a demo fail when I tried to demo this on the fly: http://gist.github.com/349792 I expected it to output the two parts separated by 2 seconds. Any ideas of what I did wrong?
[00:53] RayMorgan: also tried after the first response.write("Hello"); putting response.write(" "); just to see if the second would trigger streaming, but that didn't work either
[00:53] _ry: RayMorgan: the first write is buffered
[00:54] _ry: hm
[00:56] rektide: _ry: you'd mentioned a patch to try w/r/t concurrent httpClient's not triggering 'response' events
[00:56] rektide: i may have mis-understood?
[00:57] _ry: RayMorgan: works for me
[00:57] RayMorgan: are you on head or 0.1.33?
[00:58] _ry: rektide: i was asking you to make me a patch with a test/pummel script
[00:58] rektide: i am on head
[00:58] _ry: RayMorgan: head
[01:00] mjr_: It doesn't work for me. I get two chunks delivered, but they both come at the same time.
[01:00] rektide: git pull git://git.voodoowarez.com/pipe-layer.git ; cd pipe-layer ; (node src/main/nodejs/runtime.js) & ; (cd src/tests/nodejs; node runner.js test-queue.js) will show it right now
[01:01] fictorial: I'm a little confused by the new Stream code in HEAD. socket._readWatcher is not being set it seems. wtf
[01:01] james has joined the channel
[01:01] rektide: (cd src/tests/nodejs ; ./wget.sh) will download three requests. test-queue runs three requests, but only gets two back, 90% of the time. and its 45/45% which reply it does get back.
[01:02] RayMorgan: _ry, rektide: what OS did you test on?
[01:02] RayMorgan: and mjr_
[01:02] RayMorgan: I am on OSX
[01:02] mjr_: I'm on OSX
[01:02] rektide: this is debian testing running 2.6.32.8
[01:02] RayMorgan: maybe it is a OSX thing?
[01:03] mjr_: I get the same thing on ubuntu 9.10
[01:03] rektide: creating a test rig for an http server and http client to demonstrate concurrency issues is a pita
[01:03] rektide: can i at least posit some server, publically hosted, with known response patterns
[01:04] _ry: rektide: can you patch it into the source tree?
[01:04] rektide: i dont have a fix or an isolation, just a test case to show it happening
[01:05] _ry: that's okay
[01:05] _ry: i prefer a failing test to nothing
[01:10] bpot has joined the channel
[01:11] maritz: hey. When I start my node app via monit, I get "Error: No such file or directory at node.js:845:9". I believe that this is due to the fact that monit spawns the node process with an empty environment. How would I best fix this?
[01:18] maritz: nwm, it's something entirely else... *stupid me*
[01:20] RayMorgan: _ry: do you have to add a flag to curl to get it to output the chunks as they come in? It works when I use a Node http client, but curl just waits and outputs everything at once
[01:21] RayMorgan: ah got it
[01:22] RayMorgan: needed "--no-buffer"
[01:24] _ry: RayMorgan: stdout is line buffered generally
[01:24] _ry: so i threw a \n in there
[01:24] RayMorgan: ah
[01:24] RayMorgan: that would explain it
[01:24] RayMorgan: well, I learned something today :)
[01:24] RayMorgan: thanks
[01:28] dandean has joined the channel
[01:46] dnolen has joined the channel
[01:48] r11t has joined the channel
[01:53] mikeal1 has joined the channel
[02:03] isaacs has joined the channel
[02:04] rictic has joined the channel
[02:07] jashkenas has joined the channel
[02:08] ditesh|cassini has joined the channel
[02:11] jed has joined the channel
[02:14] rektide: this bug is slaughtering me
[02:14] rektide: if i add too much debugging the concurrency bug does away
[02:15] rektide: FRAK YOU HEISENBERG
[02:15] malkomalko has joined the channel
[02:20] fictorial: haha
[02:21] fizx has joined the channel
[02:24] ditesh|cassini has joined the channel
[02:27] RayMorgan has joined the channel
[02:29] paul_____ has joined the channel
[02:29] technoweenie has joined the channel
[02:30] charlesjolley has joined the channel
[02:33] Aria has joined the channel
[02:36] sh1mmer has joined the channel
[02:37] JimBastard has joined the channel
[02:42] bmizerany has joined the channel
[02:54] dnolen has joined the channel
[02:58] joshbuddy has joined the channel
[02:58] joshbuddy has joined the channel
[03:12] freshtonic has joined the channel
[03:13] RayMorgan has joined the channel
[03:17] rektide: christ this night is going to die like that last
[03:19] tk has joined the channel
[03:24] BryanWB has joined the channel
[03:37] jed_ has joined the channel
[03:45] micheil has joined the channel
[03:47] creationix has joined the channel
[03:48] creationix: why do I get "TypeError: Object # has no method 'write'" on HEAD?
[03:49] creationix: According to the latest docs it should have a write function
[03:49] creationix: I'm trying to update my sqlite driver to benchmark it against the new native one
[03:51] creationix: oh yeah, the net2 stuff isn't documented yet, I forgot
[03:51] PyroPete1 has joined the channel
[03:51] creationix: I'll bet the "stdin" property has something I can write to
[03:51] jashkenas: creationix: You know anything about the ETA on net2?
[03:52] creationix: it's already merged, and as soon as the bugs are fixed and the docs updated it will be released
[03:52] creationix: no firm date though
[03:52] steadicat has joined the channel
[03:52] jashkenas: I'm just saying days or weeks or months...
[03:53] ditesh|cassini has joined the channel
[03:53] creationix: I'd guess weeks, but _ry know better what's left
[03:53] jashkenas: thanks.
[03:53] creationix: probably before ruby people actually use 1.9 mainstream ;)
[03:54] jashkenas: ouch.
[04:02] creationix: does anybody know how to set the encoding on a child process stdout stream
[04:02] creationix: I'm getting an array of integers
[04:07] rektide: _ry: i still dont have a test-http-server that can replicate the issue
[04:07] rektide: but the issue is with httpClient, and its a regression from v0.1.33
[04:07] rektide: i could prop up a web server for you to test again, although it requires some silly headers and stuff
[04:10] rektide: then give you the short httpClient test script taht shows the problems.
[04:10] jashkenas has left the channel
[04:11] micheil: hmm.. this could get interesting: IMAP / POP authentication over OAuth
[04:18] creationix: _ry: the sqlite driver you and orlandov made is way faster than my hack. Congrats!
[04:20] creationix: well, I'm off to bed...
[04:22] steadicat has joined the channel
[04:36] micheil: are there any websocket clients out there for node.js?
[04:46] admc has joined the channel
[04:48] mjr_ has joined the channel
[04:51] alex-desktop has joined the channel
[04:54] jbrantly has joined the channel
[04:58] ryan[WIN] has joined the channel
[04:58] jbrantly: micheil: yes. Have you looked at the available modules?
[04:59] micheil: I can see servers but not clients
[04:59] jbrantly: micheil: actually, re-reading what you said, clients
[04:59] jbrantly: right...
[04:59] micheil: :P
[04:59] micheil: ACTION will happily write one if no-one else has / is
[05:00] jbrantly: thats sort of a strange thing, but I guess it might have its uses
[05:01] jbrantly: in any case, I'm not aware of one
[05:01] micheil: well, it will have it's uses: such as connecting to a remote websocket server
[05:07] BryanWB has joined the channel
[05:17] teemow has joined the channel
[05:18] dnolen has joined the channel
[05:31] mikeal1 has joined the channel
[05:32] charlesjolley has joined the channel
[05:32] sveimac has joined the channel
[05:35] derbumi has joined the channel
[05:46] dnolen has joined the channel
[05:47] aguynamedben has joined the channel
[05:51] felixge has joined the channel
[05:51] felixge has joined the channel
[05:55] fictorial has joined the channel
[06:12] teemow has joined the channel
[06:15] jed has joined the channel
[06:18] mjr_: Updated api.markdown with examples of new API through child_process: http://github.com/mranney/node/blob/master/doc/api.markdown
[06:19] mjr_: still only 1/3 of the way through that file
[06:26] sveimac has joined the channel
[06:34] JimBastard has joined the channel
[06:36] qFox has joined the channel
[06:42] nsm has joined the channel
[06:48] halorgium: anyone happen to recall that http dump site where you can point scripts at and see the data being posted?
[06:49] isaacs has joined the channel
[06:49] JimBastard: negative
[06:49] JimBastard: just route the http requests through a proxy
[06:50] halorgium: JimBastard: yer, this was a service which you got a unique url and it'd save the data
[06:50] JimBastard: no totally i understand
[06:50] JimBastard: the thing im working on now will be able to do that
[06:51] JimBastard: >.<
[06:51] JimBastard: http://hook.io
[06:51] JimBastard: i have a debug action
[06:51] JimBastard: and you can create a unique URL
[06:51] halorgium: http://www.postbin.org/
[06:51] JimBastard: its just not launched yet
[06:51] JimBastard: awesome
[06:51] JimBastard: yeah
[06:51] JimBastard: same thing
[06:52] javajunky has joined the channel
[06:58] _ry: halorgium: http://hurl.it/ ?
[07:00] halorgium: _ry: nah, not making requests, receiving them
[07:01] brapse has joined the channel
[07:03] r11t has joined the channel
[07:20] xer0x has joined the channel
[07:30] Gruni has joined the channel
[07:30] qFox: has anyone managed to get node working on dreamhost?
[07:33] javajunky has joined the channel
[07:39] javajunky has joined the channel
[07:42] hellp has joined the channel
[07:45] tbassetto has joined the channel
[08:00] sveisvei has joined the channel
[08:05] mjr_: I gave up and just bought myself a $20 slicehost
[08:06] BryanWB has joined the channel
[08:28] xer0x: Have you seen Joyent's smart platform? For node hosting?
[08:37] markwubben has joined the channel
[08:37] zam3858 has joined the channel
[08:38] Gruni has joined the channel
[08:39] kixxauth has joined the channel
[08:50] jed has joined the channel
[09:00] TomY has joined the channel
[09:01] xla has joined the channel
[09:07] felixge has joined the channel
[09:07] felixge has joined the channel
[09:09] tbassetto has joined the channel
[09:20] maushu has joined the channel
[09:26] wes-away has joined the channel
[09:33] tisba has joined the channel
[09:38] TomY: anyone here using express?
[09:38] TomY: trying to figure out how to use express with node-promise...
[09:39] TomY: am wondering if i can return a promise from an action
[09:39] TomY: and have that promise return the rendered html
[09:42] piranha has joined the channel
[09:48] pdelgallego has joined the channel
[10:04] jage has joined the channel
[10:17] jed: what do OS X users here do to keep .DS_Store files from cluttering up readdir operations?
[10:38] hassox has joined the channel
[10:46] sveimac has joined the channel
[10:54] broofa: What projects are underway for allowing node.js code to also run in clients? e.g. What browser libs/support is there for CommonJS modules?
[10:57] hellp has joined the channel
[11:01] ssteinerX has joined the channel
[11:04] tav has joined the channel
[11:17] nsm has joined the channel
[11:19] jed has joined the channel
[11:24] micheil: jed: there is a tool for it, I forget what it's called though
[11:25] jed: micheil: a tool for removing the files?
[11:25] jed: or hiding them?
[11:25] micheil: broofa: do you need your serverside code to run in the client?
[11:25] micheil: jed: removing them
[11:30] Tim_Smart has joined the channel
[11:30] micheil: jed: http://www.maintain.se/cocktail/index.php
[11:30] jed: micheil: hmmm, seems like there's a lot of software for preventing them on network drives, but that's about it.
[11:31] micheil: that's for any drive
[11:31] jed: micheil: have you used this? it says it deletes them, but only prevents them for network drives.
[11:31] micheil: "• Delete DS Store files from disks or folders and their subfolders
[11:31] micheil: "
[11:31] micheil: I have used it, and it works fairly well
[11:31] micheil: although, I didn't have money at the time to buy the app, so uninstalled it
[11:32] jed: so, once it deletes them, are they gone forever? doesn't the finder just recreate them?
[11:32] jed: ah well, i guess i just need to try it.
[11:32] micheil: they are gone until finder recreates them
[11:32] jed: micheil: thanks for the tip!
[11:32] micheil: but it runs as a service and watches for them
[11:32] jed: ah, nice.
[11:33] jed: micheil: will check it out now.
[11:34] micheil: urgh. need to restart for updates, bbs.
[11:36] xla: jed: Finder only creates .DS_Store files if you opening the dir in a finder window
[11:36] jed: xla: yeah, i do that a lot.
[11:36] xla: jed: used cocktail, maybe micheil is right about the observer who is auto-delete them, but dunno
[11:38] jed: xla: i'll report back once i know.
[11:50] undefined has joined the channel
[12:03] alex-desktop has joined the channel
[12:03] xla has joined the channel
[12:03] csarven has joined the channel
[12:08] confounds has joined the channel
[12:11] javajunky: Hmm, any suggestions on how I could (painlessly) open 100 chrome instances on my mac pointing at the same site (I'm not trying to benchmark, just testing something)
[12:14] tbassetto has joined the channel
[12:15] micheil has joined the channel
[12:17] javajunky: meh I'll do it from javascript
[12:21] ashb: javajunky: selenium perhaps?
[12:21] ashb: it's got logic to launch browsers at any rate
[12:28] javajunky: ashb: yeah thanks I considered that, for my needs right now, javascript is working a treat ;) ..was trying to be too clever with applescript!
[12:46] kriszyp has joined the channel
[13:02] dnolen has joined the channel
[13:09] rolfb has joined the channel
[13:11] derbumi has joined the channel
[13:13] jherdman has joined the channel
[13:41] paul_____ has joined the channel
[13:42] brainproxy: I'm getting this after running a particularly blistering pair of node processes for a few minutes
[13:42] brainproxy: (evcom) socket() Too many open files
[13:44] brainproxy: running v0.1.30
[13:45] joshbuddy has joined the channel
[13:49] felixge: _ry: are you interested in multipart support for http client?
[13:50] felixge: brainproxy: you need to set ulimit. Make sure you are root, then run 'ulimit -n 99999'
[13:50] felixge: (on OSX you can't go beyond 9999 I think)
[13:51] xla: felixge: brainproxy: it's kinda easy to get this error under OS X
[13:51] _ry: felixge: for requests you mena?
[13:51] felixge: _ry: yeah, so you can do file uploads with node
[13:51] brainproxy: xla: thanks, actually, I was running it under an ubuntu VM on OS X
[13:51] xla: felixge: is there an obvious use case? just curious
[13:51] _ry: i suppose
[13:52] brainproxy: not I'm trying on a Linux VM hosted by Rackspace Cloud
[13:52] felixge: xla: yes, uploading files is the main use case
[13:52] brainproxy: *now
[13:52] felixge: _ry: ok. I'll start thinking about an API for that
[13:52] _ry: brainproxy: what are you doing to those poor processes?
[13:53] felixge: brainproxy: you will still have to set ulmit
[13:53] felixge: * ulimit
[13:53] keeto has joined the channel
[13:53] xla: felixge: is it intended that http client and server are identical api wise?
[13:53] felixge: brainproxy: otherwise your fun ends at 1024 connections afaik
[13:53] brainproxy: ry I'm trying to push graphing datasets every few hundre milliseconds
[13:53] brainproxy: through node/redis
[13:53] felixge: xla: well, maybe it would be low level. So you wouldn't be able to directly upload files, but at least use the multipart module to generate the http message body for stuff like it
[13:54] brainproxy: felixge: ah good point
[13:54] felixge: I guess low-level is better
[13:54] _ry: brainproxy: how big are the packets?
[13:54] felixge: otherwise http client will soon become bloated with all kinds of shit
[13:54] brainproxy: ry: small
[13:54] _ry: brainproxy: are you using a timer?
[13:54] xla: brainproxy: are the connections closed properly to the redis?
[13:55] xla: felixge: agree
[13:55] brainproxy: _ry: yes, for the outbound queue; the inbound queue is pushing to redis every time it gets hit w/ a message
[13:55] brainproxy: xla, i think so
[13:55] _ry: subsecond timing is difficult to achieve in my expereicne
[13:55] brainproxy: it's the inbound queue that's getting the evcom thing
[13:55] brainproxy: it's not timer dependent
[13:55] brainproxy: it writes on push from the client
[13:56] _ry: as felix said, increase ulimit -n
[13:56] _ry: you're running out of file descriptors
[13:56] brainproxy: cool
[13:56] brainproxy: i can do that in user mode
[13:57] brainproxy: or i need to do as root or ... it's been awhile since I messed with that
[13:57] brainproxy: though it rings a bell
[13:57] _ry: yeah - you need to do it before you start the process though
[13:58] felixge: _ry: is 'drain' implemented for httpClient.write() in HEAD?
[13:59] _ry: no
[13:59] _ry: unfortunately
[13:59] brainproxy: alright, so I couldn't do it as normal user, so I dropped to root with sudo -s and did 'ulimit -n 8192'; if I drop out of the root shell, will the new ulimit value "stick"
[14:00] felixge: _ry: I will take a look, shouldn't be too hard should it?
[14:01] _ry: felixge: there are two problems - proxying that 'drain' event - but also returning the right boolean value from httpClient.write()
[14:01] _ry: getting 'drain' probably isn't hard - the other is slightly hard
[14:01] felixge: _ry: does tcp already have support for it?
[14:01] _ry: yes
[14:02] felixge: _ry: ok, I'll play with this tonight
[14:02] _ry: the problem is that those requests sit in a queue waiting to go out
[14:02] _ry: so only the first one should write to socket
[14:02] felixge: _ry: I'm a little busy rewriting transloadit with unit tests right now, but I'm getting closer so I'll have more node time soon
[14:02] _ry: if you're uploading a file on the first request, and write to the second request, then it needs to buffer the data (which it does)
[14:03] felixge: _ry: that is if you use the sample client, right?
[14:03] felixge: _ry: if you use 1 client / request each one has its own socket, right?
[14:03] _ry: right
[14:03] felixge: ok, makes sense
[14:03] binary42 has joined the channel
[14:03] felixge: I think I understand the problem
[14:04] _ry: the idea is, eventually, if i ever get a few days to spend on it, is to have a connection pool
[14:04] _ry: so that people can just set max concurrent connections to a specific host (maybe like '8' as it is in web browsers) and then just send out requests
[14:05] _ry: the pool would persist and pipeling where possible
[14:05] _ry: so the current httpCliet would be the low-level API then
[14:05] softdrink has joined the channel
[14:05] _ry: the user would be expsosed with just a XHR type thing
[14:06] _ry: it's hard to get right :)
[14:06] _ry: http clients are much more complicated than servers imo
[14:06] _ry: at least in terms of the pipelining logic
[14:07] _ry: that said, the http server stream also do not correctly proxy 'drain' or the return value of 'write
[14:07] felixge: _ry: let's fix all of that :)
[14:07] felixge: I mostly need support on client, but I can also look into server
[14:07] TheEnd2012 has joined the channel
[14:08] TomY: any idea why i get the error "TypeError: Property 'tcpSetSecure' of object # is not a function" when i call setSecure on an http client?
[14:09] _ry: TomY: probably because you're running head and not 0.1.33
[14:09] felixge: TomY: HEAD? ssl is not available post 0.1.33
[14:09] TomY: i'm running 0.1.33
[14:09] TomY: is it coming back?
[14:10] _ry: oh-hmm
[14:10] _ry: was http client's ssl ever working?
[14:10] TomY: is pretty useful :-)
[14:10] _ry: TomY: yeah it's coming back
[14:10] TomY: cool
[14:10] kixxauth has joined the channel
[14:10] _ry: TomY: it's going to use openssl now
[14:11] TomY: i'm not in a hurry for it
[14:11] TomY: i'd help but it might be beyond my skills
[14:11] TomY: might be able to contribute to proxy support (if that's desired)
[14:11] _ry: rhys is working on it
[14:11] paul_____ has joined the channel
[14:12] maritz has joined the channel
[14:13] paul_____ has joined the channel
[14:13] TomY: support for client certs is the thing i'm most interested in
[14:20] alex-desktop has joined the channel
[14:20] nsm has joined the channel
[14:25] ithinkihaveacat has joined the channel
[14:27] gf3 has joined the channel
[14:28] nsm has joined the channel
[14:30] charlesjolley has joined the channel
[14:31] sudoer has joined the channel
[14:31] kriszyp: how should this behave? http://gist.github.com/350386
[14:33] aryounce has joined the channel
[14:35] TomY: kriszyp, i'd expect once, but my judgement might be clouded by the way other languages work
[14:36] kriszyp: clouded or enlightened? :)
[14:36] TomY: well, i was thinking Perl :-)
[14:38] unomi has joined the channel
[14:38] TomY: node-promise is really cool btw
[14:39] kriszyp: oh, thank you
[14:39] kriszyp: glad its helpful
[14:42] felixge: kriszyp: right now it should print more than once
[14:43] felixge: kriszyp: isaacs is working on a module refactoring which will only print this once
[14:43] kriszyp: meaning at some point it will print just once?
[14:43] kriszyp: oh, ok
[14:43] kriszyp: interesting
[14:43] felixge: (right now node caches modules based on their relative id, but it will be based on filename )
[14:43] kriszyp: cool, thanks for the info
[14:43] felixge: np
[14:43] TomY: kriszyp, does (as far as you know) node-promise work on the client-side?
[14:44] TomY: i.e. does it actually depend on node?
[14:44] fictorial has joined the channel
[14:44] kriszyp: let me check...
[14:45] kriszyp: no, but I could easily include feature detect in the enqueue function to see if process.nextTick is available, and if not use setTimeout
[14:46] kriszyp: actually, that is already kind of feature detected
[14:46] kriszyp: so I guess it would work in the browser, it just wouldn't support the enqueuing thing
[14:46] felixge: Not sure how you guys feel, but I actually think node removing promises was the best thing ever. At least my code got simpler in ~95% of all cases
[14:47] softdrink: mhmm
[14:47] softdrink: feels more.... javascripty now
[14:48] kriszyp: node removing promises was fine with me, made it easier to use a lib with real promises, which makes my code work better
[14:48] kriszyp: Although my code would be a terrible without promises, but I may be doing more async than others
[14:52] xla: felixge: +1
[14:53] felixge: kriszyp: I do a lot of async :)
[14:53] kriszyp: but I agree, node's promises were so broken, it just made async more complicated
[14:56] felixge: _ry: if I send childProcess.kill() to a node child process which itself has child processes, should the signal be send to them as well?
[14:56] felixge: I have trouble killing a process
[15:03] unomi has joined the channel
[15:09] steadicat has joined the channel
[15:09] unomi has joined the channel
[15:12] micheil has joined the channel
[15:12] piranha has joined the channel
[15:14] CIA-77: node: 03Herbert Vojcik 07master * r9e97e18 10/ src/node_net2.cc : EAI_NODATA deprecated, patch to use EAI_NONAME if missing (it is in FreeBSD) - http://bit.ly/aP7dtV
[15:14] CIA-77: node: 03Herbert Vojcik 07master * rda16128 10/ lib/net.js : missing return after forceClose - http://bit.ly/9O1Jk1
[15:15] alexiskander has joined the channel
[15:15] _ry: felixge: i don't think so
[15:16] _ry: the child needs to catch that signal and kill its own children
[15:16] felixge: I see
[15:16] _ry: we should allow reparenting
[15:19] pjb3 has joined the channel
[15:19] juvenn has joined the channel
[15:23] CIA-77: node: 03Ryan Dahl 07master * raec80d4 10/ src/node_net2.cc : Better check for FDs in net2 bindings - http://bit.ly/dzfqJq
[15:24] jed has joined the channel
[15:25] nsm has joined the channel
[15:25] _ry: i got to spend some time today and fix the build errors
[15:26] _ry: it's really out of hand
[15:26] _ry: s/build errors/test errors/
[15:28] sveisvei has joined the channel
[15:28] mailmn has joined the channel
[15:30] mailmn: small question, I see most projects follow a certain style (code in /lib/ dir etc) and was wondering where that came from
[15:31] _ry: mailmn: i comes from the desire to mimic ruby
[15:31] jed has joined the channel
[15:31] _ry: s/i/it/
[15:32] _ry: we'll evolve out of it soon
[15:32] deanlandolt: i don't know about that -- it has the side benefit of allowing your path to be managed for you (a la narwhal)
[15:32] deanlandolt: s/path/require\.paths/
[15:32] xla: _ry: what project orga do u have in mind?
[15:32] _ry: xla: ?
[15:33] deanlandolt: _ry: i think xla meant what project org (structure) would you prefer...i'm surious too
[15:33] deanlandolt: s/surious/curious
[15:33] xla: _ry: correct :)
[15:33] binary42 has joined the channel
[15:34] _ry: http://github.com/ry/node-amqp ?
[15:35] deanlandolt: trades depth for top-level cruft but deep nesting is probably more confusing
[15:37] _ry: i think projects should start having an entry point script index.js
[15:37] _ry: it makes them easy to ln into ~/.node_libraries
[15:38] deanlandolt: i like the idea of having entry points but it seems like only having one could be a little limiting
[15:38] deanlandolt: wouldn't having a package.json file also make it easy to ln into ~/.node_libraries?
[15:40] deanlandolt: i believe narwhal's package.json allows you to define the lib dir (which would be the root) -- not all that confusing and pretty flexible
[15:40] jtoy has joined the channel
[15:40] deanlandolt: and parsing package.json would just be an install-time cost
[15:43] deanlandolt: oh, nvm...Packages/1.0 explicitly calls out /lib/ -- that makes me kinda sad
[15:43] deanlandolt: but mailmn: http://wiki.commonjs.org/wiki/Packages/1.0
[15:44] deanlandolt: wait, no...didn't read far enough -- it calls out lib as the key -- you could set dir to whatever: "directories": {"lib": "src/lib"} or for root: "directories": {"lib": ""}
[15:45] xla: with index.js we can even go with a python like paradigm: __init.js to initialize a package
[15:45] dnolen has joined the channel
[15:46] xla: never thought it through but a standard way to link to .node_libraries sounds neat
[15:46] deanlandolt: xla: how does index.js give you that? that'd be a require extension, wouldn't it?
[15:46] r11t has joined the channel
[15:47] arlolra has joined the channel
[15:47] xla: i didn't say that index.js giving u that per se
[15:47] deanlandolt: xla: ask isaacs when he's around but npm possibly already does this -- they use the packages.json file, but i'm not sure if it goes that far
[15:50] xla: deanlandolt: can u link to a repo where a package.json is used?
[15:52] deanlandolt: xla: http://github.com/isaacs/ejsgi
[15:52] deanlandolt: pretty simple, as you can see
[15:53] xla: deanlandolt: and "main" : "lib/ejsgi" is the magic link?
[15:55] deanlandolt: xla: no, the directories.lib key would be what told npm to ln in the lib folder
[15:55] deanlandolt: "directories" : {"lib" : "lib"}
[15:55] deanlandolt: if yo udon't want a lib folder and do what _ry did: "directories" : {"lib" : ""} should do the trick
[15:55] deanlandolt: bear in mind: i have no idea if npm already does this...but it certainly /can/ :D
[15:57] RayMorgan has joined the channel
[15:57] jed has left the channel
[16:00] steadicat has joined the channel
[16:05] quirkey has joined the channel
[16:06] derbumi has joined the channel
[16:08] xla: once again, is there a fast and elegant way for testing in node?
[16:09] xla: on a sidenote, any good module out there for code coverage?
[16:11] mikeal1 has joined the channel
[16:12] brapse has joined the channel
[16:14] xla: any thoughts?
[16:20] silentrob has joined the channel
[16:28] alexiskander_ has joined the channel
[16:29] Wes-mac: _ry: Is a Connection instance expected to /be/ a socket, or just have the same properties? (i.e. a socket on it's prototype?)
[16:31] bpot has joined the channel
[16:38] gwoo has joined the channel
[16:38] technoweenie has joined the channel
[16:41] xer0x has joined the channel
[16:42] rtl has joined the channel
[16:47] nsm has joined the channel
[16:48] xer0x has joined the channel
[16:55] creationix has joined the channel
[16:58] jbowman has joined the channel
[17:02] hellp has joined the channel
[17:03] aguynamedben has joined the channel
[17:03] mjr_ has joined the channel
[17:10] jbowman: possibly a loaded question, sorry. Is there a defacto style guide for working with node.js? I found mozilla's, but was curious if there was a more standard one somewhere?
[17:12] dgathright has joined the channel
[17:13] creationix: jbowman: Basically follow jslint when it makes sense
[17:13] creationix: for c code modules follow the v8 style
[17:14] jbowman: thanks
[17:15] fizx has joined the channel
[17:15] fizx has joined the channel
[17:19] kenneth_reitz has joined the channel
[17:23] dgathright has joined the channel
[17:25] jbowman: wow, I had read about jslint before, but hadn't ever tried it. Another + for javascript development over python. thanks
[17:31] aguynamedben has joined the channel
[17:32] mjr_: jslint has saved me much grief.
[17:36] bronson has joined the channel
[17:40] CIA-77: node: 03Johan Dahlberg 07master * r18de108 10/ (lib/fs.js test/pummel/test-watch-file.js):
[17:40] CIA-77: node: Bugfix: watchFile, unwatch, watch causes error
[17:40] CIA-77: node: Fixed bug that caused application to cast a "TypeError: Cannot call method
[17:40] CIA-77: node: 'addListener' of undefined" when first watching a file, unwatching and then
[17:40] CIA-77: node: watching same file again. - http://bit.ly/dbQafi
[17:40] emyller_ has joined the channel
[17:41] tjholowaychuk has joined the channel
[17:41] siculars has joined the channel
[17:41] fictorial has joined the channel
[17:42] softdrink has joined the channel
[17:42] jbowman: just cleaned up the gist I linked to in the group for writeHeadArray (array of headers instead of a hash) http://gist.github.com/350341
[17:48] kixxauth has joined the channel
[17:48] ZhouYu has joined the channel
[17:51] tjholowaychuk: released haml.js 0.1.0 http://github.com/visionmedia/haml.js/blob/master/History.md
[17:52] paul___ has joined the channel
[17:53] _ry: tjholowaychuk: nice
[17:56] isaacs has joined the channel
[17:56] markwubben has joined the channel
[17:58] javajunky has joined the channel
[18:05] Yuffster has joined the channel
[18:07] fictorial has joined the channel
[18:08] dgathright has joined the channel
[18:12] creationix: tjholowaychuk: 90 times faster?
[18:13] tjholowaychuk: creationix: with "cache" yeah :) haha
[18:13] creationix: to be fair then you should compare it to my cached templates
[18:13] tjholowaychuk: creationix: will do, what was the api for that?
[18:14] creationix: hmm, well I guess it's not a built-in feature, it just exposes the generated js so that the framework can cache it
[18:14] ashb: The one good thing to come out of e4x: |for each(item in items)|
[18:15] tjholowaychuk: creationix: I can still bench it
[18:15] creationix: Also you inspired me to rewrite my engine to be performance aware
[18:15] creationix: so my new version will be super fast
[18:15] tjholowaychuk: creationix: cool man! if even all i did was that then im happy :D
[18:16] ashb: all things should be written with intermediate steps
[18:16] creationix: sorry that my lack of interest in changing the api drove you to write your own, but I guess it's a good thing in the end :P
[18:16] ashb: tjholowaychuk: i'm guessing hte 'cache' step is to parse haml into a JS function?
[18:17] creationix: basically, yes, my new version will have a super simple api. It will return a compiled function, if you want to persist it somewhere you can always decompile it and save it to a file
[18:18] tjholowaychuk: creationix: no worries, just wanted it more haml-like
[18:19] tjholowaychuk: ashb: it is already converted to js, "cache" just prevents re-parsing of the same file
[18:19] creationix: tjholowaychuk: I think that's a good thing for your projects. I never had intentions of porting haml as is
[18:19] tjholowaychuk: creationix: mine cached vs yours once its optimized is pretty much the same
[18:20] creationix: but I figured if I had given my version a different name people would say I stole haml
[18:20] tjholowaychuk: creationix: fair enough, misewell have different flavors if both will exist
[18:20] creationix: but if I give it the same name people will say I'm not "compliant"
[18:20] creationix: for now at least
[18:20] creationix: maybe we'll merge someday mer+rails style
[18:20] creationix: *merb
[18:21] tjholowaychuk: sounds good to me, i havent done any performance optimizations yet but I was pleased with how it ran as-is
[18:21] creationix: me too, I knew full well my last version was slow
[18:21] tjholowaychuk: not sure what was up with yours but with nesting it got considerably slower the more i nested
[18:21] creationix: it's recursive on nesting levels
[18:22] creationix: I made the tradeoff of simpler code as a great performance cost
[18:22] tjholowaychuk: i know the feeling though, if i could i would re-write half my shit lol but now im working on more pressing things i guess
[18:22] creationix: assuming that all templates would be cached on server launch
[18:22] tjholowaychuk: realistically it doesnt matter much because like you said, the intermediate js SHOULD be cached anyways
[18:23] creationix: yeah, the real issue is you want pure haml and I want modified haml
[18:23] creationix: hence the two versions
[18:23] tjholowaychuk: yup, nothing wrong with that
[18:24] tjholowaychuk: plus its good practice. I realized for my c++ language that im building that I can / should generate DEDENTs at EOF instead
[18:25] tjholowaychuk: of having a routine allow DEDENTs or EOF
[18:25] tjholowaychuk: so learnt a few things too
[18:25] brapse has joined the channel
[18:25] tjholowaychuk: *that the lexer can / should *
[18:25] ashb: "dedent"?
[18:26] tjholowaychuk: plus mine is still a bit of a hack since I tokenize shit right away, bad for error reporting
[18:26] creationix: lexer tokens, makes parsing easier
[18:26] creationix: hah, I've got no error reporting
[18:26] tjholowaychuk: ashb: pythonic indentation based languages use INDENT / DEDENT token to represent blocks
[18:26] creationix: I thought about writing a version that uses jison, it's pretty stable now that coffeescript uses it
[18:26] tjholowaychuk: to much cruft IMO
[18:26] ashb: dedent being the reverse of indent?
[18:26] tjholowaychuk: even in C land I honestly prefer to do hand written parsers
[18:27] tjholowaychuk: ashb: yup :)
[18:27] ashb: thats a horrible abuse of the english langauge
[18:27] ashb: outdent.
[18:27] charlesjolley has joined the channel
[18:27] creationix: hand written, like _ry's awesome http parser
[18:27] erichocean has joined the channel
[18:27] Wes-mac: I agree, outdent or tnedni
[18:27] tjholowaychuk: ashb: meh lol its everywhere I see dedent tons
[18:27] ashb: tjholowaychuk: first time i've ever seen it
[18:27] onar has joined the channel
[18:27] tjholowaychuk: neither are in the dictionary
[18:27] creationix: I've seen both
[18:28] creationix: dedent was shorter so I used it
[18:28] creationix: unindent was way too long
[18:28] erichocean has left the channel
[18:28] tjholowaychuk: REVERSEINDENT haha
[18:28] tjholowaychuk: jk
[18:28] Wes-mac: http://googlefight.com/index.php?lang=en_GB&word1=outdent&word2=dedent
[18:28] Wes-mac: I think the answer is clear
[18:28] tjholowaychuk: hahaha
[18:28] tjholowaychuk: whatever it does not really matter
[18:28] admc has joined the channel
[18:28] ashb: lies! naming always matters! >_>
[18:29] tjholowaychuk: nevaaa
[18:29] creationix: why is the box larger for dedent?
[18:29] creationix: the number is clearly smaller
[18:29] ashb: who knows
[18:30] creationix: ashb: tell you what I'll call mine outdent in the next version and then I can announce my version is better because I use proper english in my token names
[18:31] ashb: 'xactly. BITCHES
[18:31] tjholowaychuk: whoot
[18:31] creationix: actually, I'm not sure it will have a separate tokenize step at all, so it might not matter
[18:31] kriskowal has joined the channel
[18:31] tjholowaychuk: let me know when shits ready, looking forward to checking out the benchmarks for that
[18:32] creationix: sure thing. I lost my job a couple of days ago because I couldn't make time for it. So I've allocated the next month to get caught up on my node projects
[18:32] creationix: then I'll look for a new job after my todo list isn't a mile long
[18:33] tjholowaychuk: haha shit
[18:33] tjholowaychuk: im heading to cali next week to go work for extjs
[18:33] creationix: lol, they tried to hire me
[18:33] creationix: but I wasn't willing to relocate
[18:33] tjholowaychuk: me neither im working remotely from canada
[18:33] creationix: cool, congrats
[18:33] tjholowaychuk: just gotta go down for meetings
[18:33] tjholowaychuk: once and a while
[18:33] tjholowaychuk: not 100% sure if i will take it though, we shall see
[18:34] pavelz: man thats such an awesome job to have: )
[18:34] tjholowaychuk: id kinda rather do my startups, gives me tons of freedom
[18:34] creationix: my favorite job was DocumentCloud for sure
[18:35] ashb: eh - extjs.
[18:35] ashb: still fairly similar to YUI isn't it?
[18:36] tjholowaychuk: creationix: is that the last place you were at there?
[18:36] ashb: which is in turn *far* to java like
[18:36] creationix: no, I had to leave DocumentCloud in January because they couldn't afford to pay what I needed to finish school
[18:37] tjholowaychuk: ah shit
[18:37] creationix: they're a non-profit with a fixed budget
[18:37] creationix: I was tempted to just quit school so I could afford to stay
[18:37] piranha has joined the channel
[18:37] jbowman: I still have a log parsing client at work that uses yui-ext as the front end, keep meaning to rewrite that
[18:38] tjholowaychuk: its a tough choice. i could stay and finish some of my startups, possibly make hundreds of thousands, or go work with ext
[18:38] tjholowaychuk: they wont even tell me what im working on until i go though, sign NDAs n crap
[18:38] tjholowaychuk: seem like really chill ppl though
[18:38] ashb: personally i'd say 'fuck that shit'
[18:38] ashb: but then i'm far more likely to sit on my asswhen i can
[18:39] tjholowaychuk: haha
[18:39] erikvold has joined the channel
[18:39] jbowman: Jack Slocum is still the main guy isn't he? I remember he lost his job, pushed heavily on extjs and I guess made a nice business for himself
[18:40] tjholowaychuk: abe is the ceo
[18:41] creationix: I do have secret plans to hit up charlesjolly for some work on SproutCore
[18:42] creationix: Oh crap, he's in the room now :P
[18:42] creationix: well I mispelled his name so he might not notice
[18:42] Wes-mac: or he might notice and take grave offense
[18:43] jbowman: is converting an array to a string then searching that string the quickest way to check to see if an element exists in an array, or does the toString end up looking over the elements to create the string anyway?
[18:44] inimino: jbowman: use .indexOf() on the array
[18:44] Wes-mac: yeah, that sounds like the /slowest/ way. ;)
[18:44] tjholowaychuk: jbowman: ['foo'].indexOf('foo') !== -1
[18:44] inimino: (which at least only has to look up to the first match)
[18:44] inimino: Wes-mac: I will wager it is not :-)
[18:45] jbowman: awesome, thanks. Slowly making the transition from python to javascript
[18:45] inimino: `g mdc Array indexOf
[18:45] gbot2: indexOf - MDC - https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Objects/Array/IndexOf
[18:45] Wes-mac: inimino: I won't take that wager, you'd probably come up with a way to do it by sending it over XHR proxied to an RPC running on the Mars Lander
[18:45] creationix: The best way is to decompile a function, wrap it in a "with" block and eval it back, all with some toString and regular expression searches inside
[18:45] inimino: Wes-mac: and here I thought I was going to make some easy money
[18:46] inimino: jbowman: just read everything on MDC and you'll be fine
[18:46] Wes-mac: creationix: or you could use toSource()?
[18:46] creationix: is that supported in node?
[18:46] inimino: not that I know of
[18:46] Wes-mac: Oh, hmm, might be mozilla specific
[18:47] inimino: but you can spawn a spidermonkey shell
[18:47] tjholowaychuk: hahahh
[18:47] creationix: doesn't seem to work for arrays at least, so I'm guessing not
[18:47] Wes-mac: does node have uneval?
[18:47] inimino: I don't think so
[18:47] creationix: well I do know that require('childprocess').spawn() is very slow
[18:49] jbowman: i was bit surprised to read that Math.uuid.js to create uuid's was quicker than a sys.exec('uuidgen')... is that because a new shell is spun up for the process?
[18:51] fizx_ has joined the channel
[18:51] creationix: jbowman: I think so
[18:51] inimino: a new process is
[18:51] inimino: launching a new process will always be slower than a few math operations
[18:52] jbowman: would a module written using uuidlib be quicker?
[18:52] tjholowaychuk: creationix: you seem really into parsing n whatnot , once i get my lang open sourced on github you should check it out and help out :D
[18:52] creationix: sure, but not this month, I've got to catch up so I can get a new job
[18:52] tjholowaychuk: creationix: should be a fun toy lang, mixes concepts from a bunch of different languages, super clean so far
[18:52] tjholowaychuk: haha ya for sure
[18:54] creationix: ok, back to rewriting haml-js to be "better" than haml.js ;)
[18:55] tjholowaychuk: :D
[18:55] creationix has left the channel
[18:57] inimino: tjholowaychuk: how are you parsing your language?
[18:57] tjholowaychuk: inimino: c++
[18:57] inimino: handwritten parser?
[18:58] tjholowaychuk: yup
[18:58] inimino: jbowman: oh, maybe by a few milliseconds, but Math.random is already pretty fast
[18:58] inimino: tjholowaychuk: ah, ok
[18:59] inimino: s/milliseconds/microseconds/
[18:59] tjholowaychuk: it was originally coffeescript in c++ basically, but thats kinda boring so im just going to create a standalone toy language (eventually haha..)
[18:59] tjholowaychuk: brb
[18:59] inimino: ah, ok
[18:59] larssmit has joined the channel
[19:00] jbowman: inimino: I was thinking the module using uuidlib would be able to generate the uuids with access to the MAC. I may look into writing it at some point
[19:01] felixge has joined the channel
[19:01] felixge has joined the channel
[19:02] felixge has joined the channel
[19:02] felixge has joined the channel
[19:03] inimino: jbowman: ah, yes, if you're using that style... I think most people just use the random ones
[19:05] aho has joined the channel
[19:05] jbowman: inimino: Not sure if I'll need it or not yet. I'm using uuid's for session identifiers. The MAC way would pretty much assure there'd never be a duplicate, but the chances of a random dupe in the window a session is valid for is pretty darn small. I think it might be a todo I never get to
[19:06] inimino: jbowman: yes, I wouldn't worry about it
[19:06] voxpelli-laptop has joined the channel
[19:07] inimino: jbowman: "any randomly-generated 122-bit number is unique"
[19:08] jbowman: inimino: also, the worst thing that can happen with a collision is a logout, I do a rotating token with the session as well, which is also a uuid
[19:10] inimino: jbowman: see here: http://en.wikipedia.org/wiki/Universally_Unique_Identifier#Random_UUID_probability_of_duplicates
[19:10] jbowman: inimino: I was just looking at that :)
[19:10] inimino: hehe
[19:11] inimino: jbowman: if this was going to stop somebody's pacemaker I'd worry about it in that case, but not for a session login :)
[19:12] jbowman: inimino: agreed, if I do it, it would be more to play with writing a module than to actually accomplish the end result. And since I'm rewriting an entire app I have written in python, I don't have time to play with that right now :)
[19:12] inimino: so it goes :)
[19:15] voodootikigod_ has joined the channel
[19:20] kriszyp has joined the channel
[19:22] derbumi has joined the channel
[19:27] Iveaux has joined the channel
[19:30] pedrobelo has joined the channel
[19:32] tjholowaychuk: backkk
[19:33] confounds has joined the channel
[19:36] rtl has joined the channel
[19:45] broofa has joined the channel
[19:48] dnolen has joined the channel
[19:58] cpleppert has joined the channel
[19:58] broofa: jbowman: re: Math.uuid.js performance, I'm not too surprised - the JS code is very simple - mostly boolean and basic arithmetic ops - really easy stuff for an interpreter to compile down to native byte code, really. The main perf bottleneck is in the random # generation, which is a non-trivial operation… and the uuidFast implementation is optimized to reduce the number of calls needed.
[19:59] xla has joined the channel
[20:01] xla has joined the channel
[20:01] jbowman: broofa: makes sense, I guess I'm used to the idea that a C module is usually quicker, nice when assumptions are broken, and I read about it before I go reinventing a less round wheel :)
[20:01] broofa: inimino: note that the set of possible UUIDs for v4 random UUIDs is HUUUGE. As long as the random # generator is reasonably random, the chance of a collision is so ridiculously small that you really shouldn't need to worry about it.
[20:02] broofa: btw, HUUUUGE == 2^^122,
[20:02] broofa: 5.3e36
[20:02] inimino: broofa: indeed.
[20:03] broofa: and, of course, Math.random() in JS is (I assume) just a call pass-thru call to whatever the native OS implementation is. so unless you've got a more performant # generator, probably not gonna do much better.
[20:04] broofa: /me gets off his UUID pedestal.
[20:04] CodeOfficer has joined the channel
[20:07] xla: for (i = 0; i < 32; i++) s += (~~(Math.random() * 0x10)).toString(0x10);
[20:09] broofa: xla: not rfc4122 v4 compliant. and makes 32 calls to random() .vs. ~10 calls by Math.uuidFast(). See Math.uuidCompact for a compliant one-liner impl.
[20:09] broofa: not that any of that matters most of the time. just sayin'.. :)
[20:10] xla: broofa: not compliant, but so far the fastest I get
[20:10] xla: broofa: for "pseudo" uuids
[20:10] broofa: pretty sure Math.uuidFast will outperform that because of the reduction in calls to random().
[20:11] xla: broofa: would like to see that
[20:11] broofa: one sec… I'll whip up a test.
[20:11] xla: broofa: btw can u give me a link to uuidFast?
[20:11] broofa: http://www.broofa.com/2008/09/javascript-uuid-function/
[20:11] inimino: see also the randomString function here: http://boshi.inimino.org/3box/sessions/sessions.js
[20:11] broofa: first link
[20:12] tbassetto has joined the channel
[20:12] inimino: (and it's not a pass-thru, it's implementated in V8)
[20:13] inimino: (and you shouldn't use more than 32 bits of the result)
[20:13] broofa: yeah, I don't 'only using… urr… 24 bits.
[20:14] marienz has joined the channel
[20:15] inimino: if someone wants to benchmark these I'd be interested in seeing the results
[20:15] broofa: doing that now. gimme 2 minutes.
[20:18] broofa: Here we go...
[20:18] broofa: Test: http://www.broofa.com/Tools/JSLitmus/tests/randomUUID.html
[20:18] broofa: And the results on on my MacBook, runinng Chrome
[20:18] broofa: http://tinyurl.com/yketmtk
[20:19] broofa: (double-checking that now, btw)
[20:19] xla: gettint similiar results :)
[20:20] charlesjolley has joined the channel
[20:20] jherdman has joined the channel
[20:21] broofa: btw, xla, you can also convert to int by doing "x|0". might be faster than "~~"(?)
[20:22] xla: I'll give it a spin
[20:22] broofa: nope, actually looks like ~~ if a little faster.
[20:23] broofa: if -> is
[20:23] marienz has joined the channel
[20:24] broofa: FYI, doing this sort of ad-hoc testing of JS is what I wrote JSLitmus for, if anyone feels like kicking the tires: http://www.broofa.com/Tools/JSLitmus/
[20:25] xla: can u run two versions uuidFast one with x|0 and the other wit ~~?
[20:25] broofa: sure. one sec.
[20:26] bmizerany has joined the channel
[20:26] broofa: refresh test url
[20:26] mjr_: Wow, the IE JS timing limit is based on instruction count instead of execution time? Amazing.
[20:27] broofa: actually, they seem to be about the same. or at least the difference is in the margin of error of JSLitmus. (run the tests a few times to see what kind of variance you get)
[20:27] broofa: mjr_: yeah, pretty fucked, eh?
[20:27] broofa: worse, it's based on IE4 performance from back in late 90's! :(~~
[20:28] mjr_: right. As computers get faster, applications aren't allowed to do more with the new power.
[20:28] broofa: not sure if that still applies w/ IE8 or 9. haven't looked into it lately.
[20:28] xla: broofa: hard to say, but shouldn't make that much difference
[20:29] mjr_: There is much about the world of Windows that I'm blissfully unaware of, having lived in my OSX/Linux ivory tower for so many years now.
[20:29] mattly has joined the channel
[20:30] xla: thanks for the lesson, see u later peeps
[20:30] fizx has joined the channel
[20:30] softdrink has joined the channel
[20:31] marienz has joined the channel
[20:36] javajunky: mjr_: you can override it in the registry, and the behaviour has changed with ie8
[20:37] javajunky: *but yes given the alert says script timeout, very confusing ;)
[20:37] javajunky: the reasoning (not too unreasonable I guess) is to detect and abort infinite loops last time I looked into it in a wtf moment ;)
[20:38] mjr_: but how long does a cycle take? Basing the check on cycles rather than seconds is pretty broken.
[20:39] fizx has joined the channel
[20:39] javajunky: isn't the event loop timesliced ?
[20:39] marienz has joined the channel
[20:40] javajunky: I have to admit I've never quite figured out where/how javascript gets sliced within its executing thread / understand it whatsoever ;)
[20:45] robrighter has joined the channel
[20:46] kriszyp: the event loop is not timesliced
[20:46] CIA-77: node: 03Ryan Dahl 07master * rd52f63d 10/ (4 files): fix whitespcae in deps/coupling - http://bit.ly/bmu0gZ
[20:46] CIA-77: node: 03Ryan Dahl 07master * r4279725 10/ (deps/coupling/coupling.c wscript): (log message trimmed)
[20:46] CIA-77: node: Fix thread flags on Solaris
[20:46] CIA-77: node: Also on other platforms use -pthread for compiling commands not just
[20:46] CIA-77: node: linking because I noticed in the gcc(1) man page
[20:46] CIA-77: node: -pthread
[20:46] CIA-77: node: Adds support for multithreading with the pthreads library. This
[20:46] CIA-77: node: option sets flags for both the preprocessor and linker.
[20:47] marienz has joined the channel
[20:51] javajunky: kriszyp: in the browser I'm referring to, is that still the case?
[20:52] kriszyp: yes
[20:53] Tim_Smart has joined the channel
[20:53] kriszyp: there are a few edge cases where execution can be interrupted (slow execution dialog, debugging, and the event loop stacking of sync XHR is FF is a little funny), but generally all code execution is run-to-completion
[20:54] broofa: hey, anyone here know how to *really* delete a breakpoint in Web Inspector?
[20:54] admc has joined the channel
[20:55] broofa: Breakpoints panel says, "No breakpoints", but debugger keeps stopping on a breakpoint I set earlier in session.
[20:55] javajunky: krisyzp: I just guess that hasn't been my experience, but yeah xhr or debugging is usually involved ;)
[20:56] broofa: gotta restart Chrome to actually reset breakpoints? Gotta think I'm just missing something obvious.
[20:57] jherdman has joined the channel
[20:58] Aria has joined the channel
[21:01] rakeshpai has joined the channel
[21:05] charlesjolley has joined the channel
[21:10] rolfb has joined the channel
[21:14] maushu has joined the channel
[21:17] kenneth_reitz has joined the channel
[21:19] derbumi has joined the channel
[21:21] mjr_: broofa: I've found that persistent breakpoints behavior varies a lot. Sometimes you just need to restart. WebKit nightlies are often really bad like that.
[21:22] mjr_: Also, once you cross the border in WebKit into "have stopped at a breakpoint" mode, many complicated things get a lot less stable.
[21:23] fizx has joined the channel
[21:24] isaacs has joined the channel
[21:25] quirkey has joined the channel
[21:25] RayMorgan_ has joined the channel
[21:25] fizx has joined the channel
[21:28] mattly: so am I correct in understanding http is undergoing radical changes for the next version of node?
[21:28] PyroPeter: how can I access the current timestamp?
[21:29] technoweenie: mattly: i think it already happened
[21:29] technoweenie: master is still kind of in flux
[21:29] maushu: PyroPeter, new Date().getTime();
[21:29] maushu: Master is still not stable.
[21:32] mjr_: mattly: the next release version of node should have these changes.
[21:34] mattly: technoweenie, mjr_ that's what i thought, thanks for verifying
[21:45] rolfb has joined the channel
[21:52] hassox has joined the channel
[21:53] dekroning has joined the channel
[21:53] dekroning: hi
[21:54] dekroning: i'm trying to use the example but running: node example.js just get's me back to the prompt with no other output being generated
[21:54] technoweenie: congrats, it finished the script
[21:54] maushu: Yay.
[21:54] technoweenie: i guess you dont have any active loop running
[21:54] maushu: What example?
[21:55] technoweenie: is it simple? can you post the source to http://gist.github.com/
[21:55] fizx has joined the channel
[21:55] _ry: mattly: the api doesn't change
[21:55] dekroning: http://www.pastie.org/897897
[21:55] _ry: mattly: much..
[21:55] mattly: heh
[21:55] fizx has joined the channel
[21:56] technoweenie: is there a listen() function on the tcp thing
[21:56] maushu: dekroning, you forgot to listen.
[21:56] technoweenie: http://nodejs.org/api.html#_tcp
[21:56] maushu: dekroning, add server.listen(1234); at the end to listen to port 1234.
[21:56] dekroning: maushu: outch, i thought i copy pasted it one on one
[21:56] embwbam has joined the channel
[21:57] dekroning: ah i forgot the last line, sorry guys :-)
[21:57] embwbam: How can I get my node application to run as a daemon? Until about 10 minutes ago, I though init.d scripts made things run in the background, but apparently every individual app is responsible for backgrounding itself…
[21:58] maushu: embwbam, you could try upstart.
[21:58] maushu: Or run node script.js &
[21:58] mjr_: I have mine using upstart, and it seems fine.
[21:58] embwbam: maushu: ampersand dies when I log out though, right? — -googling upstart
[21:59] mjr_: does node die on SIGHUP?
[21:59] maushu: No idea. I usually don't use & for daemons.
[21:59] kris928 has joined the channel
[21:59] mjr_: sure enough, it does
[21:59] kris928: are there any good testing frameworks for node.js?
[21:59] technoweenie: not reall
[22:00] embwbam: I'm running centos… hmm
[22:00] maushu: kris928, http://wiki.github.com/ry/node/modules#testing
[22:01] embwbam: maushu: you've run node as a daemon using upstart?
[22:01] maushu: Yes, it's still running.
[22:01] kris928: maushu, thanks - I'll check it out
[22:01] maushu: Upstart is pretty easy compared to init.d
[22:02] embwbam: looks like it, I'm not sure how easy it would be to install on centos though
[22:02] maushu: Try asking in your distro channel.
[22:02] mjr_: You could also ignore SIGHUP, like this:
[22:02] mjr_: http://gist.github.com/350972
[22:02] embwbam: and I still have the same problem - does upstart (init.d) actually force the node process into the background, or do I need to know how to background it independently?
[22:02] embwbam: maushu: good idea
[22:02] maushu: Or in the linux channel. They usually have good ideas about it.
[22:03] maushu: embwbam, it "forces" in the background.
[22:03] embwbam: mjr_: then I could use "&" and log out…. right?
[22:03] mjr_: embwbam: that's the idea
[22:03] kris928: upstart "start