[00:01] sztanpet has joined the channel
[00:03] jedschmidt has joined the channel
[00:09] tmpvar has joined the channel
[00:15] _announcer: Twitter: "http://bit.ly/9OQU05 ★ Socket.IO = # HTML5 websocket / flash client-side & server-side NodeJS" [lv]-- François-G. Ribreau. http://twitter.com/FGRibreau/status/15590188902
[00:23] sztanpet has joined the channel
[00:24] jsilver has joined the channel
[00:25] isaacs has joined the channel
[00:26] isaacs: wha'ts up, noders!!
[00:26] jedschmidt: holy cow, welcome back, isaacs!
[00:26] siculars has joined the channel
[00:27] isaacs: jedschmidt: thanks!
[00:27] jedschmidt: how was the vacation?
[00:27] isaacs: fantastic. SO nice to be back home, though.
[00:27] ryah: isaacs: re
[00:27] isaacs: holy moly, internet withdrawal like you wouldn't believe!
[00:28] jsilver: hi guys
[00:29] isaacs: ACTION runs off to check facebook twitter gmail github everything else...
[00:31] mfeiri_ has joined the channel
[00:36] fictorial: isaacs: that'll take another week! you're perpetually behind now! :)
[00:39] isaacs: hehe
[00:39] isaacs: fictorial: i've got mad updating skillz.
[00:40] fictorial: I'm too OCD to just delete everything if I get behind. Wish I could.
[00:40] isaacs: fictorial: the key is to be able to sort very very quickly, and only bother to stay up to date with certain things.
[00:41] isaacs: all email gets processed, but facebook? meh.
[00:41] CIA-77: node: 03Ryan Dahl 07master * r9be6c50 10/ (6 files in 2 dirs): Upgrade http-parser - http://bit.ly/a5qsnF
[00:42] fictorial: Whatever works, indeed. I have to go through it all. Cannot help it. Google Reader is my personal hell. It keeps feeding me.
[00:42] isaacs: ryah: what's "re"?
[00:42] jedschmidt: well, you'll have a lot more time now that ry has blessed kiwi as the official package manager for node. wait, you didn't hear?
[00:42] isaacs: jedschmidt: that's funny. http://twitter.com/tjholowaychuk/status/15081349253
[00:42] ryah: isaacs: irc lingo - "welcome back"
[00:43] isaacs: ryah: ah, thanks
[00:43] ryah: http://chanops.org/documents/general/irc-lingo.html
[00:44] polotek: ryah: great, more syntax to learn
[00:44] isaacs: ack. node 0.1.97 breaks npm, it seems?
[00:44] polotek: isaacs: yep
[00:44] isaacs: or rather, npm doesn't work on node 0.1.97...
[00:44] polotek: readFileSync now returns buffers
[00:45] polotek: kablooey
[00:45] isaacs: huh. i thought i already did that... maybe didn't publish it, though
[00:47] drdave has joined the channel
[00:47] polotek: "valgrind: the 'impossible' happened:"
[00:47] polotek: I love it
[00:47] jsilver: what does next in node mean?
[00:47] jsilver: 'next'
[00:47] polotek: jsilver: nothing special about next, where do you see it?
[00:48] jsilver: http://howtonode.org/control-flow
[00:48] jsilver: the person who just quit'd tutorial lol
[00:48] polotek: next isn't special here
[00:48] polotek: it's just the variable name given to the callback
[00:49] jsilver: oohh
[00:49] jsilver: ty
[00:51] dji has joined the channel
[00:51] sztanpet has joined the channel
[00:53] ajpiano has joined the channel
[00:53] creationix has joined the channel
[00:53] isaacs: holy crap there's a ton of new stuff in the npm registry
[00:58] tilgovi has joined the channel
[00:58] _announcer: Twitter: "@flabbygums node.js is a server-side i/o platform (serving web pages, etc). It has a slim/simple API; fast to learn. I coded my blog with it"-- Alex Bustin. http://twitter.com/abustin/status/15592770158
[01:00] saikat has joined the channel
[01:02] polotek: :( valgrind is broken with the latest v8
[01:04] hammerdr has joined the channel
[01:08] hammerdr has joined the channel
[01:12] _announcer: Twitter: "@ Artem_a Mne not hvataet MongoDB and Node.js." [bg]-- Yumitsu. http://twitter.com/alex_zinchenko/status/15593649148
[01:17] thejustinwalsh has joined the channel
[01:19] ditesh|cassini has joined the channel
[01:21] dgathright has joined the channel
[01:21] ditesh|cassini has joined the channel
[01:24] hammerdr has joined the channel
[01:28] hammerdr: isaacs: Is there a way to specify build scripts for library installs (e.g. github.com/brainfucker/node-base64)
[01:42] hartley231 has left the channel
[01:43] _announcer: Twitter: "openssh, nano going on the iPad ... hopefully lighttpd & node.js running soons :) ( + http://localhost )"-- Scott Fitchet. http://twitter.com/figital/status/15595780899
[01:44] softdrink has joined the channel
[01:45] mfeiri has joined the channel
[01:46] nicolaerusan has joined the channel
[01:47] pgriess has joined the channel
[01:58] keyvan has joined the channel
[02:04] isaacs: hammerdr: man npm-scripts
[02:04] isaacs: hammerdr: put this in your package.json: "scripts" : { "install" : "./foo.sh" }
[02:06] rictic has joined the channel
[02:08] hassox has joined the channel
[02:16] stepheneb has joined the channel
[02:17] nicolaerusan has joined the channel
[02:20] creationix has joined the channel
[02:23] stepheneb has joined the channel
[02:26] ph^ has joined the channel
[02:26] _announcer: Twitter: "angering my Air by compiling Node.js."-- Kiril Savino. http://twitter.com/kirilnyc/status/15598648298
[02:29] cloudhead: isaacs: any updates on the large file problem regarding npm?
[02:29] isaacs: cloudhead: yeah, with the latest npm, it works, but only if the file can fit in your ram
[02:29] isaacs: cloudhead: ie, no streaming, but also no file corruption
[02:30] cloudhead: oh, so I can't upload a 10GB file?
[02:30] cloudhead: ; )
[02:30] isaacs: cloudhead: yeah, i'm not sure my server would let that fly anyhoe
[02:30] cloudhead: hehe
[02:30] cloudhead: gonna try it out
[02:30] isaacs: i think effectively it's capped at < 1gb
[02:30] isaacs: nginx is pretty strict about that by default.
[02:31] cloudhead: yea I don't think anyone is going to want to upload something bigger than 10mb or so anyway
[02:31] Yuffster has joined the channel
[02:31] stepheneb has joined the channel
[02:31] isaacs: unless someone else wants to host the registry (which is easy) I probably won't let anything bigger in anyway
[02:32] cloudhead: yea
[02:32] isaacs: of course, i could always jigger it so that you could make publish point at an external tarball like it used to by default.
[02:33] isaacs: like, still download it to be sure of what it is, and have it in the cache, but then publish it without uploaing.
[02:33] cloudhead: one thing which was a bit of a concern for me is that npm will publish the whole contents of the folder by default
[02:33] cloudhead: any thoughts on that?
[02:34] cloudhead: basically, I often have a bunch of files in any given repo, which are ignored by git, because they aren't 'public'
[02:34] isaacs: cloudhead: yeah, don't give publish a folder, give it a tarball or a url to a tarball, containing only exactly what you want.
[02:34] cloudhead: but npm publishes all files
[02:34] cloudhead: hmm
[02:34] cloudhead: but `npm publish .` is so simple
[02:34] isaacs: you can use "git archive" to give you a tarball of just what's being tracked by git.
[02:34] isaacs: cloudhead: with great simplicity comes great responsibility ;)
[02:34] cloudhead: oh did not know that
[02:34] cloudhead: hehe
[02:35] isaacs: cloudhead: or you could tag your repo, and then push to github, and then do "npm publish http://github.com/cloudhead/foo/tarball/v0.2.4"
[02:35] isaacs: where "v0.2.4" is the tag
[02:35] cloudhead: oh nice
[02:35] cloudhead: didn't know it could publish remote stuff
[02:36] polotek: cloudhead: yeah I'm using the github-hosted tarball
[02:36] polotek: works well
[02:37] polotek: although I don't think anybody really uses git tags when downloading libs though
[02:37] isaacs: cloudhead: until 0.1.7, that was the only way to do it.
[02:37] isaacs: that's actually WAY easier
[02:37] isaacs: (for me, i mean)
[02:38] dgathright has joined the channel
[02:38] _announcer: Twitter: "What's the most up-to-date Redis client for Node.js? One supports the new binary protocol... //cc @antirez @ryah @technoweenie #lazytweet"-- Matt Todd. http://twitter.com/mtodd/status/15599434326
[02:38] polotek: sweet
[02:39] polotek: libxmljs is up on the npm registry
[02:39] mscdex has joined the channel
[02:40] cloudhead: hmmm
[02:40] stepheneb has joined the channel
[02:41] cloudhead: on an unrelated note: is it possible to reconnect a socket after it threw a ECONNREFUSED ?
[02:42] _announcer: Twitter: "#libxmljs 0.3.1 is up on github http://github.com/polotek/libxmljs/tree/0.3.1 And now the npm registry too! "npm install libxmljs" #nodejs"-- Marco Rogers. http://twitter.com/polotek/status/15599708336
[02:42] cloudhead: or to find out if it's 'dead', so I can create a new client?
[02:43] polotek: night gents
[02:43] polotek has left the channel
[02:44] ryah: cloudhead: on the 'close' event you should be able to call .connect() again
[02:44] cloudhead: ryah: ah great
[02:44] cloudhead: thanks
[02:48] admc has joined the channel
[02:49] mscdex: are there any known issues about using Script.runInNewContext and functions on a sandbox object not being able to see other properties attached to the same sandbox?
[02:50] nicolaerusan has left the channel
[02:50] nicolaerusan has joined the channel
[02:50] nicolaerusan: hey guys
[02:50] mscdex: it seemed like it worked in one case but not another
[02:51] nicolaerusan: i am unsure why, but I am not able to receive text written to the client right now in a regular ajax callback - not sure what i'm doing wrong.
[02:52] sudoer has joined the channel
[02:52] nicolaerusan: http://pastebin.com/fLNRt1uX
[02:53] nicolaerusan: anyone got any ideas? (it is receiving the onsuccess on the client, but the data returned is empty
[02:53] paul_irish has joined the channel
[02:54] paul_irish has joined the channel
[02:54] paul_irish has joined the channel
[02:55] hammerdr has joined the channel
[02:55] paul_irish has joined the channel
[02:55] cataska has joined the channel
[02:55] hammerdr: isaacs: thanks :) Sorry, I didn't see your message before
[02:58] cloudhead: hmm I can't seem to find how to catch the ECONNREFUSED error
[02:59] hassox has joined the channel
[03:00] SamuraiJack has joined the channel
[03:02] _announcer: Twitter: "http://tinyurl.com/yhnuu35 How NodeJS saved my web application - rfw.posterous.com"-- Эмма. http://twitter.com/emma4ch3/status/15601223168
[03:02] nicolaerusan: hey guys, beyond the question i just posted about not being able to do basic ajax, i also have a question about node in general: people say that "Node.js, uses an event loop instead of threads, and is able to scale to millions of concurrent connections". my question is - how is this the case though, aren't there also limits in terms of how many socket connections (fds) can be open at a given time?
[03:03] nicolaerusan: i.e. not threading/process limits, but socket/connection limits?
[03:03] halorgium: nicolaerusan: sure, usually that is higher than thread/process limits
[03:04] nicolaerusan: hmm, i have heard in the range of 64k from some back of the paper calculations, for a machine with moderate sized memory (don't remember exactly how much, think it was 4).
[03:04] nicolaerusan: is the millions of concurrent connections claim an overstantement?
[03:04] halorgium: nicolaerusan: lol, i'd think so
[03:04] nicolaerusan: haha, yah .. it's in the nettuts tutorial
[03:05] nicolaerusan: hmm.. i can't get basic ajax running (even though i have built a fully functioning websockets application for my needs)
[03:05] nicolaerusan: http://net.tutsplus.com/tutorials/javascript-ajax/learning-serverside-javascript-with-node-js/
[03:06] halorgium: heh
[03:06] ryah: nicolaerusan: million concurrent connections on a process? no
[03:06] ryah: but something in the 10s of thousands should be doable
[03:07] ryah: i think what people mean is that they might have multiple web heads
[03:07] ryah: (which is often the case for rails or php sites)
[03:10] cloudhead: is there a way to flush a socket's write queue? socket.flush() doesn't seem to do it
[03:10] TommyM has joined the channel
[03:10] cloudhead: problem is it's queuing stuff up even though the socket isn't connected
[03:11] cloudhead: and when it reconnects, it sends all the previous requests
[03:11] jetienne has joined the channel
[03:12] halorgium: cloudhead: flush is "send all data now"
[03:12] Kiba has joined the channel
[03:12] Kiba: hello
[03:12] Kiba: http://gist.github.com/428186
[03:13] halorgium: cloudhead: sounds like the socket isn't being cleared when the connection ends
[03:13] ryah: cloudhead: hm
[03:13] halorgium: as in, socket buffer
[03:13] cloudhead: yea
[03:13] Kiba: I got a Uncaught type error
[03:13] ryah: cloudhead: yeah, the socket should probably drop its queue when its disconnected
[03:13] cloudhead: well, the connection doesn't end, it's refused from the get-go
[03:13] Kiba: regarding a WebSocket object
[03:13] phiggins has joined the channel
[03:13] halorgium: cloudhead: which is 'end' ;)
[03:13] cloudhead: but I think it does go through destroy()
[03:13] Kiba: having no method called getLimit
[03:13] cloudhead: hmm
[03:14] cloudhead: something must be going on
[03:14] Kiba: it seem to me that it is a scope problem
[03:14] Kiba: but I don't know how to fix this
[03:14] Kiba: ACTION got a bright idea
[03:15] ryah: cloudhead: is it a dns resolution problem?
[03:16] cloudhead: ryah: no it's on localhost
[03:16] boaz has joined the channel
[03:16] cloudhead: ryah: I shut down the server, I try to connect with httpClient, I do a couple GET requests, which throw ECONNREFUSED, then I reconnect the socket, do a GET, and it sends all previous ones
[03:17] Kiba: um
[03:17] ryah: cloudhead: ah
[03:17] ryah: http server?
[03:17] ryah: er
[03:17] ryah: client
[03:17] cloudhead: ryah: the server is couchdb, client is the node one
[03:18] Kiba: erm
[03:18] Kiba: Uncaught TypeError: Object # has no method 'getLimit'
[03:19] Kiba: http://gist.github.com/428186
[03:19] cloudhead: Kiba: I think someone else had that problem recently, you could check thechannel logs
[03:19] ryah: cloudhead: yeah, the http client queues up stuff in the case that it needs to reconnect a bunch of times
[03:20] cloudhead: ryah: hmm, any way to bypass that or flush or something?
[03:20] ryah: http/1.0 requires it to reconnect between each request
[03:20] Kiba: how recent, cloudhead
[03:20] cloudhead: or if there was a way to check if the connection was accepted before sending the request
[03:21] cloudhead: Kiba: today or yesterday I'm pretty sure
[03:21] ryah: cloudhead: client._outgoing = []; is the hack
[03:21] cloudhead: aha, ok
[03:21] ryah: cloudhead: but i suppose we should probably add an API for that...
[03:22] cloudhead: yea
[03:22] ryah: cloudhead: maybe if you find something that works for you you can change lib/http.js and submit a patch
[03:22] cloudhead: well, just a method which set it to [] would be nice
[03:22] cloudhead: cool
[03:22] ryah: but Client.prototype.clearOutgoing = function () { this._outgoing = []; };
[03:22] ryah: maybe is what's needed
[03:22] ryah: but that's just a guess
[03:22] cloudhead: yea that's what I'm thinking
[03:22] cloudhead: ok, I'll try it out
[03:23] Kiba: 20:38?
[03:23] Kiba: http://gist.github.com/241352
[03:23] Kiba: err..doesn't seem to be similiar to mine
[03:24] jedschmidt has joined the channel
[03:24] cloudhead: ryah: yea, that does the trick
[03:24] Kiba: whoops
[03:24] Kiba: wrong log
[03:24] Kiba: this is a very old log
[03:25] boaz has joined the channel
[03:26] dgathright has joined the channel
[03:26] cloudhead: ryah: also, is there a way to check if the client is connected or not? I'm doing `client.writeable && client.readable`, but have no idea if that's robust
[03:27] Kiba: hmm
[03:27] ryah: cloudhead: yeah, that's good
[03:27] ryah: cloudhead: client.readyState == 'open' also
[03:27] cloudhead: ok cool
[03:27] tilgovi: v8 has no for each ... in right?
[03:27] ryah: tilgovi: for(var x in obj) { }, sure
[03:28] tilgovi: right, but that gives you a counter over the length of obj
[03:28] tilgovi: rather than the values themselves
[03:28] cloudhead: no it gives you the keys
[03:28] tilgovi: err, iterator over the keys I guess
[03:28] tilgovi: but no direct iterator for values as in spidermonkey
[03:28] tilgovi: that's fine
[03:29] tilgovi: thanks
[03:29] Kiba: ACTION ponders to himself
[03:29] Kiba: I found something on 12:52 on 2010-06-06
[03:29] Kiba: but I am not sure if it is applicable
[03:29] cloudhead: Kiba: I found it
[03:29] cloudhead: the only problem is
[03:29] cloudhead: it's you
[03:29] cloudhead: : )
[03:30] cloudhead: although you stated that you fixed it
[03:30] Kiba: ah.
[03:30] creationix has joined the channel
[03:30] Kiba: no. I thought I fixed it.
[03:31] Kiba: but in any case. It's not fixed.
[03:31] Kiba: and I don't know how to fix it.
[03:33] Kiba: can somebody help me?
[03:34] Kiba: ACTION sigh.
[03:35] gwoo has joined the channel
[03:35] Kiba: ACTION waits.
[03:35] ryah: Kiba: what's your problem?
[03:36] Kiba: Uncaught TypeError: Object # has no method 'getLimit'
[03:36] Kiba: I think it's called a scoping problem
[03:36] ryah: Kiba: source?
[03:36] Kiba: http://gist.github.com/428186
[03:37] ryah: Kiba: yes, you can't generally rely on what 'this' refers to
[03:37] ryah: Kiba: i suggest at line 3 you do "var self = this"
[03:38] ryah: and then replace "this" with "self" everywhere
[03:38] Kiba: thanks
[03:39] Kiba: ACTION makes use of M-x replace-string
[03:39] Kiba: ACTION suddenly feel like a badass.
[03:40] stepheneb has joined the channel
[03:41] SubStack: ACTION just :s///
[03:42] SubStack: s/:/%:/
[03:42] SubStack: no wait
[03:42] Kiba: SubStack: Oh. I have yet to learn that.
[03:42] SubStack: anyways!
[03:43] devtime has joined the channel
[03:46] bpot has joined the channel
[03:46] bpot has left the channel
[03:55] _announcer: Twitter: "@ryah Cool. Wasn't sure after reading @technoweenie's blog post again. Finally getting around to building something with Node.js! :)"-- Matt Todd. http://twitter.com/mtodd/status/15604471105
[03:59] mikeal has joined the channel
[04:00] keeto has joined the channel
[04:01] mikeal1 has joined the channel
[04:04] boaz has joined the channel
[04:05] boaz_ has joined the channel
[04:06] aho has joined the channel
[04:06] wasabist has joined the channel
[04:07] liucougar has joined the channel
[04:08] boaz has joined the channel
[04:10] o_o has joined the channel
[04:10] smtlaissezfaire has joined the channel
[04:11] Ned_ has joined the channel
[04:14] sudoer has joined the channel
[04:16] nsm has joined the channel
[04:21] edspencer has joined the channel
[04:22] mape: ah hey isaacs
[04:22] isaacs: hey, mape
[04:22] _announcer: Twitter: "@kirilnyc Yes! Let's get together and geek out about Node.js sometime soon. I'm tinkering on it right now ;)"-- Chris Ricca. http://twitter.com/ChrisRicca/status/15605885535
[04:23] pavelz has joined the channel
[04:23] mape: http://npm.mape.me/ stripped stuff out
[04:25] mape: Will the search be doable?
[04:30] ajpiano has joined the channel
[04:30] isaacs: mape: not for now
[04:30] isaacs: mape: but that's a cool idea, i gues
[04:31] mape: k
[04:31] isaacs: would just have to write a search view and decide how it works.
[04:31] isaacs: but how hard can search be? ;P
[04:32] mape: pipe it through google with yahoo pipes, jsonp? ;)
[04:33] jetienne: isaacs: could you provide a voting system? this would give a kindof peer evaluation. maybe just a 'i use it'... using github logins
[04:34] isaacs: jetienne: these are great ideas. please post an issue or even better, send a patch
[04:34] isaacs: jetienne: check out the js-registry project. though, i'm sorta thinking of making npm be its own registry eventually.
[04:34] isaacs: jetienne: it's just that couchdb is so easy
[04:37] hammerdr_ has joined the channel
[04:38] isaacs: what i need is for someone to decide to hire me to just work on npm full time. any takers?
[04:38] hammerdr has joined the channel
[04:42] derferman has joined the channel
[04:46] hammerdr: isaacs: is js-registry for commonjs packages, as well, or just npm packages?
[04:47] isaacs: hammerdr: right now, i think npm is the only thing that uses it, but there's not much of a difference.
[04:47] jetienne: npm is compatible with commonjs ?
[04:47] isaacs: hammerdr: i mean, you can probably get away with using the same package.json for tusk and npm
[04:47] isaacs: jetienne: mostly
[04:47] jetienne: http://github.com/isaacs/npm/issues/issue/60 <- isaacs created
[04:47] hammerdr: jetienne: it's better to say that commonjs is compatible with npm
[04:48] hammerdr: npm requires at least one more property in packages.json than commonjs
[04:48] isaacs: hammerdr: npm doesn't "require" very much actually. you don't *need* a main module.
[04:48] jetienne: hammerdr: why not make it optional ?
[04:48] isaacs: hammerdr: it's just incredibly convenient
[04:48] hammerdr: ah
[04:48] _announcer: Twitter: "NodeJS or Go... decisions decisions"-- Chris Cherry. http://twitter.com/seriph/status/15607127240
[04:49] hammerdr: does it change the behavior of require("pkg")?
[04:49] isaacs: hammerdr: npm actually only requires a name and a version
[04:49] jetienne: to follow standard is key in this
[04:49] isaacs: hammerdr: well, require("pkg") will work (in node) if there's a lib/index.js
[04:49] isaacs: hammerdr: or you can do require("pkg/foo") if there's a lib/foo.js
[04:50] isaacs: hammerdr: ie, it maps the "main" module to "pkg.js" and the libs folder to pkg/
[04:51] hammerdr: right.. incredibly convenient :) No reason that you wouldn't want to do that. But, you don't necessarily need to modify a CommonJS module to use it with npm
[04:51] isaacs: hammerdr: in practice, a lot of commonjs modules assume that the lib folder will end up as part of the require.paths list, so they have the pattern of lib/pkg.js and lib/pkg/...
[04:52] isaacs: hammerdr: in that case, you generally do want to add "main" : "./lib/pkg"
[04:52] hammerdr: yep
[04:53] hammerdr: CommonJS doesn't have a 'package manager' spec, though the de facto spec for that is narwhal/tusk
[04:53] isaacs: hammerdr: it has a package.json spec, which is almost that.
[04:53] isaacs: hammerdr: in that package.json does sort of outline what package authors can expect a PM to do.
[04:54] isaacs: without specifying implementation
[04:54] hammerdr: right, but the repository is what I'm talking about :) I think I'm going to bring up this js-registry project up to Tom Robinson
[04:54] mape: isaacs: Any idea when you are going to do the package.json sprint?
[04:54] isaacs: hammerdr: sure. i've talked with kriskowal about it a few times.
[04:55] hammerdr: what did he say?
[04:55] isaacs: mape: no idea. just got back from vacation, got like a million things to catch up on, though
[04:55] mape: Hehe I can imagine
[04:55] wilmoore has joined the channel
[04:56] isaacs: hammerdr: eh. ya know. stuff. i've got his narwhal-on-node stuff working kinda sorta with npm. not exactly, though.
[05:04] smtlaissezfaire has joined the channel
[05:12] derbumi has joined the channel
[05:13] _announcer: Twitter: "Cygwin # nodejs http://b23.ru/exvk" [af]-- ramainen. http://twitter.com/ramainen/status/15608236795
[05:45] keyvan has joined the channel
[05:49] keyvan has joined the channel
[05:51] keyvan has joined the channel
[05:59] tilgovi: what's a good tool for auto-documentation from comments?
[06:00] tilgovi: I want to know how I should format my js comments for useful extraction
[06:00] tilgovi: jsdoc?
[06:01] micheil has joined the channel
[06:01] nicolaerusan: hey guys
[06:01] nicolaerusan: having trouble doing some basic ajax with node
[06:01] nicolaerusan: but not sure why
[06:02] keyvan has joined the channel
[06:02] nicolaerusan: http://pastebin.com/PWiBJKAa
[06:03] nicolaerusan: the request is going through, being handled by the right router point, and everything, but then on the client, the onsuccess seems to get none of the data that was written to the client - anyone have any ideas?
[06:08] aho has joined the channel
[06:09] edspencer has joined the channel
[06:13] keyvan has joined the channel
[06:16] jedschmidt has joined the channel
[06:21] rictic has joined the channel
[06:24] pdelgallego has joined the channel
[06:24] tilgovi has joined the channel
[06:27] keyvan has joined the channel
[06:29] cataska has joined the channel
[06:29] keyvan has joined the channel
[06:36] jetienne has joined the channel
[06:40] keyvan has joined the channel
[06:43] jherdman has joined the channel
[06:43] nicolaerusan: still no luck debugging this :( anyone have any insights?
[06:51] jetienne has joined the channel
[06:53] _announcer: Twitter: "Data Warehousing in Node.js: Riak «Mechanical world: If you follow the records of Node.js on Twitter or blogs, ... http://bit.ly/9vK0X1" [ru]-- ru_webdev. http://twitter.com/ru_webdev/status/15612362657
[06:56] niklasfi has joined the channel
[06:56] niklasfi: is anyone actually using nodejs in a production environment?
[06:58] SubStack: why would that matter?
[06:58] jetienne: niklasfi: some do, not a lot
[06:59] smtlaissezfaire has joined the channel
[06:59] niklasfi: do you consider it to be safe to do so?
[07:00] SubStack: I see jsonrpc, which was written for the old .mixin stuff and even with that taken out doesn't work in the latest node
[07:00] jetienne: niklasfi: note sure what you mean by safe
[07:00] SubStack: then xmlrpc, which seems like a poor fit for node, since json is so easy
[07:01] SubStack: then bertrpc, which looks like the best of them but still a little strange on account of the erlang
[07:02] jetienne: SubStack: use jsonp
[07:02] smtlaissezfaire: Has anyone in here played around with scheme2js?
[07:04] niklasfi: well for example in the multipart extension there is a comment stating, that one should not use multipart in a production environment since multipart buffers whaterver request you send it which enables you to start a dos attack
[07:04] SubStack: jetienne: can't find much about that, but it seems mostly for server/web client interaction?
[07:05] SubStack: mostly looking for something like DRb
[07:05] SubStack: already using Socket.IO pretty effectively to talk to the client
[07:12] SubStack: O_O an asynchronous DRb would be so awesome
[07:12] jetienne: SubStack: i would use jsonp or pure json
[07:12] jetienne: SubStack: what is drb
[07:13] jetienne: http://docs.adhearsion.com/display/adhearsion/Using+DRb
[07:13] SubStack: yes, that
[07:13] SubStack: rpc for objects on multiple machines
[07:18] cloudhead: niklasfi: yes
[07:27] wilmoore has joined the channel
[07:30] x_or has joined the channel
[07:34] linuxsable has joined the channel
[07:35] markwubben has joined the channel
[07:41] felixge has joined the channel
[07:41] felixge has joined the channel
[07:41] jetienne: ok i would like some "nicely written" js. aka some real coders who wrote JS and know well js. this is because im a experienced coder... but dunno well js
[07:42] jetienne: and the well is full of example from people which are more webdev only... and generally not that experienced
[07:42] jetienne: i guess this may comes up as arrogant...
[07:42] jetienne: well anybody got a suggestion ?
[07:44] halorgium: jetienne: some examples?
[07:44] _announcer: Twitter: "I definitely like the idea about an "almost-jquery" module for Node.js by @cramforce http://drop.io/node_intro (slide #28 …)"-- Martin Kleppe. http://twitter.com/aemkei/status/15614209428
[07:44] nicolaerusan: hmm.. well in terms of tutorials about js, I found the mozilla developer's guide has a pretty good coverage of the language essentials, in a way that doesn't skimp too much on details - https://developer.mozilla.org/en/JavaScript. (not too many examples though)
[07:44] cloudhead: mediacoder: there?
[07:45] jetienne: halorgium: yep, like how to write a "class". or how to handle options... a lot of small things that you can only learn from source
[07:45] nicolaerusan: jetienne: you could also check out some of the libraries that have been written, such as jquery, to get a feel for how people write and manage their js code
[07:45] jetienne: nicolaerusan: yep jquery is an example i study
[07:45] nicolaerusan: jetienne: that should also give you some insights into some of the things that are not so immediate in js, that ppl felt the need to abstract
[07:46] jetienne: nicolaerusan: i did a bit (a few month) of jquery.. on the client side... but i never took the time to know how to write js properly
[07:46] jetienne: ok going back to it then
[07:46] nicolaerusan: yah, its worth it definitely
[07:47] nicolaerusan: as i said, the developer guide for moz is pretty good (but a lot of it may be specific to browser)
[07:47] saimon has joined the channel
[07:48] jetienne: nicolaerusan: yep but to get around such manual, you need to know what you are looking for
[07:48] nicolaerusan: also, o'reilry's javascript the definitive guide is good for the basics (though older)
[07:48] jetienne: nicolaerusan: and i dont :)
[07:48] nicolaerusan: hmm, yah i suppose, but i think its good to just read them front to back
[07:48] nicolaerusan: at least once
[07:48] nicolaerusan: and you pick up things, you may never look for unless u stumble on them
[07:49] jetienne: (function( window, undefined ) { <- this is the first line of jquery :) i understand the window, but the "undefined" is just crazy :)
[07:49] halorgium: jetienne: it passes in the object which should be used for undefined
[07:49] halorgium: undefined is nothing special
[07:50] nicolaerusan: yah thats a nasty part
[07:50] nicolaerusan: of js
[07:50] ashb: it stops var undefined = 1;
[07:50] ashb: form breaking things
[07:50] nicolaerusan: null == undefined
[07:50] nicolaerusan: but not null === undefined
[07:50] jetienne: halorgium: why doing an indirection for undefined ?
[07:50] jetienne: mouamouamoua
[07:51] halorgium: jetienne: this is so that if other libs change undefined, it doesn't affect jquery
[07:51] ashb: its good practice to locally scope an var undefined if you are relying on it actually being undefined and can't control everything (i..e you are a framework/library)
[07:51] ashb: tho (void 0) is less typing ;)
[07:51] jetienne: halorgium: ashb: ah, got it
[07:56] nicolaerusan has joined the channel
[07:57] smtlaissezfaire: halogium: that's insane, and doesn't even seem right. Are you saying that if you were to do "undefined = 10; typeof(undefined)" that the typeof statement would return 'number' instead of 'undefined'?
[07:58] nicolaerusan: i've already asked this.. but will give it another go, anyone have insight into why this code doesn't work: http://pastebin.com/PWiBJKAa
[07:58] nicolaerusan: the request is going through, being handled by the right router point, and everything, but then on the client, the onsuccess seems to get none of the data that was written to the client - anyone have any ideas??
[08:00] cloudhead: smtlaissezfaire: that's correct
[08:00] smtlaissezfaire: cloudhead: So can you explain this behaviour: https://gist.github.com/68cd5dea53941c9857ae
[08:01] smtlaissezfaire: Interesting. Different in the node-repl from in the chrome console.
[08:01] xla has joined the channel
[08:01] cloudhead: yea, I think node does some magic
[08:02] cloudhead: or serverside v8
[08:02] smtlaissezfaire: or it's something that's been cut out of a more recent ecmascript (?)
[08:03] mde: I don't' think so. Might be some difference between global.undefined and the package-scope local undefined.
[08:03] __sebs has joined the channel
[08:04] mde: See what happens if you change global.undefined.
[08:05] jedschmidt has joined the channel
[08:06] mde: Time for bed. Y'all have a good night.
[08:07] qFox has joined the channel
[08:09] cloudhead: anyone got a node OAuth service provider lib?
[08:09] smtlaissezfaire: mde: node> (function() { undefined = 1000; return undefined; })() # => 1000
[08:10] smtlaissezfaire: mde: the global.undefined trick didn't seem to work
[08:11] smtlaissezfaire: Bed time for me. Good night.
[08:12] jetienne: q. can i do require('mymodule.js'); and push it in local name space ? as opposed to var mymod = require('mymodule.js'); mymod.myfunc(); .... i would like to have only myfunc();
[08:12] jetienne: like "include" in ruby
[08:13] halorgium: jetienne: you can do var hax = require('lib').hax;
[08:13] felixge has joined the channel
[08:13] felixge has joined the channel
[08:13] jetienne: halorgium: great. thx
[08:15] xla has joined the channel
[08:22] jetienne: if $PROGRAM_NAME == __FILE__ <- is this possible in nodejs ?
[08:22] _announcer: Twitter: "Oh, a framework for # nodejs Geddy got its own website: http://geddyjs.org/" [ru]-- Serge Shirokov. http://twitter.com/kurokikaze/status/15615557220
[08:23] jetienne: __filename <- why isnt this __FILE__ as in any other language ?
[08:26] jetienne: if( process.argv[1] == __filename ){ <- my answer :)
[08:27] mAritz has joined the channel
[08:34] TomY_ has joined the channel
[08:35] DracoBlue has joined the channel
[08:35] DracoBlue has left the channel
[08:37] _announcer: Twitter: "node.js server-side JavaScript. When you create a server-side JavaScript both client-side end." [ko]-- young chul, park. http://twitter.com/zerosteel/status/15616062853
[08:37] mitkok has joined the channel
[08:37] SteveDekorte has joined the channel
[08:38] isaacs: jetienne: if (module === process.mainModule) is the better way to do that.
[08:39] jetienne: isaacs: ok changed. why is it a better way ?
[08:39] jherdman has joined the channel
[08:41] isaacs: jetienne: because you may have cases where you do ./my-program.js some-other-file.js
[08:41] jetienne: isaacs: ok
[08:41] SteveDekorte has joined the channel
[08:44] isaacs: jetienne: i guess it's still always argv[1], though..
[08:45] jetienne: isaacs: yep at least this is the case in ruby... and this is no cool in the "top/ps" output, it doesnt work with killall either... some linux poor stuff
[08:45] isaacs: jetienne: if you're concerned about commonjs compatibility, then you could do this: module === require.main
[08:45] hassox has joined the channel
[08:45] jetienne: isaacs: thx, standard compat is key for me.
[08:47] felixge: isaacs: should I just push formidable again?
[08:47] isaacs: felixge: sure, try it
[08:48] __sebs has joined the channel
[08:49] herbySk has joined the channel
[08:50] N` has joined the channel
[08:51] SamuraiJack has joined the channel
[08:52] felixge: isaacs: seems like it worked
[08:52] felixge: isaacs: can you check?
[08:53] isaacs: felixge: seems like it didn't upload the tarball
[08:53] isaacs: felixge: can you gist the log
[08:53] isaacs: ?
[08:53] felixge: isaacs: https://gist.github.com/1087129d3cfbb8401a5d
[08:54] isaacs: felixge: that's weird..
[08:54] felixge: isaacs: actually, can you remove it again?
[08:54] felixge: isaacs: I think my package was too big again
[08:54] isaacs: felixge: it's odd that there wasn't any error, though
[08:55] felixge: isaacs: but I didn't get an error about it like I used to
[08:55] felixge: yeah
[08:55] mikeal has joined the channel
[08:55] isaacs: oh, wtf, it was caching it
[08:55] isaacs: it is there
[08:56] isaacs: yep, just installed formidable@latest, and got 060
[08:56] felixge: o_O
[08:56] isaacs: my browser was apparently not refreshing when i told it to
[08:56] isaacs: but i saw the upload in futon
[08:57] wilmoore has joined the channel
[08:57] felixge: isaacs: so it did work?
[08:57] isaacs: felixge: yeah
[08:57] felixge: isaacs: nice
[08:57] felixge: isaacs: :)
[08:58] isaacs: felixge: that "ok" is the indication that all is good.
[08:58] felixge: isaacs: yeah, I was thinking so
[08:58] isaacs: felixge: if there's *any* error at all, it should never get there.
[08:58] felixge: isaacs: nobody complained to me about it not working either
[08:58] isaacs: the earlier one (that i removed) was definitely borked, though
[08:58] cloudhead: isaacs: I'm trying to install from a tarball, like you said earlier, but it doesn't seem to work
[08:59] isaacs: cloudhead: log?
[08:59] cloudhead: I just did `git archive master -o package.tar.gz`
[08:59] cloudhead: then npm install ./package.tar.gz
[08:59] isaacs: cloudhead: i think you have to give it a prefix
[08:59] isaacs: so that it's in a subfolder in the tarball
[08:59] cloudhead: ah
[08:59] cloudhead: lemme try that
[09:00] _announcer: Twitter: "riak-js v0.2 released http://bit.ly/dpLwSp [ann] nodejs # # # riakjs riak" [sk]-- Francisco T. http://twitter.com/frank06/status/15616895347
[09:00] isaacs: cloudhead: here's what works for me: git archive --prefix=foo/ -o foo.tgz master
[09:03] cloudhead: isaacs: yes that seemed to work!
[09:03] cloudhead: now let's see if I can publish it
[09:03] _announcer: Twitter: "POE or twisted or node.js EventMachine or a relief that recent events such as story-driven Nettowakupuroguramingufuremuwaku, Apache mina not you find the idea of the story, there were the people who translate Japanese." [ja]-- TANIGUCHI Kousuke. http://twitter.com/tinsep19/status/15617002182
[09:04] cloudhead: isaacs: https://gist.github.com/9e861673326dfd725c1e
[09:04] isaacs: hooray!
[09:04] cloudhead: says ok, but error parsing json
[09:04] isaacs: oh, right.
[09:04] isaacs: that's odd.
[09:04] cloudhead: is that ok or not ok
[09:04] cloudhead: hehe
[09:05] isaacs: that's a bug
[09:05] maushu has joined the channel
[09:07] cloudhead: : >
[09:07] isaacs: cloudhead: can you try again?
[09:07] jetienne: any unit testing framework to advice ? currently im only using "assert" module as it is in core
[09:09] cloudhead: isaacs: same thing
[09:11] cloudhead: jetienne: I've got a fairly full featured spec/bdd framework here: http://github.com/cloudhead/vows but I haven't gotten to write the doc yet
[09:12] isaacs: cloudhead: weird.
[09:12] isaacs: cloudhead: can you just install the tarball you created?
[09:12] cloudhead: isaacs: gonna try without the closure compiler
[09:12] isaacs: cloudhead: how big is the tarball?
[09:13] cloudhead: isaacs: yea installs fine
[09:13] cloudhead: isaacs: 4.3M
[09:13] isaacs: that should be fine
[09:13] isaacs: cloudhead: you're using the most recent version of npm?
[09:15] saikat has joined the channel
[09:15] cloudhead: isaacs: it worked without it
[09:15] isaacs: cloudhead: without what?
[09:15] cloudhead: the compiler.jar
[09:16] isaacs: ah, great
[09:16] cloudhead: isaacs: lemme check version, I pulled the recent one, but don't remember if I installed it hehe
[09:16] isaacs: cloudhead: you can just do npm install npm
[09:16] cloudhead: npm@0.1.13 @active @installed
[09:16] isaacs: gotcha
[09:16] isaacs: ok, bedtime
[09:16] isaacs: g'nite
[09:24] fdmanana has joined the channel
[09:26] ewdafa has joined the channel
[09:32] rictic has joined the channel
[09:40] jetienne: ok one advantage of the var myclass = {} instead of the var myclass = function(){ return {}; }, is that the first is properly parsed by my text editor :)
[09:43] ewdafa: haha
[09:44] derferman has joined the channel
[09:47] javajunky has joined the channel
[09:48] javajunky: sup.
[09:52] siculars has joined the channel
[09:52] derferman has joined the channel
[09:53] TheEnd2012 has joined the channel
[10:05] javajunky1 has joined the channel
[10:07] javajunky2 has joined the channel
[10:10] hellp has joined the channel
[10:17] hdon has joined the channel
[10:19] hdon: hi all :) i am implementing the NodeJS API for GPSEE and i'm wondering if Node supports operations like instanceof with respect to fs.ReadStream and the like. since we don't have multiple inheritance in Javascript i'm expecting to learn that Node does not really support prototypal inheritance and uses properties to distinguish between different kinds of objects
[10:22] tav has joined the channel
[10:24] jetienne: q. how to print stuff in stderr ?
[10:24] hdon: jetienne, sys.debug()
[10:25] jetienne: hdon: hmm ok... not very "satisfy unix old timer"
[10:25] hdon: jetienne, heheh, i understand
[10:29] _announcer: Twitter: "I think I have to accept that writing my own Thrift driver for node.js is a bit of a stretch for both my skills and my free time."-- Toby Hede. http://twitter.com/tobyhede/status/15620216735
[10:33] derbumi has joined the channel
[10:36] MattJ has joined the channel
[10:43] saikat has joined the channel
[10:44] jetienne: npm is able to install executable ?
[10:44] teemow has joined the channel
[10:44] hassox has joined the channel
[10:44] saikat` has joined the channel
[10:45] hdon: ACTION wonders what npm is
[10:45] jetienne: hdon: a installer/packager for nodejs
[10:46] jetienne: http://github.com/isaacs/npm
[10:46] rnewson has joined the channel
[10:48] hdon: jetienne, lol, i like how / is a content-disposition: attachment JSON file
[10:48] jetienne: hdon: i never used it, so i dunno but the author hangs around tho :)
[10:49] jetienne: isaacs is his nickname
[10:49] hdon: does anyone know what "typeof net.Server" says? it's a function, right?
[10:49] hdon: yeah i'd like to speak to him since i am implementing the Node API
[10:49] _announcer: Twitter: "[Link] Geddy - webapp-development framework for Node.js: http://geddyjs.org/" [fil]-- Igor. http://twitter.com/hostmaster/status/15621002312
[10:50] hdon: but i wish there was a real website showing everything that's available instead of just a json file
[10:50] jetienne: { "bin" : { "npm" : "./cli.js" } } <- ok apparently npm support bin install
[10:50] hdon: ACTION doesn't understand
[10:50] hdon: but that's okay
[10:52] teemow has left the channel
[10:52] hdon: can anyone tell me what happens if you try "new net.Server" ?
[10:53] jetienne: node> var net = require('net')
[10:53] jetienne: node> new net.Server
[10:53] jetienne: { watcher: { host: [Circular], callback: [Function] } }
[10:53] hdon: ACTION scratches his head
[10:53] jetienne: typeof net.Server == function
[10:53] hdon: there seems to be no documentation for net.Server()
[10:53] hdon: thanks
[10:54] javajunky2: really ? on the main website ?
[10:54] jetienne: http://nodejs.org/api.html in there
[10:54] jedschmidt has joined the channel
[10:54] javajunky2: http://nodejs.org/api.html#net-server-196
[10:54] hdon: that's what i'm reading
[10:54] jetienne: javajunky2: how do you get the anchor ?
[10:54] maushu: net.Server is just that, the server.
[10:54] hdon: javajunky2, yeah that doesn't document net.Server() constructor function. that shows net.createServer() which returns a net.Server instance (i assume.) subtle distinction :)
[10:55] hdon: jetienne, do you mean the #anchor?
[10:55] ashb: you can call new on any function
[10:55] ashb: can't you?
[10:55] hdon: ashb, well there's no documentation for net.Server()
[10:55] jetienne: hdon: yep there is a little bug in the doc site
[10:55] ashb: hdon: perhaps cos you aren't meant to do it
[10:55] jetienne: http://nodejs.org/api.html#net-server-196 <- hdon from javajunky2
[10:55] hdon: ashb, i'm implementing the Node API in GPSEE :D
[10:56] Dennus has joined the channel
[10:56] hdon: ashb, yes i believe you are not meant to do it, i am just trying to find out so i can get Node's semantics correct. i'm going to have my implementation throw an exception, but jetienne has demonstrated you can in fact "new net.Server" and get something back
[11:01] _announcer: Twitter: "writing a webserver with js bare bone. bener2 pedal to the metal bgt nih http://nodejs.org/" [id]-- Teman Macet. http://twitter.com/temanmacet/status/15621515405
[11:02] teemow has joined the channel
[11:03] hammerdr has joined the channel
[11:04] hdon: jetienne, can you tell me if net.Server() constructor function will work if you connect to the "listening" event after instantiating it and before calling its listen() method? it seems to me like it might work. if it does, i want to support it.
[11:04] jetienne: hdon: gimme the code in a paste bin and i will
[11:05] jetienne: ACTION is focused on download with p2p in js :)
[11:05] hdon: jetienne, what kind of p2p download?
[11:05] micheil: hdon: it does
[11:05] hdon: micheil, thanks :)
[11:05] jetienne: hdon: my monster p2p, that i opened source recently
[11:05] micheil: hdon: anything with events, they are executed in order that they are bound
[11:05] hdon: jetienne, is it a new protocol?
[11:05] hdon: micheil, yes i read that :)
[11:06] jetienne: hdon: nah it is bittorrent + http
[11:06] hdon: jetienne, ah, cool :)
[11:06] micheil: the reason is because listeners, if more then one is bound to an event, then the listeners property of the event emitter mutates to be an array of callbacks, not just a single callback
[11:06] jetienne: hdon: this was part of a startup i tried to make it happen... after a while i stopped the startup thing and so i openedsource the whole code
[11:07] _announcer: Twitter: "@ Temanmacet nodejs not just a webserver Brahman, he was able to the keep-alive connection that the implementation of server push: D" [id]-- Didiet. http://twitter.com/lynxluna/status/15621743833
[11:07] hdon: micheil, i understand :)
[11:07] micheil: k
[11:07] saikat has joined the channel
[11:07] hdon: jetienne, you know it is not mutually exclusive to make open source software and to make money on it :)
[11:07] _announcer: Twitter: "Why do we need NodeJS http://ow.ly/1UYFY [pdf]" [id]-- Teman Macet. http://twitter.com/temanmacet/status/15621773080
[11:08] jetienne: hdon:
[11:08] jetienne: hdon: well to make money is not easy, opensource or not :)
[11:09] _announcer: Twitter: "Quote from NodeJS "8000 lines of C/C++, 2000 lines of Javascript". Dude, you won't leverage your skill if you afraid touching the metal :)"-- Didiet. http://twitter.com/lynxluna/status/15621840270
[11:09] hdon: does net.Server have any static member functions? like are there any functions net.Server.Foo()?
[11:10] hdon: jetienne, well there isn't that much money left to make after the banks take their fair share
[11:11] Ori_P has joined the channel
[11:11] _announcer: Twitter: "Highlight from @temanmacet on nodejs is remembering me to http://bit.ly/VRi8X and http://bit.ly/9jfY5X. Both are asynchronous and I use them"-- Didiet. http://twitter.com/lynxluna/status/15621948848
[11:12] maushu: jetienne: It's easy. Just get most awesome idea you have and then go crazy.
[11:12] jetienne: maushu: did that already :) and believe me i can be crazy :)
[11:12] jetienne: my stuff is 350kline of c++, and the bt+http is just a small part of it :)
[11:13] hdon: jetienne, wow, what was the rest of it then?
[11:13] jetienne: it had ipv6 replacement, compatible wiht IPv4. it handles mobility, security, nat traversal and got noconfig
[11:14] jetienne: there is the http live streaming in p2p too
[11:14] hdon: security?
[11:14] jetienne: and a bunch of flash player which support it, oh and it had rtmp too because it was needed to read the webcam from flash :)
[11:14] hdon: i heard that sequential download of bittorrent archives hurts the swarm
[11:14] hdon: flash player support?
[11:15] hdon: webcam?!
[11:15] jetienne: hdon: yep as in vpn, i was researcher in crypto in another life
[11:15] hdon: what are you making!?
[11:15] _announcer: Twitter: "@ Temanmacet so, after his sebelum2 ruby and rails, nodejs year next year. So the javascript complete control of the client and server." [id]-- Julius Sirait. http://twitter.com/sirait/status/15622091464
[11:15] hdon: oh, so you'd talk bittorrent over encrypted VPN?
[11:15] jetienne: hdon: suppose you want to read the webcam from a user and want to stream that live in p2p, this is handled :)
[11:15] jetienne: hdon: nope those are 2 disctincts part of the monster :)
[11:15] hdon: jetienne, you stream live webcam with bittorrent?!
[11:16] jetienne: hdon: yep
[11:16] hdon: that's crazy!
[11:16] hdon: i didn't know bittorrent handled streaming media at all
[11:16] jetienne: hdon: it doesnt, you have to handle it yourself. Some modification are needed
[11:16] ditesh|cassini has joined the channel
[11:17] jetienne: but bt support extensions, so you play in this
[11:17] hdon: oh, that's cool. i didn't know bt supported any kind of extensions
[11:17] hdon: how long did you work on this?
[11:17] jetienne: hdon: 3-4years fulltime
[11:17] hdon: amazing!
[11:17] jetienne: hdon: then i needed money, so i stopped :)
[11:17] hdon: :(
[11:18] jetienne: hdon: now im back on it, and it is good. i realize how crazy i was :)
[11:18] jetienne: ok end of the offtopic :)
[11:19] hdon: :)
[11:19] micheil: damn. race conditions in ruby & databases isn't fun.
[11:20] _announcer: Twitter: "My current idea - Build a pure javascript based CI server based on node.js... Need to prioritize"-- sai_venkat. http://twitter.com/sai_venkat/status/15622330270
[11:23] felixge: is anybody using: http://github.com/masuidrive/node-mysql for mysql?
[11:25] mitkok has joined the channel
[11:25] _announcer: Twitter: ""Hello World" HTTP server in Node.js: 6161.89 requests per second with ab on my MacBook Pro."-- Ronny Haryanto. http://twitter.com/ronny/status/15622553953
[11:28] ditesh|cassini has joined the channel
[11:31] jherdman has joined the channel
[11:33] hdon: can a net.Server be closed and then listen on a new port/address?
[11:34] hdon: and can you listen on more than one port/address with one net.Server?
[11:34] drdave has joined the channel
[11:34] _announcer: Twitter: "Yeah. NodeJS is cool and interesting. But what about additional functionalities (read: libs) support? #flamebait"-- exavolt. http://twitter.com/exavolt/status/15622967515
[11:36] _announcer: Twitter: "#takethebait I don't care bout that brader, so let's eat! *andukan* RE @exavolt: NodeJS"-- Didiet. http://twitter.com/lynxluna/status/15623039179
[11:38] hdon: net.Server as an abstraction seems a little off to me from a software design perspective because programs are described as servers if they are listening for incoming connection requests or datagrams. that's a finite number of addresses + socket-type pairs, and ideally the callback responsible for handling each pair.
[11:41] hdon: so if i were to create something like Node, you would not instantiate a Server that representing potentially listening on some address + socket-type pair. there would just be the finite space of address + socket-type pairs and their callbacks. registering a connection request handler for a particular address + socket-type pair would possibly require getting a file descriptor from the system (socket(2)) binding to an address (bind(2)) and
[11:41] hdon: finally allowing incoming connection requests (listen())
[11:42] hdon: File on the other hand is a good abstraction because the data in a File can be locked, and that is an important bit of state
[11:43] hdon: meh, i suppose i'm being very nitpicky :)
[12:06] jetienne: q. is there something for v8 like APC for php ? aka something which cache the transcoded code
[12:08] mape: jetienne: Cross node-apps?
[12:09] jetienne: mape: yep... suppose you got 2 thread on event loop, each thread handling 4 cnx lets say
[12:10] jetienne: mape: those 2 shares the transcoded code ?
[12:11] jetienne: mape: maybe it is less important for nodejs than in php, because php is "forked" for every connection
[12:11] jetienne: every http request
[12:11] mape: Well if it is just one app you might as well use var cache = {};
[12:11] mape: And have that as a key/value store
[12:12] mape: But if there are different node instances that won't work
[12:12] teemow has joined the channel
[12:13] javajunky has joined the channel
[12:13] jetienne: mape: hmm misunderstanding here i think. here i was thinking about speeding up the v8 "parsing", more than using such a cache for my apps itself
[12:14] mape: Oh k
[12:14] felixge has joined the channel
[12:14] mape: But is that an issue?
[12:15] mape: When you start the app using "node app.js" it doesn't parse the file on each request
[12:15] mape: Just when you initiate the app
[12:15] jetienne: mape: dunno. apc is a big boost for php, that's for sure. dunno if the same principle would be good for v8, especially on something which has event loop
[12:15] mape: Well the js only gets parsed once, not for each request that is handled by the js
[12:16] mape: Unless you are requiring a different javascript file for each request
[12:16] jetienne: so worst case, node spawn 4-8 threads in the background. and the code is transcoded only once per thread
[12:16] jetienne: yep it doesnt seem like an advantage, ok
[12:19] stepheneb has joined the channel
[12:22] mcarter_ has joined the channel
[12:24] jetienne: q. would that be interesting for the project to get a ubuntu ppa ?
[12:25] jetienne: i guess i should ask that to ryan
[12:32] TheEnd2012 has joined the channel
[12:36] _announcer: Twitter: "A great turn out tonight @BrisJS, gave a talk on node.js, and helped out with an overview of JS numbers."-- Geoffrey Donaldson. http://twitter.com/geoffreyd/status/15626072611
[12:39] hammerdr has joined the channel
[12:47] pgriess has joined the channel
[12:47] robrighter has joined the channel
[12:57] davidsklar has joined the channel
[13:00] keyvan has joined the channel
[13:00] jherdman has joined the channel
[13:01] mattly has joined the channel
[13:02] brett_h has joined the channel
[13:07] robrighter has joined the channel
[13:08] nsm has joined the channel
[13:09] jedschmidt has joined the channel
[13:17] _announcer: Twitter: "@rubenfonseca check my js implementation of sth like that, greasejs, (nodejs + clientside js) at my github page."-- Rui Lopes. http://twitter.com/ruidlopes/status/15628360283
[13:19] octover has joined the channel
[13:20] nsm has joined the channel
[13:22] ceej has joined the channel
[13:23] voodootikigod has joined the channel
[13:23] mikeal1 has joined the channel
[13:23] jetienne has joined the channel
[13:24] ajpiano has joined the channel
[13:24] jetienne: ryan lives in which timezone?
[13:26] dji_ has joined the channel
[13:27] hdon: * [ryah] wolfe.freenode.net :Manchester, England
[13:28] hdon: so what is that? GMT-1?
[13:28] hdon: ACTION not know
[13:29] mcarter_ has joined the channel
[13:31] MattJ: England is GMT+1
[13:31] MattJ: in the summer
[13:31] jetienne: ryah has been idle for 9 hours, 53 minutes, and 32 seconds.
[13:32] jetienne: oh ok, you got the irc server :)
[13:32] sanderjd has joined the channel
[13:32] jetienne: i mean a idle time of 10h at 15pm32 doesnt seem right
[13:33] jetienne: but irc server are mostly random on freenode
[13:33] hdon: we could all ping him and try to triangulate his position
[13:33] gf3 has joined the channel
[13:33] micheil has joined the channel
[13:33] jetienne: or we could ask him :)
[13:34] hdon: well that will work, assuming he is alive and hasn't given up computers
[13:34] hdon: but you make yourself vulnerable to that possibility with your route
[13:34] micheil: MattJ: england being +1GMT in summer just totally fucks with what GMT is, y'know
[13:34] MattJ: It does?
[13:34] mattly has joined the channel
[13:34] micheil: yeah, because Greenwhich is in england
[13:35] MattJ: and? :)
[13:35] micheil: and it's Greenwhich Meridian Time
[13:35] micheil: it doesn't work.
[13:35] rnewson: Greenwich, please.
[13:35] ly- has joined the channel
[13:35] hdon: greenwich mean time
[13:35] micheil: rnewson: fair enough
[13:35] hdon: mean, meaning
[13:36] micheil: I'll stick to UGT
[13:36] hdon: that you have to average the current time of every person in the world
[13:36] rnewson: Greenwich Mean Time, also. ;)
[13:36] rnewson: we call it UTC now anyway.
[13:36] jetienne: u stand for which town ? :)
[13:36] hdon: so if a bunch of chinese visit america, GMT and hence everyone's time has to be shifted
[13:36] rnewson: jetienne: :)
[13:37] micheil: but, yes, UGT is better: Universal Greeting Time
[13:37] rnewson: see they make new seconds in Greenwich at a local factory, and they are then shipped off around the world. It takes longer to send them further hence timezones. QED.
[13:37] hdon: under ground time
[13:38] hdon: the time zone of the mole people
[13:38] hdon: it's always midnight
[13:38] micheil: dr who?
[13:38] __sebs has joined the channel
[13:40] K`` has joined the channel
[13:40] K``: hello.
[13:40] jetienne: q. anybody with a good example of working npm package ?
[13:40] K``: is there somthing in spirit of sprintf() for node.js ?
[13:41] micheil: jetienne: my websocket library? npm it's self?
[13:41] micheil: K``: try sys.puts(sys.inspect(obj))
[13:42] ceej: o shit i can't log into developer.apple.com it says bbs :)
[13:42] K``: um, actually i am looking for somthing alike to paddedString = sprintf("%016d\n", someInteger);
[13:43] dji has joined the channel
[13:43] jetienne: micheil: ok looking
[13:45] jetienne: K``: http://github.com/ry/node/blob/master/lib/sys.js#L254 but this is not too generic
[13:45] micheil: ceej: is definitely deploying new tech
[13:46] ceej: yep after the http://www.engadget.com/2010/06/07/steve-jobs-live-from-wwdc-2010/
[13:46] K``: um. i see. that means there is no builtin things for it, right?
[13:46] hdon: jetienne, is that the best that ruby gives you for formatting padded decimals?
[13:46] micheil: ceej: aww.. 3am sydney :(
[13:47] hdon: http://ruby-doc.org/core/classes/String.html
[13:47] hdon: looks like ruby has python style string operators like % and * similar to python
[13:48] _announcer: Twitter: "@temanmacet oh, how I can't wait to play with nodejs, commonjs. Still looking for an apropriate case for a trial"-- neofreko. http://twitter.com/neofreko/status/15630270469
[13:49] hdon: jetienne, hidonny@donny-desktop:~$ ruby
[13:49] hdon: print("%02d\n" % 0)
[13:49] hdon: 00
[13:50] jetienne: hdon: sure but we are in nodejs... i dunno if nodejs got better. but how relevant is ruby ?
[13:51] hdon: jetienne, oh i thought you were interested in ruby for some reason... wasn't that code you linked to ruby?
[13:51] hdon: jetienne, javascript doesn't have many great string functions
[13:52] hdon: jetienne, but you can use this: http://ruby-doc.org/core/classes/String.html
[13:52] jetienne: hdon: here i was only answering his question. maybe you are confused as i asked many ruby to js questions :)
[13:52] jetienne: hdon: yep js is not that good as a language. but its support is WAY better
[13:52] jetienne: hdon: and js is not that horrible... cobol is worst :)
[13:52] K``: yeah, dead hoars beating!
[13:52] hdon: jetienne, oh also in GPSEE we have true libc sprintf() support
[13:55] micheil: hdon: any reason for rubying in node?
[13:56] hdon: micheil, it wasn't me! i swear!
[13:56] micheil: right, right :P
[14:01] jetienne: what is the most used packager? npm ? kiwi ?
[14:05] perdix has joined the channel
[14:05] micheil: npm
[14:06] jetienne: how do i add ~/.node_library in my require.paths ?
[14:06] jetienne: micheil: ok
[14:06] jetienne: node> require("sys").puts(require.paths);
[14:06] jetienne: undefined
[14:06] micheil: ACTION is out.
[14:06] jetienne: q. am i missing something ?
[14:07] cheapRoc has joined the channel
[14:08] micheil: not sure.
[14:09] pjb3 has joined the channel
[14:20] jetienne: ok i likely missed a lot but it seem to workish
[14:20] jetienne: sudo npm publish . <- this never comeback to prompt. frozen after npm uploaded
[14:23] JAAulde has joined the channel
[14:28] adulteratedjedi has joined the channel
[14:37] bradleymeck has joined the channel
[14:40] jedschmidt has joined the channel
[14:40] bradleymeck: hello all~
[14:42] steadicat has joined the channel
[14:43] pitrpen has joined the channel
[14:44] felixge has joined the channel
[14:46] moderation has joined the channel
[14:48] hartley231 has joined the channel
[14:48] jetienne: NODE_PATH=.:~/.node_libraries/ <- my workaround... i cant get require.paths to work
[14:49] brainproxy has joined the channel
[14:50] fdmanana has joined the channel
[14:51] bradleymeck: .push fails?
[14:54] hdon: !lastseen isaacs
[14:55] b_erb has joined the channel
[14:57] jetienne: require("sys").puts(require.paths); <- i got undefined from this... anybody got != result ?
[14:57] steadicat has joined the channel
[14:58] nefD has joined the channel
[14:59] barrycrocker has joined the channel
[15:00] dabreaka has joined the channel
[15:00] bpot has joined the channel
[15:00] barrycrocker has joined the channel
[15:01] barrycrocker has left the channel
[15:03] jetienne: how many of you are using ubuntu to dev ?
[15:03] bradleymeck: i cant remake your bug jetienne
[15:04] bradleymeck: i have it in a vm
[15:04] jetienne: bradleymeck: you got something different than undefined ?
[15:04] bradleymeck: yea on my mac /Users/bradleymeck/.node_libraries,/usr/local/lib/node
[15:04] bradleymeck: and on Ubu, similair
[15:04] technoweenie has joined the channel
[15:05] steadicat_ has joined the channel
[15:05] jetienne: grumble
[15:05] x_or has joined the channel
[15:06] bradleymeck: did you make install or just make?
[15:06] jetienne: i got undefined... but the libs are reqirable...
[15:07] stepheneb has joined the channel
[15:07] jetienne: bradleymeck: i did make install
[15:08] micheil has joined the channel
[15:09] bradleymeck: ill assume you dont have a module named sys in your path already,what do you get with a -> for(p in require("sys")) {process.stdout.write(p+"\n")};
[15:11] jetienne: bradleymeck: nope
[15:11] jetienne: node> require("sys").puts("bla");
[15:11] jetienne: bla
[15:11] jetienne: bradleymeck: the point is require.paths is undefined
[15:11] mikeal has joined the channel
[15:11] bradleymeck: mmm
[15:11] hdon: jetienne, or at least its toString() method returns "undefined" :P
[15:12] jetienne: hdon: yeah, lets focus on the good side :)
[15:12] bradleymeck: so sys.inspect is undefined too?
[15:12] hdon: require("sys").puts(require.hasOwnProperty("paths"))
[15:12] bradleymeck: on the paths
[15:12] jetienne: node> require("sys").puts(require.hasOwnProperty("paths"))
[15:12] jetienne: false
[15:13] jetienne: node> require("sys").inspect(require.paths)
[15:13] jetienne: 'undefined'
[15:13] brainproxy has joined the channel
[15:14] jetienne: notice how require works anyway, this seems to be only the paths definition
[15:14] SubtleGradient has joined the channel
[15:16] bradleymeck: yea, digging in the src to see if something changed to cause this
[15:17] mde has joined the channel
[15:17] _announcer: Twitter: "All about the JavaScript this past weekend. Reading up on ironjs, nodenet, nodejs, txjs presentations and one on quality by Mr. Crockford."-- A'braham Barakhyahu. http://twitter.com/BlessYahu/status/15636027899
[15:17] jetienne: i run 0.1.97
[15:19] mde has joined the channel
[15:23] o_o has joined the channel
[15:26] sanderjd has joined the channel
[15:26] bradleymeck: jetienne, no idea unless something is setting require.paths to undefined somehow
[15:26] fictorial: micheil: how's draft76 coming along?
[15:27] bradleymeck: if you want to mess w/ it check out /lib/module.js
[15:27] mikeal has joined the channel
[15:27] micheil: it hasn't realluy
[15:27] micheil: I meant to do it yesterday, but got caught up with server admin stuff and working on my startup
[15:27] fictorial: micheil: ok
[15:27] kevwil has joined the channel
[15:28] hartley231: fictorial: with micheil's help I had a go adding draft76 borrowing code from the forked Socket.IO.node code but couldn't get it working
[15:28] qnt4b has joined the channel
[15:28] felixge has joined the channel
[15:29] jetienne: draft76=websocket new proto
[15:29] jetienne: ?
[15:29] hartley231: Everything looks like it is working on the server side however the browser doesn't establish a Websocket session so I suspect I have the headers / auth wrong
[15:29] jetienne: bradleymeck: ok
[15:29] hartley231: jetienne: yep draft76 is updated websocket protocol / handshake
[15:33] teemow has joined the channel
[15:36] mikeal1 has joined the channel
[15:38] _announcer: Twitter: "A great Rails article about how you have to fundamentally think differently: http://bit.ly/dyn7wa #nodejs"-- Chris Williams. http://twitter.com/voodootikigod/status/15637431098
[15:39] voodootikigod_ has joined the channel
[15:44] brainproxy has joined the channel
[15:45] _announcer: Twitter: "Installing mongodb, mongohub, webstorm, and nodejs. Is it getting hot in here? :). Pet projects FTW!"-- Scott Walker. http://twitter.com/pragma_tech/status/15637860559
[15:48] mikeal has joined the channel
[15:51] micheil: hartley231: could you pastie the headers you're getting and what your sending for me?
[15:52] bradleymeck: anyone here used a LookupCallback in v8 and have an example of it?
[15:54] hartley231: micheil: the headers I'm getting in the browser right? Will do
[15:54] micheil: the headers your server recieves and sends
[15:55] markwubben has joined the channel
[15:58] ajpiano has joined the channel
[15:59] richcollins has joined the channel
[15:59] x_or has joined the channel
[16:04] _announcer: Twitter: "What Rails can learn about performance by composable async/non blocking from node.js and others: http://bit.ly/doriLC"-- Matthew Podwysocki. http://twitter.com/mattpodwysocki/status/15639037687
[16:05] charlesjolley_ has joined the channel
[16:07] charlesjolley_ has joined the channel
[16:10] bradleymeck: can anyone find the code he was talking about where callbacks arent used? it seems like instead of going into idle mode it just does a while loop?
[16:12] _announcer: Twitter: "ooh ... look at all the node.js modules: http://bit.ly/90RkBi :)"-- Scott Fitchet. http://twitter.com/figital/status/15639518763
[16:12] bmizerany has joined the channel
[16:15] stevendavie has joined the channel
[16:18] JimBastard has joined the channel
[16:25] SubtleGradient has left the channel
[16:34] towski has joined the channel
[16:34] figital has joined the channel
[16:36] _announcer: Twitter: "@danwrong ahh cool I think I talke to you about it in #nodejs when I was looking for something like that"-- Karl Tiedt. http://twitter.com/ktiedt/status/15640995314
[16:36] phiggins has joined the channel
[16:36] figital: just upgrade from node 1.30 to 1.97 ..... should I have first deleted everything in /usr/local/lib/node ? still seems to be the old files in there. (thx !)
[16:36] technoweenie: figital: did you do make install
[16:37] _announcer: Twitter: "This text picture live, to write very appropriate to use node.js = v =" [zh-CN]-- aki. http://twitter.com/aki_xavier/status/15641049481
[16:37] figital: yes
[16:37] technoweenie: it should replace those files so that node -v gives you 1.97
[16:37] technoweenie: if not then, uh, no idea :)
[16:37] figital: that gives me 1.97
[16:37] figital: old stuff in lib dir though
[16:37] figital: no biggie ... i'll just back those up and try again .... is that worth notifying someone about?
[16:38] figital: (love the install process btw) :)
[16:42] figital: okay did that ..... looks like it recreated /usr/local/lib/node/wafadmin ..... but didn't recreate node/libraries
[16:43] figital: sorry for the n00b stuff ..... so does that mean that the stuff I unpack from the tar file is going to be what's in my appdir now (the libraries)?
[16:43] figital: thx !
[16:46] felixge has joined the channel
[16:49] vnguyen has joined the channel
[16:50] figital: figured it out .... liked the old thing better with the modules in /usr/local/lib/node/libraries (i'm sure there's a reason why it changed ... just saying ;))
[16:50] felixge: pgriess: hey
[16:50] felixge: pgriess: just saw you announcement on the mailing list
[16:50] felixge: pgriess: let me know if you have a sec to talk
[16:51] _announcer: Twitter: "I've been working on a little image uploading/ listing app written in node.js & MongoDB. Lots of fun!"-- Ollie Relph. http://twitter.com/ollieRelph/status/15641929740
[16:52] tjholowaychuk has joined the channel
[16:55] sudoer has joined the channel
[16:55] Aria has joined the channel
[17:01] _announcer: Twitter: "Data Warehousing in Node.js: MySQL via DBSlayer: http://wp.me/pfjwm-gg" [ru]-- Serge Shirokov. http://twitter.com/kurokikaze/status/15642556116
[17:01] mape: http://wwdc-live-multiple-feeds.mape.me/
[17:02] creationix has joined the channel
[17:02] mape: If anyone is watching for WWDC
[17:02] siculars has joined the channel
[17:03] mattly has joined the channel
[17:06] brainproxy has joined the channel
[17:07] mjr__ has joined the channel
[17:07] mjr_: I just drove by there, and saw lots of Apple types walking around.
[17:07] jbrantly: mjr_: define "Apple types"
[17:08] mjr_: Oh, you know. Looks like they use computers, thick, conspicuous glasses, obscure band name on a t-shirt, some spiky hair.
[17:08] mjr_: Apple types.
[17:08] jbrantly: :)
[17:09] pgriess: felixge: still around?
[17:09] felixge: pgriess: yeah
[17:09] felixge: pgriess: first of all: a) You have the best email address in the world
[17:09] felixge: pgriess: b) Thanks for working on web workers :)
[17:09] pgriess: a) haha, thanks :)
[17:09] stalled has joined the channel
[17:10] pgriess: b) no prob. i want it for the same reasons you do, it's looking like ;)
[17:10] pgriess: so, on to b
[17:10] felixge: hehe
[17:10] felixge: pgriess: what are you working on?
[17:10] pgriess: passing request objects around will be tough, as you'll need to re-jigger the underlying stream to point to the new FD
[17:10] ryah: pgriess: is it okay if i rename listenOnExistingSocket to listenFD ?
[17:10] pgriess: which is possible, but will require some major invasive surgery in lib/net.js
[17:10] pgriess: ryah: yeah, go for it
[17:11] felixge: pgriess: right, I'm also wondering how hard it would be to serialize the object itself
[17:11] pgriess: felixge: using listenFD() is a bettery way to go
[17:11] felixge: pgriess: given it has a prototype
[17:11] mikeal has joined the channel
[17:11] pgriess: which will allow you to share the same bound socket among workers
[17:11] pgriess: with the kernel round-robining accept() results among processes
[17:11] felixge: pgriess: yeah, that would work great for my needs
[17:11] ryah: i'm thinking about offering rewards for http messages that can't be parsed by http-parser
[17:12] pgriess: felixge: we're pretty close to being able to do that w/ vanilla node. just need ryah to commit my listenFD() patch and we're in
[17:12] felixge: pgriess: that's fantastic
[17:12] pgriess: ryah: knuth much?
[17:12] ryah: i'm 90% sure it's the most complete http parser
[17:12] felixge: ryah: I read the http spec, you will loose ;)
[17:12] felixge: ryah: but yeah, it's fantastic work
[17:12] felixge: ryah: well, actually you don't implement full http
[17:12] mjr_: ryah: I discovered quite by accident that your http parser handles upnp messages.
[17:13] felixge: ryah: I think you're not actually decoding header values
[17:13] felixge: ryah: and stuff like that
[17:13] felixge: ryah: which makes life much easier
[17:13] ryah: felixge: it handles level 0 of http
[17:13] pgriess: felixge: i'll post an example WebWorkers + sharing-FD example somewhere once that goes in; it's the #1 use case which i've been working towards
[17:13] felixge: ryah: is there an official level 0?
[17:13] pgriess: felixge: had this working in a hacked way for a month or two (see benchmarking numbers), but wanted to get it in to node
[17:13] felixge: pgriess: if you need any help, I'd be very interested
[17:14] mjr_: ryah: also, I don't think you decode or even detect HTTP trailers, do you?
[17:14] CIA-77: node: 03Peter Griess 07master * ra0134ff 10/ lib/net.js :
[17:14] CIA-77: node: add net.Server.listenFD
[17:14] CIA-77: node: Now that FD passing is in master, it'd be great to be able to use a received
[17:14] CIA-77: node: socket (which has already had bind(2) and listen(2) called on it) to fire up a
[17:14] CIA-77: node: new net.Server instance. This patch adds a net.Server.listenFD() method which
[17:14] CIA-77: node: will start up the accept watcher on the provided FD. - http://bit.ly/aX7l2F
[17:14] ryah: mjr_: i do
[17:14] mjr_: nice
[17:15] pgriess: ryah: thanks dude
[17:15] felixge: pgriess: does ^ mean we're in business?
[17:15] ryah: mjr_: http://github.com/ry/http-parser/blob/4cf39fd2fa8d1b52338ad3c4dd9ae6b3f32d72f4/test.c#L321-348
[17:15] pgriess: felixge: yessir
[17:15] felixge: pgriess: that's awesome !
[17:15] pgriess: felixge: i'll write up a short example and send it out
[17:16] felixge: minor nitpick: It should be listenFd() rather than listenFD(), no?
[17:16] ryah: felixge: shrug
[17:17] felixge: ryah: oh well, it's always nice to have a list of things to break in future version *evilgrin* :)
[17:17] felixge: * versions
[17:18] edspencer has joined the channel
[17:18] shfx has joined the channel
[17:19] _announcer: Twitter: "wow, made my syslog for nodejs nonblocking. I would commit to github assoon i am done, maybe in few days :D"-- Crazy Google. http://twitter.com/crazy_google/status/15643609518
[17:21] felixge: pgriess: does the master process itself have a http server, or does it just create the fd?
[17:21] felixge: (reading your msg on the mailing list)
[17:21] pgriess: felixge: either way. probably easiest to just create the fd
[17:21] ryah: felixge: either
[17:22] ryah: felixge: the master process can close its fd after giving it to the workers, theoretically
[17:23] _announcer: Twitter: "Woohoo! Support for shared-socket net servers for #nodejs committed with http://bit.ly/aLYjQ5."-- Peter Griess. http://twitter.com/pgriess/status/15643848430
[17:23] felixge: ryah: is stopping connections from the fd sync?
[17:23] felixge: It would suck if it wasn't, otherwise I couldn't do my 1 worker / request thingy
[17:24] ryah: felixge: what does that mean?
[17:24] ryah: felixge: you mean when you call server.close() ?
[17:25] felixge: ryah: well, I'm not sure what server.close() means when there are multiple workers using the fd?
[17:25] felixge: ryah: will it shut down all of them?
[17:26] ryah: no, just one
[17:26] felixge: ryah: ok, will it be sync?
[17:26] felixge: ryah: or could there still be a connection making its way in
[17:26] pgriess: felixge: the fds are essentially refcounted pointers to the same underlying object. each process closing the fd doesn't affect the others until the refcount == 0
[17:26] ryah: um, after you call server.close() i don't think new connections will be accepted
[17:26] pgriess: felixge: only servers who haven't called close() will see new connections
[17:26] ryah: felixge: but the existing connections might still issue requests
[17:27] blowery: http://wwdc-live-multiple-feeds.mape.me/
[17:27] blowery: build on node :)
[17:27] mjr_: this multi-listener thing is pretty crazy.
[17:27] blowery: built even
[17:27] mjr_: How does the kernel know which potential listener to send a new connection to?
[17:27] felixge: ryah: well, file uploads don't use keep-alive, so I wouldn't care about that
[17:27] mape: blowery: jup :)
[17:27] felixge: all I care about is that I can contain each file upload into a single process
[17:27] ryah: mjr_: whichever accepts first
[17:27] felixge: which should be doable, right? ryah / pgriess ?
[17:28] pgriess: felixge: not quite. this would split all uploads among N processes but wouldn't constrain a single process to one upload at a time
[17:28] pgriess: this will function just like w/ 1 process, but with each process seeing 1/N the traffic
[17:28] felixge: pgriess: I would still have to spawn more workers as I use up the old ones, right?
[17:28] felixge: pgriess: but that I don't think should be a problem, should it?
[17:29] _announcer: Twitter: "I have a raging nerd hard-on for Node.js."-- Matt Todd. http://twitter.com/mtodd/status/15644215811
[17:29] felixge: pgriess: My idea is to spawn 10 workers and accept connections. When 1 worker gets a new connection, it closes it's fd and spawns a new worker
[17:29] felixge: pgriess: so there are always 10 workers actively waiting for new connections
[17:29] niklasfi1 has left the channel
[17:29] ryah: felixge: starting workers is slow
[17:29] pgriess: ryah: +1
[17:29] ryah: felixge: i don't think that's a good model
[17:30] felixge: ryah: how slow?
[17:30] pgriess: felixge: why do you care about sandboxing each upload in its own process?
[17:30] felixge: ryah: file upoads are the slowest thing on earth :)
[17:30] ryah: felixge: half a millisecond
[17:30] felixge: pgriess: because I do a lot of crazy stuff in those processes
[17:30] felixge: pgriess: spawning up to 30-40 command line processes at a time : )
[17:30] ryah: felixge: jk, probably 30 ms or so
[17:30] felixge: pgriess: in previous version of node I was able to kill node without any exception / sign of segfault / etc.
[17:31] felixge: now I do hope those bugs are gone
[17:31] felixge: but they could just as easily come back again
[17:31] pgriess: felixge: if you're worried about stability, you could simply re-spawn a new worker whenever one dies
[17:31] felixge: pgriess: well, I guess I'm a little paranoid
[17:31] pgriess: felixge: if you're doing an upload-per-process, why not just run a CGI in apache
[17:32] pgriess: (seriously)
[17:32] felixge: I probably should just use a constant amount of workers
[17:32] ph^ has joined the channel
[17:32] felixge: pgriess: I also do a lot of long polling do get the progress on those file uploads
[17:33] pgriess: felixge: yeah, understood. the cost of 1 req/process is really high and the reason node performs better than apache. i think you really want to avoid that.
[17:33] felixge: pgriess: and there is more to the API
[17:33] ryah: felixge: how many workers do you use?
[17:33] felixge: pgriess: I spawn about 30 processes per file upload *anyway*. I'm working outside what's normally a good idea ;)
[17:33] _announcer: Twitter: "@mtodd I have been reading the press and I can't see whats so good about Node.js?"-- wisesumo ( Sam ). http://twitter.com/wisesumo/status/15644496981
[17:33] pgriess: felixge: haha
[17:33] felixge: pgriess: (these processes being ffmpeg, image magick, exiftool, ...)
[17:34] pgriess: yow
[17:34] felixge: ryah: right now I have a single process
[17:34] felixge: ryah: and it scares me because: a) I can't reload the code without killing on-going uploads, b) I loose all ongoing uploads on crash
[17:34] ryah: felixge: yeah, so use 4 now
[17:34] ryah: but don't use one per upload
[17:35] felixge: ryah: yeah, I think that will do. On deploy I'll just have to mark all existing workers as "dead" and spawn new ones
[17:35] aho has joined the channel
[17:35] pgriess: felixge: use Worker.terminate(), which initiates a graceful shutdown
[17:35] ryah: just kill -HUP the workers one by one
[17:35] pgriess: (of the given worker)
[17:35] pgriess: ryah: that will nuke in-progress uploads
[17:35] felixge: pgriess: what does graceful mean?
[17:35] felixge: ryah: the uploads can take up to 1 hour, and the encoding thereafter can take that long as well
[17:35] pgriess: felixge: your worker will get its onclose() handler invoked, at which point it can a) stop accepting new connections b) wait for existing uploads to complete, etc
[17:36] ryah: pgriess: i think he could process.addListener("SIGHUP", function () { server.close(); })
[17:36] pgriess: ryah: true
[17:36] pgriess: ryah: but that's less web-workery ;)
[17:36] felixge: pgriess: sounds good
[17:36] felixge: ryah: so yeah I guess I'll try going that route
[17:36] brainproxy has joined the channel
[17:36] felixge: what would you suggest for getting the upload progress?
[17:37] felixge: I mean the AJAX requests asking for the progress could hit any worker
[17:37] felixge: I could either ask *all* workers which one is handling the particular upload, which seems stupid
[17:37] _announcer: Twitter: "@wisesumo Evented is awesome. JavaScript is pretty damn good. The people working on the Node.js world are great. Cool projects, too."-- Matt Todd. http://twitter.com/mtodd/status/15644740387
[17:37] mjr_: felixge: sounds like you need a node balancer.
[17:37] felixge: or I could run a service dedicated to receive progress events from all workers
[17:38] ryah: felixge: you could have the workers each run two servers
[17:38] ryah: felixge: when they accept an upload they respond with the actual port number
[17:39] ryah: the browser connects to the second server for updates
[17:39] ryah: - or -
[17:39] felixge: ryah: well, I also want to offer this from the API, where the requester of the progress is not neccesarely the same client that created the upload
[17:39] ryah: nevermind my -or-
[17:39] pgriess: how about this
[17:40] pgriess: a) have the upload request respond with an upload token, identifying the upload stream to the http client, to be used for progress checks
[17:40] cloudhead has joined the channel
[17:40] ryah: felixge: some form of IPC is probably needed then. using redis perhaps
[17:40] pgriess: b) run a separate http server in the master. when the master gets a progress query for an upload token, it asks the relevant worker via postMessage()
[17:40] pgriess: ryah: postMessage() is IPC for web workers
[17:40] pgriess: full duplex and all that
[17:41] ryah: pgriess: is there a broadcast?
[17:41] pgriess: i think ultimately shared workers will solve your problem w/ o an extra server
[17:41] pgriess: ryah: no. that's why you need an upload token + separate server
[17:41] ryah: i guess one worker could accept a connection - think "do i have this upload? no? okay broadcast to get the result"
[17:41] pgriess: shared workers allow you to name workers and refer to them by name from other workers. so you can get a proress request in any worker and map it to a shared worker for the postMessage() q1uery
[17:41] ryah: pgriess: ah okay
[17:42] pgriess: ryah: w/ no broadcast, the master process is the only one who knows all workers; it needs to own the progress server
[17:43] ryah: pgriess: i think each worker should just know about each other, that the upload token encodes which worker is handling the uplaod
[17:43] felixge: pgriess: I already have upload tokens
[17:43] ryah: then when they accept an upload progress request, they directly ask the worker handling the upload
[17:43] pgriess: ryah: agreed. but its impossible for them to know about eachother at this point
[17:43] pgriess: ryah: need shared workers
[17:44] ryah: pgriess: the master can pass fds of the other workers to each one?
[17:44] mjr_: Just have the master do the accepting
[17:44] felixge: I probably will have one master process that all workers broadcast too
[17:44] felixge: I want a central location that knows the state of the system anyway
[17:44] ryah: i like the distributed system
[17:44] felixge: and this is not becoming a scalability issue since I'm only ever going to handle < 10 concurrent uploads / machine
[17:44] ryah: pgriess: or better, just use unix pipes
[17:44] pgriess: ryah: yeah, i think that might work. you might get different workers stomping on eachothers data since writes cross-worker won't be atomic to the same socket
[17:44] ryah: pgriess: /tmp/worker.1.sock
[17:45] pjb3 has joined the channel
[17:45] felixge: ryah: but how would a worker resolve an upload token to a specific other worker?
[17:45] felixge: ryah: without asking all of them?
[17:45] felixge: ryah: or without all of them talking to each other
[17:45] ryah: net.createConnection('/tmp/worker.' + tokenToWorkerID(token) + '.sock')
[17:45] pgriess: felixge: encode the worker ID in the token
[17:46] ryah: felixge: first 2 bytes encode the worker id, yeah
[17:46] felixge: pgriess: I'm using UUIDs, but I guess I could cheat
[17:46] pgriess: ryah: yeah that would work. i might opt to use socketpair() to avoid all the filesystem clutter
[17:46] felixge: so that would work :)
[17:46] ryah: but then any worker could die
[17:46] ryah: and the whole system would still work
[17:46] ryah: including the master
[17:46] pgriess: ryah: i don't think its kosher for the master to die and have the workers live on
[17:47] pgriess: (well, says what-wg)
[17:47] ryah: pgriess: why?
[17:47] davidsklar has joined the channel
[17:47] pgriess: that's out of spec. though of course, we don't need to follow it to the letter.
[17:47] pgriess: ryah: i'm unconvinced that allowing workers to soldier on w/o a leader is a good idea. though i suppose all sorts of distributed systems do just that.
[17:47] pgriess: hm
[17:48] mattly has joined the channel
[17:49] felixge: ryah / pgriess: Thanks a ton for your input, I really have a much better picture on how to do this now
[17:49] felixge: headed out for beach volleyball now, brb 2.5h
[17:49] felixge: (unless it rains, in that case earlier : )
[17:49] pgriess: felixge: np. adios.
[17:49] pgriess: ryah: anyway, good points. i need to think about them.
[17:50] richcollins has joined the channel
[17:51] ryah: it'll be cool to actually start building things with this
[17:51] ryah: because basically this is black magic to most people
[17:51] qFox has joined the channel
[17:52] ryah: hopefully it can be a common technique with node :)
[17:52] pgriess: ryah: yeah, for sure.
[17:52] pgriess: ryah: also need to get rid of dependency on messagepack
[17:55] AndChat has joined the channel
[17:57] _announcer: Twitter: "#nodejs web workers: http://github.com/pgriess/node-webworkers So cool."-- lifeinzembla. http://twitter.com/lifeinzembla/status/15645931036
[18:00] isaacs has joined the channel
[18:08] _announcer: Twitter: "Time to rewrite my #node.js useragent parser to handle iOS4 in useragent strings ;)"-- Arnout Kazemier. http://twitter.com/3rdEden/status/15646589801
[18:08] tmpvar has joined the channel
[18:08] tmpvar: yo
[18:09] ryah: tmpvar: re
[18:10] tmpvar: hey ryah, when you say "kernel" do you mean the OS or node's internals?
[18:11] ryah: the os
[18:11] tmpvar: I was not aware of such a feature.. crazy
[18:14] _announcer: Twitter: "git pull, ./configure, make, make install... updating my node.js installation. got lazy and am a few versions behind the latest"-- Zach Young. http://twitter.com/young_zach/status/15646937804
[18:14] ryah: tmpvar: commonly known as a "pre-fork server"
[18:14] _announcer: Twitter: "A presentation by @creationix, using Connect with Node.js, was the most tweeted on SlideShare this weekend! http://extjs.com/x/2x"-- Ext JS. http://twitter.com/ExtJS/status/15646967537
[18:14] ryah: tmpvar: although we're not doing that exactly
[18:15] Aria has joined the channel
[18:15] tmpvar: ryah, sounds interesting.. I have yet to dig into that area of node
[18:16] ryah: tmpvar: nginx workers and unicorn (the ruby server) are the same technique
[18:16] bpot has joined the channel
[18:16] bpot has left the channel
[18:16] behmann_ has joined the channel
[18:16] behmann has joined the channel
[18:17] tmpvar: ryah, fun, thanks :)
[18:17] TheEnd2012 has joined the channel
[18:25] ctp has joined the channel
[18:28] ctp: hi folks. anyone here can take a look at http://pastebin.com/SriWVLtr ? i try to read in a large file chunk by chunk and write it same way. but the code hangs :-(
[18:30] tmpvar: ctp, do you have to end the res?
[18:30] tmpvar: i'd try that
[18:32] _announcer: Twitter: "http://nodejs.org/ node.js"-- Frederick. http://twitter.com/frederickpxeo/status/15647944336
[18:34] hsuh has joined the channel
[18:35] reid\work has joined the channel
[18:36] bradleymeck: mmm does v8 have destructors (even if i have to wait for a gc/not garranteed before exit)
[18:36] mattly has joined the channel
[18:37] brainproxy has joined the channel
[18:37] ryah: bradleymeck: at the c++, yes
[18:38] kevwil has joined the channel
[18:39] softdrink has joined the channel
[18:39] bradleymeck: mmm was hoping to attach to an Object.
[18:42] _announcer: Twitter: "XMPP library for node.js http://bit.ly/9ksdqU" [cs]-- Goutam Dey. http://twitter.com/dgoutam/status/15648517608
[18:43] ctp: tmpvar: hm, you mean http://pastebin.com/tG0ACK7G ?
[18:44] liucougar has joined the channel
[18:44] keyvan has joined the channel
[18:45] ctp: the code hangs and hangs :-(
[18:46] ctp: something blocks
[18:47] ryah: ctp: hm
[18:47] ryah: is it just just the response that hangs?
[18:47] ryah: does node actually lock up?
[18:47] ryah: (what happens if you issue another req?)
[18:48] tmpvar: he needs to res.writeHead() and res.end() I thought
[18:49] ctp: node runs at 0 % cpu usage so not sure ;-)
[18:50] bradleymeck: nooo, it looks like you set up fs.createReadStream(path, [options]) oddly
[18:51] bradleymeck: seems you made it a callback style function when it returns a stream, so it kinda makes sense to just hang
[18:52] ctp: bradleymeck: i
[18:52] ctp:
[18:52] ctp: bradleymeck: i'm relatively new to node and non-blocking coding so i'm not sure which part you mean exactely
[18:55] ctp: you mean it's a bad idea to write the chunks within the createReadStream?
[18:55] bradleymeck: http://nodejs.org/api.html, fs.ReadStream shows how to use createReadStream, it takes an option object and returns a ReadableStream object, that returned object can then be used to add listeners to
[18:56] rictic has joined the channel
[18:57] ctp: argh, ok. i see
[18:57] ctp: mni thx ;-)
[18:57] bmizerany has joined the channel
[18:58] chewbranca has joined the channel
[18:59] bmizeran_ has joined the channel
[19:00] TheEnd2012 has joined the channel
[19:01] SteveDekorte has joined the channel
[19:02] creationix has joined the channel
[19:02] razorsage has joined the channel
[19:02] TheEnd2012 has left the channel
[19:03] ctp: bradleymeck: ok, i got it. is this a clean node'ish way: http://pastebin.com/YY9A5EtE ?
[19:04] Ori_P has joined the channel
[19:04] bradleymeck: just be sure to have var f = , instead of f = , else you can pollute the global namespace
[19:04] _announcer: Twitter: "Can someone hook me up with iOS useragent string? I need to adjust my #nodejs useragent parser"-- Arnout Kazemier. http://twitter.com/3rdEden/status/15649760580
[19:05] ctp: bradleymeck: yepp, you're right ;-) thx
[19:05] razorsage has joined the channel
[19:06] ctp: cool stuff ...
[19:08] ewdafa has joined the channel
[19:23] maushu has joined the channel
[19:27] maushu has joined the channel
[19:27] jakob has joined the channel
[19:27] jakob: hi everyone
[19:27] _announcer: Twitter: "Anyone have a good example of working with SSL in Node.js ?"-- Timothy Marshall. http://twitter.com/timothymarshall/status/15651001921
[19:30] WALoeIII has joined the channel
[19:30] jakob: I have got a slight problem with symlinks in one of my current node.js applications. I hope somebody might be able to help me out with this. I am already thinking I am kind of stupid for not being able to figure out a viable solution for myself.
[19:31] jakob: I have got a htdocs folder, where I serve some static files from. I want to support symlinked files in there as well. To make sure nobody does include files outside of the htdocs folder I use realpath on every incoming request path and ensure the full htdocs directory path is what the requested file starts with
[19:32] jakob: unfortunately realpath resolves symlinks. Therefore any symlinked file gets rejected because it's in the wrong folder.
[19:32] jakob: Is there anyway to do something like realpath, but without resolving the link?
[19:32] creationix: is isaacs around?
[19:33] TobiasFar has joined the channel
[19:34] creationix: jakob: you can manually resolve the symlinks in parts
[19:35] creationix: ideally you'd have a way to disable symlink resolving, but I don't think that's a config option anywhere
[19:37] jakob: creationix: I can stat the file to see if it is a symlink. But I don't see how I could do a secure check on whether the symlink is in the htdocs directory or not
[19:39] creationix: isn't there a readlink where you can get the path it points to?
[19:39] Aria: Yeah.
[19:40] jakob: creationix: yeah but I don't need the path it points to. To check where the link is stored I need to check the realpath of the symlink itself…
[19:40] Aria: But it's the full path resolution prior to that that does it.
[19:40] jakob: creationix: unfortunately realpath resolves the link automatically :(
[19:40] Aria: What's needed is something to resolve "../.././../././" into the right thing, without following symlinks
[19:41] JimBastard has joined the channel
[19:41] jakob: Aria: yeah exactly
[19:42] jakob: Aria: To me it seems something like that doesn't exist currently. Is this assumption right?
[19:42] Aria: Yeah, not in combination
[19:42] jakob: hmm that's kind of bad, for my use case :(
[19:42] Aria: It's not THAT hard to do -- read the path up to the next /; if it's ., ignore it, if it's "..", chop off the last one you did.
[19:42] jakob: damn…
[19:42] Aria: It's purely a textual problem at that point.
[19:43] Aria: Then repeat. You'll get the "canonical form" of the path
[19:44] jakob: hmm yeah that's right. I just need to add the current working directory to it then and I should have the path information I searched for
[19:48] _announcer: Twitter: "Scratch that. Node.js doesn't work on Windows. (I, unfortunately, must work with IIS). Going to work with SOAP"-- Timothy Marshall. http://twitter.com/timothymarshall/status/15652035832
[19:48] jakehow has joined the channel
[19:49] saikat has joined the channel
[19:50] saikat` has joined the channel
[19:51] femto has joined the channel
[19:52] saikat has joined the channel
[19:57] _announcer: Twitter: "@tjholowaychuk wrote up a nice blog post about #connect for #nodejs http://bit.ly/cBGlGu"-- Tim Caswell. http://twitter.com/creationix/status/15652514176
[19:57] SteveDekorte has joined the channel
[19:57] gf3: tjholowaychuk: STOP TWEETING, FUCK
[19:58] tjholowaychuk: gf3: ? that was not me
[19:58] gf3: tjholowaychuk: just in general
[19:58] gf3: Is there a node express connect for iPhone 4? hmm?
[19:58] pjb3 has joined the channel
[19:58] tjholowaychuk: gf3: dont follow me then lol what's up your ass
[19:58] ctp: tjholowaychuk: btw, connect is a great piece of code. mni, mni thx for your work ;-)
[19:59] gf3: tjholowaychuk: I'm just joking, don't mind me
[19:59] ctp: tjholowaychuk: i have to take a look at expresso too ;-)
[19:59] tjholowaychuk: :D
[20:00] _announcer: Twitter: "LOLOL just kidding guys #nodejs Hai IRC peeeeple"-- Gianni Chiappetta. http://twitter.com/gf3/status/15652685333
[20:01] creationix: don't blame people tweeting about node, blame the bot ;)
[20:02] _announcer: Twitter: "creationix" Don't tell me what to do! #nodejs "LOL"-- Gianni Chiappetta. http://twitter.com/gf3/status/15652785296
[20:02] creationix: :)
[20:03] Wuushu has joined the channel
[20:03] gf3: _announcer is my new IRC client
[20:03] Wuushu: Hi everyone, I'm pretty new to node but I'm loving it so far! Not sure what the protocol is here but I'll give it a try..
[20:04] Wuushu: I've been trying to use Sannis' libmysqlclient, and cloning it from github, but then what? Anyone have any experience with this node module?
[20:05] Wuushu: (http://github.com/Sannis/node-mysql-libmysqlclient)
[20:05] femtoo has joined the channel
[20:06] creationix has left the channel
[20:06] creationix has joined the channel
[20:07] bradleymeck: node-waf configure build (since it has a wscript file it means it needs native code from this command)
[20:07] Wuushu: bradley, thanks! I have no idea what wscript's were
[20:07] Wuushu: I'll give it a try :)
[20:07] shfx has joined the channel
[20:08] pdelgallego has joined the channel
[20:08] lobridge has joined the channel
[20:08] rtl has joined the channel
[20:08] Wuushu: node-mysql-libmysqlclient/wscript:18: error: Missing libmysqlclient library
[20:09] bradleymeck: do you have the libmysqlclient package installed on your machine?
[20:09] Wuushu: I'm standing in the git-cloned folder node-mysql-libmysqlclient
[20:09] bradleymeck: its a separate dev package you can get from most linux package managers etc
[20:09] Wuushu: Good question :) I'll have to check that.. O:)
[20:09] Wuushu: Sorry
[20:09] dks has joined the channel
[20:09] bradleymeck: np
[20:10] jbrantly has joined the channel
[20:11] lobridge: i'm looking for a webframework for node, and came across express. Anybody uses it here?
[20:12] Wuushu: Bradleymeck: 'build' finished successfully (0.884s)
[20:12] Wuushu: Thanks a ton, I've been clicking every link in that git repo for the past 1½ hours trying to find additional comments
[20:13] tjholowaychuk: lobridge: ya
[20:13] mde: lobridge: If you get a chance, kick the tires on Geddy for me: http://geddyjs.org/
[20:13] mde: I'm very interested in feedback.
[20:13] bradleymeck: wuushu, from there dont know how its set up to build, but if it has a build directory under the default build be sure to take the mysql_bindings.node and move it to top dir
[20:14] bradleymeck: might already be set to move it to top
[20:14] lobridge: mde: ill take a look
[20:14] _announcer: Twitter: "annoyed, node-amqp doesnt work with recent versions of node.js"-- mschoch. http://twitter.com/mschoch/status/15653375165
[20:16] mape: tjholowaychuk: hey, I played around with Connect and came up with this: http://mape.me:8081/test.html I was wondering if you have any quick thoughts on if that is the way to do things in Connect as well as how I should enable that middleware to pass a variable to the template layer (cache flash for script/css) in a proper way.
[20:17] grahamalot has joined the channel
[20:18] dks: I want to contribute a patch. Is the way as described on nodejs.org the way i should proceed ?
[20:18] tjholowaychuk: mape: dope! I will try and take a better look soon, just trying to finish up a project today
[20:18] bradleymeck: yes dks
[20:18] mape: Ok, great, thanks
[20:18] tilgovi has joined the channel
[20:19] dks: ok, I'll generate a patch as described and post it.
[20:20] Wuushu: bradley, i got it working and connected now to localhost mysql database from within node
[20:20] bradleymeck: great!
[20:20] Wuushu: :)
[20:21] mattly has joined the channel
[20:25] behmann has joined the channel
[20:29] gwoo has joined the channel
[20:35] SteveDekorte has joined the channel
[20:41] dks: I cannot seem to create a patch file. Someone with experience ?
[20:41] Aria: diff -u orig new ?
[20:42] dks: I use the instructions from nodejs.org: git format-patch HEAD^
[20:42] dks: But the resulting file doesn't look like anything I justed changed.
[20:43] Aria: Ah!
[20:43] Aria: HEAD^!
[20:43] Aria: er.. ^1
[20:44] hellp has joined the channel
[20:45] Aria: Did you commit your changes to the local repository?
[20:47] dks: I belive so, I used git commit -m "some text"
[20:47] Aria: Ah, good.
[20:47] Aria: It should show in git log
[20:48] Aria: It's either git format-patch since-revision, or git format-patch revision-range
[20:48] boaz_ has joined the channel
[20:48] Aria: So you can choose the last commit ID (or a reference to it like HEAD^1), and use that as 'since', or give two revisions -- "deadbeef..cafebabe"
[20:50] dks: It doesn't show up in git log
[20:50] Aria: Then it didn't commit
[20:50] dks: When I did commit it said something like run add
[20:51] dks: However I only updated files, not added any
[20:51] Aria: You have to add your /changes/ in git.
[20:51] Aria: git add fileschanged, or git commit -a
[20:51] Aria: Then commit if you didn't git commit -a to add-and-commit-at-ince
[20:51] dks: ok, I'll try that
[20:53] Wuushu: nn al
[20:53] Wuushu: all*
[20:53] dks: that seems to work. Aria: Thanks
[20:53] Aria: Someone needs to make a git-crashcourse website to refer people to.
[20:53] Aria: Sure thing, dks
[20:53] dks: I should start reading some git manual
[20:54] Aria: Yeah. An overview, and an understanding of what a refspec is is the most useful when working with git
[20:59] stagas has joined the channel
[21:06] Ori_P has joined the channel
[21:10] SteveDekorte: anyone here interested in helping me work on a project to bring coroutine based i/o to node?
[21:10] admc_ has joined the channel
[21:12] tmpvar: no
[21:12] ryah: SteveDekorte: using libcoro?
[21:12] SteveDekorte: ryah: using the v8 coroutine stuff
[21:13] SteveDekorte: then just wrap the file and sockect i/o calls
[21:13] SteveDekorte: all the normal node callbacks can be left in place
[21:13] ryah: but what's that use at the bottom? ucontext directly?
[21:13] SteveDekorte: ryah: looks like it, yes
[21:13] ryah: might be better to throw libcoro inbetween for platform independency
[21:14] ryah: s/y$/e/
[21:14] SteveDekorte: ryah: do you mean my libcoroutine library?
[21:14] SteveDekorte: http://dekorte.com/projects/opensource/libcoroutine/
[21:14] ryah: oh yeah, i forogt you have one too
[21:14] ryah: no i meant http://software.schmorp.de/pkg/libcoro.html :)
[21:15] SteveDekorte: ryah: ucontext isn't supported on all platforms (like OSX)
[21:15] SteveDekorte: my lib supports OSX, windows, and other non-ucontext platforms
[21:16] ryah: okay fair enough
[21:16] ryah: i'm pretty sure libcoro also does
[21:16] ryah: but yeah i forgot you have a lib too :)
[21:16] ryah: guess that would be best
[21:16] SteveDekorte: whatever works, I dont' care either way
[21:17] quellhorst has joined the channel
[21:17] SteveDekorte: I just don't want to write 10 lines of code where 1 will do :)
[21:18] felixge has joined the channel
[21:18] felixge has joined the channel
[21:18] _announcer: Twitter: "ok, so who's fixing web-sockets in nodejs, the protocol was just updated: http://is.gd/cGmvZ #nodejs, #websockets #html5"-- karlnorling. http://twitter.com/karlnorling/status/15656663800
[21:22] steadicat has joined the channel
[21:26] dks: I'm looking into some flow libs like flow-js and Step. Are there any others ?
[21:26] mde: dks: http://github.com/mde/geddy/blob/master/geddy-util/lib/async.js
[21:27] zomgbie has joined the channel
[21:28] _mythz has joined the channel
[21:29] _announcer: Twitter: "Node docs got awesome since I last checked. http://nodejs.org/api.html"-- Adam Wiggins. http://twitter.com/hirodusk/status/15657222662
[21:30] admc_ has joined the channel
[21:30] hdon: isaacs, hey, i am implementing the Node API for GPSEE, and it looks like you have created a package manager for Node software! is your package manager cognizent of issues like version-of-Node compatibility/bugs with different packages?
[21:31] isaacs: hdon: it is cognizant of version-of-node, in that it will only install packages which are allegedly compatible with the current version of node.
[21:31] dks: mde: looks nice, but I'm looking for a more flexible framework
[21:31] isaacs: hdon: that logic needs to be more sophisticated, though
[21:32] isaacs: hdon: it also lets package authors specify versions of dependencies that they work with
[21:32] creationix: dks: what are you looking for
[21:32] mde: dks: You mean using stuff piecemeal, or just a different API?
[21:32] creationix: dks: or more specifically, what don't you like about Step?
[21:33] dks: more features, so also more complex things can be done.
[21:33] hdon: isaacs, what would you think about expanding version-of-node to a pair of data: node impl and version of impl?
[21:33] quellhorst has left the channel
[21:33] creationix: I also made Do and Conductor, they are control-flow libraries with different semantics
[21:33] dks: I like Step, but just missing some features.
[21:33] creationix: Conductor is usually overkill, but maybe it's what you need
[21:33] SteveDekorte has joined the channel
[21:33] isaacs: hdon: well, i think the simpler way is to say that you specify a node version that it works with, and then npm looks for dependencies that also work with that version of node.
[21:33] mde: Ah, okay. Yeah, everybody has different needs. I just wanted a short-circuit, and do-when-finished capacity.
[21:33] Pilate has joined the channel
[21:33] dks: I look Conductor up
[21:34] creationix: mde: btw, when can you call me today, we need to meet sometime soon :)
[21:35] rtl has joined the channel
[21:35] dks: I had a small test case. recursive go through directories and look up all the files and return this.
[21:36] mde: creationix: Are you free to talk now?
[21:36] creationix: mde: sure
[21:36] mde: dks: I'm using the async to recurse upward through a tree of template partials. Works great, as long as it's all Node-style callback-last.
[21:37] creationix: dks: yeah, I think that's a pretty common use case, there should be some example code laying around
[21:37] mde: creationix: Lemme find your phone number.
[21:37] mde: Actually, are you on AIM/YIM/GTalk?
[21:38] slaskis has joined the channel
[21:38] mde: NM, found it.
[21:38] creationix: mde: sure, tim@creationix.com for gtalk
[21:38] mde: creationix: Gimme a sec, I'll call you.
[21:38] mde: Okay, cool.
[21:38] slaskis: using the Buffer in nodejs seems a bit unreliable to me, am i using it wrong? I seem to be retrieving things from all over my memory :P
[21:40] bmizerany has joined the channel
[21:40] dks: slaskis: I use it a lot and no problems.
[21:42] slaskis: maybe it's how i use it, I'm loading chunked http data and since i don't know the final content length i keep creating new buffers for every chunk. There's no way or expanding a buffer, right?
[21:42] slaskis: and i copy over the buffer from the previous buffer as well...
[21:42] dks: slaskis: correct
[21:43] jashkenas has joined the channel
[21:43] jashkenas has left the channel
[21:43] dks: slaskis: so you have to check if it fits and if not create a new bigger buffer
[21:44] slaskis: also, before this recreating buffer thing i tried to create a large enough buffer (just for testing), so i created a buffer with size 0xFFFFFF and i got all kinds of stuff in that buffer like parts of the source code i'm currently working on and a lot of binary data. I'm assuming it's some kind of buffer overflow or something?
[21:44] hdon: isaacs, ah well, it's unlikely that i will implement the whole API at first, but i suspect there is a lot of stuff that doesn't use, for instance, Process, or child_process. stuff that only uses net.Server and such. i assume in Node, http.Server is a Javascript HTTP server implementation built on top of net.Server, which would mean all i have to do is use the Node http.Server and then apps built on those would work. what kind of stuff is
[21:44] hdon: in the repo now?
[21:45] hdon: repo = package manager server i guess
[21:45] hdon: another possibility is for me to just run your software and keep our own parallel world until we have the full Node API
[21:45] isaacs: hdon: http://registry.npmjs.org/ is the list of stuff in the registry now.
[21:45] isaacs: hdon: i'm not familiar with gpsee
[21:46] hdon: isaacs, yes i saw. but it's in JSON so i haven't yet written a program to make it more human readable :)
[21:46] isaacs: hdon: npm ls
[21:46] isaacs: hdon: that is, install npm, and then run: npm ls
[21:46] dks: slaskis: I'm not sure the buffer is cleared when you create it
[21:46] mape: hdon: http://npm.mape.me/
[21:46] hdon: isaacs, GPSEE is more or less a module (require()) system for Spidermonkey (Mozilla's JS engine)
[21:46] dks: slaskis: I just keep track of the offset myself.
[21:46] hdon: mape, hey! thanks :) i knew this had to exist somewhere
[21:46] _announcer: Twitter: "storing files in couchdb was wonky a while back, but a node.js/couchapp w/ file uploads to riak is probably just right for this micro app."-- grantmichaels. http://twitter.com/grantmichaels/status/15658112087
[21:47] isaacs: hdon: o, ok, cool
[21:47] slaskis: dks: but creating a new buffer still uses the same memory as the other buffer?
[21:47] dks: something like: this.offset += this.buf.write(appendString,"utf8",this.offset);
[21:48] slaskis: dks: thanks, yeah it's a lot more stable now :)
[21:48] dks: slaskis: no a new buffer is "empty", so you should copy the old smaller buffer in the newer one.
[21:48] hdon: isaacs, we have a lot of emphasis on things like the POSIX APIs and binary data types
[21:48] isaacs: kewl
[21:48] isaacs: hdon: if you implement the node api, then npm should Just Work
[21:48] hdon: and as soon as i can get around to finishing it we'll also have a SWIG module
[21:48] hdon: ACTION nods
[21:48] isaacs: hdon: but npm does use a lot of the node api
[21:48] hdon: ah, what else does it use?
[21:48] isaacs: hdon: child_process, http, and fs, mostly
[21:49] isaacs: hdon: and Buffer
[21:49] hdon: hmm, what's Buffer?
[21:49] hdon: sounds like it could be similar to our binary data types
[21:49] isaacs: hdon: it's node's binary type thingie.
[21:49] hdon: ACTION nods
[21:49] hdon: cool
[21:49] hdon: that should be easy to implement on top of our current binary data type
[21:50] isaacs: hdon: i plan to move npm up the stack a bit, though, so it shouldn't be dealing with buffers directly for much longer.
[21:50] isaacs: hdon: now that the pump stuff has landed
[21:50] _announcer: Twitter: "Ok. I've got Apache replaced with Nginx. Now time to get node.js running."-- Brandon Titus. http://twitter.com/bjtitus/status/15658309599
[21:50] hdon: our binary data types are compatible with Common JS 1.1 specification and our FFI API for calling C/C++ functions (although our C++ support is very weak -- no support for symbol name mangling or C++ exceptions)
[21:51] hdon: isaacs, ah ok, that's cool. what's the pump stuff?
[21:51] isaacs: hdon: it's basically a way to hook up one stream API to another
[21:51] isaacs: hdon: npm does a lot of that. downloading, uploading, etc.
[21:51] zomgbie has joined the channel
[21:51] hdon: ACTION nods
[21:52] mattly has joined the channel
[21:55] hassox has joined the channel
[21:55] mattly has joined the channel
[21:55] dji_ has joined the channel
[22:05] stevendavie has joined the channel
[22:06] sanderjd has left the channel
[22:09] phiggins has joined the channel
[22:09] hsuh has joined the channel
[22:11] derbumi has joined the channel
[22:12] brainproxy has joined the channel
[22:12] slaskis has joined the channel
[22:17] sudoer has joined the channel
[22:17] maushu has joined the channel
[22:18] _announcer: Twitter: "has epic js rendering performance win by using Y.StyleSheet() instead of node.setStyle() in a loop! yay!"-- Dirk Ginader. http://twitter.com/ginader/status/15659782139
[22:18] _mythz has left the channel
[22:18] _mythz has joined the channel
[22:19] _mythz: does anyone know if the Google Closure library works with node.js?
[22:19] _mythz: obviously a lot of DOM/XHR/UI related functions wont, but there is a good libary code that could be used
[22:20] behmann has joined the channel
[22:22] isaacs: _mythz: no reason why generic js stuff wouldn't work with node. i mean, it's just v8 with some custom bindings added.
[22:24] _mythz: yeah ok, but a large part of it has to do with the dependency management, i.e. including namespaces, etc
[22:24] CIA-77: node: 03Ryan Dahl 07master * r41f213b 10/ (6 files in 3 dirs): Add binding to termios, implement readline for repl - http://bit.ly/a0Ys41
[22:24] mjr_: woah
[22:24] mjr_: lib/readline.js
[22:24] mjr_: !
[22:25] ryah: a bit hacky - but let's try it
[22:25] isaacs: ryah: does this mean that node-repl doesn't need rlwrap?
[22:25] mjr_: Glad I didn't work on that last night like I was intending to.
[22:25] ryah: should be easy to add key bindings now
[22:25] ryah: isaacs: yeah
[22:25] isaacs: neato.
[22:25] isaacs: will it still read your .inputrc?
[22:26] mjr_: ryah: probably can remove repl.js:71-72 now.
[22:26] ryah: isaacs: it just has simple emacs bindings
[22:26] ryah: and history
[22:26] isaacs: i see.
[22:27] isaacs: i'll probably keep using rlwrap then
[22:27] mjr_: but this opens the door for tab completion
[22:27] bradleymeck: very nice ryah
[22:27] ryah: yes
[22:27] ryah: tab completion shouldn't be too hard
[22:27] ryah: i mean at least the rl interface
[22:27] mjr_: And tab completion is the key thing that would make repl super great
[22:27] ryah: deciding what to put in there will be hard
[22:28] bradleymeck: can do it in ansi too which is fancy
[22:28] mjr_: Yeah, I think the whole, "eval a partial command, if it has syntax errors, its probably a continuation" might need to get a bit smarter.
[22:28] bmizerany has joined the channel
[22:28] ryah: isaacs: yeah, it's pretty basic. but should make things suck less
[22:29] tmpvar: have you considered linenoise for this?
[22:29] tmpvar: or are we way past that already?
[22:30] hassox: lads... can I get input from the command line?
[22:30] bradleymeck: emitter=process.openStdin
[22:30] bradleymeck: ()
[22:30] hassox: ah ok, so I can't just ask for a line of input and wait for it
[22:30] hassox: np thanx :)
[22:30] ryah: tmpvar: i ported linenoise to js
[22:31] ryah: and made it async
[22:32] tmpvar: ryah, slick
[22:33] bradleymeck: mmm ryah, so you didnt find any probs exitting raw mode in tty? cause thats about all node-terminal had as blocking errors, never could solve it
[22:33] isaacs: ryah: i read through the modules discussion on es-discuss.
[22:33] isaacs: ryah: reaction: meh.
[22:34] isaacs: ryah: i have a hard time getting interested in language discussions that are that far removed from actual running code.
[22:34] gerad has joined the channel
[22:34] mjr_: bradleymeck: I think this part addresses that: http://github.com/ry/node/commit/41f213be185a22d654cfa5bc9867e2df6704a650#L3R2192
[22:34] mjr_: I did not know about atexit()
[22:35] ryah: me either. atexit is great
[22:35] ryah: doesn't work for sigint and such though
[22:35] mjr_: Is that a BSD-ism?
[22:35] ryah: need to handle those
[22:38] mjr_: ryah: are you interested in some key binding patches, or are you already working on that?
[22:38] ryah: mjr_: donno. posix.1-2001 has it apparently
[22:38] ryah: mjr_: yes i am.
[22:38] ryah: and no i am not.
[22:38] ryah: ctrl+r would be nice
[22:38] ryah: but hard
[22:38] mjr_: OK, lemme do a couple of them that I can't live without.
[22:39] mjr_: Yeah, control-r is my favorite, but that'll take more work.
[22:41] isaacs: being able to type a few chars and then up- and down-arrow through matches is key.
[22:41] isaacs: that's like a game-changer.
[22:41] isaacs: i'll probably just have to keep using rlwrap to get that, though, i suppose.
[22:41] mjr_: for now
[22:42] [[zzz]] has joined the channel
[22:46] dji has joined the channel
[22:49] _announcer: Twitter: "Javascript is a product based site admiration RT @ hirodusk: Node docs got awesome since I last checked. Http://nodejs.org/api.html" [ja]-- Masakazu . http://twitter.com/studiomaestro/status/15661516492
[22:51] deanlandolt_ has joined the channel
[22:51] dji has joined the channel
[22:52] deanlandolt has left the channel
[22:55] zomgbie has joined the channel
[22:55] visnup has joined the channel
[22:56] saikat has joined the channel
[22:58] dji has joined the channel
[22:59] _announcer: Twitter: "ported Antirez @ # it's linenoise nodejs http://github.com/ry/node/blob/41f213be185a22d654cfa5bc9867e2df6704a650/lib/readline.js" [cs]-- Ryan Dahl. http://twitter.com/ryah/status/15662057848
[23:01] isaacs: alright, npm on master works with node on master again.
[23:04] CIA-77: node: 03Ryan Dahl 07master * re43d6fc 10/ lib/readline.js : Fix misspelling - http://bit.ly/cFtl4z
[23:04] cloudhead: : )
[23:04] ryah: cloudhead: thanks
[23:04] cloudhead: no prob
[23:04] ryah: ACTION should :set spell by default
[23:04] cloudhead: hehe
[23:05] cloudhead: hey ryah you think I could use readline.js for http-console?
[23:05] cloudhead: thing is I'm not evaling javascript
[23:05] cloudhead: but I need history etc
[23:06] cloudhead: it works fine with rlwrap right now, but I'd like it to be built in
[23:06] cloudhead: hm maybe I should look at the new code for repl
[23:06] _announcer: Twitter: "What are some simple, basic Node.js library implementations that I can use for reference/example? #learn #present"-- Matt Todd. http://twitter.com/mtodd/status/15662475439
[23:07] mjr_: cloudhead: It looks like readline.js is pretty independent
[23:07] cloudhead: mjr_: yea that's what I'm starting to realize
[23:07] cloudhead: the set prompt 'node>' is what threw me off
[23:08] mtodd has joined the channel
[23:09] ryah: cloudhead: yeah, http-console is what made me want to do this
[23:09] cloudhead: awesome
[23:09] ryah: cloudhead: but i've only just hacked it into repl
[23:10] gwoo: isaacs: is there an interface guy at kno with the last name baboo?
[23:10] ryah: so if you do that, it might be good to get an idea of how readline.js works first and be prepared to patch it
[23:10] isaacs: gwoo: nope, not that i know of.
[23:10] cloudhead: ryah: sounds good
[23:10] gwoo: isaacs i saw the video this morning. looks really cool.
[23:10] isaacs: gwoo: our CTO's nmame is Babur, though.
[23:10] isaacs: gwoo: that's kinda close.
[23:10] gwoo: hmm
[23:11] gwoo: yeah it's not him
[23:12] gwoo: this guy baboo is working on some 3D stuff
[23:12] tjholowaychuk: isaacs: yo, is that npm publish bug all good to go? i will try and push some of my stuff this week when i have a chance
[23:12] JimBastard has joined the channel
[23:12] isaacs: tjholowaychuk: it should work, yeah.
[23:12] blackdog_ has joined the channel
[23:12] isaacs: tjholowaychuk: if it doesn't, lmk.
[23:13] tjholowaychuk: will do
[23:13] JimBastard: sup tmpvar
[23:13] JimBastard: internet friend has landed
[23:13] steadicat has joined the channel
[23:15] CIA-77: node: 03Ryan Dahl 07master * r6056d2e 10/ (bin/node-repl lib/module.js src/node.cc src/node.js): node without arguments starts the REPL - http://bit.ly/aC8nVs
[23:16] mjr_: ryah: I'm pretty close with several more keybindings to make it more like readline.
[23:17] tjholowaychuk: re r6056d2e wahoo!
[23:17] gwoo: isaacs: should npm create links to the executables?
[23:17] isaacs: gwoo: if you use the "bin" hash, yeah
[23:17] gwoo: maybe that was part of the latest fix
[23:17] gwoo: ok
[23:17] isaacs: gwoo: "bin" : { "npm" : "./cli.js" }
[23:17] gwoo: ah nice
[23:18] isaacs: gwoo: it'll stick it wherever node thinks it's installed. note that this is currently broken when installing node with homebrew, but i think reid burke was gonna send mxcl a patch for that.
[23:18] gwoo: ah ok. i think that was the issue
[23:18] isaacs: gwoo: yeah, if you install node in the traditional way, it works fine. with homebrew, it ends up thinking its installed in the Cellar, so that's where npm drops bins.
[23:19] cloudhead: isaacs: does npm work with node edge? there was a problem a couple weeks ago
[23:20] isaacs: cloudhead: version 0.1.14 will. get the latest code and then make install or make link.
[23:20] cloudhead: nice
[23:20] isaacs: cloudhead: i'm working on unpublish and then rollback
[23:20] cloudhead: wooh
[23:20] gwoo: isaacs: yup, that's exactly where they went
[23:20] isaacs: cloudhead: ie, borked installs will uninstall to clean itself up.
[23:20] isaacs: borked publishes will unpublish
[23:20] cloudhead: cool
[23:20] isaacs: i'm not going to try to do fully atomic everything, or temporary folder stuff. too much work.
[23:20] sudoer has joined the channel
[23:20] cloudhead: I'd like to pimp up the list command at some point
[23:21] cloudhead: but never seem to get to it
[23:21] isaacs: cloudhead: the code's not that complicated. patches are welcome.
[23:21] cloudhead: ok
[23:23] CIA-77: node: 03Ryan Dahl 07master * r0c3b6ab 10/ src/node.cc : Do not output \n on stderr on output, breaks tests - http://bit.ly/aQCumW
[23:25] [[zz]] has joined the channel
[23:28] cloudhead:
[23:29] cloudhead: l
[23:29] SteveDekorte: is there any way to get a stack trace on control-c?
[23:30] isaacs: SteveDekorte: you can try adding a handler for sigint, and then require("sys").error(new Error().stack
[23:31] isaacs: SteveDekorte: you can try adding a handler for sigint, and then require("sys").error(new Error("break").stack)
[23:31] mattly has joined the channel
[23:31] SteveDekorte: isaacs: ok, thanks
[23:31] isaacs: SteveDekorte: but i think it might not actually tell you what your code was doing when the break happens.
[23:31] isaacs: SteveDekorte: have you checked out ndb?
[23:33] SteveDekorte: ndb?
[23:33] isaacs: SteveDekorte: http://github.com/smtlaissezfaire/ndb
[23:33] SteveDekorte: ah, cool
[23:38] ryah: ndb is the other reason readline is very necessary
[23:38] sztanpet has joined the channel
[23:47] mjr_: ryah: I've got some readline improvements in this branch: http://github.com/mranney/node/tree/readline
[23:48] mjr_: support for ctl-f, ctl-b, ctl-p, ctl-n, and proper ctl-d handling.
[23:48] mjr_: I started on meta-f and meta-b, my favorites, but it too hard to do it right.
[23:49] ryah: mjr_: seems case 16 is missing break;
[23:50] ryah: i'll put it in myself
[23:52] pzich has joined the channel
[23:52] CIA-77: node: 03Matt Ranney 07master * r09af242 10/ (lib/readline.js lib/repl.js): Support more readline navigation keys. - http://bit.ly/90Bp7P
[23:52] ryah: mjr_: thanks
[23:54] sztanpet has joined the channel
[23:55] cloudhead: hmm, any idea why I can't ctrl-c/ctrl-d out of the readline?
[23:55] cloudhead: gotta kill the terminal
[23:56] ryah: cloudhead: hmm..
[23:56] cloudhead: got a listener on 'close' which does process.exit()
[23:56] cloudhead: works fine in the node-repl though..
[23:57] ryah: cloudhead: you're just left on the line?
[23:58] ryah: cloudhead: maybe you need to process.stdout.write('\n');
[23:59] cloudhead: yea, it stays on that one line
[23:59] cloudhead: ah yea, I think it might have to do with \n