[00:00] creationix: ACTION really needs to fix that driver [00:00] inimino: but if you were dividing by 0x1000000, it would be the same [00:01] creationix: I'm sure the bit shift is faster [00:01] creationix: and this code is in the hot loop for postgres-js [00:01] inimino: yeah [00:01] creationix: so it will make a noticeable difference [00:01] inimino: yeah, it should make a difference [00:01] inimino: losing the call to Math.floor can't hurt either [00:01] ezmobius has joined the channel [00:02] aurynn: int() usually can be abused to floor a float [00:03] creationix: inimino: is x & 0xff better or x % 0x100 ? [00:03] creationix: & right? [00:03] inimino: creationix ⋱ Yeah, it should be faster. [00:03] creationix: and does node do this already in buffer? [00:04] inimino: (Unless the compiler cleverly turns the other one into it) [00:04] sechrist: creationix: you're working on postgres-js? [00:04] stride: inimino: in js? I doubt it makes that much of a difference with all the conversions [00:04] sechrist: I was literally going to look into postgres drivers for node like tomorrow [00:04] sechrist: hm [00:04] creationix: buffer[i] = 300 is the same as buffer[i] = 300 & 0xff ? [00:04] aurynn: sechrist, I'm also working on creationix's postgres-js [00:04] aurynn: sechrist, for it does silly things like sql_escape [00:04] inimino: stride ⋱ I would guess it's still measurable in a tracing or JITing engine. [00:04] sechrist: hmm [00:05] sechrist: this is a native implementation i'm guessing? [00:05] sechrist: not linked with one of the clibs? [00:05] creationix: aurynn: have you messed with buffer_extras? [00:05] creationix: sechrist: correct [00:05] aurynn: creationix, no. [00:05] creationix: aurynn: I just found some bugs and a way to speed it up quite a bit [00:05] stride: inimino: mhm, probably [00:05] aurynn: Wait, I added a byte1 type while I was debugging one of my messages [00:05] brianleroux has joined the channel [00:05] inimino: creationix ⋱ 300 & 0xff is smaller than 300. [00:06] creationix: aurynn: still it should be easy to merge [00:06] sechrist: lol speeding up the driver sounds kind of moot unless it's a very very large increase in performance [00:06] creationix: inimino: correct, but if node internally mods it, then it doesn't matter [00:06] aurynn: creationix, I was going to get prepared statements working after dinner - hopefully I can merge upstream tonight :) [00:06] inimino: creationix ⋱ Oh, oh... I see what you mean. [00:06] inimino: creationix ⋱ Yeah, I guess node must only write the low bits so it should be the same. [00:06] aurynn: sechrist, more speed is never bad. :) [00:07] creationix: inimino: I just tested it, node it modding it [00:07] sechrist: oh luls I know, it's just it's not the driver that's generally slow :) [00:07] inimino: creationix ⋱ yeah, no point in doing & ff if it's going to happen twice... [00:08] creationix: inimino: https://gist.github.com/ed3a9d0363ce6aea4606 [00:08] creationix: much better :D [00:08] creationix: I love learning new operators that solve my problems so well [00:09] softdrink has joined the channel [00:10] stride: inimino: you were right btw, the implementation of the modulo operator seems to be far more complex [00:10] inimino: creationix ⋱ looks nice :-) [00:10] creationix: inimino: is there no <<< operator ? [00:11] inimino: there isn't, because << fills with zeros already [00:11] creationix: stride: so & is faster than % when it does the right thing [00:11] creationix: ? [00:12] creationix: js> (0xff << 24).toString(16) [00:12] gbot2: creationix: "-1000000" [00:12] creationix: inimino: ^ [00:12] creationix: inimino: it doesn't do what I want, I want 0xff000000 [00:12] joshbuddy has joined the channel [00:13] inimino: hm [00:13] creationix: (0xff * 0x1000000).toString(16) works, but is surely slow [00:13] ryah: hi [00:13] creationix: ryah: welcome back [00:14] creationix: -1 >>> 0 [00:14] creationix: oops, wrong window [00:15] mscdex: hrm.. i thought the home and end keys were supposed to work in the repl now? [00:15] danielzilla has joined the channel [00:16] inimino: creationix ⋱ Ah, 0xff << 24 is outside the Int32 range, because the sign bit would have to be set [00:17] stride: creationix: whoops, sorry for the late answer, yep [00:17] creationix: inimino: exactely, it's treating it as a signed int [00:17] inimino: or, uh 0xff * 0x1000000 I should say [00:17] aliudalius has joined the channel [00:18] inimino: js> (0xff * 0x1000000).toString(2) == (-0x1000000 >>> 0).toString(2) [00:18] gbot2: inimino: true [00:18] inimino: creationix ⋱ Is this for reading bytes back out of the buffer? [00:19] creationix: yeah [00:19] creationix: inimino: https://gist.github.com/ed3a9d0363ce6aea4606#file_bits2.js [00:19] inimino: Ok, yeah, you'll just have to use * 0x1000000 I think. [00:19] inimino: It's going to have to put the result in a double anyway [00:19] creationix: inimino: and the >> 0 on the end will turn it back into a signed int right? [00:20] bsstoner has joined the channel [00:21] inimino: Oh, hm. [00:22] creationix: inimino: here is my old code http://github.com/creationix/postgres-js/blob/master/lib/buffer_extras.js#L46-63 [00:22] creationix: which works, but it probably slower [00:23] inimino: Ah. [00:23] zomgbie has joined the channel [00:23] creationix: wee, wrong lines, I meant http://github.com/creationix/postgres-js/blob/master/lib/buffer_extras.js#L55-71 [00:24] stride: hm, are you sure your >> 0 is necessary? [00:24] stride: in the reading functions [00:24] inimino: Yeah, it looks equivalent for the int32 case [00:25] inimino: stride ⋱ It converts back, e.g. 0xffffffff into -1 [00:25] creationix: stride: I think so, I want it back as a signed int [00:25] inimino: (note the parens) [00:25] angel333 has joined the channel [00:26] tyfighter has joined the channel [00:27] inimino: creationix ⋱ for the int16 I guess you'll still have to do the test for the high bit [00:28] creationix: inimino: hmm, good point, not sure why I want it back as a signed int [00:28] stride: oh, right, + doesn't change the sign there, sorry [00:28] aheckmann has joined the channel [00:28] kevm_ has joined the channel [00:31] richcollins has joined the channel [00:32] creationix: yeah, I'm not sure why I want it signed, the spec just says network byte order http://developer.postgresql.org/pgdocs/postgres/protocol-message-types.html [00:32] inimino: I guess if it is a "int16" method and not "uint16" it should be signed, but who knows [00:34] inimino: The documentation is satisfyingly vague ^_^ [00:35] stride: btw "| 0" instead of "<< 0" or ">> 0" should sign your data as well with a few atomic cpu operation less when you're at optimizations :) [00:38] creationix: well, I just pushed my changes http://github.com/creationix/postgres-js/commit/af12e7e8e16421f74d45b204f34bf7a14ede7858 [00:38] creationix: I decided to not mess with signed numbers at all. [00:38] creationix: the >>> on the packers will handle that for me [00:39] creationix: and on reading it back out, I'll just provide unsigned numbers [00:39] steadicat has joined the channel [00:40] inimino: cool [00:40] mu-hannibal: has someone been able to get a HTTPS proxy to work in node? e.g. http://github.com/psanford/node-proxy/raw/master/https_proxy.js [00:41] mu-hannibal: does not work for me - maybe I'm going about it the wrong way... (Configured browser to use localhost:8001 as the SSL proxy). [00:41] creationix: aurynn: I pushed my changes, should merge clean for you [00:42] nerdEd has joined the channel [00:42] stride: heh, javascript looks beautiful again ;> [00:42] stride: @creationix [00:42] tekky has joined the channel [00:43] creationix: :) [00:44] brianleroux has joined the channel [00:49] aho has joined the channel [00:55] TobiasFar has joined the channel [00:56] c4milo has joined the channel [01:02] matt_c has joined the channel [01:02] bcg_ has joined the channel [01:06] angel333 has joined the channel [01:10] creationix has joined the channel [01:12] creationix has joined the channel [01:12] JimBastard has joined the channel [01:12] dnolen has joined the channel [01:13] JimBastard: http://motherfuckinglasers.com/ [01:13] JimBastard: awesome [01:16] jashkenas has joined the channel [01:16] joshthecoder_: JimBastard: sweet [01:16] ditesh|cassini has joined the channel [01:17] jashkenas: for those of y'all who are writing browser+node libraries these days ... how are you sniffing for the presence of the browser? ... [01:17] jashkenas: feature detection on the DOM method you're about to use? [01:17] Tim_Smart: jashkenas: A few check for module.exports [01:18] jashkenas: Tim_Smart: doesn't that explode when combined with client-side implementation of CommonJS-ish modules? [01:18] joshthecoder_: couldn't you just check if the window global is defined [01:18] Tim_Smart: Yeah, it does. window sounds good. [01:18] stepheneb has joined the channel [01:21] tmpvar has joined the channel [01:29] kodisha has joined the channel [01:32] danielzilla: creationix: BTW, thanks for the pure postgres adapter. It was very useful this past weekend. [01:38] angel333 has left the channel [01:38] creationix: danielzilla: cool, I'll be glad when it's finished and solid [01:38] danielzilla: ACTION nods. [01:38] danielzilla: creationix: Anything you need help with on it? [01:38] wllm has joined the channel [01:39] creationix: danielzilla: aurynn is working on a major refactor right now adding transactions and proper error handling [01:39] tav has joined the channel [01:40] danielzilla: Nice. Can't wait. [01:41] Tim_Smart: Hmm Opera has the fastest Sunspider results. [01:42] Tim_Smart: Faster than Chromium nightlies even. [01:42] nerdEd has joined the channel [01:43] davidwalsh has joined the channel [01:49] dnolen has joined the channel [01:49] mattikus has joined the channel [01:54] dnolen has joined the channel [01:55] softdrink has joined the channel [01:55] aurynn: I love when people call [01:55] aurynn: and then [01:55] aurynn: dpmn [01:55] aurynn: don't leave voicemail [01:57] WALoeIII has joined the channel [01:57] codemariner: hi there, any recommendations on a testing framework? [01:58] phiggins: even better they leave enough noise fumbling around trying to hangup on your voicemail it does leave a voicemail of nothing, and you check it. [02:00] aurynn: phiggins, Okay, that's even more annoying. [02:00] aurynn: :) [02:01] meso has joined the channel [02:02] benburkert has joined the channel [02:06] Tim_Smart: creationix: Have you done any performance testing against http://github.com/ry/node_postgres ? [02:06] matt_c: Yeah I was curious about that the other night. [02:06] creationix: Tim_Smart: they did a while back and it was faster than mine [02:07] Tim_Smart: I guess because C++ already has all the basic data types. [02:07] creationix: but mine should be a bit faster now with the improvements to buffers and V8 enhancements [02:07] Tim_Smart: Right. [02:08] aurynn: is node_postgres maintained? [02:08] Tim_Smart: aurynn: The last commit was days ago, so I guess so. [02:08] Tim_Smart: days [02:08] JimBastard: fuck phones [02:08] aurynn: Huh. [02:08] Tim_Smart: 8 days* [02:09] aurynn: creationix, so, it looks like I need to define a DBI pattern as well. Fun stuff. :) [02:09] Tim_Smart: My 8 key has gone all weird. [02:09] aurynn: I keep hitting the multipart messages wall. [02:09] jashkenas has left the channel [02:11] aurynn: To do a prepared query, you need something like 6 messages [02:11] aurynn: Which keeps tripping me up in my head [02:11] creationix: aurynn: nice, if you do abstract, keep it seperate from the other code [02:11] creationix: I want this to be a thin wrapper if possible [02:11] aurynn: Mine's quite a bit more complex [02:12] robrighter has joined the channel [02:12] danielzilla: creationix / aurynn: One of the selling points of the pure adapter is the error handling. We were getting no output of of the native adapter, but using the pure JS one allowed us to debug what was wrong. [02:13] creationix: danielzilla: cool, once we get connection pooling we'll have better error handling [02:13] aurynn: danielzilla, good error output is essential to that. [02:16] softdrink has joined the channel [02:17] bpot has joined the channel [02:17] JimBastard: lulz, During judging, we will need access via an SSH key to make sure there is no cheating, including comparing deployed code with that in the git repo. [02:18] polotek has joined the channel [02:19] kreyman has joined the channel [02:21] aurynn: Ah! That's useful to know. [02:21] keeran: JimBastard: not so much of a big deal as it's runon a vps dedicated for the rumble :) [02:22] keeran: assuming that's what you're talking about :) [02:22] tom_ has joined the channel [02:22] jamescarr has joined the channel [02:22] keeran: oh man wrong chan, soz, must be talking about the knockout :) [02:22] JimBastard: i am [02:22] keeran: ACTION blushes :) [02:22] JimBastard: lulz [02:23] JimBastard: im totally gonna do this sweet mvc framework ive been thinking of [02:23] JimBastard: its awesome [02:23] JimBastard: it has like routes and stuff [02:24] keeran: can call it Wheel.js! [02:24] JimBastard: Jails 3.0 [02:24] JimBastard: Javascript in Jails 3.0 [02:24] JimBastard: where is technoweenie, hes missing out on the nodechan [02:26] a_meteorite: So is there something similar to Rack (with Ruby) for JS/Node? [02:26] jchris has joined the channel [02:27] mattikus: expressjs [02:27] JimBastard: no.... [02:27] mattikus: er, connect? [02:27] JimBastard: expressjs is not like rack [02:27] JimBastard: Connect is [02:27] a_meteorite: that's a framework I though [02:27] polotek: mattikus: expressjs is higher level than something like Rack [02:28] mattikus: Sorry, i mixed up which was which. [02:28] JimBastard: a_meteorite: connect has a bunch of middleware and a bit of a glue for http servers [02:28] JimBastard: a_meteorite: if you dive into the code and have some skill you will see that its actually very simple to put together [02:28] mattikus: So this is probably answered elsewhere, but are there any plans for node to become VM agnostic in the future? [02:29] polotek: actually technically, node doesn't have a fully rack-like interface [02:29] JimBastard: mattikus: the future is infinite, but prob not [02:29] a_meteorite: JimBastard: ah, cool [02:29] polotek: rack, wsgi, jsgi are standard interfaces for web servers [02:29] polotek: node has a custom web server interface [02:29] JimBastard: +5 [02:29] mattikus: JimBastard: Ah, thought so. I really would like to use it but v8 doesn't run on ppc64. Maybe i'll just keep it in mind for personal projects. [02:30] JimBastard: mattikus: i try to stay away from the c land, but to my understanding separating node from v8 would not really be possible [02:30] JimBastard: i could be wrong [02:30] polotek: mattikus: check out ringojs on the jvm [02:30] polotek: it's pretty nice [02:30] JimBastard: you could always re-implement the api.....i guess [02:30] polotek: don't now what architectures it runs on [02:31] chrischris has joined the channel [02:31] mattikus: JVM runs on pretty much everything, though we don't install it on our nodes. [02:31] JimBastard: jvm runs on anything, even your grandma [02:31] JimBastard: lulz [02:31] mattikus: Right now I use python and a microframework to host an app that's mostly JS. I was kinda wanting to switch everything to JS and focus on one language. [02:31] polotek: yeah but don't know what other dependencies there are [02:31] mattikus: Node seems to be getting a lot of traction these days and I want to use what is likely to be popular down the road [02:32] polotek: mattikus: then you are in the right place [02:32] blogometer has joined the channel [02:32] mattikus: polotek: Yep, I guess I'll just use it for personal projects rather than at work if/until it ever becomes available on more architectures. [02:32] polotek: you could actually implement a lot of the principles and api of node in Java pretty easily. [02:32] blogometer: When you need to generate HTML, from Node.js, what template engine do you use? [02:32] polotek: But ry would probably murder you [02:32] a_meteorite: I just wish v8 would do some stuff like tail call optimization [02:33] polotek: do any of the js engines support tail calls? [02:33] dnm: polotek: Why? [02:33] huyhong has joined the channel [02:33] mattikus: a_meteorite: it's open source, im sure anyone could implement it if they wanted [02:33] polotek: ry is a big fan of C [02:33] polotek: he doesn't even like C++ very much [02:33] blogometer: polotek: Really? Piped stdin and stdout? [02:33] mattikus: polotek: for good reason [02:33] jb55: ugh [02:33] huyhong has left the channel [02:33] jb55: here comes the C++ bashing [02:33] polotek: blogometer: stdin and stdout are pretty... standard [02:34] dnm: Yeah, but it's not as though anyone's preference has impeded pragmatism in Node.js so far; to wit, V8 hasn't been rewritten. ;] [02:34] blogometer: Yeah, and async select thereof? [02:34] polotek: jb55 I don't have a problem with C++ per se [02:34] polotek: it's just too convoluted [02:34] polotek: makes it too easy to shoot yourself in the foot [02:34] mattikus: polotek: you could argue the same about C [02:34] a_meteorite: mattikus: I'll venture to say I'm pretty skilled, but not in the arena of designing languages or a VM [02:34] polotek: you can shoot yourself in the foot with C [02:34] polotek: but the language is pretty simple [02:34] jb55: in either case [02:34] polotek: hard to get bogged down in details [02:34] jb55: the programmer just needs to know what they're doing [02:34] blogometer: You could argue the same for C, except that you'd be wrong. [02:34] mattikus: a_meteorite: I didn't mean you specifically, I just meant that you could probably float the idea around and see if it picks up traction. [02:34] jb55: languages are just tools [02:35] ewdafa has joined the channel [02:35] polotek: blogometer: async select on pipes is a big one [02:35] mattikus: a_meteorite: Eventually someone might implement it. It makes sense, actually, since a lot of people argue JS has a lot more in common with a lisp than most other languages. [02:35] blogometer: polotek: Async I/O with Java? How. [02:35] blogometer: ? [02:35] a_meteorite: yeah, likely. TCO with some other stuff would really be nice for v8 [02:35] polotek: I don't think it makes sense in the jvm because everything's in one process [02:35] Sutto has joined the channel [02:35] polotek: blogometer: javaalready does async i/o [02:35] blogometer: jb55: Which is why you are committed to PL/1. [02:35] blogometer: Or, maybe Algol68? [02:35] blogometer: Just languages. [02:35] jb55: expressiveness of the language is where the arguments should be [02:36] jb55: was my next point :) [02:36] jamescarr: PL/1 [02:36] jamescarr: oh man [02:36] polotek: actually you could probably still the do the async select in java too. [02:36] jamescarr: I hate PL/1 [02:36] polotek: I don't know how but there's nothing stopping it really [02:36] jamescarr: I worked at a company that had a hidden cache of millions of lines of PL/1... [02:36] blogometer: jamescarr: Ouch. [02:36] jamescarr: wound up on a team for 2 months that had to modify it but couldnt convert it [02:36] polotek: jb55: it's not just about expressiveness. perl is very expressive [02:36] bcg has joined the channel [02:37] mattikus: polotek: thats a polite way of putting it. [02:37] polotek: but also unnecessarily convoluted [02:37] blogometer: Can you imagine the poor bastards who will have to wade through millions of lines of C++ functional template meta-programming? [02:37] mattikus: you can use C++ but you'd have to pick a safe subset, otherwise it becomes the wild west. [02:37] blogometer: They will probably have to use prison labor. [02:37] ngw has joined the channel [02:38] blogometer: mattikus: Yes. You run off into the vast and empty desert of diminishing returns in pursuit of the ever elusive ideal of "correctness." [02:38] blogometer: Which is something I'm happy that the Node.js team defends against. [02:38] mattikus: blogometer: do you just pick random words and put them together to sound witty? [02:39] blogometer: No. Diminishing returns are the problem with C++. [02:39] mattikus: Howso? [02:39] blogometer: People pile on the Boost libraries to get a one little idiom. [02:39] mattikus: Also, this argument is specious anyways, node is C and will remain C probably. [02:39] blogometer: Good. [02:40] blogometer: So, template languages, any recommendations? [02:40] ryah: im glad the nodejs community has a bias against boost [02:40] mattikus: i think everyone is biased against boost [02:40] ezmobius has joined the channel [02:41] jb55: "design patterns" and libraries like boost are just signs of lack of expressiveness in the language [02:41] mattikus: design patterns are simply what the name implies, patterns. [02:41] mattikus: they crop up repeatedly in code. it has nothing to do with language design. [02:41] jb55: well looking at examples specifically: actor, command, etc [02:42] polotek: ryah: there just needs to be better references for how to write decent C++ code without using all the crazy libraries [02:42] jb55: all these can be thrown away if C++ had first class higher order functions [02:42] blogometer: The problem with design patterns is that they are often applied to hide implementation details. [02:42] polotek: I feel like I just need a few good patterns to study for managing memory better [02:42] ryah: polotek: luckily in node, epople don't need to write much c++ [02:42] ryah: just glue [02:42] mattikus: if that [02:42] blogometer: The programmer just out of college has learned to program to "internfaces, not implementations", so they add a design pattern whenever they see an implementation detail. [02:42] polotek: ryah: yeah, but if you have a non-trivial library then converting data types becomes a real issue [02:43] ryah: *shrug* [02:43] mattikus: here's a thought [02:43] jamescarr: internfaces? [02:43] polotek: ACTION has a non-trivial library :( [02:43] jamescarr: because they're an intern? [02:43] mattikus: lets talk about javascript and/or node. [02:43] blogometer: interfaces. [02:43] jb55: I seriously had more issues wrapping my head around waf, I don't want to do anymore complex c++ bindings with dependencies :P [02:43] polotek: jamescarr: there are interfaces and routines for converting datatypes [02:43] blogometer: You know, program to interfaces not implementations. [02:43] polotek: but they come rapped up in big packages [02:44] ryah: jb55: heh, yeah [02:44] danielzilla: mattikus: Sssh. I can't wait for this to become emacs vs. vim. [02:44] polotek: that look suspicially like Boost [02:44] mattikus: danielzilla: VIM FOREVER [02:44] JimBastard: ryah: living in userland for node is pretty fun. too many dragons down on your side :-) [02:44] danielzilla: ACTION waits with bated breath. [02:44] blogometer: And data hiding, and the principle of least privilege, the separation of concerns, the law of demeter. [02:44] blogometer: All the non-problem problems they solve with design patterns. [02:44] polotek: http://code.google.com/p/v8-juice/ [02:44] blogometer: Love me some ViM. [02:44] Tim_Smart: vim got a new version not too long ago... [02:45] ryah: JimBastard: i tell the same thing to my kernel dev coworkers [02:45] mattikus: Tim_Smart: if by not long ago you mean yesterday, then yes. [02:45] JimBastard: i wonder if they say that to the hardware guys? [02:45] polotek: ryah: I watched Bryan Cantrills tech talk on dtrace [02:45] polotek: my brain melted [02:45] polotek: there is no way I will ever make it that far down the stack [02:45] jb55: Bryan is some sort of super genius [02:45] jb55: from what I can tell [02:45] polotek: But awesome to see you guys working on dtrace support [02:46] jb55: that dtrace talk was amazing [02:46] blogometer: What is dtrace? [02:46] polotek: blogometer: careful, your brain will melt [02:47] danielzilla: blogometer: http://www.youtube.com/watch?v=6chLw2aodYQ [02:47] kevm_ has joined the channel [02:47] jb55: kernel intstrumenting tool [02:47] ryah: blogometer: strace, plus awk-like language with zero overhead [02:47] blogometer: Ah. [02:47] jb55: did that ever get ported to linux, I stopped following it awhile ago [02:48] wllm has joined the channel [02:48] ryah: probably the most mind blowing piece of software [02:48] mattikus: jb55: it's incompatible with the GPL so you'll never see kernel support. [02:48] blogometer: Any words on it? [02:48] mattikus: jb55: Maybe through a module [02:48] mattikus: jb55: same reason why zfs won't be showing up anytime soon. [02:48] blogometer: Okay. I'll watch the video laters. [02:49] blogometer: I'm converting a Java project to Node.js. [02:49] ryah: mattikus: good reason to use freebsd [02:49] jb55: should look into some FreeBSD [02:49] jb55: exactly [02:49] jb55: lol [02:49] polotek: mattikus: in the video Cantrill says that BS [02:49] mattikus: ryah: or os x which already has dtrace support for a while [02:49] jamescarr: blogometer, heh, I was knee deep in some bad jsps today... kept thinking of at least creating a haml implementation for java... [02:49] blogometer: After a bit of advocacy to the project team. [02:49] mattikus: polotek: orly? [02:50] ryah: yeah, except osx is unfree and sucks hard [02:50] polotek: don't know much about it [02:50] jb55: ACTION grows neckbeard [02:50] mattikus: the gui is unfree, everything else is free [02:50] ryah: and sucks hard [02:50] mattikus: i disagree [02:50] mattikus: ive used linux for years and as far as actually getting things done, i'm far more productive on os x [02:51] mattikus: linux is great for servers, but severely lacking as a desktop, imho [02:51] ryah: i agree, osx has great suspend and wifi detection [02:51] polotek: mattikus: agree [02:51] mattikus: ryah: everything that i had to keep tweaking to make work and never quite got right in linux, os x has out of the box [02:51] polotek: the real problem with os x as a unix environment is that they literally decided to change almost all of the conventions [02:51] ryah: it's also nice for hooking up to projector and printing things [02:52] blogometer: jamescarr: Don't create anything for Java. Let it suck to death. [02:52] jb55: I use my macbook as a portal into my ubuntu box at home, just keep a screen session open with my workspace [02:52] polotek: for no discernible reason [02:52] mattikus: polotek: name one unix derivative that doesn't. [02:52] jb55: best of both worlds [02:52] ryah: at least kqueue seems to work now [02:52] polotek: mattikus: nah, it's on another level [02:52] mattikus: polotek: hell, even gnu/linux can't decide on convention [02:52] mattikus: polotek: there is no standard init system anymore [02:53] ryah: i think freebsd seems like a really nice os [02:53] ryah: i guess zfs on freebsd is super old? [02:54] mattikus: nah, it's fairly recent afaik [02:54] mattikus: the problem with the BSDs is hardware support and vendor help [02:54] polotek: the problem with BSD is that it's "too free" [02:54] mattikus: there's a lot of good non-free modules for linux that actually help you get things done, like wifi and video card support [02:55] blogometer: Minute 4 and he's still bashing a book [02:55] blogometer: . [02:56] jb55: also this: http://cryptnet.net/mirrors/texts/kissedagirl.html [02:56] jb55: classic [02:56] aurynn: Freebsd is a nice OS, but definitely suffers from the driver problem [02:57] joshbuddy has joined the channel [02:58] mattikus: Hence why os x is the best BSD [02:58] blogometer: Talk is getting interesting. [02:58] blogometer: Also, anyone, templating language, anyone? [02:58] aurynn: os x is the best desktop unix since IRIX. [02:58] mattikus: blogometer: I'm interested in the answer as well. [02:59] danielzilla: blogometer: I like Mustache. Simple & straightforward. [02:59] steadicat has joined the channel [02:59] matt_c: IRIX had BZFlag. Do we need anything else? [03:00] jamescarr: just discovered less.js for node [03:01] blogometer: Mustache looks fine. [03:01] jamescarr: awesomeness [03:01] danielzilla: blogometer: If you go the Mustache route, there http://github.com/janl/mustache.js or http://github.com/raycmorgan/Mu [03:01] blogometer: Where is less.js. [03:01] mr_danie1 has joined the channel [03:01] mu-hannibal has joined the channel [03:01] polotek: blargh, hate mustache [03:02] jamescarr: blogometer, mustache.js is completely different than less.js [03:02] blogometer: danielzilla: The only question I'd have is, can you keep the templates external? [03:02] blogometer: less.js is CSS. [03:02] polotek: http://github.com/ry/node/wiki/modules [03:02] jamescarr: still, I prefer haml/jade over mustache but to each his own ;) [03:02] polotek: lots of template libraries [03:03] danielzilla: blogometer: Sure, drop them on the disk, write a function that does ``fs.readFile`` and the callback can do the ``render``. [03:03] danielzilla: blogometer: But polotek is right, hit up that wiki and find one that suits you. [03:04] blogometer: danielzilla: Oh, sure. Than makes sense. Any of them are easily read from file. [03:04] blogometer: Yup. Nice page. [03:04] blogometer: polotek: Is there something you like? Opinions count. [03:04] mattikus: jamescarr: jade looks nice, thanks [03:04] blogometer: Or, I'd like to hear opnions. [03:05] danielzilla: blogometer: Actually, looks like Mu can read right off the disk - http://github.com/raycmorgan/Mu/blob/master/demo.js [03:05] danielzilla: ACTION backs off. [03:05] polotek: I would like mustache if it didn't hide my logic from me [03:05] polotek: I think template logic should be minimal [03:05] polotek: but it is necessary and I prefer it to be explicit [03:06] polotek: it should also look like html so haml/jade and the like are out [03:06] blogometer: polotek: All you say is true. [03:06] polotek: I like the simple json-template but the syntax drives me nuts [03:06] polotek: <%= [03:06] polotek: 3 chars just to print a variable! [03:07] Tim_Smart: Heh dtrace is really interesting. [03:07] aurynn: Bah [03:07] polotek: at the end of the day, the django template style is the one that irks me the least. [03:07] aurynn: ACTION is starting to get close [03:07] mattikus: aurynn: to? [03:08] aurynn: mattikus, getting a prepared query executed by Postgres [03:08] mattikus: aurynn: enjoy [03:08] polotek: but honestly I like the completely tag-based tal style [03:08] aurynn: mattikus, I am :) [03:08] jamescarr: what is the proper way to download and install all the deps in a package.json? I thought npm install . did the trick? [03:09] jamescarr: that seems to install it, but then it is messed up [03:09] blogometer: All right, thanks. I'm going to try a few and see which one I like. [03:09] blogometer: Thank you. [03:10] robotarmy has joined the channel [03:10] polotek: jamescarr: npm does try to install deps [03:10] polotek: but could be your paths are busted [03:10] polotek: what problems are you having? [03:10] polotek: http://phptal.org/ [03:10] polotek: it looks like that [03:10] polotek: sorry [03:10] polotek: only half of that is for jamescarr [03:10] mattikus: i bet you are [03:11] brianleroux has joined the channel [03:11] polotek: mattikus: no seriously, that's the php version and I only liked there because it gets right to examples [03:11] polotek: it's a python-based spec for Zope [03:11] polotek: http://wiki.zope.org/ZPT/TAL [03:11] polotek: it's more verbose obviously but has nice features [03:11] Validatorian has joined the channel [03:12] polotek: for one, it's just xml/html so my editing mode actually works [03:12] polotek: editor support for template languages sucks [03:12] polotek: everywhere [03:12] polotek: but editor support for xml/html is badass [03:13] polotek: also, it validates as xml, which is a first line defense against bad template code [03:13] polotek: instead of reloading, getting a broken page [03:13] polotek: and finding the "}" you forgot [03:14] polotek: your editor will scream invalid and it'll even show you where [03:15] trentm has joined the channel [03:15] polotek: this is a nice alternative to depending your template language having decent debugging features [03:15] polotek: which they almost never do [03:15] mikeal: damn [03:15] mikeal: tim is out [03:18] trentm: hi all, has there been any past discussion on triaging the github.com/ry/node/issues list a bit? [03:18] trentm: there are a number of bugs there that could be closed to just get them out of the way [03:19] ryah: yeah im bad about going through it [03:19] trentm: it irks me to see an obvious "close" bug and not be albe to close it :) [03:20] ryah: trentm: if you tell me, i'll close them [03:20] trentm: right, k [03:21] ryah: trentm: you're the guy that did the repl stuff? [03:21] trentm: yup [03:21] ryah: trentm: it's really nice, the tab completion [03:21] huyhong1 has joined the channel [03:21] polotek: trentm: full of win [03:21] trentm: thanks. [03:21] trentm: I have a couple more patches coming right away [03:21] ryah: trentm: colors would be good :) [03:21] ryah: for json [03:21] trentm: (not the "move the completions to the bottom" tho) [03:21] ryah: sys.inspect [03:21] micheil: that could be useful [03:22] micheil: but be careful not to over do it. [03:22] trentm: ACTION is ignorant of terminal colors [03:22] ryah: they're just like some command codes. [03:22] trentm: I can learn tho. Any good pointers on terminal magic? [03:22] micheil: trentm: google for them. [03:22] trentm: fair enough :) [03:22] ryah: trentm: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors [03:22] blogometer: I would like some dtrace please. [03:22] micheil: "bash color escape codes" or something like what ryah posted [03:23] blogometer: Will you please email me some? [03:23] ryah: blogometer: :) [03:23] danielzilla: trentm: http://github.com/Marak/colors.js [03:23] trentm: ryah: can close http://github.com/ry/node/issues#issue/68 [03:23] ryah: if we did do colors, it shouldn't be too much [03:23] ryah: as micheil says [03:23] ryah: but a little bold here and ther emight be nice [03:24] ryah: trentm: done [03:24] jb55: is there a way to get vi-like keybinds in the node repl? [03:24] huyhong1 has left the channel [03:24] ditesh|cassini has joined the channel [03:24] micheil: ryah: I often quite agree with something like green being used for strings and such [03:25] blogometer: Which would be this: [03:25] blogometer: http://sourceware.org/systemtap/ [03:25] trentm: danielzilla: I could just have the repl use `.rainbow` on all output :) [03:25] blogometer: jb55: Yes! vi-bindings. [03:26] micheil: ryah: and yes, I do owe you a lot of patches. >_> [03:26] ryah: blogometer: ive never tried it, but cantrill's opinion of systemtap is not high [03:26] danielzilla: trentm: http://www.flickr.com/explore/panda <- Please? [03:26] davidwalsh has joined the channel [03:26] blogometer: He seem like the kind of guy who's opinions would very high or very low. [03:27] ryah: blogometer: http://dtrace.org/blogs/bmc/2010/07/30/hello-joyent/ [03:27] danielzilla: trentm: I was mostly pointing it out as a reference, not as something to necessarily use. [03:27] blogometer: I'm reading through the comments here: [03:27] blogometer: http://software.intel.com/en-us/blogs/2007/05/15/why-linux-people-lust-after-dtrace/ [03:27] trentm: danielzilla: yup [03:27] trentm: isaacs: here? [03:27] danielzilla: ACTION is seriously going to be quiet now. [03:28] blogometer: When was this move for Brian? Another person fleeing Larry the Destoroyer? [03:29] blogometer: Oh, hey, Ryan has a Tech Talk. [03:29] micheil: seeing stuff like static, void, etc in javascript documentation is weird (yes, YUI, I'm looking at you.) [03:30] polotek: blogometer: ry has many talks. [03:30] polotek: ryah: are you sick of doing the "here's node and here's why it's cool" talk? [03:30] ryah: yes [03:30] blogometer: Oh, wow, he does have a lot of talks. [03:32] jamescarr: hmmm.. anyone know where I could grab a listing of chrome events? [03:32] mikeal: ryah: you should give out an intro to node slide deck [03:32] mikeal: and encourage non-you people to use it [03:32] benburkert has joined the channel [03:32] aheckmann has left the channel [03:35] micheil: mikeal: I like that, "non-you people" [03:36] ryah: mikeal: yeah, maybe [03:36] ryah: got to find someone good at it [03:36] micheil: I could probably do it; If I made it to enough conferences / got invited to speak. [03:37] trentm: ryah: http://github.com/ry/node/issues#issue/168 and http://github.com/ry/node/issues/issue/205 are dupes. The former has a less misleading title. You could just close 205. They both have comments pointing to the other as a dupe. [03:37] mikeal: Tim is good at explaining things to people [03:39] blogometer: I'm so glad I did not pursue Erlang. [03:39] jb55: blogometer: can never go wrong learning a new language [03:39] aurynn: node.js is certainly high-gain awesome :) [03:40] kevm_ has joined the channel [03:41] polotek: Erlang is has really awesome ideas [03:41] polotek: I just can't see myself being comfortable with a lisp language for full time development [03:41] mikeal: erlang isn't lispy [03:41] blogometer: jb55: Sure. But, Node.js is the right thing for me right now. [03:42] polotek: mikeal: well yeah, but it's really functional and really weird [03:42] blogometer: I'm ending a long and unhappy relationship with Java. [03:42] mikeal: it's more like ML than like lisp [03:42] polotek: two major things in common with a list [03:42] polotek: lisp [03:42] mikeal: erlang is mostly it's own thing [03:42] polotek: sure. don't know much about ML [03:42] polotek: either way, it's weird [03:43] polotek: and programming is hard enough without the language causing more cognitive dissonnce [03:43] polotek: dissonance [03:43] mikeal: well.... [03:43] mikeal: it's a different way of programming [03:43] mikeal: and it's better for some things [03:43] mikeal: but i wouldn't call erlang a general purpose language [03:43] polotek: mikeal: yes, different than people's brain works [03:43] JimBastard: baaah, dont judge me bro http://nodeknockout.com/judging [03:43] mikeal: computers don't work like people's brains [03:43] jb55: javascript: language of the cloud? discuss. [03:44] mikeal: if you want a language that is like people think go with perl [03:44] polotek: mikeal: true, and that is the challenge [03:44] polotek: it's people that make computer's useful [03:44] polotek: so programming should be optimized for people [03:45] jb55: people introduce bugs! [03:45] polotek: programming in erlang is like trying to explain something to a computer in a language that isn't your native one [03:45] jb55: be one with the universe, code in Haskell! [03:45] mikeal: i don't agree [03:45] polotek: jb55: people also introduce features [03:46] jb55: lol [03:46] mikeal: a paint brush is optimized more for how it puts paint to canvas than how someone holds it [03:46] mikeal: you deal with holding an odly shaped brush if it paints better [03:46] aurynn: Invalid byte sequence. [03:46] polotek: mikeal: that's the wrong analogy. it's more like trying to hold the paintbrush with your feet [03:46] mikeal: programming languages should be optimized for bridging the gap between the theoretical structure of applications and the very real implementation of computing [03:46] polotek: you can still do it [03:46] polotek: still the same rules [03:46] polotek: but it's damn awkward [03:47] mikeal: the thing is [03:47] mikeal: once you learn erlang, you just think about solving problems differently [03:47] polotek: what I'm talking about is cognitive patterns [03:47] polotek: oh, I don't doubt that [03:47] mikeal: and it's not any more or less differently than how you do them in node if you didn't already know javascript [03:47] polotek: learning a language with a different perspective can be enlightening [03:47] polotek: but it doesn't change your cognitive patterns really [03:48] polotek: it changes your cognitive creativity [03:48] jb55: I disagree strongly [03:48] mikeal: thing about javascript is that you have to know it, you really have no choice [03:48] jb55: very strongly [03:48] mikeal: thats' a huge advantage [03:48] jb55: haskell has changed the way I program [03:48] jb55: fundamentally [03:48] jb55: for the better [03:48] mikeal: because it makes no compromises [03:49] polotek: jb55: perhaps I'm not explaining things properly [03:49] mjr_ has joined the channel [03:49] polotek: I'm not saying erlang has nothing to offer [03:49] mikeal: you have to bend to it, so you learn from it [03:49] aurynn: I have a stronger grasp of javascript now than I did before; And a much stronger grasp of event-based concurrency. Which is *hard* to get your head around [03:49] polotek: I'm saying once you absorb those lessons [03:49] polotek: then programming in the awkward language just becomes an obstacle [03:49] mikeal: learning functional programming makes you a much better js developer [03:49] mikeal: that's for sure [03:49] mikeal: define "awkward"? [03:49] polotek: you can transfer that knowledge to a language with an easier cognitive grasp [03:50] polotek: mikeal: awkward means I have to think about the structure of the code rather than the structure of the program [03:51] mikeal: so this is a syntax issue? [03:51] polotek: yes, almost entirely [03:51] polotek: it's like learning a new spoken language [03:51] polotek: have you ever studied japanese [03:51] polotek: they say the same things we do [03:51] polotek: they just do it in such a way that it feels awkward to us [03:52] polotek: when I look at japanese I have to dissect it and translate it into english before I can glean the meaning [03:52] polotek: that's what I have to do with erlang [03:52] polotek: dissect and translate [03:52] polotek: and then the light bulb turns on [03:53] jb55: so your arguing the power continuum of languages is pretty much the same and the differences are purely syntactical? [03:53] polotek: jb55: nah, nothing that general [03:53] polotek: if you're saying "power continuum" [03:53] polotek: I guess I would say languages give access to overlapping subsets of it [03:54] blogometer: ACTION laughing at "people also introduce features" [03:54] polotek: some languages make it easier to access certain parts [03:54] codemariner: hello, i'm attempting to proxy an http post request via node.js, I can grab the post body but I can't seem to forward it to the destination server. any ideas? http://pastebin.com/L7TSbhe0 [03:54] polotek: erlang seems to give access to parts that are harder to access in traditional c-like languages [03:54] polotek: which is good [03:55] mattikus has joined the channel [03:55] polotek: but the path to get there is difficult [03:55] polotek: and I wouldn't want to walk it every day [03:56] jamescarr: odd [03:56] jb55: depends on the person I guess, I see it as good fun [03:57] jb55: I keep a list of languages to learn next :P [03:58] polotek: codemariner: what problems are you having? [03:58] polotek: jb55: don't get me wrong [03:59] polotek: exercising cognitive skills is essential [03:59] polotek: but the payoff of that is being better able to solve problems [03:59] polotek: and when you sit down to solve a problem [03:59] mjr_: One of these days, I'm going to look at erlang so I can understand couchdb error messages. [03:59] polotek: everything else should be as smooth as possible [03:59] polotek: I don't want to fight with the language [03:59] polotek: or my editor [04:00] codemariner: polotek: trying to proxy http requests to another server, trying make post requests work, it's making the request but doesn't seem to be adding the post body... was just looking over more docs and I think I might need to set the content-length header [04:00] polotek: or my slow computer [04:00] polotek: mjr_: case in point [04:00] mjr_: codemariner: you'll need to do a remoteReq.write() somewhere [04:00] codemariner: mjr_: yeah, i am... http://pastebin.com/L7TSbhe0 [04:01] polotek: codemariner: yes, also you are only listening for the first 'data' event [04:01] polotek: before starting your remote request [04:01] polotek: there may be more [04:01] aurynn: blah [04:02] mjr_: Still it ought to send something to the remote and then end the request. [04:02] mattikus has joined the channel [04:02] hoodow has joined the channel [04:02] mjr_: polotek: I actually do want to fight with your editor. I hear its a real asshole. [04:02] codemariner: yeah, could be.. just tried setting content-length but no go, just updated the pastebin [04:02] codemariner: mjr_: yeah, it does make the request... [04:02] codemariner: there's just no post parameters [04:02] mattikus has joined the channel [04:02] polotek: emacs? yes. it's ornery [04:03] polotek: we have a tentative truce [04:03] codemariner: i can dump to log and see the post parameters, just not getting passed on [04:03] mjr_: M-x do-what-i-mean-without-giving-me-repetitive-strain-injury [04:03] aurynn: So, culturally, is it acceptable to push broken code to github? [04:04] polotek: aurynn: to your own github? sure. it's nicer to do it in a branch instead of master though [04:04] jb55: -am Updated bindings *this shit is broken* [04:05] polotek: codemariner: you should be buffering up the incoming post data in your "data" event [04:06] polotek: then listen for localReq.on("end",...) [04:06] polotek: that is where you should add the post and start the remoteReq [04:06] polotek: that still doesn't explain why it's not sending right now [04:06] polotek: but it's a good idea anyway [04:06] codemariner: polotek: 'should' because of chunking [04:06] codemariner: ? [04:07] codemariner: polotek: yeah, just trying to get a proof of concept working, looking for baby steps at the moment [04:07] polotek: polotek: yeah you should always be prepared for multiple data events [04:08] codemariner: polotek: agreed [04:08] aurynn: typeof null is object? Huh. [04:08] polotek: aurynn: just let it go man [04:08] danielzilla: polotek: (wo)man [04:09] polotek: aurynn: pardon [04:09] aurynn: polotek, I was just going "teh?" at that :) [04:09] polotek: danielzilla: thx [04:09] micheil: danielzilla: daniel dreadnode zilla? [04:09] jamescarr: hmmm... [04:09] danielzilla: dreadnoe? [04:10] jamescarr: I wonder if it's possible to use web sockets to stream data from one use to another? [04:10] danielzilla: s/noe/node/ [04:10] micheil: k. [04:10] aurynn: switch/else should be valid. [04:10] polotek: aurynn: ? [04:10] danielzilla: micheil: Sorry, I don't follow. [04:11] danielzilla: aurynn: Link? Pastebin? [04:11] aurynn: polotek, that would be the default: action, because I forgot it existed for a moment. [04:11] micheil: danielzilla: I thought you were someone else. [04:11] polotek: oh codemariner are you setting the content type for the post? [04:11] danielzilla: micheil: Sorry, nope. danielzilla == daniellindsley == toastdriven [04:11] overra has joined the channel [04:12] codemariner: polotek: hmm.. nope, looks like i have the wrong case for 'Content-Length' as well, looks like I need to reference 'content-length' from the request headers [04:12] micheil: danielzilla: k [04:12] polotek: codemariner: yeah there's no real standard on case of headers [04:13] polotek: it's an ongoing discussion among web server implementers [04:13] codemariner: wondering if I should just copy all the headers from the server request [04:13] saikat has joined the channel [04:13] codemariner: it's a bit sloppy i'm sure [04:14] polotek: hehe, it would be more "proxy"-ish that way [04:14] polotek: but also dangerous [04:14] codemariner: yeah [04:15] JimBastard: woah, just sent out the first team email to the nyc nodejitsu ninjas [04:15] JimBastard: our team is strong like bruce lee on crack [04:15] mjr_: codemariner: here's a version that does what you want: https://gist.github.com/f676c90b33aec4cb635b [04:15] JimBastard: :-) [04:16] mjr_: codemariner: you can listen for data events on the request even if it is a GET. There will just never be any. [04:16] mjr_: codemariner: so as soon as the incoming request ends, you can end the outgoing request. [04:16] codemariner: mjr_: cool, thanks.. right [04:16] aurynn: Hrm. [04:16] codemariner: mjr_: though i'm guessing i'll still have the same problem [04:16] aurynn: There's a bug in my Bind message. [04:17] mjr_: codemariner: what's the remaining problem? [04:17] wilmoore has joined the channel [04:17] codemariner: mjr_: i like the '.on' syntax [04:17] mjr_: oh yeah, .on is great. [04:17] codemariner: mjr_: the target server is not getting the parameters [04:17] jamescarr: what's the main websocket library available? [04:17] codemariner: mjr_: i think i need to set headers [04:17] codemariner: mjr_: i'll try your sample first [04:17] mjr_: which parameters? Are they in the body? [04:17] codemariner: mjr_: yes [04:17] mjr_: Because I just test ed this with a post, and the outgoing server got the post body. [04:18] codemariner: mjr_: :-p [04:18] mjr_: I just set up a proxy to a local couchdb. [04:18] codemariner: :) [04:18] codemariner: mjr_: hmm... wonder why what i had didn't work [04:18] codemariner: anyway, let me try [04:19] Tim_Smart: You might want to make sure you pause the the localReq when remoteReq starts buffering writes. [04:20] codemariner: mjr_: noo... still no go [04:20] mjr_: codemariner: I think you were parsing the incoming body before it was complete. [04:20] codemariner: going to try to add headers [04:20] mjr_: oh, well, WTF [04:20] codemariner: :-p [04:20] aurynn: Feh. I have to actually declare my format codes. [04:20] polotek: Tim_Smart: did you ever pick a node addon project [04:20] codemariner: might be because it's mongrel [04:20] Tim_Smart: polotek: Not yet. [04:20] aurynn: Which means I should librify up the coding.. [04:20] Tim_Smart: polotek: I got some real work I should be doing first. [04:20] polotek: I wonder if it would be cool to wrap the node http_parser and surface it [04:21] codemariner: yay, that was it... just need to add the correct headers [04:21] codemariner: thanks polotek, mjr_ [04:22] Tim_Smart: polotek: http://github.com/ry/node/blob/master/lib/http.js#L16 ? [04:22] codemariner: the first steps for my whyday project are underway :) [04:22] polotek: Tim_Smart: oooooo [04:22] polotek: didn't event realize that [04:23] polotek: thought it was all in C land [04:23] Tim_Smart: polotek: http://github.com/ry/node/blob/master/src/node_http_parser.cc [04:23] Tim_Smart: That is the bindings. [04:23] polotek: Tim_Smart: yeah I know about that [04:23] polotek: didn't realize it was a fully js binding thought [04:23] polotek: though [04:24] polotek: thanks [04:24] mjr_: polotek: I use that with node_pcap to feed raw data off the wire back into node's HTTP parser. http://github.com/mranney/node_pcap/blob/master/pcap.js#L904 [04:24] mjr_: It works really well. [04:24] aurynn: ACTION heads off to bed [04:24] polotek: mjr_: word [04:25] polotek: okay, time for bed [04:25] mjr_: I need to tie in felixge's mysql parser now. [04:25] dnm: ACTION cries thinking about OSOL and DTrace. [04:25] dnm: Hey mjr [04:25] mjr_: Hey dnm. [04:26] mjr_: I think we'll have DTrace probes in node in a little while. [04:26] polotek: preview of new libxmljs wiki http://github.com/polotek/libxmljs/wiki [04:26] dnm: Das ist gut. [04:26] polotek: later folks [04:26] stepheneb has joined the channel [04:26] dnm: There was a guy working off and on on DTrace probes in Erlang, but I don't think it finished, and has been stalled again. [04:27] polotek has left the channel [04:27] dnm: I'm just upset OpenSolaris was cut off at the knees. Hopefully Illumos works out. Rooting for them. [04:27] alcuadrado has joined the channel [04:28] dnm: OK, reading more scrollback. [04:28] mjr_: I hadn't actually heard about opensolaris vis. a vis. its doom. [04:29] dnm: I guess it's not official yet, but an email leaked basically saying Oracle is no longer going to be developing Solaris in the open. [04:29] dnm: There will still be code drops after releases as per individual file licenses require, etc., I guess. [04:29] icozzo: seriously? [04:29] dnm: Yeah. [04:29] mtodd has joined the channel [04:29] icozzo: so what will come of opensolaris? [04:29] dnm: I mean, I'm not an Oracle person, I just read things on the Internet, but. [04:30] dnm: http://mail.opensolaris.org/pipermail/opensolaris-discuss/2010-August/059310.html [04:30] icozzo: wow. [04:30] dnm: Not sure. But, timely enough, earlier in the week (last week), before the anouncement, Illumos started up. Mostly they're trying to reimplement the few key parts of OSOL that weren't open sourced, like some hardware drivers, the NFS lock manager, etc., etc. [04:31] dnm: And it's mostly ex-Sun Solaris core team devs. [04:31] dnm: http://illumos.org/ [04:31] icozzo: yea I heard about them a few weeks ago [04:31] icozzo: was wondering why they branched [04:31] icozzo: makes sense now [04:31] dnm: So I guess originall the Illumos guys didn't want to fork, were willing to contribute upstream to Oracle, but now their hand is forced. [04:32] dnm: Remains to be seen if they can get stuff together to actually make it real, but I certainly hope so. I like OSOL a ton. [04:32] dnm: s/originall/originally/ [04:32] icozzo: Oracle sure has been on a tangent recent eh [04:33] dnm: DTrace is indispensible, ZFS is awesome, Zones are sweet, Crossbow is interesting. [04:33] Tim_Smart: Meh all that mail thing says to me is "We are greedy and want more moneyz" [04:33] dnm: Well, I don't know, the [04:33] dnm: y're being Oracle. [04:33] dnm: More than anything else. [04:33] dnm: None of this is surprising to me. [04:33] dnm: Just somewhat saddening. [04:33] icozzo: I think what it's clearing saying is "open source is no longer a priority for oracle as a whole, you mysql folks better start sweating" [04:33] icozzo: s/clearing/clearly [04:33] mjr_: Oracle should change their motto to, "Oracle: shut the fuck up, kid" [04:34] mattikus_ has joined the channel [04:34] Tim_Smart: "Oracle: smd" [04:34] JimBastard: fuck oracle [04:34] icozzo: i like it [04:34] JimBastard: fuck sun [04:34] JimBastard: fuck java [04:34] JimBastard: fuck mysql [04:34] JimBastard: do it all in node [04:34] mjr_: JimBastard: consider them fucked. [04:34] mattikus_ has joined the channel [04:35] Tim_Smart: JimBastard, I wouldn't do that, they probably enjoy it. [04:35] dnm: I made a stupid blog post back when I still cared about my blog around the time they bought Sleepycat (remember that?) that seems oddly prescient now: http://aezenix.com/~dnm/tdw/2006/02/electric-larryland.html [04:35] JimBastard: Tim_Smart: :p are you in the nodeknockout? [04:35] Tim_Smart: Nope. [04:35] falconair has joined the channel [04:35] Tim_Smart: I was, but suddenly the whole team became judges. [04:36] mikeal: sorry :( [04:36] JimBastard: lol fail [04:36] Tim_Smart: Haha. [04:36] Tim_Smart: All good, I don't have any idea anyway. [04:36] mjr_: Tim_Smart: surely another team would take you if you asked around, no? [04:36] JimBastard: burger time [04:36] Tim_Smart: *ideas [04:36] dnm: libev and libeio are BSD'd. Sweet. [04:36] icozzo: Man I loved BerekeleyDB [04:37] Tim_Smart: mjr_: Probably. I'm not fussed. [04:37] dnm: I never fully understood Berkeley DB. [04:37] dnm: Weird locking/writing semantics. [04:37] ryah: Tim_Smart: need a team? [04:37] mjr_: dnm: as you know, Berkeley is a Nuclear Fee Zone. I think that explains a lot. [04:37] dnm: Indeed. [04:38] dnm: Almost any story I hear out here involving a person from Berkeley is wildly unsurprising, yet East Coasters are (rightfully) SHOCKED! [04:38] dnm: You have to experience the insanity to come to terms with it, I guess. [04:38] icozzo: haha [04:39] srh has joined the channel [04:39] dnm: I'm still on a mailing list with a bunch of Berkeley and Albany locals and sometimes the topics are just so... Berkeley. [04:39] dnm: Like, co-housing. [04:40] dnm: Not that there's anything wrong with that. [04:40] icozzo: I love that after pioneering the technology they decide they don't want that shit anywhere near them. [04:41] mjr_: dnm: you discovered node a couple of weeks too late, and now the node knockout is full. [04:41] ryah: is the announcer dead? [04:41] dnm: Berkeley city politics is a psychadelic cesspool of seething passive agression and rampant hall-monitor mentality. It's wild. [04:41] icozzo: "Eh.. send it to NM, those guys live in between Arizona and Texas, they probably want to die." [04:42] dnm: And I guess I accidentally mean psychadelic in more than a metaphorical sense. [04:42] dnm: What is nodeknockout? [04:42] jb55: where node developers fight to the death [04:42] dnm: Who runs bartertown? [04:42] Tim_Smart: ryah: I wouldn't turn down a offer, if someone needed an extra person. [04:43] ryah: good [04:43] mattikus has joined the channel [04:43] dnm: I'm hardly a node developer. I'm at most an interested bystander right now. [04:43] dnm: I did get it running on my Linode today, in between waiting for emails at work. [04:43] mjr_: dnm: but you'd be a good person to implement, say, a node binding to the erlang-only Riak core. [04:44] dnm: Hrm. Possibly. Didn't someone already write a binding to the protobuf interface to Riak though? [04:44] mikeal: protobuf is the cool part anyway :) [04:45] MikhX has joined the channel [04:45] mjr_: mikeal: did you notice how the riak core announcement sort of suggested that somebody should do a riak + couchdb mashup? [04:45] mikeal: we've been getting that a lot on the list lately [04:45] mikeal: it's not a good enough match [04:45] ingemar has joined the channel [04:46] dnm: Holy sponsors Adman! [04:46] dnm: God, is Chris's jsconf logo huge enough? [04:46] mikeal: haha [04:46] jakehow has joined the channel [04:47] mjr_: mikeal: any update on your client pool and client keepalive? [04:47] mikeal: keep alive is in node-core [04:47] mikeal: for the last like 2 releases [04:47] mikeal: client pool is now an external library [04:47] dnm: Besides, I still have to figure out this "git" thing. [04:47] mikeal: http://github.com/mikeal/node-utils/tree/master/pool [04:47] mjr_: oh shit, I guess I missed that. [04:47] mjr_: I thought it was still all in your lib. [04:48] cardona507 has joined the channel [04:48] ryah: it's really a lot of work keeping up with the node list... [04:48] mjr_: I have too many things I'm trying to worry about. Need to outsource. [04:48] benburkert has joined the channel [04:48] mjr_: ryah: until very recently, I read every single message on the node list. I think I've got like 200+ unread in there now. [04:49] ryah: i read every message - because often in the middle of a long thread someone will be like "ryan what do you think?" [04:49] EyePulp has joined the channel [04:49] dnm: For the same reason, I'm signing off the Clojure list. [04:49] dnm: All proglang lists become unmanageable if your lang is mildly interesting. [04:50] ryah: hm [04:50] ryah: yeah - would be nice if it had less traffic [04:50] wllm has joined the channel [04:50] ryah: just slightly les [04:51] dnm: I try reading things in NNTP mirrors [04:51] mikeal: splitting off a user list would be good [04:51] ryah: so that it's still good for procrastinating [04:51] dnm: It is arguably better [04:51] mikeal: we get a lot of hello world emails [04:51] mikeal: and i'm done caring about them [04:51] dnm: GMANE, et al. [04:52] mikeal: i'd still like to see lib announcments, patches, etc [04:52] ryah: 1100 messages this month already [04:52] ryah: 1200. [04:52] Tim_Smart: I just read the topic list every day, and poke inside the ones that seem interesting. [04:52] ryah: which is 70 messages per day [04:52] mjr_: I'm really torn about the user vs. dev list, but I can't keep up with the volume right now, at least not for the past 2 weeks. [04:53] mikeal: the number of messages is less annoying than the number of threads [04:53] mjr_: gmail powers: activate [04:53] Tim_Smart: Daily Digest ftw. [04:53] mikeal: a digest would be undigestable [04:53] mikeal: ….. get it? [04:53] mjr_: no [04:53] Tim_Smart: hardy har har. [04:53] mjr_: oh wait, yes [04:54] amerine has joined the channel [04:54] dnm: The thing with gmail is if you label stuff say "nodelist" and pull it out of Inbox and into Archive immediately, you will never see those emails again [04:54] mape: wouldn't it be better to split it out to a help group? Seems like those are the ones increasing the number of threads? [04:54] mikeal: people won't post to a help group [04:54] mikeal: it's been tried, i've never seen it work [04:54] mikeal: the dev/user list is pretty standard [04:54] mikeal: apache does it for everything, and it works well [04:55] mjr_: I think a lot of the questions we get are because the answers aren't sufficiently googleable yet. [04:55] dnm: ruby-lang was the first proglang list to bury me in an avalanche of messages [04:55] dnm: The wiki is a good start [04:55] dnm: I've been avoiding the mailing list because the last thing I need is more mail [04:56] dnm: So far I've been able to find everything, but I'm on like, Day 2. [04:56] mjr_: That's really the last thing? [04:56] dnm: OK [04:56] dnm: You got me. [04:56] dnm: A bullet wound ranks even lower. [04:56] dnm: So does food poisioning. [04:56] dnm: But after *that*... [04:57] mikeal: mjr_: there are never going to be googleable [04:57] mikeal: because the project is named "node" :) [04:57] dnm: node oracle: live node service that you ask questions about node to, it provides answers. answers sourced from wiki, source code, whatever. [04:57] mjr_: yeah, I know. Its so awkward to say "node.js" all the time, but that is a googlable word. [04:58] Tim_Smart: dnm: Do not put oracle in the same sentance as node. [04:58] mjr_: Somebody wrote the docbot that does that. [04:58] dnm: Caution: Oracle may sue for trademark infringement. [04:58] dnm: Beetlejuice... [04:58] Tim_Smart: And people will hate on you. [04:58] JimBastard: Beetlejuice... [04:59] mjr_: stop it, you guys [04:59] dnm: docbot + node chat demo is probably 80% there anyway [04:59] JimBastard: Beetlejuice ͈͚̦̫͔̥͙̝͔͙̼͙͓̲͔͔̳͚̜͈̰͖̗̮̩̪͈̖̰̞͍͚̘̙̤̗̬̤̣͔͎̫̺̘̠̮͙̲͇̠̗͔͇̳̤̣͚͓̝̰̼̠̩͚̫̗̦̻͔͍͈̤̰̟͔͇̜̖̞͍̭͕̱̹̲̤̙̰̙̼͎̖͎̲̪̳̻̯̝̤̺̻͍͚̻͍̰̦̗̯̱͖̖̗̻̲̺̺̻͉̪̼̳̭͉͈̹̻̫̤̙̮̝ [04:59] JimBastard: fuuudge [04:59] JimBastard: sundae [04:59] dnm: Sadly, not even that can resuscitate the career of Michael Keaton [05:00] JimBastard: node.js ͭ̃̅͒̽ͦͤ̎ͯ̆́͋̂͌̀͐ͦ̿̊̀ͮͦͦ̎̀͗͆̓̊̔ͣͥ̈́̏̀̏͌ͦ̈ͥ̋ͯͭͫ͋̄̾ͭ̓̈̇ͮͥ̔ͯ̔̎͂̑ͨͪ̄͒ͣ͗̿͌̐ͫͯͬ̍̄̅̂̓̄̄͂͒̈͑̓ͧͫͩͮ̔ͭͮ̔ͤͦ̉̒͗̿͂́ͬ̊ͧ̐ͯ͐ͣͩ̔͗ͯ͒͛ͫͭͧ̏̄͒ͨͧͭ̿̉ͮ͂̂ͨ͑̓ͥ̓̓ [05:00] dnm: Although I hear he is good in The Good Guys [05:01] dnm: So what are people building for node KO? [05:01] visnup has joined the channel [05:01] dnm: Or is it secret? [05:01] blogometer: ryah: http://github.com/bigeasy/node/tree/windows/deps/libeio/windows/ [05:01] dnm: Whoa, seet. [05:02] dnm: Oh, wait. [05:02] blogometer: ryah: http://github.com/bigeasy/node/blob/windows/deps/libeio/windows/missing.h [05:02] tmpvar: blogometer, interesting [05:03] dnm: blogometer: Is this yours? [05:03] tmpvar: you make me wish i hadn't deleted my fork [05:03] tmpvar: im going to look to make sure i dont have a local copy somewhere [05:03] blogometer: It doesn't look so daunting, well, somewhat less daunting. [05:03] blogometer: dnm: Yes. [05:04] blogometer: I need to add a README, but... [05:04] ryah: blogometer: is it working? [05:05] blogometer: ryah: No. This is step 1. [05:05] blogometer: Just builds. The missing functions are not defined anywhere. [05:05] dnm: Yeah, I was about to say [05:05] dnm: Stil, glad you're working on it! [05:05] blogometer: eio.c compiles without errors or warnings. [05:06] dnm: I was looking at libev tonight with the same basic idea in mind. [05:06] blogometer: (Many pragma disabled, since they are warnings about eio.c, and we don't want to change it.) [05:07] blogometer: But, install VC++ 2008, put pthreads somewhere, load this project, update the include path for your pthreads install, and it will build. [05:07] blogometer: So, step 1: Get it hackable. [05:07] tmpvar: aha, i do have it [05:07] blogometer: tmpvar: Sweet. [05:07] tmpvar: its sort of useless, but I can push it up there [05:07] tmpvar: old old old stuff [05:07] dnm: Do it. [05:07] tmpvar: january [05:07] blogometer: Anything. [05:07] blogometer: Better than nothing. [05:08] blogometer: So, the point is that, this is what was missing, in order to get it to build... [05:08] blogometer: http://github.com/bigeasy/node/blob/windows/deps/libeio/windows/missing.h [05:08] mjr_: I wonder if someone is going to a working windows port for node knockout. [05:08] dnm: It won't be me. [05:08] dnm: I'd like to, but I don't have enough time. [05:08] dnm: Hope someone else does! [05:08] Tim_Smart: Meh, windows. [05:09] blogometer: Yeah. I know. Meh. But, I'd like it for my peer to peer fantasies. [05:09] dnm: I was looking through the available Windows asynch I/O backend choices to jam into a libev fork though [05:09] blogometer: Even though performance will be a joke. [05:09] dnm: blogometer: Re: P2P, you and I are on similar wavelengths. [05:10] blogometer: dnm: Part of this exercise was to set up an MSVC dev env that didn't require any changes to libeio itself. [05:10] blogometer: I got away with changing only three lines in eio.c. [05:10] dnm: I am curious to see how good/bad I/O completion ports would be as a Windows libev backend. [05:10] tmpvar: blogometer, http://github.com/tmpvar/node/commits/tmpvar-windoze-old [05:11] Tim_Smart: Also, if you wanted to make a cross-platform GUI with node :D [05:11] tmpvar: who would want to do that ;) [05:11] dnm: I am totally for using Windows APIs if wrapped in an intermediate lib like libev [05:11] dnm: Tim_Smart: HTML. Done! [05:11] dnm: Perhaps that is cheating. [05:12] dnm: I am nothing if not lazy. [05:12] jb55: hmm windows + p2p + node-dht ? :o [05:12] mjr_: I've spent a bunch of the last few years of my life trying to do cross-platform GUI code. I kind of want it back. [05:12] Tim_Smart: I might do some work on this http://github.com/Tim-Smart/node-gtk [05:12] tmpvar: blogometer, so that was my attempt.. got stuck on the pipe stuff and got caught up in writing a dom lol [05:12] Tim_Smart: http://github.com/brainfucker/node-gui rather. [05:12] KungFuHamster_ has joined the channel [05:12] tmpvar: gtk, pewww [05:13] blogometer: The pipe stuff is sticky, isn't it. [05:13] dnm: There's an interesting thread of discussion on reactive programming + immediate mode graphics type GUI programming I have on my list to read up on, but that's about all I know that seems promising. [05:13] tmpvar: blogometer, yes it is [05:13] dnm: At least more promising that the current normal GUI toolkit "pick your poison" state of affairs. [05:13] dnm: Also, it may be yet more poison. Just, type-safe poison. [05:13] tmpvar: heh [05:14] blogometer: Tim_Smart: Node.js Swing. Hah! [05:14] tmpvar: wow [05:14] dnm: Gah [05:14] jb55: noooo [05:14] jb55: node-qt [05:14] blogometer: node-qt +1 [05:15] blogometer: A Node.js way of punching out a little nativeish lookish gui would open a flood gate. [05:15] ryah: yep [05:15] blogometer: tmpvar: Where did you get your pipe inspiration? [05:15] tmpvar: blogometer, google, cygwin, and msdn lol [05:16] ryah: html-ish way of punching out a gui [05:16] benburkert has joined the channel [05:16] ryah: would be even better [05:16] dnm: Someone could conceivably hack a Node variant that jammed FLTK or WxWidgets into the runtime, and gave you an implicit top-level GUI object, like Wish for Tcl. [05:16] dnm: ryah: A la Bowline? [05:16] tmpvar: clutter :) [05:16] dnm: tmpvar: Well, sure, but as an experiment [05:17] mjr_: why not just node-webkit. [05:17] tmpvar: oh, no I mean.. http://www.clutter-project.org/ [05:17] dnm: Oh [05:17] dnm: Looking... [05:17] pquerna: ryah: well, shouldn't someone just.. embed node.js in a webkit-skinned thing, and add a few apis for windowing? [05:17] Tim_Smart: blogometer: node-qt sounds like fun. [05:17] jb55: isn't there a qtwebkit? [05:17] pquerna: (isn't someone already doing that?) [05:17] dnm: Oh, an OGL/OGLES wrapper? [05:18] jb55: now we're talking [05:18] mape: tmpvar did that? [05:18] dnm: I was thinking about GL too, actually, but didn't know about this. Thanks! [05:18] tmpvar: dnm, there have been several attempts [05:18] blogometer: webkit in a frame with node js is an instant gaming platform. [05:18] mjr_: qt does have a qtwebview or something like that. [05:18] tmpvar: mape, yeah... sort of, it was all fixed pipeline [05:18] ryah: pquerna: i suppose [05:18] tmpvar: problem with ogl is you need a rendering context .. which means you need to integrate with the wm [05:18] ryah: im not really into gui apps myself [05:18] ryah: but i suppose gui people like real toolkit stuff [05:19] blogometer: (So much more interesting than a Java chat room.) [05:19] mjr_: If you want a GUI app, bind to the UI framework for whatever platform you want to run on. [05:19] jb55: qtbutton.click(function() {}) possibilities... [05:19] mjr_: Anything else will be an endless series of compromises. [05:19] mjr_: It'll all seem easy at first, andthen after a while, it'll get slower and slower, and things will never look quite right. [05:19] blogometer: tmpvar: If you wanted an easy win with libeio Windows port, what would you do? [05:21] tmpvar: blogometer, good question.. I havent dug into it [05:21] blogometer: Node.js GUI. I might use it for small things, like installers or control panels, and rewrite for Linux, OS X, Windows using the best bindings for each. [05:21] blogometer: Rather than the lowest common denominator. [05:21] blogometer: tmpvar: Okay. I figured you probably went for pipes first because they are the most broken, least promising. [05:22] dnm: I think this contest needs a few more judges. [05:22] dnm: Holy crap. [05:22] blogometer: dnm: LOL. [05:22] jb55: see all the teams? jesus [05:22] Tim_Smart: I guess cli UI's are cooler anyway. [05:23] blogometer: mjr_: Sorry, I just said the same thing you said about GUIs. Agreed. [05:23] Tim_Smart: Can hide them away in screen sessions [05:23] tmpvar: blogometer, right. the problem is select()'ing on the pipes. I believe there is a way to get an fd from files/pipes on windows, but I forget where I saw it [05:23] blogometer: Async sockets is easiest? [05:23] tmpvar: yeah, most likely [05:24] fictorial has joined the channel [05:24] mjr_: blogometer: for lowest common denominator things, IMO just use HTML. [05:24] tmpvar: you could even wrap it up in a nice little lib, and include it on both ends (node<->libeio port) [05:24] blogometer: Getting a working Hello, World! on Windows. [05:24] mjr_: But if you want a really good GUI, you've gotta use the native toolkits. [05:24] dnm: This contestant's name is "catshirt" [05:24] Tim_Smart: mjr_: I'm just wondering how you would get cocoa to play with node. [05:24] tmpvar: yeah, html is definitely the lowest common denominator [05:24] dnm: That is fucking awesome. [05:24] blogometer: tmpvar: That last one didn't make sense. Wrap what? [05:24] dnm: I need to work that into a sentence tomorrow. [05:25] ryah: i'd be nice if libeio had a test.c file [05:25] ryah: i guess marc tests it with the perl lib [05:25] tmpvar: blogometer, sorry.. long day. I'm not sure what i meant heh [05:25] ryah: which might be useful, blogometer [05:25] blogometer: ryah: Yes. One that could run ... [05:26] jb55: blogometer: I found this helpful http://bit.ly/9DPvv2 [05:26] blogometer: ... on Linux as a benchmark. [05:26] ryah: http://search.cpan.org/dist/IO-AIO/AIO.pm [05:27] blogometer: jb55: Yes. Helpful. [05:27] ryah: i love perl: http://www.cpantesters.org/distro/I/IO-AIO.html#IO-AIO-3.65 [05:27] ryah: or, cpan i should say [05:28] blogometer: CPAN has a lot of soul. [05:28] blogometer: Oh, I want for Node.js. [05:29] tmpvar: blogometer, aha! http://msdn.microsoft.com/en-us/library/bdts1c9x.aspx [05:29] blogometer: That. [05:29] mtodd has joined the channel [05:29] dnm: So hypothetically, if someone implemented Node but with something other than JS/V8, what would be a sane name to give it to both avoid confusion but reference Node.js? [05:30] blogometer: tmpvar: Okay. In your chat with Marc, you linked to some MS functions and Marc said, they are not part of Windows. [05:30] tmpvar: yeah, what was that.. _write() or something? [05:30] tmpvar: also, this may be helpful: http://svn.apache.org/repos/asf/apr/apr/trunk/file_io/win32/pipe.c [05:31] blogometer: a) Was he right or just grumpy? b) Did you navigate that issue and have a better sense of the MSDN doc. [05:31] blogometer: ? [05:31] mape: dnm: dystopia? ;) [05:31] blogometer: tmpvar: Your Google-fu is strong. [05:31] dnm: Well, that's awfully... bleak [05:31] tmpvar: blogometer, thanks [05:31] tmpvar: let me find the convo [05:32] blogometer: I have the convo in the Wiki. [05:32] dnm: _write exists [05:32] dnm: io.h [05:33] dnm: Since like Win95. [05:33] blogometer: http://github.com/ry/node/wiki/Windows-Port-%28MSVC%29 [05:33] isaacs has joined the channel [05:33] blogometer: http://gist.github.com/403301 [05:33] dnm: http://msdn.microsoft.com/en-us/library/634ca0c2.aspx is your friend [05:33] tmpvar: dnm, nothing on msdn is my friend.. hah [05:34] dnm: Oh come now. [05:34] tmpvar: the actual msdn library application is wonderful [05:34] tmpvar: only thing i used was the index though [05:34] tmpvar: searchable index was really helpful [05:34] tmpvar: ok, so he was saying that ttp://msdn.microsoft.com/en-us/library/aa298551(v=VS.60).aspx "it clearly documents this as not aprt of windows" [05:35] dnm: Same header file. [05:35] dnm: It's totally int here. [05:35] dnm: in there. [05:35] dnm: (though _write is also int. Heh.) [05:35] tmpvar: heh [05:35] dnm: I don't know how he misread that. [05:35] dnm: Not a Windows dev? [05:35] tmpvar: use have to build against libc.lib [05:36] blogometer: Yeah. Static compile. [05:36] tmpvar: definitely not a PC [05:36] blogometer: Right? So, make it a part of your app. [05:36] tmpvar: right, which is completely fine [05:36] tmpvar: by my standards atleast [05:36] blogometer: Here is how little I know about what is going on: [05:36] tmpvar: i think ryah agrees? [05:37] blogometer: Linux unlink is async? [05:37] blogometer: That is a question I am sincerely asking. [05:37] blogometer: I know fs.unlink is async. [05:38] dnm: Yo no se. [05:39] tmpvar: not sure [05:39] blogometer: Okay. So, it is not just me. [05:39] dnm: So I'll say this for Node.js after two days of poking around idly: it's more relaxing than writing CUDA C. [05:40] dnm: Box quote. Print it. Boom. [05:40] hassox has joined the channel [05:40] tmpvar: haha [05:41] blogometer: It is better to link static than redistrubute Cygwin. [05:41] dnm: As someone who is interested in Node.js on Windows, "Fuck Cygwin". [05:41] tmpvar: lol [05:41] blogometer: I see eio_unlink and I also see old fashioned unlink. [05:41] dnm: To the extent I can eliminate Cygwin from a Node.js Windows port, I will, until my interest reserves are exhausted. [05:41] blogometer: dnm: Its still better than asking your users to install Java. [05:41] tmpvar: blah, i have to roll. good luck blogometer [05:42] dnm: blogometer: Highly debatable. [05:42] blogometer: tmpvar: Thanks. [05:42] dnm: For me anyway. [05:42] dnm: tmpvar: Thanks for digging up that old code! [05:44] tmpvar: n [05:44] tmpvar: np* [05:44] tmpvar: peace [05:45] hassox: allo peoples [05:46] isaacs: hello, mr neighman [05:47] isaacs: hows life down under in the land of having sox? [05:48] dnm: (sox?) => 't [05:48] blogometer: Okay. So, next step for eio.c on Windows is to simply implement some dummy functions in a missing.c so I can step through the code and see how it works. Also, create a Eclipse C++ project on Ubuntu to step through and see how it works. [05:48] jochen has joined the channel [05:48] blogometer: FYI. On the topic. Thank you for you attentions. [05:49] dnm: blogometer: If I can recall how to use github's UI, I'll "follow" you. [05:49] micheil: isaacs: bit late for you, ain't it? [05:49] isaacs: micheil: yeah, i'ts almost 2300 [05:49] bpot has joined the channel [05:49] micheil: ACTION is slightly enjoying his 1600. [05:50] micheil: would be better if I didn't have to write some certain code.. [05:50] blogometer: dnm: Any help is appreciated. I'll post something to the list so there is a more coherent discussion. [05:50] dnm: OK. O [05:50] dnm: Err, I'm not on the list, but I will try to be here on evenings. [05:51] dnm: Hrm. Is "watch" what I want? [05:51] tekky has joined the channel [05:52] dnm: OK, I guess I'm watching your entire node fork. Good enough for now! [05:53] mjr_: dnm, what vc do you normally use if not git? [05:53] dnm: You're gonna laugh. [05:53] dnm: darcs + P4 [05:53] mjr_: I only started using git about 3 months ago because of node. Before that, we were an svn shop. [05:53] mjr_: darcs. [05:53] mjr_: Oh man. [05:54] mjr_: But git and github are really quite fantastic. Our whole company uses gh now. [05:54] dnm: I mean, I use others as forced to by project mandate. Every open source project has their own peccadillo when it comes to VC. [05:55] mjr_: I think perforce is a thing you can say that you use and not be embarrassed by. [05:55] dnm: So, my main beef with git is MsysGit is busted, badly. [05:55] dnm: And has like little hope of being unbusted any time soon. [05:55] dnm: I was hoping the Syntevo guys would write a git implementation directly into their SmartGit client, but no such luck yet. [05:56] dnm: Again, I use Windows, so I suck. [05:56] joshbuddy has joined the channel [05:56] mjr_: Yeah, so like I said earlier. [05:56] MikhX has joined the channel [05:56] mjr_: Windows: go back to Russia. [05:56] dnm: My workflow with darcs + P4 has been to use darcs like an "extended save", especially when doing things on $RANDOM_WORK_BOX or $USB_DRIVE, and then check in to my P4 repo at home. [05:57] dnm: I hear it's nice there this time of year. [05:57] dnm: Toxic fumes, burning, corrupt plutocrats. [05:57] mjr_: and the cold tomato soup is quite refreshing. [05:57] dnm: Oh, you'll enjoy the nonsequitirness of this: the other day, I used Netflix instant streaming on my Xbox 360 to watch: [05:57] dnm: _White Nights_ [05:58] mjr_: I don't actually know what that is, but I do wish that Colloquy support "github flavored markdown" [05:58] dnm: Oh man [05:58] dnm: http://www.imdb.com/title/tt0090319/ [05:58] SamuraiJack has joined the channel [05:59] mjr_: Oh sure, one of those Baryshnikov pictures. [05:59] jchris: isaacs: had an nmp install crash dump http://friendpaste.com/2mUXMSLRjIN9ki2nDIB8VB [05:59] topek has joined the channel [05:59] isaacs: jchris: update your nodejs install to at least 0.1.103 [06:00] isaacs: jchris: preferably not through homebrew, for best results [06:00] AAA_awright has joined the channel [06:00] dnm: Anyway, I find svn entirely tollerable. I use SmartSVN to get P4-esque workflow and features, but it's not like SVN's worse than CVS or VSS. *shrug* [06:00] jchris: and here I am in the middle of un-fucking my homebrew git clone [06:00] mjr_: jchris: did mikeal get you drinking the node kool-aid? [06:00] isaacs: dnm: "not worse than cvs" isn't much of a compliment. [06:01] isaacs: dnm: "this garbage doesn't taste so bad. I mean, it's not any worse than sewage, so what's the big deal?" [06:01] jchris: I've been +1 on node since I heard of it, (yay JS that can do things) but I'm finally getting a chance to play with it [06:01] dnm: You'd be surprised the PERFECTLY GOOD FOOD people just THROW AWAY [06:02] dnm: I can admit svn is not the hottest if you want, say, a DVCS way of working. That's fine. [06:02] dnm: I'm surprised by the raging hate-ons for svn and P4 though. [06:02] mjr_: jchris: that's awesome. I'm glad you guys are on board. [06:02] isaacs: dnm: it's also not the hottest if you want to fork, merge, or edit history. [06:03] ryah: jchris: :) [06:03] jchris: mjr_: it's about the perfect thing for asynchronous couchdb _changes handlers [06:03] isaacs: jchris: it bugs me that node and npm aren't more friendly through homebrew, because i like using homebrew for stuff. it's on my todo list to unfuck that. [06:04] isaacs: but, as it stands, today, no one's really being diligent about making it work reliably and keeping it up to date [06:04] jchris: this is my just-had-a-baby project, so I get to work on it for about 30 minutes a day, at random intervals [06:04] mjr_: jchris: I use it for various ways of interacting with couchdb, merging couch results together with other data sources, etc. [06:04] jchris: hopefully I can get to hello-twitter today :) [06:04] isaacs: jchris: congrats :) [06:04] jchris: thanks [06:05] jchris: whats wrong with homebrew node? [06:05] mjr_: isaacs: I am also sad that I cannot "brew install npm" and just get node + npm all working happily. [06:05] jchris: it says it's giving me 0.1.104 [06:05] dnm: Is homebrew an OS X thing? [06:06] isaacs: jchris: homebrew puts things in weird places, in such a way that updating node means you lose all your npm packages every time, and npm then doesn't know how to put stuff in teh $PATH properly (including itself) [06:06] mjr_: dnm: yeah, it's the new hotness that replaces "macports" [06:06] isaacs: it's like macports, except it doesn't download EVERY PIECE OF CODE EVER and compile it every time you do everythign. [06:06] mjr_: dnm: macports is kind of like BSD "port" only less good. [06:07] mjr_: isaacs: if you've ever used BSD port, you'll find that macports is a pretty faithful replica. [06:07] blogometer: mrj_: I do NODE_PATH=/opt/lib/node node foo.js [06:07] dnm: mjr_: Ah. I liked macports well enough, when my Mac worked. [06:07] blogometer: And it works. [06:07] blogometer: Happy with Homebrew. [06:07] dnm: mjr_: I usually use "toast" as a first resort on Unix machines if I need to build from source, like today. [06:07] blogometer: export NODE_PATH=/opt/lib/node [06:07] mjr_: I'm happy very happy with homebrew for everything except node+npm. [06:07] isaacs: mjr_: me too [06:07] dnm: http://toastball.net/toast/ [06:08] blogometer: Just my 0.02 USD. [06:08] dnm: but a friend wrote it, and it's one big wack of mysterious Perl, so, YMMV. [06:08] isaacs: mjr_: it's not a very hard problem to solve, just haven't gotten around to it. now npm has the tools to be able to play nice, so there's no reason it can't work, necessarily [06:08] mjr_: dnm: I didn't really understand what all the fuss was about with git until I forced myself to use it. Now I don't understand how anybody doesn't use it. It's just that good. [06:08] jchris: isaacs: why doesn't npm use ~/.node_libraries [06:08] dnm: mjr_: Yeah, I'm still in the "I abstractly see what's good about it" mode, but not yet past it. [06:08] blogometer: And GitHub. [06:09] isaacs: jchris: because people whined that they wanna install stuff with npm and have it available when they're not logged in as themselves. [06:09] mjr_: dnm: like, I thought svn was plenty fine, but this whole "branching and merging are painless" has really expanded my thinking about what is possible with version control. [06:09] jchris: isaacs: booooooring ;) [06:09] isaacs: jchris: also, people whined that they have like a dozen node installs, and want each npm instance segregated. [06:09] isaacs: jchris: if i weren't one of those people, i'd've ignored them all. [06:09] jchris: that makes sense [06:09] isaacs: ;) [06:09] jchris: gotta keep the node devs happy [06:09] dnm: mjr_: The other thing though is darcs works fine for me, and some other projects use Mercurial, and it has better Windows support, so I've been loathe to pick up git. [06:09] isaacs: jchris: you can set that config easily. npm config set root $HOME/.node_libraries [06:10] jchris: would that do it if I wanna stick with homebrew? [06:10] dnm: If I stay engaged with Node.js, I can see use of git becoming a foregone conclusion. [06:10] blogometer: jchris: export NODE_PATH=/opt/lib/node [06:10] blogometer: If you've installed Homebrew at /opt. [06:10] isaacs: jchris: if you wanna stick with homebrew for node and npm, then you've got lots of headaches. [06:10] mjr_: dnm: yeah, if you have darcs and hg, then I guess you have a lot of the benefits. But seriously though, github is on fire these days. To use github, you more or less need git. [06:10] ryah: ryan@mac1234:~/projects/node% wc -c lib/readline.js 7223 lib/readline.js [06:10] blogometer: jchris: export NODE_PATH=/where/you/put/your/homebrew/lib/node [06:10] ryah: ^-- how large should we allow it to grow? [06:11] ryah: i say 10000 bytes it the limit... [06:11] jchris: ok, sounds worth it to do source install then [06:11] mjr_: ryah: I have about 200 more lines that I'd like to add to get interactive history search and word forward-backward. [06:11] ehaas has joined the channel [06:11] mjr_: and one more thing that I can't remember right now. [06:11] dnm: webmachine and basho generally use hg, for instance, so I use that there. [06:11] isaacs: mjr_: history-search-backward! history-search-forward [06:11] dnm: emacs keybindings. Someone's gotta. [06:12] isaacs: mjr_: those are awesome! [06:12] Blink7 has joined the channel [06:12] blogometer: ACTION Back to work. [06:12] ryah: mjr_: i think those are useful [06:12] jchris: isaacs: y'all should fix this now while its still easy. now that couch is 1.0 we're having to backtrack and make a bunch of stuff noob friendly [06:12] mjr_: word forward/backward is wired into my brain. Every time it doesn't work in the node repl, I get confused. [06:13] jchris: and there are a bunch of old docs that are now wrong, which is the worst part [06:13] mjr_: jchris: you mean like not losing data after a conflict? [06:13] isaacs: oohhhh burrrnnn [06:13] jchris: mjr_: :P [06:13] jchris: it's still on the disk at least http://wiki.couchone.com/page/repair-tool [06:13] isaacs: jchris: yeah, that's the plan [06:14] mjr_: jchris: oh cool, I didn't see that the recovery tool had been released. [06:14] isaacs: looking for apartments is lame. i'd much rather be hacking all day on these things. [06:14] dnm: isaacs: Where are you looking? [06:15] isaacs: dnm: oakland [06:15] dnm: hah! [06:15] isaacs: dnm: lake merrit/adams point/grand lake [06:15] isaacs: piedmont, too [06:15] mjr_: dnm and I used to be roommates in Oakland some years back. [06:15] dnm: Indeed! [06:15] isaacs: oh, neat :) [06:15] dnm: mjr was my landlord. [06:15] mjr_: Oh man, I was such a dick. [06:15] dnm: mjr_: Do you still have the viper? [06:15] admc has joined the channel [06:16] mjr_: dnm: sadly, I just stopped using it and sold it. [06:16] dnm: No you weren't. [06:16] mjr_: Then I did a startup and spent all of the money. [06:16] dnm: These things happen. [06:16] dnm: Startups are fun though. [06:16] dnm: I find myself missing that workplace atmosphere. [06:17] dnm: Parts of it anyway. [06:17] dnm: Debugging COM plugins in Outlook, not so much. [06:17] isaacs: ryah: how would you feel about putting glob into the fs module or something? [06:17] mjr_: dnm: but you can really fight spam a lot better that way. [06:17] pdelgallego has joined the channel [06:17] wllm has joined the channel [06:17] dnm: So I believed. [06:17] dnm: Yet, spam still exists. [06:17] dnm: Someone sold me a bill of goods. [06:18] dnm: ;] [06:19] dnm: isaacs: Is craigslist not being helpful? [06:20] isaacs: dnm: craigslist is the database. http://padmapper.com is the interface. [06:20] dnm: Ask jchris if any Couchio folks have a room for rent and help CROSS THE STREAMS ;] [06:20] isaacs: dnm: it's pretty brilliant. but it's just a lot of driving around, calling people, hurry up and wait, etc. [06:21] dnm: So I have to admit that the last place I lived in SF was found by my then boss's personal assistant. She was fantastic. [06:21] dnm: She did all the craigslist research and prep, and I spent two long afternoons seeing places, and picked the last one on the second day. [06:21] ryah: isaacs: yeah maybe [06:21] mjr_: isaacs: you should get a boss's personal assistant. [06:21] dnm: I highly recommend it, if you can find some way to do it. [06:22] ryah: isaacs: i'm worried about portability [06:22] isaacs: ryah: seems like glob is pretty portable across unixes (except some of the consts that I have to sniff for) but i'm not sure about windows [06:22] mjr_: ryah: I enjoy both globbing and tilde-expansion, but I care a lot less about how those two things work on Windows. [06:22] ryah: isaacs: solaris? [06:22] dnm: On the other hand, she was just a UCB Masters student, and I have to believe that during summer, similar people exist who would handle the legwork for you for some nominal fee. [06:22] isaacs: ryah: not sure, haven't tried it there [06:23] ryah: isaacs: want an account to test? [06:23] isaacs: ryah: sure [06:23] isaacs: ryah: if `npm install glob` works, then it's there. [06:23] EyePulp has joined the channel [06:24] mjr_: ryah: is solaris going to replace linux as the best platform to run node on? [06:24] dnm: Only if it doesn't die a nursing home death. [06:24] dnm: Which, I hope it doesn't. [06:24] ryah: mjr_: it will when the dtrace stuff gets going [06:25] ryah: i like that i work for joyent - keeps me honest about x-platform stuff [06:25] dnm: Oh wow, PadMapper is aweomse. Thanks isaacs! [06:25] isaacs: dnm: np [06:26] dnm: ACTION is trying to move to the Seattle area by next-March, max. [06:26] isaacs: dnm, mjr_: so we found a place we both love on Van Buren, 1300 sq ft. just gotta hope that the competition doesn't get it. [06:26] dnm: Van Buren and what? [06:26] ryah: mjr_: ndoe doesn't use event ports currently [06:26] ryah: mjr_: which is a bummer [06:26] dnm: mjr and I lived about three blocks from MacArhur BART [06:26] ryah: seems to be a bug [06:27] dnm: MacArthur [06:27] ryah: doesn't have inotify - but apparently there is a similar interface in solaris [06:27] ryah: so if i get the BW, i'd love to start getting that stuff in [06:27] isaacs: dnm: between perkins and staten [06:28] ryah: s/apparently/supposedly/ [06:28] ryah: i haven't seen it [06:28] mjr_: Van Buren is my new neighborhood. I live at Euclid and Warwick. [06:28] dnm: oakland -> nodeland [06:29] isaacs: ryah: how do you install stuff on solaris? is there like a apt or yum or something? [06:29] dnm: In OSOL, you use IPS. [06:29] ryah: isaacs: we use bsd ports [06:29] dnm: pkg is the userland command [06:30] ryah: isaacs: but just install it in your home dir [06:30] Blink7_ has joined the channel [06:30] ryah: ~/local or whatev [06:30] isaacs: sure [06:30] Dmitry1 has joined the channel [06:30] micheil: isaacs: you were at joyent, weren't you? [06:30] mjr_: It has been a long time since I've used Solaris. It still has a special place in my heart though. [06:30] isaacs: micheil: wrong tense [06:30] micheil: same thing [06:35] isaacs: ryah: do you have some kind of "how to use bsd ports on solaris if you're not root" guide handy? [06:36] ryah: isaacs: oh - i mean just install from source [06:36] ryah: what do you need? [06:36] isaacs: oic [06:37] isaacs: well... guess i don't need it, but i've got some bash shortcuts and such written in php that are incredibly handy [06:37] ryah: do you need a newer bash? [06:37] isaacs: ryah: no, the normal bash is fine [06:38] isaacs: ryah: i just like having forward and back in my directory history [06:38] isaacs: ryah: so i can do "cd -3" to go back 3 directories. and i wrote that in php, because whatever it works. [06:38] ryah: php.. [06:38] ryah: really? [06:38] isaacs: yep [06:39] isaacs: when you want ugly duct tape functionality, and you want it fast, and you want it to work and not judge you, php's the best tool around. [06:39] isaacs: not fast like "run fast under load", of course. fast like "shut up and just work" [06:39] ryah: ACTION does "u;u;u" [06:39] isaacs: ryah: not *up* three directories [06:39] ryah: oh [06:39] isaacs: forward and back [06:39] isaacs: like browser forward and back buttons with history [06:40] dnm: I think you could do that with zsh builtins and aliases. [06:40] isaacs: so i can also just do "-" to go back, and _ to go forward [06:40] dnm: As an option [06:40] dnm: On the other hand, zsh isn't bash, so... [06:41] dnm: Wow. [06:41] isaacs: dnm: you can go back, but not forward, and also, then i'd have to learn zsh, so that would have defeated the "work now and shut up" design goal. [06:41] dnm: Right [06:41] dnm: Fair point [06:41] isaacs: whereas writing it in php was about a 15 minute hack [06:41] dnm: Well, what you need here is PHP, right? [06:42] isaacs: php's a terrible language for almost everything it's used for. but as a cli helper, it can't be beat. absolutely <3 it all over. [06:43] dnm: If the box has Perl and wget, and you have gcc or a C compiler that'll build PHP, you can try using toast , and ideally, you'll only need to do "toast arm php" and the rest will work itself out. [06:44] dnm: Beats downloading the tarball and compiling entirely by ./configure; make; make install, unless there's a weird build process, or lots of deps. [06:45] isaacs: dnm: yeah, php's kind of a pita to compile by hand. there's a lot of options with the wrong defaults. [06:45] isaacs: meh. i'll do without for now. [06:45] dnm: Ah, fair enough [06:46] isaacs: (yet another reason to hate on poor old php) [06:46] robotarmy has joined the channel [06:47] dnm: This is wild. For about $100 more a month than I pay now, I can have two more bedrooms and one more bathroom in a more modern apt. place in Redmond than in Arlingotn. [06:47] dnm: PadMapper is evil. Good evil. [06:47] isaacs: dnm: i know right? i felt like i'd been walking through knee-high mud and padmapper gave me a road and a motorcycle. [06:48] crohr has joined the channel [06:49] dnm: It's awesome. [06:49] isaacs: whoa, solaris's tar doesn't support gzipping? [06:49] isaacs: wtf? [06:51] ryah: isaacs: use "gtar" [06:51] Blink7_ has joined the channel [06:51] blogometer: PadMapper. Nice. My place is the right price for my neighborhood. Good to know. [06:51] isaacs: ryah: ah. i guess npm should sniff for that. it just assumes that tar xz will work [06:55] mjr_: Oh yeah, I remember now some of those adorable ways that Solaris doesn't use the GNU tools. [06:55] mjr_: Because like ATT SVR4 or whatever has a different thing. [06:56] hassox: hey guys... [06:57] hassox: anyone got exp with http://github.com/gimite/web-socket-js [06:57] shreekavi has joined the channel [06:57] dnm: You can usually fix it by altering which paths appear first in $PATH, like /usr/gnu/bin and friends [06:57] hassox: the sample is telling me "Client speaks old WebSocket protocol, missing header Sec-WebSocket-Key1 and Sec-WebSocket-Key2 (WebSocket::Error" [06:57] hassox: which is chrome [07:00] dnm: blogometer: Mine is still slightly cheaper than the three other places on offer in the same complex, two of which are one bedroom's, like mine. [07:00] dnm: Despite my rent having gone up some each of the past few years. [07:00] dnm: I guess that's good. I could be getting more gouged. [07:00] blogometer: I like my place. Cool "mash-up". [07:01] blogometer: I don't think I've left my block in over a month, other then to go walk in the park. [07:02] meso_ has joined the channel [07:02] dnm: mjr_: Sadly, I did not find a way to move the welded desk back east with me. [07:02] danielzilla: hassox: Sorry, no clue. I had good luck with Socket.IO over the weekend, so if you have the option, you might want to check that out. [07:03] hassox: danielzilla: does that do web sockets? [07:03] danielzilla: hassox: Yep. [07:03] danielzilla: hassox: http://socket.io/ [07:03] danielzilla: ^ Both the client & server side. [07:03] hassox: sweet :D [07:03] hassox: thanx [07:04] hassox: danielzilla: do you know much about it? [07:05] danielzilla: Some. I'm no expert, but I had a working setup in about an hour that went well-beyond the example. [07:05] creationix has joined the channel [07:05] hassox: nice [07:05] hassox: ACTION is trying to work out how to setup a socket that can be connected to from anywhere [07:06] tekky: hassox: typically that entails binding to 0.0.0.0 (for most things like that) [07:06] bronson has joined the channel [07:07] hassox: tekky: ? [07:07] hassox: I mean I want to setup a socket at mysocket.com, and have pages like yourpage.com connect, and anotherpage.com [07:07] hassox: is the binding thing the same? [07:08] tekky: typically when you setup anything that accepts connections, it has an option for an IP and a port... 0.0.0.0 makes these things bind to 'all' available IPs (so local and external conncetions can reach it) [07:08] fliebel has joined the channel [07:08] ingemar has joined the channel [07:09] hassox: kk I'll give it a crack [07:09] tisba has joined the channel [07:12] creationix: tekky: if you don't specify a host it defaults to 0.0.0.0 [07:12] tekky: creationix: good to know :) [07:13] hassox: so... with socketio [07:14] hassox: what stops my normal app from getting a websocket request? [07:15] creationix: hassox: I assume socket I/O hijacks the request handler and only passes through to your handler if it doesn't want to handle the request [07:15] creationix: I haven't read the code, that's just how it seems to work [07:17] isaacs: ryah: you ever seen this? ../src/glob.cc:100: error: `free' undeclared (first use this function) [07:21] Blink7 has joined the channel [07:22] ryah: isaacs: #include [07:22] mikeal has joined the channel [07:24] isaacs: ryah: ok, cool. that did it [07:24] isaacs: ryah: with that, node-glob works fine. [07:24] mscdex: hey kid, i'm an asynchronous computa. stop all the i/o. [07:24] isaacs: actually, nvm. [07:24] jblanche has joined the channel [07:24] isaacs: ryah: provided "works fine" includes dumping cores. [07:25] dnm: EWORKSASDESIGNED [07:25] mscdex: Error: constant undefined [07:26] ryah: isaacs: :) [07:28] isaacs: ryah: the sync glob works fine, but async just dumps cores. [07:29] isaacs: ACTION pictures the machine ejecting a warp core into space just in time for it to explode catastrophically *every* *time* that error occurs. [07:31] jhelwig has joined the channel [07:32] nefD has joined the channel [07:33] jhelwig has joined the channel [07:33] jchris: now that i have the node from source, github is down :/ [07:33] Tim_Smart: Interesting http://al3x.net/2010/07/27/node.html [07:33] Tim_Smart: You read that ryah? [07:33] ryah: yes [07:34] Tim_Smart: It makes me think of plurks use case though... [07:34] jhelwig has joined the channel [07:36] ryah: Tim_Smart: ? [07:36] virtuo has joined the channel [07:36] creationix: ryah: I met someone at the Sencha Meetup tonight who is using express is a fairly large app, about 100,000 users with heavy html generated on the server [07:36] creationix: she said it's performing great so far [07:37] zomgbie has joined the channel [07:37] Tim_Smart: creationix: Oh cool. [07:37] creationix: s/is a/in a/ [07:38] Tim_Smart: It would be interesting to know what Alex defines as "Large Scale" [07:38] creationix: every time github is down I remind myself that I should host my git repos elsewhere and use github as a mirror [07:38] Tim_Smart: vs Small Scale [07:38] creationix: I only do it for howtonode though [07:40] mshadle has left the channel [07:40] pkrumins: ryah: can you take a look at this -- http://gist.github.com/530018 -- I can't figure out how to return Buffer from the subroutine on line 27. I tried all kinds of things like return scope.Close(b) and return scope.Close(Handle(b)) but none of them work. [07:41] polyrhythmic has joined the channel [07:41] pkrumins: ryah: it's a small test case just for returning Buffer objects back to javascript, which is something I want to do to minimize copying [07:42] ryah: Tim_Smart: alex's point is basically he isn't sure if node can be used for twitter-sized systems [07:42] ryah: which is fine [07:42] ryah: i'm not sure either [07:42] ryah: pkrumins: can you paste it elsewhere, github is down [07:43] pkrumins: ryah: it's up here, but ok, i am gonna paste it elsewhere, just a sec [07:43] dnm: OK, I need to stop looking at PadMapper. [07:43] Tim_Smart: Yeah, maybe he needs to point his concern who is actually using Node.js with 100,000+ concurrent connections. [07:43] fliebel has left the channel [07:43] dnm: I should probably sleep. [07:43] hansek has joined the channel [07:43] Tim_Smart: s/concern to someone/concern. [07:43] pkrumins: ryah: http://pastebin.com/bs2BBkS3 [07:44] ryah: Tim_Smart: well, i guess he's evaluating it for his bank startup [07:44] ryah: or - i dont know [07:44] pkrumins: ryah: see on line 25 I make a new buffer, and I'd like to return it back to whoever calls .getBuf() in javascript (which is implemented by GetBuf() function in C++) [07:44] Tim_Smart: Yeah, *shrug* [07:45] ryah: pkrumins: scope.Close(b->handle_) [07:45] pkrumins: ryah: trying [07:45] Tim_Smart: Either way, I'm still going to be hacking away with node, and he won't stop me. [07:45] pkrumins: ryah: another question - what about garbage collection there? [07:45] pkrumins: ryah: since I did ::New myself for Buffer there [07:45] pkrumins: ryah: who is gonna delete it? [07:45] ryah: Tim_Smart: he doesn't make any specific reasons why it might not scale - other than that it's new [07:46] ryah: so it shouldn't be discouraging [07:46] FransWillem has joined the channel [07:46] mjr_: I think al3x is also trying to claim that any serious system should allow both evented and threaded programming models. [07:46] mjr_: Which I just don't buy. [07:46] ryah: a serious system can have both threaded and evented models and involve node [07:47] gormer has joined the channel [07:47] keeto has joined the channel [07:47] ryah: i obviously don't think threaded modles are necessary - but they can be mixed in fine. [07:47] Tim_Smart: The thing is, node _does_ use theads, but it is abstracted. [07:47] ryah: Tim_Smart: eh.. kinda [07:47] ryah: Tim_Smart: not for anything important [07:48] FransWillem: Hmmm, we're talking about needing threads, right ? [07:48] Tim_Smart: It does play a important role though, to get things going async [07:48] Tim_Smart: FransWillem: Not really, I don't really know what we are talking about. [07:49] pkrumins: ryah: any thoughts on the garbage collection question? [07:49] pkrumins: ryah: or will ObjectWrap or something else take care of it? [07:49] FransWillem: Tbh, most modern CPUs should be able to handle anything you throw at it on a 1Gbit link, I think you only need threads when you're going to be doing CPU intensive work that will otherwise block the main thread :/ [07:49] ryah: pkrumins: it will be GCed when V8 GCs it [07:49] pkrumins: i am now trying to see if that Buffe::New() object that I return it gets garbage collected [07:50] Tim_Smart: FransWillem: Would be interesting to have multiple pipes to one box... [07:50] ryah: FransWillem: or processes.. [07:51] ryah: i want some nerdy node.js tshirts [07:51] aubergine_ has joined the channel [07:51] ryah: "bringing processes back in style" [07:51] Tim_Smart: Persistent processes are ftw. [07:55] FransWillem: ryah: Aren't processes and threads mostly the same thing on any *nix system? Seem to remember something like that from my Networking classes :/ [07:55] grahamalot has joined the channel [07:55] zomgbie has joined the channel [07:55] a_meteorite: FransWillem: far from it... [07:55] Tim_Smart: FransWillem: Something Google spun up: http://www.cafeaulait.org/course/week11/02.html [07:57] pkrumins: ryah: happy to report that return scope.Close(b->handle_) works and it all gets GCd just fine :) [07:57] Dmitry1 has joined the channel [07:57] pkrumins: so i am rewriting all my modules to return buffers now, instead of Encode(..., BINARY) strings [07:59] ryah: pkrumins: cool [07:59] ryah: FransWillem: except the shared memory thing [08:00] a_meteorite: also... you are THE ryah? :) [08:00] ingemar has joined the channel [08:00] ryah: a_meteorite: at your service [08:01] a_meteorite: ryah: mind if I request a small feature? [08:02] ph^ has joined the channel [08:02] mape: ryah: tshirts with the logo or just slogans? [08:02] a_meteorite: I'd love it if Buffer#write accepted an optional argument for the max amount to write of a string, particularly when writing UTF-8, so that way I don't have to make sure I don't cut off multibyte UTF characters myself [08:02] a_meteorite: other than that, pretty new to node.js, but I'm loving it [08:03] a_meteorite: you've done a great job. [08:03] chapel has joined the channel [08:03] davidc_ has joined the channel [08:03] ryah: a_meteorite: like, in chars or bytes? [08:03] ryah: i think... [08:03] ryah: Buffer#write will not break on chars [08:03] a_meteorite: heh, good question... [08:04] davidc_ has joined the channel [08:04] ryah: its been a while since i wrote that.. i kind of forget [08:04] ryah: but i thin [08:05] a_meteorite: see, what I'm doing is I'm packing and unpacking stuff. say you call Pack('blahblahblah', 32), it'd pack it in a field with a max of 32 bytes. if you input something too big, I'd like to just Buffer#write it, specify the max in bytes, and it cuts the string off if it needs to, minding UTF characters [08:05] a_meteorite: so, yeah, bytes then. [08:06] ryah: a_meteorite: try it out - i'm 70% sure that it won't split chars [08:06] ryah: you can specify length [08:06] pkrumins: ryah: another question - should values like Undefined(), True() or False() be scope.Close()'d when returning? [08:06] ryah: (i think) [08:06] a_meteorite: ryah: you can specify offset [08:06] pkrumins: ryah: currently I just do `return Undefined()` [08:06] pkrumins: ryah: should I be doing `return scope.Close(Undefined())`? [08:07] ryah: pkrumins: you don't need to scope.Close those because they're global values [08:07] pkrumins: ah i see. [08:07] ryah: just need to scope.Close Local<*> things [08:07] pkrumins: ryah: roger! [08:07] a_meteorite: it won't do partial utf characters if the buffer is too small, but I pre-alloc the buffer for performance reasons. I first did small buffers and then later copied it into the final buffer, but that was like a 60% performance hit. [08:08] a_meteorite: and String#slice doesn't mind multibyte characters [08:08] a_meteorite: yeah I can do it in JS, but it seems a natural extension of Buffer#write I think [08:08] ryah: a_meteorite: yeah, i guess we should have a byte length on there [08:08] MikhX has joined the channel [08:08] ryah: i think i meant to add that [08:09] keeto has joined the channel [08:09] hellp has joined the channel [08:09] a_meteorite: coolio :) [08:09] rphillips has joined the channel [08:09] pkrumins: ryah: another q -- what is the Persistent stuff all about? For example, if I have written my module to use eio_custom and be async in its nature, should I be using the persistent template constructor for that class? [08:10] pkrumins: ryah: like Buffer for example does `constructor_template = Persistent::New(t);` [08:10] pkrumins: ryah: I have written all my modules to use just the stuff you saw in my paste [08:10] ryah: you don't need the FunctionTemplate to be persistent [08:11] ryah: but to get Handles on the heap you need to use Persistent [08:11] ryah: (which is what you usually need to do eio_custom stuff) [08:11] pkrumins: i have only the callback function Persistent [08:12] pkrumins: like enc_req->callback = Persistent::New(callback); [08:12] ntelford has joined the channel [08:12] ryah: that's fine [08:12] ryah: btw there are convience functions to do that [08:12] ryah: in node.h [08:12] mjr_: ryah: node shirt idea, "Let me show you my 'self-pipe' trick" [08:12] pkrumins: ryah: oh yeah? didn't notice that. [08:12] ryah: mjr_: :) [08:12] felixge has joined the channel [08:13] ryah: i <3 the self-pipe trick [08:13] ryah: node.js [08:13] pkrumins: ryah: i here they are, cb_persiste, cb_unwrap, and cb_destroy. [08:14] pkrumins: s/i // [08:16] pkrumins: ryah: so if i understand correctly, if I have my own object X and I want to return it to javascript, I just do `return scope.Close(xobj->handle_)` [08:16] pkrumins: assyming X inherits from ObjectWrap right? [08:16] ryah: pkrumins: yeah, for ObjectWrap [08:16] pkrumins: that's awesome [08:16] pkrumins: :) [08:16] ryah: a_meteorite: bug me about it again sometime - i'll add that [08:16] a_meteorite: ryah: alright, will do [08:16] ryah: or make an issue - or ml thread [08:17] a_meteorite: ml thread? [08:17] ryah: mailing list [08:17] a_meteorite: ah, mailing list [08:18] TomY has joined the channel [08:19] christophsturm has joined the channel [08:22] FransWillem: what's the self pipe trick :p? [08:22] aubergine has joined the channel [08:23] jblanche has joined the channel [08:24] a_meteorite: ryah: http://github.com/ry/node/issues/issue/243 :) [08:25] FransWillem: a_meteorite: Did you try taking a .slice from the buffer and writing in that ? [08:25] a_meteorite: FransWillem: yeah, but slice doesn't care about multibyte UTF-8 [08:26] FransWillem: You mean writing, then taking a slice from what was written ? [08:26] FransWillem: I'm talking about taking a slice from the buffer you want to write in, write into the slice, and then the data will also be written in the original buffer, but seeing as the slice is limited in size, it'll cut it off nicely as if the buffer was only that long [08:27] icozzo has joined the channel [08:27] a_meteorite: no, I mean adding another optional argument to Buffer#write that will write maximum of that many bytes of the string (but if encoding is UTF-8 and it means splitting a multibyte, it won't split it, it'll go back until it's not split) [08:27] a_meteorite: oh [08:27] ryah: a_meteorite: thanks [08:27] ryah: a_meteorite: poke me about it if i don't get it. (patches also welcome of course) [08:27] a_meteorite: FransWillem: I tried something similar, created a new buffer of the max size I wanted, it worked, but it was a huge performance hit making temporary buffers [08:28] a_meteorite: ryah: okay. I was going to attempt a patch, but I got started and it didn't seem to work. I haven't done anything in V8 before though. [08:29] felixge: a_meteorite: http://github.com/felixge/node/blob/master/lib/string_decoder.js might be worth looking into [08:29] felixge: (as far as the utf8-side of things is concerned [08:30] a_meteorite: thanks [08:32] FransWillem has joined the channel [08:32] FransWillem: Sorry, PC crashed [08:32] FransWillem: a_meteorite: Did you say anything after my last line ? [08:33] sh1mmer has joined the channel [08:33] ingemar has joined the channel [08:33] V1 has joined the channel [08:33] a_meteorite: FransWillem: I tried something similar, created a new buffer of the max size I wanted, it worked, but it was a huge performance hit making temporary buffers and then copying them into the large pre-alloc'd one (by like ~60% of the total time) [08:34] FransWillem: So you'd want: [08:34] FransWillem: b.write(string,offset,encoding,maxlength) ? [08:34] FransWillem: Did you try [08:34] FransWillem: b.slice(offset,offset+maxlength).write(string,0,encoding) ? [08:34] tisba has joined the channel [08:34] FransWillem: slice shouldn't allocate any new memory (only a new JS object), just reference the existing buffer [08:35] a_meteorite: Oooh. That's kinda clever. [08:35] a_meteorite: No I didn't try that [08:35] FransWillem: Otherwise you could also use Byffer.byteLength directly, stripping off characters until it fits in the length you want [08:35] xla has joined the channel [08:35] FransWillem: LEt me know if it works :) [08:36] a_meteorite: I'm trying it [08:38] a_meteorite: FransWillem: nope, I'm afraid it doesn't work [08:39] FransWillem: How does it not work ? [08:39] FransWillem: Does it write too much, too little, cut off ? [08:40] a_meteorite: it writes a partial multibyte utf character [08:40] FransWillem: Ok, so cut off, bummer [08:41] FransWillem: What you could do is calculate how many characters will fit yourself [08:41] FransWillem: shouldn't be too difficult [08:41] FransWillem: http://en.wikipedia.org/wiki/UTF-8 [08:42] FransWillem: Anything from 0x0000 to 0x007F fits in one byte, 0x0080 to 0xFFFF fits into two [08:42] FransWillem: So basically loop over your string, check how many bytes are needed for a new character, it if fits, increase the length you want to write [08:42] a_meteorite: Yeah, I ended up using something similar to what felixge showed (I'm assuming that was his blog too) [08:42] FransWillem: then at the end do a write with a substr [08:43] a_meteorite: it's just really wordy for something that Buffer could do easily (and apparently will soon) since it already will if the allocation is too small [08:43] FransWillem: I'm actually surprised the slice trick didn't work, tbh :/ [08:43] fliebel has joined the channel [08:43] FransWillem: Weird that for an actual buffer it does cut off correctly, but for a slice it doesn't :S [08:43] a_meteorite: I just loop backwards up to 3 bytes and check if any of the utf control characters are there [08:44] a_meteorite: FransWillem: yeah, well slice, afaik, works of chars. it doesn't care that some may be special utf control characters? that'd be useful to have as a different utf-8 aware slice [08:45] FransWillem: nah, slice on Buffer works on bytes [08:45] a_meteorite: oh, I mean slice on string [08:45] a_meteorite: 1:45am and it shows :) [08:45] a_meteorite: no, but I did try the buffer slice. bufOut.slice(n, n + val.bytes).write(val.value, 0, val.encoding); [08:45] FransWillem: Hmm, dunno, I think it's a bug that in a buffer slice the cut-off behaviour is different than in an allocated slice [08:46] FransWillem: But you could write a UTF-8 aware String.slice easily, if you'd want [08:46] a_meteorite: maybe cause since it references the same underlying buffer object, when you write to it, it thinks plenty is allocated [08:46] FransWillem: That'd still be horrible :p [08:46] a_meteorite: so it writes those partial multibytes [08:47] a_meteorite: yeah, that's a bug imho [08:48] aubergine_ has joined the channel [08:48] mAritz has joined the channel [08:48] a_meteorite: ah, wait. crap. I messed it up :P [08:49] FransWillem: brb, gotta restart [08:49] FransWillem: let me know when I get back [08:49] a_meteorite: the slice trick DOES work. I forgot per spec I made sure the last byte is a null, which Buffer doesn't know about [08:49] frank06 has joined the channel [08:50] teemow has joined the channel [08:50] caolanm has joined the channel [08:52] frank06: hi all [08:52] frank06: does anybody know how can i set multiple cookies in one response? [08:53] frank06: apparently cookies should be comma-concatenated, but this doesn't work for me [08:55] FransWillem has joined the channel [08:55] FransWillem: Anything ? [08:55] xla has joined the channel [08:56] caolanm: frank06: http://caolanmcmahon.com/multiple_set_cookie_headers_in_node_js.html [08:56] hoffmann has joined the channel [08:57] caolanm: the methods for setting multiple cookies seems to differ a bit by browser [08:57] a_meteorite: FransWillem, looks like I messed it up. the slice trick DOES work. I forgot per spec I made sure the last byte is a null, which Buffer doesn't know about :P [08:57] frank06: nice :) going to read that now [08:58] FransWillem: Good to hear :) [09:00] ph^ has joined the channel [09:02] markwubben has joined the channel [09:04] alecmuffett has joined the channel [09:04] BBBB has joined the channel [09:05] frank06: caolan: if i'm not authoring middleware, but just attempting to set them through express, do you know how? [09:06] jetienne has joined the channel [09:06] frank06: caolan: and using the session middleware, this is what happens: http://github.com/senchalabs/connect/blob/master/lib/connect/middleware/session.js#L62 [09:06] aubergine has joined the channel [09:12] frank06: so, comma is used to separate multiple cookies in the header value but expires already contains a comma [09:12] frank06: expires=Wed, 18 Aug 2010 13:11:29 GMT, mycookie1=value1 [09:12] frank06: the browser doesn't understand mycookie1 is a new one... [09:16] maushu has joined the channel [09:17] caolanm: frank06: I think if you want to join multiple cookies in a single set-cookie header then the best way is to join them with a semi-colon [09:17] caolanm: without a space! [09:18] caolanm: but even then I think you might run into browser issues [09:19] caolanm: I don't use express so I'm not sure how it sets headers [09:19] frank06: thanks [09:19] frank06: something apparently so simple can be a royal pain [09:21] ntoll has joined the channel [09:22] frank06: caolan: a semi-colon like so? [09:22] frank06: connect.sid=ddbb05783473644533d235bf9683.57baefe72d09d2a9a2b1545ef8c551a5; path=/; httpOnly; expires=Wed, 18 Aug 2010 13:21:29 GMT;mycookie2=value1 [09:24] caolanm: frank06: you're going to have to test this across all your target browsers, please don't just take my word for it ;) [09:24] ntoll: hi, I'm a C++ newbie but would like to create an addon to generate different types of uuid (specifically types 4 and 5). I've found the OSSP uuid library which meets my requirements (http://www.ossp.org/pkg/lib/uuid/)... [09:24] caolanm: but I think that's more likely to work than joining them with a comma [09:25] frank06: caolan: sure :) [09:25] frank06: doesn't work => connect.sid=4b92ba45ea25bc1b13adc2d057.7b585acb3b3d0b53e8d4bfafc1494959;mycookie2=value1 [09:25] frank06: does work => connect.sid=4b92ba45ea25bc1b13adc2d057.7b585acb3b3d0b53e8d4bfafc1494959,mycookie2=value1 [09:25] ntoll: so I've created a simple addon that should just generate uuid4s... but I'm having problems compiling the thing properly. [09:26] caolanm: frank06: *sigh* [09:26] caolanm: back to trying to send multiple headers then? [09:27] frank06: i'll try to use writeHead from a middleware... as per your blog post [09:27] ntoll: It compiles and I get a "uuid.node" that I then test... but I get the following error: dyld: lazy symbol binding failed: Symbol not found: _uuid_make [09:27] ntoll: from my newbie knowledge of C++ I suspect this is a linker problem right..? [09:27] ntoll: if so how do I fix it...? [09:27] aubergine has joined the channel [09:29] ntoll: I was under the impression that all node addons are statically compiled which, if I understand this correctly, means *everything* should be built into the resulting binary..? [09:29] ntoll: but I'm probably wrong... [09:29] ntoll: (and thoroughly confused) [09:32] caolanm: frank06: I have a connect middleware that uses this trick for setting multiple cookies, if that's useful for reference [09:32] zomgbie has joined the channel [09:32] tpryme has joined the channel [09:32] caolanm: frank06: http://github.com/caolan/cookie-sessions [09:33] caolanm: take a look at this commit for the relevant code: http://github.com/caolan/cookie-sessions/commit/0959b148640eb5eff9559c0d51d7d9c307f13fef [09:35] frank06: caolan: thanks! definitely helpful [09:36] hassox: lads, is there any Connect cookie session storage? [09:37] candeller has joined the channel [09:38] maushu: Callback pinetree? What the hell is a callback pinetree. [09:39] ryah: ntoll: almost [09:39] ryah: ntoll: openssl and libc are dynamically linked. [09:39] caolanm: hassox: funny you should mention that ;) just linked to my middleware for it [09:39] hassox: oh [09:39] ntoll: ryah: hi [09:39] caolanm: http://github.com/caolan/cookie-sessions [09:39] frank06: hassox: http://github.com/caolan/cookie-sessions ? [09:39] hassox: :D [09:40] hassox: champion! [09:40] candeller: hi, i was just browsing through the apis of node and i cant seem to find a function for reading from stdin, is there any? [09:40] ryah: candeller: yes, process.openStdin() [09:40] ryah: candeller: returns a readable stream. [09:41] candeller: ryah: ah, indeed, missed it, thanks [09:45] bsstoner has joined the channel [09:46] zomgbie has joined the channel [09:46] hassox: caolanm: still here? [09:48] caolanm: hassox: yup [09:49] omarkj has joined the channel [09:49] hassox: caolanm: have you had any luck using a session with websockets (socket.io)? [09:50] caolanm: hassox: I've not tried tbh [09:51] hassox: kk [09:51] caolanm: but since websockets can easily communicate in both directions why not send a token with each request? [09:51] hassox: well on first request, I'd like to see if my user is logged in [09:51] aubergine has joined the channel [09:52] hassox: so I would like to check the session, to locate the user inside the websocket [09:52] maushu: ACTION looks inside the websocket. [09:52] maushu: No users here. [09:52] caolanm: :) [09:52] hassox: heh [09:52] maushu: They are like cockroaches. [09:52] caolanm: I guess you could grab the session id using javascript in the browser and send it over the websocket [09:53] maushu: Hmm, the websocket should receive the cookie in the handshake. [09:53] hassox: well the request and response objects are passed through to the websocket handler [09:53] caolanm: ah cool [09:53] maushu: After that its like a "raw" socket. [09:53] caolanm: so it should work in the handshake then [09:53] hassox: erm [09:53] hassox: not sure I understand [09:54] maushu: handshake = upgrade [09:54] hassox: I didn't think that socket.io made that event available [09:54] maushu: The client requests a http upgrade (to turn that request into a websocket) the cookie _should_ be sent with that upgrade. [09:54] hassox: right [09:54] maushu: Ah, I think socket.io abstracts it. [09:54] hassox: but it does pass the request object [09:55] hassox: so I should be able to lift it off that yeah? [09:55] maushu: Yeah. [09:55] maushu: Check the headers of that request, a cookie should be in there. [09:55] hassox: so, caolanm with access to the request object, can I use your lib to lift a connect cookie without the connect part? [09:56] caolanm: not sure I understand [09:56] caolanm: you want to use the lib without connect? [09:57] maushu: caolanm: He wants to grab the session using the raw request. I think. [09:58] caolanm: well the lib exposes a bunch of methods for decrypting the cookies, so you could put something together to read the session infomation manually I suppose [09:58] caolanm: or you could fake Connect and pass it the request, response and a callback [09:59] away01 has joined the channel [09:59] hassox: ja [09:59] hassox: that's what I want [09:59] hassox: yeah i guess I could do that too [09:59] caolanm: ok, I recommend faking connect [09:59] hassox: that prolly makes more sense [10:00] caolanm: var sessions = require('cookie-sessions'); [10:00] proppy has joined the channel [10:00] proppy: does someone run node repl inside emacs ? [10:00] caolanm: sessions({secret: '123abc'})(req, res, function(){ ... }) [10:00] hassox: do I need to have anything upstream from the cookie middleware? [10:01] caolanm: shouldn't do [10:01] hassox: cool :D [10:01] hassox: makes it easy :) [10:02] maushu: Well, since everything is fine here, I will go save some kittehs from the evil trees and pet some puppies. [10:02] hassox: heh [10:02] hassox: thanx lads [10:04] icozzo: oh snap there's a woot-off? [10:04] icozzo: how was I not aware of this! [10:08] tobiassjosten has joined the channel [10:14] sveimac has joined the channel [10:22] robotarmy has joined the channel [10:25] maushu: Cuisinart Stainless 6 Bottle Wine Cellar >_> [10:33] dipser has joined the channel [10:35] rnewson has joined the channel [10:40] pkrumins: ryah: here? [10:40] pkrumins: ryah: take a look at this crashing example http://github.com/pkrumins/node-crashing-async-buf [10:40] pkrumins: ryah: can't create a Buffer::New() in the EIO asynchronous function [10:41] pkrumins: ryah: just crashes there on line 57. i included gdb output too. [10:41] pkrumins: ryah: http://github.com/pkrumins/node-crashing-async-buf/blob/master/retbuf-async.cpp#L57 [10:41] fermion has joined the channel [10:43] surendra has joined the channel [10:43] surendra: hi [10:44] surendra: why does x= null; fs.readdir("/usr", function (err, files) { x= 5; }); x ....... returns null for x, even after a while [10:47] MattJ has joined the channel [10:49] dipser: hi, is it possible to run a command to an specific time (milisecs) or for example 10 hours later and if there are more events on that exact time, that they run one after another? [10:49] mape: surendra: how long is a while? [10:50] FransWillem: surendra: And how are you measuring the while? [10:51] surendra: i am trying it from node repl, and the while is 5 minutes [10:51] surendra: or whatever period you want to wait [10:51] FransWillem: Lemme try [10:53] FransWillem: Hmmmm, get the same behaviour here, I think it might be related to the context everything is running in :/ [10:53] mape: surendra: Might have something to do with the context [10:55] surendra: x = new Object; fs.readdir("/usr", function (err, files) {x.y =1 }); ...wait...x.y works [10:56] FransWillem: Yeah, definitely context then [10:56] surendra: you can use x, but not set it [11:01] surendra: x =null; setTimeout(function(){x = 30;}, 10) ; x == 30 works in Chrome, but not in nodejs [11:01] surendra: do you think it is a bug? [11:01] surendra: or is it OK? [11:04] FransWillem: Probably because in Chrome it's executed in the same context, whereas in node the repl has it's own context [11:05] surendra: you can try it from a script and it will still behave the same [11:05] bsstoner has left the channel [11:05] surendra: node xyz.js ; global variables can be accessed, but not set [11:09] FransWillem: ? [11:10] FransWillem: http://pastebin.com/SfTf9JuV [11:10] FransWillem: that works as expected [11:10] FransWillem: outputs 10 [11:14] surendra: FransWillem: yes, thanks [11:18] zomgbie has joined the channel [11:21] angel333 has joined the channel [11:24] ph^_ has joined the channel [11:28] zomgbie has joined the channel [11:28] ph^ has joined the channel [11:28] angel333 has left the channel [11:29] rsms has joined the channel [11:30] Neil has joined the channel [11:37] saikat: is there anything specific people use to measure reqs/second on a production node app [11:37] saikat: or do people just have their own custom scripts? [11:42] herbySk has joined the channel [11:43] Blink7_ has joined the channel [11:47] hellp has joined the channel [11:51] tg: saikat: ab? (apache benchmark) [11:52] d0k has joined the channel [11:53] Throlkim has joined the channel [11:54] saikat: tg: hm - i was hoping to use something that could monitor websockets connections too [11:55] tg: oic [11:55] saikat: also, i'm not running node behind apache [11:55] tg: well, ab is just a tool that makes a lot of requests [11:55] tg: and prints out stats [11:55] saikat: oh i see - yeah i meant more for monitoring requests per second that are actually occurring [11:55] tg: so you dont need to have apache running [11:55] saikat: not to benchmark [11:56] tg: i see [11:56] tg: then look at the logs maybe? [11:56] saikat: yeah [11:56] saikat: a real-time monitoring tool would be kind of cool though =) [11:56] tg: or run tcpflow | grep etc [11:56] tg: or dunno [11:57] icy: if you use the commen log format for accesslogs, you can use apachetop [11:57] saikat: oh good idea [11:58] fliebel: I think I read about some visualization tools for these kind of logs a while back. [11:58] icy: but with websockets you don't have a log entry per message so you wont monitor that one [11:58] saikat: right, unless i force a log entry per message [11:59] fliebel: Or maybe just log the amount of connections and kb/s somewhere? [11:59] therealkerni has joined the channel [12:00] icy: for websocket you'd want to know a) how many connections and b) how many messages/s [12:01] icy: you'll have to record your own stats [12:01] icy: do people actually use websockets in production? the spec is crap :) [12:01] bcg has joined the channel [12:02] fliebel: If you're into Clojure, this might be nice to visualize the logs: http://incanter.org/ [12:03] mape: icy: Might work if there is fallback [12:05] stepheneb has joined the channel [12:08] ph^ has joined the channel [12:09] icy: mape: if you can detect a failure, is this always possible? [12:09] icy: in a timely fashion [12:13] astrolin has joined the channel [12:16] charlieyan has joined the channel [12:16] dcfan: ping ciaranj [12:17] dcfan: :ciaranj [12:17] dcfan: any intention to implement oauth provider as well? [12:25] kriszyp has joined the channel [12:27] daleharvey has joined the channel [12:29] hassox: micheil: is node-websocket-server yours? [12:29] micheil: yes [12:29] robrighter has joined the channel [12:29] sveisvei has joined the channel [12:29] hassox: :D [12:29] hassox: awesome... wasn't sure if I had it right :D [12:32] maushu: Yes, the poor baby. Having a parent like micheil must be traumatizing. [12:33] maushu: Seriously, who names their kid "node-websocket-server"? [12:33] maushu: Evil people, thats who. [12:33] ironfroggy has joined the channel [12:34] ironfroggy: I see two package managers for Node.js: NPM and Kiwi. which is the more widely used? [12:34] drudge: npm definitely [12:34] drudge: don't use kiwi, please :) [12:35] Tim_Smart: kiwi's are a endangered bird. [12:35] Tim_Smart: Don't do it. [12:35] drudge: ironfroggy: http://vimeo.com/14120299 check this video out by the npm dev [12:37] micheil: maushu: well, my server's called ziggy, and I've got an events library called Evan [12:37] wllm has joined the channel [12:39] ph^ has joined the channel [12:40] mtodd has joined the channel [12:41] MattJ has joined the channel [12:41] maushu: micheil: Totally evil. [12:42] mape: icy: failure? The detection would be clientside [12:42] micheil: oh. and I have the guest user for sharing music and stuff on one of my boxes called Frankie [12:43] tisba_ has joined the channel [12:43] ceej has joined the channel [12:44] mizerydearia has joined the channel [12:47] feroz_ has joined the channel [12:50] gm__ has joined the channel [12:50] gm__: hi :D [12:51] maushu: EVIL! [12:51] gm__: :( [12:51] gm__: http://github.com/gleicon/pubsub_ws [12:51] gm__: second time I used emitters [12:51] gm__: seems like I found my dialect on node.js [12:52] icy: mape: and the client is all that needs to support it? no proxy, no webserver? :P [12:53] mape: icy: check socket.io [12:53] zomgbie has joined the channel [12:53] micheil: gm__: look interesting [12:53] icy: mape: and what would I find there? [12:53] ironfroggy: another npm question: why doesnt http://mape.me:1337/ actually link to the packages? [12:53] daleharvey: lol [12:53] mape: npm.mape.me [12:53] micheil: gm__: which websocket library are you using? [12:53] mape: ironfroggy: link what to where? [12:53] mape: github? [12:53] mape: icy: fallback [12:54] gm__: micheil: works nicely. I even put an premature optimization which is to make another redis client to get the value instead of using the subscribe channel to send it [12:54] gm__: micheil: node.ws.js [12:54] micheil: ouch [12:54] gm__: micheil: the simplest one [12:54] ironfroggy: mape: yes, to the project page, docs, etc. a link to a tarball isnt very helpful when i'm not even sure what package i want [12:54] micheil: ACTION doesn't think that greatly of it.. [12:54] icy: mape: you cannot detect support for websockets in all proxies/webservers the way draft 76 handles stuff [12:54] gm__: http://zenmachine.wordpress.com I posted something more about it [12:54] icy: you can end up with a deadlock [12:54] mape: ironfroggy: well that would depend on each package supplying the info [12:54] mape: ironfroggy: In that sense yeah [12:55] mape: *icy [12:55] gm__: micheil: I saw that there are other libraries which provides flash abstraction, but I onlye used ws on python and erlang, so I looked for the smallest/simplest lib [12:55] icy: so I would strongly discourage anyone from using websockets at this point in time [12:55] mape: At least if it is mission critical [12:55] micheil: gm__: ah, did you see node-websocket-server? [12:55] gm__: micheil: dont think so [12:56] mscdex: icy: eh? [12:57] gm__: is it that easy to use ? [12:57] gm__: also, is this emit pattern I used correct ? [12:57] icy: mscdex: sorry? [12:57] mscdex: icy: how is there deadlock when you handle all http connections? [12:57] mscdex: and websocket connections [12:58] gm__: icy: I am aware of the limitations. [12:58] icy: mscdex: here is a good thread outlining the problems: http://www.ietf.org/mail-archive/web/hybi/current/msg02149.html [12:59] gm__: I did the same using comet [12:59] gm__: problem is, I think it will take about a year to solve all ws problems/issues [12:59] maushu: ...what? No websockets? WHYYYYY?! [12:59] gm__: this last draft reeks of design by comitee [12:59] gm__: the handshake stuff was very odd [12:59] mscdex: icy: that's haproxy, yeah, i knew about that [12:59] icy: gm__: hehe yea [13:00] icy: mscdex: it's not haproxy specific [13:01] icy: all the handshake stuff was introduced to support proxies but it totally fails at that :) [13:01] gm__: gotta go folks [13:01] gm__: cya [13:01] wattz: Good morning [13:01] codemariner has joined the channel [13:02] mscdex: icy: all i know is i don't have any problems handling incoming http and websocket connections with node? [13:02] mscdex: wattz going on? [13:02] maushu: PUN HELL. [13:02] mscdex: :-D [13:03] icy: mscdex: so? [13:03] wattz: mscdex: ... [13:04] wattz: any C++ devs out there want to help me out in a project? :D [13:04] wattz: linux and/or windows [13:04] FransWillem: Feel free to ask [13:04] mscdex: icy: so that's why i was inquiring about what you meant by the ability for deadlock to occur with websocket connections [13:04] FransWillem: Or are you looking for long-time help ? [13:05] wattz: just help getting Bob tested and able to be built on those systems [13:05] FransWillem: Bob ? [13:05] icy: mscdex: yea and I told you why, it's outlined in that mailing list thread [13:05] wattz: i can get to linux here soon, but i haven't done any windows dev in my life A, and B i haven't touched a windows box since 97 [13:05] jherdman has joined the channel [13:05] wattz: FransWillem: http://github.com/wess/Bob-The-Builder [13:06] micheil: icy: the hybi often argue things for the sake of an argument, as sad as that is. [13:06] FransWillem: Hmm, sorry, don't really have time for that :/ [13:06] wattz: FransWillem: no worries man [13:07] icy: well, I think in this case it's very practical [13:07] micheil: icy: the decision was made to deliberately reduce errors in long periods by fast-failing in most cases [13:07] wattz: i still have to finish up the build/run routine [13:07] wattz: then extend it so you can use it for stuff other than just building linux cmd programs [13:07] micheil: does haproxy work with spdy or whatever it's called? [13:08] c4milo has joined the channel [13:09] ntelford has joined the channel [13:09] mscdex: micheil: i don't believe so [13:09] micheil: gm__: for one, libraries you haven't written should be in /vendor, libraries you have written, in /lib [13:09] micheil: (by common usage) [13:11] c4milo has left the channel [13:11] c4milo has joined the channel [13:14] zomgbie has joined the channel [13:16] ironfroggy: I was going to use node-websocket-server and a question just occured to me: can i get cookies from the websocket connection? [13:16] ironfroggy: that is, http cookies set in previous, normal requests? the session key is what I'm after here. obviously would make sense to know _who_ is connected. [13:18] mscdex: ironfroggy: yes, normal cookies are sent [13:18] mscdex: but httpOnly cookies are not sent [13:19] frza has joined the channel [13:20] ironfroggy: hmmm but how do i get them? i dont have a request object. unless thats available from the connection passed for connection event handlers? [13:21] mscdex: ironfroggy: a separate 'upgrade' event is fired when a websocket request is made. the callback supplied to this event is passed a request object [13:22] c4milo: process.platform isn't supposed to print a string ? like linux, darwin, etc ? [13:22] ironfroggy: that is fired by node.js itself? [13:22] blogometer has joined the channel [13:22] mscdex: ironfroggy: http.Server emits 'upgrade' [13:23] frza: does anybody know why every kind of http request to my jetty server get a 400 response code? [13:23] mscdex: c4milo: it should print a string [13:23] ironfroggy: mscdex: i am using node-websocket-server which handles that and then has me listening on a "connection" event, but i think i can get the request from the connection object. thanks. [13:23] mscdex: c4milo: not print, but it's a property [13:24] mscdex: ironfroggy: hrm... not really familiar with nws, so i can't tell you for sure [13:24] c4milo: mscdex: I mean, it should be contain 'linux', 'darwin' and so on [13:24] c4milo: mscdex: but it doesn't. [13:25] c4milo: s/should be/should/i [13:25] mscdex: c4milo: ah, i see what you mean [13:28] aho has joined the channel [13:28] mscdex: that is strange [13:28] mscdex: because PLATFORM is set to DEST_OS [13:29] zapnap has joined the channel [13:30] c4milo: mscdex: I'm getting '1' in linux [13:31] mscdex: c4milo: http://groups.google.com/group/nodejs/browse_thread/thread/380f9a360ee44df2/51f041254bc3730c [13:31] mscdex: i'll see if i can debug it [13:32] kevm_ has joined the channel [13:34] ben_alman has joined the channel [13:37] FransWillem: eeek [13:38] FransWillem: where did this page go to: http://github.com/ry/node/wiki/ecma-5mozilla-features-implemented-in-v8 ? [13:38] TobiasFar has joined the channel [13:38] mscdex: FransWillem: ryah converted the wiki the other day [13:39] mscdex: FransWillem: http://github.com/ry/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [13:39] stagas has joined the channel [13:40] mscdex: case is different [13:40] stagas: mape: showing off wargamez [13:40] stagas: no bomb :/ [13:41] FransWillem: Ah, thanks :) [13:41] wattz: yay more meetings to day with the 'consultant' [13:41] wattz: -_- [13:41] wattz: the "javascript expert" that doesn't know what a closure is. [13:42] aho: *today [13:43] maushu: FIRE ALL WEAPONS. [13:43] maushu: *pew* *pew* [13:44] ehaas has joined the channel [13:44] kevm__ has joined the channel [13:46] aho: http://badassjs.com/post/971960912/uglifyjs-a-fast-new-javascript-compressor-for-node-js [13:46] aho: sounds great [13:46] aho: but does it also remove unused code? [13:47] aho: like there is a big fat library and you only use two of its 47 million functions [13:48] c4milo: mscdex: strings node | grep PLATFORM [13:48] c4milo: -rdynamic -D_GNU_SOURCE -DHAVE_CONFIG_H=1 -DEV_MULTIPLICITY=0 -pthread -DX_STACKSIZE=65536 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPLATFORM=linux -DNDEBUG -g -O3 -I/usr/local/include/node [13:50] wattz: are there any good js layout libs out there that aren't sproutcore, cappuccino, or dojo/dijit? [13:51] astrolin has joined the channel [13:52] jetienne: http://ukijs.org/ <- wattz there is this one [13:52] femtoo has joined the channel [13:53] wattz: building this app, and need it to be pretty absolute ui'd up [13:53] softdrink has joined the channel [13:53] wattz: not sure why work won't let us use existing products... [13:53] wattz: it's for wireframing and "widget building" [13:53] wattz: so [13:53] wattz: drag-drop. [13:53] wattz: jetienne: this looks pretty lightweight actually [13:54] wattz: and aot like sproutcore, lol [13:55] jetienne: sproutcore is nice for large webapps. but the lack of docs is a nogo for me [13:55] wattz: jetienne: yeah, it's real annoying [13:55] wattz: and Cappuccino is nice, objective-j seems like over kill though [13:58] wattz: i have 3 weeks to build this, i bet i could pseudo roll my own... I have a "wheel" problem [13:58] robotarmy has joined the channel [13:59] jetienne: later you will need to maintain it... [13:59] jetienne: and layout is browser specific [13:59] jetienne: aka i would not do it :): [13:59] wattz: yeah, but i can strap this to a browser since it's an internal app [13:59] wattz: html5/css3 [13:59] wattz: i even have little node server for it [13:59] wattz: lol [14:00] wattz: i got node approved for install on our dev's computers :D [14:01] maushu: wattz: I was able to convince my project manager to try node.js [14:01] wattz: maushu: how big is your company? [14:01] maushu: Who knows, maybe we can get rid of asp.net, sqlserver and alikes. [14:01] wattz: I had to go through 12 people... [14:01] maushu: Hmm, around 80 people. [14:02] wattz: 12 managers, vps, svps [14:02] wattz: maushu: my company is 10k (just at this campus) [14:02] wattz: :D [14:02] maushu: Yeah, that is probably why it was much more easier for me. [14:03] wattz: lol [14:03] mscdex: ok mac experts... i compiled and installed node, but now after a reboot it can't find node [14:03] maushu: That reminds me, I have to see on how to implement a sql server driver for node.js [14:03] maushu: mscdex: Son of a bi- IT RAN AWAY! [14:03] bronson has joined the channel [14:03] wattz: maushu: did you add it's install location to your profile? [14:03] maushu: wattz: hmm? [14:03] wattz: one sec [14:04] wattz: in my /etc/profile [14:04] wattz: i added export PATH=$PATH:/your/path/to/node/bin [14:04] wattz: at the bottom [14:05] wattz: and if you don't know where it was installed, have fun with: find / -name "node*" [14:05] maushu: Huh, make install does that for me. [14:05] wattz: then you should be able to just type node [14:05] wattz: and it runn [14:07] maushu: wattz? [14:07] wattz: maushu: [14:07] maushu: Oh god! I'm going to pun hell! [14:07] maushu: CURSE YOU MSCDEX! [14:07] mscdex: :-D [14:11] ceej has joined the channel [14:11] dylang has joined the channel [14:12] blogometer: Morning. [14:15] CrabDude has joined the channel [14:15] omarkj: Hey... [14:15] omarkj: any idea how to parse form data using node? [14:16] mscdex: omarkj: felixge has a file upload handler that also does simple form parsing too [14:16] omarkj: mscdex: Ok..but the multipart module is gone ? [14:16] mscdex: afaik [14:16] omarkj: bummer. [14:17] mscdex: omarkj: fwiw http://github.com/felixge/node-formidable [14:17] virtuo_ has joined the channel [14:17] drudge: connect-form uses formidable as well [14:17] omarkj: Thanks. [14:18] nerdEd has joined the channel [14:20] kodisha has joined the channel [14:21] c4milo: mscdex: http://groups.google.com/group/nodejs/browse_thread/thread/380f9a360ee44df2 [14:22] mscdex: c4milo: ah, nice catch [14:24] matt_c has joined the channel [14:24] felixge has joined the channel [14:24] felixge has joined the channel [14:24] felixge: is anybody working on something like bundler for node? [14:25] c4milo: felixge: http://groups.google.com/group/nodejs/browse_thread/thread/0e8a10a2da947896/69790aa37f00811b?#69790aa37f00811b [14:25] FransWillem: bundler ? [14:26] c4milo: FransWillem: http://gembundler.com/ [14:26] felixge: c4milo: just found that myself :) [14:26] felixge: c4milo: thx [14:26] c4milo: felixge: np :) [14:26] felixge: I guess I didn't think about using the local install feature of npm [14:26] felixge: I mean I don't want to deploy the main project through an npm registry [14:26] kodisha_ has joined the channel [14:26] felixge: but running npm locally to update the dependencies would be totally doable [14:27] felixge: c4milo: but there is no guarantee I'll end up with the right package versions, right? [14:29] felixge: http://github.com/isaacs/nave [14:29] felixge: I guess that's what I'm looking for [14:30] c4milo: felixge: in package.json you can specify your dependencies and versions [14:30] ajpiano has joined the channel [14:30] felixge: c4milo: yeah, but my programs require() calls will just say require('mysql') for example [14:31] c4milo: felixge: nave I guess it's just for node. To have many node versions at the same time [14:31] felixge: c4milo: yeah, looks like it [14:31] dylang: Is there a less verbose way to put server-side comments in ejs than <% /* comment */ %>? [14:31] aurynn: felixge, what interface are you defining for your mysql driver? [14:31] felixge: aurynn: ? [14:31] c4milo: felixge: ohh that's true. I think Isaac can explain you npm better than me :) [14:31] aurynn: I'd like to (more or less) get a compatible node API for database access [14:31] felixge: aurynn: http://github.com/felixge/node-mysql has the docs for the API as it is so far [14:32] felixge: aurynn: you mean between different db's? [14:32] wattz: felixge: i have a native C++ mysql driver [14:32] aurynn: felixge, I mean the startings of something akin to Perl's DBI, or Python's DB-API. A consistent interface for DB interaction [14:33] felixge: wattz: non-blocking? [14:33] wattz: felixge: working on it, having to do a little hacking to get it to work [14:33] felixge: aurynn: no, I don't care much about that. That being said, it can be done on top [14:33] c4milo: node-persistence is a good start [14:33] wattz: since mysql doesn't support it off the bat [14:33] wattz: socket based db is scarey to me [14:33] wattz: lol [14:33] felixge: wattz: are you binding libmysqlclient? [14:33] c4milo: http://github.com/creationix/node-persistence [14:33] wattz: yeah [14:34] aurynn: persistence is a bit too ORM-y [14:34] wattz: felixge: http://github.com/wess/Cargo < just the start, work has me building this app taking up my time [14:34] felixge: wattz: you'll have a hard time making that non-blocking without forking it ;) [14:34] wattz: felixge: forking or threads. [14:34] felixge: wattz: yeah [14:34] aurynn: I'm looking to have the basic semantics of how a DB driver works laid out [14:34] felixge: wattz: I think my JS module will be quite nice [14:34] wattz: felixge: i also want Cargo to be one addon for pg, sqlite and mysql [14:35] wattz: felixge: node-mysql? [14:35] felixge: wattz: yes [14:35] wattz: yeah it looked pretty cool [14:35] wattz: like i said, socket stuff just makes me a little tense [14:35] loincloth has joined the channel [14:35] felixge: wattz: I don't see why we should bind a C library, node should be good enough to write a mysql driver [14:35] wattz: direct connection i guess im just odl scool [14:35] wattz: ok new keyboard batteries ftw [14:35] wattz: old school [14:36] felixge: wattz: I mean it's nothing but problems: non-blocking, licenses, portability ... [14:36] wattz: felixge: i also not huge on being async everywhere [14:36] felixge: wattz: why do you like node? :) [14:36] wattz: there are lot's of reasons [14:36] wattz: but you don't have to like everything about something to love using it ;) [14:36] wattz: if that was the case, i wouldn't be married, haha [14:37] felixge: wattz: ;) [14:37] wattz: i love the way it handles sockets/http/etc... [14:38] stepheneb_ has joined the channel [14:39] jimmybaker has joined the channel [14:39] wattz: felixge: also, is there any speed difference between direct C bindings and pure js? [14:40] felixge: wattz: probably. [14:40] jimmybaker has joined the channel [14:40] felixge: wattz: but unless you are benchmarking SELECT (1) it should still be pretty competitive ;) [14:40] probablyCorey has joined the channel [14:40] felixge: insert performance might be slightly worse [14:41] wattz: felixge: yeah there are good arguments on both sides [14:42] wattz: felixge: i have this fun discussion with mde all the time [14:42] felixge: wattz: about? [14:43] wattz: when i do a select from the db, i don't mind waiting for the result so i can build my ui from it, via html or template render [14:43] wattz: when you have a ton of selects or a large result set i understand you can let other things keep going [14:44] wattz: and what i personally use mysql for is for massive data sets because i have had bad experiences with mysql, usually when it's massive i move to hadoop/hbase or something similiar [14:44] wattz: similar [14:45] virtuo_ has joined the channel [14:45] wattz: or rendering a template that requires data you are getting... if you render the template async... what else do you need to do? rendering should be the last step of your view/controller (imo) [14:45] aurynn: omg [14:45] aurynn: OMG! [14:46] aurynn: I got a prepared query to work! [14:46] wattz: but... when it comes to sockets, request handing, responses, http, etc.... async and how node does it, it's pretty damn badass [14:46] herbySk: felixge: FYI: https://gist.github.com/d4f70ded68e0d79c3eab [14:47] felixge: aurynn: using what? [14:47] felixge: herbySk: sick ... :) [14:47] aurynn: felixge, postgres-pure and a prepared statement. Which includes bind parameters. [14:47] wattz: felixge: but to each his own ;) [14:47] derferman has joined the channel [14:47] aurynn: IE, enough of the protocol to prevent a bobby tables attack [14:48] wattz: felixge: i may not be a purist, but im still passionate ;) [14:48] felixge: wattz: there are use cases where blocking I/O is not needed, but most people expect things to be non-blocking when working with node ;) [14:48] wattz: felixge: see previous statement [14:48] wattz: felixge: and your source man is very impressive, tbh [14:49] pgriess has joined the channel [14:49] wattz: and honestly i would have no problem using your module or recommend it to others [14:49] felixge: herbySk: Even so I have to say that this is probably the last thing I have performance worries about :) [14:49] felixge: wattz: glad you like it : ), I try to keep it clean [14:49] aurynn: Annnnd I now see how to refactor this so that I'm not needing two objects to handle the prepare, instead doing it in a single object that manipulates its own internal state.. [14:50] wattz: and if you ever need any help, let me know ;) [14:50] SubtleGradient has joined the channel [14:50] felixge: wattz: will do [14:50] SubtleGradient: ahoy [14:50] wattz: felixge: oh, and async for Inserts is brilliant [14:50] felixge: wattz: well, I'll need to add connection pooling for that to work, but yes - should be easy from this point on [14:51] aurynn: felixge, I noticed that as well. Any level of async (multiple transactions in flight) requires a connection pool [14:51] SubtleGradient: I'm trying to get npm up and running on my Mac. Only problem I've run into is that the path that it's installing its stuff isn't in node's require.paths by default. Anyone know if I could have missed a step or something? [14:51] wattz: felixge: and i do plan on making cargo as nonblocking as possible, and i was going down the threaded route [14:51] Yuffster has joined the channel [14:51] aurynn: Or your wire is blocked [14:51] felixge: aurynn: that's due to the protocol [14:51] SubtleGradient: Does node.js have a configuration file somewhere? [14:51] aurynn: felixge, same problem in PG [14:51] wattz: aurynn: yeah, Cargo's plan is to use a thread pool of connections [14:51] felixge: SubtleGradient: no, what do you need [14:51] wattz: set by the developer [14:51] FransWillem: wattz: (on a comment a bit up the scrollback) Why should rendering be the last step? Why wouldn't you simply send whatever is already done to the client? e.g. request all variables, send whatever bit didn't need vars, then when the first var arrives, send all up until the second var, etc [14:52] aurynn: wattz, that sounds reasonable to me [14:52] drudge: oh no it's SubtleGradient [14:52] SubtleGradient: run in terror, muahaha [14:52] aurynn: wattz, I was (eventually) going to build a connection pool straight into my driver. [14:52] wattz: FransWillem: and see that sounds like a web service setup [14:52] wattz: aurynn: im hoping to get PG into Cargo next [14:52] drudge: SubtleGradient: node.sugar? :P [14:52] SubtleGradient: felixge: just trying to figure out how to add npm's install path to node's require.paths by default [14:52] aurynn: wattz, what is cargo, btw? [14:53] rwaldron has joined the channel [14:53] wattz: http://github.com/wess/Cargo [14:53] wattz: C/C++ db bindgs [14:53] felixge: SubtleGradient: npm installs in ~/.node_libraries which is in your node require.paths by default [14:53] wattz: bindings [14:53] felixge: SubtleGradient: you shouldn't have to do anything [14:53] wattz: blocking for now [14:53] wattz: when i get back to it i want to build my generalized wrapper and thread manager [14:53] wattz: get mysql working with that [14:53] wattz: then get the core bindings of pg in [14:53] steadicat has joined the channel [14:53] wattz: so the user can select which db they want to use [14:54] FransWillem: wattz: No need to hold on to data you can already send to the client, just send it out when you can, that way you won't have to store it anymore, and you'll have less spikes in your data-traffic :) [14:54] ditesh|cassini has joined the channel [14:54] FransWillem: wattz: No need to hold on to data you can already send to the client, just send it out when you can, that way you won't have to store it anymore, and you'll have less spikes in your data-traffic :) [14:54] FransWillem: err [14:54] FransWillem: sorry [14:54] FransWillem: wrong screen [14:54] SubtleGradient: felixge: it isn't installing there for me, it's installing in /usr/local/lib/node [14:54] wattz: var db = new Cargo({driver: 'mysql', pool:20}); [14:54] wattz: FransWillem: right, but why would your process even continue? [14:55] SubtleGradient: maybe I should link that to ~/.node_libraries [14:55] wattz: and js gc should collect at the end of a method anyways [14:55] aurynn: wattz, that's looking like you want to do a DBI-esque lib [14:55] wattz: aurynn: for the driver yes [14:55] drudge: SubtleGradient: are you using sudo [14:56] wattz: and make it easy for people to build ORMs in pure js that support multiple databases by default [14:56] SubtleGradient: that would be madness, ofc not [14:56] SubtleGradient: just installed node again using bre [14:56] SubtleGradient: brew [14:57] fnando has joined the channel [14:57] aurynn: wattz, Aside from the ORMs part, definitely with you :_ [14:57] aurynn: :) [14:57] wattz: aurynn: :D [14:57] wattz: aurynn: also building a build system that i like, lol [14:57] drudge: SubtleGradient: npm config list [14:57] aurynn: :) [14:58] wattz: make/configure give me a sad [14:58] wattz: fought them for to long [14:58] aurynn: wattz, though, I'm talking to one of the guys who works on DBIx::Class on Perl, and they're building an AST-based ORM [14:58] wattz: and Waf is, well.... waffy :D [14:58] aurynn: that uses JSON as its data structure [14:58] aurynn: so supporting that would be really interesting [14:58] wattz: aurynn: that's funny, im building something for google's protobufs with an AST [14:58] wattz: shhh, secret [14:58] wattz: it's all part of a bigger plan that will sit on top of node [14:58] SubtleGradient: cool. lemme look at that… [14:59] wattz: or any ssjs implementation [14:59] FransWillem: wattz: Some kind of new language over JS ? [14:59] wattz: FransWillem: eww, no [14:59] wattz: js is an awesome language, not changing it [15:00] aheckmann has joined the channel [15:00] aurynn: I wanted to write a parser-generator in node, so I can write new languages [15:01] wattz: but i will say, the node community is awesome, and it's fun to have discussions with them because they don't rails out on me [15:01] wattz: (rails out: going evanglistic and assuming you are wrong because you disagree) [15:01] wattz: ;) [15:02] aurynn: like dhh, who is an idiot when it comes to databases? ;) [15:02] wattz: i moved some internal data handling that was accessed a shit ton off of... get this... [15:02] wattz: DB2. [15:02] wattz: to CouchDB.... blew.their.minds.. [15:03] robrighter has joined the channel [15:03] aurynn: If there's bindings for berkeleyDB, I want to write a document store on node.js using bdb. [15:04] SubtleGradient: yes! got it working, thanks guys! [15:04] jetienne: anybody knows the protocol used for http proxy ? (the ones you explicitly configure in browser) [15:04] wattz: nosir [15:04] aliudalius has joined the channel [15:05] dnolen has joined the channel [15:05] stride: jetienne: the protocol for http proxies? that's specified in the http 1.0 / 1.1 rfcs, or do you mean that auto-configuration script for browsers? [15:06] wattz: jetienne: i lose that link to the js ui framework you showed me :( [15:06] jetienne: stride: buried in rfc2616? [15:06] wattz: got it [15:06] batasrki has joined the channel [15:07] charlenopires has joined the channel [15:07] jetienne: ACTION doesnt want to parse all rfc2616 ... [15:08] stride: jetienne: at least it was for 1.0, 1.1 seems to contain the proxy stuff, too, yep [15:09] stride: 3143 seems to be proxy problems specific [15:10] stride: jetienne: but you might want http://en.wikipedia.org/wiki/SOCKS [15:11] maushu: Weird, bottom and right don't seem to work in firefox for text inputs with absolute position. [15:11] blogometer has joined the channel [15:11] jetienne: stride: ok will look. this is just for a little demo, i dont want to spend too much time on it [15:11] FransWillem: Does V8 have tail-call optimization ? [15:12] stride: jetienne: isn't there a proxy module already that you could use? [15:12] I--comment--: I AM HTML CODES [15:13] I--comment--: I AM HTML CODES [15:13] I--comment--: ok, i'm done [15:14] jetienne: stride: some github repo are doing proxy, but i dunno if they are doing the proxy protocol [15:14] jetienne: stride: in fact i dont even know if there is a specific protocol :) or this is just normal transparent proxuy [15:14] loinclot_ has joined the channel [15:14] jetienne: stride: do you ? [15:14] ironfroggy: i had read that node-websocket-server "automatically switches to flash when your browser doesn’t support web sockets" [15:14] jetienne: http://www.catonmat.net/http-proxy-in-nodejs pkrumins maybe you know ? :) [15:15] ironfroggy: but i can find absolutely no information on this in the actual node-websocket-server docs nor any clue how to use that on the actual browser-side. are there any articles that cover that? [15:15] jetienne: ironfroggy: isnt that socket.io which does this ? [15:15] FransWillem: ironfroggy: I think you're looking for socket.io instead [15:15] ironfroggy: hmm... if so then the article is badly written that i saw [15:15] aliudalius: FransWillem: http://glat.info/pub/tailopt-js/ I'm not sure, but perhaps you'd be interested in that? [15:16] stride: jetienne: HTTP defines proxying stuff for handling HTTP requests like GET http://foo.bar/foobar HTTP/1.0, SOCKS is a more generalized approach to proxying a few layers lower [15:17] FransWillem: Hmmm, I have a great idea brewing in my mind : [15:17] FransWillem: :/ [15:18] Neil__ has joined the channel [15:18] pkrumins: sup? [15:18] jetienne: stride: ok [15:18] ironfroggy: ok so i guess i should have been looking at Socket.IO in the first place... [15:18] ironfroggy: more time wasted there [15:18] stride: jetienne: http://github.com/mikeal/node.proxy.js/blob/master/main.js doesn't do anything fancy but I guess it works [15:19] jetienne: pkrumins: im looking at your http proxy, would that work if i config a browser toward it ? or http proxy, as browsers understand it, needs a != protocol ? [15:19] pkrumins: it would work, but grab the latest version here ; http://github.com/pkrumins/nodejs-proxy [15:19] pkrumins: no need for a protocol [15:19] jetienne: stride: so no special protocol. all those http proxy is basically a dns trick + transparent proxying... am i correct ? [15:19] pkrumins: it just proxies the requests, jetienne [15:19] pkrumins: not a socks proxy [15:20] stride: jetienne: dns trick? [15:20] pkrumins: just a dumb http proxy [15:20] jetienne: pkrumins: ok [15:20] jetienne: stride: yep like the browser connect the proxy, but give the appropriate hostname in the http request field... [15:20] jetienne: pkrumins: ok thanks [15:20] jetienne: stride: ok im not clear :) [15:21] stride: jetienne: but correct, i guess :) [15:21] pkrumins: you're welcome! [15:21] pdelgallego has joined the channel [15:21] stride: jetienne: btw, transparent in this context mostly means that the browser isn't configured to use a proxy, http(s) traffic is routed over a proxy on another OSI level [15:22] mravaux has joined the channel [15:22] jetienne: stride: i gto that :) [15:22] stride: ok :) [15:27] danielzilla has joined the channel [15:31] saikat has joined the channel [15:32] ironfroggy: I was trying the demo for Socket.IO and it seems broken. it tries to call this.connection.setTimeout(0) where connection is a ServerResponse. They don't _have_ setTimeout methods, do they? [15:33] allengeorge has joined the channel [15:33] mscdex: ironfroggy: are you absolutely sure it's an instanceof http.ServerResponse? [15:33] mscdex: and not net.Stream? [15:34] EyePulp has joined the channel [15:34] ironfroggy: TypeError: Object # has no method 'setTimeout' from http://paste.pocoo.org/show/251656/ [15:35] mscdex: oh, i dunno then [15:36] stepheneb has joined the channel [15:37] robotarmy has joined the channel [15:37] herbySk: ryah: ayt? [15:37] skampler: ironfroggy: try this.connection.socket.setTimeout [15:38] blogometer has joined the channel [15:38] ironfroggy: oh interesting... [15:38] ironfroggy: this line in socket.io/transports/websocket.js: this.connection = socket [15:39] kriszyp_ has joined the channel [15:39] jakehow has joined the channel [15:40] ironfroggy: this is a bit de-motivating to find Socket.IO so unstable that it doesn't work when i grab a copy [15:42] mattikus has joined the channel [15:44] easternbloc has joined the channel [15:45] easternbloc: connect people: what's happening with websockets? I've been looking at socket.io to use with express but I can't figure out how you attach a listener in the latest express. (run no longer exists...?) [15:45] daleharvey has joined the channel [15:47] jetienne: pkrumins: http://github.com/pkrumins/nodejs-proxy/blob/master/proxy.js#L86 here in fact the port may be in the header host. as in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Host = "Host" ":" host [ ":" port ] ; Section 3.2.2. [15:47] ironfroggy: easternbloc: i was trying to use socket.io this morning, myself. the chat demo included is broken out of the box, and I'm not having high hopes [15:48] ironfroggy: which is weird becasue i know its in use! not like its some backwater project. cant figure out what i am missing. [15:48] easternbloc: ironfroggy: looking back on the express google groups it did work [15:48] easternbloc: i'm just not sure it can work with the new implementation of server on express [15:49] easternbloc: just not sure if the people that are using it in express are using the older express release... [15:49] easternbloc: I'm also expecting it to be added to the connect stack [15:49] easternbloc: which is why im here, hoping someone will know :) [15:50] jetienne: pkrumins: filled a github issue [15:51] pkrumins: can you fix it? [15:51] jetienne: pkrumins: i will yes, as soon as i use your stuff :) will do this week [15:51] siculars has joined the channel [15:51] pkrumins: i mean that Host header if it has a port then it has a port [15:51] pkrumins: if not then it doesn't [15:51] pkrumins: so i am just passing it along [15:52] pkrumins: perhaps i should split on ':' and see the port that way [15:52] pkrumins: then i can not use 80 [15:52] pkrumins: but the port if there is one [15:52] pkrumins: if not then 80. [15:52] jetienne: pkrumins: yep split on ':' will do it. with a default on 80. [15:53] pkrumins: yeah like that [15:54] mscdex: ironfroggy: if you want, feel free to give grappler a try: http://github.com/mscdex/grappler [15:54] mscdex: i don't have a chat demo, but there is an echo server demo [15:55] mscdex: i'll be adding more demos in the near future [15:55] kodisha_ has joined the channel [15:58] mscdex: i've also got a better browser-side javascript file that does feature detection to automatically choose the best communication method. i plan on pushing that soon [15:58] mscdex: brb [15:59] bradleymeck has joined the channel [16:00] Tasser: is there some fancy stuff I could do with nodejs with some 15 year old kiddies? [16:00] SubtleGradient: yay me, I just published my first module on NPM. Sheet v1.0.1 [16:00] ph^ has joined the channel [16:00] bradleymeck: Tasser, chat client or irc bot are both easy [16:00] Tasser: bradleymeck, chat client with nodejs? display how? [16:00] bradleymeck: heck, translate.js from command line is cool [16:01] bradleymeck: http://github.com/LearnBoost/Socket.IO-node/tree/master/example/ [16:05] easternbloc: bradleymeck: have you used socket.io with express at all? [16:05] bradleymeck: i dont use express at all :/ i have used websockets w/ connect though [16:05] dmcquay has joined the channel [16:05] easternbloc: hmm that's as useful [16:05] SubtleGradient: is socket.io on npm yet? [16:06] easternbloc: aye [16:06] easternbloc: npm list [16:06] SubtleGradient: sqeetness [16:06] SubtleGradient: er… sweetness [16:06] ironfroggy: mscdex: taking a look, but i can't keep taking the time to change components. my pre-project researched gave me the impression i would be building my stuff by now, not still trying to figure out what libraries to use underneath it. [16:06] easternbloc: bradleymeck: how did you use it with connect? [16:06] SubtleGradient: that's the same developer who did MooTools' Forge [16:06] SubtleGradient: the socket.io guy [16:07] OSInet has joined the channel [16:09] bradleymeck: i wrapped the connect server in a node-websocket-server. then if i needed auth , made only ssl avail, injected a closured variable to be first message, had first message on the websocket always be an authentication check w/ scriptable cookie + the injected var [16:10] amerine has joined the channel [16:12] mu-hannibal has joined the channel [16:13] loincloth has joined the channel [16:14] easternbloc: cheers [16:14] easternbloc: i'll give that a go [16:14] derferman has joined the channel [16:15] aliem has joined the channel [16:16] derferman has joined the channel [16:16] bradleymeck: 60 chars over the tweet category for js1k T_T [16:16] quirkey has joined the channel [16:16] nrstott has joined the channel [16:16] nrstott has joined the channel [16:17] qFox has joined the channel [16:18] jpld has joined the channel [16:20] devinus has joined the channel [16:20] devinus: OMFG YES [16:20] devinus: http://github.com/mishoo/UglifyJS [16:20] devinus: now i dont have to write it [16:20] devinus: ACTION cries [16:20] devinus: yes! [16:22] mape: Still missing from npm :/ [16:23] mscdex has joined the channel [16:23] mape: But really nice to have an alternative to running YUI compressor/google closure compiler through Java [16:24] necrodearia has joined the channel [16:25] ehaas: oh shit someone wrote a js parser in js? [16:25] ehaas: i've been wanting this for a while [16:26] WALoeIII has joined the channel [16:27] WALoeIII has joined the channel [16:28] omarkj: Does it make a lot of sense to compress code that will be run by node.js ? [16:29] bpot has joined the channel [16:29] easternbloc: omarkj: it's for the front end [16:29] omarkj: easternbloc: k [16:32] kriszyp has joined the channel [16:33] bradleymeck: must break 192 chars down to 140 [16:34] joshbuddy has joined the channel [16:35] bradleymeck: also some compressors actually run optimizers anywho [16:39] mjr_ has joined the channel [16:41] jpld has joined the channel [16:43] FransWillem: Wow... [16:43] FransWillem: http://pastebin.com/SXg5KfnE [16:43] FransWillem: Gheh :p [16:44] FransWillem: converts your functions to asynchronous JS [16:44] FransWillem: Gotta add in error handling, though :/ [16:44] quirkey has joined the channel [16:45] samsonjs has joined the channel [16:48] pgriess1 has joined the channel [16:49] creationix has joined the channel [16:51] benburkert has joined the channel [16:52] samsonjs has joined the channel [16:53] kodisha_ has joined the channel [16:57] ben_alman: http://marijn.haverbeke.nl/uglifyjs something not scaling maybe :/ [16:57] tilgovi has joined the channel [16:58] samsonjs has joined the channel [16:58] pgriess has joined the channel [16:59] deepthawtz has joined the channel [17:00] benburkert has joined the channel [17:02] samsonjs has joined the channel [17:02] stepheneb_ has joined the channel [17:02] cardona507 has joined the channel [17:03] samsonjs has joined the channel [17:04] samsonjs has joined the channel [17:05] JimBastard has joined the channel [17:05] samsonjs has joined the channel [17:06] statim has joined the channel [17:06] samsonjs has joined the channel [17:07] hellp has joined the channel [17:08] samsonjs has joined the channel [17:08] voxpelli has joined the channel [17:09] voxpelli has joined the channel [17:09] JimBastard: poopedum [17:10] MikhX has joined the channel [17:14] mikeal has joined the channel [17:16] wattz: man, this is hard to plan out in my head [17:17] creationix: wattz: what are you planning? [17:17] wattz: simple ui library for work [17:17] Throlkim has joined the channel [17:18] wattz: like sproutcore with out all the sproutcore or anything [17:18] wattz: cappucino without all the obcj [17:18] wattz: objj [17:18] creationix: I know all about stuff like that [17:18] wattz: seems like all the ones i see try to do everything [17:19] creationix: wattz: I assume you looked at the ext one too [17:19] wattz: can't use ext [17:19] wattz: no offense to anyone, but i don't like working with it is all [17:19] wattz: (grant it, last time i looked at it was 07) [17:19] wattz: lol [17:20] wattz: I LOVE 280Atlas layout [17:20] wattz: im going to build it using sizzle [17:20] wattz: so if someone wants to use jquery it will be fine [17:20] wattz: but this is for internal stuff [17:20] wattz: (though i will prolly github it anyways for everyone, lol) [17:21] wattz: creationix: do you just absolute position everything? [17:21] creationix: wattz: yeah, I made a UI library once called topcloud [17:21] creationix: it was a layer on top of jQuery-UI [17:21] wattz: see we aren't using jquery.ui [17:21] wattz: to big [17:21] rwaldron has joined the channel [17:22] wattz: we have Lowesjs which is the components we need as generic as possible [17:22] creationix: I wasn't actually using jquery.ui for much except it's css [17:22] drudge: i really like the mobile jquery UIs they came out with recently [17:22] wattz: ahh [17:22] wattz: im not a _huge_ fan of js frameworks, sizzle and acme are cool though [17:22] wattz: they are just selector engines though [17:22] creationix: drudge: is there any actual code or just photoshop mockups [17:22] wattz: but the frameworks are decent for effects [17:23] drudge: creationix: looked like mockups for now, but i like the direction they went a lot more than say, cappuccino [17:23] wattz: wish i was a bit smarter with css [17:23] mjr_: The frameworks win by handling the cross-browser stuff for you. [17:23] creationix: drudge: it looks a lot like the Sencha Touch framework we're shipping now [17:23] wattz: mjr_: aye, that too [17:23] wattz: creationix: you are part of extjs? [17:23] drudge: creationix: now as in released or soon? [17:24] creationix: wattz: I work on the open source side of Sencha [17:24] wattz: ahh [17:24] creationix: but I sit by the guys who work on extjs and sencha touch [17:24] huyhong has joined the channel [17:24] creationix: drudge: it's in beta now, but a final release should come out in a couple of weeks [17:24] wattz: sproutcore is pretty cool, i just don't need all that [17:25] huyhong has left the channel [17:25] creationix: wattz: yeah, I liked the ideas in sproutcore, but it was way overkill for my needs at the time [17:25] creationix: that's why I made my own framework [17:25] wattz: creationix: you have it up anywhere? [17:25] creationix: we already had jQuery and jQuery-ui so I built on top of that [17:25] creationix: wattz: http://github.com/creationix/topcloud [17:26] wattz: creationix: and you said everything was absolute positioned? [17:27] drudge: creationix: sencha touch looks pretty cool! [17:27] creationix: wattz: yes, except I have special code for IE6 that uses javascript at runtime to make it work there too [17:27] mtodd has joined the channel [17:28] creationix: drudge: yeah, it's pretty sweet, and has MVC built in too [17:28] wattz: creationix: once i start diving in, do you mind if i shoot some questions at you? [17:28] creationix: wattz: sure [17:28] wattz: thanx [17:28] drudge: the demos are pretty impressive [17:28] FransWillem has joined the channel [17:28] FransWillem: Did anyone check out the pastebin I posted just before I left work :p? [17:30] isaacs has joined the channel [17:30] creationix: drudge: :) wait till I get them integrated with a node backend [17:30] wattz: another thing... sproutcore's docs kinda suck :P [17:31] drudge: creationix: can't wait to see it :P [17:31] benburkert has joined the channel [17:31] creationix: wattz: yeah, they seem hard to get into [17:31] creationix: drudge: it's still a ways off, but I'm working on it [17:31] wattz: yeah [17:32] wattz: creationix: seems like they are throwing features in a breakneck speed but not documenting anything [17:32] creationix: wattz: well, remember it was mostly for internal Apple use for a while, so docs were probably not high priority [17:33] devinus: ok [17:33] devinus: chrome has XSLTProcessor [17:33] wattz: creationix: right [17:33] devinus: webkit has XSLTProcessor [17:33] devinus: why can't node have XSLTProcessor [17:33] devinus: :( [17:33] devinus: there are bindings for this stuff somewhere already :( [17:33] creationix: devinus: because node is not a browser [17:33] creationix: besides, isn't XSLT a crime against humanity [17:33] tmpvar has joined the channel [17:34] creationix: a functional language with XML syntax [17:35] devinus: creationix: node is not a browser but one of the biggest advantages of node is doing mock testing [17:35] creationix: it is? [17:35] devinus: creationix: indeed [17:35] devinus: creationix: plus XSLT is super fucking awesome sometimes [17:35] tmpvar: yo [17:35] creationix: sure, I've written entire apps in xslt pulling xml from the server [17:36] devinus: for example, right now we're using an XSLT transform in the browser to parse Interface Builder .xib files and create SproutCore JS interfaces [17:36] creationix: tmpvar: speaking of browsers-like envs in node... [17:36] devinus: fucking awesome [17:36] paul__ has joined the channel [17:36] tmpvar: creationix, to what capacity? [17:36] mattikus has joined the channel [17:36] SamuraiJack_ has joined the channel [17:37] creationix: tmpvar: just jsdom, devinus is wanting XSLT in node [17:37] tmpvar: ah [17:37] tmpvar: doesnt libxml do that stuff? [17:37] mattikus has joined the channel [17:37] devinus: nah [17:37] devinus: libxml is jsut xml [17:37] creationix: devinus: just make an extension for xslt [17:37] devinus: i'm talking about the XSLT lvl 1 bindings all browsers have [17:37] creationix: or shell out to a command-line xslt processor [17:37] tmpvar: oh [17:38] mattikus has joined the channel [17:38] devinus: creationix: the only one i can think of is in java :( [17:38] drudge: e2 [17:38] drudge: ew* [17:38] creationix: devinus: no, xsltproc http://xmlsoft.org/XSLT/ [17:38] tmpvar: devinus, to execute xslt you need to have the document in a dom though. im really surprised libxml doesnt have support [17:38] mattikus has joined the channel [17:38] devinus: tmpvar: well, don't take my word for it, but i looked at it and couldnt find anything [17:39] mape: God damit the iPad has awful js performance [17:39] zomgbie has joined the channel [17:39] creationix: devinus: I've got it on my OSX machine and it's east to get on linux [17:39] tmpvar: creationix's link says that its "based on libxml2" [17:40] creationix: tmpvar: correct, I don't know if the other library provides xslt [17:40] creationix: but I've used xsltproc in the past and it works great [17:40] tmpvar: yeah, libxml doesnt [17:40] atmos has joined the channel [17:41] creationix: mape: especially for xhr [17:41] creationix: though we got some of the latest smart phones yesterday to test on and some of them are terrible js performance [17:41] creationix: they make the nexus one and the ipad look like speed deamons [17:42] mjr_: mape: the iPad has a pretty awful set of radios in it as well. Great GPU though. [17:42] FransWillem: Nexus One is a speed demon :p [17:42] FransWillem: creationix: Did you test it on Nexus One + Android 2.2 ;)? [17:42] creationix: mape: though webkit transforms in css are hardware accelerated [17:42] mape: yeah but you can no control over them [17:42] creationix: FransWillem: yeah 2.2 is a LOT faster, we've tried both [17:42] creationix: (my phone is a nexus one with 2.2) [17:43] mjr_: CSS anim/xform could have been so great if they just gave you a couple of extra things. [17:43] mjr_: Like, "I want to stop you, what is your current position?" [17:43] creationix: mape: sure you can, we do it all the time in our webkit-only frameworks [17:43] mjr_: No way to actually know. [17:43] creationix: mape: you just have to use webkit specific css [17:43] mape: creationix: How would you stop an animation in the middle of running? [17:44] creationix: hmm, not sure about that [17:44] mape: Well, that is what I call control :P [17:44] mape: Being able to stop them [17:44] mjr_: You can "stop" it by changing the style, but then it'll need to reset to some other position. [17:44] digitalspaghetti: anyone here using Jade for their templates? [17:44] mape: mjr_: So not instant? [17:44] mjr_: mape: no, I think it's instant [17:45] mjr_: But you just don't know where it'll be when it stops, so it's really hard to use for a huge set of problems. [17:45] creationix: I haven't played much with it, I just know it's a LOT faster and smoother using transforms and css animations [17:45] mjr_: Don't get me wrong, hardware CSS anim is super great. [17:45] mjr_: Compared to not having it at all. [17:45] ThePub has joined the channel [17:47] streampunk has joined the channel [17:48] derferman has joined the channel [17:51] ashb has joined the channel [17:51] MrTopf has joined the channel [17:53] sudoer has joined the channel [17:54] ollie has joined the channel [17:55] wattz: don't you wish you could pass references in js :P [17:55] FransWillem: ...? [17:55] wattz: like in C++ [17:56] FransWillem: You can ? [17:56] wattz: how? [17:56] FransWillem: Objects are, by definition, passed as reference [17:56] wattz: ... [17:56] wattz: so if i have 2 functions [17:56] nrstott: FransWillem is irght wattz [17:56] digitalspaghetti: ok another question, anyone know how i can turn off the requirement for jade rendering in express? [17:56] nrstott: is right* [17:56] wattz: wait.. [17:57] wattz: so if i have : function increaseInt(/*int*/ x) { return x++ } [17:57] wattz: and another one [17:57] nrstott: ints aren't objects [17:57] wattz: i said pass by reference, i didn't specify type :P [17:57] nrstott: well he did [17:57] nrstott: he said objects are passed by reference [17:57] wattz: missed where he said objects [17:57] wattz: sorry [17:57] nrstott: ok :) [17:57] wattz: ok, show an example with objects then [17:58] wattz: one sec [17:58] nrstott: function my(obj) { obj.my = 'world'; }; var obj = {}; my(obj); console.log(obj.my) [17:58] digitalspaghetti: var foo = {value: 3}; incInt(foo) { return foo.value++; } [17:59] wattz: but from function to function? [17:59] wattz: guess si [17:59] wattz: so [18:00] twoism has joined the channel [18:00] derferman has joined the channel [18:00] wattz: just going to use int in my example, even though i know we are talking objects [18:00] wattz: 1 sec [18:00] TommyM has joined the channel [18:00] digitalspaghetti: you shouldn't actually have to return foo.value++, just do the ++, and foo.value will increase [18:01] wattz: http://gist.github.com/535647 [18:02] digitalspaghetti: http://pastebin.com/VknUXR1a [18:02] wattz: see you are in a more global spot [18:02] wattz: one sec [18:02] visnup has joined the channel [18:02] wattz: if you had references. [18:02] maushu has joined the channel [18:03] bradleymeck: haha! it fits in a tweet! [18:03] nrstott: wattz, i think we've made it clear what happens :) [18:03] dylang_ has joined the channel [18:03] digitalspaghetti: it's javascript, not C++ :) [18:03] nrstott: JavaScript as a language is never going to allow you to pass around memory addresses of primitives like C++ [18:03] nrstott: however, all objects are passed by ref [18:03] wattz: right [18:03] wattz: nrstott: by my question then is... [18:03] wattz: if you are in a function [18:03] visnup: do people mind if we co-opt this channel during knockout as virtual knockout hq? [18:03] digitalspaghetti: so basically, you need to keep a global register if you want to throw around values [18:04] wattz: digitalspaghetti: 'zackly [18:04] wattz: you can pass references from the scope of another function [18:04] wattz: which brings my back to... Be cool if you could :D [18:04] nrstott: talk to the ECMAScript5 committee :) [18:04] nrstott: es-discuss mailing list [18:05] kevm_ has joined the channel [18:05] wattz: ACTION starts to draft a letter [18:05] wattz: :D [18:05] digitalspaghetti: if you're doing that, you might as well code your stuff in PHP ;P [18:05] wattz: what's php. -_- [18:05] creationix: how hard would it be to get Narcissus running on node instead of spidermonkey? [18:06] jchris has joined the channel [18:06] creationix: http://mxr.mozilla.org/mozilla/source/js/narcissus/ [18:06] rauchg_ has joined the channel [18:06] FransWillem: creationix: Have you tried ? [18:07] creationix: no, I read it uses special features only available in spidermonkey [18:07] nrstott: creationix, it lists those special features in js.js [18:07] FransWillem: Meh, I'd give it a shot :p [18:07] nrstott: none of them should be too huge of showstoppers [18:08] creationix: nrstott: hmm, most of that V8 has [18:08] nrstott: creationix, yeh, so it shouldn't be that bad [18:08] creationix: what is a catch guard? [18:08] creationix: I'm guessing we don't have that [18:09] mscdex: http://en.wikipedia.org/wiki/Narcissus_(JavaScript_engine) [18:09] mscdex: "... because the engine itself is also written in JavaScript, albeit using a lot of non-standard extensions that are specific to SpiderMonkey, one of them specially added for Narcissus and currently only available in a development branch of SpiderMonkey." [18:09] mape: tmpvar: Have a sec to take a quick look on a canvas performance issue? [18:09] mscdex: one of the features is specifically for Narcissus [18:09] mscdex: heh [18:09] creationix: mscdex: yeah, I've read that, I'm wondering what those specifics are, it says here http://mxr.mozilla.org/mozilla/source/js/narcissus/js.js#38 [18:10] TommyM: tim, why would you want to write a javascript engine in node? :) [18:10] mscdex: well, apparently there is at least one that only exists in the latest spidermonkey dev version [18:10] creationix: TommyM: experiment with http://blog.mozilla.com/dherman/2010/07/09/javascript-needs-modules-ctd/ [18:10] mscdex: so i think it'd be hard to be able to get around that one [18:11] creationix: mscdex: which one is that, and is it required [18:11] mscdex: unless you implement that one certain feature [18:11] mscdex: i don't know, that's just what wikipedia said [18:11] creationix: if it's just used for proper line numbers in exceptions, then it's not a show-stopper [18:11] nrstott: catch-guard would be hard [18:11] nrstott: its this [18:11] icozzo has joined the channel [18:11] nrstott: catch (e if e == BREAK && x.target == n) { [18:11] nrstott: that kind of statement [18:11] zapnap has joined the channel [18:12] creationix: nrstott: but isn't that just syntax sugar [18:12] nrstott: creationix, indeed [18:12] creationix: you can put the if statement in the catch block and rethrow [18:12] nrstott: sure, if your goal is to have a fork that works [18:12] nrstott: i doubt theyd accept that kind of patch [18:14] creationix: what about getting catch-guards into v8 [18:14] ineation has joined the channel [18:15] creationix: if it's just syntax sugar it should't be hard [18:15] astrolin has joined the channel [18:15] drudge: it's ugly imo [18:15] creationix: I just think something like narcissus running on node would be super awesome for exploring ES ideas [18:16] nrstott: creationix, I agree [18:16] creationix: mikeal: you don't like the simple module proposal? [18:17] mikeal: not don't like [18:17] mikeal: i HATE it [18:17] nrstott: is the simple module porposal the 'ruby' style modules ? [18:17] nrstott: if so i hate that too ;0 [18:17] nrstott: well hate is a strong word [18:17] mikeal: it's just called modules now i believe [18:17] mikeal: they dropped the "simple" part [18:17] creationix: mikeal: I like the part about removing global and making everything lexical [18:17] mikeal: it's 5 new pieces of breaking syntax in the language that provides a module system that does half of what commonjs does [18:18] mikeal: right, but we do that already [18:18] mikeal: in commonjs [18:18] kevm_ has joined the channel [18:18] creationix: well, not lexical [18:18] nrstott: how is CommonJS module system not lexical? [18:18] mikeal: sorry, removing global we have [18:18] creationix: If I want something to use closure variables, I HAVE to nest the code [18:18] mikeal: lexical comes with let [18:18] pgriess has left the channel [18:18] creationix: it can't be in another file [18:18] mikeal: yeah, that's crazy tho [18:18] creationix: maybe I'm misunderstanding the proposal them [18:19] mikeal: it changes the language rules kinda drastically [18:19] mikeal: at this point, i'm pretty sure that all the breaking changes in Harmony won't be implemented outside of AS and Mozilla [18:20] creationix: yeah, ES5 is pretty good, but there are some things I really want that are not possible with ES5 [18:20] creationix: either way, we need to experiment with the ideas and having js in js on node would help with that [18:20] mikeal: i want ephemeron tables [18:20] FransWillem: Hmmm, how on earth is this stuff defined, and when is x set: function f() { var y=x; var x=10; return x; }; f(); returns 10 :S [18:20] mikeal: which don't require breaking changes [18:21] creationix: FransWillem: var x = 10;return x; ? [18:21] creationix: that should return 10 [18:21] mikeal: yeah, that makes sense :) [18:21] creationix: FransWillem: did you mean return y ? [18:21] FransWillem: Oh crap... [18:21] FransWillem: That's why [18:22] FransWillem: aaah, ok, that makes more sense :) [18:22] creationix: return y should give you undefined [18:22] creationix: even if x if defined in an outer closure [18:22] creationix: unless x is a parameter to f() [18:22] streampunk: mikeal: Given that harmony will be driven using a version directive, I wonder if it would be possible to implement some of the simpler parts like modules with a compiler. [18:22] mikeal: nope [18:22] mikeal: modules is insane [18:22] mikeal: it's basically namespaces [18:23] mikeal: and changes to scoping rules, that you can't fake any other way unless you had let [18:23] herbySk: creationix: "things not possible" like? I personally would love proxies... [18:23] mikeal: which is also part of harmoney [18:23] bradleymeck: WTF firefox doesnt suport setInterval on a string!? [18:23] FransWillem: Hmmm [18:23] visnup: draft of how judging / voting will work for knockout: http://bit.ly/auTwnJ [18:23] mikeal: i think proxies can be done without a breaking change [18:23] FransWillem: What do you guys think of this idea: http://github.com/Frans-Willem/poc-jsasyncify/blob/master/README.markdown ? [18:23] visnup: comments welcome [18:23] streampunk: Right. But since scopes aren't easily reflected in strict mode it would be possible to enumerate vars during compilation. [18:23] codemariner has joined the channel [18:23] mikeal: the current proposal might have some, but it could be re-worked [18:23] streampunk: mikeal: I'd love a way to turn a function into a proxy. [18:24] mikeal: it just wouldn't be a feature you could hack in to a prototype [18:24] mikeal: right, but the question is, should that directive be new sytax or a new prototype function [18:24] mikeal: the solution to everything on es-discuss is to add syntax [18:24] mikeal: which is aweful [18:24] bradleymeck: who de nany about proxies? there are 2 impls for node [18:25] mikeal: object proxies [18:25] mikeal: not http proxies [18:25] mikeal: and there are more than 2 :) [18:25] streampunk: Well, I'm no afraid to say that monoglots are part of the problem. I'd actually encourage more work on common runtimes and less on language. [18:25] solidsnack has joined the channel [18:25] jochen1 has joined the channel [18:26] creationix: mikeal: if we could make js in js fast enough to be usable for real work, then people could implement whatever experiments they wanted [18:26] mikeal: there already is more work on runtimes than the language [18:26] streampunk: I mean, we did start this with browsers and it still has that type attribute on the script tag which does work. It's absurd that people don't try more things there. [18:26] mikeal: the language is just *way* off course from a direction that people who actually use it care about [18:26] mikeal: just like it was 4 years ago :) [18:26] creationix: the big feature is the ability for stack traces to show lines in the original source, not the generated js [18:27] streampunk: mikeal: Fair. Just thinking that projects like NaCL should get some more love. [18:27] mikeal: i don't think js would benefit that greatly from becoming a DSL system [18:27] nrstott: mikeal, 'people who actually use it' have a wide variety of opinoins. However, I'd agree that es mailing list seems to be dominated by academic-types (if not actually in academia they seem to think like it) [18:27] mikeal: the thing is, js is already better for most tasks than the langauges people try to compile to it [18:27] streampunk: mikeal: DSLs suck. Not sure how supporting more than one language has anything to do with that. [18:27] dylang has joined the channel [18:27] mikeal: the reason they compile to it isn't because it's a great common runtime for their language, it's because of it's ubiquity [18:27] programble has joined the channel [18:28] bradleymeck: mikeal i was talking about object proxies ive only seen 2 modules that make em for node though [18:28] mikeal: nrstott: that's because the real work happens in private between member [18:28] mikeal: members pay 100K per year [18:28] streampunk: Yeah. It's a balance but we are reaching a maturity with what we started with that gives benefit to wide adoption of experimentation. [18:28] mikeal: bradleymeck: really? where? [18:28] mikeal: i know you can do it in C++ with v8 [18:28] bradleymeck: node-overload , node-proxy [18:28] nrstott: members pay 100k per year? do you mean they get paid or they pay a fee? [18:28] mikeal: i need to check these out [18:29] mikeal: nrstott: they pay a fee to be an ECMA member [18:29] mikeal: it's 100K per year [18:29] bradleymeck: proxy is closer to spec but overrides some Object properties :(, overload is more flexible but not entirely w/ spec [18:29] mikeal: the actual number of companies in TC-39 is quite small [18:29] mikeal: 12 or 13 last time i checked [18:29] mikeal: maybe more now [18:29] ashb has joined the channel [18:29] mikeal: bradleymeck: that's really good to see [18:30] mikeal: we need more experiments like this being implemented before ratification [18:30] bradleymeck: we also have weakmaps and weakrefs in node-overload [18:30] mikeal: did someone write an ephemeron table yet? [18:31] mikeal: i'm so eating my words about that [18:31] bradleymeck: yep, in overload, check the examples [18:31] mikeal: i was like "nobody will ever need that" [18:31] mikeal: yeah…. i kinda need it now [18:31] bradleymeck: i use it like drugs [18:32] mikeal: does that mean often or in moderation ? [18:32] mikeal: :) [18:34] herbySk: bradleymeck: yes, weak* would be handy, too [18:34] bradleymeck: ummm, i abuse it to let there be private variables in my prototypes that extensions cant see [18:34] bradleymeck: weakrefs still havent found a use case for me but they are there [18:35] bradleymeck: and GC callbacks can be nice so we have one [18:35] bradleymeck: sweet, im the only twitter class js1k that has user interaction XD [18:36] mu-hannibal has joined the channel [18:37] creationix: herbySk: is push() slow on large arrays? [18:37] creationix: (I'm still going though my emails) [18:38] herbySk: bradleymeck: I had a use case for them, when I thought about a dirty db/persistence system. If a had weakref, I had no problem keeping array of "revisions" - if they stop being used, they will disappear [18:38] herbySk: creationix: probably not, but splice() in half of big data is [18:38] blogometer has joined the channel [18:39] bradleymeck: no, they get set to null, you are thinking of weak maps :/ [18:39] jbaron has joined the channel [18:39] creationix: herbySk: I know splice on half is a LOT faster than a million shifts() calls [18:39] bradleymeck: i still think they should have keys() on weakmaps [18:39] creationix: bradleymeck: agreed [18:39] creationix: bradleymeck: fwiw [18:40] herbySk: creationix: sure. not having that splice is (I think) even faster. Maybe only twice as, or maybe only 50%, but still... [18:40] creationix: herbySk: ok, I'll try to grok your queue code then. I often need a fast queue, node needs one too [18:40] christophsturm has joined the channel [18:40] bradleymeck: i left em in my ephemeron tables bwahahaha, they said "it opens up a new channel of references" which they dont want, ptewee [18:40] wllm has joined the channel [18:40] creationix: herbySk: well, shift has a cost of O(n), slice on half is O(log(n)) [18:41] herbySk: creationix: but the one without a reverse and with a counter, pls... the one without any data move... [18:41] herbySk: creationix: slice in half is O(log(n))??? why? [18:41] stride has joined the channel [18:42] herbySk: (you mean, in average? well, in average it is O(1)) [18:42] creationix: since I only call slice when half the queue is stale, I'm only calling it log(n) times, and a single slice is the same magnatide as a single shift [18:43] Tobsn has joined the channel [18:43] creationix: herbySk: yeah, I didn't explain that right, the single shift is O(n - 1) and the single slice is O(n/2) [18:43] herbySk: as I said, O(1), because after n/2 no-ops you do shift with n/2 data. But not having it at all is yet faster [18:43] creationix: but the overall effect is O(n*n-1) for shifting and O(log(n)*n/2) for slice [18:44] creationix: herbySk: ok, back to reading your queue code [18:44] jbaron: hi, anyone using mongodb-native driver ? [18:45] herbySk: creationix: well, ok, it depends how the queue is filled in the meantime - I mistakenly (academy thinkging) thought of full queue exhausting fully but not pushed to... sorry [18:45] creationix: herbySk: yeah, I [18:45] herbySk: (but it is still O(1) in average - O(n/2) each n/2) [18:46] creationix: I'm trying to simplify the problem, assume the queue has 1,000,000 items and I want to shift them one at a time and no new ones are added [18:46] bradleymeck: jbaron if its about the connection issue, for some reason the driver kills connections between event loop iterations [18:46] creationix: plain shift will never finish. period [18:47] wink_: jbaron: im not, but i have a little experience with it [18:47] jbaron: I have a problem (or more likely ignorance) with inserts [18:47] blogometer: Is there any way I could convince the community of the merits of bottom posting on the mailing list? [18:47] blogometer: Or am just a grumpy old man? [18:47] creationix: blogometer: bottom-posting? [18:47] herbySk: creationix: yeah, I understand. This was of course, right thing to do. What I propose is, simply reading that queue to the end (not doing any splice) until you hit the queue.length is the fastest thing [18:48] bradleymeck: not familiar w/ that term [18:48] blogometer: Putting your response to the thread at the bottom of the post. [18:48] blogometer: Trimming for context. [18:48] wink_: blogometer: unfortunately top posting has won out it seems :<. I wish email clients defaulted replies to the bottom [18:48] jbaron: When I insert an item which violates a unique index, everything seems to be fine. [18:48] creationix: herbySk: oh, so don't slice it till it's empty? [18:48] herbySk: creationix: (and filling the second array in the meantime, then switch them) [18:48] blogometer: wink_: It makes really hard when you want to discuss point by point. [18:48] herbySk: creationix: yeah, not move the data at all [18:48] creationix: blogometer: yeah, I try to do that [18:49] blogometer: creationix: Cool. [18:49] wink_: jbaron: is your issue the lack of an error? [18:49] creationix: herbySk: two arrays? interesting [18:49] jbaron: wink_: yes [18:49] wink_: blogometer: don't get me wrong i agree completely, top posting makes mailing lists a mess [18:49] creationix: herbySk: so one is being consumed while the other is growing, that could work [18:50] herbySk: creationix: sure could :-) [18:50] xer0xM has joined the channel [18:50] blogometer: I already seem to be the first to jump on people for bulking up the code, and I just got here this week. [18:50] creationix: herbySk: while we're on the subject of queues and shift, node uses shift for some of it's internal queues and it really sucks [18:50] wink_: jbaron: unfortunately i dont think thats the binding's fault. mongo is pretty silent about key violations, does the native driver support any sort of getlasterror? [18:50] blogometer: If I start nagging people about top posting, I will be a pariah. [18:50] herbySk: creationix: and if you reuse them, emptying just by x.length = 0 the space is reused, so you should not get overhead of allocating/gc [18:51] creationix: like process.nextTick will die if you fire off a bunch as once [18:51] creationix: herbySk: yeah the length = 0 trick is awesome [18:51] jbaron: wink_: I'll look into that [18:51] creationix: ryah: would you be interested in a fast queue implementation for node? [18:51] wink_: jbaron: it looks like it at least has primitive support for it, that's what you'll want to issue after your insert returns to see if any rows were actually inserted [18:51] jbaron: I thought that strict mode would solve this problem. But no such luck [18:52] herbySk: creationix: well, for _small_ queues shift() is great, since it's simple and right away. [18:52] bradleymeck: does length=0 work w/ pops? [18:52] TooTallNate has joined the channel [18:52] creationix: herbySk: hmm, I wonder at what length a smart queue is faster [18:52] bradleymeck: ie. will you still get the end of the arr [18:52] jbaron: wink_: but I get an object back [18:52] jbaron: wink_: even with an _id assigned to it. So it looks like it succeeded. [18:52] herbySk: creationix: if you feel that some queues may be really big, you should use another solution, like the one we jsut discussed, for example... I don't know how long can in practice nextTick queues be [18:53] wink_: jbaron: is the _id correct for the existing document? [18:53] creationix: herbySk: nextTick queues are usually pretty small, but in some cases they get really big [18:53] creationix: not much in between [18:53] confoocious has joined the channel [18:53] jbaron: wink_: no, it is a new _id [18:54] creationix: herbySk: I'm suprized V8 doesn't implement shift better, it seems trivial to switch algos when it gets large [18:54] wink_: oh damn, that sucks... :P [18:54] bradleymeck: we should make a default queue for menial nextticks, im sure an array iter would be faster than too many ticks [18:55] frza has joined the channel [18:55] wink_: jbaron: http://groups.google.com/group/mongodb-user/browse_thread/thread/45f302d72209e14d that seems to confirm what im saying, that getlasterror is how you're supposed to check what your query did [18:55] herbySk: creationix: well, there are subtle implementation details with this two-half queue, where you can decide if you do it faster while full, but have shift() at empty queue slower (which I think could be usable in nstore), but you can as well make empty shift() faster, but induce one additional if in every "full case", and this could be right for the nextTick queue... [18:56] creationix: maybe [18:56] jbaron: wink_: thanks, look like that is indeed what I should do :) [18:57] mtodd has joined the channel [18:57] herbySk: creationix: v8-shift: I thought they have it there, but your expenrience says they don't... c'est la vie... [18:57] wink_: jbaron: sorry i couldnt help you more, i've been using the c driver binding :p [18:58] tmpvar: the c-binding works? [18:58] creationix: herbySk: yeah, I haven't dug real deep, I just know that whenever I try to shift off a large array my cpu pegs for hours and when I profile it, OSX says it's mostly in V8::array_shift or something like that [18:58] wink_: yeah, it does, i've got a few pretty critical fixes in my fork of it [18:58] wink_: orlandov must be on vacation or something :p [18:59] TooTallNate: I was experiencing the same results as tim with Array#shift recently on a large array of "chars"... [18:59] herbySk: creationix: which is good enough proof for me :-) [19:00] jbaron: wink_: you mean the real C driver or the node.js-C driver (node-mongodb ) ? [19:00] creationix: TooTallNate: I'm about done with my Queue object which I'll push as part of nStore in a few minutes [19:00] wink_: the binding to the c driver, node-mongodb [19:02] jbaron: wink_: why did you go that route (just curious) ? [19:02] TooTallNate: creationix: cool, I'll check it out! [19:03] wink_: jbaron: 1) style preference 2) i have a sneaking suspicion the c binding out performs the native binding by a fair bit (not confirmed) [19:04] wink_: fixing the bugs is fun too [19:04] TooTallNate: Is there a known problem with `sys.pump` and a FileReadStream and a HttpServerResponse? I've been having the request be sent across the wire, but the response's "end" method is never called, and the connection is never closed... [19:05] creationix: wink_: I have hopes that someday pure js modules can perform the same as c modules for network protocols [19:05] jimmy203 has joined the channel [19:05] creationix: wink_: but I think we're still a ways off [19:05] jbaron: wink_: perhaps I should that one give a try also. From quickly browsing the doc, the api seems nice. [19:05] aheckmann has joined the channel [19:05] wink_: creationix: yeah, it'll get close eventually [19:06] jimmy203: anyone here have much experience with mongoose? [19:06] mattly has joined the channel [19:06] wink_: creationix: im far more comfortable in c for that kind of work so i didnt mind ;) [19:07] creationix: jimmy203: rauchg_ does [19:07] jimmy203: When I save to my db model ie - 'TEST' it changes the collection to lowercase and appends an s? [19:07] wink_: jbaron: i dont want to usurp orlandov, but i'd use my fork until he gets a chance to merge my patches [19:08] herbySk: creationix: Why, it's possible, it's just a matter of critical mass. Everything is about optimizing compilers and in some areas of hard-time-constrained gcs (algos are available). [19:09] herbySk: creationix: For example, SqueakNOS tries something in that direction... [19:09] creationix: herbySk: yeah, it's certainly getting closer. I'll try again with my postgres driver once I get nStore solid [19:09] rauchg_: jimmy203: hey [19:09] jbaron: wink_: what is the url of your fork ? [19:10] c4milo has joined the channel [19:10] jimmy203: rauchg_: any ideas? [19:11] rauchg_: correct [19:11] rauchg_: by default [19:11] rauchg_: it takes the model name [19:11] rauchg_: appends an s [19:11] rauchg_: to generate the collection name [19:11] rauchg_: you can override this [19:11] herbySk: creationix: Operating System: An operating system is a collection of things that don't fit into a language. There shouldn't be one. [19:11] rauchg_: by passing a third parameter [19:11] rauchg_: to the model definition [19:11] herbySk: do you know who said that? [19:11] rauchg_: which would be the collection name [19:11] CIA-77: node: 03Herbert Vojčík 07master * r9253333 10/ (src/node.js test/simple/test-module-loading.js): [19:11] CIA-77: node: Fix registerExtension for NODE_MODULE_CONTEXTS [19:11] CIA-77: node: Fix of registerExtension-produced non-string module loading with own [19:11] CIA-77: node: context. Plus finishing touches to the test. - http://bit.ly/9AayqW [19:11] CIA-77: node: 03Herbert Vojčík 07master * r5dc2b93 10/ lib/sys.js : Fix sys.inspect for regex in different context. - http://bit.ly/9Tho26 [19:11] CIA-77: node: 03Herbert Vojčík 07master * r2b126da 10/ (5 files in 2 dirs): Tests for behaviour of 'global'. - http://bit.ly/aMUo0S [19:11] MikhX has joined the channel [19:11] creationix: herbySk: :) [19:12] jimmy203: great, Thanks - I`ll give it ago. [19:12] creationix: herbySk: no, sorry [19:12] herbySk: creationix: it's from 1981 paper from Dan Ingalls. http://www.cs.virginia.edu/~evans/cs655/readings/smalltalk.html [19:12] rauchg_: a true genius [19:12] creationix: herbySk: neat [19:13] creationix: herbySk: https://gist.github.com/5a336f731405b1f4c4d4 [19:13] creationix: herbySk: it seems like a lot of code in shift and length, but should be pretty fast for large queues [19:14] herbySk: btw, the same guy said some year ago: "Javascript is the new Smalltalk". Which is something (at least I see it as something). He also wrote thing called KernelSpaces, a full app/dev platform in pure js. [19:14] felixge has joined the channel [19:15] creationix: I think I remember hearing about that [19:15] herbySk: no KernelSpaces, LivelyKernel [19:15] jetienne has joined the channel [19:15] creationix: yeah, he showed up on the node mailing list one day I think [19:17] herbySk: creationix: why "this.offset + 1 > this.tail.length" is not simpler "this.offset === this.tail.length" ? [19:17] creationix: good point, it should only grow by one at a time [19:19] jimmy203: rauchg_: that worked thanks :) [19:19] herbySk: creationix: should be "head" in that if instead of "tail"? [19:20] herbySk: creationix: or you switched them? I thought the head is where it is read from... [19:20] creationix: yeah, I'm reading from tail, maybe that's backwards? [19:20] creationix: maybe top and bottom is better? [19:20] creationix: feed in top, pull out of bottom [19:22] MikhX has joined the channel [19:22] herbySk: creationix: doesn't matter... it's just harder to read now... every time I hard about queues, the "front" or "head" was the place where things were taken off from and "back" or "tail" was the place where they were appended [19:22] herbySk: s/hard/heard/ [19:23] creationix: herbySk: fair enough, I'll switch them [19:24] creationix: herbySk: should I use enqueue and dequeue or stick with push and shift? [19:24] wink_: jbaron: http://github.com/w1nk/node-mongodb [19:25] ryah: creationix: fast queue? [19:25] creationix: ryah: things like process.nextTick are really slow if lots of events get queued up [19:25] creationix: it uses shift to pull things off the queue [19:26] c4milo: ryah: is there module versioning support in the TODO ? [19:26] creationix: which is bad for large arrays [19:26] huyhong has joined the channel [19:26] huyhong has joined the channel [19:26] huyhong has left the channel [19:27] ryah: creationix: yes, it's a bit worry-some for the Stream outbound queues [19:27] herbySk: creationix: Line 10 is the optimization for empty shifts(), but induce if for every shift() call. So, ithis implementation would be great for nextTick, but maybe not for nStore - I assume you want to have faster shift() when the data is presents, sacrificing some additional operation in shift() from empty one... [19:27] ryah: but no, i dont want an implementation [19:27] creationix: ryah: I'm working on a faster queue (for large arrays) for nStore [19:27] creationix: ryah: ok, just wondering [19:28] creationix: herbySk: yeah, I was wondering about that [19:28] deepthawtz has joined the channel [19:28] creationix: I'm not sure of the cost of length on arrays [19:28] ryah: i mean, unless that can be shown to actually improve perfomrnace [19:29] ryah: but i doubt it [19:29] mscdex: ryah: any chance to merge the process.platform patch from the ML? [19:29] creationix: ryah: maybe I'll tackle it later. I know it makes a huge difference for my stuff [19:29] TangoIII has joined the channel [19:29] creationix: ryah: but node doesn't have huge queues as often [19:30] herbySk: creationix: if I am right, if on line 18 can only suceed after a switch was done (the previous if body was run), so it should be moved into that body. correct me if I am wrong, but if the length is zero, it must be caught by this.offset === ... before [19:30] creationix: herbySk: not sure, I'll post my updated version as soon as I'm done testing it [19:31] sveimac has joined the channel [19:31] herbySk: ok, I'll look at it then [19:31] teemow has joined the channel [19:32] creationix: herbySk: it's certainly faster assuming it's correct. I can enqueue and dequeue 1,000,000 items in 400ms [19:33] daleharvey has joined the channel [19:33] mscdex: creationix: how are you implementing it? [19:33] rauchg_: ryah: any interest in having process.architecture (akin to process.architecture() in python, returns 32bit, 64bit, etc) [19:33] creationix: I gave up on the plain array version after a few minutes (97% busy in v8::internal::Builtin_ArrayShift()) [19:34] creationix: mscdex: https://gist.github.com/5a336f731405b1f4c4d4 [19:34] creationix: ok, now to make sure it's correct [19:34] creationix: (should probably do that BEFORE speed testing) [19:34] pkrumins: ryah: i created an issue earlier today about Buffer::New crashing node.js if it's called from an eio_custom 'before' function. Later tests revealed that it's ok to Buffer::New in the 'after' function. [19:35] pkrumins: ryah: i have a test case, and gdb output and everything ready for investigation [19:35] pkrumins: ryah: http://github.com/ry/node/issues/issue/244 [19:36] mscdex: creationix: you're still using a plain array there though? [19:36] creationix: mscdex: yeah, but I'm never calling shift on it [19:36] creationix: that's where it falls over [19:36] pkrumins: ryah: oh, you replied! [19:36] pkrumins: ryah: "You can't touch V8 from the thread pool." [19:36] c4milo: hehe poor ryah, he is being flooded by all of us [19:37] mscdex: :p [19:37] deepthawtz has joined the channel [19:42] creationix: herbySk: yeah, I think it's correct https://gist.github.com/5a336f731405b1f4c4d4 [19:43] teemow has joined the channel [19:43] Aria has joined the channel [19:44] herbySk: creationix: what about that if on line 18? [19:44] creationix: hmm I test it lightly, under that conditions do you think it will break? [19:44] mscdex: github should allow you to have a compare view for gists too [19:45] creationix: herbySk: though it might not be needed, line 19 will give undefined in the same case right? [19:46] herbySk: creationix: btw the test "fill 1e6, read 1e6 is not quite correct. fill 1e5, the 1e6-times push one and read one and then read the rest until it's exhausted - so you can test the growing and reducing behaviour at once [19:47] creationix: herbySk: ok [19:47] herbySk: line 19 should never occur when this.head.length is 0, because in that case, the if before occurs. I advocate to moev line 18 up into the if body, not removing ti [19:47] herbySk: s/ti$/it/ [19:48] dylang: does anybody have an example of app.mounted(fn) in express? I think I'm doing something wrong and this might be the solution but I want to make sure I'm going to use it correctly.... [19:48] herbySk: creationix: ^^^ [19:49] creationix: herbySk: but I have the if before commented out [19:49] creationix: dylang: in express, not sure? [19:50] dylang: creationix: yeah, in express. basically when i Server.use(Server.router) then my 404's get "Stream is not writable" errors... [19:50] herbySk: creationix: not that if. I mean, if this.head.length is 0, then this.counter must be 0, too (or it gets incorrect, counter is always <= head.length). That means this.counter === this.head.length is true, and the if gets triggered. [19:50] dylang: creationix: looking for real-world example [19:51] creationix: dylang: Server.router(function (app) {...}) [19:51] herbySk: creationix: so, if at line 11 cover if at line 18. Always. [19:51] creationix: dylang: I think, I've never used express [19:51] herbySk: s/cover/covers/ [19:51] creationix: herbySk: oh, you're just trying to optimize it, I see [19:52] creationix: herbySk: my question is if the if on 18 is even needed [19:52] wattz: creationix: you mind if i send you a quick /msg? [19:52] creationix: a = []; a[0] is undefined already [19:52] dylang: creationix: that's funny to me that you haven't used express. don't you guys sit next to each other? at least viturally? [19:52] creationix: dylang: sortof, but I have plenty of projects to keep me busy [19:52] creationix: and I like using connect directly [19:52] creationix: plus I don't make a lot of actual apps [19:53] creationix: wattz: sure [19:53] herbySk: creationix: Are you doing it to make it faster, don't you? Inside the if it is needed (if you left it to line 19, it would incremenet the counter beyond length and you get incorrect state) [19:53] wattz: cool [19:53] creationix: herbySk: good point, stupid side effects [19:55] mattikus has joined the channel [20:02] Throlkim has joined the channel [20:05] ezmobius has joined the channel [20:06] webr3 has joined the channel [20:07] creationix: herbySk: thanks for all the help, this is pretty fast. I 100 times do (1,000,000 inserts 10,000,000 insert/shift combos, and then 1,000,000 shifts) and it takes about 85 seconds and hovers around 50mb of ram [20:07] webr3: does node.js have the common global functions of the major user agents? (decodeURI,parseFloat etc - not talking about Window.alert and the like) [20:08] creationix: which comes out to about 12,000,000 insert/shift combos per second [20:08] mscdex: webr3: yes [20:08] jimmybaker has joined the channel [20:08] webr3: mscdex, got a pointer to the doc / source that defines? - if it's just 'in github' say and I'll soon find it [20:08] EyePulp: anyone found a fix/replacement for d.js w/o having to get supervisor running? this is just for local dev [20:09] EyePulp: or node-DJs rather [20:09] dylang: EyePulp: I'm using dj, what's the problem? [20:09] mscdex: webr3: probably somewhere on the ecmascript website i guess... [20:09] bradleymeck: webr3 those are in v8 itself [20:09] EyePulp: dylang: I rebuilt node from a recent checkout, and d.js stopped working. [20:09] mscdex: webr3: v8 also has these functions as well, from ecmascript5: http://github.com/ry/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [20:10] EyePulp: dylang: what version of node are you on? [20:10] webr3: ty bradley, mscdex :) that's what i needed [20:10] Validatorian: anybody know how to get the current URL using ejs? [20:10] mscdex: webr3: basically ecmascript 3 and parts of 5 [20:10] bradleymeck: validatorian, huh? [20:10] dylang: EyePulp: it broke for me after 102 or so. I fixed DJs by changing line 61 to var playing = spawn(process.execPath, [intro]); [20:10] bradleymeck: client side? [20:10] Validatorian: bradleymeck: no, server [20:11] dylang: EyePulp: actually maybe that wasn't the change, let me make sure [20:11] bradleymeck: doesnt make sense then [20:11] EyePulp: dylang: cool [20:11] mscdex: webr3: here's the pdf for 3rd edition: http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf [20:11] jchris has joined the channel [20:11] webr3: don't think those functions are part of ECMAScript editions afaik [20:11] creationix: webr3: I made a wiki page documenting the extended features in V8 not found in ES3 browsers http://github.com/ry/node/wiki/ECMA-5-Mozilla-Features-Implemented-in-V8 [20:11] EyePulp: dylang: I hadn't ben able to figure out the fix [20:11] mscdex: webr3: they should be [20:11] creationix: webr3: and I'm pretty sure parseInt and friends are part of ES3 [20:11] kodisha_ has joined the channel [20:11] Validatorian: bradleymeck: why doesn't it make sense? I want something like PHP's $_SERVER["REQUEST_URI"] [20:12] webr3: ACTION checks - cheers guys [20:12] bradleymeck: Validatorian, there is __filename, __dirname, require.main . but its not a url [20:12] aubergine has joined the channel [20:12] mscdex: decodeuri is also [20:13] creationix: Validatorian: the request object in http request events has a url property [20:13] dylang: EyePulp: that looks like the only change. you in OS X? i think node broke someting with the path and spawn. [20:13] Validatorian: thanks creationix [20:13] webr3: yup guys you're right, all in ecmascript-262 v3 [20:13] webr3: circa page 80 -> onwards [20:13] creationix: Validatorian: and you can parse it with the url library built-in [20:14] EyePulp: dylang: yup, osx [20:15] tg has joined the channel [20:15] bradleymeck: sorry validatorian thought you mean in global scope not on an http request [20:15] Validatorian: np bradleymeck, sorry for not being clear [20:15] EyePulp: dylang: so that line fixed it for you on osx? [20:16] dylang: EyePulp: yup. i'm assuming you're using the same branch of dj, there are a few rewrites out there that didn't work for me, i think i'm on the original. [20:16] dylang: EyePulp: did it not work for you? [20:17] EyePulp: dylang: nossir... you mind pasting the one you're using someplace? I think I'm on the original [20:18] nrstott: what's a good way to benchmark node programs? I'd like to tell what parts of my code are the 'hotspots' [20:18] CIA-77: node: 03Ryan Dahl 07master * r5bce8ed 10/ (src/node.cc wscript): Fix process.platform - http://bit.ly/9JWCXI [20:19] ryah: c4milo, mscdex --^ [20:19] dylang: EyePulp: here's my d.js that works in os x with latest node. http://gist.github.com/536034 [20:19] c4milo: ryah: yes sr [20:20] c4milo: ohh, thank you [20:20] mscdex: awesome! [20:21] ryah: has that been an annoyance ? [20:22] EyePulp: dylang: thanks for posting - unfortuantely I'm still getting no response, and a big cpu spike. Will try grabbing most current node again (been a few days) [20:22] overra has joined the channel [20:23] digitalspaghetti: anyone know if http://www.activerecordjs.org has succefully been ported to node.js yet? I read on the list from back in Feb that someone may have been working on it? [20:23] dylang: EyePulp: big cpu spike - maybe the code looking for files is hitting an symlink and getting in an infinite loop? [20:24] EyePulp: dylang: could be... though I don't think any big changes occurred in my project layout or my node install [20:24] mikeal has joined the channel [20:24] EyePulp: dylang: maybe I could put some console messages in d.js to get an idea of where it's getting stuck [20:25] dylang: EyePulp: do that. i added some to show what files it finds. [20:29] digitalspaghetti: nope, gonna have to write my own ORM around node-mysql then :/ [20:31] EyePulp: dylang: also ripping out "say" and just using console.log [20:31] EyePulp: =) [20:31] mscdex: digitalspaghetti: have you seen sequelize? it doesn't use node-mysql, because it existed before it, but maybe it could be modified to use it now [20:32] digitalspaghetti: checking out [20:33] samsonjs has joined the channel [20:34] mau has joined the channel [20:36] digitalspaghetti: mscdex: yea, i think i can fork this, seems to do what i need [20:36] Wandrewvious has joined the channel [20:37] mu-hannibal has joined the channel [20:39] creationix: herbySk: the pull request for node you sent me, you sent that to ryah too right? I don't have anything to do with it [20:39] creationix: herbySk: and he prefers emails to pull requests [20:40] herbySk: creationix: yes. ok. [20:41] herbySk: creationix: I sent it to few more people to be sure the behaviour of global as documented in those tests is correct from their point of view. [20:41] creationix: herbySk: ahh, that makes sense. I personally have no clue how it's supposed to work [20:41] creationix: I just test it and see what works [20:42] isaacs has joined the channel [20:43] saikat has joined the channel [20:45] EyePulp: dylang: the code seems to hang on the regex looking for require() statements [20:45] nrstott: creationix, do you have a tool you are using to benchmark node scripts to determine what calls are consuming the most time? [20:46] rwaldron has joined the channel [20:46] EyePulp: dylang: and not always at the same point... odd [20:47] sveisvei has joined the channel [20:47] FransWillem: Hmmm, why exactly is process.nextTick using an array as a queue, instead of a linked list as it should be ? [20:47] creationix: nrstott: yeah, I'm using "Sample Process" in OSX's Activity Monitor [20:48] creationix: FransWillem: I'm guessing because most people don't have huge queues [20:48] creationix: and Array is very effecient for the simple case [20:48] nrstott: creationix, is there an equivalent in the *nix world? [20:49] creationix: nrstott: not sure [20:49] creationix: nrstott: I've tried strace, but it only logs system calls [20:50] creationix: when ryah gets done integrating dtrace with node that will be handy [20:53] nrstott: interesting [20:53] nrstott: thanks [20:53] davidwalsh has joined the channel [20:54] AAA_awright_ has joined the channel [20:54] themcgruff has joined the channel [20:54] creationix: nrstott: if you do find an equivalent let me know, I use linux for deployment. [20:54] mjr_: nrstott: the V8 profiler will actually do an OK job in many cases. [20:54] creationix: does anyone know what "Sample Process" actually uses under the hood? [20:54] mjr_: V8 also has an oprofile module that I've been meaning to use. [20:55] mjr_: creationix: either Shark.app or Instruments.app, right? [20:55] wink_: the v8 profiler would do all of that from what i've seen [20:55] wink_: im still mucking around with the heapsnapshot stuff, ugh :p [20:55] mjr_: oh wait, probably not. I'll bet that uses dtrace. [20:55] bronson_ has joined the channel [20:55] nrstott: mjr_, how do you fire up the v8 profiler when using node? [20:56] tyfighter has joined the channel [20:56] nrstott: can you just doe node --prof? [20:56] mjr_: nrstott: node --prof [20:56] mjr_: yep [20:56] nrstott: cool [20:56] creationix: mjr_: wow, never seen those [20:56] creationix: instruments.app looks promising [20:56] mjr_: instruments has a "CPU sampler" which I think is what you want. [20:57] mjr_: I've never pointed it at node though, so I dunno how well it'll work. [20:57] creationix: yeah, looks like the same thing [20:57] creationix: and this way I can measure things that run quick [20:57] persson_ has joined the channel [20:57] Noya_ has joined the channel [20:57] Atm0z has joined the channel [20:57] creationix: I can't command+tab to activity monitor fast enough for programs that finish quickly [20:57] Viriix_ has joined the channel [20:57] lianj_ has joined the channel [20:57] Blink7_ has joined the channel [20:58] jspiros has joined the channel [20:58] blogometer has joined the channel [20:58] tg has joined the channel [20:58] mjr_: yeah, instruments can launch a program and instrument its entire run. [20:58] jbaron has joined the channel [20:58] mscdex: omghax [20:58] mmso has joined the channel [20:58] sr has joined the channel [20:58] Sembiance has joined the channel [20:59] ryan[WIN] has joined the channel [21:00] lianj_ has joined the channel [21:03] astrolin_ has joined the channel [21:04] nrstott: mjr_ ok so after running with --prof, then what? i can't find the linux-tick-processor that the documentation refers to [21:04] mjr_: yeah, that part sucks [21:05] mjr_: it's in deps/v8 [21:05] mjr_: But you'll need the d8 shell, which often doesn't build right. [21:06] sh1mmer has joined the channel [21:07] CIA-77: node: 03Herbert Vojčík 07master * r28b21d1 10/ test/message/undefined_reference_in_new_context.out : Fix undefined_reference_in_new_context test for own-context module loader. - http://bit.ly/aYh1b6 [21:10] nrstott: alright so ... where would the d8 shell have been put by make install? [21:10] nrstott: any idea? [21:10] nrstott: sure isn't /usr/local/bin with my node executable [21:10] ryah: nrstott: d8 isn't installed by node. [21:10] nrstott: ah ok [21:16] sh1mmer: Hello World [21:19] joshbuddy has joined the channel [21:21] bradleymeck: heel, oh, sh1mmer [21:21] mjr_: nrstott: I think I had to manually run scons to get d8 to build. [21:21] sh1mmer: woof. [21:22] joshbuddy_ has joined the channel [21:24] joshbuddy has joined the channel [21:25] blogometer has joined the channel [21:26] herbySk: ryah: ayt? [21:27] ryah: yo [21:30] herbySk: ryah: in addition to exports, require, module, __filename and __dirname typical in non-context regime, modules get additional "parameter" called root, which points to process.global. Are you against defining root also for non-context mode (pointing to global), so the environment is the same and code can use root if it chooses to in both modes? [21:31] creationix: herbySk: I integrated the new queue into nStore and it's about the same speed as my old one [21:31] creationix: oh well [21:31] herbySk: creationix: hm :-/ [21:31] creationix: I guess the overhead of fs.write is so big it doesn't matter [21:32] creationix: I really wish posix had non-blocking fs APIs [21:32] ryah: herbySk: not necessarally [21:33] nerdEd has joined the channel [21:34] JimRoepcke has joined the channel [21:35] rnewson has joined the channel [21:35] JimRoepcke has joined the channel [21:35] herbySk: ryah: I'd like to have the environment similar for both modes. Can I make a little change so the root is defined for both modes (at the very beginning where process/global things are set up), or, alternative is remove root completely for context-mode and let them use process.global directly... [21:36] MaSch has joined the channel [21:36] creationix: herbySk: but both fastArray and Queue double the speed of my stress test, so either is a win over plain Arrays [21:37] MaSch: sry for being a newbie but would i be able to use Heroku without knowing / using ruby ? [21:37] herbySk: creationix: of course, they must be faster... way faster, I'd say... could I see your stress test? [21:38] pquerna: is anyone using JSdoc to document module apis? is there something better that understands require & filesystem paths? [21:39] creationix: herbySk: http://github.com/creationix/nstore/blob/master/test/stressTest.js [21:40] wattz: I love my little node static server [21:40] wattz: lol [21:41] FransWillem: Hmm, what's the best SQL module for Node.js nowadays? Doesn't really matter if it's MySQL or PostgreSQL, although I'd prefer it to be fast, and pure JS. Any opinions on nodejs-mysql-native, node-mysql, or postgres-js ? [21:41] FransWillem: And I remember reading something about a new MySQL module on the block that promised to go "all the way", anyone remember which that was ? [21:42] digitalspaghetti: http://github.com/felixge/node-mysql [21:42] digitalspaghetti: MySQL Non-blocking [21:42] wattz: ... [21:42] wattz: it's non-blocking socket calls to mysql ;) [21:42] wattz: lol [21:42] wattz: mysql makes me angry right now [21:42] digitalspaghetti: I need a relational database :( [21:42] wattz: thinking im going to switch to drizzle since it is nonblocking [21:43] wattz: digitalspaghetti: they have their place ;) [21:43] felixge: FransWillem: yeah, node-mysql get's my vote as well : ). Not quite ready yet, but what's there is fairly solid [21:43] wattz: tool for the job, tool.... for... the job. [21:43] wattz: felixge: and your not bias at all haha [21:43] FransWillem: felixge: It better get your vote, seems like you're the writer :p [21:43] digitalspaghetti: i;m thinking of mixing though, using couch or mongo to store connection information for each customer [21:43] wattz: FransWillem: pure js, felixge's is the best [21:43] digitalspaghetti: so i can shard databases [21:43] FransWillem: Thanks :) [21:44] wattz: i shart data :P [21:44] digitalspaghetti: and i;ve suggested to the author of sequelize to switch to node-mysql :) [21:44] wattz: felixge: i have been battling mysql/c++ threading all day [21:44] wattz: lol [21:44] digitalspaghetti: then we can have a proper ORM on top of it [21:44] wattz: but i will hack this thing into submission [21:45] creationix: btw, I plan on going "all the way" with postgres-js too [21:45] wattz: technically you could write a straight c++ driver for mysql, and wrap it in js to sorta make it nonblocking :D [21:45] creationix: wattz: yeah, but threads really do suck, node does that for fs and I've hit walls with it [21:46] wattz: creationix: aye [21:46] wattz: keeping track of them can be just as annoying [21:46] wattz: looking at a js modal script i wrote back in.... [21:46] wattz: 06 [21:46] wattz: eww. [21:47] creationix: FransWillem: I prefer postgres over mysql, but both mine and felixge's drivers are still in development [21:47] creationix: felixge: btw, my code for packing int32 was wrong [21:47] wattz: creationix: im going to start wrapping protobufs for node [21:47] felixge: creationix: on twitter? [21:47] ryan_gahl has joined the channel [21:47] digitalspaghetti: are both drivers going to be functionally the same for easy wrapping *hint* *hint* ;) [21:47] wattz: s/start/start thinking about/g [21:47] creationix: felixge: I have much better and faster ones here http://github.com/creationix/postgres-js/blob/master/lib/buffer_extras.js#L33-63 [21:48] felixge: Postgres is a better db, but mysql is a better ecosystem [21:48] creationix: felixge: no, the twitter thing was for multiplying two 32 bit ints [21:48] wattz: felixge: who you be on twitter, throw you a follow [21:48] felixge: ah [21:48] creationix: I like the postgres ecosystem [21:48] felixge: wattz: felixge [21:48] creationix: pgadmin is pretty powerful [21:48] FransWillem: meh, I just want to index newsgroups on it :p tbh, wish Redis would be able to handle it properly :( [21:49] wattz: felixge: im wattzilla [21:49] ryan_gahl: am I the only one who thinks "node in .NET / ObjC / Java / blah blah blah" is a bit silly? [21:49] digitalspaghetti: shieeeeeeet: http://devnet.jetbrains.net/message/5270530 [21:49] jpld has joined the channel [21:49] FransWillem: ryan_gahl: Depends, if the language has closures, it's a good idea [21:49] ryan_gahl: hmm [21:50] felixge: creationix: thanks [21:50] felixge: wattz: you're from japan? [21:50] felixge: wattz: (forgive me if those are chinese characters, I wouldn't know the difference : ) [21:50] wattz: eh? [21:50] wattz: wattzilla [21:51] felixge: oh [21:51] felixge: I looked at wattz [21:51] felixge: sorry [21:51] felixge: :) [21:51] wattz: yeah, he won't give it to me [21:51] wattz: lol [21:52] creationix: felixge: here was the one I used in my tweet https://gist.github.com/d4f70ded68e0d79c3eab [21:52] creationix: felixge: I just inlined a1 and a1 to make it fit in a tweet [21:53] creationix: *a1 and a2 [21:53] Tim_Smart has joined the channel [21:54] digitalspaghetti: haha wattz that link on your twitter, looks like my first ever blog back in 2001 colour wise [21:54] digitalspaghetti: and that picture at the side looks like something out of IT Crowd [21:54] wattz: digitalspaghetti: lmao yeah [21:55] BrianTheCoder has joined the channel [21:56] creationix: wattz: to be fair it was designed in '96 [21:56] creationix: or so the copyright line says [21:56] BrianTheCoder: what's the latest npm version? I updated brew an installed it, but it fails everytime I try and install a package [21:56] wattz: creationix: right, it's a 'gem' [21:56] wattz: :D [21:56] wattz: diamond in the rough :D [21:57] wattz: "eets sooooo web wan-pont-ohh" [21:59] herbySk: creationix: I missed something. Looking over nstore.js (rewrite branch). How can you ever get writeQueue to have more than 1 element, when you push there only in save, then immediately call checkQueue, and checkQueue shift()s from it? [22:00] wattz: omg... [22:00] wattz: UAT guy just came over and finger fucked my monitor.. [22:00] wattz: this is why i keep cleaner in my desk drawer [22:00] mscdex: wattz up with THAT [22:00] wattz: ... [22:00] wattz: -_- [22:01] WALoeIII has joined the channel [22:01] mscdex: almost morse code! [22:01] herbySk: creationix: I see, this.busy, I missed the little if at the beginning [22:02] rnewson has joined the channel [22:02] Tim_Smart has joined the channel [22:05] junkee[] has joined the channel [22:05] allengeorge has joined the channel [22:05] jchris has joined the channel [22:05] rektide: dont suppose anyone knows of a gnome-introspection lib/whatnot for node.js ? [22:06] creationix: herbySk: yeah, nStore has some fairly nasty logic, you're welcome to offer suggestions if you have time to help, but I understand if you don't [22:07] robrighter has joined the channel [22:07] kodisha has joined the channel [22:09] herbySk: creationix: In fact, I've got... yeah, it takes a while to understand all busy and pervasive checkQueue calls... I actually thought it maybe needs some cleaning, some sort of "microkernel" that handles this to make other code less spaghetti, more modular etc. [22:09] creationix: herbySk: I'm all for that [22:09] creationix: would make it less bug prone too [22:10] creationix: I want nStore to be simple, solid, and fast [22:10] creationix: (I know conflicting goals right) [22:10] creationix: simple and solid matter more than fast, but I want it as fast as possible while not violating the other goals [22:10] Dmitry1 has joined the channel [22:12] nerdEd has joined the channel [22:15] creationix: herbySk: ahy ideas how such a microkernel might be structured? [22:15] mattikus has joined the channel [22:16] aurynn: creationix, I got a prepared statement on the wire today [22:17] aurynn: My architecture kind of blows, but it's a working POC [22:17] creationix: aurynn: sweet, I can't wait till I can merge and start playing with it [22:17] creationix: felixge has inspired me to make postgres-js solid [22:18] aurynn: well, be aware that my version removes all the persistence-related stuff [22:18] creationix: aurynn: though there is no rush at the moment, I'm trying to finish up nStore first [22:18] creationix: aurynn: great [22:18] creationix: aurynn: I think that should be at a different layer anywayh [22:18] herbySk: creationix: some ideas, yes. but a question - maybe I again missed something, but it seems to me it is not correct: if I save("foo", ...) and immediately get("foo"), I do not get the saem object... get looks into this.index, but save only puts a "command" into writeQueue, this.index is not changed... [22:19] creationix: herbySk: correct, you can't read a record till the save callback has fired [22:19] creationix: It's my attempt to keep the data consistent [22:20] creationix: I don't want the index to be altered till the data is saved to disk [22:20] creationix: (or at least in the os, there is no fsync here) [22:20] tpryme has joined the channel [22:21] herbySk: creationix: a..ha. I thought you let the user save the data and immediately continue work, while saving data in the background. [22:21] sh1mmer: Yay. Finally signed the contributors agreement :) [22:21] creationix: sh1mmer: for node? [22:21] tyfighter has joined the channel [22:22] sh1mmer: yeah [22:22] sh1mmer: I'm not signing your CLA :P [22:22] sh1mmer: ACTION likes to keep his first born [22:22] creationix: sh1mmer: I know, pgriess is having troubles with it [22:22] sh1mmer: I'm just kidding, you guys are working on it I know [22:22] sh1mmer: creationix: I'm on the open source working group for Yahoo [22:22] sh1mmer: so I help approve that kind of thing [22:23] sh1mmer: but we just can't accept those terms. [22:23] creationix: ahh, good to know [22:23] creationix: sh1mmer: yeah, I don't blame you [22:23] huyhong1 has joined the channel [22:23] huyhong1 has left the channel [22:23] sh1mmer: creationix: it's just an ExtJS legacy [22:23] sh1mmer: which is totally understandable [22:23] sh1mmer: It's no worse than mySQL's [22:23] amrnt has joined the channel [22:23] srh_ has joined the channel [22:24] amrnt: hi guys [22:25] creationix: herbySk: I do like your microkernel idea, I'll see if I can figure something out [22:25] srh has left the channel [22:25] amrnt: I'm trying http://github.com/andregoncalves/twitter-nodejs-websocket but it dosnt work!! is it because i have node 0.1.101?? [22:25] creationix: amrnt: it's always a possibility [22:25] creationix: I haven't tried that library personally so I don't know what version it needs [22:26] bradleymeck: since its from may, id say it needs an update due to buffer changes [22:26] amrnt: because in /vendors/ws.js it says Compatible with node v0.1.91 [22:26] MaSch: ./build.sh: Line 2: node-waf: command not found. [22:27] MaSch: how to get node-waf [22:27] amrnt: how to update node? [22:27] herbySk: creationix: I'm still pretty stunned by the fact that user must wait until its data are written to the disk... [22:27] creationix: herbySk: why, I think that's a pretty sane requirement [22:28] creationix: most databases work that way [22:28] creationix: it's just you don't notice because the APIs are blocking [22:28] creationix: if one thread inserts a record and another thread then tries to read it, it might not be there yet [22:28] unknownsoldier has joined the channel [22:28] unknownsoldier: hi [22:29] unknownsoldier: i wondered if .node binary addons were platform independent [22:29] herbySk: creationix: most databases accept you INSERT or UPDATE and let you continue your work while they work on persistence in parallel with it, I'd say [22:30] webr3: why not implement ODBC support since all RDMBS implement it, one for all.. proper db vendor abstraction that everybody ignores for some reason :s [22:30] creationix: well, also having that feature will complicate the code, it's hard enough to understand as it is [22:30] aurynn: creationix, that sounds like MySQL not implementing MVCC very well [22:30] creationix: I would love to have proper MVCC, not sure what all that entails [22:31] creationix: webr3: well, this isn't a RDMBS [22:31] unknownsoldier: anyone? [22:31] herbySk: creationix: But, well, I must give it some more thoughts... I thought of my own persistence layer (herby/storage if you're interested, thought it's pretty pre-alpha) and I always thought - app should work with data, persitence layer can persist data / keep consistency, but they should not block each other [22:31] creationix: unknownsoldier: yes [22:31] webr3: (Also DBMS..) [22:32] aurynn: ACTION is a big Postgres geek, and as such, has Firm Views on Correct Methods to achieve things. ;) [22:32] MikhX_ has joined the channel [22:32] creationix: webr3: you're welcome to implement ODBC on top of it if you want to, I have no interest in that at this stage [22:32] bradleymeck: they are platform independant as long as the libs they reference are so [22:32] creationix: unknownsoldier: sorry, platforn dependent [22:32] creationix: I misread [22:33] creationix: unknownsoldier: and I'm talking about the actual binaries, not the code [22:33] Tim_Smart has joined the channel [22:33] unknownsoldier: ok [22:33] unknownsoldier: so when you build the code [22:33] unknownsoldier: into .node files [22:33] creationix: aurynn: so what exactely is MVCC, do I not get it with append-only data format and delaying reads till after writes finish? [22:34] unknownsoldier: you can only run them on the platform they were built on?? [22:34] aurynn: creationix, it's a model for handling concurrency and multiple simultaneous viewers [22:34] aurynn: http://en.wikipedia.org/wiki/Multiversion_concurrency_control [22:34] creationix: unknownsoldier: yes, the .node files are like .dlls they are very platform and node version dependent [22:34] amrnt: any newer virsion of this ?? http://github.com/andregoncalves/twitter-nodejs-websocket/blob/master/vendor/ws.js [22:35] aurynn: creationix, it sounds like what you have obeys some of MVCC's requirements :) [22:35] creationix: aurynn: I think so, I'll have to double check and think about it a while before announcing MVCC support [22:35] bradleymeck: amrnt if you are looking for a websocket server, id recomment node-websocket-server [22:36] FransWillem: NNTP Client open-sourced: http://github.com/Frans-Willem/node-NNTP [22:36] mpoz2 has joined the channel [22:37] bradleymeck: new toys? for me?! [22:37] bradleymeck: i promise i wont break them this time [22:37] aurynn: I keep wanting to do nntp-to-something_weird gateways [22:37] creationix: aurynn: yeah, nStore is ver MVCC, maybe the compact code is bad, but otherwise it's very safe [22:38] FransWillem: aurynn: I was able to quickly mock up a HTTP->NNTP gateway with yEnc JPG support with this :p [22:38] creationix: and I think I can do what herbySk wants without violating MVCC [22:39] creationix: node's single threaded nature makes this really simple [22:39] herbySk: creationix: I only thought the data save()d could be kept in memory ans answered by subsequent get()s until it it saved, where it is loaded from the disk again... [22:39] creationix: herbySk: yeah, I had that initially, but removed it because the code wasn't maintainable, and I thought it broke MVCC [22:40] creationix: but now that I think about it, it doesn't break MVCC at all [22:40] creationix: just complicates the code [22:40] herbySk: creationix: the code can be made simple enough to be maintainable [22:40] creationix: herbySk: sounds like a plan [22:40] creationix: refactor and clean up enough to add more features without bloating the code [22:41] bcg: Are there any docs/libs for mocking out Request and Response objects in node.js? [22:41] FransWillem: mocking out? [22:42] creationix: bcg: not sure, but you can create the objects by hand [22:42] creationix: bcg: will probably need to look at node source code to find out what all to do though [22:43] creationix: does vows or expresso have mocks? [22:43] creationix: bcg: those are test frameworks http://vowsjs.org/ http://github.com/visionmedia/expresso [22:43] huyhong has joined the channel [22:44] huyhong has left the channel [22:45] creationix: can you fsync in node? [22:45] creationix: I'd like my callbacks to say when it's really safe to trust the disk [22:46] creationix: currently it's just written to the os (or even node) buffer [22:46] sudoer has joined the channel [22:49] creationix: aurynn: wow, MySql doesn't have MVCC unless you use InnoDB!? [22:49] aurynn: creationix, Yeah. And even then it's dicey [22:49] creationix: that's astonishing [22:49] aurynn: All the system tables are still myisam, for instance [22:50] creationix: yikes [22:51] creationix: aurynn: yeah, nStore has it for sure, it's very easy to do in node with append-only and index snapshots [22:51] creationix: there are no threads to mess with stuff [22:51] aurynn: creationix, nStore sounds rather interesting; I'll have to play with it :) [22:51] creationix: aurynn: please do, but it's not quite done yet [22:52] creationix: I eventually want to make it a bit faster, add some ram caching, query indexes and network support [22:52] creationix: (all in modules of course, the base system will be a simple key/value to disk system) [22:54] aurynn: Is software *ever* done? :) [22:54] herbySk: creationiz: as a first refactoring, I would recommend generating lines immediately in save(), storing them into this.index, storing only the keys in write queue and update reading / deleting code so it can handle this change... of course deleting the line from index when saved and having the position only, as before [22:55] herbySk: creationix: this way, index changes the role not only to hold index to the file, but, more broadly, holding "where the data are", be it in file, in memory or deleted. [22:56] Tim_Smart has joined the channel [22:56] creationix: herbySk: deleted? [22:56] creationix: herbySk: why not just delete the index entry like I do now [22:56] creationix: because of the way my query works and the single threaded nature of node, I can modify index whenever I want [22:57] herbySk: creationix: I did not study deleting code yet... it is possible, of course; you handle delete by immediate deleting index and letting compact do its work, eventually? [22:57] creationix: herbySk: well, I do send a writequeue to write a delete line to the disk [22:57] creationix: but in the index it's a plain js delete [22:57] bradleymeck has left the channel [22:58] herbySk: creationix: so, if you only will have a list of keys in writequeue, you need to hold the rest (what to write, or if to delete) in the index [22:58] creationix: before I was storing the actual value in the index and then removing it when it got written to disk [22:58] lachlanhardy has joined the channel [22:58] creationix: herbySk: what about the callbacks? I need to tell the caller of save when it's written to disk [22:59] creationix: sometimes that still matters, even if we're holding the value in ram [23:01] herbySk: creationix: hmm... that is not as easy as it looks... [23:01] Tim_Smart has joined the channel [23:01] creationix: herbySk: I think you're on the right track though, and the callbacks only matter now if I'm doing fsync anyway [23:02] creationix: a power failure after fs.write comes back could still lose data [23:02] herbySk: creationix: no problem, hold the callback with the write data (in the index) and when it gets really written, let the writing code call the callback, after the fs operation finishes [23:02] creationix: herbySk: yeah, that's what writeQueue does now [23:03] creationix: herbySk: the problem with holding it in the index is that two save calls with the same key will overwrite the first callback [23:03] herbySk: creationix: problem is, now the data can be replaced by another value before it got the chance to be written, you must choose what to do with callback of the killed data [23:03] ben_alman has joined the channel [23:03] herbySk: :-) [23:03] creationix: I'm fine with merging writes (in fact that's a good thing) but I don't want to lose callbacks [23:04] creationix: I could drop callback support entirely since it doesn't guarantee anything now that we cache values in ram [23:04] creationix: but eventually I want fsync backed callbacks [23:04] herbySk: creationix: yes, this is now more of a political/philosophical question now - when should a callback be called, what is its purpose? to tell the data was written, to tell the data has problem to be written, but also, maybe, to tell it does not matter any more [23:05] creationix: or right, error reporting [23:05] herbySk: creationix: maybe include one type of error - "data rewritten" [23:06] amerine has joined the channel [23:06] creationix: I'm not too worried about data being rewritten, but what about other fs errors [23:06] ben_alman has joined the channel [23:07] blogometer has joined the channel [23:07] codemariner has joined the channel [23:07] creationix: yeah, I'll keep the callback, but it just won't be fsync aware (yet) [23:07] amrnt has joined the channel [23:07] creationix: should be able to add that later without changing API [23:07] herbySk: creationix: they can be reported by callbacks as now [23:07] creationix: herbySk: on fs.write? [23:08] herbySk: creationix: the problem is other: data consistency on the disk [23:08] creationix: append only takes care of that [23:08] creationix: I don't support transaction for longer than a single query or a single save [23:08] herbySk: creationix/callbacks: as now, when write operation fails [23:08] blogometer: What do you recommend for reading from MySQL? [23:08] blogometer: http://github.com/Guille/node.dbslayer.js [23:09] blogometer: That is what I'm considering? [23:09] creationix: blogometer: http://github.com/felixge/node-mysql [23:09] creationix: blogometer: it [23:09] creationix: it's not done yet, but moving very fast [23:10] herbySk: creationix: but append wil stay, problem is, it was append in order of insert/update/delete, now it can get out of order now [23:10] creationix: herbySk: reading from the index is sync [23:11] creationix: and if it's in the index, I know the fd and the offset in that file [23:11] creationix: or it's directly in ram [23:11] creationix: either way I'm safe [23:11] blogometer: (Wow. It prompts a sub-question, which is, how many one person Node.js startups are there. transloadit.com Very cool.) [23:11] amrnt: how to install npm the good way?! please. [23:11] blogometer: creationix: So, not done, but ready to use I take it. [23:12] creationix: blogometer: I think so, he announced it as a beta a couple of days ago [23:12] creationix: or alpha, not sure which [23:12] blogometer: creationix: Why not use DBSlayer? It is a matter of helping a brother out? [23:12] creationix: dbslayer is an extra layer of abstraction [23:12] Tim_Smart has joined the channel [23:12] creationix: just a pain to setup [23:13] creationix: I'd like to see a drizzle client for node though [23:13] creationix: amrnt: ask isaacs [23:13] amrnt: it always fails! [23:14] creationix: amrnt: well, npm usually doesn't work for me either, so I'm probably not much help [23:14] creationix: but I have weird node setups [23:14] amrnt: okay thanks [23:14] amrnt: so, how to update node? [23:14] blogometer: Hmm... [23:15] blogometer: node-mysql is pure node? [23:15] herbySk: creationix: I thought consistency on data on the disk, in case of error, but I see no problem here - it is solvable, too. The data saved must be a snapshot in time... which is no problem since we have only one thread [23:15] MaSch: is there a JSON-Parser for node that can handle multiple parts of a message. I want to pass data from the socket directly to the parser so that i don't have to cache it and the parser starts parsing while waiting for the rest of the message [23:15] creationix: herbySk: I just write updates to disk as fast as I can pull them off the index [23:15] blogometer: Wow. Yes. It is. [23:16] creationix: order doesn't matter since the index points to the position [23:16] blogometer: I'm all for that. [23:16] creationix: blogometer: and I have a postgres version, but it's not finished either [23:16] herbySk: creationix: I know, but you want the data to be consistent. Now, you always write the data in the order save(), delete() etc. appeared. [23:17] hassox has joined the channel [23:17] creationix: herbySk: right, the code that writes to disk is serial [23:17] creationix: and it only pulls the latest state [23:17] blogometer: creationix: I see writeNumber. That must be how you do binary data in Node.js. [23:17] blogometer: I hadn't see that before and looked. [23:18] creationix: blogometer: http://github.com/creationix/postgres-js/blob/master/lib/buffer_extras.js#L33-63 [23:18] creationix: buffers are awesome, it's just bit fiddling from there [23:18] davidwalsh has joined the channel [23:18] MaSch: does no one know a answer to my question or is my english realy that bad? [23:19] creationix: MaSch: there is yajl, but I'm not sure if it has good node bindings or not [23:19] MaSch: thanks [23:19] creationix: MaSch: http://lloyd.github.com/yajl/ [23:19] MaSch: yes got it with google :-) thanks a lot [23:20] creationix: herbySk: ok, I'm think I'm ready to rewrite some code before the day is over, thanks for the help [23:20] herbySk: hm... [23:20] blogometer: creationix: Okay. Thanks. I created some byte shifting functions for a b-tree I'm implementing in Node.js. Similar to this, but I used Math.pow(2, N) to shift, since underneath it all, they are doubles. [23:21] creationix: blogometer: ahh, bit bit operations convert them to ints [23:21] creationix: it's very sneaky [23:21] creationix: most convert to 32 bit signed ints, but >>> converts to unsigned 32 bit ints [23:21] blogometer: Yes. I thought with the implicit conversion, it was six of one half dozen the other. [23:22] blogometer: Plus, I for the b-tree, I needed to write out file positions, 64 bits. [23:22] creationix: yeah, benchmark it if you get the chance to try both methods [23:22] blogometer: Good idea. [23:22] herbySk: creationix, blogometer: they are always doubles, but ops only changes the value to represent only last 32bits of the result, either signed or unsigned... [23:22] herbySk: s/but/bit/ [23:23] blogometer: herby5k: That's why I went with pow. I had to use it once anyway, so I thought I'd be consistent. [23:23] rauchg_ has left the channel [23:23] blogometer: herby5k: That is, so shift down from 64 bits. [23:23] MaSch: yajl looks good creationix .. there is a project that works on node bindings. http://bitbucket.org/nikhilm/yajl-js/ only decode until now but thats all i need [23:23] blogometer: s/so/to/ [23:23] herbySk: blogometer: I'd believe bitshift is faster. [23:24] blogometer: Yes. But it truncates. [23:24] herbySk: blogometer: yes, it does :-( [23:25] blogometer: 0xFFFFFFFF + 1 >>> 32 = 0 [23:25] blogometer: (0xFFFFFFFF + 1) / Math.pow(2, 32) == 1 [23:25] blogometer: Oops: [23:25] blogometer: 0xFFFFFFFF + 1 >>> 32 == 0 [23:26] creationix: herbySk: what if the writeQueue points to the index item directly? I'd have to store the key in the index value, but that would save creating objets [23:27] ajpiano has joined the channel [23:28] herbySk: creationix: sure [23:28] malkomalko has joined the channel [23:30] daleharvey has joined the channel [23:31] herbySk: creationix: be ready that you can have two items with the same key, the first write writes the data and changes the index so it does not contain any more "save" data, the second write shoudl cope with it and silently let it be (it was already written) [23:32] creationix: yeah, I was just thinking about that [23:32] amerine has joined the channel [23:32] creationix: this is going to be harder than I expected [23:34] herbySk: creationix: not as hard... the biggest problem is if someone changes the "save" data after you started to process the writeQueue, creating possible inconsistency in the disk.. but it can be solved. [23:35] TangoIII has joined the channel [23:35] herbySk: creationix: probably the best thing would be to create good index object itself, without coping with fs at the beginning [23:35] creationix: yeah, decouple it from the fs ops [23:35] creationix: node-dirty went that route [23:37] blogometer: creationix: Your favorite router module? [23:37] herbySk: creationix: exactly, and give it a decent API, that can create a snapshot (virtually, of course, not by copying) and be able to return snapshotted as well as actual data [23:37] creationix: blogometer: connect.router [23:38] creationix: herbySk: I'm pretty sure snapshots will involve copying [23:39] blogometer: creationix: http://github.com/senchalabs/connect [23:39] blogometer: ? [23:39] herbySk: creationix: of course not, you only need to have some counter of generations and in the index store values under the index of actual genration. snapshotting then only means generation++ [23:41] herbySk: creationix: processing writequeue then only saves all data belonging to generation-1 and deletes them from the indexes (well, in fact, it should not be number, but a/b or something like that, because v8 doesn't like delete) [23:41] herbySk: creationix: it suffices to have one snapshot at a time. it makes things a lot simpler [23:41] creationix: blogometer: yep [23:42] creationix: herbySk: interesting [23:42] creationix: I just figured a way to bindle my proto stuff into nStore without changing everyone's Object.prototype [23:42] creationix: *bundle [23:42] herbySk: creationix: it is like the queue we discussed yesterday: two states - old and new [23:43] tyfighter has joined the channel [23:43] creationix: herbySk: ahh, that might work [23:44] blogometer: Clean and well documented. [23:44] mu-hannibal has joined the channel [23:44] nateanderson has joined the channel [23:46] herbySk: creationix: sure might... only you should put a stopper object in writeQueue to know where the actual generation ends, and where you should release a snapshot and stop processing [23:46] herbySk: (well, you will call checkQueue() anyway :-) so if there were writes in the meantime, new generation starts) [23:48] jacobolu_ has joined the channel [23:49] jacobolu_ has joined the channel [23:51] creationix: herbySk: ok, done with proto refactor http://gist.github.com/536572 [23:52] herbySk: creationix: I see store(x), storeIfNotPresent(x), load(), loadSnapshotted() as enough API for the elements, and createSnapshot() for the whole index. [23:52] creationix: same functionality, but without messing with Object.prototype [23:53] jochen has joined the channel [23:54] [[zz]] has joined the channel [23:56] aaron___ has joined the channel [23:57] creationix: herbySk: you lost me somewhere, I think it will take a while for me to catch up [23:58] malkomalko has joined the channel [23:59] malkomalko: creationix: looking at nstore, do you see this being used as a key/value store, or possibly also as your main datasource for smaller applications [23:59] creationix: malkomalko: both, I have plans for indexes so queries don't suck [23:59] herbySk: creationix: ??? [23:59] creationix: herbySk: your ideas make sense, but I won't understand them till I start implementing it