[00:00] creationix: sh1mmer: neat, congrats [00:05] phaer has joined the channel [00:08] konobi: sh1mmer: dynamic zones? [00:08] Tim_Smart has joined the channel [00:09] sh1mmer: konobi: define 'dynamic zones' [00:09] sh1mmer: do you database driven zones? [00:09] sh1mmer: +mean [00:09] konobi: sh1mmer: yeah, basically [00:09] sh1mmer: it's backed by Riak [00:09] sh1mmer: but I'm working on various caching layers [00:09] konobi: the bind terminology is dynamically loadable zone [00:10] sh1mmer: right [00:10] konobi: sh1mmer: see bind-dlz [00:10] sh1mmer: dlz is a hack [00:10] konobi: sh1mmer: yup... been using it for about 7 years though =0) [00:11] sh1mmer: heh [00:11] konobi: plus you still get all the DNSSEC, dyn updates, secured slave transfers, etc. [00:11] konobi: all the other shit i really don't wanna have to think about [00:12] sh1mmer: I wouldn't use bind at this point, I would use PowerDNS or probably NSD by preference [00:13] sh1mmer: That said, I'm going to be working my way through all the RFCs that extend 1034/35 [00:13] sh1mmer: So I'm not there yet, but I will be [00:13] sh1mmer: I'm utterly not looking forward to DNSSEC [00:13] konobi: hhhmmm... haven't come across nsd before actually [00:14] sh1mmer: nsd is like hot shit off a shovel [00:14] sh1mmer: it hits 100% CPU at loads 5x higher than bind 9.7 [00:15] deadlyicon has joined the channel [00:15] konobi: sh1mmer: sounds like a fun project... would be interested in hearing more at some point [00:15] sh1mmer: konobi: I'd like to get my node dns server that but it'll take some C too. Node just isn't fast enough [00:15] astrolin has joined the channel [00:16] konobi: yar... been playing about with doing node dhcp stuff [00:16] sh1mmer: I like the idea of having a fast cache written in C with a flexible, extensible JavaScript server behind it [00:16] maushu has joined the channel [00:16] sh1mmer: konobi: I wonder if my model my be applicable to that too [00:17] sh1mmer: ACTION thinks about it [00:18] konobi: sh1mmer: next you'll be doing node/dns/geoip [00:18] mjr_: sh1mmer: what part about your node server is slow? [00:18] sh1mmer: konobi: I was thinking about that. We have a C library at Yahoo that does that, so I was looking at wrapping that. [00:19] mjr_: I'll bet you can make it quite fast for certain workloads. [00:19] sh1mmer: mjr_: I haven't profiled it yet. [00:19] konobi: sh1mmer: there's a node-geoip addon [00:19] sh1mmer: mjr_: but then it's not feature complete either [00:19] mjr_: Like maybe with ryah's new FastBuffer [00:19] sh1mmer: konobi: hm, is that web service based? [00:19] sh1mmer: mjr_: maybe [00:19] ryah: would be interesting to know [00:19] _announcer: Twitter: "WooHoo! YUI3 on NodeJS just got easier to use: "npm install yui3" http://github.com/davglass/nodejs-yui3" -- Dav Glass. http://twitter.com/davglass/status/21706380162 [00:20] ryah: i kind of wonder if it's the buffer creation :) [00:20] ryah: you know, you see one probulem [00:20] ryah: problem [00:20] konobi: sh1mmer: nope [00:20] ryah: and suddenly you see it everywhere [00:20] konobi: it's a datafile that you download... you can then read it into memory or mmap it [00:20] sh1mmer: ryah: that's true of solutions too :P [00:21] ryah: http://github.com/ry/node/blob/51ecba8da9c8c9d974be9c01370c1bdd37031b1f/lib/dgram.js#L65 [00:21] ryah: ^-- slow [00:21] sh1mmer: konobi: I'll take a look [00:21] _announcer: Twitter: "I thought I knew javascript pretty well, then today I read lots of node.js code." -- James Marca. http://twitter.com/jmarca/status/21706481642 [00:22] konobi: sh1mmer: http://github.com/konobi/node-geoip [00:22] ryah: i can make that line 50 times faster [00:22] ryah: and i be it's the bottleneck in your dns server [00:22] konobi: it's someone elses repo, I just added the db connection option stuff [00:22] ryah: s/be/bet/ [00:22] konobi: ryah, what's so slow about it right now? [00:23] ryah: it has to create a little c object [00:23] konobi: ah... objectwrap? [00:23] ryah: yeah [00:25] joshbuddy has joined the channel [00:25] Tim_Smart: Damn ObjectWrap. [00:26] konobi: is ObjectWrap a v8 thing? [00:27] Tim_Smart: Ya. [00:27] Tim_Smart: I'm not sure on its implementation though, maybe ryah can fill you in there. [00:28] mscdex: here's to hoping JimBastard makes an ObjectRap video [00:28] mscdex: :p [00:29] ryah: no, it's a node thing [00:29] Tim_Smart: Ah whoops. [00:29] ryah: http://github.com/ry/node/blob/4fcbc1b64a0c4caa6c7fb9edfc30005a7bc2463c/src/node_object_wrap.h [00:30] konobi: ryah: http://cvs.opensolaris.org/source/search?q=setproctitle&defs=&refs=&path=&hist= [00:30] konobi: seems to be some hacks to get it done [00:31] ryah: ive gone through them already [00:31] ryah: not really good [00:32] konobi: boo-urns [00:33] _announcer: Twitter: "Getting ready to install node.js let's see how this goes." -- Willson. http://twitter.com/modfox/status/21707143638 [00:33] c4milo has joined the channel [00:35] sh1mmer: konobi: this is cool. It was one of my top todos. [00:36] Tim_Smart: ryah: So how do you plan to make the line 50x faster? [00:37] ryah: yes [00:37] ryah: oh, missed "how" [00:37] Tim_Smart: :p [00:37] ryah: with fast buffers [00:37] ryah: http://gist.github.com/538464 [00:38] ryah: the only problem with fast buffers is that you have to use get() and set() instead of [] now [00:38] Tim_Smart: Ah. I think I saw that yesterday yeah. [00:38] Tim_Smart: Unless you want to go back to C land? [00:39] ryah: the point is to avoid that [00:39] Tim_Smart: ok. [00:39] devewm has joined the channel [00:39] junkee[]: What makes it so fast? [00:39] ryah: actually... [00:39] ryah: we should try something [00:40] Tim_Smart: How about Buffer.slice? [00:40] Tim_Smart: Then instanceof Array? [00:40] robotblake has joined the channel [00:40] ryah: slice is easy [00:40] Tim_Smart: But that does a new Buffer ... [00:41] junkee[]: we need a "operator[]"... [00:42] Tim_Smart: That would be nice :p [00:43] Tim_Smart: If Buffer.slice could return a native array, then you could extend it... [00:44] Tim_Smart: Oh wait.. Then you have missed the problem of actually having it referencing memory. [00:44] aurynn has joined the channel [00:45] benburkert has joined the channel [00:46] markwubben has joined the channel [00:47] mtodd has joined the channel [00:47] _announcer: Twitter: "yet another command line option parser for #nodejs http://github.com/fczuardi/node-arguments" -- Fabricio Zuardi. http://twitter.com/fczuardi/status/21707971940 [00:48] junkee[]: ACTION should go sleeping! [00:49] _announcer: Twitter: "One Week to Node.js Knockout! http://mim.io/bed45" -- node knockout. http://twitter.com/node_knockout/status/21708113129 [00:52] _announcer: Twitter: "This code would be a lot cleaner if node.js let you provide additional context to callbacks." -- Tom Dale. http://twitter.com/tomdale/status/21708259176 [00:52] ryah: ok [00:53] ryah: i can make kinda fast buffers [00:53] ryah: with the same api [00:53] ryah: ^_^ [00:53] zemanel has joined the channel [00:54] ryah: http://gist.github.com/541543 [00:54] ryah: see what im getting at [00:58] junkee[]: what does SetIndexedPropertiesToPixelData do? [00:58] ryah: ryan@mac1234:.../projects/node/benchmark% time ../node fast_buffer2_creation.js [00:58] ryah: ../node fast_buffer2_creation.js 2.36s user 0.06s system 99% cpu 2.440 total [00:58] ryah: ryan@mac1234:.../projects/node/benchmark% time ../node buffer_creation.js [00:58] ryah: ../node buffer_creation.js 35.30s user 4.52s system 98% cpu 40.462 total [00:58] _announcer: Twitter: "RT@node_knockout: One Week to Node.js Knockout! http://mim.io/bed45~ prizes are awesome!!" -- davidmoffitt. http://twitter.com/davidmoffitt/status/21708664984 [00:58] ryah: 20x [00:59] konobi: ryah: nice [00:59] softdrink has joined the channel [01:00] jamescarr_: hey, isn't there something out there to let me read a file in one line at a time? [01:00] mscdex: woot! [01:00] mscdex: fast buffers with square bracket notation = \o/ [01:02] mscdex: jamescarr_: not built-in, but it is easily done by hand [01:03] mscdex: jamescarr_: see this for an example: http://gist.github.com/526151 [01:03] jamescarr_: mscdex, yeah, i've done it by hand before [01:03] junkee[]: jamescarr_: require("fs").readFileSync("file") is one lone [01:03] jamescarr_: just curious if there was somethitg i might have missed [01:03] jamescarr_: no no no [01:03] jamescarr_: I mean read a file one line at a time [01:03] junkee[]: forgotten callback [01:03] jamescarr_: not in one line :) [01:04] jamescarr_: never use readFileSync :) [01:04] mtodd has joined the channel [01:04] mscdex: readKitckenSync [01:04] mscdex: er [01:04] mscdex: Kitchen [01:04] mscdex: :p [01:04] Tim_Smart: ryah: Maybe add a option to disable the Buffer.makeFastBuffer? [01:05] Tim_Smart: In case you need super fast buffers. [01:05] _announcer: Twitter: "World News: Web-Development / Released Node.js v0.2.0 http://inews.proffbiz.ru/web-razrabotka-vyshla-node-js-v0-2-0" [ru] -- Алексей. http://twitter.com/alksssss/status/21709058298 [01:05] junkee[]: jamescarr_: you could split the string... but why do u want to do this? [01:06] jamescarr_: oh I don't need to be explained how to, I know how to :) [01:07] jamescarr_: I think I might write some abstraction utilities, just for those who sometimes would like that capability [01:07] ryah: ryan@mac1234:.../projects/node/benchmark% for i in *_creation.js; do echo -n "$i... "; time ../node $i; done [01:07] ryah: buffer_creation.js... ../node $i 38.32s user 3.73s system 99% cpu 42.341 total [01:07] ryah: fast_buffer2_creation.js... ../node $i 2.61s user 0.07s system 98% cpu 2.715 total [01:07] ryah: fast_buffer_creation.js... ../node $i 1.38s user 0.05s system 99% cpu 1.447 total [01:07] ryah: string_creation.js... ../node $i 0.27s user 0.02s system 98% cpu 0.287 total [01:09] Tim_Smart: You would think allocating a slot of memory should be faster than strings. [01:09] _announcer: Twitter: "Come here @sh1mmer present on node.js and DNS on Wednesday, August 25th @ 7PM in SOMA. Very cool stuff! http://meetup.com/u/fq7" -- SF Web Perf. http://twitter.com/sfwebperf/status/21709359716 [01:10] Tim_Smart: But V8 isn't helping there... [01:10] bradleymeck2 has left the channel [01:10] dnolen has joined the channel [01:10] Tim_Smart: Maybe convince them to implement Harmony ByteArray [01:10] ryah: yeah, this is going to make a big difference... [01:11] Tim_Smart: Anyway, yay for FastBuffer. [01:12] _announcer: Twitter: "@sh1mmer will be presenting at the #sfwebperf on Wednesday, August 25th @ 7PM and talking about node.js and DNS. http://meetup.com/u/fq7" -- Aaron Kulick. http://twitter.com/GoFastWeb/status/21709505034 [01:12] aurynn has joined the channel [01:13] pquerna: man, there are like a million juges for knockout [01:13] pquerna: also, i really hope for the Joyent hosting, you can have custom c++ extensions? [01:13] Tim_Smart: pquerna: But look at the number of teams. [01:13] konobi: shame I won't make it down for that [01:13] ryah: pquerna: yeah [01:13] pquerna: cool [01:13] pquerna: okay :) [01:14] pquerna: Ponies for Orphans has lost all its members, need to recruit more :( [01:14] sveimac has joined the channel [01:14] mjr_: Is that your team, pquerna? [01:15] junkee[]: gn8 [01:15] junkee[] has left the channel [01:16] pquerna: yes. [01:16] pquerna: if you vote against it, you are hurting the orphans [01:16] pquerna: all they wanted was a pony [01:16] mjr_: god dammit! [01:16] mjr_: think of the orphans! [01:16] mscdex: what about Double Rainbows for Orphans? [01:17] mscdex: :S [01:17] jamescarr_: hmmm... how come there's no constants for the http status codes in the http module? [01:17] mscdex: jamescarr_: there is [01:17] digitalspaghetti: mscdex: WHAT DOES IT MEAN???? [01:17] mjr_: pquerna: surely you can rustle up some more badass SF types by next week. [01:17] Tim_Smart: ryah: It is a Saturday here, so I can flesh out FastBuffer - unless... [01:18] mscdex: jamescarr_: http://github.com/ry/node/blob/master/lib/http.js#L116-L169 [01:18] jamescarr_: mscdex, where? [01:18] jamescarr_: mscdex, yeah but those are the wrong direction [01:18] konobi: hhhmmm... $400 roundtrip... spose i could go on my own steam [01:18] jamescarr_: I wanted to use something like http.status.NOTFOUND [01:18] raymorgan has joined the channel [01:19] ryah: well [01:19] ryah: we need to check if fastbuffer2 breaks abi [01:19] ryah: oh the pain [01:19] pquerna: did someone already write fastbuffers? [01:19] ryah: pquerna: no [01:19] ryah: pquerna: i figured out a way to get [] [01:20] pquerna: oh? [01:20] Tim_Smart: ryah: Well I can implement the different ways of buffer creation, copy etc. [01:20] pquerna: prototype hack? [01:20] ryah: pquerna: http://gist.github.com/541543 [01:20] ryah: nah, v8 magic [01:21] pquerna: ah, cute [01:21] pquerna: nice [01:21] pquerna: so, if done fully, wouldn't even break the abi [01:21] ryah: here are the stats: [01:21] ryah: buffer_creation.js... ../node $i 327.11s user 14.01s system 99% cpu 5:44.03 total [01:21] ryah: fast_buffer2_creation.js... ../node $i 25.26s user 0.45s system 99% cpu 25.885 total [01:21] ryah: fast_buffer_creation.js... ../node $i 13.98s user 0.24s system 99% cpu 14.349 total [01:22] ryah: string_creation.js... ../node $i 2.16s user 0.01s system 99% cpu 2.188 total [01:22] pquerna: still order better than current :) [01:22] ryah: yeah it's crazy the memory difference [01:22] ryah: buffer_creation.js took all my memory [01:22] ryah: the others were capped at 40mb [01:23] ryah: and btw - look at fucking string_creation.js [01:23] ryah: 2 seconds 9e7 strings.. [01:23] pquerna: different GC strat, or just the weight of c++ objects? [01:23] ryah: donno [01:23] pquerna: well right, v8 ref counts the strings or something right? [01:23] pquerna: so its just incrementing? [01:23] ryah: maybe [01:24] ryah: i think we're going to feel this fix [01:24] ryah: i hope at least [01:25] MarkVolkmann has joined the channel [01:25] dnm: pquerna: So mjr is trying to get me into this Node KO thing, what were you thinking of doing for it? [01:25] MarkVolkmann: What is the difference between console.log and sys.puts? Is one preferred? [01:25] dnm: Note: I am not in SF. [01:25] ryah: MarkVolkmann: console.log [01:25] pquerna: I've not decided on a project yet. I was thinking of rewriting SecureStream if its me solo. [01:25] ryah: no difference [01:26] ryah: http only projects [01:26] Tim_Smart has joined the channel [01:26] pquerna: https project? [01:26] ryah: although you can certainly hack on that :) [01:26] ryah: sure [01:26] pquerna: right, so like [01:27] MarkVolkmann: Is there a way to read a file line by line? [01:27] ryah: MarkVolkmann: no [01:27] pquerna: https://www.mikestoolbox.org/ [01:27] pquerna: being able to do that in node, means you need lots of visibility into things, you don't have right now. [01:28] ryah: oh cool [01:28] dnm: pquerna: Hrm, I see (from mild Google-stalking) you also hack (hacked?) Lua. [01:28] dannycoates: ryah, do you think v8 will get some DTrace love like python/others, or is it even possible? [01:28] MarkVolkmann: Is there a collection of constants defined somewhere for HTTP status codes like SUCCESS = 200? [01:28] pquerna: dnm: yeah. I'm open to other random ideas. I figure there will be 50 teams of random web games. [01:30] ryah: dannycoates: not clear yet how [01:30] ryah: certainly possible [01:30] Tim_Smart: I had a knockout team called "Crockford" [01:30] Tim_Smart: It was destined to win. [01:30] ryah: the JIT behavior kinda is annoying [01:31] Tim_Smart: dannycoates: Have you played with the v8profiler? [01:32] dannycoates: Tim_Smart: a bit, i have a very hacky heap snapshot working with node-inspector [01:32] dannycoates: haven't looked into cpu yet [01:32] Tim_Smart: Oh cool. [01:33] Tim_Smart: http://code.google.com/p/v8/wiki/V8Profiler#Example_Output If you are interested. [01:33] dnm: pquerna: I just discovered Node.js on Sunday night/Monday morning and am still just kind of tinkering and hanging around. I'm not sure I have any good Node.js app ideas, but I have plenty of random ideas generally. [01:33] SubtleGradient has joined the channel [01:34] digitalspaghetti: Zybourne Node [01:35] dnm: Evening Good Goon Sir [01:35] digitalspaghetti: Goon evening to you [01:36] dnm: digitalspaghetti: Are you doing this Node KO thing? [01:36] TommyM has left the channel [01:36] dannycoates: Tim_Smart: thanks, around 9:30 in the demo i did for the knockout blog i show heap snapshot http://www.youtube.com/watch?v=AOnK3NVnxL8 [01:36] digitalspaghetti: never got a team organised in time :( [01:36] c4milo has joined the channel [01:36] dnm: Alas. [01:36] digitalspaghetti: was going to try get a local team, another local hangs in here [01:36] digitalspaghetti: but nothing happened [01:36] dnm: If we had tef it would be non-stop parallel Mandlebrot madness [01:37] digitalspaghetti: well i had suggested we get tef in since he lives here too [01:38] digitalspaghetti: Tef, zomby and me all live in the same city :D [01:38] dnm: He and I on the same team would ruin things because we'd get stuck implementing some insane pushdown automata or new parsing scheme. [01:38] dnm: Ah hah [01:38] ryah: beelzabub: ping [01:38] SubtleGradient has left the channel [01:39] ryah: beelzabub: where's that perl script you were telling me about? [01:39] ryah: oh, found it, nm [01:39] ryah: http://ispras.linux-foundation.org/index.php/ABI_compliance_checker ? [01:40] mscdex: node knockout is http only stuff? [01:40] davidwalsh has joined the channel [01:40] dnm: Sorta. [01:40] mscdex: :S [01:40] digitalspaghetti: anyway, it's 2.40am here, need sleep :D [01:41] dnm: "Entries should be web applications. It's hard for judges (especially the general public) to fairly evaluate entries that require compilation or setup. If you want to submit a non-web app, you're welcome to, but you aren't likely to get judged fairly" [01:41] dnm: digitalspaghetti: Later [01:41] digitalspaghetti: mscdex: i think http is more impressive so yo can show off [01:41] dnm: http://nodeknockout.com/rules [01:41] mscdex: maybe, but it limits things quite a bit [01:41] digitalspaghetti: but doesn't have to be, could be an awesome framework of library [01:41] dnm: Yeah [01:41] saikat has joined the channel [01:41] mscdex: that means no tcp or udp stuff [01:41] dnm: Well. [01:41] mscdex: or anything more neat [01:41] dnm: You could just abuse HTTP like the rest of the world for 48 hours. [01:41] ryah: it should at least have, like an http frontend [01:41] dnm: And then swap out transports. [01:42] ryah: e.g. a DNS server / websocket server [01:42] ryah: which shows all the look ups on a map [01:42] ryah: in rt [01:42] ryah: :P~ [01:42] mscdex: and most importantly... no ncurses! :~( [01:42] mscdex: :p [01:42] ryah: mscdex: sorry [01:43] aheckmann has joined the channel [01:43] mscdex: it's alright, i don't have any good ideas for the knockout anyway [01:43] mscdex: all the stuff i work on is mostly non-http stuff : [01:43] mscdex: :\ [01:44] ryah: all my ideas are: take random protocol/server mash http onto it [01:44] mscdex: unless i write something that uses grappler [01:44] ryah: how about "telephone" with as a facebook game [01:45] ryah: you get put in a circle of people [01:45] ryah: someone says something to you [01:45] ryah: you have to say it to the next person [01:46] joeshaw: should present it as an image so you can't just cut and paste [01:46] mu-hannibal: regarding DNS with an http wrapper slapped on top - you might enjoy this: http://labs.mudynamics.com/2010/04/29/couchdb-dns-and-scaling-the-cloud/ [01:46] joeshaw: i bet that'd work surprisingly well on facebook [01:47] ryah: joeshaw: oh, i thought with video and audio [01:48] mscdex: mu-hannibal: did you get node-sqlite working? [01:48] danielzilla has joined the channel [01:48] ryah: it should show the circle [01:48] ryah: and the message "moving" around [01:48] dnm: I think I'd want some sort of app whose interface was a big button that the user presses, and then it displays a live log of cool stuff it's doing. [01:48] joeshaw: ah, neat [01:48] dnm: Sadly, I don't know what the cool stuff is yet. [01:48] mu-hannibal: mscdex: almost - I'm not having much luck today... Here's what I get when I use it from node: [01:48] mu-hannibal: lib/sqlite/sqlite3_bindings.node: undefined symbol: sqlite3_open_v2 [01:49] mscdex: mu-hannibal: that's with the latest version of sqlite (3.7.0.1) ? [01:49] mu-hannibal: yep [01:49] mu-hannibal: from source [01:49] mscdex: hrm [01:49] mscdex: tried make distclean too? [01:49] mu-hannibal: let me try again [01:50] mscdex: the only difference was that i was compiling on centos 5.5 [01:50] mu-hannibal: yeah - it sucks that I have to get this working on CentOS 4... [01:51] visnup has joined the channel [01:52] mu-hannibal: mscdex: no luck... maybe I should go back to nStore... [01:52] mscdex: mu-hannibal: are you also using the latest source from the node-sqlite repo? [01:52] mu-hannibal: fresh from git [01:53] mscdex: ok, just checking [01:53] mu-hannibal: git://github.com/orlandov/node-sqlite.git [01:53] mu-hannibal: thanks for helping! [01:54] mscdex: mu-hannibal: if you want, i can upload the binding binary [01:54] mscdex: from my centos 5.5 vm [01:56] mu-hannibal: hmm - you think that is worth a try? [01:58] mu-hannibal: it's a shared library so it probably won't work on centos 4 - don't worry about it. [01:59] mscdex: mu-hannibal: what version of node are you running? [01:59] mscdex: out of curiousity [01:59] mu-hannibal: mscdex: v0.1.103 [01:59] mscdex: ok [02:00] mtodd has joined the channel [02:01] dipser_ has joined the channel [02:14] _announcer: Twitter: "That (morning) to see node.js 0.2.0 release, which was agreed to discuss the issue group is: API interface will maintain the 0.2.x stable? http://plurk.com/p/729m1t" [zh-TW] -- Hsu Ping Feng. http://twitter.com/fillano/status/21713553957 [02:17] necrodearia has joined the channel [02:21] _announcer: Twitter: "@jsalsman http://nodejs.org/ http://commonjs.org/ brendan-bob sez checkitout" -- BrendanEich. http://twitter.com/BrendanEich/status/21714002463 [02:21] Aria has joined the channel [02:26] ryah: strange [02:26] _TS has joined the channel [02:27] _announcer: Twitter: "I showed the Node.js to a professor of distributed systems (Java) and got the answer: "I think that's dangerous." Damn, why I insist?" [pt] -- Nerdson. http://twitter.com/nerdson/status/21714426048 [02:29] _announcer: Twitter: "Version 0.1.3 of Geddy, updated to work with Node 0.2.x: http://geddyjs.org/dist/geddy-v0.1.3.tar.gz #nodejs #node.js" -- Matthew Eernisse. http://twitter.com/mde/status/21714561894 [02:30] cardona507 has joined the channel [02:30] ryah: mde: good [02:31] JosephMoniz has joined the channel [02:32] JosephMoniz: is there any good documentation on actually using 3rd party node modules [02:32] JosephMoniz: the directory structure of most node modules seems restrictive [02:32] JosephMoniz: in terms of easilly importing them that is [02:34] _announcer: Twitter: "@ Nerdson We never read about node.js, hehe! Very cool! 'll Cocordar with Professor, is dangerous, only for those who do not know!" [pt] -- Fairhonanth. http://twitter.com/fairhonanth/status/21714852474 [02:35] mscdex: ryah: what's strange? [02:35] jackish has joined the channel [02:37] ryah: strange tweet from bendan eich [02:37] ryah: JosephMoniz: i agree - people should add index.js files... [02:38] ryah: it's the fucking ruby mentality that has corrupted the programmer's brains.. [02:38] ryah: everyone wants stuff in lib/ directories [02:38] Tim_Smart: I prefer lib/name_of_lib/index.js [02:38] ryah: (they also want files that are only 100 lines long, because they scroll with the mouse) [02:39] ryah: Tim_Smart: but if you had an index.js in the base of your project [02:39] ryah: people could require it without diving into your structure [02:40] Tim_Smart: ryah: Yeah I get what you mean, but I like keeping README's and other random bits and pieces out of the action. [02:41] Tim_Smart: Oh, I have done a little fleshing out: http://gist.github.com/541565 (for FastBuffer) [02:41] ryah: nice [02:42] ryah: slice? [02:42] Tim_Smart: ryah: To prevent overflow into the next allocation [02:42] blogometer has joined the channel [02:43] Tim_Smart: Oh wait. I'm dumb [02:43] Tim_Smart: Maybe not. [02:43] Tim_Smart: I dunno. [02:43] mscdex: i just followed the convention that everyone else was using for node modules/addons [02:43] mscdex: :S [02:43] ryah: no, i mean you should implement fastbffer.slice() [02:43] Tim_Smart: Oh right, yeah. I'm getting there :) [02:44] mscdex: i guess one could create a symlink to the lib folder [02:45] mscdex: er the main file in the lib folder [02:45] mscdex: called index.js [02:46] konobi: lib directories have been around for quite a while though [02:47] konobi: perl modules for example will use lib, along with C files and 'compile' them into a blib directory (architecture specific binary lib) [02:48] konobi: then again, perl has namespacing... so it makes more sense [02:50] mattly has joined the channel [02:51] dannycoates has joined the channel [02:52] ryah: :) [02:54] Tim_Smart: ryah: OK, how is this for slice? http://gist.github.com/541565 [02:56] ryah: yeah maybe [02:56] ryah: i think you should have a special constructor for it [02:56] megan has joined the channel [02:56] Tim_Smart: OK. FastBufferSlice? [02:56] ryah: instead of Object.create [02:57] Tim_Smart: Or FastBuffer.createSlice? [02:57] megan: omg! I love node, but I have no idea how to use continuous integration with SVN so I can commit and have the code running right away on the server [02:57] ryah: megan: http://s3.amazonaws.com/four.livejournal/20100819/doDtD.jpg [02:58] ryah: http://twitter.com/tnm8/status/21633078542 [02:58] megan: LoL ryah, /b/ will rot your brain [02:58] visnup: Tim_Smart: did you ever get registered for knockout? [02:58] Tim_Smart: nope. [02:59] Tim_Smart: I have an account, that is all. [02:59] visnup: Tim_Smart: if truthvalue invites you to his team, it should just add you [02:59] megan: Ryah, I guess I gots to go to #svn then huh? :P [02:59] Tim_Smart: visnup: OK. His link didn't work for me then. [02:59] ryah: megan: yeah, i dont know.. [02:59] megan: :( [03:00] visnup: Tim_Smart: ah, right. I just changed everyone's urls to slugs [03:00] konobi: megan: same as any other language or runtime really [03:00] visnup: Tim_Smart: and was hoping no one was using the crazy guid links [03:00] mr_daniel has joined the channel [03:00] stellar has joined the channel [03:00] konobi: (CI that is) [03:00] megan: knobi, I don't know where to start ;P [03:00] megan: I have svn running though :) and I can commit stuff to it [03:00] visnup: Tim_Smart: http://nodeknockout.com/teams/boston-slap [03:01] megan: so I'm not totaly brain dead [03:01] raymorgan has joined the channel [03:01] megan: through apache even [03:01] blogometer: node-mysql cannot do expressions in select. [03:01] konobi: megan: why svn? why not git? [03:01] blogometer: aliased expresiosns. [03:01] ncursestest has joined the channel [03:02] ryah: blogometer: felix's? [03:02] blogometer: megan: Start by making a simple web app. [03:02] icey has joined the channel [03:02] blogometer: ryah: Yup. [03:02] ryah: blogometer: ohno [03:02] blogometer: Going to make a 15 minute attempt to fix. [03:02] ryah: blogometer: does he know? [03:02] blogometer: Dunno. [03:02] EyePulp has joined the channel [03:02] icey: what's the currently recommended lib for xmpp? node-xmpp? xmppjs? [03:02] megan: git is too advanced for me [03:02] blogometer: megan: http://delicious.com/alan/git [03:02] brickysam26 has joined the channel [03:02] megan: nonono I like svn through apache [03:02] ryah: subversion is too advanced for me [03:03] megan: me too ryah [03:03] ryah: i can't use that anymore [03:03] megan: let's start a fire [03:03] blogometer: megan: http://git.or.cz/course/svn.html [03:03] blogometer: megan: http://www.kernel.org/pub/software/scm/git/docs/everyday.html [03:03] megan: Hi Blogo [03:03] isaacs has joined the channel [03:04] brickysam26: having problem building 0.2.0 on osx, "../src/node.cc:1564: error: ‘darwin’ was not declared in this scope" [03:04] brickysam26: anyone have any suggestions? [03:04] megan: you can't get me on your git band wagon. No sir [03:04] ryah: brickysam26: hm [03:04] ryah: brickysam26: make distclean [03:05] blogometer: This isn't an I'm a Mac and I'm a PC kind of thing. [03:05] konobi: megan... http://www.slideshare.net/nachbaur/automating-perl-deployments-with-hudson [03:05] konobi: it's perl-ish, but you can apply that to anything [03:06] megan: okee [03:06] megan: hudson looks much more sexy than nasty cc [03:06] megan: plus I live pretty close to the hudson, so it only makes sense :) [03:07] brickysam26: ryah: thanks, working now [03:08] megan: konobi, hudson does work with svn right?????? o_O [03:08] Tim_Smart: ryah: What you had more in mind? http://gist.github.com/541565 [03:08] konobi: megan: yup [03:08] megan: okay... it had me worried [03:08] konobi: right... food time [03:08] megan: what you got? [03:09] ryah: Tim_Smart: hm - no [03:09] ryah: can't you just do "new FastBuffer" ? [03:09] Tim_Smart: ryah: No, slice is a reference. [03:10] ryah: it still returns a new fastbuffer [03:11] ryah: here it is in c++ http://github.com/ry/node/blob/master/src/node_buffer.cc#L185 [03:11] Tim_Smart: ryah: But you don't want to allocate any more memory? [03:11] ryah: well you can allocate a new js object [03:11] ryah: but not a real "Buffer" [03:12] blogometer: Yeah. Felix has a broken parser. [03:12] ryah: what's broken? [03:12] sudoer has joined the channel [03:12] blogometer: I can see from the packets he's building, that the data is there, the field name, lumped into another field. [03:13] blogometer: Ya know? I mean. The "db" field of his "field" description object has a string that has a lot of unicode escapes and the field name is in there to. [03:13] blogometer: s/to\.$/too./ [03:14] megan: what does s/ do? [03:14] ryah: blogometer: you should tell him [03:14] blogometer: It is a cultural reference. [03:14] blogometer: 12 more minutes. [03:14] megan: oh, an inside joke for javascript regex [03:14] blogometer: Maybe I'll fix it and be his hero. [03:14] danielzilla: megan: It refers to a search & replace regex. [03:15] ryah: heros are good [03:15] blogometer: s/javascript/Perl/ [03:15] ryah: heh [03:15] megan: ohhh I never use sed [03:15] danielzilla: s/Perl/PCRE/gi [03:15] ryah: s/PCRE/ed/ [03:16] blogometer: I stand corrected. [03:16] danielzilla: ACTION sits corrected. [03:17] blogometer: Thinking aloud. Maybe some of the fields are missing if it is a calculated field? [03:17] mu-hannibal has joined the channel [03:20] Tim_Smart: ryah: Better? http://gist.github.com/541565 [03:22] megan: that was pretty neat daniel [03:31] alcuadrado has joined the channel [03:33] jamescarr_: I'm worried about node knockout ;) [03:33] jamescarr_: I'm not completely sure my team members have dabbled with node.js much yet :S [03:35] overra has joined the channel [03:35] megan: what is node knock out? [03:38] danielzilla: megan: Google would tell you http://nodeknockout.com/. :) [03:38] blogometer: Parsing the packet as it comes in. [03:38] blogometer: Hard core. [03:38] blogometer: Why not buffer the packet and then read it? [03:39] terinjokes: these seems interesting [03:40] terinjokes: although it still thinks I haven't said anything [03:41] megan: if I were on your team, we'd totally win [03:42] terinjokes: haha... now I know why I don't show up on the map... i can't get my hostname [03:42] ajpiano has joined the channel [03:42] terinjokes: (i'm looking at wargamez) [03:43] terinjokes: haha, I wouldn't doubt if Tim had something awesome up his sleve [03:43] _announcer: Twitter: "Looking forward to Node JS Knockout next weekend http://nodeknockout.com/" -- Mike. http://twitter.com/mikezter/status/21719459029 [03:44] Tim_Smart: jamescarr_: Missile away. [03:44] Tim_Smart: Hmm, didn't work. [03:45] terinjokes: Tim_Smart: exactly... i didn't make the connection [03:46] blogometer: It is a lot of fun to trace through code written by a righteous dude. [03:46] terinjokes: !play Global Thermonuclear War [03:46] terinjokes: blogometer: it's how I know anything [03:47] nerdEd has joined the channel [03:48] _announcer: Twitter: "Don't know much about node.js n app development, but can't sit idle on seeing the list of prizes ;) http://nodeknockout.com/prizes" -- Vamshi Krishna Reddy. http://twitter.com/vamshi4001/status/21719728302 [03:50] ryah: Tim_Smart: yes [03:51] softdrink has joined the channel [03:51] Tim_Smart: Ah cool. theoretically if I replace Buffer with it, it should work. [03:51] Tim_Smart: I guess that is the next step. [03:52] _announcer: Twitter: "haha awesome http://www.youtube.com/watch?v=xvDzLODyDBo node.js twitter space invaders thing" -- Thomas Swift. http://twitter.com/tmy/status/21720014825 [03:54] blogometer: We could be heros. Just for one day. [03:55] keeto_ has joined the channel [03:55] terinjokes: blogometer: you can't [03:55] terinjokes: blogometer: programmers can't be famous [03:55] SubStack: fact [03:55] blogometer: Bill Gates. [03:55] terinjokes: blogometer: not a programmer [03:56] SubStack: not a real programmer anyways [03:56] blogometer: He's a real programmer fur sure. [03:56] terinjokes: SubStack: he did manipulate the stack... of money [03:56] SubStack: also not a true scotsman [03:57] blogometer: He wrote Microsoft BASIC. [03:57] SubStack: not by himself [03:58] blogometer: SubStack: Okay, so you just coneeded my point. Thank you. [03:58] terinjokes: did he write any of it? [03:58] blogometer: I'm a winner! [03:58] terinjokes: i though he paid a classmate in college [03:58] blogometer: ACTION Reaches for the IRC trophy. [03:59] terinjokes: ACTION locks the vauly [03:59] terinjokes: ACTION locks the vault* [03:59] blogometer: I've been robbed! [03:59] konobi: BASIC was designed by John George Kemeny and Thomas Eugene Kurtz apparently [04:00] terinjokes: konobi: microsoft basic? [04:00] blogometer: Gates and some others did an implementation for the Altair back in the data. [04:00] blogometer: s/data/day/. [04:00] blogometer: That was the beginning of Microsoft. [04:00] konobi: MSDOS was actually purchased from someone else, iirc [04:01] blogometer: Yes. It was shareware floating around on floppies. [04:01] blogometer: ACTION Tries hard not to look at Wikipedia. [04:01] blogometer: Anyway... [04:01] blogometer: We could be heros. [04:01] SubStack: ibm should've written os/2 sooner [04:01] terinjokes: blogometer: http://sheddingbikes.com/posts/1275989245.html [04:02] SubStack: it might've actually taken off [04:02] blogometer: Oh, it's a blog post. Well, then who's to argue? [04:02] terinjokes: i should have written *any* of my stuff sooner... then it would have taken off [04:02] terinjokes: blogometer: read it [04:03] blogometer: I *am*. [04:04] blogometer: An angry blog post about not being appricated. [04:04] blogometer: Hmm... Are these computer generated? [04:05] cferris has joined the channel [04:06] terinjokes: SubStack: hope is lost [04:06] SubStack: for why? [04:06] blogometer: I like this post better: [04:06] blogometer: http://sheddingbikes.com/posts/1281413656.html [04:06] jacobolus has joined the channel [04:06] blogometer: That is heroic. [04:07] SubStack: zed shaw should write about programming more if he wants people to think of him more as a programmer and less of a troll [04:08] Aria: Evidence that people think he's a troll? [04:08] blogometer: I don't think he's a troll. [04:08] ryah: ACTION reminds people that zed sits in the room... [04:08] Aria: The man is a statistics nut. [04:08] blogometer: I just think that post is a bit *much*. [04:09] terinjokes: ryah: in that case, tell him hi [04:09] SubStack: ah I know what it is, not enough in those posts [04:09] ryah: not my room, the channel ;P [04:09] terinjokes: SubStack: it's like posting code in IRC, it interrupts... he links to code though [04:10] raymorgan_ has joined the channel [04:10] terinjokes: ryah: oh, then nevermind :P [04:10] Aria: ACTION smirks. [04:10] blogometer: Anyway, I didn't say famous, I said heros. [04:10] Aria: I've had some good conversations. And learned a hell of a lot about not making code that falls over. [04:10] SubStack: also web frameworks are boring [04:11] ryah: ACTION attempts to keep it civilized here. wouldn't want to become cabose [04:11] Aria: ++ [04:11] blogometer: What's cabose? [04:11] danielzilla: ACTION blanches at the mere mention. [04:11] blogometer: I enjoy the civilization of Node.js. [04:11] danielzilla: blogometer: Rails backchannel. [04:12] blogometer: I like that the core developers and noobs are in the same room. [04:12] terinjokes: danielzilla: haha, good one [04:12] terinjokes: <-- noob [04:12] danielzilla: ACTION didn't know he made a joke. [04:12] blogometer: There's a key to get into #caboose. [04:12] blogometer: That must be the place. [04:12] blogometer: Anyhoo... [04:13] terinjokes: i think it's netflix time [04:13] terinjokes: i feel like being entirely unproductive tonight [04:16] davidwalsh has joined the channel [04:16] mu-hannibal has joined the channel [04:19] mattly has joined the channel [04:20] Tim_Smart has joined the channel [04:21] Tim_Smart: ryah: Um: http://github.com/ry/node/blob/master/src/node_file.cc#L686-691 [04:22] Aria: Yargh. I'm bit by buffers not being strings again. I am so tempted to drag most of the C string library into Node on top of buffers. [04:22] Tim_Smart: Will need to check for a FastBuffer, get the parent, unwrap it, then only send off the right segment. [04:23] Tim_Smart: Oh wait, just need to over-ride the data() method. [04:27] Tim_Smart: Hmm.. maybe not. [04:27] zemanel has joined the channel [04:29] EyePulp has joined the channel [04:29] singalong has joined the channel [04:29] Tim_Smart: Will just have to patch every place Buffer is used. [04:30] singalong: how can i detect collision between elements in javascript? (it's a node game) [04:31] Aria: Which elements? [04:31] singalong: Aria: its actually a game. so would like to detect collision between elements like images and divs [04:32] Aria: 'divs' ? [04:32] singalong: Aria:
[04:32] Aria: That's HTML, not Javascript. Not Node, anyway. [04:33] singalong: Aria: well just thought people here could help with some javascript. [04:33] Aria: Yeah, but it's not actually a javascript question terribly much. The Javascript part is 'do the math'. [04:33] Aria: Get the bounding box, check for overlap. [04:34] singalong: Aria: should that have to be in a loop? or are there events for that? [04:35] Aria: Events for doing math? [04:35] Aria: I think you're probably asking for rather browser-centric questions. [04:35] Aria: DOM stuff. [04:35] singalong: Aria: ya suppose I have to detect collision, would I have to detect them in a for loop etc? [04:35] Aria: Well, you have to test against every possible object... [04:36] Aria: Where hopefully 'possible' is a carefully groomed list so you don't do much work for each check. [04:37] singalong: Aria: My idea was to make a 2d game (top view). but sounds like it's going t be tough if it's top-view. detecting every object on the screen, [04:38] blogometer: ryah: Found the bug. [04:38] Aria: Shouldn't be too bad ... people do this all the time, singalong. [04:39] Aria: I mean, the DOM is an ugly API and painful, but not too terrible, really. [04:40] singalong: Aria: I only wish there was something like onCollide() which returns the id of the element it collided with :) [04:40] Aria: Hehe. So write that. [04:40] Aria: Though the real trick is pruning the list of possible objects. [04:40] blogometer: singalong: Yeah. Add it to the prototype. [04:40] singalong: Aria: ya was just thinking about it [04:40] ivong has joined the channel [04:41] blogometer: singalong: R-tree? [04:41] singalong: blogometer: well i dont understand that (just googled. will have to read the wikipedia page to know what it is) [04:41] dnyy: /w/win12 [04:41] dnyy: fucking wireless, ignore that [04:42] blogometer: singalong: It is a solved problem. [04:43] Validatorian: is there any way in node to add and remove content to a single line in console... for example a loading indicator, counting up from 1 to 100%, while taking up the same space... [04:43] singalong: seems like there's another nice way [04:43] blogometer: I'm tired. [04:44] singalong: Aria, blogometer: elementFromPoint() https://developer.mozilla.org/en/DOM/document.elementFromPoint [04:44] Aria: Nice if you have a direct hit. [04:44] davidwalsh has joined the channel [04:44] blogometer: But... [04:44] Aria: But it's a single point and not a bounding box. [04:44] Aria: If your objects are all such that they'd always hit a corner, you could just test the corners of your objects. [04:45] Aria: But if not. .. [04:45] blogometer: Try just seeing if you have an overlap on the x-axis. [04:45] singalong: it reduces the possibilities [04:45] JosephMoniz: whats all this fast buffer hype? [04:45] Yuffster has joined the channel [04:46] nefD has joined the channel [04:46] Aria: JosephMoniz: A buffer pool to reduce the number of small allocations. [04:46] blogometer: Create an array (list) of left bounds and right boutnds in an array. [04:46] JosephMoniz: so like a mini-malloc in JS? [04:46] blogometer: Easy to move around and test. [04:46] singalong: and woot! http://code.google.com/p/doctype/wiki/DocumentElementFromPointMethod [04:46] singalong: supported browser list [04:47] singalong: supported in IE9 too according to quirksmode [04:47] Aria: JosephMoniz: No, like a pool of buffers that are allocated, returned to the pool when not used anymore. Since it turns out that allocating small buffers is a part of the performance hit. [04:47] blogometer: http://www.codeproject.com/KB/GDI-plus/PolygonCollision.aspx [04:48] JosephMoniz: ooooo, hey thats pretty creative [04:49] blogometer: singalong: Meh. [04:49] blogometer: You're going to need to create your own structure of bounding boxes. [04:49] singalong: :) well my app just needs to detect collision between images. [04:50] blogometer: But, good luck with it. Does SVG have the right function I wonder? [04:50] singalong: that way i can keep it simple too. [04:50] singalong: blogometer: I'll have to skip canvas and svg and use a simple div with images or whatever simple stuff available [04:50] jamescarr_: so many good books spend eternity in Manning's MEAP :( [04:51] blogometer: So simple it doesn't work. [04:51] jamescarr_: I was for sure Secrets of a Javascript Ninja would be out by now :( [04:51] blogometer: But, good luck. If it doesn't work, then model it yourself. [04:55] Tim_Smart: ryah: I have to go through any api method that uses buffers, and insert checks for buffer.parent and alter the offsets etc as needed. [04:56] blogometer: clear [04:59] joshbuddy has joined the channel [05:02] blogometer: ryah: I'm a winner! [05:03] blogometer: Found the bug. Created a fix. [05:03] MikhX_ has joined the channel [05:03] blogometer: Will let Felix know. [05:03] _announcer: Twitter: "How expensive are function calls in JS running under Node? I hope not very, because Fab.js looks like it must be SLOW." -- Ryan W Tenney. http://twitter.com/ryantenney/status/21724450461 [05:05] micheil: blogometer: bug? [05:05] blogometer: micheil: Bug in node-mysql. [05:05] micheil: k [05:06] blogometer: Forking, patching now. [05:11] jimmybaker has joined the channel [05:17] kreyman has joined the channel [05:21] mattly has joined the channel [05:24] ryah: blogometer: good ! [05:25] blogometer: Node.js is soooo much more fun than Java. [05:26] singalong: now I know why Fab.js isnt popular. [05:26] singalong: Fab.js syntax is similar to lisp :P [05:29] saikat: has anyone tried using Connect with Socket.io? [05:29] saikat: is there a way to maket he connect logger work behind socket.io? i talked to creationix earlier today and he said "sort of" but i forgot to ask more about it [05:36] mjr_ has joined the channel [05:38] schwa23 has joined the channel [05:39] schwa23: Can anyone tell me why http requests made through node wouldn't show up in charles proxy? [05:39] bdha has joined the channel [05:40] jetienne has joined the channel [05:41] saikat: does connect still come with an executable that can daemonize my process? [05:43] benburkert has joined the channel [05:44] marek_z: christ, *anything* is more fun than java [05:44] schwa23: I'm trying to see what's happening to a request I'm making (using restler at the moment) but seems like node doesn't use the MacOS proxy settings… [05:44] schwa23: anyway to force it to go through charlesproxy? [05:45] satori_ has joined the channel [05:47] siculars has joined the channel [05:47] mjr_: schwa23: node does not use the proxy settings [05:47] mjr_: node is very low level [05:48] holydevil has joined the channel [05:48] mjr_: However, you can force things through your proxy in node by using the host/port of the proxy [05:49] schwa23: mjr_: that kind of makes sense -- so set up some kind of reverse proxy through charles so my node requests go through localhost? [05:50] mjr_: schwa23: basically, yes. That is what Safari does when you change the proxy settings. Instead of doing a DNS lookup and connecting to the resulting IP, it sends all traffic to your proxy server. [05:51] mjr_: Another thing you could do is use my http_trace program, which just pulls bits off the wire and decodes them. [05:51] schwa23: mjr_ that sounds like what i need [05:52] schwa23: where do I get that? [05:52] mjr_: npm install pcap [05:52] mjr_: Then you'll get a program called http_trace [05:52] mjr_: http://github.com/mranney/node_pcap [05:53] schwa23: mjr_: sweet, I'll give it a shot! Thanks! [05:53] mjr_: charles proxy looks fantastic though. I hope http_trace is that good some day. [05:54] Egbert9e9 has joined the channel [06:02] amuck has joined the channel [06:02] jakehow has joined the channel [06:03] schwa23: yeah charles is pretty awesome. More power than I need for this simple debugging task, but overall a great tool. [06:04] schwa23: mjr_: http_trace working like a champ. thanks for the tip & the tool! [06:04] mjr_: nice, glad to hear it [06:04] mjr_: I've got big plans for it with various options and shit, which I hope to work on this weekend. [06:11] _announcer: Twitter: "Established on a machine node.js I did not think it would be so easy:) But when doing. / Configure I found that some libraries do not" [ru] -- Pavel Pavlenko. http://twitter.com/pavlik/status/21728191082 [06:11] stellar has joined the channel [06:19] ryah: how can we get node's libraries up to speed... [06:19] ryah: 3rd party modules that is... [06:19] mjr_: what bits are not up to speed? [06:19] mjr_: Like, not up to node knockout speed? [06:19] satori_: Speed? performance? reliability? conformance? [06:19] ryah: no - usablity [06:20] ryah: general quality [06:20] satori_: k [06:20] mjr_: Yeah, we need more quality for sure. [06:20] ryah: how can we avoid the ruby gem's trash dump? [06:20] satori_: cream will always rise to the the top [06:20] ryah: there's something to this app store idea. [06:20] blogometer: More collaboration. [06:20] ryah: someone who looks over your work [06:20] blogometer: Also, a web site that has a place to vote up and down. [06:20] blogometer: Yes. [06:20] ryah: approves or rejects [06:20] blogometer: Peer review. [06:20] blogometer: No. [06:21] blogometer: Because, then it becomes Apache's trash dump. [06:21] ryah: :) [06:21] Tim_Smart: ryah: The package managers need well defined rules. [06:21] blogometer: Bike sheds galore. [06:21] ryah: agreed. we want something between apache and ruby gems [06:22] ryah: there needs to be structure to the module system. [06:22] ryah: automated tests or something.. [06:22] Tim_Smart: ryah: Btw, getting FastBuffers working with the old api has more to it than expected... [06:22] ryah: Tim_Smart: well, there's the whole c++ side of things [06:22] ryah: you need to reimplment the c++ side to call js [06:22] mjr_: ryah: what are you noticing right now that has you bring this up? [06:23] blogometer: The Apache process leads to a communal refactoring. [06:23] ryah: that last tweet: http://twitter.com/pavlik/status/21728191082 [06:23] blogometer: Which is really, really awful to watch. [06:23] mjr_: I don't speak unicode [06:23] satori_: ...or russian [06:23] blogometer: GitHub makes for better code. [06:24] mjr_: I see the translation above. [06:24] ryah: http://translate.googleusercontent.com/translate_c?hl=en&ie=UTF-8&sl=ru&tl=en&u=http://twitter.com/pavlik/status/21728191082&rurl=translate.google.com&twu=1&usg=ALkJrhikYGOf0zkkTNchXOQP8HulpMZNPw [06:24] ryah: well, whatever [06:24] ryah: i mean who knows what it says :) [06:24] mjr_: some libraries do not have [06:24] satori_: heh [06:24] blogometer: Looks like he can't build. [06:24] blogometer: Maybe he pulled it onto Windows. [06:24] mjr_: some libraries do not have hidden pornography [06:25] mjr_: Although, to be fair, some do have hidden pornography. [06:25] blogometer: Do you want to discourage people from creating libraries? [06:25] ryah: a wiki page is not enough [06:25] bdha: blogometer: Lots of libraries on the CPAN. Lots of awful ones. [06:25] mjr_: ryah: I think we just need way, way better docs. [06:25] bdha: You have to Know which to use. [06:25] satori_: yeah. A wiki page is alittle too amatuer hour on it's own [06:25] ryah: yeah [06:25] ryah: maybe creating a system for doing docs is the way [06:26] bdha: cpantesters/cpanratings helps. [06:26] ryah: i mean, cpan is pretty good. [06:26] mjr_: We probably have to build up some official documentation that isn't restricted to fitting into a man page. [06:26] bdha: I love CPAN, but it's a stressful relationship. ;) [06:26] ryah: yeah, the docs have to break out of the man page [06:27] blogometer: Maybe docs, but Node.js is open source. [06:27] blogometer: Don't go the Javadoc route, where people think they are not *supposed* to read the source code. [06:27] mjr_: If you look at the python or php docs, the shit is exhaustive. [06:27] ryah: i sure do love man pages though... [06:27] mjr_: Completely covering all possible angles. [06:27] blogometer: I like man pages too. [06:27] blogometer: I like the UNIX nature of Node.js [06:27] ryah: i never use it for node, admittedly [06:28] ryah: i always go to the website to look up api [06:28] satori_: non trivial, commented, and up to date examples go a long, long way. [06:28] mjr_: I love the idea of man pages, but I use the web pages too. [06:28] blogometer: http://expressjs.com/ [06:28] mjr_: Like, I used the man pages just to make sure that the ronn conversion was working. [06:28] blogometer: The Ruby world has a lot of this stuff, pretty landing pages at the GitHub page. [06:28] mjr_: And never again. [06:28] zomgbie has joined the channel [06:28] blogometer: That is the sort of thing that builds confidence for me. [06:29] ryah: i think the man pages can be split up [06:29] mjr_: If man pages are getting int he way of good docs, and I'm not actually sure they are, but if they are, then we should probably just lose the ronn/man stuff. [06:29] ryah: man node-http [06:29] ryah: man node-net [06:29] ryah: etc [06:29] blogometer: Actually, before I abandoned Java, I was working on a build system for Java that worked closely with GitHub. [06:29] blogometer: To try to get Javans to see the value of Github. [06:30] ryah: the problem is - people make a little library - they put it on a website [06:30] ryah: then it's abandoned [06:30] blogometer: Encourage people to use GitHub. [06:30] ryah: and everyone for the next two years has to sort through that [06:30] blogometer: So that it can be forked and perpetulated. [06:30] bdha: ryah: You need an Andy Lester. :) [06:30] ryah: when they want a mysql module - they have to go find out which one to use [06:31] blogometer: Also, with the new Wiki feature, maybe there's a way to build man pages from Wiki pages and vice versa. [06:31] ryah: one simple solution is to add an appendex to the docs [06:31] ryah: simple tell people which modules to use [06:31] jetienne: http://www.symfony-project.org/plugins/ <- ryah here is how symfony (php framework handle it) [06:31] streampunk has joined the channel [06:32] ryah: bdha: i dont know hwo that is [06:32] blogometer: Gah! [06:32] bdha: ryah: petdance. Leader of the CPAN testing movement. [06:32] jetienne: ryah: they host, provide a well defined set of info to put in there. and you got user votes. [06:32] bdha: jetienne: That's.. not so great. [06:32] blogometer: That's messy. [06:32] bdha: It's a lot of noise. [06:32] blogometer: Hey, as the resident newbie and fanboi... [06:32] bdha: Appendex isn't a bad idea, but then why not just include them in the dist? [06:32] mjr_: ryah: perhaps a node distribution can address this library quality issue. [06:32] blogometer: ...I'd have to say, the process of asking the IRC channel for recommendations ... [06:32] jetienne: ryah: user vote allows to get user usage. so a way to estimate quility [06:32] blogometer: ... has been quick and rewarding. [06:33] mjr_: blogometer: yeah ,but it doesn't sacle [06:33] blogometer: I don't like the idea of a node distribution. [06:33] blogometer: Now done is a big heap of shit to install just like Java. [06:33] blogometer: s/done/node/ [06:34] jetienne: node distro will happen, but it is too early [06:34] ryah: well - maybe it's not urgent - but in the coming months the issue of how to organize these modules is going to be a concern [06:34] ryah: now that it's clear this project is marching forward :) [06:34] satori_: you sure? :P [06:34] blogometer: ryah: Why not make GitHub the default repository for Node.js. [06:34] blogometer: ? [06:34] ryah: blogometer: eh. [06:35] blogometer: Well, then you can develop conventions, if you wed 3rd party development to GitHub. [06:35] ryah: satori_: well, at least for the next couple months - yes [06:35] Validatorian: is there a consensus on the fastest flow/parallel script? Step, Parallel, async, flow, and probably others I don't know of [06:35] blogometer: You can use the APIs to gather statistics and report on relative health. [06:35] blogometer: Health of projects. [06:36] blogometer: Which are active, trending, commonly downloaded. [06:36] ryah: what if i just choose modules and put them in the docs [06:36] ryah: that sounds easier [06:36] bdha: haha. [06:36] bdha: Social solution > technical solution [06:36] jetienne: ryah: doesnt scale. [06:37] blogometer: Apache. [06:37] ryah: i've heard larry elison makes every decision at oracle [06:37] ryah: every hire [06:37] ryah: every price change [06:37] blogometer: Oh, shit. [06:37] Tim_Smart: Validatorian: They are roughly the same [06:37] blogometer: Well, I'm not working for Larry Ellison and I'm certianly not volunteering time. [06:37] ryah: i think i can pick the top 20 modules each month [06:38] bdha: ryah: And look what happened to Solaris? ;) [06:38] ryah: and by me, i mean the community [06:38] teemow has joined the channel [06:38] ryah: but committed by me :) [06:38] blogometer: ryah: You're being Socratic. [06:38] blogometer: What is the problem? [06:38] mjr_: why does it matter if people can find the right mysql module? [06:38] blogometer: Are you getting stressed out by inquiries or something? [06:38] mjr_: Or if people abandon their little library projects? [06:39] Validatorian: Tim_Smart: alright, thank you [06:39] blogometer: Really. I'd rather have an ecosystem. [06:39] ryah: mjr_: makes it harder for newbies [06:39] blogometer: And GitHub is already the repsoitory. [06:39] blogometer: Bullshit. [06:39] bdha: mjr_: People download a random module from the CPAN. It's utter garbage. It eats their faces and kills their dog. [06:39] blogometer: I'm a newbie and this is much easier than Haskell. [06:39] ryah: direction is good [06:39] bdha: At the hospital and vet, all they do is say how much Perl sucks. [06:39] blogometer: Landing at the Node.js page was reassuring, because there was so little to consdier to get started. [06:39] blogometer: Landing at Erlang, I don't know what the fuck I was supposed to do. [06:39] ryah: if the nodejs.org docs say "use mysql module X" [06:39] ryah: then people will [06:39] jetienne: what about something ala jquery ? several related projects but independant... jquery core, jquery ui, jquery mobile [06:39] ryah: and they won't have to worry [06:40] mjr_: Yeah, I guess that's all true. [06:40] blogometer: Again, who's worried. [06:40] mjr_: Is node.js a system for newbies? [06:40] blogometer: ? [06:40] ryah: and perhaps mysql module X maintainer will feel a bit resonsible [06:40] ryah: mjr_: everythign should be a system for newbiews [06:40] deadlyicon has joined the channel [06:40] blogometer: Again, I had no problem finding a mysql module. [06:40] ryah: perhaps they're experienced programmers like blogometer - but they're new to the framework [06:41] blogometer: Okay. Well listen to jetienne then. [06:41] blogometer: Don't make me feel like I need to deal with all that other stuff. [06:41] ryah: jetienne: eh [06:41] blogometer: Break it up into projects. [06:41] ryah: jetienne: jquery side projects haven't done really well though [06:41] ryah: it's not a success story [06:41] blogometer: No idea what the problem is. [06:42] blogometer: ryah: Based on what? [06:42] jetienne: ryah: true but it doesnt mean all is bad [06:42] ryah: I imagine somoene sending me a patch "I think the docs should have mysql module Y instead of mysql module X" [06:42] ryah: and then a huge thread ensuing on the mailing list [06:42] ryah: that's healthy [06:42] blogometer: That's bike shedding. [06:42] ryah: not when an answer is ultimately decided [06:42] jetienne: i think it is too early [06:42] blogometer: And a lot of argument in the list about which is the "blessed" mysql package. [06:42] bdha: ryah: Or you end up with a tar vs. star explosion. :P [06:43] mjr_: I think you can either do Batteries Included, or you can be a low level system that people can implement lots of different stuff on top of. Part of the benefit of a low level system is that it encourages experimentation and people duplicate effort for the greater good. [06:43] jetienne: node.js as it is now still need a lot of work [06:43] holydevil has joined the channel [06:43] ryah: mjr_: i want to be low-level with batteries included [06:43] ryah: without including batteries [06:43] blogometer: Every bike shed now become a matter of ego and politics. It will be ugly. [06:43] mjr_: tradeoff: failed [06:43] jetienne: to work on a common library is usefull, but should not be that correlated to node for now [06:43] ryah: i want node to be on the store shelf, and the batteries next to it [06:44] jetienne: common lib = more standard = more used then less bugs = better doc [06:44] ryah: i want to document which batteries to use [06:44] blogometer: Node.js should stay small, things like Express and Connect can vie for the framework space. [06:44] jetienne: there is time line tho [06:44] ryah: blogometer: software is a social problem to begin with [06:45] ryah: it's just stuff interacting with other stuff [06:45] ryah: all human made [06:45] blogometer: So, how big does Node.js become? [06:45] ryah: all relatively arbitrary [06:45] blogometer: ryah: None of that is useful. [06:45] ryah: node itself certainly does not grow much bigger than it is now [06:45] _announcer: Twitter: "Had a good night. But now its time for some REAL fun with node.js. WOW I SOUND COOL" -- Chirag Davé. http://twitter.com/ChiragRules/status/21729895237 [06:46] jetienne: i like the node.core (lean/clean) + node.lib [06:46] Aria: I think there's an alternative to the batteries-included vs just-a-core philosophies. Build a library set as a separate project. [06:46] ryah: but clearly it needs modules [06:46] jetienne: node.core would be node.js as it is noz [06:46] blogometer: No one is arguing that software is not social. [06:46] Aria: ++ [06:46] blogometer: I believe, I'm arguing that the nature of open source, of a vibrant community, is one that has an ecosystem. [06:46] jetienne: node.lib would be all the libraries requomended by node people [06:46] ryah: blogometer: indeed [06:46] jetienne: thus node.core and node.lib are clearly distinct [06:46] ryah: blogometer: we wouldn't want to kill the ecosystem [06:47] blogometer: The successful enviornments of the past have been Perl, Python, Ruby. [06:47] blogometer: The anti-social enviornments would be PHP and Java. [06:47] ryah: hm [06:47] ryah: php and java are far more successful than those other three [06:47] blogometer: PHP is all newbies all the time. [06:47] ryah: whose names i've already forgotten [06:47] jetienne: blogometer: i disagree php has the best doc i have ever seen [06:47] mjr_: newbies like Facebook. [06:48] bdha: Some of the biggest social networking sites on the web are written in PHP, dude. [06:48] Aria: jetienne: But outside the core library, it's all 'not invented here' [06:48] blogometer: jetienne: Ah, well, I haven't read it. [06:48] bdha: .. [06:48] ryah: node can hardly be newbies all the time - no matter how my flowers we tack on [06:48] ryah: it's pretty low-level [06:48] Aria: It's mostly NIH that pervades both PHP and Java cultures. [06:48] blogometer: I suppose, I'm just considering the environment I want to work in. [06:48] jetienne: Aria: yep and this is what we try to fix [06:48] blogometer: If Node.js becomes not that enviornment, that is fine. [06:48] Aria: (Ruby to a degree, but mostly it's just polyphony) [06:48] jetienne: Aria: nih is common no matter the language [06:49] mjr_: PHP is an nice templating language but ugly way to write programs. Their docs are pretty excellent, and they include all of the batteries most people ever need. [06:49] jetienne: tss tss let not turn that in a language war [06:49] SubStack: right into the core [06:49] blogometer: If Java is the measure of success and Ellison is the model leader, then I'm sure there's a community that has a direction that is going to fit better with my plans. [06:49] Aria: jetienne: Not so! Look at CPAN, look at TeX, look at Ruby, even. Things work together, and people don't build such tall silos of their own stack. [06:49] ryah: blogometer: that's why i think the appendix idea is okay - it somehow elevates some - but in no way degregates others [06:49] SubStack: php's namespace pollution might even be partly responsible for its success, as difficult as that is to accept [06:49] Aria: appendix ++ [06:49] ryah: the lonely planet of module systems [06:50] jetienne: lets focus on how other project handle modules/lib [06:50] mjr_: I like the idea of this curated collection being a separate project. [06:50] Aria: Heh, yeah, SubStack. Though I think commonjs modules have most of the positive features of that and not so much of the downsides. [06:50] jetienne: Aria: lets just say i disagree and focus on node [06:50] blogometer: ryah: Maybe, just a separate identity. [06:50] blogometer: Because, I believe it is really valuable for people to see that Node.js is not just another framework. [06:51] ryah: SubStack: i agree [06:51] SubStack: require() could pull down missing libs from npm >_> [06:51] ryah: blogometer: perhaps [06:51] ryah: i could see howtonode.org making a list of libs [06:51] Aria: SubStack: Indeed. Or support HTTP with enough caching that it's only slow once. [06:51] blogometer: There is a lot of value in showing experienced developers that they are not going to be in a framework space that has no creative space. [06:52] jetienne: ryah: this node.lib could be handled by people you trust [06:52] jetienne: but good lib + good doc is needed to make ndoe.js mainsream [06:52] jimt_ has joined the channel [06:52] jetienne: it is all in how and when [06:53] blogometer: I still don't understand the problem or the App Store / Ellison inspration. [06:53] ryah: ellison is just mentioned because - i think a single maintainer can scale [06:53] Aria: Indeed. If there's nothing that will make them a bottleneck. [06:53] blogometer: Well, you should split identities. [06:54] jetienne: but this maintainer will have to test and document all those lib ? [06:54] Aria: (Linus telling people off loudly and to come back with better ideas works out well -- lots of people who do good stuff under him, but he'll still be the one to bitch people out who need it) [06:54] jetienne: am i missing something? [06:54] blogometer: Because the big selling point for Node.js at this point, is that it is bound so tightly to async I/O. [06:55] Aria: jetienne: Tests should be automated, and docs should be included. Or people yelled at until they make some. [06:55] mjr_: tests and docs for modules doesn't really address the "abandoned module" issue [06:55] blogometer: jetienne: I'm all for a preferred Node.js build system. [06:55] ryah: jetienne: maybe the node.modules project requires people to do their docs in markdown [06:55] mjr_: or the overall quality issue. [06:55] Somebi has joined the channel [06:55] ryah: jetienne: in order for projects to get into node.modules, they have to provide docs in markdown. [06:55] ryah: then we can generate a website with them [06:55] blogometer: I'd like to have a way to do coverage and testing of both C/C++ and Javascript. [06:56] Aria: Well, for overall quality, treat bugs against the individual things as bugs against the whole lib module. [06:56] ryah: i worry about too much automation [06:56] blogometer: ryah: Which is why you can tell them to just use the GitHub wikis. [06:56] jetienne: Aria: node.lib should be a community. aka i know how to write doc, you know how to write code, i do you doc [06:56] blogometer: Which are all markdown and versioned. [06:56] Aria: jetienne: There's nothing that would ever stop that. [06:56] blogometer: (Who wants to write doc for someone else's code.) [06:56] jetienne: Aria: yep but i think node.lib should help them [06:56] Aria: (I like writing API docs, if the barrier to entry is low.) [06:57] Aria: jetienne: 'help' how? [06:57] blogometer: ACTION Note to self. Befriend Aria. [06:57] jetienne: Aria: puting them in contact, pointing that this module has no doc, so people collaborate for a better node.lib [06:57] SubStack: I like examples more than docs [06:57] SubStack: so long as there are enough of them [06:57] Somebi: good morning to everyone ^_^ [06:57] Aria: ACTION nods. Indeed -- tools and people who do that, both are good, jetienne. [06:57] blogometer: I like the five minute intro. [06:58] ryah: ive been told that drupel is has the best community ever [06:58] ryah: and it's largely because of its website [06:58] Aria: I like docs more than examples, at least as far as reference goes. but getting into something from docs alone is hard. [06:58] blogometer: Nice sites: [06:58] blogometer: http://jashkenas.github.com/coffee-script/ [06:58] ryah: or whatever that project is called... [06:58] ryah: the cms [06:58] mjr_: and maybe that the point of drupal is make collaboration tools. :) [06:58] jetienne: drupal [06:59] blogometer: http://yardoc.org/ [06:59] SubStack: I should get around to writing docs for my modules [06:59] amerine has joined the channel [06:59] bpot has joined the channel [07:00] Somebi: heard about coffee [07:00] Somebi: how is it going? [07:00] blogometer: http://g.raphaeljs.com/ [07:00] ryah: the problem with trusted people, is not that i don't trust them [07:00] jetienne: Aria: node.lib should try to build a common lib for node.core. a common lib = feature coverage, good doc, good testing etc... [07:00] ryah: it's that im the only one here paid to work on node - other people have less time [07:01] Aria: jetienne: Of course. (feature coverage being the only part people would debate about that.) [07:01] jetienne: there is no reason node.js not to have a library of ruby/python quality. this is more "how to reach this" [07:01] ryah: i think a bit of "blessing" is required... [07:01] ryah: mroe so than in jquery [07:02] jetienne: not up to you doing it all [07:02] Somebi: yea good doc with examples will help project to grow [07:02] Somebi: +1 [07:02] Aria: Yeah. Picking best-of-breed projects -- and more so, ones that play nice together -- and blessing them. [07:02] ryah: and that work with a particular version of node... [07:03] jetienne: to highlight good lib could be a first step [07:03] Aria: .oO(Can you plumb, say, a POP3 library and SMTP library together in a few lines of code, and send all messages in a mailbox to someone? That kind of play together) [07:03] Aria: Yeah. Keeping a lib roughly in sync with node is important. [07:03] Aria: (I'd love to see a lib module that has the same version numbering) [07:03] MikhX has joined the channel [07:04] jetienne: what about something like bsd kernel ? [07:04] ryah: there's a lot of merit in drupal like site [07:04] Aria: Where the kernel and userland are synced, ish? [07:04] Aria: (node-lib 0.2.0 works with node 0.2.0, etc.) [07:04] ryah: but i don't think we've got the gas to build it [07:04] jetienne: like there are the people, and the "core team" [07:04] ryah: not yet anyway [07:05] jetienne: ryah: what about howtonode to make a "libraries of the week" ? [07:05] Aria: Yeah. One thing to avoid is becoming gnustep.{org,it,com} ... just so much website fragmentation, everyone being almost-the-official-site. [07:05] jetienne: and see how it goes for a few months [07:05] blogometer: Oh, man. Drupal is nausea. [07:05] Aria: blogometer: The community or the actual code? [07:06] blogometer: I just associate it with a lot of people who can't do more than unzip Drupal. [07:06] konobi: i'm a fan of the private wiki that gets generated into a website kinda thing [07:06] Tim_Smart: ryah: What method do you use to check if a object has a property in C++> [07:06] Tim_Smart: ? [07:06] mjr_: I think node has the best community of any project I've seen. [07:06] mjr_: It's a big reason why I wanted to get involved. [07:06] Aria: Me too. It reminds me of the early days of ruby. [07:06] Tim_Smart: !object->Get('prop')? [07:06] konobi: Tim_Smart: object->Get('property') [07:06] Aria: Like pre-rails Ruby. [07:06] blogometer: mjr_: yes. [07:06] Aria: Me too. [07:06] blogometer: I agree. [07:06] blogometer: And all of this sounds really awful. [07:06] mjr_: So I dunno, I think we are doing a pretty good job with the chaos. [07:06] ryah: Tim_Smart: obj->Has(String::New("blah")) [07:07] konobi: hhhmmm... good to know [07:07] ryah: blogometer: :) [07:07] mjr_: The API used to change about once a week anyway, so it's been kind of hard to expect a ton of quality for people contributing libraries. [07:07] Tim_Smart: ryah: So why do you have to chuck in a v8 string? [07:07] ryah: Tim_Smart: that's how it is [07:07] blogometer: Like Apache. An incredible collection of really bloated committee driven software. [07:07] Tim_Smart: hmm [07:07] blogometer: Why not use Linux as a model. [07:07] Tim_Smart: ryah: You don't have to for Get? [07:07] blogometer: ? [07:07] ryah: blogometer: yes [07:08] konobi: you would have thought it would have cast it [07:08] ryah: that's what i think too [07:08] Aria: Linux is a good model as far as it's analogous. [07:08] ryah: linux is a good model [07:08] Aria: But Linux also is something else, so watch out where the differences lie. [07:08] Aria: (It's a single product, the kernel) [07:08] blogometer: Node.js is more like Linux than it is like Drupal. [07:08] konobi: freebsd model is also good [07:08] Aria: Yeah. It really is. [07:08] ryah: i hate how ruby includes libraries [07:08] konobi: it's a single product... kernel and userland [07:09] ryah: like a yaml parser [07:09] blogometer: Also, Node.js is the next thing. [07:09] Aria: I like the freebsd structure in some ways: A core kernel (~node...), a userland (... node-lib...) and a community of other stuff that runs on it (everything else.) [07:09] mjr_: I tried to do Linux networking way back in the "net2" days, I think they called it, and everybody was mean. It sucked. [07:09] ryah: and like - years down the road you realize that ruby's yaml parser isn't the best [07:09] mjr_: So hopefully that's not the "linux model" [07:09] blogometer: A small executable that is easily redistributable with an interpreter that can work with many small objects. [07:09] jetienne: mjr_: this "you are not part of the group" came later, early 2000 [07:10] blogometer: Node.js and Google V8 are evolutions. [07:10] ryah: blogometer: no fear for the size of node itself - it's not going to get big [07:10] Aria: ryah: Yeah. And, because the core devs don't speak English, there's huge NIH syndrome going on, everyone just starts using an addon library with a slightly different API, and the one included with Ruby rots. [07:10] blogometer: ryah: Okay. [07:10] ryah: blogometer: or - acutally do fear - it keeps me honest [07:10] blogometer: ryah: Okay. [07:10] ryah: but i have no intention of letting this thing grow much more [07:10] konobi: more primitives, less abstractions [07:11] blogometer: ryah: If you want to think like Ellison, that's fine, but think like Stallman. [07:11] jetienne: ryah: do you have an explicit limit ? [07:11] blogometer: A tiny performant, redistribuatble, scripted server platform. [07:11] ryah: jetienne: i want to have explicit startup time contraints [07:11] blogometer: It shall be a destroryer of worlds. [07:11] ryah: jetienne: startup size, etc [07:11] ryah: but i dont have the CI stuff to measure that yet [07:11] jetienne: ok [07:11] konobi: we'll get there [07:12] ryah: anyway [07:12] blogometer: Anyone written a mail server in Node.js yet? [07:12] ryah: appendix doesn't add to bloat [07:12] ryah: it just needs to be maintained [07:12] ryah: it would be silly if it was just a list of what i thought was cool in august 2010 [07:12] SamuraiJack has joined the channel [07:13] Aria: blogometer: funny you should ask that... http://github.com/aredridel/node-smtp/ [07:13] Aria: Yeah, indeed, ryah. [07:13] blogometer: bad link. [07:13] ryah: with that. i write an appendix [07:13] Aria: Oh, bah. [07:13] blogometer: Aria: LOL. [07:13] _announcer: Twitter: "The-d Pushonhoshiikedoarunokana node.js us" [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/21731180596 [07:13] blogometer: Node.js code like that fills my heart with joy. [07:13] Aria: Oh geez. I renamed the project twice and they applied in reverse order. [07:14] jetienne: ok it seems clear that current community is showing its limit. i think it should become more organized [07:14] blogometer: It is just sick and wrong what you can do in 108 lines of Node.js. [07:14] Aria: try now, blogometer [07:14] blogometer: I'm reading it. [07:15] konobi: Aria: mmm... pretty basic... but kinda cool actually [07:15] Aria: Yeah. This is what I did in the past, oh, two hours. Mostly involving writing a line-buffering stream. [07:16] Tim_Smart: Does this seem right? https://gist.github.com/50c0501d3b67e018c1ee [07:16] blogometer: Aria: Looks great. Just fill in the blanks. [07:16] blogometer: I'd written the start of SMTP and IMAP in Java. [07:16] Tim_Smart: I have a feeling I'm doing too much. [07:16] blogometer: To learn NIO. [07:16] Aria: Yeah. I'm about to make it emit a bunch of events, blogometer, but the rough shape is coming together now. [07:17] blogometer: It was thousands of lines of code that didn't do as much as this does. [07:17] Aria: Tim_Smart: That's about how V8's code looks internally. Looks about right. [07:17] konobi: Aria... then the fun with timing, scanning, auth, delays, greylisting, etc. [07:17] Aria: konobi: http://aria.blogs.theinternetco.net/ ;-) [07:17] blogometer: Actually, I'm really curious to see Node.js do SMTP. [07:17] Tim_Smart: Aria: OK, well I'll continue with the patch and let ryah review it later. [07:18] blogometer: Because then the community will get wise to security in a big way. [07:18] Aria: Hehe, yeah. [07:18] konobi: Aria: ah... heh... i'm an old mail security bod [07:18] Tim_Smart: Aria: I'm not sure if line 10 will work as I expect it to. [07:18] jetienne: going for mac packaging [07:18] Aria: Yeah, not sure how that works, Tim_Smart. [07:19] jetienne has joined the channel [07:19] benburkert has joined the channel [07:20] zomgbie has joined the channel [07:20] Aria: Now, I think http://github.com/aredridel/ruby-linebuffer/blob/master/lib/linebuffer.js is ugly, and it's making me wonder what can be done to make stream objects simpler to implement. [07:20] blogometer: Every day now, this Node.js thing is blowing my mind, the community is constantly cranking out terse, performant code, that I can read and understand and patch if it breaks. [07:21] blogometer: I do not want to see this community change. [07:21] Aria: Hehe. Just gotta enshrine the parts that rock. [07:21] Aria: And keep those patches flowing. Even if the original maintainers screw it up. [07:21] blogometer: Aria: I want smtp because I want to build a mailserver with moderation. [07:21] jetienne: ryah: email linus [07:21] blogometer: For group discussions. [07:22] Aria: Huh. Wow, and you'd do that at the SMTP layer? Rather than further down a mail processing chain? [07:22] blogometer: You'd need an SMTP layer to start, though. [07:22] Aria: Yeah, but those /do/ exist ;-) [07:22] Aria: exim, postfix, etc. [07:23] blogometer: Yeah, but the wheel that your reinventing will be *rounder*. I just know it. [07:23] Aria: ACTION laughs. [07:23] Aria: It /is/ amazing how many sharp corners mail servers grow. [07:23] konobi: ACTION never wants to see SMTP again [07:23] blogometer: I'd like to see SMTP that I can read and understand. [07:23] Aria: SMTP's a spiffy protocol. Problem is, the people who use it... [07:23] bdha: SMTP is awful. [07:24] Aria: SMTP is the original MQ ;-) [07:24] konobi: that protocol is a PITA, not because of the protocol, but because of how people implement it [07:24] blogometer: Like with postfix, I don't need to deliever to the local filesystem. It can all be in memory or in a database. [07:24] bdha: konobi: It's not the people who implement it... it's the specs they have to implement. [07:24] Aria: Remind me to send you a 2GB email sometime. [07:24] konobi: then atop that you have MIME which is a PITA [07:24] Aria: bdha: like which? [07:24] konobi: multi-part mime at that [07:24] blogometer: It's all pretty easy to understand. [07:24] bdha: Aria: http://video.google.com/videoplay?docid=7054401183589794595# [07:24] Aria: ACTION laughs. I kinda like mime, too. Even if boundaries are a pita slightly. [07:24] bdha: Enjoy. :) [07:24] ryah: what's the best couch binding? [07:25] blogometer: The hard part has always been delivery mail as the UNIX user. [07:25] blogometer: And running his scripts. [07:25] blogometer: ryah: Check you appendix. Don't ask us. [07:25] jetienne: :) [07:25] blogometer: ACTION Goes to room and slams door. [07:26] ryah: :) [07:26] Aria: ACTION smirks at bdha. Oddly, none of that has ever bugged me. [07:26] bdha: Aria: Well, ...yay? [07:27] bdha: Having worked at an email company (Pobox) since 2006, I can say: Email sucks. [07:27] bdha: How people use email sucks. [07:27] Aria: Hehe. [07:27] Aria: That last part especially. [07:27] bdha: Unfortunately Wave didn't replace email, so. [07:27] bdha: I guess it's here to stay. :P [07:27] Aria: (and yay Pobox. All the discussions I've had with people who've worked there have been super smart and sensible.) [07:28] CIA-77: node: 03Ryan Dahl 07master * r94d1708 10/ (5 files in 3 dirs): Add appendix to docs - http://bit.ly/d9iD99 [07:28] bdha: Thanks, we try. ;) [07:28] bdha: ACTION is the SA, for whatever that's worth. [07:28] ryah: oops [07:28] konobi: bdha: ah... i know a few of the pobox crew former and current [07:29] blogometer: ACTION Resolves to be in the appendix. [07:30] bdha: blogometer: Better than _being_ the appendix. Then you just go bad and get removed. Like in Evil Dead. [07:30] bdha: konobi: Wel. hai fren. :) [07:30] CIA-77: node: 03Ryan Dahl 07master * r33e919a 10/ doc/api.markdown : Add appendix to docs - http://bit.ly/9IVe94 [07:30] konobi: mainly the perl bods [07:31] bdha: konobi: We're all Perl people to some extent. :) [07:31] blogometer: Wave? [07:31] bdha: blogometer: Google Wave. [07:31] bdha: It was this thing, right? This thing that did some undefinable stuff, but it was totally awesome, somehow. [07:31] bdha: ACTION waves hands around. [07:31] blogometer: I know. It was awful. [07:31] bdha: Yes, I know. [07:31] bdha: That "unfortunately" was sarcasm. :) [07:32] blogometer: Sarcasim doesn't come thorugh IRC to good. [07:32] blogometer: s/to/too/ [07:32] blogometer: How much money did Google spend to get that week's worth of attention? [07:33] bdha: Better question: Did their bottom line notice? [07:33] bdha: Answer: Haha. [07:33] Tim_Smart: ryah: Should I allow both normal Buffers and FastBuffers? [07:33] blogometer: bdha: LOL. [07:33] sveimac has joined the channel [07:33] ryah: Tim_Smart: no [07:33] ryah: Tim_Smart: old buffers houdl be renamed to [07:33] blogometer: ACTION Busy deleting all the Java projects from his GitHub account (github.com/bigeasy). [07:33] ryah: SlowBuffers [07:34] ryah: and the FastBuffers should become just Buffer [07:34] Tim_Smart: OK, and SlowBuffers are only accessible through process.binding? [07:34] ryah: yeah [07:34] Tim_Smart: Sounds good to me. [07:36] Tim_Smart: args[0]->IsObject() && args[0]->ToObject()->Has(String::New("parent")) && Buffer::HasInstance(args[0]->ToObject()->Get(String::New("parent"))) [07:36] konobi: would be nice to standardize a little on how to run tests, so that we can do a "fastbuffers" branch then run a whole bunch of libraries tests through it [07:36] Tim_Smart: Is that too much validation, or is it fine? [07:37] ryah: Tim_Smart: *shrug* [07:37] ryah: i prefer to take it easy on the type checking [07:37] Tim_Smart: OK. I'll just mess around with it for a while. [07:38] ryah: Tim_Smart: note that that c++ buffer class cannot change interface [07:38] Tim_Smart: Yup. [07:38] ryah: cool [07:38] Tim_Smart: ryah: Oh wait, I can just use the isBuffer function right? [07:39] ryah: you can use it for slowbuffers [07:39] ryah: hm [07:39] ryah: you know that c++ buffer class [07:39] Tim_Smart: Ya [07:39] ryah: that should be renmaed to SlowBuffer [07:39] ryah: also be a c++ class [07:40] Tim_Smart: OK. [07:40] ryah: bt then a new c++ Buffer class should be made [07:40] ryah: which is implemented new [07:40] ryah: just as a shim for the old APIs [07:40] ryah: the SlowBuffer class should be private to node_buffer.cc and defined there. [07:40] Tim_Smart: http://github.com/Tim-Smart/node/commit/a5972040387ee38f77e75190c2e19de55fd07b7a#L0R162 [07:40] ryah: i think [07:41] Tim_Smart: ryah: I thought you wanted fast buffers JS only? [07:41] ryah: this is becoming a bit too much for me to think about without acutally doing it [07:41] ryah: so far that looks fine [07:41] ryah: you should %s/FastBuffer/Buffer/ [07:41] jsilver has joined the channel [07:41] ryah: but dealin with the c++ side is going to be tricky. [07:42] ryah: forget what i just said about the SlowBuffer c++ class.. [07:42] ryah: just keep it Buffer [07:42] Tim_Smart: Yup. I think the C++ should stay as is, just need to change how the function handle the buffer argument, [07:42] ryah: Buffer::New will just return a Buffer as it always did [07:42] ryah: it'll just be a slow buffer [07:42] ryah: we can add a new function for allocing a FastBuffer in c++ later [07:43] Tim_Smart: functions* [07:43] jsilver: hi guys++ [07:43] Tim_Smart: Anyway. Dinner time for me. [07:43] ryah: Tim_Smart: bed for me [07:43] ryah: ttyl [07:43] ryah: hi jsilver [07:43] jsilver: i BedDinner [07:43] jsilver: hi [07:43] ryah: ACTION away [07:43] jsilver: bye [07:45] blogometer: Actually, I'm going to suggest a knitting circle. [07:45] blogometer: I'd like to build some stuff in Node.js. [07:45] blogometer: And I'd like to learn how to build performant servers quickly. [07:46] blogometer: And the Javascript idioms. [07:46] blogometer: So, maybe, community wise, there's some way to establish a Node.js stylebook. [07:52] jsilver: does anyone wanna have randy node js time with me yeah> [07:52] jsilver: blogometer, google: DOUGLAS CROCKFORD js videos [07:52] jsilver: wil not disappointed [07:53] mattikus has joined the channel [07:53] blogometer: Noted. [07:54] joshbuddy has joined the channel [08:01] felixge has joined the channel [08:01] felixge has joined the channel [08:01] twoism has joined the channel [08:01] pdelgallego has joined the channel [08:02] rnewson has joined the channel [08:04] astrolin has joined the channel [08:05] Aria: Night, all. [08:15] FND has joined the channel [08:16] FND: hi - `echo "var i = 1;" | node` raises ENOTTY - where can I find documentation on how to do this right? [08:18] FND: same for `node < foo.js` [08:18] halorgium: FND: by default node loads the repl when invoked with no args [08:19] halorgium: i don't believe you can specify to read from stdin [08:19] FND: I've looked at node --help, but there aren't many options there [08:19] FND: I'll use a temporary file then, I guess [08:19] zomgbie has joined the channel [08:20] FND: is there a way to specify multiple files? as in `node foo.js bar.js`? [08:20] rnewson has joined the channel [08:20] rnewson has joined the channel [08:20] halorgium: nope [08:21] FND: I'm asking is because I used to use Spidermonkey as terminal-based JS engine, so now learning about the slight differences [08:21] FND: s/is // [08:21] dnolen has joined the channel [08:21] FND: so I'd have to concatenate foo.js and bar.js into a temporary file before feeding it to Node? [08:21] FND: actually [08:21] FND: I could create a temporary file with require("foo" [08:22] FND: ACTION tests [08:22] halorgium: remember that each file has its own scope [08:22] FND: yeah, this might be trickier than I expected [08:23] FND: I wrote a few JavaScript shims to make QUnit run on Spidermonkey, now trying to get this to work on Node [08:24] CIA-77: node: 03Ryan Dahl 07master * r488aff0 10/ (5 files in 3 dirs): Improve appendix markdown - http://bit.ly/cRRSyi [08:35] FND: the dispatch.js with require("foo"); require("bar"); works - also allows me to deal with variable scope [08:37] pdelgallego: Hi what is a good node.js project to do in a weekend? I already have done a chat. [08:44] hellp has joined the channel [08:45] sveimac has joined the channel [08:49] jimmy203 has joined the channel [08:51] FND: `node --help` mentions `node --v8-options` -- but how do I invoke V8 options? [08:52] jimmy203: Whats the easiest wat to get the property name from a json object? [08:52] jimmy203: way* [08:53] frza has joined the channel [08:54] femtoo has joined the channel [08:55] jimmy203_ has joined the channel [09:05] _announcer: Twitter: "Perhaps because of libevent libev trumpet, node-js, perhaps because of, node-dht is probably because of one. Well not libevent, libev going to be enough or do I support" [ja] -- Yuuki Takano. http://twitter.com/ytakanoster/status/21735921752 [09:05] hzin has joined the channel [09:05] sveimac has joined the channel [09:14] matthewford has joined the channel [09:16] Throlkim has joined the channel [09:25] SamuraiJack_ has joined the channel [09:26] claudiu__ has joined the channel [09:39] mattly_ has joined the channel [09:40] _announcer: Twitter: "@ryah let's hear it for RPC/RMI !! Who needs REST APIs anyway??? ;-) /me goes back to building and RMI framework with node.js...." -- Michael Bradley. http://twitter.com/michaelsbradley/status/21737382988 [09:44] matthewford has joined the channel [09:50] mAritz has joined the channel [09:55] felixge has joined the channel [09:55] felixge has joined the channel [09:57] robotarmy has joined the channel [09:57] Tim_Smart: Does somewhere here know how to call a function on a object from C++? [10:00] rnewson has joined the channel [10:00] rnewson has joined the channel [10:04] _announcer: Twitter: "JSSP - JavaScript Server Pages Engine on top of NodeJS (Alligator): http://wp.me/puFuL-2t" -- MrOhad. http://twitter.com/MrOhad/status/21738366784 [10:04] aho has joined the channel [10:12] ay has joined the channel [10:13] ay: Just a quick question. From a old Perl-coder... Using http.client. What is the prefered way to extract the title of the document you retrive... [10:15] Tim_Smart: ay: Regex or parse with DOM. [10:16] Tim_Smart: s/with/into/ [10:18] ay: Ok. Regexp is easy. But does node.js provide som cool tools to dive into the dom or is plain javascript parsing.. [10:18] tobiassjosten has joined the channel [10:19] felixge: ay: node does not provide html parsing, but there are people working on libraries for it [10:19] tobiassjosten: Anyone here using mongoose? I need some practical examples on how to use its models. [10:19] ay: felixge: So regexping the complete document is the easiest way? [10:19] ay: I'm fine with that. [10:20] felixge: ay: yeah, I mean this seems like anything else might be overkill [10:20] felixge: ay: if you need to parse more than just the title tag, I'd look into finding a decent html parsing lib for node [10:21] ay: Ok. I Will need that after a while. [10:21] astrolin has joined the channel [10:21] ay: The examples I've seen so far have all be using exec("curl -e" [10:21] ay: Instead of http.client... [10:22] felixge: ay: well, the http client is a little low level. You have to take care of redirects yourself for example [10:23] ay: Ok. [10:23] felixge: ay: http://github.com/silentrob/Apricot this looks really cool [10:24] ay: felixge: Cool. Thank You [10:24] felixge: ay: in fact, it looks so cool, I need to play with it myself for a minute :) [10:31] bradleymeck has joined the channel [10:32] felixge: ay: man, that lib is insanely cool :) [10:33] _announcer: Twitter: "Apricot - an insanely cool html scraping tool for #nodejs. http://bit.ly/bQUTgk" -- Felix Geisendörfer. http://twitter.com/felixge/status/21739597420 [10:36] jetienne: felixge: you got aware of it from ryah recomendation in the doc ? [10:36] felixge: jetienne: no, just looked for a lib like that because ay asked [10:36] jetienne: ok [10:37] felixge: jetienne: where does ryah recommend it? [10:37] jetienne: felixge: a new part of the document is "good libs". in order to stop the big mess of unmaintained code [10:38] felixge: jetienne: is that published yet? [10:38] jetienne: http://github.com/ry/node/commit/33e919ae6f365c81f345f70e2fdb406a2268756a [10:38] felixge: jetienne: ah ok [10:38] felixge: jetienne: yeah, that's not live yet [10:39] felixge: that's a strange patch btw. [10:39] felixge: looks like ryan commited some other stuff along with it [10:40] _announcer: Twitter: "http://tinyurl.com/ylkfkeu Deploying Node.js With Upstart and Monit - How To Node" -- catch_fish. http://twitter.com/catch_fish/status/21739874409 [10:41] sztanpet has joined the channel [10:45] rubydiamond: Anybody using node-oauth? [10:47] rubydiamond: does node-oauth support Oauth 1.0a ? [10:49] jkreeftmeijer_ has joined the channel [10:50] jkreeftmeijer_: Hi! Did anyone here get Socket.IO working with the iPhone? [10:50] jkreeftmeijer_: It connects (using xhr-polling), but disconnects after a couple of seconds: [10:50] jkreeftmeijer_: 21 Aug 10:37:49 - Initializing client with transport "xhr-polling" [10:50] jkreeftmeijer_: 21 Aug 10:37:49 - Client 5455555797088891 connected [10:50] jkreeftmeijer_: 21 Aug 10:37:57 - Client 5455555797088891 disconnected [10:51] rubydiamond: jkreeftmeijer_: hey [10:52] jkreeftmeijer_: hey rubydiamond :) [10:52] rubydiamond: jkreeftmeijer_: did you use node-oauth? [10:52] jkreeftmeijer_: Eh, no. [10:53] rubydiamond: okay [10:58] jkreeftmeijer_: hmm... the chatbox example seems to work... [10:58] jkreeftmeijer_: Anything I should keep in mind? :) [11:00] _announcer: Twitter: "Have to look at Heroku nodejs docs for @node_knockout . Time passes :)" -- Kadir Pekel. http://twitter.com/kadirpekel/status/21740735359 [11:02] sveimac has joined the channel [11:03] AAA_awright_ has joined the channel [11:03] sveimac has joined the channel [11:03] femtoo has joined the channel [11:04] sveimac_ has joined the channel [11:05] _announcer: Twitter: "0.2.0 Вышел nodejs nodejs http://nodejs.org/ # # download" [pl] -- bnetteam. http://twitter.com/bnetteam/status/21740946174 [11:07] _announcer: Twitter: "@ Nerdson Node.js What is this?" [pt] -- Laercio Motta. http://twitter.com/laerciomasala/status/21741051238 [11:14] tuxsbro_ has joined the channel [11:15] _announcer: Twitter: "Since the dawn of the server configuration I'm looking for a netty documents, sometimes for a taste if you need to configure a server that thought out there. It seems to consist node.js interesting ... It's also a time to study." [ko] -- Qoo. http://twitter.com/garangnip/status/21741370226 [11:19] sveimac_ has joined the channel [11:22] sveimac_ has joined the channel [11:25] feroz_ has joined the channel [11:27] mertimor has joined the channel [11:31] rubydiamond: Getting this error http://pastie.org/1105783 for npm install macaddr ... am I missing something here? I am using npm version 0.1.25 and node version v0.2.0 [11:31] rubydiamond: ryah: you there? [11:31] jashkenas has joined the channel [11:33] Tim_Smart: rubydiamond: macaddr isn't in the registry [11:34] rubydiamond: Tim_Smart: okay thanks [11:37] Tim_Smart: Grr... Does someone around here that knows node's C++ side of things, know why this might make node silently exit? http://github.com/Tim-Smart/node/compare/master...fast-buffer [11:42] thedjinn has joined the channel [11:52] jacobolus has joined the channel [11:53] herbySk has joined the channel [11:54] confoocious has joined the channel [11:58] caolanm has joined the channel [11:58] caolanm: hey [11:59] caolanm: here's an odd one... if I eval a function it is an instanceof Function, if I use Script to run it its not an instanceof Function, but both are typeof 'function' [12:00] caolanm: sometimes js is strange [12:03] dipser has joined the channel [12:04] polotek has joined the channel [12:06] junkee[] has joined the channel [12:10] claudiu__ has joined the channel [12:13] ker2x: Mmm... i'm sure i have a memory leak. and i don't understand how i could possibly have a memory leak in my js code [12:14] ker2x: it could be in one of the module [12:14] polotek: ker2x: js can have memory leaks if you're leaving references around after you're done with them [12:14] polotek: but more likely it's a C addon [12:15] polotek: what are you doing? [12:15] ker2x: my js code is simple. but i also use dgram, http, mongodb [12:15] herbySk: caolanm: if you use it to run in itsd own context, then it's as it should be: each context has its own, distinct "Function" [12:16] ker2x: it probably is in the mongo driver [12:16] herbySk: (as well as Object, Number, String, thier prototypes, etc. ... all startup data for js) [12:16] polotek: never used dgram [12:17] ker2x: dgram is very easy and simple to use :) [12:17] ker2x: udp is <3 [12:17] Tim_Smart: herbySk: He left :/ [12:17] Tim_Smart: I was about to answer his question. [12:18] d0k has joined the channel [12:18] Tim_Smart: ker2x: node-inspector can take heap snapshots. [12:18] Tim_Smart: I personally haven't got it working, but it looks cool. [12:19] nerdEd has joined the channel [12:19] ker2x: i use --trace_gc [12:19] stellar has joined the channel [12:20] ker2x: Scavenge 34.9 -> 31.5 MB, 5 ms. [12:20] ker2x: Scavenge 36.1 -> 33.2 MB, 8 ms. [12:20] ker2x: Scavenge 37.8 -> 34.9 MB, 7 ms. [12:20] ker2x: Scavenge 39.5 -> 36.6 MB, 8 ms. [12:20] ker2x: Mark-sweep 46.6 -> 30.5 MB, 2 / 89 ms. [12:20] ker2x: 12h ago it was ~5MB [12:22] konobi: closures are generally pretty leaky [12:23] ker2x: humm [12:23] ker2x: ok [12:23] konobi: http://www.ibm.com/developerworks/web/library/wa-memleak/ [12:23] ker2x: ha ! thx a lot :) [12:27] rnewson has joined the channel [12:30] frza has joined the channel [12:34] tisba has joined the channel [12:42] rkieffer has joined the channel [12:43] feroz_ has joined the channel [12:50] hsuh has joined the channel [12:55] _announcer: Twitter: "@ Ba78 you can say a few peldafeladatot node.js to? beleasnam myself." [hu] -- deejayyhu. http://twitter.com/deejayyhu/status/21746324531 [12:55] mAritz: theoretical question: i'd need an idempotent way to generate a sector in 3d-space given the sectors coordinates and side length (cube). what could i use? :D [12:55] mAritz: as in what kind of algorithm [12:57] jashkenas: idempotent? generating what exactly? [12:58] _announcer: Twitter: "@danrough we were going do nodejs but he screwed his nose up at modern garbage collection, wants to "cut code old school like." Obj-C then." -- Tim Macfarlane. http://twitter.com/timmacf/status/21746499595 [12:58] sveimac has joined the channel [13:00] _announcer: Twitter: "UglifyJS works well for me, it produces a view bytes more then closure compiler, but passes well to nodejs ecosystem" -- Oleg Slobodskoi. http://twitter.com/oleg008/status/21746628138 [13:01] _announcer: Twitter: "Good time spent at @arnabc's place. hacked Node.js a little." -- Aniλ Wadghuλe. http://twitter.com/anildigital/status/21746703809 [13:17] rnewson has left the channel [13:18] hsuh_ has joined the channel [13:23] davidwalsh has joined the channel [13:25] jimmy203_: anyone here good with mongoose? [13:25] polotek: jimmy203_: never used it. but I'll try to help out [13:25] jimmy203_: I`m trying to understand how to do an update after a find? [13:26] polotek: jimmy203_: post some code? [13:26] jimmy203_: hold on. [13:27] polotek: unrelated, anybody know about v8 classes with Persistent Handle properties? [13:27] polotek: if I have a class and one of it's properties is Persistent [13:28] polotek: will it get cleaned up automatically in the classes destructor [13:28] polotek: I'm guessing no [13:29] jashkenas has left the channel [13:29] jimmy203_: http://pastebin.com/xMD3q0BN [13:30] Tim_Smart: polotek: I know a little about Persistent scope. "Persistent handles are not held on a stack and are deleted only when you specifically remove them." [13:30] Tim_Smart: From http://code.google.com/apis/v8/embed.html [13:30] polotek: Tim_Smart: yeah that's what I'm reading [13:30] polotek: how would I test this? [13:30] sideshowcoder has joined the channel [13:30] polotek: I'm running --trace_gc [13:30] polotek: but it looks to be stable [13:31] polotek: well the other thing is that the property isn't always initialized [13:31] polotek: I guess I should run a test that makes sure to initialize it [13:31] mAritz: jashkenas: idempotent = given the same input (coordinates and side length) it always has to have the same output. generating a bunch of points in that quadrant. [13:33] robotarmy has joined the channel [13:34] jimmy203_: Do I have to retrieve all the ids from find and then use model.update and loop through and update each field? [13:37] polotek: jimmy203_: I thought you could just update the properties right on the object. and then do obj.save() [13:37] polotek: is that not working? [13:38] zomgbie has joined the channel [13:39] _announcer: Twitter: "String.prototype.format, Date.prototype.strftime such as adding a node.js." [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/21749001171 [13:40] rkieffer: How do you start the event loop w/out creating a server? [13:40] jimmy203_: let me try that.. [13:40] rkieffer: e.g. if I run a program that is nothing more than "setTimeout(function() {process.exit();}, 1000);" ... it never exits. [13:40] Tim_Smart: rkieffer: You don't need to worry about the event loop. [13:41] rkieffer: Tim_Smart well, I do if I want setTimeout() or nextTick() to work. :) [13:41] rkieffer: If I prefix that with an http.createServer().listen() call... the timeout gets called as expected. [13:41] polotek: rkieffer: the event loop starts automatically when node starts [13:42] polotek: it's not something you need to handle [13:42] maushu has joined the channel [13:42] polotek: rkieffer: your example works fine for me [13:42] Tim_Smart: rkieffer: Tried that code and it exiting after 1 second. [13:42] rkieffer: polotek: hmm... then I'm confused by why setTimeout isn't getting called. [13:43] jimmy203_: polotek, that didn`t seem to work :( [13:43] rkieffer: I'm running latest build. [13:43] rkieffer: let me git pull just to make sure [13:44] mau has joined the channel [13:44] polotek: jimmy203_: what does it do? are you getting errors? you could also check the mongo logs to make sure it's even receiving anything [13:44] polotek: rkieffer: when I updated to the latest node this morning, I had an issue or 2 [13:44] polotek: I had to do make clean && make distclean [13:45] polotek: and then ./configure and make again [13:45] polotek: you might want to try that [13:45] rkieffer: k, one sec. [13:46] Tim_Smart: polotek: Do you have any idea why node might silently exit here: http://github.com/Tim-Smart/node/compare/fast-buffer [13:47] polotek: Tim_Smart: what am I looking for? this is a big diff [13:47] Tim_Smart: polotek: Good question. I have looked over it a few times and could find any obvious bugs. [13:48] Tim_Smart: ryah would probably the best person to ask... [13:48] Tim_Smart: be the* [13:49] polotek: Tim_Smart: is it segfaulting or just not doing anything? [13:49] Tim_Smart: Just not doing anything [13:50] jimmy203_: I`m just getting errors. [13:50] rkieffer: polotek: jimmy203_ rebuilding did the trick. thx polotek. [13:51] polotek: jimmy203_: errors from node? post them [13:52] jimmy203_: no sorry.. I`m still talking about mongoose and trying to save from the find. [13:52] polotek: Tim_Smart: I'm running to get breakfast. but if you want I'll load it up and help you run some tests when I get back. [13:52] polotek: jimmy203_: I mean you're getting javascript errors and not errors from mongo [13:53] Tim_Smart: polotek: I'm about to go to sleep, so no worries. [13:53] polotek: Tim_Smart: ok [13:53] Tim_Smart: polotek: I'll just try rebuilding everything once more, then wait until I catch up with ryah again. [13:54] polotek: back in a bit [13:54] jimmy203_: I must be doing something simple wrong.. [13:54] maushu has joined the channel [13:54] Tim_Smart: jimmy203_: Chuck your code on http://pastie.org/ or something. [13:55] Tim_Smart: Otherwise someone will have to take a really good guess :) [13:55] jimmy203_: http://pastebin.com/xMD3q0BN [13:56] jimmy203_: I`m just trying to figure out how to update values :) [13:56] jimmy203_: after you do a find.. [14:00] hsuh_ has joined the channel [14:00] Akufen has joined the channel [14:00] Akufen has joined the channel [14:03] mau2 has joined the channel [14:12] icy: is the src of _announcer public? [14:12] megan: good morning node.js [14:13] hsuh_ has joined the channel [14:16] _announcer: Twitter: "Why You Should Pay Attention to Node.Js http://is.gd/esXhS <- old post but valid reasons" -- Hernan Garcia. http://twitter.com/theprogrammer/status/21751453311 [14:16] nerdEd_ has joined the channel [14:16] Blackguard has joined the channel [14:21] hsuh_ has joined the channel [14:29] pbunbun has joined the channel [14:29] _announcer: Twitter: "uptake while intently at the node.js chirpstream CouchDB evently browser discharge in volume." [ja] -- Yohei Sasaki. http://twitter.com/yssk22/status/21752391622 [14:29] _announcer: Twitter: "@ Epoch__ chirpstream to capture while intently at CouchD http://9zqt8sm.itter.ch/ node.js" [ja] -- みにえぽっく. http://twitter.com/miniepoch__/status/21752391856 [14:30] pbunbun: Yo, have question [14:31] pbunbun: I have a main script (say "main.js") and it requires "quote.js", I get that main.js can access anything quote.js puts in the export object (and it works) [14:31] pbunbun: But is there a way for a function in quote.js to access data/functions in main.js? [14:32] sideshowcoder_ has joined the channel [14:34] _announcer: Twitter: "Wow. Implementing a node.js (async) version of Ruby's Dir.glob (http://bit.ly/byotsO) is hard." -- Tobie Langel. http://twitter.com/tobie/status/21752756620 [14:37] junkee[] has left the channel [14:39] zomgbie has joined the channel [14:40] mscdex: pbunbun: no [14:40] mscdex: pbunbun: not unless you pass something in to one of your exported functions [14:44] pbunbun: Ah, I'll consider that then [14:44] polotek: pbunbun: that's the cleaner way to do it anyway. the point of modules is to avoid mixing scopes [14:44] polotek: well one of the points anyway [14:45] megan: I want my node app to run on port 80, but that means only root can start the process right??? [14:45] polotek: megan: correct, node needs root privileges to bind to low ports [14:45] Tim_Smart: polotek: What is the best way to cast a v8 string to a c++ string? [14:45] polotek: Tim_Smart: use Utf8Value [14:45] megan: but polotek, I am using an svn hook to check it out and then I want to run it [14:45] polotek: lemme find and example [14:45] Tim_Smart: ok [14:45] polotek: megan: use sudo [14:46] megan: okay, but won't that prompt for a password? [14:46] megan: I don't even have sudo ;D [14:46] megan: so there [14:47] sideshowcoder_ has joined the channel [14:47] polotek: Tim_Smart: http://github.com/polotek/libxmljs/blob/master/src/xml_element.cc#L29-30 [14:47] polotek: so basically you take a handle and pass it in to construct a Utf8Value [14:47] polotek: Then when you dereference that Utf8Value it'll give you the underlying char * [14:48] polotek: but it's const so if you want to keep it, you'll have to copy it [14:48] Tim_Smart: OK thanks. [14:48] herbySk: megan: chown root, chmod u+s ? [14:50] jMCg: brrrrr [14:51] jMCg: megan: http://yaws.hyber.org/privbind.yaws [14:53] rnewson has joined the channel [14:55] polotek: jMCg: that's cool [14:55] polotek: usually what happens is you start as root and then the program explicitly downgrades it's user privileges [14:55] polotek: that's what apache does right? [14:55] polotek: I'm sure i'm not understanding it entirely correctly [14:56] polotek: But I do like the idea of granting the non-root user only the specific privileges it needs [14:57] jMCg: polotek: take a look at mongrel2 daemonization code to get the idea. It's really.. simple.. Once you figure it out and get it right ;) [14:57] sideshowcoder_ has joined the channel [14:57] pgriess has joined the channel [14:57] jacobolus has joined the channel [14:58] polotek: jMCg: word [15:04] jacobolus has joined the channel [15:07] sideshowcoder has joined the channel [15:07] nerdEd has joined the channel [15:09] jMCg: Then again.. mongrel2 is tracked in fossil scm, and actually looking at the code would require more innitial effort than most people can bother to put in [15:10] mscdex: is it called fossil because it uses outdated concepts/technology? :p [15:12] _announcer: Twitter: "Playing with NodeJS today. Attempting to build a better chat server for one of my the projects I am working on!" -- Jamund Ferguson. http://twitter.com/xjamundx/status/21755570125 [15:12] jMCg: http://mongrel2.org/artifact/d52f279001bc435282fa75df9424c575f33173c6 [15:12] jMCg: I don't know or care. I try not to get involved into wars about software, editors, OSes, SCMs, because it just makes me think of genozide. [15:14] c4milo has joined the channel [15:16] nerdEd_ has joined the channel [15:21] rubydiamond: We can haz Ship It! Node http://ship-it-node.heroku.com/ [15:22] mscdex: :S [15:26] mscdex: jMCg: have you tried mongrel2's websocket support? [15:28] mscdex: hrm... reading about websocket support in their docs leads me to believe it's not implemented [15:29] c4milo has left the channel [15:30] Tim_Smart: polotek: OK well the fast-buffers branch can actually run stuff, but it needs a bit of work. [15:31] polotek: Tim_Smart: so I took a closer look [15:31] Tim_Smart: yeah buffer.js had some silly mistakes. [15:31] polotek: are you basically using the pixel functions to store the data because it's faster to store and retrieve them? [15:32] polotek: I'm not sure I understand why fast_buffer is faster [15:32] softdrink has joined the channel [15:32] Tim_Smart: polotek: Ryah implemented the conceptual magic. [15:32] Tim_Smart: Basically it uses the old buffer as a memory pool for small buffers. [15:33] rubydiamond: guys Ship It! Node style! [15:33] rubydiamond: http://shipitnode.heroku.com [15:33] Tim_Smart: So you aren't doing as many Buffer creations as you usually would. [15:34] rubydiamond: is it possible to stream image data [15:34] rubydiamond: instead of waiting [15:34] polotek: i see. so it's the constant buffer allocation that is the main speed drag? [15:34] rubydiamond: basically create a websocket and stream the data to website [15:34] polotek: rubydiamond: yes, but only if you stop spamming the channel with ship it links [15:34] rubydiamond: want it for Ship it node app [15:34] polotek: :P [15:34] rubydiamond: polotek: ah sorry [15:35] Tim_Smart: polotek: ObjectWrap is the main speed drag - something to do with v8's external stuff. [15:35] polotek: rubydiamond: you can stream binary image data just like anything else [15:35] Tim_Smart: the malloc wasn't half bad [15:35] rubydiamond: polotek: I am assuming it browser will render it runtime [15:35] polotek: I admit I don't know how difficult it would be to assemble it and get a an img tag in the client [15:36] polotek: rubydiamond: if you want it rendered into an tag then you don't need websockets [15:36] rubydiamond: polotek: basically I want it to stream [15:36] polotek: just load the url in your image tag [15:36] rubydiamond: than getting the file [15:36] rubydiamond: polotek: but will it stream ? [15:37] pr0cy0n has joined the channel [15:37] Tim_Smart: rubydiamond: Yes it will. Just not over websockets. [15:37] Aria has joined the channel [15:37] polotek: rubydiamond: have you tried it. I don't know if img tags handle chunked data [15:37] Tim_Smart: Or whatever you are doing. [15:37] polotek: never tried it [15:37] polotek: but yes, node will stream it [15:37] [[zz]] has joined the channel [15:37] Tim_Smart: polotek: Considering all the static file servers in node usually use chunked, it will be fine. [15:37] rubydiamond: polotek: you mean if I put filepath in img tag.. node will stream ? [15:38] megan: should I be running my node app as root? [15:38] Tim_Smart: rubydiamond: streaming is up to the server, not the client. [15:38] polotek: rubydiamond: as long as you don't set the content-length and set transfer-encoding: chunked [15:38] polotek: it will stream [15:38] rubydiamond: If I put base64 encoded data in img tag.. [15:38] Tim_Smart: megan: Try not too... [15:38] megan: but then I don't get port 80 [15:38] rubydiamond: will node.js stream it or will it do something else? [15:39] herbySk: megan: fo you really need 80? wouldn't 8080 or 8008 be enough? [15:39] polotek: rubydiamond: it doesn't matter what kind of data you send [15:39] Tim_Smart: megan: OK run as root, then drop privileges as soon as you are bound to the port. [15:39] megan: no herbysk, not for the web [15:39] polotek: megan: you should plan to put node behind a proxy anyway [15:39] herbySk: megan: I see [15:39] Aria: Yeah, drop privileges. [15:39] Tim_Smart: megan: http://nodejs.org/api.html#process-setuid-68 [15:39] Aria: Or, if you want, adjust your server to allow it without being root, if you're running Linux. [15:40] megan: well how does apache do it?? [15:40] Aria: Just like that. [15:40] megan: I want it to come up with the server [15:40] Aria: Well, THAT is controlled by a startup script. Usually SysV under linux, varies though. [15:40] Aria: Launchd on macos. [15:41] megan: I will put it in init.d [15:41] Aria: Usually that starts it as root, and the daemon itself setuids. [15:41] megan: that sounds like a good idea [15:41] Aria: (and fork, setsid, forks and setgid...) [15:42] megan: now to figure out how to get svn hooks to be able to restart the daemon [15:43] dylang has joined the channel [15:45] rubydiamond: 'Transfer-Encoding': 'chunked' ? is this right? [15:45] Aria: Interesting choice. [15:45] jashkenas has joined the channel [15:46] polotek: rubydiamond: write some test code, and if it doesn't work, post it here in a gist or pastebin so we can take a look [15:46] rubydiamond: http://shipitnode.heroku.com/ now supports chunked response [15:47] polotek: rubydiamond: ah, you were trying to stream it out as a data image [15:47] polotek: makes sense now [15:47] polotek: nice [15:50] pbunbun: Stupid question, but how do I tell if an object has an attribute, like if (commands.has("whatever")) returns true if commands["whatever"] exists and false otherwise? [15:51] jashkenas: pbunbun: that's actually an interesting question in JavaScript. [15:51] jashkenas: Usually, you can use "if (commands.whatever)" [15:51] jashkenas: But that will fail if the value of "whatever" is 0 or and empty string. [15:52] jashkenas: You can use "if ('whatever' in commands)" [15:52] jashkenas: But that will return true if "commands.whatever == null" [15:52] pbunbun: Ah, well commands only has objects, so either of those SHOULD work I think [15:52] pbunbun: TY [15:53] pbunbun: And if it has anything other than an object for some reason I don't want to know anyway :P [15:53] ker2x_ has joined the channel [15:53] jashkenas: pbunbun: no problem. It's the reason we have the existential operator in coffeescript: http://jashkenas.github.com/coffee-script/#existence [15:53] jashkenas: It's fine with most things, but deadly with numbers, because of zero. [15:56] Aria: That's one thing that I think Ruby got really right. [15:56] Aria: Also, confuses the hell out of people that 0 is true. [15:57] polotek: I think checking for false-y values is usually what you want 99% of the time [15:57] polotek: of if not then typeof or === fills the gap [15:57] jashkenas: polotek: absolutely, except if they can be 0 or "", or NaN, which should all be truthy. [15:58] Aria: Yeah, but it's often a pain. Ruby's consistent about it, and it works nicely. [15:58] jashkenas: only undefined and null and false should be falsy in JS. [15:58] Aria: (and it has functions that return number-or-null) [15:58] mu-hannibal has joined the channel [15:58] Aria: (And things that in other languages might return the count of something, instead they return the thing or null) [15:58] markwubben: mde: looking at your node-jake, doesn't really seem to support async tasks combined with dependencies? [15:58] herbySk: pbinbun: "whatever" in commands if you want take also inherited thisngs into account or commands.hasOwnProperty("whatever") then [16:00] polotek: jashkenas: I disagree. 0 is often considered "nothing" [16:00] polotek: and you can't do much with '' [16:00] steadicat has joined the channel [16:00] polotek: if you know you're dealing with numbers then you should be using logic operators [16:00] polotek: === < > etc [16:01] aliem has joined the channel [16:01] polotek: otherwise they are false-y [16:01] polotek: that makese sense to me [16:01] polotek: and usually saves me typing [16:01] jashkenas: polotek: glad you're comfortable with it. There's still a lack of a built-in operator that tells you if a variable "exists" ... meaning "has a value" or not. [16:01] polotek: which is what I assume Aria means by "a pain" [16:02] polotek: jashkenas: yes, that is typeof [16:02] herbySk: rubydiamond: I don't know what that page is trying to do, but it eats my CPU 100% fot a minut and then shows one img??? [16:02] polotek: typeof val != 'undefined' is exactly that [16:02] Aria: Yeah, though I definitely prefer Ruby's way. [16:02] jashkenas: Or null, which means "not a value". [16:02] polotek: it's more verbose sure [16:02] polotek: but how often does that even come up? [16:02] tisba_ has joined the channel [16:02] Aria: Heh. How often do you work with code you didn't write? [16:03] polotek: typeof null === 'object'; Yes some consider it a wtfjs but that's because they are thinking of typeof the wrong way IMO [16:03] polotek: yes the scheme is a little unintuitive, but it's consistent and it works for the vast majority of common cases [16:03] jashkenas: polotek: the check you want, to be clear, is: typeof x !== 'undefined' && x !== null right? [16:04] polotek: jashkenas: it really doesn't matter if you think about it [16:04] polotek: sure the identity operator is a tad bit faster [16:04] polotek: but typeof always returns a string [16:04] polotek: so you don't have to do any type conversions anyway [16:04] jashkenas: huh? what about null? [16:04] polotek: and nothing else can == 'undefined' accept for .. undefined [16:04] herbySk: what is the problem? x === / !== undefined, x !== / === null and x != / == null covers all cases you want to cover, don't they? [16:05] polotek: typeof null == 'object' [16:05] jashkenas: so how does that help you determine if it exists? [16:05] mu-hannibal has left the channel [16:06] polotek: jashkenas: what I'm saying is that if you're checking for "existence" meaning "is not undefined". then just do typeof x != 'undefined' [16:06] rubydiamond: herbySk: Sorry for that [16:06] polotek: even null will pass this check [16:06] rubydiamond: basically want to enable streaming [16:06] rubydiamond: hope I can do that [16:06] polotek: if you want "not undefined and not null" [16:06] polotek: then you need two checks [16:06] polotek: but that is the case everywhere [16:06] herbySk: polotek: x !== undefined does the same without typeof [16:07] polotek: herbySk: unless x isn't defined at all in the scope [16:07] polotek: then you get an error [16:07] polotek: if you know it's there then sure [16:07] herbySk: and you do not need two checks, x == null / x == undefined catch both values [16:08] jackish has joined the channel [16:08] herbySk: polotek: hm, I did not check if each scope has its own undefined... [16:08] jashkenas: I think this debate is a pretty good example of why there should be a built-in operator for it ;) The fact that there's disagreement about the correct way to check for the presence of a value is telling... no? [16:09] polotek: jashkenas: maybe. but what I'm saying is that it doesn't come up very often at all [16:09] polotek: I think two checks is good to be explicit [16:09] polotek: if you're actually checking for existence [16:09] jashkenas: polotek: it just did. someone asked the question. ... and I think two checks is good too, so that the variable doesn't even have to be defined: http://jashkenas.github.com/coffee-script/#existence [16:09] polotek: but usually you're just checking whether something truth-y is there [16:09] polotek: which works [16:09] jashkenas: yes. agreed. [16:10] polotek: jashkenas: okay I guess I get your point. it could be simplified [16:10] polotek: I admit I'm biased because ruby syntax bugs the crap outta me [16:11] jashkenas: Ruby isn't the best ... obj.nil? doesn't work on "undefined" local variables. [16:11] jashkenas: But does on instance variables... So it's a bit problematic. [16:11] polotek: see, nothing is perfect [16:12] felixge has joined the channel [16:13] yoni has joined the channel [16:13] shimondoodkin has joined the channel [16:14] blogometer has joined the channel [16:14] rubydiamond: is it possible to send base64 encoded string back as content type image/png ? [16:14] dylang_ has joined the channel [16:15] polotek: rubydiamond: no [16:15] saikat has joined the channel [16:15] rubydiamond: okay.. [16:16] rubydiamond: thanks [16:17] softdrink has joined the channel [16:17] shimondoodkin: rubydiamond: but you can send chanked mime with transfer encoding base64 + content type image/png [16:18] shimondoodkin: rubydiamond: (it was a guess answer, just a clue for you) [16:19] jacobolus has joined the channel [16:19] rubydiamond: shimondoodkin: trying :) thanks [16:21] rubydiamond: shimondoodkin: res.writeHead(200, {'Content-Type': 'image/png', 'Transfer-Encoding': 'base64'}) [16:21] rubydiamond: how to force it as chuncked ? [16:21] rubydiamond: chunked* [16:22] markwubben has joined the channel [16:23] mscdex: rubydiamond: if you don't specify a content-length it should be set to chunked encoding [16:23] rubydiamond: lol nice [16:23] mscdex: but if you know the content length of the image, it's probably better to set the content-length header [16:25] _announcer: Twitter: "Getting ready for my next #node.js toy project. We want to use #websockets and #socket.io to push images to several connected clients ..." -- pfleidi. http://twitter.com/pfleidi/status/21761065669 [16:26] pr0cy0n has left the channel [16:26] rubydiamond: shimondoodkin: it says "Transfer-Encoding: base64 " [16:26] rubydiamond: not 'chunked' [16:27] shimondoodkin: oh ok, thnaks [16:28] rubydiamond: shimondoodkin: any bug ? [16:28] rubydiamond: res.writeHead(200, {'Content-Type': 'image/png', 'Transfer-Encoding': 'base64'}) [16:28] shimondoodkin: i guess no [16:28] shimondoodkin: have you tried it? [16:28] rubydiamond: shimondoodkin: my browser just does not load anything [16:28] rubydiamond: shimondoodkin: yes [16:28] rnewson has joined the channel [16:28] rnewson has joined the channel [16:29] shimondoodkin: anyways i think it is probably best to decode it to best match browser competability [16:29] polotek: rubydiamond: I think that's the wrong syntax for Transfer-Encoding [16:29] _announcer: Twitter: "@pfleidi If you use a helping hand I'm also interested in #nodejs and I have some experience with #websockets..." -- Markus Knittig. http://twitter.com/mknittig/status/21761347145 [16:29] polotek: I think you have to do more but I'm not sure because the only one I ever use is just chunked [16:30] shimondoodkin: it might be : res.writeHead(200, {'Content-Type': 'image/png', 'Content-Transfer-Encoding': 'base64'}) [16:30] _announcer: Twitter: "@mknittig You could fork our (now emtpy) repository http://bit.ly/9NVZda #nodejs #websockets" -- pfleidi. http://twitter.com/pfleidi/status/21761446770 [16:31] polotek: rubydiamond: try Transfer-Encodng: base64 ; chunked [16:31] polotek: no that's not right either [16:31] polotek: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6 [16:32] rubydiamond: Transfer-Encodng: base64 ; chunked ? [16:32] rubydiamond: not right? [16:32] shimondoodkin: the correct header name probably is : 'Content-Transfer-Encoding' [16:33] rubydiamond: shimondoodkin: okay trying [16:33] nateanderson has joined the channel [16:33] shimondoodkin: il watch it in firebug what it accepts [16:33] felixge has joined the channel [16:33] felixge has joined the channel [16:34] polotek: "One is that [16:34] polotek: HTTP, unlike MIME, does not use Content-Transfer-Encoding, and [16:34] polotek: does use Transfer-Encoding and Content-Encoding." [16:35] rubydiamond: shimondoodkin: hmm [16:35] polotek: try Transfer-Encoding: chunked, Content-Encoding: base64 [16:35] rubydiamond: polotek: okay [16:36] shimondoodkin: polotek: humm [16:36] polotek: I know right? My http fu is still lacking [16:37] jakehow has joined the channel [16:38] MikhX has joined the channel [16:38] rubydiamond: polotek: browser does not show anything but curl shows this http://pastie.org/1106221 [16:39] polotek: rubydiamond: do you get the data without the -I ? [16:39] rubydiamond: polotek: yes, I get the data without -I [16:39] rubydiamond: but browser is not rendering it [16:40] polotek: are you trying to load it as the src of an image tag? [16:45] _announcer: Twitter: "Combination of #nodejs + #couchdb + #couchapp is pretty good!" -- Yohei Sasaki. http://twitter.com/yssk22/status/21762475952 [16:46] mscdex: i've never seen base64 encoding used in http, except for http auth stuff [16:47] mscdex: why are you wanting to send it base64 encoded anyway? [16:47] rubydiamond: mscdex: hax [16:47] mscdex: eh? [16:49] shimondoodkin: as i see it firefox supports only thouse: Accept-Encoding gzip,deflate , see this how it is done with headers, http://www.websiteoptimization.com/speed/tweak/compress/ [16:50] polotek: shimondoodkin: ah, yeah, accepts headers [16:50] femtoo has joined the channel [16:51] shimondoodkin: internet explorrer only supports also displaying of mhtml files [16:51] rubydiamond: mscdex: for hacking purpose [16:51] mscdex: :S [16:52] polotek: what's the module that lets you expect the heap memory? [16:52] polotek: or maybe it's a v8 thing [16:53] herbySk: felixge: do you know some values where the optimized multiplier is not giving the right values? [16:54] benburkert has joined the channel [16:56] rubydiamond: polotek: see this http://pastie.org/1106221 [16:57] rubydiamond: it does show [16:57] rubydiamond: Transfer-Encoding: chunked [16:57] rubydiamond: Content-Encoding: base64 [16:57] rubydiamond: but data it returns is base64 data encoded only [16:57] polotek: rubydiamond: I believe you. I just think browsers don't generally accept lots of different encodings [16:57] rubydiamond: I think data should automatically get decoded [16:59] jakehow has joined the channel [16:59] rubydiamond: shimondoodkin: any idea about http://pastie.org/1106221 [17:00] shimondoodkin: not yet iam stil researching it alittle bit [17:00] shimondoodkin: in general i think that browsers do not support many encodings [17:05] shimondoodkin: rubydiamond: ok, its not possible , it might work specific of a certian browser, https://developer.mozilla.org/en/How_Mozilla_determines_MIME_Types , for ecxample in mozila there is unknown decoder in tother browser might be another bug [17:06] shimondoodkin: you might try image/gif;base64 http://www.sweeting.org/mark/blog/2005/07/12/base64-encoded-images-embedded-in-html [17:07] _announcer: Twitter: "Countdown to Knockout: Post 6 - Node.js and MongoDB http://post.ly/t19M" -- Gerad Suyderhoud. http://twitter.com/gerad/status/21763988628 [17:08] polotek: shimondoodkin: actually he already pulled that off. works well. [17:11] shimondoodkin: polotek: do rubydiamond succeed? [17:12] rubydiamond: shimondoodkin: nope [17:12] polotek: I mean rubydiamond already has the embedded base64 image working [17:12] rubydiamond: I am now trying to [17:12] rubydiamond: var fs = require('fs') [17:12] rubydiamond: var shipitnode = fs.read('shipitnode.png'); [17:12] rubydiamond: but that is not working [17:12] shimondoodkin: i ment maybe the same mime of embeding images might work with http [17:13] rubydiamond: buffer = new Buffer(length); bad argument error [17:13] polotek: rubydiamond: fs.read is asynchronous [17:13] polotek: you need callbacks [17:13] polotek: you should probably do fs.createReadStream instead [17:13] polotek: it's a little nicer to work with [17:14] jacobolus has joined the channel [17:15] joshbuddy has joined the channel [17:15] joshbuddy has joined the channel [17:15] shimondoodkin: today i want to develop a a pango- [17:15] rubydiamond: polotek: okay [17:15] shimondoodkin: cairo basic exctenion [17:16] shimondoodkin: is there already something like this? [17:16] shimondoodkin: except the iamgemagistick [17:16] shimondoodkin: which is bas with international text [17:18] rubydiamond: polotek: what is problem here http://pastie.org/1106264 [17:18] rubydiamond: it does not show my image [17:18] shimondoodkin: also i have an idea to use py++ or gcc-to-xml to create half automatic binding generation [17:19] JimBastard has joined the channel [17:19] JimBastard: its node.js time! yaaaaaa [17:19] polotek: fs.readFile is async [17:19] polotek: you are calling res.end() before shiptinode comes back [17:19] programble has joined the channel [17:19] rubydiamond: polotek: hmm [17:20] polotek: just move res.end inside your readFile callback [17:20] shimondoodkin: rubydiamond, also you might want to remove the 'Transfer-Encoding': 'chunked' [17:20] polotek: rubydiamond: also do res.setEncoding('utf8') [17:20] polotek: actually [17:21] polotek: yes, do that since you are writing a string to it [17:21] _announcer: Twitter: "Step by step instructions to install NodeJS on Windows http://is.gd/eubRB <- using Cygwin and node.js v 0.2.0" -- Hernan Garcia. http://twitter.com/theprogrammer/status/21764822803 [17:21] _announcer: Twitter: "@ Ba78 node.js good in this, but first you should learn to think about asynchronous:)" [hu] -- deejayyhu. http://twitter.com/deejayyhu/status/21764824550 [17:21] shimondoodkin: polotek: i think if you dont set it it comes back as buffer whitch is faster [17:21] shimondoodkin: you can stream.write(buffer) [17:21] blogometer has joined the channel [17:21] polotek: shimondoodkin: yeah you're right, readFile comes back as a buffer [17:22] polotek: rubydiamond: so don't bother with setEncoding [17:22] rubydiamond: TypeError: Object # has no method 'setEncoding' [17:22] rubydiamond: okay [17:22] polotek: hmm, interesting [17:22] shimondoodkin: hehe, i had this too some days ago [17:22] polotek: it bothers me when some parts of http don't follow the stream api [17:23] shimondoodkin: i guess it is of a readstream [17:23] rubydiamond: polotek: done [17:23] rubydiamond: :) [17:23] polotek: yeah, I was just looking it up [17:23] rubydiamond: now will shit it [17:23] polotek: readStream has setEncoding [17:24] jackish has joined the channel [17:24] polotek: writeStream has stream.write(data, encoding) [17:24] polotek: it should really be on both [17:24] rubydiamond: :) [17:25] mu-hannibal has joined the channel [17:25] rubydiamond: also now I want to server my image when request is '/imagename.png' [17:25] rubydiamond: and for "/" I want to server html page [17:26] Yuffster has joined the channel [17:26] rubydiamond: see streaming live here [17:26] rubydiamond: http://shipitnode.heroku.com/ [17:26] rubydiamond: streaming for real [17:27] jakehow has joined the channel [17:27] rubydiamond: it looks quite cool [17:27] rubydiamond: like I am living in 90's [17:27] shimondoodkin: there is also anotehr trange of read stream is that it creates a stream decoder and you cant unset it with documented api [17:28] rubydiamond: shimondoodkin: can I stream it downside up [17:28] polotek: shimondoodkin: the stream decoder is necessary is most cases [17:28] polotek: because you're expecting multi byte data [17:29] polotek: but there's no guarantee the tcp stream won't break in the middle of a multi byte char [17:29] polotek: that's what the stream decoder does, it handles that case and waits for the rest of the char [17:29] sudoer has joined the channel [17:29] polotek: doesn't add much overhead [17:30] shimondoodkin: polotek: hummm(about waits for two chars) [17:31] shimondoodkin: polotek: i have found a useful way of not useing stream decoder: buffer is good for binnary data , a buffer is automaticaly converteed to utf 8 when it is converted to string, if i use buffer it is good for utf98 and binary data [17:32] polotek: shimondoodkin: that's not what I'm saying. it doesn't need to be converted. you need to make sure that you don't end up with two buffers and a multibyte character is split between them [17:32] rubydiamond: polotek, shimondoodkin chrome streams image correctly.. firefox shows it's name [17:32] rubydiamond: it downloads it fully then shows it [17:32] rubydiamond: that's quite wrong with FF [17:33] rubydiamond: polotek, shimondoodkin Can I stream image from it's downside [17:33] polotek: ru it streams for me on FF too [17:33] polotek: 3.6 on mac os x [17:33] rubydiamond: hmm I am running 4.0beta [17:35] rubydiamond: polotek: btw what is the default behaviour [17:35] sudoer has joined the channel [17:35] rubydiamond: I am assuming that streaming images is not default behavior is other frameworks [17:36] _announcer: Twitter: "http://tinyurl.com/24sjse7 NodeJS Tutorial with CouchDB and Haml – ErdNodeFlips" -- catch_fish. http://twitter.com/catch_fish/status/21765796664 [17:36] polotek: rubydiamond: depends [17:36] brucespang has joined the channel [17:36] polotek: most frameworks don't recommend serving static images through them [17:37] polotek: you use something linke nginx for that [17:37] davidwalsh has joined the channel [17:37] rubydiamond: polotek: that's right [17:37] polotek: node is actually pretty decent at serving static images though. [17:37] rubydiamond: polotek: can I stream image chunks by chunks randomly (not from upside down) [17:39] polotek: rubydiamond: yes [17:39] rubydiamond: polotek: hmm how ? [17:39] polotek: you can write anything you want to the response [17:39] polotek: res.write(data) [17:39] polotek: you can call it multiple times [17:40] polotek: the response doesn't end until you call res.end() [17:41] rubydiamond: polotek: cool [17:41] rwaldron has joined the channel [17:41] rubydiamond: how do I assure suppose all corners are rendered first [17:41] rubydiamond: then center [17:41] rubydiamond: then other data [17:41] mu-hannibal has joined the channel [17:42] rwaldron has joined the channel [17:42] maushu has joined the channel [17:43] polotek: rubydiamond: you can't render an image like that [17:43] rubydiamond: :) [17:43] jashkenas has left the channel [17:43] polotek: rubydiamond: maybe you could use a canvas [17:44] rubydiamond: polotek: no .. i just want to take full advantage of http [17:44] rubydiamond: :) [17:44] rubydiamond: polotek: see this site http://blog.evanweaver.com/ [17:44] rubydiamond: see how image got rendered on it [17:44] rubydiamond: love it [17:45] gerad has joined the channel [17:46] polotek: rubydiamond: looks like it's usually multiple http elements loading multiple images [17:46] _announcer: Twitter: "I see the amazing Seesmic Desktop 2 Beta also ate the first Tweet... "Time to finally try out #nodejs http://nodejs.org" #uninstall" -- Tom Dancer. http://twitter.com/tdous/status/21766426297 [17:46] rubydiamond: polotek: hmm [17:47] polotek: http://blog.evanweaver.com/images/leaves_top_left.gif [17:47] polotek: http://blog.evanweaver.com/images/leaves_bottom_right.gif [17:47] rubydiamond: you are right [17:47] rubydiamond: yeah [17:47] polotek: wow, colloquy dropped those into my window. that sucks [17:48] rubydiamond: it's beauty though [17:48] mechanate has joined the channel [17:48] rubydiamond: I can see here in limechat too [17:48] gerad_ has joined the channel [17:49] rubydiamond: I hope I could render shipitnode image using socket.io and tweak it to render corners first then center then rest [17:51] rwaldron_ has joined the channel [17:52] brucespang has joined the channel [17:52] rubydiamond: polotek: can you tell me how http://shipitnode.heroku.com/ uses node.js and is good compared to other web frameworks [17:52] rubydiamond: what is awesome thing done by node.js here [17:53] rubydiamond: is it just streaming or more? [17:55] schwa23 has joined the channel [17:56] brucespang has joined the channel [17:56] rubydiamond: polotek: unfortunately app automatically broke http://shipitnode.heroku.com/ [17:56] sveimac has joined the channel [17:57] rubydiamond: throw new Error("This type of response MUST NOT have a body."); [18:02] [[zz]] has joined the channel [18:02] rubydiamond: shimondoodkin: you there? [18:03] shimondoodkin: is anyone here?yes [18:03] shimondoodkin: yes [18:03] ajpiano has joined the channel [18:03] shimondoodkin: s/is anyone here?yes/yes [18:04] shimondoodkin: rubydiamond:is it should be slow? [18:04] rubydiamond: shimondoodkin: http://pastie.org/1106348 look at response [18:04] rubydiamond: there is no chunked there [18:05] shimondoodkin: yes it chould noy be here [18:05] rubydiamond: does it mean nginx is making it non-chunked [18:05] ceej has joined the channel [18:05] shimondoodkin: maybe [18:05] rubydiamond: shimondoodkin: how? [18:05] shimondoodkin: there are two reverse proxies there [18:05] shimondoodkin: varnish and nginx [18:05] MikhX has joined the channel [18:05] rubydiamond: okay.. on browser it looks like it's streaming .. but I am doubful [18:06] rubydiamond: doubtful* [18:06] shimondoodkin: it is not [18:06] saikat has joined the channel [18:06] rubydiamond: shimondoodkin: it is not streaming ? [18:07] shimondoodkin: actualy it might be bercause nginx is event based with small memory foot print so it might be that it translates as it comes [18:07] visnup has joined the channel [18:07] shimondoodkin: what doy want to do, (why streaming is importent to you?) [18:07] polotek: rubydiamond: varnish is a cache proxy [18:07] rubydiamond: shimondoodkin: just for proof of concept [18:07] polotek: it has the whole response in memory [18:07] shimondoodkin: of what? [18:08] polotek: so it can set a content-length header and serve the whole thing [18:08] shimondoodkin: of sending an image? [18:08] polotek: streaming is really only important if you don't know the size of the data yet [18:08] polotek: rubydiamond: or if the data is very large and you don't want to read it all into memory [18:08] rubydiamond: so looks like it's not streaming [18:09] shimondoodkin: yes it is just sending as usual [18:09] rubydiamond: :( [18:09] shimondoodkin: you canty stream behind nginx [18:10] rubydiamond: whole point of [18:10] shimondoodkin: ngix is simle http1.0 [18:10] shimondoodkin: nginx does for you http1.1 and keep alive [18:11] steadicat has joined the channel [18:11] rubydiamond: shimondoodkin: does that mean streaming? [18:11] shimondoodkin: the idea of streaming is keeping connection conneced [18:12] mu-hannibal has joined the channel [18:12] _announcer: Twitter: "Node.js experts: lots of beginner questions on the #node.js irc channel before @node_knockout. Could use your help answering!" -- node knockout. http://twitter.com/node_knockout/status/21767985033 [18:12] rubydiamond: Connection: keep-alive is kinda common [18:12] shimondoodkin: because it takes time to setup a connection from the other side of the world it is like a seconds an a half [18:12] shimondoodkin: so you keep connection alive [18:13] shimondoodkin: also you might want two way connection [18:13] qschzt has joined the channel [18:13] shimondoodkin: and so you have fast two way communication [18:13] chrischris has joined the channel [18:13] shimondoodkin: because you do not reconnect every time [18:14] shimondoodkin: keep alive is like streaming [18:14] shimondoodkin: but it is one way streaming [18:14] rubydiamond: hmm [18:14] polotek: keep alive is not the same as streaing [18:14] polotek: nginx does chunked encoding [18:14] rubydiamond: that's the take [18:14] polotek: it doesn't do keep alive [18:15] rubydiamond: polotek: http://pastie.org/1106348 look at response [18:15] polotek: it is either some setting in nginx that's keep it from sending chunked [18:15] polotek: or it is varnish [18:15] polotek: as I mentioned before [18:15] polotek: varnish sits in front of your server and caches the entire response [18:15] polotek: it might also be setting the content-length and not bothering to stream it because it's already in memory [18:16] qschzt has left the channel [18:17] polotek: rubydiamond you should check the heroku docs and see [18:17] polotek: what's happening with varnish [18:17] polotek: from what I've heard [18:17] polotek: if nginx receives an http 1.1 keep alive request [18:17] polotek: it will just downgrade it to a normal one way http 1.0 request [18:18] shimondoodkin: yes nginx , comunicates with your application as http1.0 with the user it comunicates http1.1 [18:18] rubydiamond: I think i should explicitly set "Transfer-Encoding: chunked" [18:18] rubydiamond: that would make response as chunked [18:19] shimondoodkin: you should dont cear about it ad let the server choose the corect transfer method [18:19] rubydiamond: oh I have already done that [18:19] rubydiamond: it's there (Transfer-Encoding: chunked) [18:19] rubydiamond: varnish is overriding I think.. [18:19] shimondoodkin: maybe varnish is in front [18:20] shimondoodkin: waht varnish does as i understand is when you put expiers headers it blockes access to your application until it expiers [18:21] shimondoodkin: and varnish serves the file instead [18:21] jacobolus has joined the channel [18:23] gryzzly_ has joined the channel [18:23] gryzzly_: hi, should I use kiwi or npm for package management? [18:23] rubydiamond: npm [18:23] rubydiamond: that I use [18:25] gryzzly_: :-) [18:25] gryzzly_: is there any difference? couldn't google anything on the subject [18:25] gryzzly_: they are both being mentioned in tutorials on node [18:25] mscdex: kiwi has been deprecated [18:25] gryzzly_: oh, thanks [18:26] gryzzly_: :( their git page doesn't suggest that [18:26] gryzzly_: i'll use npm then [18:26] mscdex: there was an announcement on the mailing list some time back [18:26] mscdex: ACTION shrugs [18:28] pgriess has joined the channel [18:28] luddep_ has joined the channel [18:29] mu-hannibal has joined the channel [18:29] gryzzly_: it actually reads: NOTE: kiwi is no longer actively developed, however it will remain available until november 2010. [18:29] gryzzly_: so sorry for not noticing this [18:32] polotek: anybody know the proper way to pass v8 handles around as void pointers? [18:34] matt_c has joined the channel [18:34] MikhX has joined the channel [18:34] rubydiamond: TypeError: Cannot read property 'path' of undefined [18:34] rubydiamond: for switch (req.uri.path) { [18:35] mu-hannibal has joined the channel [18:35] voxpelli has joined the channel [18:36] rubydiamond: lol it says req is undefined [18:36] rubydiamond: polotek: you there? [18:37] rubydiamond: for var server = http.createServer(function (req, res) { [18:37] rubydiamond: it say's req is undefined when I dod " sys.puts(req.inspect)" [18:39] DriverDan has joined the channel [18:39] polotek: rubydiamond: need more context than that [18:39] rubydiamond: polotek: ok [18:39] polotek: also [18:39] polotek: req.url is the url propery. it's a string and you have to parse it yourself [18:39] polotek: use require('querystring') [18:39] rubydiamond: polotek: http://pastie.org/1106392 [18:40] luddep has joined the channel [18:40] bsstoner has joined the channel [18:43] mertimor has joined the channel [18:43] rubydiamond: polotek: is there anything wrong in code? [18:44] polotek: rubydiamond: you don't have to do parseInt on port [18:44] polotek: and like i said req.url not req.uri [18:44] polotek: I have no idea what req.inspect is [18:45] polotek: you are probably looking sys.puts(sys.inspect(req)) [18:45] polotek: or you can do it the easy way [18:45] polotek: console.log(req) [18:46] polotek: rubydiamond: check out the querystring module in the docs for parsing req.url [18:47] rubydiamond: polotek: hmm [18:47] _announcer: Twitter: "@node_knockout hey I joined to the channel and nobody was there , I tried #node.js #nodejs" -- alejandro. http://twitter.com/ramonlechuga/status/21769995982 [18:47] rubydiamond: okay [18:48] shimondoodkin: polotek: did you used some good examples for c++ node modules? [18:48] polotek: shimondoodkin: what do you mean? [18:48] shimondoodkin: i want to develop a c module for v8 for node, i never did it [18:49] stepheneb has joined the channel [18:49] mtodd has joined the channel [18:49] stepheneb has joined the channel [18:49] shimondoodkin: you asked a question like you already did some c++ modeules, you maybe you pass over some example that is a good to understand how to do bindings for node [18:50] polotek: shimondoodkin: It's defiinitely non trivial [18:50] polotek: you have to learn the v8 api [18:51] polotek: http://code.google.com/apis/v8/embed.html [18:51] ramonlechuga has joined the channel [18:51] shimondoodkin: there are v8 proxy/juce [18:51] polotek: you can start there [18:51] shimondoodkin: is it the same with node? [18:51] polotek: shimondoodkin: I'm pretty sure you can use one of those with a node addon [18:51] polotek: but I don't know anyone who has tried [18:52] shimondoodkin: thanks ill read the api it is probably the correct start point [18:52] polotek: C++ frameworks are somewhat frowned upon :) [18:52] polotek: shimondoodkin: also check out http://github.com/isaacs/node-glob [18:52] polotek: I think it's a pretty straight forward addon [18:52] polotek: without being too trivial [18:53] polotek: there is also http://github.com/polotek/libxmljs [18:53] polotek: which I maintain [18:53] polotek: but it is moderately complex [18:53] polotek: not really good for learning [18:54] polotek: also http://github.com/ry/node_postgres [18:54] polotek: also pretty simple [18:54] codetonowhere has joined the channel [18:54] icozzo has joined the channel [18:55] shimondoodkin: thanks it is already more then i able to read [18:56] Aria has joined the channel [18:57] rubydiamond: shimondoodkin, polotek for what you use node.js do you guys have any work flow / use case for using it as everyday purpose [18:57] ramonlechuga: Hello, I already installed node.js, I tried the hello world and it works .. but I don't any I Idea what else to do, does anyone here knows a good guide for beginners? [18:58] rubydiamond: here is updated version of http://shipitnode.heroku.com/ [18:58] robotarmy has joined the channel [18:58] shimondoodkin: what app do you want to create? [18:58] Aria: rubydiamond: I'm writing a spam filter SMTP daemon. [18:58] Aria: rubydiamond: And I'm writing a filtering and HTML-reparsing proxy that will eventually run greasemonkey scripts. [18:58] shimondoodkin: i am writing a super fast scalable website [18:58] JimBastard: ship it squirrel [18:58] blogometer has joined the channel [18:59] blogometer: Mongo DB: Love it or hate it? [18:59] shimondoodkin: you will hate no sql there are no joins (LOL) [19:00] Aria: Sure there are. You just have to DIY, preferably in a batch, in advance. [19:01] rubydiamond: Aria, shimondoodkin cool [19:01] shimondoodkin: i have a guy that helps me he as a begginer like 3 years in programming , and he finds it hard that there are no joins [19:01] Aria: Well, yeah, it's different. But instead you have structured documents, which is often what people use joins for. [19:01] rubydiamond: omg no joins is no sql ? [19:01] shimondoodkin: rubydiamond: you can do real time colaboration one page apps in node js [19:01] JimBastard: rubydiamond: you can do relationships in nosql [19:01] JimBastard: why not [19:02] rubydiamond: http://search.twitter.com/search?q=shipitnode is not not showing anything yet .. come on guys .. show some love [19:02] rubydiamond: shimondoodkin: actually I have an idea in mind about real time collaboration app with node.js [19:03] rubydiamond: but I heard that it requires a hard algorithm to know about real time collaboration [19:03] gryzzly_: guys, i'm really new to node. how can I get the express within app.js, that is located here: '~/nodecode/blog/app.js' if I installed express with npm? [19:04] shimondoodkin: JimBastard> why not [19:04] shimondoodkin: [22:01] http://search.twitter.com/search?q=shipitnode is not not showing anything yet .. come on guys .. show some love [19:04] shimondoodkin: oops [19:04] gryzzly_: is there a way to do like var npm = require('npm'); [19:04] rubydiamond: what was that [19:04] gryzzly_: and then somehow to ask npm about express's location [19:04] shimondoodkin: i tried to copy the name of JimBastard [19:05] shimondoodkin: JimBastard: can you show me how to do join in mongo db in a one query [19:05] mattly has joined the channel [19:05] polotek: gryzzly_: npm puts your modules on your require path [19:05] polotek: you should just be able to do require("express") [19:07] mau has joined the channel [19:08] cjm has joined the channel [19:09] shimondoodkin: JimBastard: i have searched a whole day and decided that it is imposible to do joins in mongodb and i have to do them in code [19:09] gryzzly_: @polotek thanks! [19:09] cjm: He [19:09] cjm: hey [19:10] JimBastard: shimondoodkin: sure, the tutorial is up @ http://couch.io [19:10] cjm: I'm having issues building node.js on a mac os x [19:10] JimBastard: shimondoodkin: but i gotta assume mongo has that query thingy, surely it can join collections [19:11] shimondoodkin: JimBastard: i dont understand what do you mean [19:12] JimBastard: me neither man, sorry. i dont really use mongo [19:12] shimondoodkin: JimBastard: is couch is good? [19:12] brucespang has joined the channel [19:12] JimBastard: shimondoodkin: we are using it on our production stack @ nodejitsu [19:12] cjm: When I run ./configure [19:12] JimBastard: and the support has been great [19:13] JimBastard: mikeal is one of the core couch guys too, hes usually aruond [19:13] cjm: I'm told I need library dl, execifo, openssl, ... [19:13] JimBastard: around* [19:13] cjm: what is dl? [19:13] JimBastard: it depends what you need to do shimondoodkin , there are many database solutions [19:13] polotek: cjm: do you have XCode installed? [19:13] polotek: you need it [19:13] blogometer: Okay. So, I'm hearing you say good, sensible things about Mongo DB. Thank you. [19:14] shimondoodkin: i need fast retrivel of large lists [19:14] blogometer: Thank you: JimBastard, Aria. [19:14] polotek: You definitely can't do joins across collections in mongo [19:14] cjm: I don't [19:14] cjm: by I have openssl [19:14] cjm: and It can't find it [19:14] polotek: within a collection you can simulate a join by doing a map function [19:15] JimBastard: polotek: server-side right? [19:15] JimBastard: err, database side? [19:15] shimondoodkin: how to do map function to do joins, map recuse seems to me only inside a collection [19:15] polotek: JimBastard: yeah you can write the function in js and send it to mongo to execute [19:15] polotek: shimondoodkin: yeah that's what I said, not across collections [19:15] JimBastard: exactly [19:15] JimBastard: map/reduce [19:15] benburkert has joined the channel [19:15] polotek: shimondoodkin: but there's not reason not to have all your objects in one collection [19:16] polotek: mongodb is schemaless [19:16] polotek: it doesn't matter what you put it in it [19:16] JimBastard: http://browsertoolkit.com/fault-tolerance.png [19:16] JimBastard: i think that sums it up [19:16] shimondoodkin: it would nece to have expanded mongo ids [19:16] badaxx has joined the channel [19:16] polotek: JimBastard: lol, yeah I've seen that [19:16] polotek: awesome [19:17] polotek: shimondoodkin: how do you mean? [19:17] badaxx: hello, I've got a problem with mysql / node-mysql. when I do the first query with client.query(...) it works fine but on the second query i get the folowing error: http://pastebin.com/bYXZTB5k [19:18] badaxx: i'm using the same mysql.Client instance for both queries [19:18] benburkert: does npm work with node 0.2.0? [19:19] shimondoodkin: i have collection with references like {_id:objectid(213123fgsda),name:"asdfas",sub_object:objectid('asdfasdf')} i would be happy to have the sub object expanded to its value from other collection of sub objects [19:19] benburkert: i've been following this websockets post here and i can't require the websockets-server module: http://static.brandedcode.com/nws-docs/ [19:19] mscdex: badaxx: already been reported: http://github.com/felixge/node-mysql/issues#issue/1 [19:19] polotek: shimondoodkin: I see you've been editing the readme for libxmljs [19:19] polotek: you wanna check out the new wiki [19:19] polotek: http://github.com/polotek/libxmljs/wiki [19:20] badaxx: mscdex: ouch... [19:20] polotek: shimondoodkin: you can next objects in mongodb [19:20] polotek: nest* [19:20] polotek: put your subobjects directly inside [19:20] badaxx: what about this one, any experiences with that? http://github.com/masuidrive/node-mysql [19:20] polotek: you can still query them [19:21] mscdex: badaxx: not in awhile, no [19:21] dnolen has joined the channel [19:21] mscdex: badaxx: i don't believe it is maintained anymore [19:21] cjm has left the channel [19:22] badaxx: any other mysql modules for node? :( [19:22] benburkert: how does node/npm manage the load path? is there something i can inspect? [19:23] shimondoodkin: polotek: i saw the wiki :) [19:23] gerad has joined the channel [19:23] polotek: shimondoodkin: let me know your feedback [19:23] mscdex: badaxx: you can give this one a try: http://github.com/sidorares/nodejs-mysql-native [19:24] polotek: this is going to replace the other site this week [19:24] badaxx: think I'm gonna fix that bug myself [19:24] shimondoodkin: its awsome [19:24] shimondoodkin: polotek: it is awsaome i whish i had it when i had stqarted [19:24] polotek: badaxx: yeah I believe mysql-native has also been updated recently [19:24] micheil: benburkert: problem? [19:25] badaxx: can i do asynchronous queries with it? [19:25] micheil: ACTION is the developer. [19:25] pbunbun: Hmmm. [19:25] pbunbun: I have "var quoteFile = fs.createReadStream(filename);" [19:25] gerad_ has joined the channel [19:25] gerad has joined the channel [19:25] pbunbun: I'm trying to do quoteFile.addListener("end", function() {quoteFile.destroy()}); [19:25] polotek: badaxx: yes, I believe that was the recent update [19:25] micheil: benburkert: also, those docs won't work for anything anyone currently has [19:25] pbunbun: But getting Error: EBADF, Bad file descriptor [19:26] polotek: it uses the node async io thread pool to take things out of band [19:26] benburkert: micheil: hi, i'm trying to understand why require('websocket-server') is failing after i've run 'npm install websocket-server' [19:26] micheil: benburkert: they target a currently unrelease version, and I'm surprised someone's linked you to them [19:26] mscdex: badaxx: i think your problem is that you're ending the connection before the queries can take place [19:26] micheil: benburkert: it shouldn't be failing. [19:26] badaxx: mscdex: no, the connections are still open [19:26] mscdex: badaxx: paste your code? [19:27] badaxx: compile coffeescript or coffeescript? [19:27] polotek: benburkert: did you install anything through homebrew? [19:27] polotek: people have been having problems with node + homebrew + npm lately [19:27] mscdex: badaxx: eh.. javascript? :-) [19:27] benburkert: micheil: yeah, i think my homebrew setup might be a bit off, is there someway of printing out the module path? [19:27] micheil: umm.. require.paths [19:27] polotek: benburkert head into the node repl and type [19:27] polotek: yep require.paths [19:27] polotek: that shows the module load path [19:28] polotek: I haven't seen a fix for the homebrew issue yet [19:28] dylang has joined the channel [19:28] polotek: but a workaround is to exlicitly set your $NODE_PATH env variable [19:28] badaxx: mscdex: http://pastebin.com/4SU1kgTn << JavaScript, http://pastebin.com/g1LYwiTi << CoffeeScript [19:28] polotek: to /usr/local/lib/node [19:28] micheil: benburkert: at any rate, that documentation won't help you much, as it's for a newer version of the server, iirc. [19:28] rubydiamond: polotek: is there any simple tutorial / link / video explaining socket.io functionality [19:28] badaxx: mscdex: getConfig is called before getServerInfoById. So the getServerInfoById query fails [19:28] polotek: rubydiamond: never used socket.io [19:29] rubydiamond: ok [19:29] marek_z has joined the channel [19:30] benburkert: ahh, ok: http://pastie.org/private/q7h2pdzvmfloje0pm2w [19:30] ajpiano has joined the channel [19:31] benburkert: polotek: so i should set $NODE_PATH to ~/Developer/lib/node? http://pastie.org/private/alfojl3ho7hupaxlowjxw [19:31] mscdex: badaxx: do you have the sample code that uses the functions you showed? [19:33] badaxx: mscdex: sample code? from node-mysql? [19:34] polotek: benburkert: if you run npm config get root [19:34] polotek: it will tell you where npm is putting your modules [19:34] mscdex: badaxx: how are you using the code you showed? I don't see anything that calls those get* functions [19:34] polotek: set your NODE_PATH to that [19:34] benburkert: polotek, micheil: awesome, thanks for the help guys: http://pastie.org/private/b32ws5bhkhomu7yfl5i0w [19:34] badaxx: mscdex: ah one second [19:34] mAritz: fictorial: does redis-node-client support multi/exec? [19:35] badaxx: mscdex: http://pastebin.com/tQQ2taJT [19:35] badaxx: mscdex: http://pastebin.com/0dk9wUsq << js version [19:38] blogometer: mscdex: You all get my patch yet? [19:38] blogometer: ACTION Taps feet. [19:38] mscdex: blogometer: huh? [19:39] blogometer: Grr... [19:39] blogometer: http://github.com/bigeasy/node-mysql [19:39] blogometer: ACTION Cross arms taps feet faster. [19:39] mscdex: blogometer: i told you yesterday i am not the developer [19:39] mscdex: i don't even have a fork [19:39] blogometer: Oh, well. [19:39] mscdex: :S [19:40] isaacs has joined the channel [19:40] mephux has left the channel [19:40] joshbuddy has joined the channel [19:40] mscdex: blogometer: felixge is the man you want [19:40] blogometer: I was too lazy to write a test. [19:41] blogometer: I'm sure he'll get to it. [19:41] twoism has joined the channel [19:41] mscdex: badaxx: i think the problem is you are expecting the get* functions to be synchronous [19:42] blogometer: mscdex: Can you recommend a Javascript style guide? [19:42] mscdex: blogometer: sure: no comma first and end statements with a semi-colon [19:42] mscdex: blogometer: :p [19:43] pbunbun: If I do: var test = require("./test"), then later on delete test [19:43] pbunbun: And do var test = require("./test") [19:44] pbunbun: It doesn't seem to reload the file [19:44] pbunbun: It just provides it as it was at the beginning? [19:44] mscdex: badaxx: consider having getConfig call getServerInfoById inside getConfig's callback [19:44] shimondoodkin: pbunbun: it has cache [19:44] mscdex: badaxx: and then just only call getConfig in your main program there [19:45] shimondoodkin: pbunbun: this might give you sort of a solution http://github.com/shimondoodkin/node-hot-reload [19:45] mscdex: badaxx: it's still not synchronous, but it will execute them one after the other [19:45] pbunbun: Ah ty [19:46] mscdex: badaxx: ideally you would pass in a callback to getConfig that gets executed when the results come in, so you know when to continue [19:46] rnewson has joined the channel [19:46] rnewson has joined the channel [19:47] siculars has joined the channel [19:53] _announcer: Twitter: "Node.js: JavaScript on the Server http://bit.ly/cvd2Sr" -- Lyla Leibowitz. http://twitter.com/LylaLeibowitz/status/21773617441 [19:55] probablyCorey has joined the channel [20:01] saikat has joined the channel [20:04] voodootikigod has joined the channel [20:06] sephr has joined the channel [20:06] nerdEd has joined the channel [20:06] sephr: Does anyone here have a burning desire to be able to use E4X in node.js? [20:07] derferman has joined the channel [20:07] inimino: ACTION hates E4X [20:07] shimondoodkin: i dont know the need for e4x [20:07] shimondoodkin: seems like a simple xml parses does the solution [20:08] sephr: JavaScript lacks multi-line strings, which E4X makes up with [20:08] sephr: and inline logic is nice [20:08] sephr: though php-y [20:09] mmetzger has joined the channel [20:10] Aria: I'd love E4X, though even more, I'd love E4HTML [20:11] sephr: Aria: please elaborate [20:11] sephr: what'd E4HTML be that E4X isn't? [20:11] shimondoodkin: i dont like it i prefer normal strings [20:11] Aria: HTML not XML. [20:11] Aria: They /are/ different languages. [20:11] ramonlechuga has joined the channel [20:12] sephr: yes, but why would you want to use HTML instead of XML in a programming language? [20:12] sephr: XML is messy enough as is [20:15] Throlkim_ has joined the channel [20:15] polotek: sephr: I think what he means is being able to get a decent e4x structure from potentially crappy html [20:15] polotek: needs to have a good parser [20:16] polotek: also things like singleton attributes and stuff [20:16] polotek: html is different from well-formed xml [20:16] polotek: unary attributes? is that the appropriate phrasing? [20:16] jamescarr_ has joined the channel [20:17] polotek: anyway, I like e4x too. [20:17] polotek: if you're just building up a string to output, maybe you don't need it [20:17] rubydiamond: ping [20:17] polotek: but if you have to do processing and manipulation, having an object with a decent api is nice [20:19] softdrink has joined the channel [20:19] drudge: when trying to compile node on OSX, it tells me openssl is not found but SSL_library_init and openssl/crypto.h are found. is this normal? [20:19] drudge: http://pastie.org/1106521 [20:20] shimondoodkin: yes [20:20] shimondoodkin: configure' finished successfully (5.116s) [20:22] sephr: polotek: you can already convert malformed HTML to E4X using the DOM [20:23] mscdex: drudge: yes, the openssl line is if you have pkgconfig installed [20:23] sephr: but why you would want to do that on the server side, where you're writing the XHTML to begin with, is beyond me [20:23] badaxx: mscdex: okay that works fine for the first request to the http server [20:23] mscdex: drudge: if the other lines show yes, then you're fine [20:23] badaxx: mscdex: but on the second request I've got the same error [20:23] drudge: mscdex: i thought so but i'm having odd ssl issues with http.Client [20:23] mscdex: badaxx: code? [20:23] mscdex: drudge: like? [20:24] drudge: net:992 this.secureStream.close(); [20:24] drudge: TypeError: Cannot call method 'close' of undefined [20:24] badaxx: mscdex: http://pastebin.com/z7DFYydw [20:25] mscdex: drudge: gist the code you're using [20:25] _announcer: Twitter: "brequire, commonjs loader in browser, simple and clean. excelent to share between node.js and web browsers http://github.com/weepy/brequire" -- Jerome Etienne. http://twitter.com/jerome_etienne/status/21775238182 [20:25] badaxx: mscdex: http://pastebin.com/py85cES3 the get* functions [20:25] drudge: mscdex: moment i'm trying something [20:25] hellp has joined the channel [20:25] polotek: sephr: why would you want to go through the intermediate DOM? [20:26] polotek: you would want to take your html string parse it and get an e4x object back directly [20:26] mscdex: badaxx: i think you're still running into the same problem [20:27] polotek: sephr: also you're not always in charge of the content on the server. you could be reading it from some other source [20:27] sephr: polotek: by DOM, I mean the parsers provided by the DOM [20:28] mscdex: badaxx: one moment [20:28] sephr: you can parse them into nodes and then serialize them into strings [20:28] sephr: and then parse those corrected serializations with E4X [20:28] polotek: sephr: can you use those directly in v8? [20:29] sephr: the DOM and E4X? [20:29] polotek: sephr: wow, that's a lot conversion overhead [20:29] shimondoodkin: and then eval() to have the local scope [20:29] polotek: if you can access the parser in a sax context you could have it create e4x directly [20:29] sephr: polotek: I'm _not_ recommending this [20:29] polotek: that is if you have e4x available [20:29] sephr: I'm saying that's what it looks like you're saying [20:29] sephr: oh wait not you [20:29] polotek: sephr: I was asking if you could access the html parser functions directly [20:30] sephr: whoever said the E4HTML thing [20:30] polotek: but actually I don't know if those are event included in v8 [20:30] polotek: they are probably in webkit/chrome [20:30] inimino: That was Aria. [20:30] sephr: why would you want to parse HTML on the server side anyways? [20:30] sephr: I don't see the point, when you are the one generating said html [20:30] Aria: Because it's a much neater way of generating it. [20:30] inimino: But the idea was that you'd write e.g. "

foo

bar" and get a correct DOM, not a parse error. [20:30] sephr: huh? [20:31] sephr: Aria: I'm absolutely lost [20:31] mscdex: badaxx: to be honest, there's several things wrong. i'm not sure if the coffeescript compiler has anything to do with it or not. i'll give you an example of what it should look like [20:31] inimino: HTML is neater than XML. [20:31] Aria: Ever dealt with string interpolations? Escaping? [20:31] TooTallNate has joined the channel [20:31] Aria: It's SO EVIL. [20:31] sephr: inimino: heh. Not even mozilla goes far enough to implement that part of E4X [20:31] inimino: sephr ⋱ It wouldn't be E4X anymore, it's be E4HTML [20:31] sephr: it'd be E4DOM [20:32] nerdEd has joined the channel [20:32] inimino: (because "

foo

bar" isn't XML, but it is HTML.) [20:32] sephr: but what you explained is actually valid E4X stuff [20:32] TooTallNate: ping: isaacs [20:32] isaacs: hi [20:32] sephr: oh I didn't see that the second p was a start tag not end tatg [20:32] mAritz: anyone here who has used redis-node-client with multi/exec enabled? [20:32] TooTallNate: I just tried to publish my "applescrip" module [20:32] inimino: sephr ⋱ Take E4X, rip out the XML parser, add an HTML parser, and you have E4HTML. [20:33] sephr: inimino: I thought you said

foo

bar, which is perfectly valid E4X in an XMLList literal (<>) [20:33] TooTallNate: It worked the first time [20:33] sephr: in other terms, you'd have PHP [20:33] TooTallNate: but then I "unpublish"ed it (bad I know) cuz I wanted to add a license [20:33] sephr: but with the DOM I guess [20:33] inimino: sephr ⋱ And E4HTML might actually be useful. [20:33] sephr: I'm just lost as to why you'd want to generate malformed HTML purposely? [20:33] TooTallNate: then republished it and it seemed to work (it's there in "npm ls") [20:33] isaacs: k [20:33] sephr: s/\?// [20:34] inimino: sephr ⋱ Well, you can't manipulate the chunks of HTML in PHP, they're just dumped out. E4X creates variables. [20:34] Aria: Only problem with E4HTML is that end-of-parse conditions are harder. [20:34] TooTallNate: but "npm install applescript" doesn't work from my other computer [20:34] isaacs: TooTallNate: works for me [20:34] inimino: sephr ⋱ "

foo

bar" isn't malformed HTML, it's correct HTML. [20:34] isaacs: TooTallNate: does that other computer have it installed already? what does "doesn't work" mean? [20:34] sephr: I mean why you'd generate malformed XHTML purposely (even if you're serving it as HTML) [20:35] isaacs: sephr:

a

b is not malformed, though, it's fine. some sites care about every byte [20:35] Aria: Because it's shorter, easier to read, happens anyway ... perhaps comes partially from user content. [20:35] inimino: sephr ⋱ Because some people think that HTML syntax is much more usable, and XML was a failure. [20:35] sephr: those people aren't smart enought o use E4X + node.js heh [20:35] TooTallNate: https://gist.github.com/836068acf0c8aad52dba [20:35] inimino: (Or at least, XHTML was a failure.) [20:35] sephr: those are the "HTML programmers", or so they say on their CV [20:36] inimino: sephr ⋱ I'm one of those people, actually :-) [20:36] sephr: program me up some HTML ;) [20:36] inimino: And I think XML wasn't the greatest idea either. [20:36] fod has joined the channel [20:36] shimondoodkin: i think i have missed the point about e4x, it is a new way of building an object instead of {bla:blabla,foo:{}} and make it xml object type you just enter it as xml and it returns an object... pretty neat idea but who needs it anyways... [20:36] polotek: xhtml was a regrettable failure [20:36] sephr: well I guess boolean attributes are alright [20:36] ramonlechuga has left the channel [20:36] sephr: all of these markup languages suck [20:36] polotek: shimondoodkin: e4x gives you a DOM [20:37] polotek: it's different from the browser DOM [20:37] polotek: has it's own api [20:37] shimondoodkin: yes i get it [20:37] polotek: but the really cool thing about e4x is it's supported as native syntax in js [20:37] inimino: unquoted attributes, shortcut attributes, omitted tags... I like all of these. [20:37] sephr: though it's fairly underpowered [20:37] drudge: mscdex: [20:37] drudge: http://pastie.org/private/hshgbgqhsinte5xemajg [20:37] sephr: you can't mess with comments and processing instructions with ease in E4X [20:37] isaacs: TooTallNate: i dunno [20:37] TooTallNate: isaccs: did you get that? https://gist.github.com/836068acf0c8aad52dba [20:37] sephr: nor doctypes [20:37] isaacs: TooTallNate: yeah [20:37] isaacs: TooTallNate: works for me, no problems. [20:37] polotek: sephr: the spec is certainly incomplete [20:37] TooTallNate: huh [20:37] isaacs: TooTallNate: npm rm applescript and then try again? [20:38] isaacs: i dunno [20:38] polotek: and the reason is that it didn't really generate much excitement [20:38] inimino: E4X consumed too much syntax real estate for too little benefit. [20:38] polotek: probably no reason to really improve it [20:38] drudge: mscdex: and this is output: [20:38] drudge: http://pastie.org/1106545 [20:38] polotek: inimino: syntax real estate? [20:39] inimino: polotek ⋱ I.e. killing future extension possibilities. [20:39] polotek: inimino: hmmm, I don't now much about language development. [20:39] inimino: I guess I really meant "future syntax entension possibility real estate". [20:40] TooTallNate: isaacs: "npm rm applescript" didn't help [20:40] TooTallNate: I'll try reinstalling npm? [20:40] isaacs: TooTallNate: sure, that'll keep you busy for a bit [20:40] TooTallNate: haha [20:40] polotek: this is all avoiding the real issue though [20:40] isaacs: TooTallNate: what does "npm ls applescript" show on that other computer? [20:40] inimino: Well, all sorts of cool things that have been proposed for future versions of ECMAScript haven't been possible or haven't had ideal syntax because E4X squatted the syntax. [20:40] polotek: xml and html are useful to handle as DOM [20:41] polotek: browsers have the best parsers [20:41] sephr: inimino: didn't I propose a binary markup format before in ##paws that also had a common string serialization that humans can easily modify? [20:41] polotek: why don't they give them to us? [20:41] inimino: That's why I'd love to see E4X die completely. [20:41] inimino: sephr ⋱ Maybe? [20:41] inimino: sephr ⋱ Like binary XML? [20:41] sephr: lol, no [20:41] sephr: it'd replace XML/HTML for sure [20:42] sephr: but it wouldn't be a binary serialization of a doomed format [20:42] sephr: s/doomed/bad/ [20:42] inimino: polotek ⋱ You could port one of the browser's parsers to node, but it'd be a lot of work. [20:42] sephr: sadly I don't think it'll ever die [20:42] inimino: Oh, it'll die eventually. [20:42] polotek: inimino: I know. [20:43] inimino: Like all human works ^_^ [20:43] polotek: inimino: the one in webkit has feelers through the rest of hte code like a spider [20:43] Aria: inimino: That's what the html5 library is. Already ported to node. [20:43] Aria: It's almost exactly the new parser Mozilla just got. [20:43] m64253 has joined the channel [20:43] gryzzly_: hey you guys. is there any nice express tutorials out there? [20:43] polotek: there are so many things that have to change depending on the browser environment [20:43] inimino: Aria ⋱ Yeah, I know, but it's written in JavaScript, right? [20:43] Aria: And yes, it was a lot of work ;-) [20:43] inimino: I know :-) [20:43] sephr: we'd have to kill the web first and then reinvent everything before we can kill html [20:44] Aria: Yeah, it is. But that could be fed back into making an E4HTML parser ;-) [20:44] sephr: s/web/http?/ [20:44] gryzzly_: express node web framework [20:44] inimino: I meant you could rip out the C++ implementation and port that (which would also be lots of work). [20:45] polotek: sephr: http has nothing to do with it [20:45] polotek: gryzzly_: have you looked at hte site? [20:45] polotek: http://expressjs.com/ [20:45] badaxx: mscdex: guess it's me who did things wrong, I'm new to node.js and coffeescript.but i'll wait for your solution [20:45] gryzzly_: sure, i've read the guide part also [20:45] sephr: polotek: well I mean the whole web [20:45] sephr: everything except TCP just being redone [20:46] gryzzly_: but as I am client-side developer, I'd need something more step-by-step in order to get into things. [20:46] polotek: gryzzly_: also this http://nodeknockout.posterous.com/countdown-to-knockout-post-2-hello-world-with [20:46] polotek: sephr: the web has issues sure [20:47] TooTallNate: isaacs: Now this is what I get when trying to uninstall: https://gist.github.com/f8117d21bf4130a7e418 [20:47] polotek: but it could be worse [20:47] isaacs: TooTallNate: what version of node do you have? [20:47] TooTallNate: v0.1.104 [20:48] gryzzly_: @thanks for that last link. I've managed to do that myself! exactly as it is in the tut from nodeknockout but without the console.log line [20:48] gryzzly_: :-) [20:48] gryzzly_: my question would be how would I connect couch-db to the business [20:48] gryzzly_: i am trying to write a simple blog app, just for learning it [20:48] isaacs: TooTallNate: there is something strange with your setup [20:49] TooTallNate: damnit [20:50] isaacs: TooTallNate: rm -rf $(npm config get root)/{.npm/npm,npm}* $(npm config get binroot)/npm* [20:50] isaacs: TooTallNate: then install npm again [20:50] mape: isaacs: http://npm-gen.mape.me/mape/connect-assetmanager [20:51] isaacs: mape: nice [20:51] mape: not sure how "edge case" heavy it should be [20:51] TooTallNate: isaacs: K, did that, "npm ls applescript" shows "applescript@0.1.0 =TooTallNate latest remote" [20:52] mape: and should probly add helt texts [20:52] isaacs: TooTallNate: and what happens when you install it? [20:52] TooTallNate: but "npm install applescript" throws the same error [20:52] isaacs: TooTallNate: how did you install npm? [20:52] isaacs: TooTallNate: and what does node -v show? [20:52] TooTallNate: git clone; make install [20:52] mscdex: badaxx: something like this: http://gist.github.com/542833 [20:52] isaacs: TooTallNate: can you instal other things? [20:52] mscdex: badaxx: it can take awhile to get used to thinking asynchronously [20:53] isaacs: TooTallNate: maybe clear the cache and try again? i have literally no idea whatsoever. what you're seeing is not what it should be doing. [20:53] bradleymeck2 has joined the channel [20:53] TooTallNate: isaacs: I was able to update connect just now [20:53] isaacs: update to node 0.2.0? i don't know. [20:53] bradleymeck2: for knockout can we have pre downloaded libraries / icon sets (no code for project itself) [20:53] visnup: bradleymeck2: yes [20:54] polotek: gryzzly_: most people access couchdb using the REST interface over http [20:54] bradleymeck2: cool, just checking, starting to dl assets then [20:54] visnup: bradleymeck2: but don't commit anywhere yet [20:54] TooTallNate: isaacs: well I'll reboot and try on Ubuntu, and try updating node as well [20:54] bradleymeck2: im not going to :) read the email [20:54] mscdex: drudge: one thing i see right away is that your usage of createClient is wrong [20:54] drudge: yeah i noticed that too :/ [20:54] drudge: fixing it up now with the headers [20:55] isaacs: TooTallNate: ok. i'm gonna be offline, but you can email npm-@googlegroups.com or post an issue. [20:55] TooTallNate: isaacs: thanks [20:55] isaacs: TooTallNate: this "set before loading" thing is very very odd. [20:55] mscdex: drudge: i could see how that could easily make secure mode not work [20:55] MaSch has joined the channel [20:56] mscdex: drudge: let me know if that fix doesn't help [20:56] sonnym has joined the channel [20:58] gryzzly_: polotek: so say there is a mongod that is running on my mac os, and it's accessible via http://127.0.0.1:27017 so I just make a call there and get the data? [20:59] twoism has joined the channel [20:59] polotek: gryzzly_: you said couchdb not mongo :) [20:59] polotek: gryzzly_: for mongo check out this http://github.com/christkv/node-mongodb-native [20:59] gryzzly_: sorry, it's 4 am in Siberia :-) [20:59] gryzzly_: thanks [21:02] ph^ has joined the channel [21:04] pgriess has joined the channel [21:06] satori_ has joined the channel [21:09] drudge: mscdex: getting 411 status back now [21:09] drudge: http://pastie.org/private/tc7xb23rto89h4b0lq [21:11] shimondoodkin: http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=http+411 [21:11] rnewson has joined the channel [21:11] mscdex: drudge: try setting the Content-Length header [21:12] shimondoodkin: if you do post it needs a content length [21:12] mscdex: brb [21:13] drudge: bingo [21:13] drudge: works perfectly [21:13] jackish has joined the channel [21:14] drudge: badass. [21:15] feroz_ has joined the channel [21:19] ajpiano has joined the channel [21:19] _announcer: Twitter: "Websocket en python backend is absurdly simpler than in Node.js, comes to be cowardice." [pt] -- Rafael Barros. http://twitter.com/rafaelhbarros/status/21778100555 [21:25] TooTallNate has joined the channel [21:27] JimBastard has joined the channel [21:28] mattly has joined the channel [21:29] _announcer: Twitter: "Already have mega problems to squeeze four million old MySQL data on the # # NodeJS in CouchDB. Starts at so great." [de] -- Falco. http://twitter.com/ulmerleben/status/21778641284 [21:30] luddep_ has joined the channel [21:31] steadicat has joined the channel [21:35] codetonowhere has joined the channel [21:35] Validatorian: I think I found a node bug... can someone verify? http://gist.github.com/542884 [21:39] MaSch: same behavior here [21:54] softdrink has joined the channel [21:57] herbySk: Validatorian: what's the bug on this? [21:57] Validatorian: unexpected/undesired sorting [21:57] ezmobius has joined the channel [21:58] Validatorian: it's possible that node does it right and firefox doesn't, I'm not sure if there are specs on this, and what they are if so [21:58] herbySk: Validatorian: it's an object, you never had the order of properties set in any way / stable / whatever [21:59] herbySk: the fact that firefox keeps it is just an implementation detail [22:00] herbySk: specs, if they say something, say "there is no guaranteed ordering of properties, with the exception of numbered properties in an array (they go first and ordered)" [22:00] shimondoodkin: yes the behavior is different but it is ingnoreful because the app would work anyways [22:00] shimondoodkin: other thing is that the numbers become strings [22:01] herbySk: shimondoodkin: property keys are always strings [22:01] shimondoodkin: yeah... i never tested it [22:02] Validatorian: okay, so if I wanted to retain the order that I place them in, I need to not have them as numbers? if I make them 1x, 2x, 3x, the order is preserved. [22:02] shimondoodkin: Validatorian: you could put it in an array to preserve order... [22:02] herbySk: in fact, the spec says a[x] is done so that first x.toString() is executed and the result is used as key... so {'foo':'bar'}[{toString:function(){return 'foo'}}] should return 'bar' [22:04] sephr has left the channel [22:05] joshbuddy has joined the channel [22:05] Validatorian: alright, I'll look into that. Thanks [22:05] grahamalot has joined the channel [22:06] herbySk: Validatorian: yes, to preserve order use an array: ["first", "second", "third"] [22:06] inimino: Validatorian ⋱ Node leaves them in insertion order, it's only the pretty-printer that would sort them. [22:06] inimino: Validatorian ⋱ But yes, when order is significant an Array should be used. [22:07] shimondoodkin: does anybody knows a good routing thing, i couild copy its syntex from or use? [22:08] LionMadeOfLions has joined the channel [22:11] sh1mmer has joined the channel [22:13] amerine has joined the channel [22:17] shimondoodkin: found one i liked:http://github.com/defrex/node.routes.js/ [22:21] _announcer: Twitter: "Spent the last 2 days playing with #WebSockets and #NodeJS. Can't wait to write about it. Here is what I did http://bit.ly/cRxLbL" -- superfeedr. http://twitter.com/superfeedr/status/21781513390 [22:23] _announcer: Twitter: ".@superfeedr Ha. Cool. #WebSockets #NodeJS" -- Steve Malloy. http://twitter.com/sophware/status/21781622218 [22:31] mattly has joined the channel [22:32] MaSch: damn >.< got no really great idea for the knockout [22:33] ryah: MaSch: tank wars [22:33] streampunk: MaSch: games in general are a good bet. ;-) [22:34] streampunk: I'm not competing this year but I can't wait to see some of the fun stuff. [22:34] TooTallNate: What are some other signals to listen for other than Ctrl+C? [22:34] MaSch: i thought about an MMO Proof of Conecpt [22:34] _announcer: Twitter: "Hats off to everyone able to ship node.js apps. Just spent another Saturday afternoon fighting with versions and documentation." -- Bryan Woods. http://twitter.com/bryanwoods/status/21782225824 [22:34] ryah: TooTallNate: man signal [22:34] MaSch: man 7 signal ! [22:35] streampunk: MaSch: I wouldn't scale it too big. Just a few people interacting is good for starters. [22:36] Pilate: Node seems to be dropping multiple set-cookie headers on the httpClient response... is there a way to keep them in tact? [22:36] TooTallNate: Which ones can be invoked from the keyboard like Ctrl+C? [22:36] MaSch: yes i know [22:36] ryah: Pilate: it should put them together into one string [22:36] ryah: with a comma [22:37] MaSch: TooTallNate: http://en.wikipedia.org/wiki/Control-C google is your friend [22:37] mmetzger has left the channel [22:37] Pilate: ryah: i figured... but it isnt [22:38] mikeal1 has joined the channel [22:40] ryah: Pilate: hm [22:40] Pilate: http://pastebin.com/xPBPMLEq [22:40] Pilate: the top is what node prints, the bottom is from wireshark [22:40] Pilate: its actually 4-5 set-cookie lines but it doesnt do more than the first [22:40] teemow has joined the channel [22:40] ryah: Pilate: loka [22:40] ryah: er [22:40] ryah: okay [22:45] Pilate: ah it looks like it only combines 'cookie' fields not set-cookie? [22:47] softdrink has joined the channel [22:47] ryah: yeah [22:47] ryah: fix coming [22:48] Pilate: thanks a ton ;) [22:53] warfangle has joined the channel [22:53] warfangle: Hi there, just installed node and tried to start up the example.js to make sure everything was working correctly. [22:54] warfangle: But it doesn't output the server running notification to my command line, and any reqs to 127.0.0.1 at the specified port timeout. [22:54] warfangle: any hints? [22:56] mattikus has joined the channel [22:57] ryah: which example [22:58] jacobolus has joined the channel [23:04] _announcer: Twitter: "@davidcodes because learning, keeping up and developing in 1 language is a lot easier than coding in 2 or 3! And... #nodejs is blazing fast!" -- Jeroen van Duffelen. http://twitter.com/jeroenvduffelen/status/21783857379 [23:06] Tim_Smart has joined the channel [23:07] MikhX has joined the channel [23:09] mscdex: node.js rules! [23:14] mtodd has joined the channel [23:16] drudge: mscdex: my first attempt, mostly working https://gist.github.com/52fb6ec7a228e5c8bfdb [23:17] MikhX has joined the channel [23:18] _announcer: Twitter: "Hello world by #nodeJs on #heroku. Ninja at home!" -- Kadir Pekel. http://twitter.com/kadirpekel/status/21784635198 [23:19] rhymes_ has joined the channel [23:20] rhymes_ has left the channel [23:20] rhymes has joined the channel [23:22] m64253 has joined the channel [23:22] jackish has joined the channel [23:23] trotter has joined the channel [23:29] _announcer: Twitter: "Nice that he nodejs #: Learning Server-Side JavaScript with Node.js | Nettuts + http://forr.st/ ~ y1G" [cs] -- lethargicpanda. http://twitter.com/lethargicpanda/status/21785223482 [23:30] _announcer: Twitter: "execute applescript in node.js http://github.com/TooTallNate/node-applescript" -- aki. http://twitter.com/aki_xavier/status/21785299528 [23:31] TooTallNate: Sweet! I got tweeted! [23:33] _announcer: Twitter: "A REST(HTTP) API for interacting with iTunes written in node.js http://github.com/TooTallNate/nTunes.git" -- aki. http://twitter.com/aki_xavier/status/21785424913 [23:33] mikeal1 has joined the channel [23:34] dylang has joined the channel [23:34] CIA-77: node: 03Ryan Dahl 07master * r2982e75 10/ (lib/http.js test/simple/test-http-set-cookies.js): set-cookies header is an array of values. always - http://bit.ly/ajHdMr [23:34] ryah: Pilate: there--^ [23:37] steadicat has joined the channel [23:38] mscdex: yay! [23:38] mscdex: drudge: "Gist has been deleted" [23:38] mscdex: drudge: good to hear though :-) [23:39] drudge: mscdex: eek, https://gist.github.com/800275b894d8c8bfb645 [23:40] ryah: that set-cookie fix probably can't be landed in the 0.2 branch [23:40] mscdex: why not? [23:40] ryah: api cahnge [23:40] mscdex: oh [23:40] mscdex: first 0.3.x commit! [23:40] mscdex: :-D [23:42] mscdex: drudge: instead of relying on base64_encode, you could create a new buffer and do a .toString('base64') on it [23:42] drudge: ok [23:43] mscdex: you could probably also do the same for utf8_encode [23:43] drudge: it's only used in the base64_encode :P [23:43] mscdex: oh [23:43] mscdex: well much easier then :-p [23:44] drudge: yeah that worked great, thanks. didn't even think of the Buffer class [23:45] mscdex: buffers to the rescue! [23:45] robotblake has joined the channel [23:46] Pilate: thanks ryah =) [23:46] jackish has joined the channel [23:49] TooTallNate: What's the best way to listen for an HTTP client closing the connection early (i.e. XHR.abort())? [23:49] jtoy has joined the channel [23:49] mscdex: TooTallNate: probably the 'end' event [23:50] TooTallNate: on the HTTP or Stream instance though? [23:50] ryah: TooTallNate: req.connection.on('close', fn) [23:50] TooTallNate: ryah: Thanks, that was more like what I was expecting [23:50] ryah: TooTallNate: or maybe req.connection.on('end', fn) [23:51] mscdex: TooTallNate: i've noticed that IE sends RST which triggers 'close', but all other browsers send FIN which triggers 'end' quicker [23:51] chuhnk has joined the channel [23:51] TooTallNate: mscdex: interesting, i'll have to experiment [23:51] chuhnk: hi, im trying to compile node.js on mac i386 but it keeps detecting as x86_64, i've tried archflags but it doesnt help. any ideas? [23:52] mscdex: i'm not sure if it's the same with all versions of IE, but that's what i saw happen with IE6 [23:53] mscdex: there are 32-bit x86 macs? [23:53] mscdex: :S [23:53] chuhnk: macs like 4 years old with snow leopard on it [23:54] Aria: Yeah, rather a lot of 32-bit X86 macs. [23:55] CIA-77: node: 03Ryan Dahl 07eventsource * rabc77b6 10/ (lib/fs.js src/node_stat_watcher.cc src/node_stat_watcher.h): StatWatcher to use EventSource (+8 more commits...) - http://bit.ly/cXpWlo [23:56] mscdex: heh shows how much i know about macs :p [23:58] davidwalsh has joined the channel [23:58] davidwalsh has joined the channel [23:58] chuhnk: any ideas on the compiling? [23:59] mscdex: sorry, i only use linux and bsd :-\ [23:59] ryah: chuhnk: hm - waf makes that decision [23:59] ryah: chuhnk: uname -a ?