[00:00] micheil: innerText [00:00] maqr: stagas: yeah, i might just have the lazy end of this covered, i suspect someone else has done a full dom conversion already [00:00] maqr: http://github.com/aredridel/html5/ <-- this? [00:00] panosru has joined the channel [00:01] micheil: --out. [00:01] ajpiano has joined the channel [00:01] mscdex: node.js rules! [00:01] stagas: maqr: but converting it to a dom object would allow that object to be used by code that already exists [00:01] stagas: and libraries etc [00:01] aliem has joined the channel [00:01] maqr: stagas: hmm, there is a jsdom [00:02] JimBastard: JSDOM maqr and stagas [00:02] JimBastard: yeah [00:02] maqr: http://github.com/tmpvar/jsdom [00:02] JimBastard: jsdom owns [00:02] JimBastard: tmpvar is my hero [00:02] maqr: i'll add a link to that in my readme, since that makes sense too [00:02] JimBastard: you use jsdom + an html parser [00:02] mscdex: one thing i don't understand is why new versions of opera continue to implement an outdated Server-Side Events spec [00:02] stagas: maqr: that's my point [00:03] mscdex: er [00:03] mscdex: Server-Sent Events rather [00:03] maqr: stagas: yeah, i think jsdom is probably what you want [00:04] [[zz]] has joined the channel [00:11] stagas: maqr: nah I feel it's overkill to use jsdom I don't need all that stuff anyway. I think I'll stick to your lib :) [00:11] maqr: :p [00:11] zerovirtual has joined the channel [00:11] aliem has joined the channel [00:11] Mark9000 has joined the channel [00:11] luddep_ has joined the channel [00:13] _announcer: Twitter: "picard node.jsのsinatraみたいなもん http://github.com/dantebronto/picard" -- Hidenari Nozaki. http://twitter.com/ghiden_jp/status/19116591032 [00:16] silentrob has joined the channel [00:16] maqr: what's the best way to have a multiline string? is there something like a heredoc i can use? [00:17] aliem_ has joined the channel [00:17] satori_: var s = "\ [00:17] satori_: line 1\n\ [00:17] satori_: line 2\n\ [00:17] satori_: "; [00:17] maqr: yeah, that's what i thought :/ [00:17] satori_: yeah. Not elegant at all [00:18] maqr: what about some sort of CDATA magic? [00:19] satori_: how do you mean? [00:19] maqr: http://groups.google.com/group/comp.lang.javascript/browse_thread/thread/015790a691b9a988/11413e1a4083b956?show_docid=11413e1a4083b956 [00:20] stagas: [ 'string', (next line) 'another string', (nl) 'last string'].join('') or join('\n') or anything [00:20] maqr: satori_: i'm not sure yet, but look at that thread :) [00:20] satori_: yar. reading it now. XML literals? [00:21] satori_: ahh. this is E4X stuff [00:21] maqr: might work, trying it out now [00:22] jsilver has joined the channel [00:22] maqr: hmm, doesn't seem to [00:22] satori_: does v8 support e4x?? [00:22] maqr: no idea [00:23] isaacs has joined the channel [00:23] maqr: actually, google says no, and there's a lot of complaining on the issues for it [00:23] satori_: heh. Yeah I just did that search too :P [00:24] jmar777 has joined the channel [00:24] stagas: maqr: works like a charm exactly what I needed [00:24] maqr: stagas: sweet [00:27] devtime has joined the channel [00:27] mtodd has joined the channel [00:29] [[zzz]] has joined the channel [00:30] akahn has joined the channel [00:31] _announcer: Twitter: "Worth learning for the next web generation: CSS transitions, NOSQL database like MongoDB, node.js, WebSockets, and Lithium (PHP5) framework" -- Aaron Shafovaloff. http://twitter.com/aaronshaf/status/19117673776 [00:31] [[zzzz]] has joined the channel [00:35] [[zz]] has joined the channel [00:38] robotarm_ has joined the channel [00:39] [[zzz]] has joined the channel [00:41] [[zzz]] has joined the channel [00:42] maqr: require() is a v8 thing, not a node thing, right? [00:43] maqr: i'm wondering if there's some way i can load code from a file directly, maybe read an eval it [00:43] satori_: require is a commonjs thing [00:44] satori_: so part of node not v8 [00:45] satori_: you can load javascript code, and compile it using the Script object [00:45] satori_: http://nodejs.org/api.html#script-97 [00:45] maqr: oh kickass [00:46] rwaldron has joined the channel [00:52] charlenopires has joined the channel [00:55] derferman has joined the channel [00:55] _announcer: Twitter: ""StackVM makes VMs accessible over the web" (embeddable in webpages) all using nodejs! http://bit.ly - very very cool VNC on steroids." -- Mat Brennan. http://twitter.com/loadx/status/19213921423 [00:57] aheckmann has joined the channel [00:58] bradleymeck1 has joined the channel [00:59] bradleymeck1: doo dee dum [01:00] stagas: maqr: you should put your lib in the node/modules wiki [01:01] bradleymeck1: anyone using dom level2 branch of jsdom? [01:02] maqr: stagas: yeah, i should do that [01:04] aliem has joined the channel [01:04] Mark9000: i'm using socket.io how do I create multiple channels of the chat example? [01:05] TommyM has left the channel [01:05] stagas: Mark9000: manually [01:05] bradleymeck1: mark9000 either multiple socket servers or make a protocol [01:05] Mark9000: stagas can you give me a general outline of what that would entail [01:05] maqr: stagas: done [01:06] mitkok has joined the channel [01:06] mitkok has joined the channel [01:07] Mark9000: bradleymeck1 can you explain more on making a protocal? is there a link? for the multiple socket servers, umm does that mean I have to use different ports for each one? [01:07] stagas: Mark9000: socket.io only handles connections, messages and client ids, doesn't do channels / rooms / nicks / join / leave or anything that is chat specific [01:08] bradleymeck1: making a protocol is just filtering in the messages / out, so you would have to define yourself based upon what the message in is who to send out messages to [01:09] Mark9000: i don't get that, ahh, is there a module or something that can make this easier for me [01:10] bradleymeck1: using faye is pretty easy [01:10] Mark9000: http://faye.jcoglan.com/ [01:10] sh1mmer has joined the channel [01:11] Mark9000: do you use this with socket.io or does that handle the connection too? [01:11] stagas: no, not faye I had a hard time trying to make it to work today [01:11] Mark9000: oh, sounds scary [01:11] satori_: Mark9000: You will have to do your own experiments with node to understand these concepts. Node itself is fairly low level and not easy if your don't understand sockets and HTTP. [01:12] bradleymeck1: stagas really? i had it up and running in like 5min last weekend [01:12] Mark9000: ach so [01:12] satori_: Mark9000: Just start hacking and ask specific questions here and will be on the right track [01:13] maqr: worked for me :) [01:13] Mark9000: ok, sounds like i should go try out faye, unless there's an alternative [01:14] satori_: I prefer to stay away from abstraction libs when I'm learning a new tech. [01:14] stagas: bradleymeck1: did you get it to fire disconnect when someone closes the tab? [01:14] satori_: I find it's easier to understand if other peoples API's dont get in the way initially. [01:14] bradleymeck1: dont remember for sure, but i think so [01:15] Mark9000: satori_ It's a lot more interesting and keeping myself motivated if i can see stuff made quickly though [01:15] satori_: Mark9000: truedat. But's it fairly easy to get a working server going in node without em [01:15] voodootikigod_ has joined the channel [01:15] stagas: because it registers an unload event, but the messages sent out use a setTimeout i.e. it never fires unless you do something like an alert() to delay the client [01:16] bradleymeck1: stagas the connections themselves should be invalid, using document.onUnload is never reliable for anything [01:16] Mark9000: including the channels functionality? [01:17] nicklovescode has joined the channel [01:17] brianmario has joined the channel [01:17] joshbuddy has joined the channel [01:18] stagas: bradleymeck1: where are the connections listed? who's connected and who's not, where? all this pub sub channel thing is overkill and buggy, you can code it yourself with websockets or long polling and keep your mind in peace that it'll work as expected [01:18] satori_: Mark9000: You will have to work out that bit :P [01:19] Mark9000: alright :) i'll probably be back with more qs soon :P [01:19] satori_: np [01:19] Mark9000: and thanks all [01:20] bradleymeck1: well the thing with using a library is trusting it wont be buggy, if i had time i would write virtually everything myself :/ [01:20] _announcer: Twitter: "I created another driver for CouchDB nodejs http://github.com/renatoelias/laila" [pt] -- renatoelias. http://twitter.com/renatoelias/status/19215567100 [01:21] stagas: bradleymeck1: also websockets actually close when you close the tab so the close event is fired no matter what [01:22] bradleymeck1: if the server is set up to listen to those, yes [01:22] bradleymeck1: im not a faye specialist i was just playing with it on sunday [01:26] mitkok has joined the channel [01:27] stagas: bradleymeck1: it should work well if you're coding an unmoderated publishing system where you don't care who or where anyone is connected and you just need many channels of data [01:28] stagas: but for chat or something that needs authorization or anything else you're better off coding it yourself [01:28] bradleymeck1: true, but for any kind of authorization that is generally true [01:28] tekky has joined the channel [01:29] stagas: I mean, I coded an extension and telling the client 'successful: false' when they tried to subscribe, but they could still publish on that channel! [01:30] bradleymeck1: it is not meant for that stagas [01:31] bradleymeck1: thats kinda like throwing some beef into a blender, it does something, its not pretty [01:31] satori_: mmmm beef smoothie [01:31] Mark9000: so what's the general strategy for multiple rooms [01:31] Mark9000: i mean the usual strategy [01:31] Mark9000: is it multiple servers? [01:32] satori_: multiple url's would make more sense [01:32] Mark9000: ok, having different urls connect to the same server? [01:32] satori_: Yeah. [01:33] Mark9000: i mean in my localhost testing thingie, i have different urls on the same chatroom [01:33] Mark9000: how do i split it into different rooms in the backend? [01:33] satori_: that is one way. I have not created a chat room before with node, but that's the route I would go down. [01:34] bradleymeck1: mark9000 still using socket.io? [01:34] Mark9000: well it sounds to me like you're talking about a relationship between urls and rooms, I don't understand how those relate [01:34] Mark9000: bradleymeck1 yeah [01:35] bradleymeck1: i would recommend just prepending the chatroom name to your message followed by a delimiter such as '@' and just stripping that off when you get a message [01:35] Mark9000: but wouldn't that mean everyone gets all the messages even if they're not in the same room? [01:35] rauchg_ has joined the channel [01:35] joshbuddy has joined the channel [01:36] satori_: node doesn't distinguish between url's except to provide your code with the url the user requested. Your code can decide what to do based apon this data. [01:36] bradleymeck1: well you have to send the messages to whatever user is in that room, so when they connect to a room they have to say they are connected to that room somehow [01:36] benburkert has joined the channel [01:37] bradleymeck1: you cant just blindly send em out everywhere, you can either manage them yourself or set up a separate socket server per room [01:38] bradleymeck1: if you set up a socket server per room you can do blind broadcasts on that, if you manage them yourself you need to tell who is where and where messages are going [01:38] ewdafa has joined the channel [01:38] satori_: onn socket per room, on seperate urls makes sense [01:38] Mark9000: which do you suggest [01:38] satori_: *one [01:38] Mark9000: so each room has its own port? [01:38] satori_: not port, just uri [01:38] Mark9000: oh ok [01:38] Mark9000: yeah ok :D [01:38] satori_: ie: http://localhost/room1 [01:39] Mark9000: ok so each uri is a socket, ahh this is why i was confused, now it makes a lot more sense to me :D this is the problem with weak fundamentals [01:40] satori_: Jumping in the deep end can be a fast way to learn :P [01:40] bradleymeck1: weak fundamentals doesnt mean you cant dunk ;P [01:41] satori_: lol [01:41] Mark9000: thanks for all the encouragement really appreciate it [01:41] Mark9000: lol [01:43] JimBastard has joined the channel [01:43] bradleymeck1: grrr http.createClient.request is borking on largish request urls [01:44] aheckmann: Welcome Mr Bastard [01:44] satori_: bradleymeck1: how big? [01:45] bradleymeck1: 200 chars [01:46] satori_: hmm. thats not really large [01:46] bradleymeck1: not huge but meh [01:46] satori_: SHould be an issue though [01:46] satori_: shouldnt [01:47] bradleymeck1: https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1&ltmpl=default&ltmplcache=2 fails without a response, it appears to get sent [01:47] JimBastard: hey aheckmann [01:47] aheckmann: yo [01:47] satori_: It's not a SSL issue? [01:48] bradleymeck1: doesnt appear so, can double check, i am setting secure to true though on the request [01:48] satori_: 200 chars seems way to small to be any sort of bug with uri's [01:48] aheckmann: JimBastard: was that you that released the nice api over the fugly crypto stuff today? [01:49] JimBastard: aye [01:49] JimBastard: the lib was kinda a mistake, i wrote the whole thing first without knowing crypto existed, so i just ripped out all my algo implementations and wrapped the crytpo [01:49] aheckmann: JimBastard: haha [01:49] JimBastard: that was a funny aha moment the other day [01:49] isaacs: ew, termina.app doesn't support 256 colors [01:49] aheckmann: it needed it tho [01:49] aheckmann: i've looked at using crypto and it's just clumsy [01:50] JimBastard: using it for simple string hashing? or something else? [01:50] JimBastard: the api for simple string hashing is easy, but its a lot of calls [01:50] aheckmann: yeah string hashing [01:50] aheckmann: lots of calls <- [01:50] JimBastard: yeah fuck thatm im lazy as shit [01:51] zapnap has joined the channel [01:51] zerovirtual has joined the channel [01:52] satori_: ACTION is feeling paticulary lazy today. [01:52] satori_: Is 11:52am too early for a joint? [01:52] Mark9000: lol [01:53] xer0xM: it's 7pm here.. just about perfect timing satori_ [01:53] satori_: That work for me :) [01:55] ditesh|cassini has joined the channel [01:57] softdrink has joined the channel [01:57] Yuffster has joined the channel [02:00] bradleymeck1: maybe it is just that link... [02:01] bradleymeck1: ryah any idea why https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1<mpl=default<mplcache=2 wont load via http.createClient.request? [02:04] JimBastard: bradleymeck1: does it work with other http clients? [02:04] JimBastard: like curl [02:05] meso has joined the channel [02:06] jakehow has joined the channel [02:06] bradleymeck1: it works on other clients [02:09] dnolen_ has joined the channel [02:09] softdrink has joined the channel [02:10] bradleymeck1: nothing says a good night like captain harlock and apples. [02:11] confounds has joined the channel [02:11] maqr: what's the point of 'filename' in Script? [02:13] pavan_ has joined the channel [02:13] pavan_ has joined the channel [02:13] confounds: testing [02:13] satori_: maqr: just to make debugging easier [02:13] maqr: satori_: how does that help exactly? [02:13] maqr: confounds: testing what? [02:13] satori_: it's of limited use i guess, cause you already know the file... [02:13] confounds: maqr: trying mape's knockout site [02:14] maqr: confounds: link? [02:14] confounds: (http://wargamez.mape.me/) [02:14] bradleymeck1: for example, in witch it sets it so you actually know what file is running the JS [02:14] bradleymeck1: since the files are pulled in when you browse to the page [02:14] maqr: bradleymeck1: eh? for Script? [02:14] satori_: It's usefulness kicks in when you are running lots of scripts. [02:15] maqr: confounds: neat [02:15] satori_: but it's just sugar. doesnt affect anything [02:15] maqr: confounds: i wonder why i'm not there :/ [02:15] maqr: satori_: ok then, i'll include it just in case :P [02:15] bradleymeck1: yea, witch is a terminal based browser im working on [02:15] confounds: maqr: i see you in it [02:15] maqr: i don't see me :/ [02:16] confounds: oh, yeah, i don't see you in the list at the left, but your messages appear at the right [02:16] maqr: yeah, dunno why [02:16] confounds: odd [02:16] maqr: mape: i think i got knocked out :/ [02:17] satori_: My location is showing up as >2000 miles from where I am. :P [02:17] bradleymeck1: so when you browse to a page the sandbox should execute the file as if it were that url (havent used an exception hack to tell url in a long time, but wouldnt want to break it) [02:17] mjr_ has joined the channel [02:22] _announcer: Twitter: "NodeJS requires us to distinguish between functions yangmembutuhkan long to run or not http://ow.ly/2eP6L" [id] -- Teman Macet. http://twitter.com/temanmacet/status/19219653226 [02:24] bmizerany has joined the channel [02:28] derferman has joined the channel [02:30] isaacs has joined the channel [02:30] akahn has joined the channel [02:31] _announcer: Twitter: "node.js orm under the framework of what is not useful?" [zh-CN] -- finscn. http://twitter.com/finscn/status/19220243650 [02:36] jsilver: damn harsh [02:36] admc has joined the channel [02:36] maqr: how can i reference a file's namespace without saying "var self = this;" in my document? [02:36] maqr: there must be a 'global' one somewhere? [02:37] Yuffster has joined the channel [02:37] mattly has joined the channel [02:38] maqr: i feel like i'm still missing something :/ [02:39] mjr_: maqr: do you have a simple example you could gist? [02:39] adamv has joined the channel [02:39] maqr: why yes i do, no gist needed: var foo = function(i) { this.bar = i; }; foo(3); console.log(this.bar); [02:39] maqr: that comes back undefined, which makes sense, since 'this' in the function is apparently different... even though this is all happening in the 'root' of the file [02:40] ncb000gt has joined the channel [02:40] maqr: mjr_: but i guess i could call it as function(self,i), but it seems like that shouldn't be necessary either [02:40] voodootikigod_ has joined the channel [02:41] mjr_: Yeah, the value of "this" is a big magical. [02:42] maqr: i really thought i had it, but then i saw it here, and i'm so confused [02:42] maqr: it must think 'this' is the 'foo' object [02:42] maqr: or something [02:42] mjr_: If you were doing Someclass.prototype.foo = function (i) { this.bar = i; }, it'd make more send [02:42] mjr_: sense [02:42] maqr: yeah, then it would refer to the instance of someclass that it is [02:42] maqr: that would make sense :) [02:42] mjr_: But in the code you listed, the invocation of foo(3) is what sets the value of this. [02:42] mjr_: it'll be the global object in that case. [02:43] maqr: mjr_: you'd think so, but run that code and you get 'undefined' [02:43] mjr_: I guess because console.log() is going to set the value of this to something else. [02:43] mde: maqr: Weird too, because in the browser console, console(this == window) is true. [02:43] maqr: that's confusing [02:44] mde: Oh wait. [02:44] mjr_: Basically, "this" is awkward, and only used in class-like member functions that you'd add to via a prototype. [02:44] mde: console.log(this.bar) logs 3. [02:44] mde: But returns undefined, of course. [02:44] satori_: you can also use call and apply [02:44] maqr: eh? [02:44] satori_: myFunction.call(this, args) [02:44] satori_: to be sure about the value of this [02:44] mde: In the Chrome console, it will print out whatever the return value of the function is. [02:45] mjr_: "this" works like you'd expect in those prototype cases, but if those prottotypes make an anonymous function for a callback, that's when you need to trap "this" in a var like "self". [02:45] satori_: yeah. there is no way around that. Most objects end up with var self = this near the top [02:45] mde: maqr: So at least in the Chrome console, scoping works like you expect. [02:45] mjr_: maqr: it doesn't sound like you are even doing a class / prototype thing here, so why do you want "this" at all? [02:45] maqr: err, ok, hold on [02:46] mde: In a function literal that's not invoked via property access, it points to the global object. [02:46] mjr_: I hate the "this" keyword. It's impossibly awkward to talk about, and it's a constant source fo confusion. It's hard to work through the confusion because it's so hard to talk about. [02:46] maqr: mde: that's so weird... if i open node and paste in the code, out comes a '3'... if i put it in a file and run it, out comes 'undefined' [02:47] mde: It's probably spitting out the return value of the console.log call. [02:47] maqr: mjr_: i'm writing something that pulls in objects from another javascript file into the curret namespace... although maybe i shouldn't be [02:47] satori_: It snagged me when i started with node, but you will grok it eventually. It is logical in it's implementation. [02:47] mde: Whatever is the return value of the final evaluated statement. [02:47] mde: maqr: So your understanding of scoping rules is correct. [02:48] mjr_: maqr: it's certainly fine to pull things in from other modules. [02:48] maqr: mde: that's reassuring, but i'm still confused why i can't print it out with console.log(), which has always worked for me before [02:48] mde: You're using the REPL? [02:48] satori_: running scripts with the Script object means youhave to populate the glonal namespace yourself right? [02:48] satori_: global [02:48] maqr: mde: if i use repl, it prints as expected... if i put that line into a .js file and run it, it comes out 'undefined' [02:48] mjr_: That's what he means by "open node and paste in the code". That's the REPL. [02:49] mjr_: And I'll bet mde is right, the reason it shows 3 is because that's the return value of console.log. [02:49] maqr: that's what i don't get [02:49] mde: You're running it with Node? [02:49] satori_: so console.log has a return value? [02:49] mde: In the Chrome JS console, every evaulated statement prints out its return value. [02:50] mde: Firebug doesn't do that. [02:50] maqr: $ echo "var foo = function(i) { this.bar = i; }; foo(3); console.log(this.bar);" >> maqr.js && node maqr.js [02:50] maqr: prints 'undefined' [02:51] mde: I don't have the latest Node, so I don't have connsole. :) [02:51] mjr_: node's console.log does: process.stdout.write(format.apply(this, arguments) + '\n'); [02:51] maqr: mjr_: that's without console, that's bash [02:51] maqr: err, mde ^ [02:51] mde: Try it with sys instead. [02:51] Aria has joined the channel [02:52] mde: maqr: You're doing "console.log" in Node, which is new. [02:52] maqr: oh, that's just what i've been doing, i didn't know it was new [02:52] maqr: anyway, same result with puts [02:52] maqr: $ echo "var foo = function(i) { this.bar = i; }; foo(3); require('sys').puts(this.bar);" > maqr.js && node maqr.js [02:52] maqr: undefined [02:52] mde: Try is with "var sys = require('sys'); sys.puts(this.bar);" [02:52] maqr: (also, i have no idea why i can't pipe into node directly) [02:53] maqr: mde: same thing, still undefined [02:53] maqr: makes no sense to me [02:54] mde: Lemme take a look at this. :) [02:54] maqr: i might be doing something really stupid, it's happened before [02:55] mde: Oh, simple. [02:55] maqr: and just now, apparently [02:55] maqr: what am i missing? [02:55] mde: No, it's because scoping rules are a little different in CommonJS modules. [02:55] mde: "this" is local module scope. [02:55] mde: Which is different from global scope. [02:55] mde: But in the browser, everything is local scope. [02:55] mde: try ... [02:55] maqr: even if that was so, why does function() change the scope like that? [02:55] mjr_: var foo = function(i) { this.bar = i; }; foo(3); var sys= require('sys'); console.log(bar); [02:55] mjr_: 3 [02:55] jsilver: i am making an app called codington codeQuest [02:55] mde: sys.puts(this == global); sys.puts(global.bar); [02:56] jsilver: you guys would like it [02:56] jsilver: it's also going to be a game [02:56] mde: Inside function literals, "this" points to global scope, not local module scope. [02:56] maqr: mde: you're a witch! [02:56] jsilver: think of it as like prince of persia + ruby koans [02:56] maqr: how the hell [02:56] mjr_: maqr: in the main part of your file, "this" is not the global object. In the REPL, it is. [02:56] mde: Haha [02:57] mde: It's pretty much the same scoping rules as the browser, but you have to remember one extra layer of "local module scope." [02:57] maqr: mde: no really, wtf? how does function() change it out of global? [02:57] bradleymeck1: mde a witch, doubtful [02:57] mjr_: Try doing this: "console.log(require('sys').inspect(this))" [02:57] mscdex: which witch is which [02:57] mde: "Burn the witch!" [02:57] bradleymeck1: http://github.com/bmeck/Witch? [02:57] mjr_: You'll find that in the main block of your program that "this" is an empty object. [02:58] maqr: mjr_: ok... but how does function(i) magically change that? [02:58] mjr_: It doesn't change it so much as the way you invoke it. [02:58] mde: maqr: When you reference "this" in a function that's not explicitly invoked as a method call, it refers to the global object. [02:58] mjr_: Them's the rules of JavaScript. [02:58] mscdex: bradleymeck1: you're rewriting the links browser? :p [02:58] bradleymeck1: kinda [02:59] mjr_: Anyway, the point is, "this" is used when defining classes and their member functions. That's what it's there for. Trying to use it in any other way will result in confusion, sadness, and witchery. [02:59] mscdex: make sure it's css3 compatible [02:59] mscdex: i want rounded corners in ascii [02:59] mjr_: () [02:59] mjr_: rounded corners [02:59] maqr: mde: so if i use 'this' in the global module... i'm really talking about some other this that nobody uses? [03:00] mikeal has joined the channel [03:00] bradleymeck1: pfff i need to support npapi first [03:00] Aredridel has joined the channel [03:00] mscdex: heh that reminds me of that scene from monty python's the holy grail [03:00] geojeff has joined the channel [03:00] mscdex: a witch! [03:00] mde: maqr: With Node, you have module-level scope that's separate from global scope. [03:01] mde: Well, with CommonJS. [03:01] mscdex: she turned me into a newt! [03:01] mscdex: :-D [03:01] mde: "I got better." [03:01] maqr: mde: does anything actually use the global scope then? it seems empty when i print it [03:01] lachlanhardy has joined the channel [03:02] mde: mape: In the browser, undeclared variables end up in global scope. In Node, I guess they end up in module scope. [03:02] bronson has joined the channel [03:02] mde: Oh, wait, let's test and be sure. [03:03] mde: Oh, wrong, they're global. [03:03] maqr: mde: ok, so if printing sys.inspect(this) gets me the globalest scope... how do i print my module's local-global-scope thing [03:03] maqr: $ echo "var foo='bar'; console.log( require('sys').inspect(this) );" > maqr.js && node maqr.js [03:03] maqr: {} [03:04] satori_: sys.inspect(module) ? [03:04] mde: Hang on here. If you inspect "this" in your node script *not* inside a function, it will refer to module scope. [03:04] mjr_: but it'll be global scope inside of a function [03:04] mde: If you're in a function that isn't being invoked on something, "this" will point to global. [03:04] mjr_: Yeah, globalness sucks in JavaScript, and "this" sucks even more. [03:05] maqr: mde: but, even if i try to make it as global as i know how, by omitting 'var': [03:05] mjr_: Note that invoking class.member() will set "this" to be "class". [03:05] maqr: $ echo "foo='bar'; console.log( require('sys').inspect(this) );" > maqr.js && node maqr.js [03:05] mde: mjr_: Well, it's less complicated without the module scope, but yeah. :) [03:05] maqr: {} [03:05] mde: maqr: You're still inspecting the module scope object. [03:05] adamv: isaacs_home: I'm thinking about the node/npm/homebrew problem, though I don't have a solution yet [03:06] maqr: mde: how do i inspect the globalest of the scopes? [03:06] mde: var qux = function () { sys.puts(inspect(this); }; qux(); [03:07] davidwalsh has joined the channel [03:07] mde: Or just ... sys.puts(inspect(global)); [03:07] mde: If you're just calling some random function, JS doesn't know what "this" should be, so it just punts and points it at the global. [03:08] mde: Oop, should be sys.puts(sys.inspect(global)); [03:09] mde: And var qux = function () { sys.puts(sys.inspect(this); }; qux(); [03:09] maqr: o_O [03:09] maqr: what exactly is 'global'? [03:10] mde: In Node, it's the global scope -- same as "window" in the browser. [03:10] maqr: then why does this happen: [03:10] everton has joined the channel [03:10] maqr: $ echo "mde='witch'; console.log( require('sys').inspect(global) );" > maqr.js && node maqr.js [03:10] maqr: {} [03:10] maqr: i thought omitting 'var' was as global as one could get [03:11] maqr: in fact, even if i put that down as 'global.mde', it doesn't show up in global... [03:11] _announcer: Twitter: "sadly, swamped with work and can't make it to the node.js meetup at redfin" -- visnu pitiyanuvath. http://twitter.com/visnup/status/19223002630 [03:12] mde: maqr: I just did this: [03:12] mde: var sys = require('sys'); foo = 'asdf' sys.puts(global.foo); [03:12] mde: And it prints out 'asdf' [03:12] maqr: but what if you puts(inspect(global))? [03:13] mde: Okay, that's weird, yes. :) [03:13] maqr: i'm not crazy! [03:13] maqr: thank you! [03:14] mde: Makes sense that global is 'special.' :) [03:14] maqr: mde: so global is just some sort of blackhole? [03:14] _announcer: Twitter: "My first patch submission has been accepted into node.js! :) http://github.com/ry/node/commit/f5f7cb92646169a7096360506cef79a7a455 #nodejs" -- Chandra Sekar. http://twitter.com/tuxychandru/status/19223201695 [03:15] mde: In Node/Chrome, yes. [03:15] maqr: mde: ok, i'll accept that it's a void of nothingness... but then why does this work: [03:15] maqr: $ echo "var sys=require('sys'); global.mde='witch'; sys.puts( sys.inspect(global.mde) );" > maqr.js && node maqr.js [03:15] maqr: 'witch' [03:15] mde: maqr: Try this in Firebug: foo = 'asdf'; console.log(window); [03:15] mde: It actually spits out all the shit exposed on the global context. [03:16] mde: Node/Chrome choose not to do that. [03:16] maqr: mde: it's surely going somewhere, since it can retrieve it later [03:16] mde: Yes, so the global execution context is special. [03:16] maqr: very [03:17] mde: Heheh. :) [03:17] mde: It's not as complicated in the browser, because there's no module-scope. [03:17] maqr: mde: and here i was worried about polluting the global space... i can't even see what's in it [03:17] mde: maqr: You should still worry about it. [03:17] maqr: no one will ever know it was me [03:18] mde: Because you might add stuff to it that fucks up other people. [03:18] mde: I can overwrite your 'foo' with mine. [03:18] maqr: yeah, i see [03:19] mde: Or worse, asshole library people might add extra stuff onto Array that I might not want. :) [03:19] siculars has joined the channel [03:19] maqr: i may or may not be doing that [03:19] maqr: i'm not even sure anymore [03:19] mde: Haha [03:20] mde: Just try not to add stuff to global unless you really need to. [03:20] donspaulding has joined the channel [03:20] maqr: wait, here's an extra level of crazy: [03:20] mde: Geddy adds a "geddy" object, and sticks everything inside that. [03:20] maqr: s$ echo "sys=require('sys'); function foo() { this.mde='witch'; }; foo(); sys.puts( sys.inspect(global.mde) );" > maqr.js && node maqr.js [03:20] maqr: 'witch' [03:20] maqr: mde: so 'this' in my function is really the global scope [03:20] maqr: but you can't inspect(this) or inspect(global) to see it [03:21] maqr: it's secret [03:21] mde: Yeah, that's what I said. Inside functions, if you don't access them as a method call on something, "this" points to global. [03:21] maqr: OH! [03:21] maqr: i get it! [03:21] mde: If you're just at the top level of your module, "this" points to the module scope. [03:21] maqr: mde: what's happening is, v8 is hiding global out of convenience [03:22] maqr: $ echo "sys=require('sys'); function foo() { this.mde='witch'; }; foo(); sys.puts( sys.inspect(global, true) );" > maqr.js && node maqr.js | grep witch [03:22] maqr: , [mde]: 'witch' [03:22] maqr: if you look at the inspect docs, you can tell it to not hide stuff with that second parameter [03:22] maqr: and there you have it, you're a witch [03:22] mde: Oh, right on. :) [03:22] mde: Haha [03:22] maqr: doesn't work in chrome though [03:23] maqr: whatever, i don't care about chrome :P [03:23] mscdex: geddddyyyyy [03:23] maqr: man, i understand that so much better now [03:23] maqr: thanks so much mde, i was going nuts with that :) [03:23] mde: mscdex: Dude, you seriously need to check Geddy out. :) [03:23] maqr: geddy looked big and scary to me [03:23] mde: maqr: Yeah, scoping is weird in JS, but there aren't that many rules to remember. [03:24] mscdex: i'm getting to that point... still working on node stuff for work though [03:24] maqr: mde: would this be a good time to drive home what apply() and call() really do? because if you have a good relevant explanation, i'd love to hear it :) [03:24] mde: maqr: It's meant to be simple and work out of the box. I hope it's not scary. :) [03:24] maqr: that's scarier to me than connect :\ [03:24] steadicat has joined the channel [03:25] maqr: not to everyone else though, that's why django and rails are so popular, and node clearly needs that [03:25] mscdex: i think the only difference between those two is that .apply() takes in an array for arguments and .call() takes in each individual argument [03:25] mde: maqr: Yeah, it definitely tries to let you make actual applications. [03:25] mde: Or, it's getting there. [03:26] mde: maqr: Are you trying to understand what those two do? [03:26] maqr: mde: yeah, i'm confused how they change scope [03:26] mscdex: you pass in the scope you want [03:26] mde: Right, they just point "this" to something specific. [03:26] mscdex: :-> [03:26] mde: So, I can call the "bar" method of the "foo" object over on some other object. [03:26] PyroPete1 has joined the channel [03:27] bradleymeck1: yub [03:27] rwaldron has joined the channel [03:27] mde: Like foo.bar.apply(baz, [1, 2, 3]); [03:27] maqr: mde: that makes function 'baz' have this=foo.bar? [03:27] mde: That says "Instead of calling foo on bar, call it on baz, and pass it 1, 2, 3 as args." [03:27] maqr: ohh, i see [03:28] maqr: mde: it makes more sense when you say it that way... it's like using a function out of context, right? [03:28] mde: No, it makes "this" be baz instead of foo. [03:28] bradleymeck1: im still sad you cant use .call on eval [03:28] mde: bradleymeck1: You can, just not in IE. [03:29] mde: Or ... does it not work in Chrome? [03:29] bradleymeck1: you cant give it anything but the global [03:29] bradleymeck1: i always think of x.y as x.y.call(x... [03:29] aliem_ has joined the channel [03:30] cirwin has joined the channel [03:30] halorgium has joined the channel [03:30] mde: bradleymeck1: Yeah, you can do window.eval.call(someOtherWindow ... [03:31] maqr: i think i get it... [03:31] mde: Doesn't work in IE though. [03:31] maqr: ACTION tries some real code now [03:31] maqr: i'm done with IE, i quit [03:31] maqr: i'm just not doing it [03:31] mjr_ has joined the channel [03:31] tahu has joined the channel [03:31] wao has joined the channel [03:31] gwoo has joined the channel [03:31] FireFoxIXI has joined the channel [03:31] beawesomeinstead has joined the channel [03:32] maqr: it's 2010, and i know people that still use IE6 [03:32] maqr: they've been collecting toolbars for a decade [03:32] mde: maqr: Yeah, I think you've got it. [03:32] bradleymeck1: what does work in ie? [03:32] cirwin: is there any way to chose which dns server to use? [03:32] bradleymeck1: oh, hw accel gfx with slow as heck js that can do around 1/2 the new engines [03:32] mscdex: bradleymeck1: very little [03:32] mde: call and apply are the same deal, just one passes individual args, the other sticks them in an array. [03:33] maqr: mde: yeah, i think it makes sense, we'll see when i try to use it :) [03:33] mde: bradleymeck1: eval is like a special method, not a property of window. [03:33] softdrink has joined the channel [03:33] mde: For global eval you have to do execScript. [03:33] bradleymeck1: eval is actually just in JS spec a function [03:34] mde: Ah, interesting I didn't realize that. [03:34] bradleymeck1: yub, just a lot of exceptions around it [03:35] maqr: mde: so as soon as i do " var foo = { bar : function(){ /* here */ } }... that puts me with 'this' being the 'foo' object, right? even though it's not a prototype? [03:35] cirwin: maqr: it's decided at function call time, not function definition time [03:36] cirwin: foo.bar() would give this == foo in bar [03:36] maqr: ok good, that's what i thought [03:36] cirwin: it's a big "gotcha" though - easy to forget [03:37] maqr: ok, this totally works and kicks ass, lemme clean it up so i can show you guys :) [03:37] maqr: ryah: btw, you got me legit excited about coding again, this is awesome :P [03:37] bradleymeck1: npapi or ajax support first? [03:38] _announcer: Twitter: "@brianleroux hey brian, you know of any semi-official node.js coding conventions?" -- David Trejo. http://twitter.com/ddtrejo/status/19224822873 [03:40] bradleymeck has left the channel [03:41] maqr: mde: closure templates work :) [03:41] Tim_Smart has joined the channel [03:41] _frankie has joined the channel [03:42] mde: maqr: Closure templates? [03:42] maqr: http://code.google.com/closure/templates/docs/helloworld_js.html [03:42] maqr: mde: the google closure library [03:42] mde: Oh, I got you, okay. :) [03:43] mtodd has joined the channel [03:43] maqr: mde: it's what they made gmail and friends with, plus mobile support :) [03:43] mostlygeek has joined the channel [03:43] Yuffster has joined the channel [03:43] bradleymeck1: !tweet @ddtrejo http://wiki.github.com/ry/node/contributing vs http://github.com/isaacs/npm/blob/master/doc/coding-style.md [03:43] maqr: we can tweet out through th e bot? [03:43] maqr: !tweet @maqr test [03:43] bradleymeck1: yub [03:43] maqr: maybe you can :p [03:44] nuxusr has joined the channel [03:44] maqr: oh wow, so can i [03:44] maqr: neat! [03:44] benburkert has joined the channel [03:44] mde: maqr: Ah, sounds pretty solid. I'm just sticking with plain old EJS for the most part. [03:44] mjr_: maqr: I'm glad you forced out the explanation of your crazy "this" situation. Even though it is crazy, I'm glad that I understand it better now. [03:44] bradleymeck1: it will also deal with tweet overflow which is nice [03:45] maqr: mde: yeah, this currently requires banging it against a java compiler, it's in no way node-native... but you get a lot of extra value by being willing to compile your javascript [03:45] _announcer: Twitter: "I am taking it to the next level. node.js.vbs" -- Jon Galloway. http://twitter.com/jongalloway/status/19225236534 [03:45] mde: I'm a grownup, and I don't shovel lots of logic into my templates. I like not having yet another language. [03:45] maqr: mjr_: glad we're both less confused then :) [03:45] mde: Ah, if you're already bound to the JVM, I can see it. [03:45] maqr: heh [03:46] _announcer: Twitter: "Trying to get node.js + npm playing nicer with Homebrew: http://github.com/adamv/homebrew/commits/npm" -- Adam Vandenberg. http://twitter.com/flangy/status/19225298443 [03:46] maqr: mde: it sounds worse than it is, the jvm outputs javascript for you to use, and that javascript is all minified and optimized and type-checked [03:46] mjr_: Ha, well I wasn't really confused, other than why you want to do this at all, but I like understanding the subtleties of the language and environment that I spend a lot of time in. [03:46] mde: I seems as nice as most other templating languages I've seen, sure. [03:46] maqr: mde: works on the browser side and the server side, which is neat [03:47] maqr: plus, you know, gmail :P [03:47] mde: maqr: Right, that's why I'm so excited about having credible SSJS now, finally. [03:47] mde: The geddy-model stuff all runs on both sides. [03:47] bradleymeck1: we do need an in js js optimizer someday [03:47] maqr: mde: did rhino suck that much? [03:47] _announcer: Twitter: "@jongalloway let me know when you have a stable API so I can begin work on node.js.vbs.pl ;)" -- Leonardo. http://twitter.com/ldmosquera/status/19225406273 [03:48] bradleymeck1: rhino was a lil hard to get started, i tried a couple times, but not good tutorials, community is fairly quiet :/ [03:48] mde: maqr: It's okay, but you do feel the startup lag. And inevitably, people just wanted to "leverage" more and more Java libs. [03:48] mde: So it never really got people interested in it as a real SSJS platform. [03:48] maqr: makes sense [03:48] bradleymeck1: the main reason i am interested in node isnt that it is JS but that it has a focus on streaming data rather than pooling it. mmm mmm good [03:49] mjr_: Some people tell me that Rhino is actually fast. Are these people crazy? [03:49] maqr: mde: i've wondered the same about clojure [03:49] satori_: bradleymeck1: yeah me too.....also the ability to script the entire server not just 'pages' [03:49] mjr_: And that clojure guy says it is faster than node on his computer for a hello world benchmark. [03:49] _announcer: Twitter: "@jongalloway go full circle node.js.vbs.py" -- developingchris. http://twitter.com/developingchris/status/19225551311 [03:49] mde: maqr: I think it's definitely an issue. The JVM is kind of like a big gravity well. [03:49] bradleymeck1: and for a server? hell, reading a file? [03:50] mde: Plus Lisp isn't a very mainstream language, honestly. [03:50] bradleymeck1: now, prolog is where it is at on the jvm [03:50] maqr: i'm afraid to try lisp because i might end up liking emacs ;) [03:50] mde: Hehe [03:50] maqr: it is gaining popularity with this whole clojure thing though [03:51] mjr_: I like emacs, but I never got in to lisp. [03:51] cirwin: bradleymeck1: prolog isn't the best asynchronous communications language I can think of :p [03:51] mde: That's why it's so funny seeing the esoteric language guys getting their panties all in a bunch about Node. [03:51] bradleymeck1: shhhh its perfect [03:51] maqr: mde: how so? [03:51] mjr_: are other language people getting worked up about node? [03:51] cirwin: well, if I had the choice I'd do a bit of javascript tweaking before releasing it to the public - but it's a bit late now [03:51] Yuffster has joined the channel [03:51] mde: Yeah, I've seen Erlang guys getting irritated. [03:52] bradleymeck1: the ringojs ppl really need to get an event driven system out there that is easier to get running, then they can compete in use, until then, not many event driven languages [03:52] mde: And today some Haskell guy was tweeting about it. [03:52] maqr: to this day, i have no idea what erlang, haskell, or prolog are for [03:52] mjr_: But we love Erlang, and aspire to be as faul-tolerant as they. [03:52] mde: Like, "It's not *real* concurrency." [03:52] bradleymeck1: prolog is for solving word problems [03:52] adamv: prolog is for 80s "expert systems" research. [03:52] maqr: bradleymeck1: i've heard prolog is smarter than me and R can tell me how much smarter than me it is [03:52] mjr_: We love using multiple cores for certain types of workloads. [03:52] mde: The Haskell guy was lke "I don't have to rewrite my code to be evented to get those benefits." [03:52] mjr_: Fucking love it. [03:53] maqr: mde: haskell isn't event-driven? [03:53] satori_: Erlang is typically used by telcos. You imagine the uptime req and concurrency req they have [03:53] bradleymeck1: if someone ever tells me that continuation style gives you all the benefits of callback, im gonna slap em [03:53] mjr_: couchdb and riak both use Erlang [03:53] lachlanhardy has joined the channel [03:53] cirwin: I was thinking, surely with node and javascript in general, it's pretty easy to build applications so that the compilers can split it across multiple cores - is anyone doing that? [03:53] maqr: satori_: i still really don't understand what "functional programming" means, but i think i might be doing it [03:54] mjr_: cirwin: check out the node workers thing. [03:54] cirwin: I love guard conditions in erlang [03:54] satori_: maqr: Ever worked with XSLT? that can be considered a functional language [03:54] maqr: my main reason for learning node is that i always feel like i suck at javascript in the browser, so if i'm building for the web, why not know it inside out [03:54] mde: I was just thinking that the number of people who are worried about how hard events are with Haskell is probably like five guys. [03:54] maqr: satori_: that's another one that i really don't understand [03:54] mjr_: maqr: basically using "functions as first class objects", passing them around effortlessly, using things like array.forEach, etc. [03:54] cirwin: satori_: but it has the slight disadvantage of being really horrible [03:54] mikeal: haskell is so awesome :P [03:54] maqr: mjr_: can't javascript, python, and ruby all do that? [03:54] satori_: hehe. truedat [03:55] cirwin: maqr: yes [03:55] mjr_: maqr: they sure can. JS is especially well suited to that though, because of the way functions work. [03:55] satori_: It took me ages to work out how to use write once vars [03:55] maqr: ... so am i functional programming now? [03:55] mde: If you're all torqued up events, but using Haskell, seems like you're kind of missing the point. [03:55] mjr_: mikeal: did you get woken up because I mentioned couchdb and erlang? [03:55] satori_: in real functional programming variables cannot be changed after creation [03:55] bradleymeck1: most languages can implement a functional style, the only problem with executing JS on multiple cores is lack of semaphores [03:55] mikeal: no [03:55] maqr: satori_: that sounds hard [03:55] mikeal: i'm a little drunk [03:56] mikeal: JimBastard woke me up [03:56] mde: mikeal: Nice, me too. :) [03:56] cirwin: hey mikeal! [03:56] mikeal: good stuff [03:56] maqr: i'm extra sober [03:56] mikeal: i'm in NYC [03:56] bradleymeck1: the objects cant be changed, the variable refs can [03:56] mikeal: watching Tango and Cash on netflix [03:56] mde: The thing is that lots and lots of people know JS or can learn it easily. [03:56] satori_: maqr: yeah it is. But the advantages in not having stateful objects is massive scalability [03:56] maqr: mde: i don't know how that happened, because i felt like i knew JS too, until i showed up here [03:56] mikeal: js is easy [03:57] mde: And something like Node brings all that awesomeness to a huge number of people. [03:57] mikeal: jquery proved that [03:57] cirwin: scala is a really cool language for objects and mutability [03:57] cirwin: shame it has so many other semi-working features [03:57] maqr: satori_: so... i *am* functional programming? just not very strictly? [03:57] mde: maqr: Ah, you have a great start. [03:57] mjr_: Yeah, I thought I knew JS also until I tried to build a large application in it. [03:57] mikeal: scala is horseshit [03:57] mikeal: you can't pay me to dick around with the JVM [03:57] cirwin: :) [03:57] bradleymeck1: maqr JS wont bind you to any one paradigm, you are prolly doing many things at once [03:57] mjr_: mikeal: but twitter uses scala + kestrel to route all of our awesome tweets! [03:57] satori_: java...ewww [03:57] cirwin: they have case classes, which are amazing [03:57] mde: Just that the number of people who will actuall do something productive with Erlang or Haskell is much smaller than JS. [03:57] cirwin: just like guard conditions in erlang [03:57] mikeal: twitter is a series of failed platforms [03:57] cirwin: completely type safe [03:58] bradleymeck1: twitter is on the edge of death every day [03:58] mikeal: there isn't a good engineer at twitter [03:58] maqr: bradleymeck1: i'll just assume i'm being more awesome than the haskell guys then [03:58] cirwin: twitter gets hundreds of millions in deals from search engines [03:58] cirwin: its not going away [03:58] maqr: what does twitter even run on? [03:58] mikeal: seriously [03:58] mde: We're using Scala for our realtime stuff. [03:58] mikeal: no [03:58] mikeal: twitter is awesome [03:58] maqr: mde: you're at twitter? [03:58] bradleymeck1: true, but failwhale is here more often than i care for [03:58] mikeal: as a service [03:58] mikeal: but as a technology [03:58] mikeal: they suck [03:58] mde: maqr: No, I'm at Yammer. [03:58] mikeal: twitter peaks at 7K writes per second [03:58] cirwin: mikeal: how many node.js would twitter need? [03:58] mikeal: average at 1,200 [03:59] mikeal: cirwin: one [03:59] bradleymeck1: if done right cirwin [03:59] mde: Scala is great if you have, as mikeal says, "a high tolerance for complexity." :) [03:59] maqr: mde: that's a new one to me, but it looks like a smart idea [03:59] mjr_: Good presentation about twitter's architecture: http://www.slideshare.net/jkalucki/chirp-2010streamingapiarchpost [03:59] mikeal: their bottleneck isn't network [03:59] mjr_: make sure you look at the slide notes [03:59] mikeal: it's DB [03:59] mde: maqr: Yeah, we just passed 1 million users, and we're growing really fast. [03:59] maqr: mde: wow, congrats [03:59] mde: And we're hiring! :) [03:59] mjr_: Wow, 1M users? That's awesome. [03:59] maqr: mjr_: slide 0 tells me that they doodle a lot [03:59] mde: HIRING!!! [03:59] satori_: mde: Where? [04:00] mikeal: mde is drunk [04:00] mde: satori_: Yammer. [04:00] mde: Haha [04:00] mde: I'm a little tipsy, yeah. :) [04:00] bradleymeck1: i wish i had a new job but I dont wanna move or any of that [04:00] satori_: mde: In the US? [04:00] maqr: mde: i'm really hoping to forge my own way and not do the 9 to 5 thing, but just out of curiosity, how's the pay for being a code monkey at a growing startup like that? [04:00] mjr_: I really like that twitter streaming presentation, especially the notes. Their explanation of the shortcomings of REST are right on. [04:00] mde: We really need good JS peeps, or good generalists. [04:00] satori_: ACTION is about to hit the job market [04:00] mde: satori_: We're in San Francsico. [04:00] WALoeIII has joined the channel [04:01] mikeal: if you live in the bay area [04:01] mikeal: and you write code [04:01] mikeal: you have no worries [04:01] ewdafa has joined the channel [04:01] mjr_: mde: you should hire mape. He needs someone to sponsor his H1. [04:01] satori_: ACTION is in Australia [04:01] mde: We do the visa sponsorship thing. [04:01] bradleymeck1: bay, denver, austin, ny, atlanta, ... goes on where coders are needed [04:01] satori_: I am about to start contacting angel investors to see what startups are doing cool stuff in Sydney. [04:01] maqr: mikeal: any idea what coders make in the bay area? [04:01] mde: Anyone who is interested send a resume to me -- mde@yammer-inc.com [04:01] satori_: I wanna do something cool and awesome. [04:02] mikeal: 80-150 [04:02] maqr: good to know [04:02] adamv: maqr: Barely enough to cover cost of living [04:02] mde: maqr: It will seem like a lot, but it won't be, however much it is. :) [04:02] cirwin: mde: you're yammer - we use you :) [04:02] maqr: adamv: that's the impression i got from the NYC jobs i've looked at [04:02] satori_: c# business programming and MSSQL server made me hate computers. i am not ever doing that again [04:02] mjr_: Bah, coders live very comfortably in the Bay Area. [04:02] mde: cirwin: Nice! [04:02] mde: mjr_: I have a family, so it's a bit more of a stretch, but you're right. [04:02] wilmoore has joined the channel [04:03] mjr_: The cost of housing is super fucking high, but the salaries are very good, on average. [04:03] bradleymeck1: satori_ that is pain [04:03] mde: cirwin: We're going to be doing some really intersting stuff with our dev platform and SSJS. [04:03] Tim_Smart has joined the channel [04:03] mjr_: mde: yeah, I have 2 kids. That's why we live in Oakland instead of SF. [04:03] mikeal: i have no complaints [04:03] maqr: heh, kids [04:03] mde: mjr_: Ah, right on. Yes, we're down in Pacifica. [04:03] cirwin: mde: cool [04:03] JimBastard: is there any xmlsocket libraries for node [04:04] JimBastard: i think it requires just a couple of lines [04:04] mikeal: mde: we ate at this new italian restaurant down there yesterday [04:04] JimBastard: fucking adobe [04:04] mikeal: it was really good [04:04] mjr_: mde: Yeah, we've thought of Pacifica many times. I love the coast, but the commute from there to downtown SF is often brutal. [04:04] mde: mikeal: What was it called? I'll go check it out. [04:04] mikeal: next to the grocery [04:04] mikeal: in downtown [04:04] bradleymeck1: xmlsocket? whew... ancient much? [04:04] mde: mjr_: My commute to SOMA is 15 minutes. [04:05] maqr: mde: you're the owner? [04:05] mde: But we're right at the top, in the Manor District. [04:05] JimBastard: bradleymeck1: i was at the flash meetup [04:05] JimBastard: and their socket demo was failing hardcore [04:05] mde: maqr: The owner of this business? [04:05] JimBastard: it was pretty epic actually [04:05] maqr: mde: yeah [04:05] JimBastard: it was outputing "string" [04:05] JimBastard: but [04:05] mde: Nooo ... I'm just a code-monkey. :) [04:05] JimBastard: it had \0 at the end [04:05] JimBastard: so you couldnt see it [04:05] maqr: mde: oh ok :) [04:06] JimBastard: defintely a mind fuck if you dont know what to look for [04:06] mde: It's still a very small company. I think we're around 50 people now. [04:06] bradleymeck1: so you need jsdom+xmlparser+net.stream? [04:06] maqr: size is perspective, that sounds huge to me :P [04:06] mde: Twitter is like 200 people, and Facebook ... they have thousands now. [04:07] mikeal: i drank too much to continue [04:07] mikeal: good night everyone [04:07] maqr: peace mikeal :) [04:07] mikeal: have a nice time [04:07] mde: mikeal: 'Night, dude. :) [04:07] mikeal: love you all [04:07] satori_: ciao [04:07] maqr: ahaha [04:07] mikeal: ACTION bows out [04:07] maqr: <3 :P [04:07] ryah: wow [04:07] _announcer: Twitter: "@justinlilly Wait, is that npm hard-coding or node.js?" -- Adam Vandenberg. http://twitter.com/flangy/status/19226702216 [04:07] mde: I love that guy. [04:07] bradleymeck1: jimbastard we dont have one, but i can throw you some code to parse out the xml into jsdom? [04:07] maqr: ryah: you can feel the love [04:07] bradleymeck1: ryah! [04:08] mjr_: ryah: I had to bail on your talk tonight. Work stuff came up. [04:08] JimBastard: bradleymeck1: doesnt work like that [04:08] ryah: mjr_: np [04:08] JimBastard: maybe it does [04:08] _announcer: Twitter: "Heh: "I've heard prolog is smarter than me and R can tell me how much smarter than me it is." - maqr in #freenode #node.js (maybe @maqr)?" -- Jeremy Martin. http://twitter.com/jmar777/status/19226752555 [04:08] JimBastard: im not sure [04:08] bradleymeck1: it returns a dom xml node [04:08] maqr: if there's a video, i'll watch it [04:08] JimBastard: bradleymeck1: are you sure about that? [04:08] mjr_: ryah: lots of people there? [04:08] ryah: ~30 [04:08] ryah: pretty low key [04:08] JimBastard: http://en.wikipedia.org/wiki/XMLSocket [04:09] ryah: tim came [04:09] jmar777: woah - wasn't aware of _announcer. hope you don't mind the quote, maqr [04:09] maqr: jmar777: haha, no, i think i'm hilarious too, it's fine ;) [04:09] JimBastard: ryah: me and binary42 held node down tonight as well [04:09] JimBastard: :-) [04:09] JimBastard: flashcoders meetup [04:09] jmar777: maqr: ahh good. then we're all in agreement :p [04:09] bradleymeck1: ryah, https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui%3Dhtml%26zy%3Dl&bsv=1eic6yu9oa4y3&scc=1&ltmpl=default&ltmplcache=2 seems to never get responses from http.createClient.request [04:09] voodootikigod_ has joined the channel [04:09] ryah: bradleymeck1: hm [04:10] bradleymeck1: jimbastard, onXML is where the dom comes in [04:10] _announcer: Twitter: "getting into #nodejs and REALLY liking it...." -- Jon Bomgardner. http://twitter.com/jonlb01/status/19226888952 [04:10] bradleymeck1: any redirect url given by mail.google.com/mail/ actually fails [04:10] JimBastard: !tweet @jonlb01 node.js owns! [04:11] bradleymeck1: !tweet @jonlb01 awesome! let us in freenode.net#node.js know how it goes, oi jim i was tweeting [04:11] JimBastard: lol [04:11] JimBastard: its the twitter assault i love it [04:11] maqr: ok, time to learn how to use the file watcher [04:11] JimBastard: node community > (rails community * 100000) [04:12] bradleymeck1: so jim you dont need the onXML? [04:12] cirwin: quality not quantity :) [04:12] maqr: !tweet @jonlb01 i don't know who you are, but all the cool kids are tweeting you, freenode#node.js :) [04:12] satori_: hahaha [04:12] JimBastard: bradleymeck1: i actually dont need xmlsockets at all [04:12] JimBastard: it came up tonight at that meetup [04:12] JimBastard: we fixed it for the most part [04:12] JimBastard: because i think he was just passing plaintext [04:13] bradleymeck1: oh, nm then, might whip it up sometime to have it supported for witch, if we could support most of the AS libs (well without the type checking) it would be nice [04:14] bradleymeck1: and if tmpvar comes about let me know if he thinks the level2 jsdom is working enough to beta, ive got cookies to eat [04:15] JimBastard: bradleymeck1: i was bugging them about RTMP [04:15] JimBastard: i wanna see flv streaming [04:15] JimBastard: with seeking [04:15] JimBastard: maybe thats the wrong approach though [04:15] maqr: before i try to solve the wrong problem here, is anyone aware of a file watching tool that will do stuff as my files are updated? [04:16] cirwin: maqr: what kind of stuff? [04:16] maqr: cirwin: i want to watch for when some glob of files changes, then exec on each file... this should probably be done with bash instead of node [04:16] maqr: cirwin: i'm watching to see when source changes so i can fire off the compiler [04:17] cirwin: there are build tools that do that - but I couldn't tell you what they are called [04:17] maqr: i mean, i could do it with node, but how could something not exist that does this [04:17] luddep: maqr: i use http://github.com/lrbabe/node-DJs [04:17] luddep: or wait, maybe that wasn't what you were asking for. [04:18] maqr: luddep: no, but that's also really useful... thanks [04:18] satori_: maqr: I tend to use multiple child procs and just restart them when code changes. [04:18] bradleymeck1 has left the channel [04:18] maqr: satori_: yeah, i guess what i really need is a build system that triggers itself, but i didn't want to get silly with make or ant or something [04:19] maqr: i'll ask ##linux, those guys can script anything into anything [04:19] satori_: I am pretty sure some peeps have worked on this sortof problem b4. [04:19] maqr: yeah, certainly [04:19] mjr_: maqr: node has the filewatcher thing that I've never used. [04:19] bradleymeck1 has joined the channel [04:20] mjr_: And someone recently did a linux inotify thing. [04:20] maqr: mjr_: yeah, i was just about to write my own with that, but then i'm thinking, that's pretty silly [04:20] mjr_: Check the mailing list for that. [04:20] maqr: hmm [04:20] maqr: mjr_: with node? [04:20] mjr_: yeah, a linux inotify thing for node. [04:20] _announcer: Twitter: "@jongalloway I'm just forking <script>node.js</script>" -- Eric Williams. http://twitter.com/MotoWilliams/status/19227525175 [04:20] mjr_: I didn't try it, just saw the post. [04:21] cirwin: is this the kind of format patches should be submitted in: http://gist.github.com/485563 ? [04:22] mjr_: I was tempted to do a kqueue-based file watcher for OSX, but then I realized how silly that would be for my use case. [04:22] ChrisPartridge has joined the channel [04:23] maqr: mjr_: yeah, people are saying to use inotify [04:23] maqr: mjr_: seems kind of linux-based though [04:27] ditesh|cassini has joined the channel [04:27] bradleymeck1: cirwin that is acceptable, yes [04:27] cirwin: any comments on the contents of the patch, or should I go to the mailing list? [04:27] cirwin: I wasn't sure whether it should emit an error in that circumstance or not [04:28] bradleymeck1: throw it up to ryah on mailing list [04:29] cirwin: ok, thanks - I should probably change the hostname in the test :) [04:29] mjr_ has joined the channel [04:29] tahu has joined the channel [04:29] wao has joined the channel [04:29] gwoo has joined the channel [04:29] FireFoxIXI has joined the channel [04:29] beawesomeinstead has joined the channel [04:30] robotarm_ has joined the channel [04:30] akahn has joined the channel [04:32] derferman has joined the channel [04:36] softdrink has joined the channel [04:38] _announcer: Twitter: "http://stackvm.com/ too sailed. VMs running on a browser. # Nodejs" [es] -- mauro. http://twitter.com/paqreligion/status/19228611970 [04:41] maqr: i think i saw that guy on HN today [04:42] satori_: substack? [04:43] maqr: is that who's behind stackvm? [04:43] satori_: yeah. [04:43] maqr: yeah, him then :) [04:44] satori_: stackvm is Substacks' and pkrumins' startup [04:44] satori_: cool idea [04:44] satori_: too [04:45] maqr: neat [04:45] maqr: i have no idea how that could possibly work, btw [04:45] maqr: that's some serious voodoo [04:46] satori_: I think with HTML5 canvas tag, and websockets, anything is no possible in browser [04:46] satori_: *now [04:46] maqr: oh, is that how they're doing it? [04:46] satori_: I assume so [04:46] maqr: that's super awesome [04:46] satori_: Haven't looked into it [04:46] derferman has left the channel [04:47] mtodd has joined the channel [04:49] _announcer: Twitter: "Understanding node.js » Debuggable Ltd http://goo.gl/fb/fdkFS #javascript #programming #webdev" -- Delicious Over 50. http://twitter.com/readelicious/status/19229261579 [04:50] rgl has joined the channel [04:57] Yuffster has joined the channel [05:00] _announcer: Twitter: "For long-running function, NodeJS not wait on the thread it and walked to the next request. http://ow.ly/2eP7j" [id] -- Teman Macet. http://twitter.com/temanmacet/status/19229863225 [05:05] jbrantly has joined the channel [05:07] bpot has joined the channel [05:12] softdrink: anyone having trouble with npm? I'm getting a TypeError whenever i do anything with it. fresh install. [05:15] Neil has joined the channel [05:19] softdrink: nm, just had to search a little farther [05:23] keyvan has joined the channel [05:27] mw_ has joined the channel [05:33] _announcer: Twitter: "I'm such a techie. Using github to update Node.js Knockout site: http://nodeknockout.com/" -- Elizabeth Cha. http://twitter.com/elizabethcha/status/19231687001 [05:38] tekky has joined the channel [05:38] mischievious has joined the channel [05:39] JimBastard: !tweet @elizabetcha you killing it! go node! [05:40] _announcer: Twitter: "about to put first node.js server into production. what a great tool! #nodejs" -- mainsocial. http://twitter.com/mainsocial/status/19232081263 [05:41] SubStack: satori_: most vms have vnc backends is how [05:42] SubStack: also node-bufferlist makes the rfb parser awesome [05:42] satori_: :) [05:46] maqr: btw, inotifywait is the program on linux for file watching, if anyone was wondering [05:47] _announcer: Twitter: "@drewfarris That would be awesome! I wonder how much Ozzie would charge to read a Node.js script." -- PeepCode. http://twitter.com/peepcode/status/19232404907 [05:48] satori_: maqr: I don't know much about inotify, but why won't node's file watchers suit your purpose? [05:48] bradleymeck1 has joined the channel [05:49] maqr: satori_: they will, i'm just surprised that it's not a super common problem with a neat unix tool for solving it [05:50] satori_: k [05:50] JimBastard: !tweet @mainsocial yaaa man! node.js owns! [05:50] JimBastard: twitter attack [05:51] maqr: who's that? [05:51] JimBastard: its the name of my new indie rock group [05:52] maqr: srsly? [05:52] satori_: lol [05:53] _announcer: Twitter: "Latest Adobe News - An Introduction To NodeJS, A JavaScript-Based Server http://bit.ly/d5bCqX" -- tony murphy. http://twitter.com/spoton468/status/19232713283 [05:53] maqr: adobe, eh? [05:53] satori_: Wow. node is even converting the cold fusion crowd. [05:54] maqr: there's still a cold fusion crowd? [05:54] satori_: Yeah. he just tweeted [05:54] satori_: :P [05:54] JimBastard: cold fusion was awesome [05:54] maqr: oh i see what you did there [05:54] JimBastard: and then they never open sourced it [05:54] JimBastard: and railo came 4 years too late [05:55] maqr: i thought adobe's whole point of buying it was to kill it [05:55] maqr: like everything else they've ever bought [05:55] JimBastard: too much money [05:55] JimBastard: CF sells copies [05:55] maqr: surprising [05:56] bradleymeck1: adobe is to programming as...? [05:57] JimBastard: i could probably sit down and write a full featured web application in CF in like 1500 lines and 2 days [05:57] JimBastard: make the orm in like 50 lines [05:57] bradleymeck1: w/e pdf is the worst format ive seen in an actual spec in forever [05:57] JimBastard: fucking rails [05:58] bradleymeck1: as we say that they are starting to say "fucking node" heh [05:58] JimBastard: :-D [05:58] JimBastard: i smash rails fanboys with the noob hammer [05:58] JimBastard: there will be none of that hubris shit in this house [05:59] bradleymeck1: i pref rails to django, if only cause django tends to be harder than my grandfathers computer to debug wtf just happened [06:00] JimBastard: yeah, node apps are gonna be way easier to roll [06:00] SubStack: poor ruby, having its good name besmirched by the trainwreck that is rails [06:00] JimBastard: SubStack ruby is a pretty language [06:00] SubStack: JimBastard: agree [06:00] JimBastard: but the jabascripts run in the browser [06:00] JimBastard: :-\ [06:01] SubStack: No results found for "rails is a trainwreck". [06:02] bradleymeck1: ruby is possibly the nicest language ive seen to read, but to code it can tie you up in a mistake that lets good ole ruby keep on chuggin [06:03] satori_: ruby is a programming language? I thought it was a religion or something. [06:03] bradleymeck1: should we get the ruby interpreter running in node? or would that be sacrilege? [06:03] SubStack: Nice to read but hard to write? Usually the opposite claim is made. [06:04] SubStack: write a ruby interpreter in node [06:04] bradleymeck1: i tried to learn it, college prof was googoo over ruby, i could read stuff he wrote, but never could write it worth a darn [06:04] SubStack: probably it'll be faster [06:04] SubStack: :p [06:04] bradleymeck1: i would much rather use the C++ interface to the real one [06:05] bradleymeck1: is there any reason it is soo slow anyway? i mean i dont see any glaring semantics that enforce slow behaviour like arguments in js [06:05] SubStack: I like how haskell has influenced ruby over the past few years [06:05] SubStack: if only it had started out with proper lazy lists [06:06] SubStack: bradleymeck1: mostly I think it's because people are still using 1.8 when 1.9 fixes a lot of the speed issues [06:06] JimBastard: in time, all languages will compile to a shared vm and pretty much be the exact same speed [06:06] JimBastard: or people will design vm's to work on arbitrary languages [06:06] SubStack: advocating parrot eh? [06:07] JimBastard: no idea what that is [06:07] satori_: hmmm.... or .NET [06:07] SubStack: jvm then? [06:07] JimBastard: helllllll no [06:07] satori_: exactly [06:07] muhqu has joined the channel [06:07] bradleymeck1: llvm? [06:08] bradleymeck1: jvm runs on sparc chips like nitro but i think those are biased [06:09] bradleymeck1: interesting that ruby does arith soo much better than v8, but then again JS is all doubles no real ints :( [06:10] satori_: http://github.com/jhs/bigdecimal.js does now. (maybe?) [06:11] _announcer: Twitter: "Multi-Core HTTP Server with NodeJS http://icio.us/35bgbv" -- Dan. http://twitter.com/shinylightdev/status/19233610967 [06:14] bradleymeck1: interesting but still doesnt save me computation time when i just want to do an increment :( [06:14] maqr: can someone elaborate on this concept of the 'tick' for me? the docs don't explain it that well, and i'm a little lost [06:15] satori_: A 'tick' is one iteration of the event loop. [06:15] maqr: so when i use sync functions, it blocks more ticks until those functions complete? [06:15] satori_: so process.nextTick() will run your function on the next go around the loop. A bit like setTimeout(function(){}, 0) but more effient [06:15] maqr: yeah, that's what the docs said [06:16] satori_: you should steer clear of sync functions unless it's during your applications setup phase [06:16] maqr: satori_: yeah, it is, i'm just trying to understand how they work, this isn't going on a web app [06:16] maqr: i actually need blocking here [06:16] satori_: fair enough. [06:17] bradleymeck1: sync operations should only be used if the program cannot progress past that function, or if you are doing data manip (see previous) [06:17] maqr: it's going to be watching my files and running the compiler, but i want it to 'lock' when the compiler is running [06:17] maqr: yeah, that's the case [06:18] satori_: Cant you use events to notify you when compiling is done? (or started?) [06:18] maqr: yeah, i could do that [06:19] maqr: is that just implicitly better somehow? even if they have to run sequentially? [06:19] maqr: are sync functions going to be deprecated? [06:19] satori_: It's just the node way :P [06:19] bradleymeck1: yes, the event loop wont be eating up nearly as much cpu [06:19] maqr: ok then, i'll do that [06:19] satori_: sync functions and node are dangerous for newbs is all [06:19] maqr: haha, thanks [06:20] bradleymeck1: plus cpu can go into idle if all that it is doing is waiting on events, or yield to another process (does node autoyield?) [06:20] javajunky has joined the channel [06:20] maqr: we'll just assume so, that's so many layers away from me [06:20] mjr_: I sort of wonder why we have sync functions. [06:21] _announcer: Twitter: "#reddit why you should be hashing your passwords. bonus: node.js sample code!: submitted by JimBastard [li... http://bit.ly/aK1BCr #rulez" -- REDDITSPAMMOR. http://twitter.com/REDDITSPAMMOR/status/19234084385 [06:21] satori_: They can be useful for cleaner code relating to startup functions. That is about the only use case I implement [06:21] bradleymeck1: mjr_ for data manipulation! [06:21] JimBastard: lol round two [06:22] maqr: poor JimBastard, that bot hates him :/ [06:22] wang has joined the channel [06:22] bradleymeck1: lol [06:22] bradleymeck1: you encrypted your comment? [06:22] maqr: satori_: well, i'll just write it async then, either way isn't that bad [06:22] aliem has joined the channel [06:22] _announcer: Twitter: "Node.js probably the most HOT in Internet programming, check this http://yhoo.it/cDnn2z awsomeness" [ms] -- Ariel. http://twitter.com/chazzuka/status/19234145201 [06:23] mjr_: I sure love data manipulation. [06:23] satori_: Who doesn't? [06:23] satori_: Give me a box of bits, and I'll manipulate happily all day. [06:23] bradleymeck1: if only we could get vector computation on JS arrays through the gpu... [06:24] maqr: bradleymeck1: can't you with cuda now? [06:24] maqr: i thought nvidia released something fo rthat [06:24] maqr: *for that [06:24] bradleymeck1: not in JS :( [06:24] satori_: that would be way cool. node-cuda [06:24] maqr: http://mozillalabs.com/jetpack/2010/01/25/elevating-javascript-performance-through-gpu-power/ [06:24] maqr: yeah, apparently you can [06:24] mjr_: I thought somebody was doing a node Grand Central thing. [06:25] bradleymeck1: thats not straight js though, Jetpack is an extension to the JS engine itself [06:26] satori_: does that matter? node would have to do the same to support CUDA [06:26] maqr: well, obviously it would have to be extended... someone has to write the C [06:26] bradleymeck1: its not just that, its the ability to pull out js functions and get the CUDA from the parse tree [06:27] micheil has joined the channel [06:28] bradleymeck1: not to mention you must do it at compile time since types can falsify number based indices now [06:28] maqr: ok, you're officially beyond me :) [06:28] satori_: me too :P [06:29] bradleymeck1: the examples given assume that the array is being populated like a normal array ie arr[0] goes to arr*+0, in ecma5 arr[0] can actually point to a different mem location [06:29] bradleymeck1: through proxies and Object.defineProperty [06:29] satori_: ahhh. I see what you mean [06:30] JimBastard: im pretty sure we are gonna release a full featured http reverse proxy in the next few days [06:31] akahn has joined the channel [06:31] bradleymeck1: nice [06:31] JimBastard: :-) a small piece of the broodmother [06:32] bradleymeck1: if they took off the result array and only had the input array available, made it spew out an event rather than continuation, might be able to fudge it if we had a js disassembler. [06:34] bradleymeck1: not too sure why the need for the loop too... maybe cuda requires the loop structure be declared explicitly somehow? does anyone know cuda well enough? [06:35] bradleymeck1: wait a minute... [06:36] _announcer: Twitter: "Use node.js production: Following my article on Web development with node.js, I am interested in ... http://bit.ly/9q84ml" [fr] -- Vincent RABAH. http://twitter.com/itwars/status/19234785581 [06:36] bradleymeck1: thats almost exactly like an async array.forEach... i was wondering why forEach was so fast in benches, maybe that is why? but then i wish it was async so i would know the cpu is spinlooping... mmm will investigate tomorrow, sleep now [06:36] bradleymeck1 has left the channel [06:40] V1 has joined the channel [06:42] benburkert has joined the channel [06:44] Validatorian: isaacs_home: You around? [06:44] maqr: so how does fs.readdir say it's async, but it doesn't offer a listener? [06:44] benburkert has joined the channel [06:46] chrischris has joined the channel [06:47] maqr: oh well, it seems to work just fine, but i don't know if i'd call it any more async than the sync version [06:47] satori_: maqr: because the last arg is a callback [06:48] satori_: if you omit it it will be sync [06:48] maqr: satori_: but it doesn't emit anything [06:48] satori_: doesn'y have to, it just calls the provided callback function when done [06:48] maqr: ohhh [06:48] maqr: i was looking at it wrong :) [06:48] maqr: got it now, thanks [06:48] satori_: if an error occurred the 1st callback arg will be the error [06:48] maqr: yeah, that makes sense now [06:51] muhqu_ has joined the channel [06:52] teemow has joined the channel [06:56] _announcer: Twitter: ""With current NodeJS builds, the practical limits of a single CPU acting as an HTTP proxy are around 2100 reqs/s for a 2.5GHz Intel Xeon."" -- Arvis Zeile. http://twitter.com/a_z_e/status/19235677553 [06:56] maqr: neat [06:59] lachlanhardy has joined the channel [07:01] MattJ has joined the channel [07:05] pdelgallego has joined the channel [07:10] fictorial has joined the channel [07:18] eely has joined the channel [07:22] javajunky has joined the channel [07:27] V1 has joined the channel [07:28] ryah has joined the channel [07:30] shockie has joined the channel [07:32] eely has joined the channel [07:37] virtuo has joined the channel [07:45] jansc has joined the channel [07:50] romainhuet has joined the channel [07:50] aliem has joined the channel [07:51] hojberg has joined the channel [07:53] eely has joined the channel [07:57] mitkok has joined the channel [08:09] bvleur has joined the channel [08:10] SamuraiJack has joined the channel [08:16] Neil has joined the channel [08:19] TomY has joined the channel [08:25] Lazesharp has joined the channel [08:27] _announcer: Twitter: "Are there any comparisons between Python reliable performance, PHP and NodeJS?" [fr] -- Nicolas Froidure. http://twitter.com/nfroidure/status/19239541768 [08:27] Blink7 has joined the channel [08:30] _announcer: Twitter: "@nfroidure ouais, "fanboybench" : Node.js > Python > PHP ;-)" -- Thomas Parisot. http://twitter.com/oncletom/status/19239681501 [08:31] akahn has joined the channel [08:34] ryah has joined the channel [08:37] _api has joined the channel [08:37] caolanm has joined the channel [08:41] _announcer: Twitter: "@ Oncletom so you're NodeJS think is good? At the same time, I must confess that it is tempting to dive into it." [fr] -- Nicolas Froidure. http://twitter.com/nfroidure/status/19240122800 [08:45] robinduckett has joined the channel [08:45] xla has joined the channel [08:46] WarBot has joined the channel [08:46] sh1mmer has joined the channel [08:46] mape: hmm [08:46] panosru has joined the channel [08:46] mape: strange [08:46] robinduckett: ? [08:46] mape: nah the wargamez was broke [08:47] WarBot has joined the channel [08:47] mscdex: :O [08:49] V1: Oo well this was certainly unexpected. [08:49] mape: man they sure do have quite a bit of judges on the knockout [08:54] V1: I don't have time to enter the knockout :9 I have this amazing idea.. That would totally be suitable and do-able in 48 hours.. But i can't enter :9 [08:55] markwubben has joined the channel [08:55] mape: Then you should share it with someone who can [08:55] mape: if you want to see it done [08:57] skampler: bazinga [08:57] robinduckett: I was signed up but I can't think of anything good :( [08:57] robinduckett: / my idea was crap [08:57] robinduckett: brb [08:58] mAritz has joined the channel [08:59] V1: mape: I'm going to create it anyways after my memcached library is completed [09:01] hdon has joined the channel [09:04] _announcer: Twitter: "The module # # Webworker nodejs we discussed yesterday: http://github.com/pgriess/node-webworker" [fr] -- Vincent Voyer. http://twitter.com/zeroload/status/19241063730 [09:07] mape: V1: ah k [09:08] maushu has joined the channel [09:14] _announcer: Twitter: "@ Nfroidure you could, but with fastcgi. But you can also do all your code in Node.js" [fr] -- Thomas Parisot. http://twitter.com/oncletom/status/19241479423 [09:15] mscdex: so for node knockout, it has to be a web project? [09:15] _announcer: Twitter: "@ Zeroload interest? Node.js use on a multi-proc?" [fr] -- jpvincent. http://twitter.com/theystolemynick/status/19241518763 [09:17] romainhuet has joined the channel [09:20] markwubben has joined the channel [09:21] _announcer: Twitter: "http://tinyurl.com/2aklbp7 Understanding node.js » Debuggable Ltd" -- so_white. http://twitter.com/so_white/status/19241764593 [09:26] Ori_P has joined the channel [09:31] V1: mscdex: It does not has to be a web project [09:31] satori_: but they recommend it. [09:32] satori_: too hard to judge pure backend stuff. [09:35] ryan[WIN]: oh man [09:35] ryan[WIN]: 4chan /b is putting on a fake show about how wholesome they are [09:35] ryan[WIN]: changed color scheme [09:35] _announcer: Twitter: "@ Nfroidure and switch PHP NodeJS, finally, when it will be stable version ready for the product." [fr] -- Nicolas Froidure. http://twitter.com/nfroidure/status/19242355283 [09:35] ryan[WIN]: have a whole bunch of mods + rules of posting [09:35] ryan[WIN]: because in a few minute good morning america is goig to run a story about how bad 4chan is [09:35] dnyy: ryan[WIN]: lol at the background music [09:35] ryan[WIN]: and this is going to be an epic troll [09:35] robinduckett: pointless meeting of the day done [09:36] Lazesharp: anyone know what timezone ryah is in? [09:39] _announcer: Twitter: "Yahoo is showing interest for #nodejs: Multi-core HTTP server with nodejs : http://youtu.be/qDUHJNVjpS0" -- Javier Loriente. http://twitter.com/JavierLoriente/status/19242539711 [09:41] _announcer: Twitter: "# # Nodejs WebSocket with fallback flash / long Pollin: http://github.com/LearnBoost/Socket.IO" [fr] -- Vincent Voyer. http://twitter.com/zeroload/status/19242604654 [09:42] V1: analyze his commit time stamps Lazesharp ;D [09:43] Ori_P has joined the channel [09:44] hellp has joined the channel [09:44] maushu: This is what I was talking yesterday: http://news.ycombinator.com/item?id=1535176 [09:50] mAritz: http://github.com/maritz/nohm okay, tell me how stupid I am. :) [09:50] mAritz: (your chance maushu!) [09:53] mAritz: maushu: look at reddit for an example how opensource doesn't mean that you'll run out of business. what should set you apart from others isn't code but content, community and service. [09:54] maushu: mAritz: You are stupid. [09:54] mAritz: oh yes, HARDER! [09:54] maushu: What if the code is the content? [09:55] mAritz: so this is about a page to sell code? [09:55] robinduckett: manveru [09:55] robinduckett: *mAritz [09:55] robinduckett: Two words [09:55] robinduckett: Reddit Gold [09:55] robinduckett: They can go and fuck themselves [09:56] robinduckett: What started with donations has ended in subscription based services and they are being arrogant about it. [09:56] mAritz: robinduckett: it's a glorified beta program. and people asked for it [09:57] maushu: mAritz: No, it's a page that uses code as the content. [09:57] robinduckett: Plus, Reddit has a pretty big firm backing them (Conde Nast), and yet they can't afford new hires? Then obviously something is wrong with their advertising based business model. [09:57] maushu: SaaS [09:57] robinduckett: mAritz: If I wanted beta shit, I would run their code on my servers [09:57] robinduckett: I don't because I don't want python based web frameworks polluting my shit. [09:57] mAritz: robinduckett: have you ever seen annoying ads on reddit? they are not in the business to make huge profits, which is fine if you ask me :) [09:58] robinduckett: mAritz: I run without Ad block, so yeah, I have seen annoying ads. [09:58] mAritz: on reddit? :o [09:58] robinduckett: Infact, every time I see that "reddit would like to thank you for not using Ad block", I get a little bit angrier. [09:59] mAritz: okay, maybe you have anger issues? :P [09:59] ryan[WIN]: reddit gold isn't a subscription [09:59] ryan[WIN]: in the sense that you get some special site that isn't available to free users [09:59] ryan[WIN]: you just get early beta tests and crap [10:00] mAritz: ryan[WIN]: exactly. and that's pretty much what people asked for. but you can't make it right. someone will always complain. [10:00] ryan[WIN]: of course [10:01] mAritz: like people with anger issues. *duck'n'run* :D [10:01] robinduckett: I don't even want the beta features [10:01] mAritz: so what is the problem? :D [10:01] robinduckett: I never even thought "that would be a good idea, I want to see my top voted comments". [10:01] tisba has joined the channel [10:02] robinduckett: The problem is they are introducing a caste system to what was otherwise a perfectly good seperation of time/karma based status. [10:02] tisba has joined the channel [10:03] satori_: Does it matter anyway? If they fuck it up, it just creates an opportunity for someone else to come along and do it better. [10:03] robinduckett: yeah, do it better as in not base your framework on python and then complain about needing donations for scaling. [10:04] satori_: I don't understand why a corporation is asking for donations anyway [10:04] robinduckett: EXACTLY. [10:05] robinduckett: Let me look up how much money Conde Nast makes [10:07] robinduckett: oh my god [10:07] robinduckett: those mother fuckers own Wired [10:08] mAritz: they share an office [10:08] mAritz: reddit and wired [10:08] robinduckett: and Conde Nast owns both, your point? [10:09] mAritz: conde nast doesn't care?! why should they. as i said: reddit isn't in the business to make huge profits. -.- [10:09] mscdex: V1: that's what it says on the website [10:09] satori_: So they are altruistic web developers? [10:09] robinduckett: bullshit [10:09] satori_: ACTION is suspicious. [10:10] V1: mscdex: it says: "If an app is not a website, but some library, utility, or desktop program, then it must be deployed to the npm registry." [10:10] blackdog has joined the channel [10:10] mscdex: V1: where is that at? [10:10] V1: http://nodeknockout.com/faq [10:11] SubStack: noe knockout? [10:11] mscdex: bah [10:11] mscdex: why does it have to be deployed via npm.... [10:11] mscdex: ;\ [10:11] V1: sponsor -_- [10:12] robinduckett: Actually can't find any details on Conde Nast's revenues without paying for it [10:12] mscdex: oh well [10:12] robinduckett: in the UK that kind of info is freely accessable [10:12] robinduckett: ah well [10:12] mscdex: i wouldn't have anything worthwhile anyway [10:12] quirkey has joined the channel [10:13] Fib has joined the channel [10:18] maushu: Just received a call from the bank. [10:18] maushu: No merchant account for me. [10:18] Fib: I just did a pull and I am having this issue: http://github.com/ry/node/issues/issue/41 [10:19] maushu: Time for plan B. [10:19] jonathantaylor has joined the channel [10:20] maushu: Fib: That issue is fixed. :p [10:22] Fib: Not for me :( [10:23] V1: Hmz [10:24] V1: fs.readFile's data gives an error when I do a data.toString() ;! [10:24] V1: case '%d': return args[i++].toString(); <-- Cannot call method 'toString' of undefined [10:25] robinduckett: V1 [10:25] matclayton has joined the channel [10:25] V1: hi there [10:25] robinduckett: do a inspect of args[i] :P [10:25] javajunky: um, what does args.length say, and compare that to the value of i at that point ? [10:25] V1: robinduckett: the error is in node.js it self [10:25] robinduckett: rly? :P [10:26] V1: ya rly [10:26] robinduckett: cus I've got a data.toString() [10:26] javajunky: k, point still holds, fire up the debugger and see what the value of i is ? [10:26] javajunky: (and args) [10:26] robinduckett: in a readFile [10:26] maushu has joined the channel [10:26] matclayton: hey guys trying to get node.js installed seeing nothing but errors on the make command, hoping someone can take a look http://dpaste.com/220801/ this is on OSX 10.6.3 [10:27] V1: oooooooooooooooh! [10:27] V1: It's an issue with console [10:27] matclayton: any ideas what this aerror is about? [10:27] V1: The error leads to: http://github.com/ry/node/blob/master/src/node.js#L201 [10:28] propAWAY has joined the channel [10:28] V1: so, nvm ;$ [10:28] javajunky: even so, might be worth writing up a repro case ? [10:29] markwubben_ has joined the channel [10:30] V1: ofc, :) [10:31] akahn has joined the channel [10:31] V1: But I might as well just patch it while I'm at it. [10:32] robinduckett: matclayton: looks like a scons error, you got python installed? [10:32] matclayton: yeah, [10:32] matclayton: I'm mainly a python dev..... so its certainly installed :) [10:33] maushu: matclayton: Blasphemy. [10:34] matclayton: lol, [10:34] Neil has joined the channel [10:35] devtime has joined the channel [10:36] matclayton: no ideas then, this is a fairly fresh 2.6.1 install of python [10:46] mscdex: say no more say no more say no more. 2.6.1? say no more! [10:46] mscdex: :-D [10:49] robinduckett: FUCK centos php5 :( [10:49] robinduckett: Package matching php-common-5.1.6-27.el5.i386 already installed. [10:49] robinduckett: Missing Dependency: php-common = 5.1.6-27.el5 is needed by package php-gd-5.1.6-27.el5.i386 [10:49] robinduckett: Am I not reading this right? [10:49] robinduckett: I must be a retard [10:49] robinduckett: ACTION dances around acting stupid [10:51] V1: DEAR GOD streams in node.js suck balls [10:51] _announcer: Twitter: "I've decided to take the plunge. I'm not sure if you'll hear from me for a while. I'm learning #nodejs, #expressjs, and #mongobd" -- Daniel Erickson. http://twitter.com/TechWraith/status/19245667974 [10:52] maushu: V1: Wut. [10:53] V1: I'm creating a memcached client for node and i'm working with the netStream to receive and parse data [10:54] V1: But when the memcached server sends a large chunk of data, the "data" listener gets called multiple times [10:54] V1: I'm okay with that.. [10:54] V1: But when you exec multiple commands on the stream. It combines those responses in to one data response [10:54] V1: if they are small requests [10:55] V1: So what I need to to parse it properly is, create a buffer that will buffer the buffer.. [10:56] V1: so BLEH@ [10:56] V1: 50% rewrite of my parser because node does silly things with the stream [10:56] robinduckett: V1 [10:56] V1: hi. [10:56] mscdex: robinduckett: i have both of php5 and the gd library installed on my centos vm... [10:56] robinduckett: I have done buffering of buffers [10:56] SubStack: ACTION plus bufferlist [10:57] SubStack: s/plus/plugs/ [10:57] SubStack: curse this keyboard [10:57] mscdex: heh [10:57] SubStack: and it's only an npm install away! [10:57] _mythz has joined the channel [10:58] robinduckett: npm doesn't work on my local box [10:58] robinduckett: all sorts of errors [10:58] robinduckett: probably because i installed it as root [10:58] robinduckett: and now I can't figure how to uninstall it [10:58] SubStack: isaacs just fixed a ton of stuff very recently [10:59] robinduckett: mscdex: yeah apparently I don't have php-common-5.1.6-27.el5.i386 installed, even though I do. [10:59] robinduckett: i'm hoping a yum update / yum upgrade will fix my problems [11:02] mscdex: sounds yummy [11:10] eee_c has joined the channel [11:12] Ori_P has joined the channel [11:18] bvleur: What's the easiest way to construct the request body for a HTTP POST from an javascript object? [11:23] fermion has joined the channel [11:24] bvleur: Ah.. think I found it: querystring.stringify .. Can't figure out why I overlooked it [11:25] aliem_ has joined the channel [11:28] derferman has joined the channel [11:29] chilts: pkrumins: congrats. on the startup :) [11:30] chilts: hope it all goes well [11:30] pkrumins: thank you! [11:31] chilts: lots of cool node stuff you've released ... I'll have to take a look through tomorrow (now my bedtime) :) [11:31] SubStack: ^_^ [11:31] markwubben has joined the channel [11:31] Fib: Ok, it looks like it's because I moved my checkout from ~/coding to ~/src at some point in the past [11:32] Fib: It's still looking for the config.h in ~/coding [11:34] Fib: but why :( [11:34] evilhackerdude: umm, i'm kind of confused here. is there a global log function in node? [11:35] shockie has joined the channel [11:35] _announcer: Twitter: "After long-running function is completed at execution, the callback function will execute NodeJS http://ow.ly/2eP7K" [id] -- Teman Macet. http://twitter.com/temanmacet/status/19247746207 [11:35] V1: console.log <-- evilhackerdude [11:37] evilhackerdude: V1: i'm using log() in a global context though i havent defined it myself [11:37] fdmanana has joined the channel [11:38] evilhackerdude: log == function (msg) { exports.puts(timestamp() + ' - ' + msg.toString()); } [11:38] evilhackerdude: i don't get it [11:39] TomY has joined the channel [11:40] evilhackerdude: maybe its part of websocket-server... [11:42] evilhackerdude: indeed, websocket-server sets sys.log in active/package/utils/logger.js [11:44] eely has joined the channel [11:45] _announcer: Twitter: "nodeJS, but on the server side javascript .." [id] -- Maaz Yagami. http://twitter.com/MrMaaz/status/19248260231 [11:45] mape: 4 teams left on the node knockout [11:47] omarkj has joined the channel [11:50] V1: that aint much [11:50] V1: You entering? [11:51] mape: jup [11:51] _announcer: Twitter: "node-inspector looking good: debug node code in webkit browsers http://github.com/dannycoates/node-inspector #nodejs" -- Francisco Treacy. http://twitter.com/frank06/status/19248586921 [11:52] dnolen_ has joined the channel [11:53] aheckmann has joined the channel [11:55] ditesh|cassini has joined the channel [11:56] phiggins has joined the channel [11:59] V1: mape: Do you know if the hosting for node-knockout that is provided by Heroku will include addons? [11:59] mape: addons? [12:00] V1: ehttp://addons.heroku.com/ [12:00] V1: http://addons.heroku.com/ * [12:00] mape: if you need shell access you will get a joyent vps from what I gathered [12:00] mape: Oh, no idea about heroku, never used it/don't see myself using it in the future [12:00] V1: the mongo db addon "free" is only 16mb of storage :$\\ [12:01] V1: I can fill that up in a matter of minutes ;D [12:01] mape: yeah, would prefer to use my own server but I guess it makes a lot of sence for them to have everyone host it on the same kinda server [12:02] mape: easier to judge [12:02] V1: probably [12:02] _announcer: Twitter: "@Shreedhan Firebug vs. Webkit Inspector, Node.js vs Rails - people shouldn't advise others against things they don't understand." -- Ryan Townsend. http://twitter.com/RyanTownsend/status/19249193924 [12:05] V1: Team speedo signed up for node-knockout ^_^ [12:05] V1: Decided to take a few days off ;p [12:11] mAritz: i had a fun idea for the knockout: a game where you get have something to make different sounds (to form music) like http://lab.andre-michelle.com/tonematrix just not with flash. that's the practice mode. real game: you get assigned a random stranger and only he's hearing what you play (you don't) and he's playing something that only you can hear. after a minute or two you get to judge the other guy and he judges you. giving points and [12:11] tmedema has joined the channel [12:25] voodootikigod_ has joined the channel [12:30] kriszyp has joined the channel [12:31] akahn has joined the channel [12:33] rsms has joined the channel [12:34] mape: mAritz: that is really cool [12:34] mAritz: yeah, now code it for me! [12:34] mAritz: :D [12:36] maushu: mAritz: Boring. [12:36] mAritz: maushu: at least it's better than a twitter bot [12:36] mAritz: BAM [12:36] mape: hah [12:36] mAritz: ^^ [12:36] maushu: Not is isn't. [12:36] mAritz: YES IT IS! [12:36] maushu: The twitter bot is more useful. [12:37] mape: but it isn't better then a twitter bot/twitter/gogole maps mashup! [12:37] mape: ajax 2.0 in ya face! [12:37] mAritz: ajax 2.0 = websocket ?! [12:37] mAritz: :P [12:39] mape: Just more performant [12:40] pgriess has joined the channel [12:42] _announcer: Twitter: "Team #speedo is searching hackers for #nodejs #nodeknockout PM me if interested. #webuildonbeerandpizza" -- Arnout Kazemier. http://twitter.com/3rdEden/status/19251480527 [12:42] qschzt has joined the channel [12:43] V1: team speedo FTW@ [12:43] _announcer: Twitter: "7 reasons to switch from Ruby/Sinatra to Node.js: http://bit.ly/aDCiOS" -- Nico Hagenburger. http://twitter.com/Hagenburger/status/19251575786 [12:44] maushu: Please don't link me to heroku. It makes me a sad panda. [12:47] mitkok has joined the channel [12:48] markwubben has joined the channel [12:50] markwubben_ has joined the channel [12:51] V1: Mr sad panda, heroku does offer bamboo packages [12:51] V1: Badious Bamboo to be more specific [12:51] _announcer: Twitter: "So far today I have installed and setup MongoDB, node.js and Cassandra, however thrift is being a pain..... ARGH" -- Mat Clayton. http://twitter.com/matclayton/status/19252048017 [12:52] maushu: V1: Now I'm even more sad. [12:52] chrischris has joined the channel [12:52] V1: oh noes :3 [12:52] jherdman has joined the channel [12:53] donspaulding has joined the channel [12:56] _announcer: Twitter: "[Blog] toggleImage.js # js: uupaa.js 0.7 依存. Uu.js uu.query.js + (function () (var toggle_image = function (node) (var ... http://goo.gl/fb/08HOx" [sv] -- c4se Always. http://twitter.com/c4se_always/status/19252342610 [12:57] chrischris has joined the channel [12:57] jetienne has joined the channel [13:01] mAritz: v1: what's team speedo gonna do? swimsuits and glasses? :D [13:02] davidsklar has joined the channel [13:03] ben_alman has joined the channel [13:07] V1: Node is going to calculate if you look good in a speedo [13:08] V1: so all i got to do is: res.end("no") [13:08] _announcer: Twitter: "@ @ Davidgueye Petit_Nuage attention, the JS is not always executed by the client. Node.js is a server written in JS http://nodejs.org" [fr] -- Pierre de La Celle. http://twitter.com/pierredelacelle/status/19253134679 [13:09] V1: Naw I'm actually going to build realtime analytics software for developers [13:09] V1: ;D [13:11] hoodow has joined the channel [13:16] _announcer: Twitter: "@ @ Davidgueye Petit_Nuage the JS server side also has a bright future with tools like node.js http://bit.ly/braRrW" [fr] -- Pierre de La Celle. http://twitter.com/pierredelacelle/status/19253611870 [13:17] markwubben_ has joined the channel [13:17] liesen has joined the channel [13:18] zapnap has joined the channel [13:18] markwubben_ has joined the channel [13:19] donspaulding has joined the channel [13:20] bradleymeck1 has joined the channel [13:21] mAritz: V1: sounds booooring :/ [13:22] _announcer: Twitter: "@ Pierredelacelle Node.js I know, it's really great for web app. is a great tutorial net.tutsplus.com." [fr] -- Janssens Gaëtan. http://twitter.com/Petit_Nuage/status/19254019159 [13:25] ChrisRicca has joined the channel [13:25] _announcer: Twitter: "An Introduction To NodeJS, A JavaScript-Based Server http://blog.alagad.com/2010/07/21/an-introduction-to-nodejs-a-javascript-based-server/" -- Aneesha Bakharia. http://twitter.com/aneesha/status/19254231006 [13:27] proppy: nice geonode ! [13:27] TrisMcC has joined the channel [13:27] pgriess has joined the channel [13:27] proppy: but it seems to miss a package.json [13:27] proppy: is that package.json all npm needs to be able to install a package ? [13:29] V1: thanks mAritz [13:29] V1 has left the channel [13:30] V1 has joined the channel [13:32] Neil__ has joined the channel [13:34] siculars has joined the channel [13:34] tbassetto has joined the channel [13:36] _announcer: Twitter: "Sencha Touch + Riak + node.js = Widescript" -- Jeroen van Duffelen. http://twitter.com/jeroenvduffelen/status/19254926856 [13:37] sveisvei has joined the channel [13:42] mape: V1: like getclicky/hummingbird ? [13:44] aliem has joined the channel [13:45] _announcer: Twitter: "Woohoo, lunchtime blitz means new much simplified version of connect-auth is released for #node.js #connect http://bit.ly/aQXFNa" -- Ciaran Jessup. http://twitter.com/ciaran_j/status/19255585562 [13:46] V1: mape: those are all focused on sales. Nothing development related [13:46] hojberg has joined the channel [13:46] mape: What kinda stats do you mean? Like browser usage and whatnot? [13:48] V1: Performance stats, backend + front end, which browsers support what features. what git updated produced that performance spike.. Howmany users are we server. Howmany javascript error occured etc etc [13:49] mape: Ah k, nice [13:49] davidwalsh has joined the channel [13:49] mape: memory usage of the app and whatnot as well? [13:49] maushu: All hail teh stats. [13:50] V1: What i would like to know for example, what percentage of our current users can actually use HTML5 storage [13:50] V1: There are no stats for that what so ever [13:50] V1: and memory usage would be more than welcome indeed [13:52] akahn has joined the channel [13:53] steadicat has joined the channel [13:53] aliem_ has joined the channel [13:54] Tyler has joined the channel [13:57] proppy: is there a node wrapper for jslint ? [13:57] proppy: npm list | grep lint yes :) [14:00] mw_ has joined the channel [14:02] _announcer: Twitter: "@ciaran_j hope that makes up for PM'ing / Arch'ing the rest of the day. Your productivity always amazes. Must try Node.js one day" -- Ia n Mos. http://twitter.com/oceanician/status/19256789585 [14:03] bradleymeck1: client side memory use is not going to work from js, you cant get a hold of that directly from JS so unless you want to do some funky stuff w/ npapi, just say no to drugs [14:04] TobiasFar has joined the channel [14:04] _announcer: Twitter: "@oceanician yeah take a look at node.js, on your mac its easy to dive in, there's cygwin stuff for the window boxes too ;)" -- Ciaran Jessup. http://twitter.com/ciaran_j/status/19256894535 [14:09] Lazesharp_ has joined the channel [14:13] zaach has joined the channel [14:14] ntelford_ has joined the channel [14:17] proppy: How do you export a var from a js file ? [14:17] proppy: for it to be visible after require() [14:17] SubStack: exports.cats = 'meow' [14:18] behmann has joined the channel [14:19] maushu: proppy: The exports variable is the variable that you get from require. [14:20] maushu: Following SubStack idea: var lol = require('stuff'); sys.puts(lol.cats); // -> Prints "meow". [14:20] quirkey has joined the channel [14:20] maushu: That reminds me. [14:21] maushu: SubStack: http://news.ycombinator.com/item?id=1535176 [14:21] aliem has joined the channel [14:21] SubStack: I've read it [14:21] proppy: ok [14:21] proppy: nice [14:22] maushu: SubStack: Don't be a communist! HIDE YOUR CODE! [14:22] proppy: SubStack: maushu: thanks a lot [14:22] proppy: can I do exports = { test: 1}; ? [14:22] proppy: or should I keep the originial exports object [14:23] proppy: ? [14:23] maushu: proppy: You can put anything there. [14:24] maushu: Oh wait, you mean changing the variable? Hmmm. [14:24] gf3 has joined the channel [14:24] maushu: It should work. [14:24] proppy: maushu: I know but if I do exports = {} I actually overwrite the previous exports object do I / [14:24] maushu: Let me think. [14:24] proppy: it doesn't work :) [14:25] maushu: Hmmm, yeah, since exports is just a "connection" to another variable that is passed. [14:25] SubStack: maushu: I have some crazy ideas to leverage openness (which are themselves openly available on the wiki) [14:25] proppy: exports = {cats: 'meow'}; [14:25] maushu: If you clear exports you clear the reference and the original variable is still passed. [14:25] maushu: Need to check the source to make sure though. [14:25] proppy: var lol = require('stuff'); console.log(lol.cats) -> undefined [14:25] SubStack: and for now in the early stages, being open wins us lots of eyeballs [14:26] maushu: SubStack: Greedy eyeballs that will steal your code! :o [14:26] SubStack: maushu: you should steal my code just to prove me wrong [14:27] SubStack: besides, right now there's not actually anything good to steal [14:27] proppy: is there a websocket client in node-websocket-server ? [14:27] maushu: Drat. [14:28] proppy: ho there is a websocket-client module in npm [14:30] bradleymeck_ has joined the channel [14:31] softdrink has joined the channel [14:34] paul__ has joined the channel [14:36] ceej has joined the channel [14:36] maushu: JavaScript In The Cloud. [14:37] bradleymeck_: sounds like hell [14:38] maushu: LIES! [14:39] rsms: Hell is probably an eternal bath in a tub full of Java and old Windows C APIs... [14:40] bradleymeck_: good ole rhino give me that, with JS on top! [14:41] bradleymeck_: in the cloud things never seem to work as well as if they were on a machine for me... [14:43] _announcer: Twitter: "Not having much fun playing with node.js and mustache.js think I have overpowered them now though. #feelingstupid" -- MrJaba. http://twitter.com/MrJaba/status/19259700884 [14:43] V1: Is there a easy way to detect if you have created unwanted globals in node? [14:43] evilhackerdude: like... log? ;-) [14:43] evilhackerdude: that was a nasty one [14:43] V1: for example [14:43] bradleymeck_: Object.keys((function(){return this})()) will list your globals [14:44] jherdman: bradleymeck_: hot. i'll have to keep that in mind [14:44] V1: lies. [14:44] V1: :D does't work [14:44] silentrob has joined the channel [14:44] bradleymeck_: it should [14:44] V1: or maybe it's just node-repl [14:44] softdrink1 has joined the channel [14:45] _announcer: Twitter: "Efficiently route NodeJS HTTP requests to workers based on vhost, query parameters, etc without proxying: http://bit.ly/cHK4fI #nodejs" -- Peter Griess. http://twitter.com/pgriess/status/19259852374 [14:45] bradleymeck_: node-repl executes each line in a new context :/ [14:45] bradleymeck_: the global changes technically [14:45] V1: var shizzle = "true"; console.dir( Object.keys((function(){return this})()) ); ===> [] [14:45] V1: also in Node [14:45] JimBastard has joined the channel [14:46] maushu: V1: fo shizzle ma nizzle [14:46] bradleymeck_: mmm odd [14:47] V1: maushu: fo sho m88 [14:47] V1: bradleymeck_: I know :) [14:47] V1: Thats why I asked :p [14:47] bradleymeck_: sec ill fudge up something [14:48] bradleymeck_: var global = (function(){return this}()) for(var i in global) {console.log(i)} [14:48] _announcer: Twitter: "ok... think i/we need to build a node.js based streaming video server to replace using Flash and Flash Media Server" -- Kyle Simpson. http://twitter.com/getify/status/19260091349 [14:48] bradleymeck_: tested :) [14:48] aliem has joined the channel [14:49] bradleymeck_: though that wont catch Object.defineProperty w/ enumerable to false... hmmm [14:50] micheil_away: isn't there an Object.clone( o ) [14:51] hdon has joined the channel [14:51] ryan_gahl has joined the channel [14:51] zapnap has joined the channel [14:51] Yuffster has joined the channel [14:51] bradleymeck_: nope, do you want mine? its a deep copy though so pain for perf [14:52] V1: bradleymeck_: Doesn't work either. :p as my shizzle is still not in the list :p [14:52] ryan_gahl: ryah: ping [14:52] bradleymeck_: my abc was on it... wtf [14:52] bradleymeck_: node or repl? [14:52] micheil_away: bradleymeck_: i generally don't use those things [14:52] _announcer: Twitter: "Starting node.js script as a service : http://is.gd/dBRgz #daemon #nodejs #debian #ubuntu :)" -- Vincent RABAH. http://twitter.com/itwars/status/19260389957 [14:52] bradleymeck_: i try to avoid em [14:52] bradleymeck_: but sometimes you just need a copy :( [14:53] confounds has joined the channel [14:53] zapnap has joined the channel [14:53] bradleymeck_: what about console.log(Object.getOwnPropertyNames((function(){return this}())))? [14:53] micheil_away: bradleymeck_: I just use n extend for option hashs [14:54] JimBastard: !tweet @getify we were talking about the exact same thing last night at the flashcoders meetup. [14:54] V1: bradleymeck_: I'm just in Node now [14:54] bradleymeck_: lol saw getify on tues [14:55] bradleymeck_: are you sure its going to the global (if its in a required module attach it to global not to a sandbox space) [14:55] V1: var shizzle = "true"; var content = "your welcome"; console.log(Object.getOwnPropertyNames((function(){return this}()))) [14:55] bradleymeck_: thats a var its not global [14:55] V1: =+= whoeps [14:55] V1: lol [14:55] V1: I could have sworn i deleted the var >_< [14:56] V1: Thanks anyways :$ [14:56] JimBastard: ITS THE FINAL COUNTDOWN [14:57] charlenopires has joined the channel [14:57] bradleymeck_: DOO DEE DOO DOO [14:58] zapnap has joined the channel [14:58] JimBastard: they asked this morning what the theme song for our standup should be, i definitely nominated final countdown [14:58] _announcer: Twitter: "i'd wager the complexities of a streaming video server are very non-trivial, even with node.js. would take a lot of full-time effort." -- Kyle Simpson. http://twitter.com/getify/status/19260831797 [14:59] JimBastard: !tweet @getify exactly the same sentiment of the flashcoders group :-\ [14:59] mitkok has joined the channel [15:01] bradleymeck_: JimBastard actually the xmlstream you showed can do it for flvs pretty easy if you can find a good writeup of the spec, adobes is missing pages (lol) and lots of errors in code/spelling [15:01] JimBastard: ahahaha [15:01] JimBastard: just need utility, or someone to step up and do it [15:02] bradleymeck_: its basically sending video in 128bit chunks, audio in 64bit chunks and mark what the resource is [15:02] bradleymeck_: but there is something odd about how the data is encapsulated :/ [15:05] JimBastard: i think just streaming is only the tip too [15:05] linkwright has joined the channel [15:05] JimBastard: seeking requires rtmp right? [15:05] bradleymeck_: yes [15:05] bradleymeck_: rtmp would let us do funky stuff like stream and then fire off any flash method we want [15:05] astrojp has joined the channel [15:06] V1: http://gist.github.com/486093 <-- natives detections simplified ;p [15:06] V1: globals* [15:06] astrojp: I get this when trying to './configure'. What should I do? http://paste.pocoo.org/show/240434/ [15:07] bradleymeck_: install g++ [15:07] V1: ;D [15:07] V1: who would have expected that answer :p [15:08] bradleymeck_: jesus [15:09] astrojp: yeah, whatever. this pacakge i assume 'g++-4.1' [15:09] Neil__ has joined the channel [15:10] bradleymeck_: default g++ would be pref w/ whatever you are running [15:11] astrojp: thanks. [15:11] astrojp has left the channel [15:12] bradleymeck_: that was short [15:12] EyePulp has joined the channel [15:13] ik has joined the channel [15:13] _announcer: Twitter: "@zii yeah, p2p directly would be quite a challenge using existing web standards and not a plugin. but federated (through node.js) might work" -- Kyle Simpson. http://twitter.com/getify/status/19261928229 [15:13] devtime has joined the channel [15:14] ik: Hi. Is there some node.js equivilant of tmpfile(3) or do I need to write it? [15:15] ChrisRicca has joined the channel [15:15] Validatorian has joined the channel [15:15] SubStack: ik: there is a package called temp on npm [15:16] ik: hurrah [15:17] bradleymeck_: p2p w. websockets... [15:17] micheil_away: websockets != p2p. [15:17] hdon has joined the channel [15:17] micheil_away: unless the browsers implement websocket servers. [15:17] SubStack: oh look it has a github [15:17] bradleymeck_: they dont but they could be abused if i make an npapi server [15:17] SubStack: ik: http://github.com/bruce/node-temp [15:17] propAWAY has joined the channel [15:18] bradleymeck_: though npapi windowless objs are painful [15:19] propAWAY: after installing a package throught npm install, is the import("module") name the same than the package name ? [15:20] propAWAY: got Error: Cannot find module 'websocket-client' [15:20] kuya: who was doing the node based system monitor thingy? [15:20] stepheneb has joined the channel [15:20] proppy: however websocket-client@0.9.4 @active @installed @remote @stable @tag=latest @tag=stable [15:21] stepheneb has joined the channel [15:21] _announcer: Twitter: ""Hi, I'm a Javascript developer and I'm bi." (jQuery + node.js)" -- Kenny Shen. http://twitter.com/kenny_shen/status/19262481603 [15:22] SubStack: people are so open about being javascript developers these days [15:22] SubStack: look at how far we have come [15:23] bpot has joined the channel [15:24] qschzt has joined the channel [15:25] adamv has joined the channel [15:25] micheil: proppy: I think it may be a npm issue [15:25] micheil: or not [15:26] bradleymeck_: propAway generally yes, however it depends on how package.json says it [15:26] proppy: yes package.json says [15:26] proppy: "name" : "websocket-client", [15:26] bradleymeck_: does it declare a main? [15:26] proppy: no [15:27] micheil: hmm.. [15:27] bean0r1___ has joined the channel [15:28] micheil: I'll send in a patch to peter. [15:28] JimBastard: lol SubStack [15:28] proppy: does it need to declare a main ? [15:28] JimBastard: Javascript is the great equalizer, everyone has to know a little of it [15:29] JimBastard: !tweet @kenny_shen its actually called "dual-sided" :-) [15:29] bradleymeck_: doesnt have to declare main, just if you pull it in by package name [15:29] quirkey has joined the channel [15:29] bradleymeck_: two-faced? [15:30] robotarm_ has joined the channel [15:30] JimBastard: hey bradleymeck_ i need a good name for our http reverse proxy [15:30] JimBastard: any suggestions? [15:30] bradleymeck_: mmmm [15:30] JimBastard: preferabley enterprise accecptable [15:30] JimBastard: node-http-proxy? [15:31] JimBastard: node-reverse-proxy? [15:31] bradleymeck_: sec... whats that flask's name that folds in on itself [15:31] JimBastard: uknown [15:31] JimBastard: unknown [15:31] ik: klein bottle [15:31] adamv: lendermyer [15:31] adamv: Wait no, that's for science [15:31] bradleymeck_: klein proxy! [15:32] ik: is it extradimensional? :o [15:32] JimBastard: yxorp [15:32] bradleymeck_: hehe [15:32] JimBastard: thats a good one [15:33] JimBastard: node-http-proxy might be it [15:33] bradleymeck_: seems fair but is it only going to be for http [15:34] JimBastard: bradleymeck_: i think for now yeah [15:34] markwubben has joined the channel [15:34] JimBastard: i gotta look at the code, im not sure what indexzero ripped out of broodmother yet, waiting for him to create repo >.< [15:34] bradleymeck_: broodbouncer lol [15:35] JimBastard: hee hee [15:35] JimBastard: thats really tempting actually [15:35] JimBastard: to do brood* names [15:35] bradleymeck_: i really want to run a starcraft server on broodmother one day [15:35] JimBastard: but i wanted to keep it super enterprise friendly [15:35] micheil: proppy: I've seen peter a pull request, hopefully he'll update it on npm soon. [15:35] bradleymeck_: wormhole [15:35] panosru has joined the channel [15:35] proppy: proppy: could you send a pull request to me too ? [15:36] proppy: proppy: I'll fork npm w8 [15:36] JimBastard: lol [15:36] proppy: oups I mean websocket-client [15:36] JimBastard: broodbalancer, broodproxy, broodmother [15:36] qschzt: JB, envoy [15:36] proppy: micheil: or gimme your github url [15:36] proppy: :) [15:36] micheil: proppy: that won't help you. [15:36] proppy: micheil: I can use npm link [15:37] proppy: http://github.com/miksago/node-websocket-client/ ? [15:37] micheil: yeah, but don't I'm not a maintainer of it. [15:37] proppy: micheil: I can npm install later :) [15:38] panosru has left the channel [15:38] micheil: uhh.. or you could just vendor the module. [15:38] micheil: but that's probably harder [15:38] jpld has joined the channel [15:38] proppy: micheil: I guess it is ok to git clone / npm link [15:38] micheil: proppy: just talking to peter about the patch. [15:38] proppy: I can npm uninstall / npm install when peter pull the changes [15:39] jpld has joined the channel [15:39] yum46522 has joined the channel [15:39] tjholowaychuk has joined the channel [15:40] _announcer: Twitter: "Coding web apps with node.js in CoffeeScript feels gooooood." -- Stephan Seidt. http://twitter.com/evilhackerdude/status/19263827722 [15:40] qschzt: JimBastard, consul, catchpole, mouthpiece, regent, arbiter, dealer, liaison .. [15:41] micheil: proppy: yeah, that sounds like it'll be within the next 24 hours. [15:41] proppy: yipee import('websocket-client') nows work [15:41] proppy: micheil: thanks a lot, [15:41] proppy: I wish I would have been able to help more [15:41] ik: ding ding troll bell [15:41] JimBastard: lol qschzt if i go down that path ill turn into kriszyp , where i have awesome libraries with impossible to remember names [15:41] ik: ACTION paws at qschzt  [15:41] micheil: proppy: no worries [15:43] micheil: proppy: okay, pgriess is pushing the changes in a few minutes [15:43] proppy: micheil: thanks :) [15:43] maushu: JimBastard: Good idea! [15:43] _announcer: Twitter: "wishes he had time to play with nodejs instead of debugging stinky old perl code." -- Le Lag. http://twitter.com/le_lag/status/19264061027 [15:44] qschzt: :D [15:44] JimBastard: sup maushu [15:44] maushu: I will rename my project immediately to something like "fkjl0ç075pjko+dfg´ºdsglç". [15:44] JimBastard: lol [15:45] JimBastard: i should graph the relationship of OSS project success to name choice [15:45] JimBastard: caus in theory if you wrote the bombest shit ever you could give it an epic lame name and it would still succeed [15:45] mostlygeek has joined the channel [15:45] pavan_ has joined the channel [15:46] ryan_gahl: node.js should be renamed to knowed.js [15:46] ryan_gahl: cuz, it knowsssss [15:46] ryan_gahl: ok, lame, sry [15:46] maushu: ... [15:46] shockie has left the channel [15:46] charlenopires has joined the channel [15:46] maushu: ACTION pokes ryan_gahl in the eye. [15:46] qschzt: JB, call it 'george' [15:46] ik: ryan_gahl: would you be terribly upset if burly men came out of a helicopter just now and punched you? [15:46] blowery: node should be called rails [15:47] ik: ryan_gahl: because I mean [15:47] ik: get ready [15:47] ryan_gahl: ACTION dodges burly men easily [15:47] JimBastard: i was thinking of just mailing rails.js [15:47] maushu: No, no. Train! It should be called train! [15:47] blowery: node.js, pronounced "rails" [15:47] bradleymeck_: nah, we could call it junction or monorail [15:47] blowery: "obama" [15:47] tjholowaychuk: anyone have some cool demo-ish realtime app ideas [15:47] tjholowaychuk: for Connect [15:47] maushu: Rail: Php Edition.net [15:47] JimBastard: tjholowaychuk: porn [15:48] ryan_gahl: +1 [15:48] maushu: +9001 [15:48] tjholowaychuk: haha i think the internet has enough of that [15:48] ryan_gahl: nevah [15:48] tjholowaychuk: nodejs powered porn [15:48] ik: tjholowaychuk: only one way to find out [15:48] blowery: porn.js? [15:48] tjholowaychuk: porn.io [15:48] tjholowaychuk: could be a stream [15:48] JimBastard: available [15:48] ryan_gahl: tj: make your CLA have a Google form version like node's [15:48] ryan_gahl: just sayin [15:49] blowery: announcing our new IoC container, goatse.js! [15:49] tjholowaychuk: ryan_gahl: i didnt make it, but ya that would be nice [15:49] JimBastard: ahh its not [15:49] ryan_gahl: or tell creationix [15:49] micheil: proppy: it's now merged into pgriess's repo [15:49] bradleymeck_: tjholowaychuk, what about a site that tracks fitness w/ achievements etc [15:50] proppy: micheil: thanks, nice [15:50] ryan_gahl: so... had to jet the other day and then been busy... any new developments on the evenEmitter.suppress / http.pause/resume business? [15:50] tjholowaychuk: bradleymeck_: looking for something that abuses the realtime aspect a bit more [15:50] JimBastard: tjholowaychuk: how about a omegle clone? [15:50] bradleymeck_: well then what about a gps tracker of some kind via smartphones [15:50] JimBastard: anon chat [15:51] mitkok has joined the channel [15:51] ryan_gahl: how about a foursquare client that support auto-checkins based on gps polling? [15:51] tjholowaychuk: JimBastard: never heard of it [15:52] bradleymeck_: ryan_gahl, that would be nice [15:52] charlenopires has joined the channel [15:52] tjholowaychuk: haha [15:52] JimBastard: tjholowaychuk: i think thats a great idea actually [15:53] jakehow has joined the channel [15:53] JimBastard: http://omegle.com/ [15:53] JimBastard: try it out [15:53] JimBastard: tjholowaychuk: [15:53] tjholowaychuk: i just did haha first thing i said was "FUCK YOU ASSHOLE" and they left :( [15:53] bradleymeck_: oh lord chat roulette [15:53] pgriess: isaacs: yt? problems tagging using npm [15:53] maushu: bradleymeck_: omegle existed first. [15:53] proppy: can assert.equal compare objects ? [15:53] JimBastard: tjholowaychuk: you should clone that shit [15:54] proppy: it seems not [15:54] ryan_gahl: tj: good icebreaker lol [15:54] bradleymeck_: but chatroulette has video [15:54] proppy: b [15:54] tjholowaychuk: ryan_gahl: its how i get all the ladies lol [15:54] maushu: bradleymeck_: So does omegle. [15:54] maushu: :p [15:54] ryan_gahl: ladies like that shit [15:54] bradleymeck_: proppy objects dont just equal eachother based upon values, its references [15:54] bradleymeck_: ooo [15:54] JimBastard: ryan_gahl: did you mean guys jerking it? [15:55] ryan_gahl: wait, what [15:55] JimBastard: click, man having sex with raccoon stuffed animal [15:55] proppy: bradleymeck_: yes, but I thought that assert.equal would compare them properties by properties [15:55] ryan_gahl: lol [15:55] JimBastard: click, many having sex with cantaloupe [15:55] ryan_gahl: click, FUCK YOU ASSHOLE [15:56] bradleymeck_: proppy, gotta traverse what you need to check yourself [15:56] devongovett has joined the channel [15:56] proppy: bradleymeck_: yes, that what I will do :) [15:56] proppy: thanks ! [15:56] tmpvar has joined the channel [15:58] proppy: looking at node_amqp tests for inspiration [15:58] proppy: on how to unittest node things [15:59] tjholowaychuk: proppy: expresso! lo [15:59] tjholowaychuk: l [15:59] proppy: tjholowaychuk: ? [15:59] JimBastard: www.vowsjs.org [15:59] JimBastard: i think thats what tjholowaychuk meant [15:59] JimBastard: :-D [15:59] tjholowaychuk: hahaa you just wait until i get a pretty site :p [15:59] proppy: http://github.com/visionmedia/expresso [15:59] JimBastard: you better [16:00] tjholowaychuk: proppy: yup, they are basically polar opposites, one BDD and complex, one TDD and simple [16:00] tjholowaychuk: :p [16:00] tjholowaychuk: one feature rich, one dumb [16:00] JimBastard: i still think testing is stupid, but if you are working with more then 1 person you kinda need them [16:01] tjholowaychuk: i was writing some vows stuff to see how slow serial http shit was compared to my lightning fast expresso stuff but it was annoying so i gave up [16:01] tjholowaychuk: no way [16:01] tjholowaychuk: if you dont test it will haunt you forever (on larger projects at least) [16:01] ik: testing is great if you have code and then you do things to it [16:01] SubStack: tests are nice for hard code where it's easy to fuck stuff up [16:01] tjholowaychuk: yeah if you everrrr plan on refactoring your fucked without tests [16:01] proppy: btw nodejs-coverage link is bad on http://github.com/visionmedia/expresso [16:01] proppy: it point to itself [16:02] tjholowaychuk: even with the 75-ish% coverage on Connect we still find bugs [16:02] JimBastard: tjholowaychuk: in the past my general approach was having error notifications on everything instead of pre-testing [16:02] tjholowaychuk: proppy: shit! [16:02] ajpiano has joined the channel [16:02] JimBastard: tjholowaychuk: but yeah, testing is essential [16:02] javajunky: I'm currently trying to move my stuff from jspec to expresso, pain ;) so different. [16:02] JimBastard: and it sucks [16:02] tjholowaychuk: javajunky: yeah man. expresso is way better though [16:02] micheil: proppy: there's now a version 0.9.5 of websocket-client in npm [16:02] javajunky: I like the look of vows, but it spent so much time getting in my way :( [16:02] tjholowaychuk: id like to remove jspec all together but some people use it [16:02] proppy: micheil: thanks running uninstall/install [16:03] tjholowaychuk: yeah i tried it a bit, didnt like it [16:03] javajunky: I want to love it ;) [16:03] micheil: proppy: you'll need to install @0.9.5 [16:03] micheil: as there's an issue with npm tagging @latest [16:03] proppy: npm readJson /usr/lib/node/.npm/websocket-client/0.9.5/package/package.json [16:03] JimBastard: reddit has turned to such a shit show [16:03] proppy: npm build Success: websocket-client-0.9.5 [16:03] JimBastard: check out the top voted comment [16:03] JimBastard: http://www.reddit.com/r/programming/comments/cscn6/why_you_should_be_hashing_your_passwords_bonus/ [16:03] proppy: micheil: it automaticaly installed 0.9.5 [16:03] micheil: k [16:03] proppy: even if I didn't forced the version [16:04] bronson has joined the channel [16:04] JimBastard: apparently, ive "insulted their intelligence" , stupid new users [16:04] micheil: npm imfeelingluck :D [16:04] proppy: micheil: thanks a lot [16:04] tjholowaychuk: javajunky: expresso is pretty much the anti-BDD but it grants you insane freedom with tests, and is ridiculously fast [16:04] micheil: installs a random module from npm so that you can get distracted and play with it, how about it isaacs_home ? [16:04] rwaldron has joined the channel [16:05] micheil: ACTION needs to figure out a good method for tests node-websocket-server [16:05] matclayton has left the channel [16:05] tjholowaychuk: ~150 express http assertions in 100ms [16:05] JimBastard: micheil: we started doing tests for our reverse proxy , shits brutal [16:05] _announcer: Twitter: "@rgarver play with node.js. It's fun to just mess around with" -- Cody Swann. http://twitter.com/cody_swann/status/19265580781 [16:05] JimBastard: !tweet @rgarver node.js! do it! #javascript #nodejs [16:06] ryan_gahl: JimBastard: is that last post a bit of hashed profanity? [16:07] hansek has joined the channel [16:08] ryan_gahl: on testing, I really like yui's async test framework [16:08] proppy: maushu: SubStack: module.exports {} works FYI [16:08] JimBastard: ryan_gahl: naah just the output from the demo app [16:08] tjholowaychuk: anyone else use shell expansion to express daily convos lol [16:08] paulwe has joined the channel [16:09] proppy: ryan_gahl: isn't client-side ? [16:09] ryan_gahl: it's js [16:09] proppy: I mean targetted for client side :) [16:09] proppy: I'm used to qunit [16:09] proppy: (jquery testrunner) [16:09] tjholowaychuk: fuck serial test runners [16:09] tjholowaychuk: boo [16:09] ryan_gahl: it can be used server side, can't see a reason why not [16:09] proppy: I wonder if it would be difficult to adapt to node [16:10] proppy: if the runner and the reporting part is splitted yes [16:10] proppy: otherwise it would need some env.js things [16:11] proppy: did I say something wrong ? :) [16:12] tjholowaychuk: lol nope [16:12] bradleymeck_: mmmm? [16:12] bradleymeck_: micheil i can add websockets to witch if you want to test [16:13] Neil__ has joined the channel [16:13] proppy: micheil: btw I get a warning when calling ws.close() [16:13] proppy: on websocket-server [16:13] proppy: Notification: Stream.prototype.close has been renamed to end() [16:13] ryan_gahl: proppy: I can't believe you would say what you said!! [16:14] proppy: ryan_gahl: ;) [16:14] micheil: proppy: uhh.. [16:15] caolanm: interestingly I've notice qunit seem to be moving to an api similar to the assert module [16:15] micheil: version of node? [16:15] micheil: bradleymeck_: witch? [16:15] caolanm: instead of same() its deepEqual() etc [16:15] proppy: trying to upgrade to npm build Success: websocket-server-1.3.03 [16:15] proppy: micheil: 0.100 [16:15] bradleymeck_: getting a simple server side browser workin [16:15] bradleymeck_: cause i want a goddamn repl [16:16] tjholowaychuk: expresso has assert.eql as asset.deepEqual() it does not make sense in some contexts [16:16] tjholowaychuk: to call it that [16:16] tjholowaychuk: and its annoying to type [16:16] bradleymeck_: it works for most simple things, uses jsdom for now [16:16] proppy: caolanm: qunit achieve async in a funny way [16:16] jpld has joined the channel [16:16] proppy: caolanm: with stop();/start(); [16:16] tjholowaychuk: proppy: thats why expresso is nice, async just works, you dont have to do a single thing [16:16] proppy: tjholowaychuk: :) [16:16] tjholowaychuk: proppy: there is no done() or this.callback() or w/e [16:16] caolanm: proppy: allow me to pimp my own project for a moment: http://github.com/caolan/nodeunit [16:16] caolanm: ;) [16:17] caolanm: tjholowaychuk will have something to say about it though ;) [16:17] tjholowaychuk: serial!!! [16:17] tjholowaychuk: lol [16:17] tjholowaychuk: jk [16:17] proppy: tjholowaychuk: are you using the assert module ? [16:17] caolanm: ha [16:17] tjholowaychuk: proppy: yup [16:17] proppy: I mean does express use the assert module [16:18] proppy: so expresso, is basically test collection, and commandline sugar ? [16:18] tjholowaychuk: proppy: connect / express and most my libs are using expresso, which in turn uses assert.js [16:18] tjholowaychuk: proppy: mostly yup, extends assert a bit, has test coverage reporting etc [16:18] proppy: nice [16:18] _announcer: Twitter: "@lebreeze imagine seeing 4kg being pushed into the world, made me feel like I am in the wrong line of work. It was like: "eat this node.js"." -- Gerhard Lazu. http://twitter.com/gerhardlazu/status/19266476403 [16:18] proppy: I already use jscoverage for client side app [16:18] caolanm: tjholowaychuk: have you got html output for coverage now? [16:18] proppy: (I appear to be the debian packager of jscoverage too) [16:19] tjholowaychuk: caolanm: nope not yet, would be nice [16:19] proppy: tjholowaychuk: did you look at the way jscoverage calculate coverage ? :) [16:19] tjholowaychuk: proppy: yup [16:19] caolanm: tjholowaychuk: it would be teh awesomes [16:19] proppy: it insert a coverage[line++] +=1 between every statement :) [16:19] bpot has joined the channel [16:19] silentrob has joined the channel [16:19] tjholowaychuk: proppy: yeah i know, its only expression based, would be nice to get some other coverage techniques in there eventually [16:19] tjholowaychuk: but its a start [16:20] proppy: tjholowaychuk: it also embed xulrunner completly, instead of depends on it [16:20] proppy: tjholowaychuk: because currently xulrunner as no API for js parser [16:20] proppy: maybe v8 has one [16:21] proppy: if yes it would be fun to be rewritten for v8 [16:21] tjholowaychuk: if v8 exposed the json ast stuff it would be easy [16:21] tjholowaychuk: didnt have time to look into that much [16:22] tjholowaychuk: i think they just use it for pretty printing [16:23] proppy: micheil: sorry for the nose node-websocket-server.close() do work as attented [16:23] proppy: the warning comes from somewhere else [16:23] micheil: okay [16:25] bbn has joined the channel [16:26] proppy: it comes from node_amqp [16:26] bbn: good morning node noodlers [16:26] proppy: will fill an issue on github [16:26] qFox has joined the channel [16:26] proppy: btw, ryan_gahl thanks for pulling http://github.com/ry/node-amqp/issues#issue/3 [16:26] charlenopires has joined the channel [16:26] proppy: will you close it ? [16:28] tmpvar has joined the channel [16:28] proppy: filled http://github.com/ry/node-amqp/issues/issue/5 [16:29] proppy: is there a way to list what are the 'things' pending in node ? [16:29] proppy: to figure out why a test didn't exit for example [16:30] bradleymeck_: you mean see what is queued on the event loop? [16:30] proppy: yes [16:30] bradleymeck_: or if there are listeners? [16:30] proppy: sorry for the bad language :) [16:30] proppy: yes [16:30] proppy: twisted call that 'pendingCall' [16:30] proppy: or delayedCall [16:31] proppy: I don't know if there is an equivalent for node [16:31] proppy: bradleymeck_: I want to figure what I should close in order to the script to exit [16:31] proppy: s/to/for/ [16:31] JimBastard: proppy: an event buffer? [16:31] bradleymeck_: idk if there is a way to do that, ryah would know [16:31] _announcer: Twitter: "[del] [from euler] Multi-Core HTTP Server with NodeJS (Yahoo! Developer Network Blog): With current NodeJS http://url4.eu/6EOGG" -- sldfjd ldajds. http://twitter.com/sldfjd/status/19267404953 [16:32] bradleymeck_: tmpvar, is level2 of jsdom beta quality ? [16:32] _announcer: Twitter: "@cody_swann Indeed, I built a redis proxy in node.js a few months back. Won't get the app built though ;)" -- Ryan Garver. http://twitter.com/rgarver/status/19267428475 [16:32] proppy: it seems I've forgetten to close something but I don't know what [16:32] bcurren has joined the channel [16:32] proppy: nvm I found it :) [16:32] bcurren: i'm curious about node and https. do people just use something like nginx and proxy or does node support https? [16:33] tmpvar: bradleymeck_, nope [16:33] bradleymeck_: node supports https out of box [16:33] tmpvar: 59% of the tests pass [16:33] tmpvar: but i need to refactor level 1 to make it more extendable [16:33] JimBastard: morning tmpvar [16:33] JimBastard: bradleymeck_: is looking for you [16:33] JimBastard: lol [16:33] tmpvar: good morn' [16:33] aconbere has joined the channel [16:33] JimBastard: tmpvar: you wanna come to tech founders meetup tonight? [16:34] tmpvar: time? [16:34] JimBastard: http://techfoundersnyc.eventbrite.com/ [16:34] JimBastard: 630 - 8 @ aol [16:34] JimBastard: mikeal should be there too i think [16:34] bradleymeck_: tmpvar if you need help on that id be glad to go over stuff with you if we set aside an hour sometime im not somewhat working [16:34] tmpvar: damn, cant :/ [16:34] bcurren: bradleymeck_: you know of any blogs / docs discussing setting it up? i see setSecure but a example could be helpful [16:35] tmpvar: bradleymeck_, umm, I've sort of taken a break from jsdom for the moment. too busy with other things [16:35] bradleymeck_: http.createClient(port,domain,(secure=true)) will open up a https client [16:35] bradleymeck_: cool beans [16:35] SubStack: O_O [16:36] SubStack: and here I spent all that time configuring pointless certificates [16:36] bcurren: bradleymeck_: ah, should have been more clear. our server needs to support incoming ssl requests. [16:36] bcurren: is see httpServer has setSecure(credentials) but how do i give it our cert ect. [16:36] ThePub has joined the channel [16:37] SubStack: bcurren: http://www.silassewell.com/blog/2010/06/03/node-js-https-ssl-server-example/ [16:37] SubStack: but note: fs.readFileSync(...).toString() [16:37] bcurren: SubStack nice! [16:37] SubStack: since readFileSync returns a Buffer [16:37] bcurren: yes, i've seen that change. thanks [16:37] SubStack: ACTION just happens to be working on this very problem [16:38] bradleymeck_: x.toString() vs String(), thoughts [16:38] SubStack: I like how you can just tack .toString on at the end [16:38] SubStack: and not have to worry about both sides [16:39] bbn: I am trying out formidable, and it is really slow to respond to the curl -F tests I'm sending it. anyone know if that's normal? [16:39] fermion has joined the channel [16:39] maushu: pgriess: Yes! Your blog post is exactly what I was looking for. \o/ Thanks! [16:39] pgriess: maushu: happy to oblige ;) [16:39] bradleymeck_: but if i give you null somehow substack you blow up [16:39] pgriess: maushu: hopefully creationix/tjholowaychuk will build that into connect [16:40] tjholowaychuk: bbn: really? seems decent to me from my usage [16:40] maushu: "we cannot actually read any data off of the socket when making these decisions" [16:40] pgriess: maushu: implementing that stuff correctly is not really for the faint of heart [16:40] tjholowaychuk: pgriess: what stuff? [16:40] pgriess: maushu: my impl is kind of a toy -- it does't handle edge cases very well / at all [16:40] mjr_ has joined the channel [16:40] pgriess: tjholowaychuk: routing http requests to different processes based on policy (e.g. a vhost per process, etc) [16:40] maushu: Well, I need to make it work though. I just need to check the Host header to send the connection to the proper server. [16:41] bbn: tjholowaychuk yeah, super slow - like pauses for 1 to 2 seconds before responding. [16:41] JimBastard: This performed just fine, but the complexity of configurating and managing these multiple processes and endpoints left something to be desired. [16:41] JimBastard: :-D [16:41] pgriess: tjholowaychuk: this would be good for shared hosting, as you could run different vhosts at different 'nice' levels, in different chroot jails, etc [16:41] SubStack: bradleymeck_: blowing up is good, you hear about it sooner [16:41] JimBastard: we are pretty far along doing that pgriess, but we arent doing any multicore stuff [16:42] tjholowaychuk: pgriess: yeah man. [16:42] pgriess: jimbastard: using nginx or similar to proxy all http traffic? [16:42] tjholowaychuk: bbn: what size is the file? [16:42] ik has left the channel [16:42] JimBastard: pgriess: we rolled our own proxy [16:42] bbn: not a file, just basic POST params [16:42] JimBastard: actually might release it this weekend as part of the nodejitsu stuff [16:43] pgriess: jimbastard: cool. love to see it. [16:43] tjholowaychuk: bbn: oh :s yeah that should not take long at all, whats your curl line [16:43] bbn: tjholowaychuk: eg, curl -F "data=blabla" http://127.0.0.1:3000/bla [16:43] proppy: tjholowaychuk: so in order to convert my node test to expresso I only have to "hide" them into exports [16:43] proppy: right ? [16:43] proppy: tjholowaychuk: there is a typo in http://github.com/visionmedia/expresso [16:43] bradleymeck_: blowing up in dev is good, blowing up in production is :/ [16:43] tjholowaychuk: proppy: hide? its just exports.testMyFoo = function(){} [16:43] JimBastard: pgriess: for sure! hopefully i'll have some code to show you by monday. id totally give you access to our main repo but my biz partner would yell at me [16:43] proppy: exports['test async] should be exports['test async'] [16:44] proppy: tjholowaychuk: yes, that's what I meant :) [16:44] tjholowaychuk: proppy: I just prefer a string with spaces to testMyLongLameThing [16:44] rwaldron has joined the channel [16:45] maushu: ACTION starts using pgriess' reverse proxy in nuclear power plants. [16:45] bbn has joined the channel [16:45] pgriess: jimbastard: heh. don't want to get you on the wrong side of the law ;) [16:45] pgriess: maushu: how scared should i be? [16:45] pzich: very [16:45] bbn: tjholowaychuk sorry, lost my IRC client for a sec. curl line is curl -F 'data="laverne' http://127.0.0.1:3000/user/ukey [16:45] maushu: Hmm, is the reactor supposed to melt like that? [16:46] pzich: there's a mismatched \" in there [16:46] pgriess: ACTION is quaking in his flip-flops [16:47] proppy: tjholowaychuk: TATFT ? [16:47] JimBastard: maushu: i got it, we'll use a node http server and make a json api for regulating the control rods [16:47] maushu: Yeap. [16:47] JimBastard: sounds greeeeeat [16:47] bbn: maybe it's just a curl thing. [16:47] tjholowaychuk: bbn: I just do curl -d 'foo=bar' [16:48] bbn: k i'll try that. thx [16:49] bbn: yeah, that works [16:49] bbn: i wonder what's up with -F? [16:49] tjholowaychuk: no clue [16:49] tjholowaychuk: bbn: that might be a bug if its so slow, add -v to your first curl and see what the headers are [16:49] mtodd has joined the channel [16:50] tjholowaychuk: proppy: "Test All The Fucking Time" haha [16:50] proppy: tjholowaychuk: I have expresso hanging on me, when an assert is failing [16:50] proppy: tjholowaychuk: do you know that behaviour ? [16:51] tjholowaychuk: proppy: depends what your doing, gist? [16:51] proppy: there is no output thought [16:51] proppy: http://playground.mekensleep.com/~proppy/playground/server/playground_server/test/test_server.js [16:52] bbn: tjholowaychuk result of curl -v :http://pastie.org/1055671 [16:52] tjholowaychuk: proppy: you need to destroy() serves etc and clear intervals so that its not left looping [16:52] proppy: tjholowaychuk: does expresso test all function exported or only ones that have test* key, [16:52] tjholowaychuk: proppy: all ATM [16:52] proppy: tjholowaychuk: if I ran it outside of expresso [16:52] proppy: i.e in node [16:52] creationix has joined the channel [16:52] proppy: it exists, meaning that there is nothing pending I guess [16:53] mostlygeek has joined the channel [16:53] ecmanaut has joined the channel [16:53] proppy: it exits [16:53] proppy: :) [16:54] proppy: I must have introduced something with the module.exports, sorry for the noise [16:54] tjholowaychuk: proppy: hm tough call since i dont know the lib. but you will have that issue with any testing framework unless you can prevent the looping [16:54] [[zz]] has joined the channel [16:55] tjholowaychuk: proppy: its a subtle art ill admit that, i hope to have better docs soon for expresso [16:56] xla has joined the channel [16:56] proppy: tjholowaychuk: oh you're right I need to put destroy stuff, in a beforeExit(function(){ } [16:56] proppy: I should have read the documentation [16:56] tjholowaychuk: proppy: beforeExit() is usually just for assertions to ensure that all your callbacks were actually called [16:57] tjholowaychuk: proppy: but beforeExit() callbacks themselves wont be called unless your hanging stuff is gone [16:57] proppy: tjholowaychuk: but what if an assert is failing, expresso will exit the scope right away right ? [16:57] proppy: if you need to clean things like close a socket [16:57] mikeal has joined the channel [16:57] proppy: you have to do it somewhere [16:58] _announcer: Twitter: "Use #nodejs to securely route HTTP requests to workers based on SELinux context: http://bit.ly/9CLyGU" -- Peter Griess. http://twitter.com/pgriess/status/19269177408 [16:58] tjholowaychuk: proppy: i dont have a good solution for that right now, since not all failing assertions will require cleanup, we can either assume that one should exit, or not [16:58] tjholowaychuk: proppy: currently it doesnt [16:59] proppy: oh ok, so my cleanup code which is after the assertion should be called ? [17:02] bradleymeck_: tjholowaychuk why not make a cleanup option for asserts and then have an array somewhere that beforeExit can loop over [17:02] tjholowaychuk: fuck, hate when people give me a patch without tests [17:03] tjholowaychuk: bradleymeck_: hmm ya that might be an option [17:03] proppy: tjholowaychuk: I think I have a better test case here [17:03] proppy: http://playground.mekensleep.com/~proppy/playground/server/playground_server/test/test_websocket.js [17:03] tjholowaychuk: bradleymeck_: still hard to figure out what you need to clean up from that though, specially since the async tests lose reference to the test function [17:03] proppy: tjholowaychuk: this test hangs [17:04] siculars has joined the channel [17:04] micheil: proppy: what's that? [17:04] proppy: I mean does it hangs for you ? [17:05] tjholowaychuk: proppy: yup, no way around that all we can do is exit on the first failure [17:05] bradleymeck_: tj would have to bind it somehow idk that is a bit rough [17:05] tjholowaychuk: basically if it hangs, you fucked up lol [17:05] proppy: tjholowaychuk: if you override assert.equal so it records the failure and give back control [17:05] proppy: it should work [17:06] tjholowaychuk: there is no single point in assert.js to hook into anything [17:06] tjholowaychuk: well [17:06] tjholowaychuk: thats a lie [17:06] tjholowaychuk: sorta [17:06] tjholowaychuk: basically it would end up being a huge hack. BUT I dont think I report failures as they come right now, which I could do [17:07] tjholowaychuk: so at least if it hangs you will see that exception [17:07] shimondoodkin has joined the channel [17:07] _announcer: Twitter: "I'm speaking on NodeJS with a little bit of CoffeeScript at the August KC Ruby meeting. http://j.mp/d89pDE" -- Travis Swicegood. http://twitter.com/tswicegood/status/19269744899 [17:07] proppy: tjholowaychuk: why not http://playground.mekensleep.com/~proppy/playground/server/playground_server/test/test_websocket.js [17:07] sudhirj has joined the channel [17:08] proppy: ok I see your point [17:08] rauchg_ has joined the channel [17:08] proppy: you don't want to override assert.equal to try catch stuff [17:08] tjholowaychuk: you can already do that, and i do, i just dont output the failure immediately so that on exit I can report them by file [17:09] micheil: proppy: what's that test meant to prove? [17:09] proppy: micheil: I'm trying to figure out how to test hanging things with expresso [17:10] micheil: k [17:10] proppy: tjholowaychuk: I'm not sure I get it [17:10] proppy: if you give back control when an assert is failing [17:10] _announcer: Twitter: "looking for books and tutorials on #nodejs... anyone?" -- andreliem. http://twitter.com/andreliem/status/19269879103 [17:10] proppy: console.log('listening'); and server.close(); will be called [17:11] proppy: right ? [17:12] bcurren has left the channel [17:12] tjholowaychuk: ahhh i see what your saying now [17:12] tjholowaychuk: hmm [17:12] tjholowaychuk: that cooould be potentially dangerous but if we had a single method to proxy in assert.js it could work [17:13] JimBastard: !tweet @andreliem http://howtonode.org [17:13] _announcer: Twitter: "#expressjs web framework for #nodejs reaches 1000 followers on github! http://expressjs.com" -- TJ Holowaychuk. http://twitter.com/tjholowaychuk/status/19270044218 [17:13] proppy: tjholowaychuk: oooh I get it [17:13] proppy: tjholowaychuk: after reading the expresso code [17:13] proppy: the try catch is outside of the test() call [17:13] tjholowaychuk: proppy: currently i just bundle up the uncaught / thrown exceptions [17:14] proppy: I thought it was inside the assert.equal code [17:14] tjholowaychuk: and report them on exit [17:14] proppy: yes [17:14] V1 has joined the channel [17:14] proppy: so you actually fails on the first assert [17:14] tjholowaychuk: in each test fn yup [17:14] proppy: I thought you weren't that why I was confused :) [17:15] proppy: sorry for the noise [17:15] tjholowaychuk: no worries. might be worth trying your way though, might potentially cause some issues but that paired with reporting as soon as something is caught might be nice [17:15] JimBastard: so here's a question, how do you securely store passwords for a 3rd party service [17:16] bradleymeck_: you mean like oauth tokens for twitter? [17:16] blowery: JimBastard: you don't. ever. [17:16] JimBastard: like i want to store github password [17:16] bbn: I sent a pull request to expressjs last night but I see now it was a bad ide [17:16] bbn: a [17:16] tjholowaychuk: bbn what was it? [17:16] bbn: http.ServerResponse.prototype.sendjsonp [17:16] JimBastard: blowery: unfortunately, having the user enter the password as part of this workflow wouldnt be possible [17:16] tjholowaychuk: bbn ohh the jsonp thing [17:16] bradleymeck_: jim get a github oauth key and use that instead of the password [17:16] bbn: basically just looking for callback [17:17] micheil: JimBastard: I don't think that's how oauth works [17:17] softdrink has joined the channel [17:17] blowery: JimBastard: then your workflow is broken. please try again later. [17:17] _announcer: Twitter: "Had fun at the #node.js presentation last night given by @ryah. I got to meet @rauchg there." -- Tim Caswell. http://twitter.com/creationix/status/19270287981 [17:17] JimBastard: blowery: :-\ not quite [17:17] bbn: but I think it should be worked into regular send [17:17] bradleymeck_: you get a key, key lets you login to get a requestToken, save the token, profit [17:17] JimBastard: bradleymeck_: word [17:17] bbn: since it already has stuff for json in there. [17:17] V1: tjholowaychuk: my nMemcached isn't 100% stable yet. So what i added to my repo was just a basic implementation. But I will look in to your issue and check out. Thanks for reporting it :) [17:17] mattly has joined the channel [17:17] JimBastard: bradleymeck_: i dont think thats what i need though exactly [17:18] JimBastard: i need to store the password for git 1.7 http stuff, might not even be on github actually [17:18] tjholowaychuk: V1: aight :) I should not have assumed it was ready for merging no worries [17:18] bradleymeck_: you are just trying to use the github api? [17:18] JimBastard: actually drrr [17:18] bbn: issue is how to pass send the req so it can check for the callback param conveniently [17:18] JimBastard: naaah [17:18] JimBastard: trying to auth over http [17:18] JimBastard: for git itself [17:18] proppy: tlrobinson: maybe you could add setup/teardown things, that you could put in exports [17:18] proppy: oups [17:18] proppy: tjholowaychuk: ^ [17:18] V1: tjholowaychuk: I will send you a pull request once i'm 100% sure than all basic work on nMemcached has been completed [17:18] JimBastard: i should do more research [17:18] tjholowaychuk: proppy: wont work since its parallel [17:18] proppy: that would be called after and before test even thought it has failed [17:18] tjholowaychuk: proppy: but its easy to roll your own ad-hoc setup stuff [17:18] proppy: tjholowaychuk: per test then [17:19] stepheneb has joined the channel [17:19] tjholowaychuk: proppy: id maybe suggest taking a look at Connect and Express` tests [17:19] tjholowaychuk: V1 sounds great [17:19] proppy: sure [17:19] tjholowaychuk: ive got Riak and some others on the way as well [17:19] blowery: JimBastard: so you want to store a password, indefinitely, in a way that you can access and use later without user interaction? [17:20] JimBastard: bradleymeck_: heres the thing, for broodmother, developers might want to deploy a private repo. i was hoping i could cheat on the auth and use git http stuff [17:20] creationix: proppy: my hand made tests for nStore are very simple and easy to follow [17:20] JimBastard: blowery: for the most part yet, its for automated deployment of a private git repo [17:20] JimBastard: and im trying to avoid keys [17:20] blowery: ah [17:20] _announcer: Twitter: "Https with node.js http://bit.ly/d7HUcG" -- Ben Curren. http://twitter.com/bcurren/status/19270494450 [17:20] bradleymeck_: jimbastard you can use ssh instead? [17:20] JimBastard: keys might be the only way [17:20] creationix: just uses assert, and a 5 line thing I made called expect [17:20] _announcer: Twitter: "node.js = I'm in singing mood.." -- Medyk. http://twitter.com/medikoo/status/19270508836 [17:21] JimBastard: bradleymeck_: yeah, thats the better approach. i was just trying to keep it simple though [17:21] blowery: JimBastard: if you have to do it, i'd store the password encrypted using a key derived from something specific to the user [17:21] JimBastard: blowery: how to reverse? [17:21] blowery: JimBastard: better than just stashing the key on disk in plaintext [17:21] blowery: JimBastard: encrypt the pass, don't hash it [17:21] JimBastard: ahhh [17:22] blowery: so use AES or Blowfish [17:22] proppy: creationix: thanks I will [17:22] JimBastard: that could work, im slightly noobed out on this. [17:22] JimBastard: i barely know anything about crypto [17:22] blowery: it's pretty easy to back it out if i have local access, but then you're powned anyway [17:22] proppy: tjholowaychuk: I see that in test/helper you're doing port++ things [17:22] proppy: for having the server for each test to listen on different things [17:22] JimBastard: blowery: the security is really just so developers reading the db don't see users shit [17:23] blowery: if you can fall back on ssh keys, that would at least get you out of the security loop [17:23] maqr: i keep finding myself having to write code to do simple things like compare arrays... is there some general purpose library that can just give me all this should-already-be-included functionality for JS? [17:23] tjholowaychuk: proppy: yup [17:23] proppy: tjholowaychuk: but I don't get where you actually close it [17:23] JimBastard: i think ssh keys might be the best way [17:23] bradleymeck_: compare arrays how maqr [17:23] BBB- has joined the channel [17:23] blowery: JimBastard: where are you planning on storing all this? in the git repo itself, or to the side? [17:23] nrstott: maqr, 'narwhal' lib which you can npm install has a lot of that [17:23] JimBastard: blowery: storing which part? [17:23] nrstott: the 'util' module provides some good stuff [17:23] maqr: bradleymeck_: ['foo'] == ['foo'] is false [17:23] tjholowaychuk: proppy: you should see a --pending || server.close() [17:23] blowery: JimBastard: the password [17:23] bradleymeck_: also, should-already-be-included is questionable, [17:23] JimBastard: blowery: the passwords themself? couchdb [17:23] maqr: nrstott: narwhals, you say? [17:23] JimBastard: or a flat file json [17:23] JimBastard: either way [17:24] nrstott: just narwhal, no s [17:24] JimBastard: wont be public [17:24] blowery: gotcha [17:24] nrstott: "npm install narwhal" [17:24] qschzt has joined the channel [17:24] tjholowaychuk: maqr: [].indexOf() ? [17:24] nrstott: then require('narwhal/util') and see if it has what you need [17:24] JimBastard: narlywhal [17:24] blowery: so it's an artifact of using broodmother? [17:24] JimBastard: blowery: how do you mean? [17:24] blowery: local, not pushed anywhere [17:24] maqr: tjholowaychuk: eh? [17:24] JimBastard: yeah, its the private data for a BM install [17:24] tjholowaychuk: maqr: for figuring out if an obj is in the array [17:25] blowery: kk [17:25] maqr: tjholowaychuk: err, no, i wanted to compare arrays, like ['foo', 'bar'] == ['foo', 'bar'] should be true [17:25] nrstott: maqr, require('narwhal/util').eq will do what you want with arrays [17:25] blowery: if you end up going the route of storing keys on disk, i'd try to follow the ssh guidelines on setting up the directory where the passwords are stored [17:25] bradleymeck_: maqr those should not equal because they are different references, use arr.every(function(item,index){return item == arr2[index]}) [17:25] blowery: enforce that the dir is only user readable [17:25] proppy: tjholowaychuk: got to go, the place is closing [17:25] proppy: creationix: got to go [17:25] tjholowaychuk: proppy: later [17:25] proppy: thanks your input about testing [17:25] maqr: nrstott: yeah, i'm looking at it now, this seems quite sensible [17:25] creationix: :) [17:26] maqr: bradleymeck_: wouldn't that miss if arr2 had an extra item in it? [17:26] nrstott: require('narwhal/util').eq(['foo'], ['foo']) [17:26] nrstott: -> true [17:26] JimBastard: im wondering if i should just force the user to enter a password if they want to call any API methods that require outside auth [17:26] blowery: fwiw, svn let's you store repo passwords in plaintext in your .svn/config :) [17:26] bradleymeck_: they wouldnt be equal [17:26] JimBastard: it might be waaay easier at this point [17:26] _announcer: Twitter: "node.js now has 3, yes 3, CouchDB libraries :)" -- Mikeal. http://twitter.com/mikeal/status/19270884841 [17:26] maqr: nrstott: yeah, this is good, it's amazing to me all of this isn't already in js [17:26] maqr: JimBastard: http authentication over ssl :) [17:26] bradleymeck_: are you just trying to see if all of the elements in arr1 exist in arr2 or if they are equal? [17:26] aliem_ has joined the channel [17:26] maqr: bradleymeck_: if the arrays are exactly equal, like nrstott did with narhwal [17:27] maqr: *narwhal [17:27] nrstott: maqr, narhwal/util has a lot of good stuff in it. [17:27] bradleymeck_: so how would missing arr2 be bad? [17:27] nrstott: .eq works with objects too [17:27] maqr: bradleymeck_: wouldn't your code say true for comparing ['foo'] with ['foo','bar']? [17:28] bradleymeck_: true, forgot about that [17:28] bradleymeck_: then you could just swap arrs based on length then [17:29] mikeal: JimBastard: did you tell the NYC.js list about the meetup on saturday [17:29] mikeal: oh, and did you tell the node list where it's at :) [17:29] bradleymeck_: but i would rather most of those "utility" functions stay out of my js builtins [17:29] maqr: bradleymeck_: to me, it seems silly, but i guess that's because JS isn't my first language [17:30] _announcer: Twitter: "Node.js -- because rewriting all your language's libraries in Javascript is good practice." -- Steve Losh. http://twitter.com/stevelosh/status/19271132282 [17:30] bradleymeck_: maqr, to put it in perspective, python has bajillions of utility methods, tons do similar things with minor nuances. why would i want that? [17:31] nrstott: bradleymeck_, are you proposing that making a simple library of utilty methods and pacakging it for npm was a bad idea? ;0 [17:31] bradleymeck_: i want a base, put the things that make sense on top of the base, kinda like legos, not like taking playdoh to make my things, maybe its personal [17:32] maqr: bradleymeck_: because when you google "comparing an array in python" you get a standardized answer, not 100 bloggers from 1998 writing methods called compareMyArray() [17:32] bradleymeck_: im saying it often leads to misuse [17:32] nrstott: bradleymeck_, what leads to MORE misuse expecially within an orgonization is doing what you propsoed with your compare [17:32] bradleymeck_: maqr you are comparing how is a question python ppl never ask and it is relevant [17:32] JimBastard: mikeal: oops i gotta do that now [17:32] nrstott: it leads to very difficult to find bugs [17:32] nrstott: copy/paste programming is bad, I think we've all agreed on that principal for years [17:32] mikeal: JimBastard: cool [17:33] maqr: bradleymeck_: i just get frustrated when i know i want to do something very simple, but everyone has a different answer, and the language itself may or may not actually have my answer already in it [17:33] shimondoodkin: is node working in 64 bit linux? [17:33] maqr: bradleymeck_: i don't have any way to immediately rule out JS so i can say "ok, i need to use an external library", it may just be some easy one-liner that i'm not familiar with yet, and it's tedious [17:33] bradleymeck_: mrstott agreed. but ive been debugging python everyday for a while and anything beyond array comprehensions is brutal if its unexpected [17:34] bradleymeck_: if i compare something i want to see what im comparing how, explicit declarations allow that, kinda like how continuation style programming is balls for debugging [17:34] maqr: bradleymeck_: python has all the stuff i commonly use for common types built in, and when you pull in external libraries, you can explicitly declare what you're bringing into the namespace... to me, that's an ideal solution [17:35] aliem has joined the channel [17:36] benbinary has joined the channel [17:36] bradleymeck_: true but most operations i hear as common or normal are nothing of the sort, comparing references to values is drastic, comparing closure bindings to values is more, and ppl always seem to group them together [17:36] V1: tjholowaychuk: Can you give me contents of your test file? I'm having a hard time reproducing your issues. It seems to work on my side [17:36] mape: shimondoodkin: yes, I run it on debian 4 amd64 [17:36] tjholowaychuk: V1: i just added a test file like the rest of mine in ./test/* [17:36] JimBastard: !tweet @stevelosh it sure is! [17:37] bradleymeck_: anywho im too worked up, back to debuggin [17:37] tjholowaychuk: V1: and add -I support/memcached to `make test` [17:38] maqr: nrstott: is this narwhal thing entirely node compatible? [17:38] maqr: nrstott: it does a lot, including stuff node does [17:38] V1: oki, lemme install espresso first as your make file requires it [17:38] tjholowaychuk: V1: git submodule update --init [17:39] V1 has left the channel [17:39] nrstott: maqr, 'narwhal' is also its own JavaScript runtime that runs on multiple engines [17:39] nrstott: maqr, not all the modules work for node yet... working on doing that in a sane way. [17:39] nrstott: maqr, I have yet to have any trouble with the 'util' module though [17:39] V1 has joined the channel [17:39] nrstott: are you having trouble with 'util'? [17:39] V1: Whoops wrong button [17:39] V1: :p [17:40] maqr: nrstott: a little, but i think it's me, i'll fix it :) [17:40] nrstott: cool [17:40] _announcer: Twitter: "Here starts a session on WebSockets. Looking forward to this, it's hot stuff... will Node.js make an appearance? #oscon" -- Tom Leitch. http://twitter.com/shoez/status/19271817781 [17:40] jbrantly has joined the channel [17:41] bradleymeck_: !tweet @shoez, websockets and node.js? pfff never. lol [17:42] JimBastard: whats up with these people on twitter who have 4 followers and like 500 tweets [17:42] JimBastard: like....really? [17:42] maqr: nrstott: yeah, i was just expecting var narwhal = require('narwhal'); narwhal.util.eq() to work... but it doesn't, but that might be better anyway, as i only need the util stuff [17:42] bradleymeck_: nodejsbot is slowly gaining speed [17:42] maqr: nrstott: this project also looks really good: http://documentcloud.github.com/underscore/ [17:43] maqr: nrstott: apparently people have also ported extjs, yui, and some of jquery [17:43] maqr: so at least i'm not crazy for thinking this should exist :) [17:44] bradleymeck_: yub, lots of stuff like that exists [17:44] bradleymeck_: just not in ecma5 standard [17:44] binesh has joined the channel [17:44] binesh: hi [17:44] shimondoodkin: hi binesh [17:45] binesh: hello [17:45] binesh: Wow [17:45] shimondoodkin: binesh is my friend [17:45] bradleymeck_: /wave [17:45] V1: tjholowaychuk: can't get the test running make test -I support/memcached does nothing ;p [17:46] meder__ has joined the channel [17:46] shimondoodkin: he will now also work with node js [17:46] maqr: bradleymeck_: ok crisis averted :) [17:46] tjholowaychuk: V1: nono lol [17:47] V1: ACTION is ashamed ;$ [17:47] tjholowaychuk: V1: open Makefile, and take a look you should see -I support/stuff [17:47] bradleymeck_: im fine w/ libs, just not in my stdlib. and i am prone to getting overly talkative, sorry about that [17:47] tjholowaychuk: V1: which exposes those dev submodules to the test suite [17:47] V1: oh i tried that aswell [17:47] V1: no luck :P [17:47] nrstott: maqr, you just have to do require('narwhal/util') [17:47] nrstott: its not difficult [17:47] nrstott: the '/' is how node packages work as well... its nothing non-node [17:48] nrstott: underscore is really cool too though [17:48] V1: tjholowaychuk: http://github.com/3rd-Eden/keys/blob/master/Makefile [17:49] maqr: nrstott: yeah, i made both of them work :) [17:49] nrstott: congrats [17:50] tjholowaychuk: V1: looks like it should work, any output? [17:50] V1: nothing [17:50] grahamalot has joined the channel [17:50] V1: But it might be because my nMemcached needs a .disconnect() to stop the net.Stream's it starts up [17:51] V1: But I would have expected a output what so ever. [17:51] tjholowaychuk: V1: yeah, if it hangs. http://github.com/3rd-Eden/keys/blob/master/test/redis.test.js#L10 [17:51] V1: aahhh [17:51] tjholowaychuk: V1: and then you can test just yours with $ make test TESTS=test/memcached.test.js [17:52] tjholowaychuk: so you dont need redis and all that crap [17:52] V1: Oki. [17:54] sudoer has joined the channel [17:54] V1: tjholowaychuk: But I can't replicate the issue you where having. But i'm guessing you didn't specify the location of Memcached server inside your constructor :) [17:55] tjholowaychuk: V1: hmm maybe [17:56] confounds has joined the channel [17:56] V1: tjholowaychuk: I have added an working example here: http://github.com/3rd-Eden/keys/blob/master/examples/memcached.js [17:56] V1: I'll give you a poke once I pass all tests. [17:56] tjholowaychuk: sound sgood [17:57] tjholowaychuk: defaults should work with memcached defaults though as far as host/port go [17:57] JimBastard: i think i gotta give up on deploying private repos for this iteratio [17:57] JimBastard: n [17:57] JimBastard: meh [17:58] b_erb has joined the channel [17:59] isaacs has joined the channel [17:59] V1: tjholowaychuk: There isn't a default host as that is 100% user defined. But if you can come up with a basic structure for stores that require a connection I can probably work around that. [18:00] V1: tjholowaychuk: Maybe a required options object { host: '', port: '' } or something like that. [18:00] tjholowaychuk: V1: oh :p [18:00] tjholowaychuk: ithought the port defaults to 11211 or something [18:00] tjholowaychuk: V1: ya, copy Redis, it accepts options.{host,port} [18:01] V1: tjholowaychuk: Yes the default port is 11211 but the host isn't :p [18:01] V1: tjholowaychuk: Will do. [18:01] tjholowaychuk: V1: its probably IN_ADDRANY, so maybe just leave it null by default [18:02] richcollins has joined the channel [18:03] _announcer: Twitter: "@wchogg what do you think of node.js?" -- Christie Koehler. http://twitter.com/christiekoehler/status/19273232982 [18:04] creationix: nrstott: sup [18:04] nrstott: creationix, hi [18:04] creationix: I'd rather not debate commonjs vs node styles in my connect thread, but I'll gladly explain any any question you have [18:04] nrstott: well my question is quite clear... [18:04] stepheneb has joined the channel [18:05] nrstott: what are these node idioms and why are they so valuable? [18:05] nrstott: what 'node idioms' does JSGI not follow? [18:05] creationix: ok, let's take jsgi's body api [18:05] nrstott: it's not exactly a debate ^^ [18:05] nrstott: it's a question [18:06] creationix: nrstott: I know, but asking that kind of questions on the mailing list always leads to debates [18:06] creationix: in order to make forEach work with async, this end callback was added on [18:06] JimBastard: creationix: i dont think it always leads into a debate. let me tell the reasons why i think so, first........ [18:06] JimBastard: :p [18:07] nrstott: creationix, you mean forEach returning a promise? [18:07] creationix: nrstott: let's make sure we're talking about the same jsgi [18:07] _announcer: Twitter: "@tjholowaychuk Yesterday I felt the sudden need to rewrite everything in nodejs. drat." -- Austin Bales. http://twitter.com/arbales/status/19273482496 [18:08] nrstott: creationix, im referring to JSGI 0.3 [18:08] tjholowaychuk: hahaha [18:08] tjholowaychuk: oh i thought that was a burn on me [18:08] tjholowaychuk: ACTION fails at reading english [18:08] creationix: nrstott: so to me node idioms are callbacks, event emitters, and streams [18:09] creationix: that handles any use case you might need [18:09] _announcer: Twitter: "Stress testing a Node.js app. It's not faring as well as I'd thought it would." -- Patrick Tulskie. http://twitter.com/PatrickTulskie/status/19273582210 [18:09] creationix: there are no promises or funky forEach loops that fire asyncronously [18:09] creationix: promises can be added on top quite easily for people who like that [18:09] tjholowaychuk: i dont like the jsgi return { foo bar } stuff [18:10] tjholowaychuk: side from the streams connect is just fine as-is IMO [18:10] creationix: but I don't think something as low level as a middleware spec should force promises [18:10] nrstott: i like JSGI because it's just JavaScript. I don't have an issue with forEach returning a promise instead of undefined. [18:10] tjholowaychuk: but thats a node issue not really us [18:10] nrstott: creationix, should the middleware spec force EventEmitters and streams insted? that doesn't seeem low-level either. [18:10] tjholowaychuk: fuck commonjs lol we need to think about node first [18:10] bradleymeck_: i prefer callback syntax as i can pass return values that are more than promises [18:10] nrstott: tjholowaychuk, fuck you [18:10] tjholowaychuk: :D [18:10] nrstott: share the love :) [18:11] creationix: nrstott: node's http interface enforces event emitters and streams [18:11] creationix: that's what I mean by node idoms [18:11] nrstott: ok creationix , fair enough [18:11] tjholowaychuk: just playen. its a valuable discussion [18:11] creationix: jsgi is a great api for people used to that [18:11] creationix: it's just not coming out of node [18:11] creationix: it comes from wsgi [18:11] sudhirj has joined the channel [18:11] tjholowaychuk: 99% of my shit uses very node specific apis anyways so i couldnt care less [18:11] nrstott: tjholowaychuk, I like express :) i just want it on JSGI [18:11] kriszyp: even for node only, connect's middleware is a poor design, IMO [18:12] creationix: kriszyp: yes, is needs improvement [18:12] kriszyp: most of the stuff you guys do is great though [18:12] creationix: that's why I'm getting feedback on how it's really used [18:12] bradleymeck_: kriszyp what in particular seems off? [18:12] tjholowaychuk: the stream stuff is my main beef, sick of wrapping functions [18:12] creationix: my goals are very pratical [18:12] nrstott: kriszyp, I wish pintura had more tutorials :) [18:12] tjholowaychuk: BUT that can be fixed at the node level [18:12] tjholowaychuk: somewhat [18:13] creationix: streams and their interface have been heavily discussed at the last two node meetings (not meetups) [18:13] kriszyp: bradleymeck_: I explained the problems here: http://www.sitepen.com/blog/2010/06/11/jsgi-vs-connect-for-node-middleware/ [18:13] creationix: kriszyp: well, most the things in that article aren't relevent [18:13] creationix: and connect has changed a lot since then [18:13] kriszyp: have you changed things a lot since then? [18:14] nrstott: creationix, I come from this from a totally different point of view than you do. I want JavaScript idioms to take precedence, not node idioms. [18:14] kriszyp: has become more like JSGI? [18:14] kriszyp: yeah, I agree nrstott [18:14] nrstott: but I can respect what you guys are doing too [18:14] nrstott: now i know what you mean by node idioms [18:14] nrstott: so im happy [18:14] creationix: nrstott: the thing about javascript idoms is there aren't any, everyone does it different [18:14] creationix: I mean compare jQuery to dojo [18:15] wattz: hey peoples [18:15] nrstott: well kriszyp would be better at comparing jQuery and dojo than I am [18:15] nrstott: i am totlaly unfamiliar iwth dojo [18:15] Yuffster has joined the channel [18:15] kriszyp: that's silly to say there isn't javascript idioms, javascript has plenty of idioms [18:15] kriszyp: the constructs of the language [18:15] nrstott: i assume its 'module wrapping idiom' is similar to jQueries [18:15] wattz: where is phiggins at? [18:15] wattz: phiggins is Mr. Dojo [18:16] creationix: kriszyp: fair enough, but you know what I mean [18:16] creationix: there is no clear consensus for a lot of things [18:16] kriszyp: sure, I agree with that [18:16] creationix: expecially new stuff like good interfaces for streaming http servers using non-blocking I/O [18:16] kriszyp: heh, yeah [18:16] creationix: node is covering a lot of new ground API wise [18:16] creationix: and we're just experimenting [18:16] phiggins: ACTION sighs :P [18:17] wattz: haha [18:17] wattz: there's my boy :D [18:17] bbn: tjholowaychuk: think i have a better solution for JSONP callback checking etc. should i send another pull request? [18:17] tjholowaychuk: i liked the filter thing, constructing streams for small use-cases are pretty annoying [18:17] SubStack: jsonp *shudder* [18:17] tjholowaychuk: bbn: yea sure or just send me a link to the patch [18:17] tjholowaychuk: bbn: still not sure i want jsonp stuff in express core though [18:17] creationix: nrstott, kriszyp, you guys are welcome to suggest ideas for connect as long as it's not "just be more like X" [18:18] tjholowaychuk: constructive :p [18:18] nrstott: creationix, how about you just keep doing connect how you want. I don't have much of an interest in suggesting things for it at this point because I want my stuff to run on narwhal and node. [18:18] jtoy has joined the channel [18:18] nrstott: and I know that you're never going to want connect torun on narwhal :) [18:18] creationix: nrstott: no, it's not a goal any time soon [18:18] creationix: when all this experimenting settles down we can find a standard [18:19] tjholowaychuk: until something beats node/v8 hardcore im not going anywhere [18:19] tjholowaychuk: and i dont give a shit about rhino [18:19] creationix: I think it's way too early to standardize cross-engine [18:19] tjholowaychuk: personally [18:19] nrstott: creationix, it's not really JSGI vs connect that interests me. It's that whenever commonjs people offer a solution to something we get "that doesn't follow node idioms" thrown in our face like that means the solution can't be a good one. [18:19] tjholowaychuk: ditto that, i think i have one lib that is portable [18:19] bradleymeck_: creationix, what about a shared this object across all the layers that is just an object i can share request/response related info without slaming it onto req,res? or did that get added w/ params kinda? [18:19] nrstott: I'm sure connect solves your problems very well [18:20] nrstott: creationix, until you just expained it, I wasn't even sure what you guys meant by that :) [18:20] bbn: okay - for my use case jsonp is really important . but I can abstract it at a different level I guess. if you put support for passing JSON objects in send then it's important to be able to wrap it in a callback before writing to the port [18:20] creationix: nrstott: basically I want connect to be a natural extension of ryah's apis [18:20] nrstott: not _everything_ that runs on node needs to follow 'node idioms' imo [18:20] nrstott: there can be good solutions that work fine on node that come from another camp [18:20] tjholowaychuk: bbn: you could easily still chuck that proto method in your own app [18:20] creationix: of course not, but I do want connect to be node flavored [18:21] bbn: tjholowaychuk for sure. just trying to save the next guy the hassle. [18:21] nrstott: not trying to convince you to change, that's your goal so you should stick to it. [18:21] bbn: i do lots of cross-domain [18:21] bbn: and cross-dressing [18:21] creationix: nrstott: but you sound like my goal is a bad one? [18:21] nrstott: creationix, not at all... I use EventEmitter in my couchapp as a commonjs module even [18:22] nrstott: i don't dislike node in the least [18:22] nrstott: I think node is great [18:22] nrstott: you're reading into what I'm saying because text doesn't carry tone well [18:22] creationix: nrstott: yeah, and email it worse, hence irc [18:23] creationix: nrstott: ok, I'll try to be more clear in my goals for connect. It's only aimed for node and I consider that a feature [18:23] bradleymeck_: idk i just like streams, events, and callbacks over continuations, promises, blocking, and chunks [18:23] nrstott: creationix, fair enough. [18:24] nrstott: bradleymeck_, where did "blocking" come from? [18:24] softdrink has joined the channel [18:24] kriszyp: http://github.com/senchalabs/connect/blob/master/lib/connect/index.js#L188 doesn't look like it has changed that much in it's basic middleware delegation logic since I wrote http://www.sitepen.com/blog/2010/06/11/jsgi-vs-connect-for-node-middleware/ [18:24] nrstott: no one is proposing that "blocking" is a good thing [18:24] bradleymeck_: event based, not callbacks [18:24] creationix: kriszyp: yeah, I still have a heavy delegator [18:24] creationix: but my point is that it doesn't matter [18:24] creationix: it's a tiny part of the overall cost [18:24] tjholowaychuk: TINY [18:25] tjholowaychuk: ACTION rage [18:25] creationix: kriszyp: index.js didn't change much actually [18:25] nrstott: I don't argue efficiency. Most of the time efficiency is irrelevant. Not many apps _really_ need to be optimized as much as they possibly can be [18:25] creationix: but the middlewares themselved changed a lot [18:25] nrstott: non-blocking IO is already 80% of the battle. [18:26] creationix: kriszyp: and thanks to the manual delegator I don't have to nest 15 levels deep when building an app [18:26] creationix: I can line them up in a list and it handles the nesting/passing for me [18:26] kriszyp: because it is easier to type commas then paranthesis? :) [18:26] tjholowaychuk: if we had jsgi style middleware Express would be a huuuuge hack [18:26] nrstott: tjholowaychuk, why do you think that [18:27] tjholowaychuk: nrstott: take a look at the internals of how express utilizes connect [18:27] creationix: kriszyp: I remember you linking to a wsgi example and thinking "that's a pyramid" because it just nested functions [18:28] mostlygeek has joined the channel [18:29] maqr: creationix: does connect follow the equivalent of wsgi for js? [18:29] nrstott: maqr, not at all [18:29] bradleymeck_: not meant to be the same as wsgi [18:29] creationix: maqr: nope, but jsgi is pretty darn close [18:30] creationix: I personally think that wsgi's syntax style is bad for node [18:30] creationix: the idea of layers connect has [18:30] creationix: but the api is completely different [18:30] kriszyp: jsgi is influenced by wsgi, it's certainly not a straight port [18:30] tjholowaychuk: ive been really happy ever since we added #use() [18:31] tjholowaychuk: now its a true framework framework [18:31] jetienne: http://www.sitepen.com/blog/2010/06/11/jsgi-vs-connect-for-node-middleware/ <- those numbers have been reproduced by independant people ? [18:31] nrstott: I really like promises... I don't really understand why the node world seems to dislike them so much. I get it that node is low level and doesn't need to provide them, but what's bad about using them ontop of node? [18:31] programble has joined the channel [18:31] creationix: "This was run against a mock server to eliminate any overhead of HTTP parsing and isolate the test to simple request delegation" [18:31] jetienne: nrstott: what is "promises" [18:31] creationix: from the article [18:31] tjholowaychuk: jetienne: my shitty hello world tests were actually faster [18:31] tjholowaychuk: than jsgi [18:32] maqr: creationix: so, in theory, i could write middleware for conect, and it would run in some other js framework? [18:32] maqr: *connect [18:32] creationix: maqr: probably not [18:32] creationix: you would need an adaptor, then maybe [18:32] kriszyp: I am pretty sure that connect could optimize some, the performance is just a symptom though [18:32] creationix: but it would work in any node framework based on connect [18:32] creationix: kriszyp: a symptom of what [18:33] creationix: overall my apps are insanely fast [18:33] kriszyp: not using plain js delegation [18:33] kriszyp: that's because node is insanely fast :) [18:33] mikeal has joined the channel [18:33] creationix: kriszyp: I'm not sure what you gain with plain js delegation [18:33] DTrejo__ has joined the channel [18:33] DTrejo__: hello [18:33] creationix: it's not faster in any way that matters [18:34] creationix: and it restricts what the framework can do [18:34] tjholowaychuk: its a pointless attempt at an optimization [18:34] jetienne: depends on the numbers [18:34] kriszyp: it greatly expands what the dev can do though [18:34] jetienne: 257% faster is not neligible (if confirmed) [18:34] kriszyp: and maybe that's part of the philosophical difference, giving control to the dev vs the framework [18:34] creationix: jetienne: yes, but look at what's 257% faster [18:34] creationix: it's not the overall app [18:35] kriszyp: jetienne: in creationix and tjholowaychuk defense, the does usually represent a small part of the app [18:35] jetienne: creationix: i do understand your point. symfony guy got the same [18:35] maqr: how do you guys do the benchmarking anyway? [18:35] BBB- has joined the channel [18:35] maqr: people talk about 'fast', but i have a hard time understanding what that really means [18:35] bradleymeck_: gogo Date.now() [18:35] tjholowaychuk: hello world is useless, lets just say that [18:35] creationix: it's all quite fast if running on node [18:35] tjholowaychuk: its fun [18:35] tjholowaychuk: but useless [18:36] creationix: my howtonode.org site, which does all sorts of I/O and cpu intensive processsing [18:36] creationix: is blazing fast on connect [18:36] creationix: kriszyp: I think we just have different goals [18:37] creationix: and that's fine [18:37] jetienne: already i would like to know which server is able to handle 730kreq/s [18:37] jetienne: already=void [18:37] creationix: jetienne: nothing on a single process [18:37] creationix: not js based at leasy [18:37] creationix: though a connect based hello world has been known to do 35k reqs/s over a lan [18:38] jetienne: creationix: i tried the yahoo implementation and the numbers are not linear. aka i get 18kreq/s on 4 core. and 8.5k on one core [18:38] maqr: o_O [18:38] kriszyp: yeah, and I can respect the work your doing and the different goals you have creationix [18:38] maqr: creationix: i guess the only real test is when you run a really high traffic site? [18:38] creationix: maqr: yeah, howtonode isn't exactly high-traffic, it's about 3000 reqs/day [18:38] creationix: a single rails instance could handle that [18:39] tjholowaychuk: webrick could handle that [18:39] joshbuddy has joined the channel [18:39] tjholowaychuk: webrick/rails [18:39] creationix: but my multitouch demo from txjs was pretty high traffic [18:39] joshbuddy has joined the channel [18:39] tjholowaychuk: barely [18:39] creationix: and it handled fine without a sweat [18:39] JimBastard: all i know, is that ive had node handle frontpage of HN and reddit [18:39] JimBastard: on multiple occasions [18:39] JimBastard: thats good enough for me [18:39] tjholowaychuk: creationix: o ya i meant to ask whats that example supposed to do? open another browser and repeat the movement? [18:39] creationix: about 100 concurrent users hitting it 30 times/sec [18:39] tjholowaychuk: didnt work for me at least :( [18:39] maqr: creationix: how do you go about watching performance? is there some sort of node performance logger? [18:39] benburkert has joined the channel [18:39] creationix: maqr: I usually just open htop or activity monitor [18:40] creationix: and I test silly benchmarks with ab [18:41] _announcer: Twitter: "@wchogg node.js aims for web services with high concurrency, I think. I only know a bit about it though." -- Christie Koehler. http://twitter.com/christiekoehler/status/19275459869 [18:41] jetienne: for me, nodejs is the opportunity to forget all the other scripting languages on server :) [18:41] jetienne: and this is a lot :) [18:42] jetienne: same stuff on server and client is big. less effort duplication [18:43] creationix: nrstott: thanks for helping me understand, I responded your question on the mailing list [18:43] DTrejo__: jetienne: that's what I love too :) [18:43] JimBastard: !tweet @wchogg if you have questions you can always join #node.js on irc.freenode.net. we love questions! [18:43] nrstott: creationix, cool. [18:43] DTrejo__: JimBastard: woah tweeting from irc directly [18:43] _announcer: Twitter: "Am I crossing the line here?? I'm using Node.js as backend for a Flash application. :P #javascript <3 #flash" -- Arnout Kazemier. http://twitter.com/3rdEden/status/19275623437 [18:44] bradleymeck_: its convenient [18:44] rauchg_: crossing the line would be tying node.js to libflashplayer.so, rendering flash on the server side and streaming it over websocket [18:44] JimBastard: !translate English:Spanish Of course DTrejo__ thats how we roll up in this bitch [18:44] _frankie: Por supuesto DTrejo__ thats cómo rodamos en esta perra [18:44] rauchg_: HAHAHAHA [18:44] rauchg_: that's such an inaccurate translation [18:44] bradleymeck_: sshhh i may or may not have flash running in node [18:45] JimBastard: i saw esta perra [18:45] JimBastard: roaming in the female dog? [18:45] DTrejo__: :) [18:45] JimBastard: mi espanol es muy malo [18:45] stagas has joined the channel [18:45] DTrejo__: "thats" [18:46] JimBastard: hola, me llamo senior lenche, yo quero ir [18:46] V1: rauchg_: It's already possible to code "actionscript" on the serverside :) [18:46] JimBastard: donde esta mi abuelo [18:46] creationix: rauchg_: btw, where are you from? [18:46] JimBastard: yo estoy fumando en el bano por favor [18:46] rauchg_: creationix: Argentina [18:46] jetienne: as3 got some nice points, like variable typing [18:46] rauchg_: i speak argentinean english [18:46] bradleymeck_: true, but running the flash itself is fun and hilarious, its like watching a chicken with its head cut off [18:46] bmizerany has joined the channel [18:46] creationix: rauchg_: all, I speak Mexican spanish, we probably can't communicate ;) [18:46] creationix: s/all/ahh/ [18:46] JimBastard: server side actionscript is fucking terrible [18:46] rauchg_: hahaha we can [18:46] JimBastard: NEVER AGAIN WILL I WRITE IT [18:46] rauchg_: we should have tried [18:47] rauchg_: i speak several spanish accents [18:47] creationix: rauchg_: well, I've been working as a programmer the last 8 years, so not much spanish practice there [18:47] V1: JimBastard Atleast it's better than writing your backend in xml files.. I mean coldfusion [18:47] JimBastard: typical CF ignorance [18:48] JimBastard: ill take CF > everything but node any day of the week [18:48] bradleymeck_: anyone have problems doing a fresh clone on node [18:48] tilgovi has joined the channel [18:48] bradleymeck_: havent used actionscript in years, last time was just too painful [18:49] jetienne: flash is too buggy to be fun. and too closed [18:49] DTrejo__: JimBastard why cf? [18:50] JimBastard: DTrejo__: i just learned to use it in 2001, and it treated me VERY well for MANY years. but its totally dead now, has been for a while [18:51] JimBastard: was rolling out pimp ass websites in days when people were stumbling with php and basic asp [18:51] DTrejo__: JimBastard: there's a company I know that is dieing to find cf programmers, they're trying to move their old codebase into the present [18:51] JimBastard: DTrejo__: not surprised [18:51] JimBastard: finding a good CF developer is not easy [18:52] JimBastard: its easy to find someone who knows CF, but to be a good developer and know CF is rare [18:52] creationix has left the channel [18:53] mikeal: webdev radio had an interview with some CF badass a while back [18:53] bbn: using express, what's the recommended way of mapping two different URLs to the same function? eg. '/contest/:key1/entry/:key2' and '/entry/:key2/contest/:key1' [18:53] stagas: webdev radio? [18:53] mikeal: http://webdevradio.com/ [18:53] _announcer: Twitter: "How to easily check if you are leaking globals in #nodejs http://gist.github.com/486093" -- Arnout Kazemier. http://twitter.com/3rdEden/status/19276178317 [18:53] EyePulp has joined the channel [18:53] mikeal: http://webdevradio.com/index.php?id=103 [18:53] JimBastard: brb [18:54] tjholowaychuk: bbn: just have function foo(){}; app.get('...', foo); app.get('......', foo) [18:54] bbn: can do. [18:54] EyePulp: yo ho.... ho [18:55] bbn: node is fun [18:56] JimBastard: huzaaah [18:56] mikeal: this is my favorite blog [18:56] mikeal: http://dailysandwich.tumblr.com/ [18:56] sudhirj has left the channel [18:56] kassens has joined the channel [18:57] tjholowaychuk: whoop, express github example has compare view [18:57] JimBastard: mikeal: prepared to be one-upped [18:57] mjr_: mikeal: speaking of JavaScript, the line at this place has finally gone down. http://theamericansf.com/ If you are in SF sometime, we could get a super fucking trendy sandwich. [18:57] JimBastard: mikeal: http://scanwiches.com/ [18:58] sudhirj1 has joined the channel [18:58] mikeal: oh man, they are scanned on a copier [18:58] mikeal: that is sick [18:59] JimBastard: :-) [18:59] mjr_: Scanwiches. [18:59] wattz: has anyone ported jake to node yet? [18:59] mjr_: That's awesome. [19:00] mikeal: wattz: jake uses the blocking JSGI spec last time i checked [19:00] mikeal: that won't work in node [19:00] wattz: ahh [19:00] mikeal: wait, am i thinking of the right thing? [19:00] mikeal: that's the middleware thing right? [19:00] wattz: jake the js port of rake [19:00] wattz: or make. [19:00] mikeal: oh no [19:00] mikeal: that's ported [19:00] mikeal: kind of [19:00] mikeal: mde has one [19:00] wattz: though i think make is a stretch [19:00] mjr_: wow, too much looking at sandwiches on the internet. Must now get get a real sandwich. [19:00] _announcer: Twitter: "If you're developing stuff with node.js, you should check Connect out. http://northpole.sg/3N" -- Kenny Shen. http://twitter.com/kenny_shen/status/19276620299 [19:01] tjholowaychuk: yeaaa you should [19:01] mikeal: http://github.com/mde/node-jake [19:01] mikeal: wattz: ^^ [19:01] wattz: oh sick [19:01] wattz: loading java to run jake is painful [19:01] pgriess: tjholowaychuk/creationix: any chance you guys could put a license up for spark? i can't start using it until i can get it approved by legal :-/ [19:01] sudhirj1 has left the channel [19:01] mikeal: yup [19:01] sudhirj1 has joined the channel [19:02] _announcer: Twitter: "My second doodle with node.js - http://mossdom.northpole.sg/" -- Kenny Shen. http://twitter.com/kenny_shen/status/19276695836 [19:02] mikeal: mde is awesome, he's been waiting for js to work well outside the browser for so long that once he got in to node he just replaced every ruby thing he ever needed :) [19:02] tjholowaychuk: ACTION lunch [19:02] softdrink has joined the channel [19:02] benburkert has joined the channel [19:03] mikeal: ok [19:03] mikeal: that is really funny [19:03] mikeal: http://mossdom.northpole.sg/ [19:03] wattz: mikeal: i wonder if my narwhal jake file will work seemlessly [19:03] mikeal: this thing is basically node sitting between CouchDB and the browser doing what CouchDB already does :) [19:04] wattz: has couch been used in a high traffic spot yet? [19:04] sudhirj1 has left the channel [19:04] mikeal: i don't think so [19:04] wattz: or a situation where it gets a ton of usage [19:04] mikeal: wattz: the BBC [19:04] mikeal: :) [19:04] sudhirj1 has joined the channel [19:04] wattz: because Im looking using Mongo from here out [19:04] mikeal: UbuntuOne has a million users, with around 300-400K active [19:04] mikeal: all of them doing replication [19:04] mikeal: Meebo has an insane amount of users too but they don't publish the numbers [19:04] mikeal: the BBC does tho [19:05] wattz: i should revisit couch, last time i checked it wasn't to much more than a really basic system [19:05] mikeal: couch has a lot [19:05] wattz: so it replicates? [19:05] wattz: cluster? [19:05] mikeal: and it's not always easy to find what you're looking for [19:05] mikeal: replication is peer-to-peer [19:05] mikeal: eventual consistency [19:06] wattz: peer-to-peer? [19:06] mikeal: like master/master but better [19:06] wattz: that makes me thing user to user [19:06] wattz: ahh [19:06] wattz: gotcha [19:06] mikeal: you can take a node offline, like your mobile phone [19:06] mikeal: add data, query data, then when it comes back online it'll sync with the cloud CouchDB [19:06] mikeal: go ahead and play with it [19:06] wattz: ahhh nice [19:06] wattz: i will [19:07] aglemann has joined the channel [19:07] mikeal: http://www.couch.io/get [19:07] wattz: here at work we do about 680k to 1mil visitors a day [19:07] mikeal: you'll have a futon in about 2 seoncds [19:07] mikeal: what is your peek writes per second? [19:07] bradleymeck_: this http.createClient thing is killing me [19:07] jakehow has joined the channel [19:07] wattz: that Im not sure about [19:07] mikeal: bradleymeck_: you used my request library [19:07] wattz: I don't get to go back to that websphere mess [19:07] mikeal: wattz: GETs are absurdly fast [19:07] bradleymeck_: mmm? [19:08] mikeal: people usually max out their rproxy before they max out the concurrent GETs to CouchDB [19:08] wattz: looking at this for some projects other than main site [19:08] mikeal: http://github.com/mikeal/node-utils/tree/master/request [19:08] mikeal: bradleymeck_: ^^ [19:08] sh1mmer has joined the channel [19:09] aglemann has left the channel [19:09] bradleymeck_: tis a bit higher than what i want, but ill see if that fails too, seems http parser is borking [19:09] zapnap has joined the channel [19:09] wattz: and i was making my node framework just mongo, but i now have to read up on couch, thanx mikeal [19:09] mikeal: mongo isn't great on node yet [19:09] mikeal: their C library is blocking :( [19:09] wattz: eh [19:09] mikeal: someone wrote a pure node one [19:10] mikeal: which is awesome, called mongoose [19:10] wattz: mongoose [19:10] wattz: it's based on native though [19:10] mikeal: but the 10gen guys are saying not to use it [19:10] mikeal: probably because they want to change the BSON or wire protocol from time to time [19:10] mikeal: and they control that by landing changes in the C library along with the server [19:10] JimBastard: screw 10gen [19:10] wattz: couch support good? [19:11] mikeal: well, i work for Couchio [19:11] mikeal: :) [19:11] JimBastard: i still dont get why mongo doesnt have a baked in rest api [19:11] wattz: mikeal: haha nice [19:11] JimBastard: i mean really [19:11] mikeal: we offer enterprise support [19:11] wattz: JimBastard: i wondered that too [19:11] mikeal: the community is awesome, because it's apache [19:11] JimBastard: <3 couch [19:11] wattz: JimBastard: doesn't seem obvious? [19:11] mikeal: well [19:11] mikeal: Mongo isn't optimized for concurrentcy [19:11] wattz: well i will be writing this framework in C++ [19:11] mikeal: er concurrency [19:12] mikeal: they are trying hard to replace MySQL/Postgres in the LAMP stack [19:12] mitkok has joined the channel [19:12] mikeal: so when you have a couple application servers that are Ruby, Python, PHP, whatever [19:12] wattz: mysql i can tolerate, pg....ew... [19:12] mikeal: talking to a MongoDB it's not a lot of concurrent connections [19:12] tjholowaychuk: wishes mongoose did not have the orm stuff [19:12] mikeal: and that's what they optimize for [19:12] bradleymeck_: yours seems to grab it fine... odd [19:13] wattz: im still on the fence about writing an orm style in to this framework [19:13] sudhirj1: tj: what's wrong with the mongoose orm? [19:13] mikeal: bradleymeck_: is it a forward or something? my library follows redirects by default [19:13] bradleymeck_: nope, i follow redirects too, just blows up on that one [19:14] mikeal: there is something to be said for writing a good low level library and then building the ORM on top instead of integrated [19:14] zapnap has joined the channel [19:14] wattz: mikeal: yeah, that is my thinking [19:14] mikeal: but then again, that's what felixge tried to do with his couchdb library but everyone who wants a better abstraction is just writing allt he low level stuff again [19:14] charlenopires has joined the channel [19:14] wattz: but that was when i was still thinking mysql, before istarted reading about mongo [19:14] sudhirj1 has left the channel [19:15] mikeal: i guess that's a little different tho since CouchDB is http and node already supports http so damn well [19:15] bradleymeck_: oho, i didnt default to 443 for https [19:15] wattz: yeah [19:15] maushu has joined the channel [19:15] mikeal: you know about the durability issues right? [19:15] mikeal: as long as you're aware of it you can keep yourself from getting bitten [19:16] JimBastard: mikeal: we have been working hard on a ORM with couch [19:16] JimBastard: the ORM is pluggable though, couch is default engine [19:16] sudhirj has joined the channel [19:16] mikeal: i'm still on the fence about ORM's for non-SQL databases [19:16] JimBastard: its an ODM really [19:16] mikeal: i'd like to see a really nice one [19:16] JimBastard: http://github.com/indexzero/resourcer [19:16] JimBastard: we are working on it i swear! [19:17] mikeal: haha [19:17] mikeal: no docs! [19:17] maushu: Holy crap. [19:17] JimBastard: its very unreleased [19:17] maushu: I need to make some graphs! [19:17] JimBastard: we have been bugging cloudhead to kick it up, but hes busy [19:17] mikeal: ORM was a good abstraction for SQL because it was so f'ing painful [19:17] JimBastard: once we get relationships working and tested ill wild out on docs [19:17] mikeal: but if you just store JSON, or something JSON like [19:17] mikeal: and you're schemaless [19:17] JimBastard: impedance mismatch ftl [19:18] mikeal: just let me store and get stuff without all this classy boiler [19:18] V1: YES! FINALLY I have cracked node's net.Stream's nuts ! [19:18] JimBastard: yeah but mikeal , you still dont want to think about things like searches and joins [19:18] maushu: Ow. [19:18] V1: It's working [19:18] JimBastard: you want some sugar syntax for that shit right? [19:18] mikeal: you mostly don't need joins [19:18] V1: ACTION does an evil laugh "Muhhahahaha" [19:18] JimBastard: mikeal: assuming you denormalize ? [19:18] mikeal: the majority of joins in SQL are because data was split apart before writing it in order to define relationships [19:19] mikeal: if you look at a typical transaction it's like 8 writes of rows for what would be one document in couch/mongo [19:19] mikeal: so all those simple joins aren't needed anymore [19:19] JimBastard: assuming you denormalize? [19:19] mikeal: don't normalize data [19:19] JimBastard: then what happens when you need to update? [19:19] JimBastard: multiple updates? [19:19] mikeal: just write the data [19:19] mikeal: then write a view that normalized an index [19:20] mikeal: that's actually schemaless [19:20] mikeal: if you normalize first and then base the indexing off of the location of k/v pairs in the document then it's basically a schema [19:20] JimBastard: yep [19:20] mikeal: and schema sucks [19:20] rgl has joined the channel [19:20] mikeal: well, schema like that [19:20] JimBastard: i just dont want to have to think about this stuff, want it all magic to my app [19:20] sudhirj: JimBastard: doesn't denormalizing your data degrade sql into nosql? [19:21] mikeal: i actually like JSON-schema, i'm gonna use it for some form validation stuff [19:21] bradleymeck_: sweeeeet, ty mikeal [19:21] mikeal: bradleymeck_: request is working out for yah? [19:21] JimBastard: mikeal: our ORM has built in JSON-schema validation [19:21] bradleymeck_: not using it, but did find out what was wrong by looking at it [19:21] mikeal: JimBastard: where does it store it? [19:21] mikeal: the json-schema? [19:22] ryan_gahl: schema doesn't suck, bottom up schema sucks [19:22] bcurren has joined the channel [19:22] bradleymeck_: gmail is running, albeit failtasticly [19:22] JimBastard: mikeal: im not sure about that part yet, i think the models might get stored in the DB. [19:22] JimBastard: cloudhead is the lead dev, indexzero is the number 2 guy. im more of the yell sourcer on this one [19:22] mikeal: JimBastard: i'll have to sit down with you next week [19:22] mikeal: cause i'm going to need to build something that does json-schema validation stuff in the db [19:22] JimBastard: mikeal: indexzero too (hes my bidness partner and roommate) [19:23] ryan_gahl: you guys look at Perstore? [19:23] JimBastard: for sure, sounds like a plan [19:23] mikeal: you should be able to do it if you add a "type" attribute and then a json-schema for each type [19:23] JimBastard: http://github.com/indexzero/resourcer/blob/master/lib/resourcer/schema.js [19:23] mikeal: store that on a design document [19:23] JimBastard: http://github.com/indexzero/resourcer/blob/master/lib/resourcer/validator.js [19:23] mikeal: then write a dynamic validate_doc_update function [19:24] mikeal: ryan_gahl: perstore looks cool, it's a little early still [19:24] ryan_gahl: suhirj: sql to nosql is NOT a degradation [19:24] ryan_gahl: sudhirj* [19:24] mikeal: actually [19:24] mikeal: if you just want a key/value store [19:24] mikeal: you can make postgres do it [19:24] sudhirj: lol [19:24] mikeal: and it's pretty damn fast [19:24] sudhirj: I know [19:24] ryan_gahl: :) [19:25] mikeal: nosql is just a buzzword [19:25] sudhirj: ryan_gahl: I running away from sql as fast as I can [19:25] ryan_gahl: buzzword is just a buzzword [19:25] aurynn: NoSQL really means "Thinking relationally is really hard." [19:25] sudhirj: lol [19:25] aurynn: Which it is. [19:25] ryan_gahl: wrong [19:26] sudhirj: actually, these days, thinking non relationally is really hard [19:26] aurynn: it also means "mySQL sucks" [19:26] aurynn: ;) [19:26] sudhirj: everyone is too used to sql dbs [19:26] JimBastard: http://en.wikipedia.org/wiki/Object-relational_impedance_mismatch [19:26] ryan_gahl: it means "defining relationships from the bottom up and then doing a lot of extra work to flatten them for consumption is BAD" [19:26] JimBastard: says it all [19:26] JimBastard: The object-relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being used by a program written in an object-oriented programming language or style; particularly when objects or class definitions are mapped in a straightforward way to database tables or relational schemata. This practice has been recommended and documente [19:26] aurynn: ryan_gahl, define "bad" [19:26] mostlygeek_ has joined the channel [19:27] aurynn: hard and imposing a serious impedance mismatch between relation and object logic != bad. [19:27] ryan_gahl: "unneccesary overhead, slower performance, increased latency... " [19:27] JimBastard: also, when did OODBMS start getting called NoSQL? [19:27] bcurren: has anyone upgraded to express 1.0? it doesn't look like it includes support in the load path any more [19:28] ryan_gahl: i'm not talking in terms of mindmapping, but real bonified performance benefits [19:28] sudhirj: JimBastard: probably just an easy way to group the doc dbs, key values stores, etc.. sql vs everyone else [19:28] ryan_gahl: er "bona fide"? [19:28] aurynn: ryan_gahl, which is why benchmarks prove that the good rdbms's still outperform the oodbmses? [19:28] ryan_gahl: lol [19:28] sudhirj: bcurren: i don't think it does [19:29] ryan_gahl: i can play that game too [19:29] aurynn: You can make anything fast if you throw enough hardware at it. [19:29] ryan_gahl: benchmarks prove the opposite [19:29] ryan_gahl: there [19:29] sudhirj: bcurren: i had to go an manually add all the support/libs, even for the examples [19:29] bcurren: i see a make install for connect but i'm not sure i understand what this is doing [19:29] adinardi has joined the channel [19:29] _announcer: Twitter: "OH "buzzword is just a buzzword" #node.js Ryan Gahl (*not Dahl*)" -- Mikeal. http://twitter.com/mikeal/status/19278229123 [19:29] bcurren: sudhirj: ok. just making sure i'm not crazy [19:29] sudhirj: bcurren: it puts a copy of connect in your .node_libraries dir [19:29] bcurren: is that for npm? [19:29] mikeal: very little data looks relational before you break it apart so that a DB can handle it [19:30] sudhirj: bcurren: which happens to be on the path that node looks in for a require() [19:30] bcurren: ah, i didn't know that [19:30] mikeal: it's just that databases aren't simple and all we had were relational ones so we kept breaking apart all our data to fit [19:30] mikeal: now we don't have to, and it's awesome [19:30] sudhirj: bcurren: i don't think it has anything to do with npm, but i could be wrong [19:30] mikeal: if you really do have relational schema'd up data then use an RDBMS [19:30] mikeal: they are really good with that :) [19:31] bcurren: sudhirj: it all makes sense. not sure i dig the whole make install to get express working. [19:31] sudhirj: mikeal: yeah, there a still a lot of apps i'd prefer to write with an rdbms [19:31] ryan_gahl: mikeal: right, normalization is thought to be important in and of itself, and it's just not [19:31] jsilver has joined the channel [19:32] ryan_gahl: dude1: "we have data", dude2: "is it normalized" [19:32] mikeal: right, normalizing your data to make it nicer for you to consume is one thing, normalizing so that it fits the conceptual model of your database means you're probably using the wrong database [19:32] sudhirj: bcurren: yeah, express and connect in the .node_libraries folder should remove the need to do any extra requires... probably makes sense to use it for other libraries too [19:32] sudhirj: bcurren: need to make sure you install in production too... [19:33] ryan_gahl: my approach is to allow the schema to evolve from the top down [19:33] ryan_gahl: i.e. the application dictates it [19:33] creationix has joined the channel [19:33] sudhirj: ryan_gahl: if its a rdbms then its very difficult to do that, isn't it? you have to think in terms of tables and joins, like it or not [19:34] ryan_gahl: which is why document stores are great [19:34] mikeal: well [19:34] mikeal: MongoDB requires some schema for indexing [19:34] ryan_gahl: rdbms is only currently more useful where reporting is concerned [19:34] creationix: loll, I was hanging out in #nodejs and wondering why it was so quet [19:34] creationix: *quiet [19:34] mikeal: hahaha [19:35] ryan_gahl: mikeal: which is why i prefer couch [19:35] ryan_gahl: map/reduce indexing [19:35] mikeal: ACTION smiles :) [19:35] Aikar: mongo doesnt have a schema [19:35] mikeal: Aikar: indexing does [19:35] Aikar: you pass it varying 'documents' [19:35] mikeal: you turn on indexing per key [19:35] mikeal: so you have to use the same attribute name and place to pull that index [19:35] sudhirj: ryan_gahl: rdbs still rule for accounting and financial apps too [19:35] Aikar: hmm? so db.add({x:3}) x isnt auto indexed? [19:35] _announcer: Twitter: "doing some stuff with #nodejs, saw a keyboard cat on 500 error lol" -- Jordy van Gelder. http://twitter.com/shockienl/status/19278595027 [19:35] mikeal: it's like this [19:36] mikeal: db.add({"people":['a','b']} [19:36] creationix: mikeal: nStore needs some nice and easy map-reduce query system [19:36] mikeal: db.add({"person":"c"}) [19:36] ryan_gahl: sudhirj: that's just because of ACID compliance... that will get better in nosql here soon too [19:36] creationix: the stream() and all() are hard to use [19:36] mikeal: i can't get an index of all the people when the types and attribute names vary [19:36] mikeal: that's why couchdb uses map [19:36] monkeyb has joined the channel [19:37] ryan_gahl: map/reduce FTW [19:37] mikeal: so that you can emit a k/v pair regardless of where and how they are defined in differing documents [19:37] mikeal: then you have a normalized index without normalizing the data [19:37] ryan_gahl: exactly [19:37] mikeal: ryah: couch is ACID compliant [19:37] mikeal: has been for like 5 versions [19:37] ryan_gahl: (not ryah) [19:37] ryan_gahl: :) [19:37] Aikar: have any of you guys used mongo in big applications? someone linked me to some artciles saying mongo had some issues and data loss. [19:37] mikeal: whopps [19:37] mikeal: lazy tab completion [19:38] mikeal: Aikar: that was my article :) [19:38] Aikar: lol [19:38] ryan_gahl: yeah, but still lacking in ACID/transactional features compared to rdbms [19:38] mikeal: it's ok if you know what you're getting in to [19:38] sudhirj: ryan_gahl: not just that... i don't see running a query on couch db goes 'whats the average spend between 21st and 23rd july for these categories?'... that would need multiple queries and a lot of pre defined map reduce jobs [19:38] ryan_gahl: but coming along [19:38] sudhirj: same problem as the app engine [19:38] mikeal: the recommended default configuration is 2 slave replicas [19:38] mikeal: with monogdb [19:38] mikeal: sudhirj: nope [19:38] mikeal: you can do that [19:38] mikeal: i do that all the time actually [19:39] ryan_gahl: sudhirj: not multiple queries... just a more-than-one-pass map/reduce [19:39] mikeal: map : function ( doc ) { emit(doc.timestamp, doc.spent) } [19:39] mikeal: reduce : _sum [19:39] ryan_gahl: the reduce functions are meant to be fed into further reductions as needed [19:39] sudhirj: mikeal: but would the map/reduce have to run on demand? [19:39] mikeal: query the view with descending=true,startkey=ISOTIMESAMP,endkey=ISOTIMESTAMP [19:39] ryan_gahl: noooooo [19:39] ryan_gahl: it's like an index [19:40] mikeal: sudhirj: map/reduce in CouchDB is incremental [19:40] ryan_gahl: right [19:40] mikeal: so the k/v pair and reduce are stored in a btree [19:40] mikeal: and updated when the documents update [19:40] mikeal: so the queries are all against an on-disc btree [19:40] sudhirj: mikeal: so it maps first, but reduces on demand? [19:40] ryan_gahl: and each layer of reduction is in the btree [19:40] mikeal: that's harder to explain [19:40] mikeal: what it actually does is store the incremental reduce values up the btree nodes [19:41] mikeal: so it only has to run the reduce again on a few of the outliers [19:41] ryan_gahl: ACTION nods [19:41] ryan_gahl: :) [19:41] mikeal: and using reduce : "_suM [19:41] sudhirj: mikeal: ah... this is starting to get very interesting [19:41] mikeal: whoops [19:41] mikeal: reduce : "_sum" [19:41] ryan_gahl: pretty much, couch knows what it's doing [19:41] sudhirj: i see what you guys mean now [19:41] mikeal: instead of a reduce in javascript means the sum is actually happening in erlang [19:42] creationix: mikeal: think it would be good to add such indexing to nStore eventually [19:42] creationix: mikeal: keep it all in ram [19:42] mikeal: http://www.mikealrogers.com/2010/06/couchdb-builtin-reduce-functions/ [19:42] mikeal: creationix: you just need a good btree [19:42] creationix: aren't js objects btrees under the hoot [19:42] creationix: *hood [19:42] creationix: or some other effecient structure [19:43] mikeal: at some point i found a red/black tree in javascript but i lost it [19:43] mscdex: node.js rules! [19:43] JimBastard: ahaha mikeal i forgot we use the exact same blog layout [19:43] mikeal: no [19:43] mikeal: they aren't btrees [19:43] creationix: mikeal: well, even if they were, you can't query them [19:43] mikeal: Simplish :) [19:43] creationix: so I guess it doesn't matter [19:43] mikeal: keys are sorted by when you add them [19:43] bourne has joined the channel [19:43] mikeal: and you can't have duplicate keys [19:44] creationix: btrees can't have duplicated either right? [19:44] creationix: ACTION really can't type today [19:44] mikeal: yes they can [19:44] mscdex: there is b+trees in js [19:44] creationix: ahh, then it's quite different [19:44] creationix: I see [19:45] ryan_gahl: right, you could get to the same value using a different path based on criteria for example, ideally in the same number of steps [19:45] skampler: but aren't you periodically supposed to run map/reduce to generate something like statistics, and then query the generated data? [19:45] mikeal: js object keys are more like set than a btree [19:45] creationix: mikeal: ok, assuming I have btrees in pure js, how would I use that to make map-reduce smart like it is in couch [19:45] mikeal: but they do have some ordering so they are a little different [19:45] skampler: it seems inefficient to run a map reduce job for each query [19:45] ryan_gahl: skampler: it's not run for each query [19:45] skampler: ok then [19:45] creationix: skampler: but it is for nStore, that's why I'm looking to couch for ideas [19:45] ryan_gahl: it's run when the data changes, and only incurs incremental overhead based on the changeset [19:46] mikeal: creationix: you just run the map, take the k/v pairs, add them to the btree and then keep a reference to nodes you created in the btree in the meta for each document [19:46] mikeal: then if a document is updated you remove the entries in the btree [19:46] mikeal: and add them again [19:46] mikeal: as you can see, you need MVCC for that [19:46] mscdex: here's the b+tree code: http://gist.github.com/480632 [19:46] sudhirj: ryan_gahl: and for reduces where the limits aren't known, it just keeps a bunch of incremental values ready? [19:46] mikeal: unless you just want to generate the whole btree on each new/updated document but keep it cached for faster queries [19:47] mikeal: sudhirj: the btree parent nodes keep the reduce values [19:47] creationix: MVCC on the btree? [19:47] mikeal: so when you query across the btree only the start and end parent nodes are going to have to be recalculate, the parents sorted in between are already known [19:47] tjholowaychuk: the hosted couch stuff looks sweet [19:47] mikeal: creationix: MVCC on the document store [19:48] sudhirj: http://dosync.posterous.com/22516635 - this guy's done a simple test on couch vs mongo... do his numbers hold water? [19:48] ryan_gahl: http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views [19:48] huyhong has joined the channel [19:48] mikeal: tjholowaychuk: yup, you get a couch in like 2 seconds [19:48] confounds has joined the channel [19:48] mikeal: sudhirj: by default, MongoDB doesn't return a response for writes [19:48] sudhirj: tjholowaychuk: any idea when heroku will roll out general node.js support? that would rock [19:48] tjholowaychuk: mikeal: got :D havent used it yet but yeah thats dope, beam was the reason i didnt like couch [19:48] mikeal: so that's just testing how fast socket.write() works [19:48] tjholowaychuk: sudhirj: they have it, sorta [19:49] huyhong has left the channel [19:49] mikeal: those documents it's writing in that time frame are accessible in all other databases, but in MongoDB you don't know [19:49] ryan_gahl: right, you get increased operations/time-period in mongo but don't have ACID [19:49] mikeal: you have to change the default client options to get a response when the written data is actually available [19:50] mikeal: it's not just not having ACID, there are a lot of differences between Mongo's view of durability and other databases [19:50] tjholowaychuk: aahah "doing some stuff with #nodejs, saw a keyboard cat on 500 error lol" [19:50] tjholowaychuk: my bad [19:50] sudhirj: tjholowaychuk: hmm.. i'll try requesting access. will express work on heroku? I'm not sure if they'll sandbox node in some way [19:50] tjholowaychuk: sudhirj: it should, if you conform to their requirements (cant remember, server.js, and some env var for the port) [19:50] ryan_gahl: mikeal: was it you who wrote that article on mongo's "durability" [19:50] mikeal: yup [19:50] ryan_gahl: heh [19:50] bbn: redis [19:51] _announcer: Twitter: "great to see @ManningBooks is working on MongoDB in Action and NodeJS in Action! Looking forward to both!" -- David Feinberg. http://twitter.com/rawberg/status/19279437651 [19:51] ryan_gahl: good writeup [19:51] shockie has joined the channel [19:51] mikeal: tahnks [19:51] mikeal: redis is AWESOME! [19:51] ryan_gahl: i cannot get into redis [19:51] creationix: when did manning announce my node book? [19:51] tjholowaychuk: mikeal: did you help that project? or just really stoked about it? [19:51] mikeal: redis? [19:51] bbn: redis is amazing [19:52] ryan_gahl: the commands are weird [19:52] ryan_gahl: to me [19:52] ryan_gahl: but admittedly haven't sat down with it for play time [19:52] mikeal: tjholowaychuk: you mean redis? [19:52] sudhirj: it does seem quite promising, though [19:52] mikeal: i'm just a happy user [19:52] tjholowaychuk: ah :) [19:53] bourne: anyone know of any way to change a global variable outside the lexical scope of a callback function? [19:53] mikeal: Redis is a place on the network to store your globals [19:53] sudhirj: mikeal: does redis also achieve that speed by not returning on writes? [19:53] mikeal: it makes it super simple to scale your application processes horizontally [19:53] mikeal: sudhirj: no, Redis has mad durability [19:53] mikeal: it gets that write performance by not including many features [19:53] mikeal: and keeping everything in memory [19:54] mikeal: but it does keep an append-only log so you can recover from restarts and crashes [19:54] sudhirj: mikeal: isn't there a wait period before it writes to disk? [19:54] mikeal: you can enable that but it's not on default [19:54] ryan_gahl: mikeal: you basically use it like a souped up memcache? [19:54] mikeal: most db's don't ship with that [19:54] shockie: if it sits in memory, then not [19:54] mikeal: none of the relational databases return response after fsync by default [19:55] tjholowaychuk: creationix: book info leaked? [19:55] mikeal: ryan_gahl: yeah, like memchached with more primitives and a realtime interface [19:55] mikeal: the channels stuff is the best part of redis [19:55] ryan_gahl: see, i'd use mongo for that in front of a couch system maybe [19:55] tjholowaychuk: its sad ive mad way more on my ebook than my real book [19:55] tjholowaychuk: stupid publishers [19:55] creationix: tjholowaychuk: no clue http://twitter.com/rawberg/status/19279437651 [19:56] tjholowaychuk: creationix: ah weird! [19:56] sudhirj: mikeal: yeah, the pub sub can be incredibly useful [19:56] mikeal: sudhirj: CouchDB has it too [19:56] shockie: i'm an heavy user of couch-db, i relay like that db-type [19:56] mikeal: every database should have it [19:56] mikeal: http://books.couchdb.org/relax/reference/change-notifications [19:57] skampler: i think you could use pop/sub to scale redis [19:57] sudhirj: mikeal: but the speed that redis gives it a massive edge... especially for a simple schema that fits the key values model [19:57] bbn: redis is an object server [19:57] zapnap has joined the channel [19:57] mikeal: sudhirj: if it all fits in memory, you can't beat redis [19:57] bbn: sets, ranked lists, etx [19:57] mikeal: redis is super good at being redis [19:57] mikeal: and continues to do so by not trying to be like some other database [19:57] bourne has left the channel [19:58] shimondoodkin: just courios is there change negitiation in mongodb or last update time? [19:58] bbn: hey, couch experts: [19:58] bbn: is possible to use external data in a map-reduce stage? [19:58] shockie: no [19:58] mikeal: bbn: no [19:58] mikeal: by design [19:58] ryan_gahl: no, and is bad joojoo [19:58] bbn: right, that's what i though [19:58] bbn: what's the design motivation there? [19:59] shockie: because then it's has relations;) [19:59] mikeal: the btree is updated based on the document revision [19:59] mjr_: I think I want something like redis, but that doesn't need to have all of the values in memory. [19:59] mikeal: so if you allow external data to influence it the btree will be out of sync with the external [19:59] shockie: look at mongo, voldemort, couchdb or cassandra [19:59] bbn: redis virtual memory is pretty good [19:59] mjr_: I want to do set operations and stuff like that, but my total data set is too large for RAM. [19:59] mikeal: cassandra is pretty awesome too [19:59] bbn: you really just have to have the keys in memory [19:59] ryan_gahl: exactly... each stage needs to autonomous too [19:59] mikeal: bbn: is that actually working yet? [20:00] bbn: yep [20:00] shockie: cassandra rocks, but onyl if you need the scalability [20:00] mjr_: bbn: you mean you don't always have to keep the values in RAM in redis? [20:00] javajunky has joined the channel [20:00] bbn: i have millions of objects fitting in 256MB of RAM [20:00] mikeal: mjr_: the keys are in memory, values in virtual memory [20:00] sudhirj: shockie: yeah, the docs seem to take for granted that you're running a server farm [20:00] shockie: imagine those db server with 64 gig of ram [20:01] mikeal: mjr_: it's a new experimental branch tho [20:01] mikeal: at least last time i checked [20:01] shockie: it's designed for cluster networking by default [20:01] mape: This channel has way to much activity to backlog :( [20:01] mjr_: Ohh, OK. I thought I read the docs very recently that clearly said the entire dataset needs to fit into memory. [20:01] sudhirj: mikeal: you mean using virtual memory [20:01] mikeal: redis VM mode, yeah [20:02] mikeal: mjr_: they did just land optimizations that greatly reduced the memory usage tho [20:02] mikeal: so you can get a lot more in memory [20:02] jxson has joined the channel [20:02] mikeal: if the issues wasn't the size of the values but the sheer volumn of value [20:02] mikeal: er values [20:02] mikeal: then it's much more optimized [20:03] mjr_: How is the node redis client? [20:03] mjr_: Fast? [20:04] skampler: mjr_: redis-node-client spends a lot of time building buffers and arrays, and is not fully streaming [20:04] sudhirj: mikeal: so when redis restarts does it read its entire store into the memory again? [20:04] benburkert has joined the channel [20:04] skampler: but it's still pretty fast [20:04] mjr_: skampler: that's a bummer. Is there only one? [20:04] mikeal: yeah, node-redis needs a reboot to be better with streams and buffers, it predates both of them [20:05] behmann has joined the channel [20:05] shockie: sudhirj: off course, that's why he keeps a append only log on disk:) [20:06] shockie has left the channel [20:06] sudhirj: shockie: yeah, i'm trying to see how redis could scale on something like a rackspace cloud server [20:07] benburke_ has joined the channel [20:08] brianmario has joined the channel [20:10] mikeal: they have some sharding plans too [20:10] mikeal: i'm not very enthusiastic about them tho [20:10] mjr_: couchdb needs some sharding plans, IMO. :) [20:10] mikeal: we do, it's called "give every user a database" [20:10] mikeal: :P [20:10] mjr_: scale down, AND up. [20:10] mikeal: but in all seriousness, there are two already written [20:11] mikeal: Cloudant has one in pure erlang [20:11] mikeal: which they say they are going to open source [20:11] mjr_: oh neat [20:11] mikeal: and there is lounge [20:11] mikeal: which Meebo uses and is open source [20:11] mikeal: i'm actually advocating that we write a new one from scratch [20:11] mjr_: Yeah, something about lounge made me nervous, and I can't remember what it was anymore [20:11] tilgovi: :-P [20:11] mikeal: Twisted :P [20:12] javajunky has joined the channel [20:12] mikeal: haha [20:12] tilgovi: is it because it's crazy spaghetti, requries you to recompile an (old) nginx, twisted, or the manual management of shards? [20:12] mikeal: tilgovi == lounge committer [20:12] Yuffster has joined the channel [20:13] mikeal: if it was less hot, or we had better air conditioning here [20:13] mikeal: i would have keep-alive working in node [20:14] mikeal: JimBastard: you get the details worked out for the meetup? [20:14] mjr_: Oh yeah, I think maybe was what it was. [20:14] mjr_: I think I tried to set it up, and I just got confused. [20:14] mikeal: i want to blog about it today [20:14] JimBastard: i literally just left another voicemail the chick is being a bit flakey on me [20:14] JimBastard: been in meetings all day [20:15] JimBastard: it should be fine.... [20:15] mjr_: This whole "scaling up" thing make riak really attractive to me. [20:15] JimBastard: its a huge place, ill post the deets [20:15] mikeal: hehe [20:15] mikeal: well, good look scaling up without buying their tools [20:15] mikeal: they have some damn good tools tho [20:15] mjr_: But I look at riak and I can't figure out what it even does or how it works. [20:15] mikeal: so if you have the money it's worth it [20:15] mjr_: Oh, if you pay them money then it makes more sense? [20:16] JimBastard: mikeal: what time you thinking [20:16] JimBastard: 7? [20:16] mattly has joined the channel [20:16] mjr_: Since I can't figure out how it works, I can't tell if it'll do what I want, and thus, if I should use it. [20:16] JimBastard: 8? [20:16] mikeal: 5 or 6? [20:16] JimBastard: aight [20:16] JimBastard: 6 sounds good [20:16] bradleymeck_: tweet the deets [20:16] mikeal: i think the DC people have gotta head back a little on the early side [20:16] mikeal: so 6 > 8 [20:18] mde: mjr_: FWIW, we're actually looking at Voldemort and Riak. We voted no on Cassandra because FB seems to have abandoned it, and apparently latency of reads/writes across different nodes was mysteriously inconsistent. [20:19] mde: Or maybe just sharding Postgres. :) [20:20] V1: Cassandra is also a nightmare to get it working properly on node. There are really bad and abandoned clients out there. [20:20] JimBastard: posting now mikeal [20:21] mikeal: mde: that Twitter thing is annoying [20:21] mde: mikeal: Which one? [20:21] mikeal: what they basically said was "this thing doesn't do what we wanted it to do, even though everyone told us it didn't do that" [20:22] mde: Oh, their thing with Cassandra? [20:22] mikeal: yeah [20:22] mde: Yeah, they cancelled it. [20:22] mikeal: Cassandra is great [20:22] mde: Seems like they do that a lot though. [20:23] mikeal: it's just not what they needed and they were too stupid to figure it out [20:23] mde: I don't know, the way Coda here described how he went about vetting it -- sounds like it has some serious problems. [20:23] mde: He's pretty fucking meticulous. [20:24] mikeal: it's not optimized yet [20:24] mikeal: hardly anyone has actually optimized yet [20:24] mde: And he said that read/write speeds between nodes were basically unpredictable. [20:24] mikeal: yup [20:24] mikeal: welcome to clustering :) [20:24] JimBastard: aight posted [20:24] mde: Heheh [20:24] JimBastard: ill cross post to nyc.js in a few [20:24] mikeal: disc performance is unpredictable [20:24] mikeal: it's not like CPU and memory where you can dynamically trade off [20:25] huyhong has joined the channel [20:25] mde: I don't think that under optimal conditions the speed should vary quite as widely as what he was describing. [20:25] huyhong has left the channel [20:25] mikeal: it spikes too much [20:25] JimBastard: i am soo fucking amped about eating this lean brisket on saturday [20:25] JimBastard: im not sure if i can wait [20:26] mde: Maybe if the community rallies around and optimizes, it'll get better, but from what I hear people saying, it sounds like FB has moved onto other things. [20:26] JimBastard: moist brisket mmm [20:26] JimBastard: mac and chez [20:26] mikeal: they shouldn't optimize yet [20:26] mikeal: they should finish their features [20:26] mikeal: Riak is pretty cool tho [20:26] mikeal: it's just costly [20:27] mikeal: but if you have money there is no reason not to pay for a good database [20:27] mde: Maybe in a year or two it will be something people can use, but we need real solutions sooner than that. [20:27] mde: Right, we're not apposed to paying. [20:27] teemow has joined the channel [20:27] mikeal: then i would go with Riak [20:28] mde: We just want something that will let us scale in a somewhat predictable way. :) [20:28] zapnap has joined the channel [20:28] mde: Actually, because we do per-comapny networks, sharding Postgres is also totally reasonable. [20:29] mikeal: why don't you just use CouchDB then? [20:29] mikeal: if you're sharding per company network you're fine on CouchDB [20:30] mikeal: then it's dirt simple to scale, you just route HTTP traffic predictably to different couches [20:30] mde: That's actually a really good question -- I don't know if some of the companies are too big? Or if we need some sort of federation? [20:30] mikeal: umn…. CouchDB on my laptop can take the write load from the twitter firehose [20:31] mjr_: The think with riak that I can't figure out is if their map/reduce queries get any sort of caching like the views do in couchdb. [20:31] mikeal: so i doubt any one network at Yammer is higher than that [20:31] mde: Actually one of the other Matts here was asking about how to use Couch for storing traffic and analytics data. [20:31] mostlygeek has joined the channel [20:31] mde: You should come in here and meet some more of the folks. [20:32] JimBastard: nutt? [20:32] mde: Yeah, I don't know if it's an issue of throughput, or DB size, or what. [20:32] mikeal: it's possible you need one gigantic database for some specific use case [20:33] mde: If they're talking sharding Postgres, that wouldn't seem right, but I think right now the leading candidate is Voldemort. [20:33] mikeal: mde: i can go talk when i get back [20:33] mde: Yeah, you should come hang out. [20:33] mikeal: August 3rd? [20:33] mde: Make a plan to go have some beers. [20:34] mikeal: schedule something for the 3rd if it's open [20:34] mde: What day of the week is that? [20:34] mde: Fucking calendars. [20:35] mjr_: If only someone would make some sort of computer-based calendar. [20:35] mde: Yeah, that sounds reasonable. I'll see if people are up for beers on the 3rd. [20:35] bradleymeck_: mikeal i just read keepalive comment on groups, whats wrong with adding a client.connection.write("")? [20:35] mde: mjr_: Or some sort of, I dunno, 'personal information manager' thing that could let you collaborate ... [20:36] mjr_: mde: yeah, I guess. Sounds hard though. [20:36] mde: mjr_: Sadly, it turns out to be very hard, but maybe not for the reasons you'd expect. [20:36] saikat has joined the channel [20:37] javajunky has joined the channel [20:37] mostlygeek has joined the channel [20:37] mikeal: mde: i should talk to them in the office with a whiteboard [20:37] mikeal: and then i can explain everything [20:37] mikeal: then beers :) [20:37] mde: Well, we generally have a lot of beer here in the office, so maybe we can combine the two things. :) [20:38] bmizerany has joined the channel [20:41] cadorn has joined the channel [20:42] wattz: last [20:42] wattz has left the channel [20:42] bradleymeck_: never forget 530 is beer thirty [20:42] wattz has joined the channel [20:42] wattz: wow, irssi just choked [20:42] micheil: isaacs_home: ping? [20:45] sh1mmer has joined the channel [20:45] joshbuddy has joined the channel [20:47] zapnap_ has joined the channel [20:47] mostlygeek_ has joined the channel [20:48] JimBastard has joined the channel [20:48] javajunky has joined the channel [20:51] aconbere has joined the channel [20:53] bcurren: in express 1.0, what is the equivalent of use(Static)? i tried connect.static() but I'm getting no love [20:53] tjholowaychuk: bcurren: its staticProvider [20:54] tjholowaychuk: bcurren: static is future reserved [20:54] tjholowaychuk: bcurren: app.use(connect.staticProvider(__dirname + '/public')) [20:54] bcurren: tjholowaychuk: perfect. thanks! [20:54] tjholowaychuk: np [20:55] isaacs has joined the channel [20:55] isaacs: micheil: pin [20:55] isaacs: g [20:55] micheil: talk about the need for a ReadStream with buffers. [20:55] micheil: >_> [20:55] isaacs: when i said "no buffer", i meant, this.buffer += chunk.. [20:55] eee_c has joined the channel [20:55] isaacs: like, no internal buffering of data. buffer, not Buffer [20:55] micheil: isaacs: I'm looking at that short example api and thanks it'd be useful for node-websocket-server [20:56] micheil: can I get you to have a look at some code and offer suggestions on making it conform more to being a ReadableStream? [20:56] isaacs: k [20:57] micheil: http://github.com/miksago/node-websocket-server/blob/development/lib/ws/connection.js#L369-404 [20:57] micheil: that's what I currently have [20:57] micheil: when I create a connection, I simply pass the data straight through to a Parser instance that's attached to the connection [20:57] isaacs: i see [20:58] rgl has joined the channel [20:58] isaacs: so, the idea is that you have two different things. 1) parser, that is a writable stream and emits "foo" events, 2) the "foo" object which is a readable stream and is the argument passed to the "foo" even thand.er [20:58] micheil: so, internally I've got a buffer there for buffering the content of the current packet [20:58] micheil: line 392 [20:58] isaacs: right [20:59] micheil: okay, so, currently that's both a read/write stream? [20:59] isaacs: sort of... it looks like ws server is doing it a bit differently. [20:59] bcurren: tjholowaychuk: is there a known bug where expresso is returning html escaped? i have an ejs file and am setting the contentType to html. the content-type headers are correct by the template (not the layout) is being escaped [20:59] creationix: hey, quick question for anyone here [20:59] creationix: what's the proper http response code for a successful delete [20:59] creationix: 200? [20:59] tjholowaychuk: bcurren: <%- not <%= [21:00] _announcer: Twitter: "Awesome, just noticed that @manningbooks has a Node.js in action book coming. I can't wait." -- Kevin Isom. http://twitter.com/kev_nz/status/19283310058 [21:00] tjholowaychuk: its a safety thing bcurren [21:00] javajunky: I pity the poor guys trying to keep that book up to date, anyone in here ? ;) [21:00] _announcer: Twitter: "nodejs http://yfrog.com/bfyjvlj" [lv] -- André Ferraz. http://twitter.com/deferraz/status/19283350481 [21:00] isaacs: creationix: 200 or 204 [21:00] hellp has joined the channel [21:00] creationix: 204 with no body, 200 otherwise? [21:01] micheil: yeah [21:01] isaacs: creationix: yeah [21:01] creationix: javajunky: :) [21:01] bcurren: ah, i didn't catch that change. i've just migrated hummingbird to expresso 1.x. thanks for the help! [21:01] micheil: 204 is no content [21:01] isaacs: creationix: or 202 if it WILL be deleted, but hasn't actually been deleted yet. [21:01] javajunky: is that yeah doing the book, or yeah to the pity ;) [21:01] creationix: isaacs: awesome, 204 then [21:01] creationix: javajunky: both [21:01] mjr_: micheil: did you see my super simple websocket parser that you can sort of write to and listen for events on? http://github.com/mranney/node_pcap/blob/master/pcap.js#L789-816 [21:01] javajunky: creationix: ah ;) good luck [21:01] creationix: javajunky: mde is helping [21:02] micheil: nup, I've not seen it mjr_ [21:02] isaacs: creationix: i take it this is for nstore? don't rule out 202. someday you might want to support eventual consistency. [21:02] creationix: I have yet to see this announcement everyone is tweeting about [21:02] javajunky: the wroxx editors spammed a load of us for feedback as well a while back ;) [21:02] mde: javajunky: We taking it nice and slow. [21:02] tjholowaychuk: bcurren no worries! ive had a few people ask lol [21:02] javajunky: creationix: mde I imagine thats wise ;) [21:02] creationix: isaacs: no, for a howtonode article I'm writing [21:02] isaacs: ah, kewl [21:03] bcurren: tjholowaychuk: i'd help and update the 1.x migration page but it's not a wiki:) [21:03] creationix: isaacs: so res.writeHead(204, {});res.end(); [21:03] mjr_: micheil: http_trace does a pretty good job of dumping WebSocket traffic. [21:03] creationix: is valid? [21:03] sudoer has joined the channel [21:04] mjr_: But it won't handle a message larger than 64KB. [21:04] micheil: mjr_: cool, I'll definitely have to check it out /cc pgriess [21:04] isaacs: creationix: yep. [21:04] mjr_: Yeah, I'd appreciate any feedback if it doesn't understand something that it should. [21:05] isaacs: i wonder if there's a use case for a generalizable "writable stream that emits readable streams" pattern for parsers. [21:05] isaacs: it's *almost* like a filter, but not really. [21:05] sudoer has joined the channel [21:06] mjr_: isaacs: yeah, that has been a pretty common pattern in work I've done with node. [21:06] isaacs: but i mean: email, multipart, http, websockets... [21:06] isaacs: they all kind of look like that. [21:06] sh1mmer has joined the channel [21:06] mjr_: Yeah, take some data, take some more data, and at some point event some number of events. [21:06] isaacs: and you can stack them, so ws > http > tcp [21:07] isaacs: X.on("y", function (y) { y.on("data", ...) }); pump(upstream, X); [21:07] isaacs: so X is a writable stream, Y is a readable stream. [21:07] mjr_: That's what pcap does. It starts by emitting a raw packet, and that gets fed to the TCP parser, which emits its own events. Those, in turn get fed into the HTTP parser, which emits events. [21:08] isaacs: if we could generalize that pattern, maybe you could have X just be some kind of megafilter or something. [21:09] isaacs: but right now, it's not at all clear what X should emit. maybe it should just remain implementation specific. [21:09] phiggins has joined the channel [21:09] zapnap has joined the channel [21:09] mjr_: I guess it could emit data, and then the arg could be different depending on the implementation. [21:09] Guest77710 has joined the channel [21:09] creationix: isaacs: https://gist.github.com/71fb09a05d839f33afee [21:10] creationix: it will be part of the article [21:10] creationix: larger than most examples, but shows a lot [21:10] _announcer: Twitter: "Seriously, #NodeJS’s Script absolutely hates me. It’s generating completely fucking random syntax errors! IN A DIFFERENT FILE! FUUUUUUUUUUU" -- elliottcable. http://twitter.com/elliottcable/status/19283924021 [21:10] micheil: isaacs: I called that a processor, but yeah [21:11] isaacs: neat [21:11] isaacs: micheil: yeah, processor... that's abetter name, definitely. [21:11] isaacs: it's actually doing some kind of digestion [21:11] mjr_: elliottcable: maybe node is upset by your use of a unicode nick designator on IRC? [21:11] micheil: isaacs: I had something like this in node-smtp-client [21:11] elliottcable: mjr_ 3» unlikely [21:11] micheil: only; it was a stupid implementation [21:11] mjr_: that's the one [21:11] tjholowaychuk: creationix: this one is dumb but kinda cool to compare your repos http://github.com/visionmedia/express/blob/master/examples/github/app.js [21:12] micheil: mjr_: yeah I tried not to use switch statements [21:13] micheil: even though they look clean, I have seen some odd errors on a few occasions with them; I find if/else more readable [21:13] mjr_: micheil: but for picking up where you left off, I think named states are the way to go. [21:13] micheil: mjr_: 64K a max message size? [21:13] creationix: tjholowaychuk: requires jade [21:13] kjeldahl has joined the channel [21:14] tjholowaychuk: creationix: just npm it then remove after [21:14] mjr_: micheil: yeah, I didn't want to deal with growing or allocating buffers. This way, there's only a single allocation for every WS connection being monitored. [21:14] sztanpet has joined the channel [21:14] micheil: hmm.. no thanks. [21:14] mjr_: malloc is really painful, apparently [21:14] micheil: there's nothing in spec yet about max message sizes [21:15] creationix: tjholowaychuk: added jade to ivy [21:15] micheil: so, for now I need to just use an array buffer [21:15] creationix: :) [21:15] tjholowaychuk: :D [21:15] tjholowaychuk: that works too :) lol [21:15] creationix: your stuff is usually Ivy compatable [21:15] creationix: visionmedia has 57 repositories with a total of 2704 watchers. [21:15] creationix: nice [21:15] SubStack_ has joined the channel [21:15] JimBastard: damn [21:15] tjholowaychuk: I was going to relative require, but i didnt want to give the impression that you have to use the stuff in ./support [21:15] tjholowaychuk: creationix: do /repos/visionmedia/creationix/isaacs etc [21:15] JimBastard: creationix: where did you get that total? [21:15] tjholowaychuk: kinda cool [21:16] mjr_: micheil: I figure that by the time people start sending WS messages larger than 64KB that we'll have dynamically growable buffers in node. [21:16] creationix: creationix has 41 repositories with a total of 1491 watchers. [21:16] tjholowaychuk: JimBastard: check out the github example in express [21:16] tjholowaychuk: creationix: did you do /user/user/user? :D [21:16] JimBastard: creationix: do me! [21:16] creationix: tjholowaychuk: I should host this somewhere [21:16] tjholowaychuk: creationix: ya man go nuts [21:16] _announcer: Twitter: "littering of Italian in our CNC's g-code from across the wire http://gist.github.com/486577 next step is to create a node.js TCP hot patcher" -- grantmichaels. http://twitter.com/grantmichaels/status/19284289307 [21:16] creationix: tjholowaychuk: nice [21:16] derferman has joined the channel [21:17] creationix: isaacs has 81 repositories with a total of 558 watchers [21:17] creationix: that's a lot of repos [21:17] isaacs: yeah [21:17] isaacs: i've forked a lot of things to add package.json files [21:17] creationix: isaacs: that will do it [21:17] JimBastard: do me do me! [21:17] micheil: heh heh [21:17] isaacs: that's what she said [21:17] tjholowaychuk: hahaha [21:17] tjholowaychuk: chuck it on heroku maybe [21:17] JimBastard: she never said that after me telling her my github stats [21:17] creationix: marak has 102 repositories with a total of 892 watchers [21:17] micheil: going straight from my github page, 28 repos, 37 followers [21:17] JimBastard: woooooooot [21:18] isaacs: ACTION creates 21 new projects... [21:18] micheil: creationix: is watchers a different thing? [21:18] JimBastard: hee hee [21:18] embwbam has joined the channel [21:18] isaacs: NUMBERS = COMPETITION. MORE = BETTER. [21:18] creationix: all I have to do to win is fork node and rails [21:18] isaacs: there are no exceptions to this rule!! [21:18] tjholowaychuk: micheil: its a sum of all your project watchers [21:18] JimBastard: creationix: are those watchers a total watchers or unique? [21:18] chrischris has joined the channel [21:18] micheil: ah [21:18] creationix: tjholowaychuk: you should make it exclude forks [21:18] tjholowaychuk: JimBastard: just total [21:18] creationix: and subtract one for each project [21:18] isaacs: creationix: so, if one user follows all of them, they get counted multiple times? [21:18] micheil: in which case it'd be interesting to see the script or know my own [21:18] kjeldahl: Any magic command to get npm to show installed packages which have upgrades which haven't been installed? [21:19] isaacs: kjeldahl: npm ls installed | grep -v latest [21:19] bradleymeck_: NUMBERS = SREBMUN [21:19] JimBastard: creationix: you doing anything with this github app? [21:19] kjeldahl: isaacs: Thanks! [21:19] isaacs: kjeldahl: this will be easier some day, i promise. [21:19] creationix: JimBastard: it's an example app from express [21:21] JimBastard: got ya [21:21] JimBastard: i wish i had a reason to build a website in node [21:21] JimBastard: :-\ [21:21] JimBastard: soon enough we'll need to build one though [21:21] behmann has left the channel [21:21] JimBastard: connect as middleware will probaly make sense [21:22] _announcer: Twitter: "@timbray that approach is great in something like node.js that's built from the ground up to be callback driven... not so much for Ruby" -- Tony Arcieri. http://twitter.com/bascule/status/19284615158 [21:22] creationix: funny, my three most popular projects (excluding connect) are unmaintained [21:22] micheil: creationix: same is said here. [21:22] JimBastard: ahahahaha [21:23] ryan_gahl: kjeldahl: my answer to your issue is this: use git submodules instead and then just do "git submodule update" [21:24] ryan_gahl: if you need to keep code up to date for consumption in other projects, pms are not the answer [21:24] creationix: submodule ftw [21:25] ryan_gahl: git does this well [21:25] creationix: that's the Ivy idea [21:25] _announcer: Twitter: "Looking at ways of further abstracting and enhancing the websocket packet parser in Node-WebSocket-Server (#nws #nodejs)" -- Micheil Smith. http://twitter.com/miksago/status/19284834370 [21:26] jxson has joined the channel [21:26] saikat: this isn't really a nodeJS related question, but there are a lot of smart people here so i'm asking - does anyone know of a hash function func with counterpart compose such that given string "string", func("string") = compose(func("str"), func("ing")) [21:26] ryan_gahl: (i may have misunderstood the use case though) [21:26] micheil: y'know what's painful about git though ryan_gahl? Importing the WHATWG svn into it >_> [21:27] chakrit has joined the channel [21:27] ryan_gahl: is that a pain point of git though? [21:27] saikat: or, similarly, func('string') = func('str', func('ing")) (this one seems less likely to exist though without a separate compose function) [21:27] ryan_gahl: >_> == "sly winky eyed guy"? [21:27] isaacs: saikat: not that i know of. but you can use crypto's streaming hasher stuff for something like that. [21:28] isaacs: saikat: seems like that would make salt pretty worthless. [21:28] saikat: well [21:28] saikat: it's not for security [21:28] isaacs: suresure [21:28] saikat: it's for checking convergence of my documents [21:28] saikat: the problem is more that [21:28] saikat: on my client-side, because of various things i've done, i don't have the entire document in JSON format at all time and generating it is expensive [21:28] saikat: but i can cache hashes of each component whenever each part changes [21:29] isaacs: saikat: you know, crypto's createHash thing can take chunks, and then give you the hash at the very end. [21:29] saikat: whereas on the server, i have the document in JSON format, so hash(doc) is easy [21:29] kjeldahl: ryan_gahl: Do you mean generally, or for npm specifically? Is there a git project with all the modules included already (I haven't used git submodules a lot myself yet, so I need to catch up on this as well). [21:29] saikat: yeah, but it's not so much that i want to [21:29] saikat: hash in chunks [21:29] isaacs: i see [21:29] saikat: it's that i want a function that can take already hashed chunks [21:29] isaacs: yeah, not quite your use case [21:29] saikat: and produce something that i can compare to a hash of the entire thing [21:29] satori_ has joined the channel [21:30] JimBastard: saikat: we were discussing making a hash module a bit [21:30] JimBastard: to give sugar syntax for this stuff [21:30] saikat: hm, but i don't think a function even exists to do what i'm describing [21:30] saikat: or if it does, i don't know about it - hoping someone here would [21:30] JimBastard: not sure [21:30] ddollar has joined the channel [21:30] saikat: but in general, i agree with there being a hash module ala python [21:31] mscdex has joined the channel [21:32] sh1mmer has joined the channel [21:33] kjeldahl: Great. Running "npm activate npm @latest" breaks npm. [21:34] kjeldahl: Good thing npm-0.1.17 was still in place. :-) [21:34] pgriess: isaacs: yt? [21:35] pgriess: isaacs: i have some ideas for your fd problem [21:35] pgriess: isaacs_home: ^^ [21:35] KungFuHamster has joined the channel [21:35] javajunky has joined the channel [21:36] kjeldahl: But doing "npm install npm@latest", then "npm activate npm 0.1.20" gets an error message about not finding "npm-0.1.20", even though it installed correctly (according to npm itself). [21:37] sh1mmer: best node demos [21:37] sh1mmer: any suggestions? [21:38] mjr_: sh1mmer: well obviously http_trace [21:38] mscdex: zztmmo! [21:38] mjr_: but after that, hmmm [21:38] mscdex: :P [21:38] sh1mmer: heh [21:38] kjeldahl: Ok, working again now. Removed it and reinstalled. Guess it breaks easily when/if permissions are missing. [21:38] sh1mmer: mjr_: well if only I could get pcap to compile :P [21:38] ryan_gahl: kjeldahl: i mean in general. For each project, I like to include the dependencies (assuming other git projects here) as submodules (git submodule add [url] [path]) [21:38] mscdex: dem's fightin' werds [21:38] mjr_: sh1mmer: bah, you and your old computer. [21:39] ryan_gahl: under /lib, for example [21:39] mjr_: come to my office and I'll let you borrow a 10.6 DVD. [21:39] ryan_gahl: then it's a simple "git submodule update" command from to top level to update all of them [21:39] kjeldahl: ryan_gahl: Ah, that makes sense. Thanks. [21:40] ryan_gahl: http://gaarai.com/2009/04/20/git-submodules-adding-using-removing-and-updating/ [21:41] kjeldahl: Thanks, it clicked for me when you told me how you used it. [21:42] ryan_gahl: cool, there are some extras in that link too though (git submodule init for example) [21:45] embwbam: anyone use Connect in an init.d script to deploy web apps? [21:46] _announcer: Twitter: "Added a load new commands for the #nMemcached client for #nodejs. Stats / version now works in 1 server mode & delete works cross cluster." -- Arnout Kazemier. http://twitter.com/3rdEden/status/19286012268 [21:46] sh1mmer: mjr_: ok it's also not building on my stock hardy installation either [21:46] sh1mmer: mjr_: sad panda [21:46] mjr_: sh1mmer: that's odd. Do you have libpcap-dev installed? [21:46] sh1mmer: http://gist.github.com/486643 [21:46] sh1mmer: mjr_: yeah [21:47] mjr_: Didn't get putin the include path for some reason. [21:47] nefD has joined the channel [21:47] mjr_: how do people deal with this? [21:47] kassens has joined the channel [21:47] sh1mmer: let me rebind the shell [21:48] hassox has joined the channel [21:48] sh1mmer: nope [21:48] mjr_: The cpp wants to do: #include , which works fine on OSX and all of my ubuntu machines. [21:48] creationix: was someone asking about hosting connect apps? [21:48] sh1mmer: are you running any hardy machines? [21:48] jakehow has joined the channel [21:48] TobiasFar has joined the channel [21:48] mjr_: sh1mmer: I don't have a mapping of funny names to numbers. I just know that I have 9.10 and 10.04 machines. [21:49] sh1mmer: hardy is 8.04 I think [21:49] sh1mmer: let me try 10.04 [21:50] mjr_: Man, I guess I'm just living in the future with my OSX 10.6 and my ubuntu 10.04. Sorry about that. [21:50] sh1mmer: mjr_: you make me sick [21:50] sh1mmer: ACTION making a new slice just to use your silly software in his talk [21:50] sh1mmer: :D [21:50] mjr_: ha [21:51] mjr_: A fun demo is to show mape's wargamez viewer in one window, talk about how that is node, and then use http_trace to capture the traffic from loading the site and all of the WS messages. [21:51] mjr_: Oh, but you can't run it on your laptop. Ugh. [21:52] mape: mjr_: :) [21:52] ryan_gahl: so, I've got a patch almost ready to go for eventEmitter.suppress() and unsuppress()... quick sanity check on logic requirements... [21:53] ryan_gahl: .suppress takes 2 args (eventName, buffer) where eventName is self explanatory and buffer is a boolean (true == events of that type that are emitted during suppression are buffered and re-emitted after .unsuppress(eventName) is called [21:54] Dmitry has joined the channel [21:54] ryan_gahl: hmm, and in typing that out i think i answered my own question [21:55] ryan_gahl: basically, i need to refactor that so that if multiple events are being suppressed, it should be possible to unsuppress both at once, triggering a re-rolling of all events in the order they were received [21:55] SubStack has joined the channel [21:56] ryan_gahl: .unsuppressAll() [21:56] ryan_gahl: ? [21:56] Blackguard has joined the channel [21:58] ryan_gahl: then we can use this in http.ClientRequest or net.Server to wrap a more generic (and non event-leaking) version of .pause() and .resume() to suppress/buffer the "data" and "end" events [21:58] sh1mmer: mjr_: ugh. 10.04 is annoying [21:58] bradleymeck_: if anyone using const? [21:59] satori_: isn't that frowned apon? [22:00] sh1mmer: satori_: why? [22:00] mjr_: bradleymeck_: does const do anything in v8? [22:00] satori_: dunno. But Google's javascript code style says don't use it [22:00] satori_: ever [22:00] bradleymeck_: i dunno i cant seem to get it to act diff than var [22:00] mjr_: yeah, I don't think it is any different than var. [22:00] bradleymeck_: const in js always seemed odd to me [22:01] derferman: I didn't even know javascript had const until reading that guide [22:01] mjr_: At least, the current implementations parse it as var. [22:01] derferman: it just seems out of place in the language [22:01] bradleymeck_: well i cant reassign the value i guess, which is meh [22:01] satori_: I used to use it for const values alot, till I read that guide. Now I just use var, no difference really. [22:02] sh1mmer: I'm trying to remember that they changed const in ecmascript 5 [22:02] jaja has joined the channel [22:02] sh1mmer: but I can't remmeber how [22:02] sh1mmer: I think maybe script kills it [22:02] sh1mmer: strict [22:02] bradleymeck_: ewww delete on a const threw an error [22:03] tjholowaychuk: booo constants [22:05] evilhackerdude: booo delete [22:05] paul has joined the channel [22:07] _announcer: Twitter: "Loking at node.js - very interesting combination of c and JavaScript check it" -- Peter Elger. http://twitter.com/pelger/status/19287268952 [22:07] bradleymeck_: yay eval! [22:08] ryan_gahl: pgriess: does Yahoo hire remote? [22:08] pgriess: ryan_gahl: in special cases of awesome, yes [22:08] ryan_gahl: oh sweet, then i'm a lock :) [22:08] pgriess: ryan_gahl: the bar is pretty high, but yeah [22:09] pgriess: ryah_gahl: exactly :) [22:09] steadicat has joined the channel [22:09] pquerna: mm [22:09] pquerna: oscon preso about node.js is in the next block. [22:10] meder has joined the channel [22:12] bradleymeck_: ah operating systems [22:12] pgriess: pquerna: any progress on libeio dispatch / completion performance? [22:13] pgriess: pquerna: very interesting set of analysis you posted a week back [22:14] mjr_: pquerna: on a related matter, can your employer be convinced to let you work on problems like that libeio one fulltime? [22:14] elliottcable: damnit [22:14] yum46522 has joined the channel [22:14] elliottcable: can someone tell me why this “doesn’t work?” [22:14] elliottcable: new Script('function(){ return {a:1,b:2,c:3} }').runInNewContext(new Object()) [22:14] ryan_gahl: pgriess: just emailed ya [22:15] elliottcable: I get weird syntax errors *in that line of code*, not in the code it’s running… [22:15] pgriess: ryan_gahl: thx man [22:15] yum46522 has joined the channel [22:16] elliottcable: but I *don’t* get those errors when I change the content of that code being executed inside the Script, such as: [22:16] elliottcable: new Script('(function(){ return {a:1,b:2,c:3} })').runInNewContext(new Object()) [22:16] satori_: I just copypasted that line into repl with no errors? [22:17] satori_: (the first one) What error do you get [22:17] satori_: ? [22:17] elliottcable: satori_ 3» I don’t get an error out of the REPL, because it catches syntax errors and simply expects there to be more code [22:17] satori_: ahh k [22:17] elliottcable: (even though the SyntaxError isn’t actually *in that line*) [22:17] elliottcable: cf. http://drp.ly/1pA1en [22:17] mjr_: That multi-line trick in REPL is adorable. [22:17] elliottcable: mjr_ 3» ikr? [22:18] elliottcable: however, when I put the code in a file, the truth comes out: [22:18] elliottcable: https://gist.github.com/3e5d8ab84ed5809c85fa [22:19] _announcer: Twitter: "Multi-Core HTTP Server with NodeJS by Yahoo! Mail team http://ff.im/-o7epy" -- Jeff McLamb. http://twitter.com/jeffmclamb/status/19288002404 [22:19] SubStack has joined the channel [22:20] elliottcable: ryah 3» when you’re back around, this is the problem I showed last night, reduced to an absolutely minimal test-case [22:21] ryan_gahl: pgriess: please disregard my typos, one of those days! [22:21] mjr_: elliottcable: can you just not compile new functions? [22:21] elliottcable: Wait. let me get this right. There’s a Ryan Dahl, and a Ryan Gahl, both involved in Node? [22:21] ryan_gahl: anyway, anyone have an opinion on the requirements of a generic eventEmitter.suppress/unsuppress API? [22:21] elliottcable: what are the chances of that? [22:21] pgriess: ryan_gahl: heh [22:21] elliottcable: mjr_ 3» this is being used to compile arbitrary code; as long as it’s syntactically valid, it should compile [22:21] ryan_gahl: elliottcable: the odds are actually 100% [22:22] ryan_gahl: :) [22:22] pgriess: ryan_gahl: well you know my position on suppress/unsuppress. i'm in favor [22:22] elliottcable: ryan_gahl 3» THAT IS NOT HOW STATISTICS WORKS :X [22:22] elliottcable: lol [22:22] ryan_gahl: right, but there are some things i'm thinking through... [22:22] elliottcable: … unless ryan_gahl is ryah in disguise :O [22:22] satori_: elliottcable: Name the function and the error will go away [22:22] sh1mmer: mjr_: yay, finally installed [22:22] ryah: elliottcable: maybe that's not valid javascript [22:22] ryan_gahl: i.e. suppression of multiple events and the implications of re-rolling them out of order [22:23] elliottcable: satori_ 3» yes, I noticed; that doesn’t help me here )-: [22:23] mjr_: satori_: you beat me to that conclusion by mere seconds. [22:23] ryan_gahl: also, if a side effect of re-rolling is that the same event gets suppressed again... [22:23] elliottcable: ryan_gahl 3» I don’t exactly see why it wouldn’t be… [22:23] mjr_: lamely, it seems that you cannot compile code with un-named functions. [22:23] mjr_: WTF? [22:23] satori_: yeah. that is strange [22:23] satori_: I wonder why I havent run into that yet [22:23] elliottcable: nah, it works fine in parenthesis [22:23] elliottcable: see my second example [22:24] mjijackson has joined the channel [22:24] elliottcable: `new Script('(function(){ return {a:1,b:2,c:3} })').runInNewContext(new Object())` works fine [22:24] ryan_gahl: i think i just need to write my test cases first [22:24] bcurren has joined the channel [22:24] mjr_: sh1mmer: welcome to the future. [22:24] satori_: It is not valid to define anon functions at the top level? [22:24] elliottcable: this, also, doesn’t work [22:24] elliottcable: which is very odd: [22:24] elliottcable: new Script('{a:1,b:2,c:3}').runInNewContext(new Object()) [22:25] ryah: multiline repl? [22:25] elliottcable: but the same thing, in parenthesis, does [22:25] elliottcable: I think I’m going to work around it by wrapping anything I’M handed into parenthesis… [22:25] ryah: mjr_: what multiline trick? [22:25] mjr_: ryah: just wishing that REPL had a better way of distinguishing multiline input vs syntax errors. [22:25] elliottcable: ryah 3» catching syntax errors in the repl [22:25] ryah: mjr_: yeah [22:25] mjr_: Because sometimes syntax errors are actual syntax errors. [22:26] pquerna: pgriess: yeah, i've talked with ry about a few ideas; ry wants to hook in before we go back to the event loop, and bulk do writes/etc, rather than always having to pop back in/out of the event loop. [22:26] elliottcable: but yeah this seems like a genuine bug. If it works in parenthesis, I can’t see any reason why it would work outside parenthesis [22:26] elliottcable: but it looks more like a bug in V8 than Node [22:27] ryah: elliottcable: yes [22:27] elliottcable: as I suspect Node just calls out to V8’s context creation stuff fairly directly? [22:27] elliottcable: yeah )-: [22:27] ryah: elliottcable: correct [22:27] bradleymeck_: oh yea, you cant have unamed functions in the global scope [22:27] pquerna: mjr_: doubtful, we are starting to use node.js for a project... but its not a super-high performance project. So, not really justifiabilble [22:28] elliottcable: argh, and node also reports the errors wrong [22:28] inimino: elliottcable ⋱ It's not a bug. [22:28] bradleymeck_: in parens it no longer is a declaration on global scope so its valid [22:28] elliottcable: as if they’re syntax errors *where the `new Script()` is* [22:28] kassens has joined the channel [22:28] elliottcable: instead of syntax errors in the document being parsed [22:29] elliottcable: ryah 3» is, at least, the error-location part something in Node, or do I still need to go to the V8 crew? [22:29] pgriess: pquerna: so, lazily multiplex multiple writes over a single eio operation [22:29] pgriess: pquerna: we'd need some (more) efficient way of getting libeio workers work, eh? [22:29] bradleymeck_: elliottcable the reason it works in parens is it is a named func not a declared name func inside of them [22:30] elliottcable: bradleymeck_ 3» it’s not a named function… what? [22:30] inimino: elliottcable ⋱ It is not a FunctionDeclaration, and a FunctionExpression can't parse there. [22:31] bradleymeck_: ^ better wording [22:31] mjijackson has joined the channel [22:31] satori_: elliottcable: you original code produced correct errors [22:31] satori_: I was givin the line number and char position of the offending code in the script string [22:31] elliottcable: satori_ 3» not at all; it always reports the error as being in the file calling `new Script()`, not in the fscript being parsed [22:32] satori_: hmm [22:32] satori_: lemme check again [22:32] elliottcable: now, I can *get* it to throw an errir in the correct scope [22:32] rsms has joined the channel [22:32] elliottcable: at which point it’s reported as `at evalmachine.:1:1` [22:32] elliottcable: but this particular set of errors is not [22:33] chrischris has joined the channel [22:34] elliottcable: it looks like I may have to catch all SyntaxErrors, parse them to see if they’re being reported as being in *my* code, and then … I don’t know, warn the user that the syntax errors are in their code, not where they’re being reported? [22:34] satori_: elliottcable: yeah you are right, though it does indicate that is was a compilation error [22:34] elliottcable: satori_ 3» hm? [22:35] satori_: I mean from the stack trce [22:35] elliottcable: compare… the top one is incorrectly reported, the bottom one is correctly reported: http://drp.ly/1pAqfb [22:35] mtodd_ has joined the channel [22:35] pquerna: pgriess: yes, its all about stuffing more work to EIO [22:35] elliottcable: satori_ 3» ah, you mean I can derive that there was an error… yeah. But what I’m writing is a `require()` replacement (rather, re-writing) [22:36] elliottcable: and it’s inacceptable for users to not be able to find their syntax errors when debugging code, etc [22:36] pquerna: pgriess: avoiding multiple round trips back between eio -> js callback -> eio for every write [22:36] pquerna: (which all mean you are thread switching) [22:36] elliottcable: hm, odd. [22:36] pgriess: pquerna: yeah. it'd be strange for the internal write api to be asymmetric like that (N write reqs -> 1 response), though. i guess you could paper over that in javascript anyway [22:36] elliottcable: `require()` from Node has no such problem; is it not using `Script` internally? *goes to poke around* [22:37] satori_: elliottcable: I just pasted that line into a file, and got; SyntaxError: Unexpected token ( [22:37] satori_: at Object. (/usr/local/src/test.js:3:9) [22:37] satori_: at Module._compile (module:386:21) ... [22:37] elliottcable: satori_ 3» Node version? [22:37] elliottcable: v0.1.101 here [22:37] satori_: 100 [22:37] satori_: I should update :P [22:37] elliottcable: odd… [22:38] jherdman has joined the channel [22:38] javajunky has joined the channel [22:39] maushu has joined the channel [22:40] tyfighter has joined the channel [22:40] elliottcable: satori_ 3» before you update [22:40] elliottcable: satori_ 3» would you mind trying some code for me? [22:40] elliottcable: on that same setup? [22:40] satori_: sure [22:40] elliottcable: hold on, let me polish and push [22:40] satori_: k [22:41] benbinary has joined the channel [22:42] elliottcable: hrm [22:42] elliottcable: where has writing to STDERR moved in the new API? [22:42] elliottcable: there’s sys.debug, but I don’t want to require sys [22:43] bradleymeck_: console.error? [22:45] elliottcable: uhrm. [22:45] elliottcable: okay. [22:45] elliottcable: where does node keep its libraries now? [22:45] elliottcable: I can’t find sys.js… [22:45] satori_: Node src dir.... otherwise compiled into the binary [22:45] elliottcable: no, lke sys.js [22:46] bradleymeck_: lib [22:46] elliottcable: /usr/local/Cellar/node/0.1.101/lib/node is empty [22:46] elliottcable: rather, it has ‘wafadmin’ but no ‘libraries’ [22:46] elliottcable: very odd… [22:46] satori_: sys.js is compiled into the node binary [22:46] bradleymeck_: well someone got screwed [22:46] elliottcable: satori_ 3» … really? wha? [22:46] elliottcable: I found v0.1.21’s sys.js [22:46] elliottcable: but not v0.1.101 [22:46] satori_: you can check it in your src folder [22:46] bradleymeck_: it is but if you are looking src ^ [22:47] elliottcable: yeah, I don’t have the source handy; let me grab it [22:47] satori_: all the node standard libs are read into char arrays and compiled into bin [22:47] elliottcable: why on earth is the *JS* sources compiled into the binary now? [22:47] elliottcable: s/is/are/ [22:47] bradleymeck_: to speed up load time and be enjoyably predictable [22:47] elliottcable: that seems … unnecessary and confusing to the average user [22:47] satori_: I guess they are not to be considered user editable? [22:47] elliottcable: |= [22:48] elliottcable: hm [22:48] elliottcable: ok [22:48] bradleymeck_: i think the average user wont be messing w/ stdlib [22:48] elliottcable: ACTION git pulls on a half-a-year out of date repo [22:49] bradleymeck_: shouldnt take too long [22:50] elliottcable: yeah, just finished [22:50] elliottcable: I’m on the slowest WiFi ever broadcasted [22:50] elliottcable: process.binding('stdio').writeError("DEBUG: " + x + "\n"); [22:50] elliottcable: yay, process.binding again… [22:51] bradleymeck_: yay [22:51] elliottcable: ryah 3» any particular reasons stderr isn’t available to normal humans without going through process.binding? [22:52] bradleymeck_: how often do you distinguish stderr vs stdout? [22:53] satori_: From node stream wiki: Examples of writable streams (some of these don�t exist yet): server-side HTTP response, client-side HTTP request, process.stdout, process.stderr, childProcess.stdin [22:53] satori_: looks like it's todo. [22:53] mjr_: I do all the time as a crude way of turning off debug output, redirect stdout to /dev/null. [22:53] bradleymeck_: process.stderr is not here [22:54] elliottcable: bradleymeck_ 3» fairly commonly, yeah [22:54] elliottcable: Node is very POSIX-y, which is great [22:54] murz has joined the channel [22:54] elliottcable: and POSIX-y involves STDOUT/STDERR distinction, heh [22:54] _announcer: Twitter: "More intelligent HTTP routing with #NodeJS http://bit.ly/cHK4fI" -- Armel FAUVEAU. http://twitter.com/fauveauarmel/status/19290177099 [22:54] mattly has joined the channel [22:55] bradleymeck_: console.error still goes to stderr [22:57] ryah: elliottcable: sys.error() [22:57] Apage43 has left the channel [22:57] Apage43 has joined the channel [22:58] elliottcable: ryah 3» requires `sys` [22:59] elliottcable: ryah 3» my point was that `sys` is required, currently, to get at STDERR; but not to get to STDOUT [22:59] bradleymeck_: whats wrong with console? [22:59] ryah: elliottcable: console.error() [23:00] elliottcable: ryah 3» ah! didn’t know about that. is it synchronous? [23:00] elliottcable: ryah 3» i.e. appropriate for using in a `catch` statement? [23:01] elliottcable: mind you, although that works for me, I think my point still stands: having process.stderr next to process.stdout is a good idea [23:02] bradleymeck_: for listening could be useful [23:05] maqr: https://gist.github.com/af6ecb39abba2b46df03 <-- google closure templates works percetly :) [23:05] maqr: *perfectly [23:07] ryan_gahl: hmm, ok vote time: I'm unraveling a bit of complexity in allowing eventEmitter.suppress to be at the event level (namely when trying to buffer any would-be emitted events for re-roll after .unsuppress is called and handling the various associated cases of multiple event suppression, etc)... should I just make it an all or nothing effect, where all events are suppressed on .suppress() and if .suppress(true) is called it buffers them and re-rolls all on .unsu [23:09] ryah: elliottcable: it's purposely not that way [23:09] ryah: stderr is sync [23:09] bradleymeck_ has left the channel [23:10] hobson_ has joined the channel [23:10] elliottcable: ryah 3» could you offer an async interface to stderr, then? Something to match process.stdout? [23:11] joshbuddy has joined the channel [23:11] ryan_gahl: going once... [23:12] mscdex: what about something for unsuppress if we end up not wanting the buffered events? [23:12] ryah: elliottcable: no [23:13] ryah: why? [23:13] ryan_gahl: so, you call suppress(true) indicating you want buffered, and then change your mind when you call unsuppress? [23:13] ryan_gahl: .suppress() would be no buffering [23:13] elliottcable: Hm. I wonder if V8 will support this soon. It’s neat! [23:13] elliottcable: https://developer.mozilla.org/en/new_in_javascript_1.8#Expression_closures_(Merge_into_own_page.2fsection) [23:13] elliottcable: ryah 3» ’cause it’s symmetrical, clean. You know? [23:13] ryan_gahl: mscdex: did i misunderstand? [23:14] mscdex: i mean the state of the program/connection/whatever could change such that the events should be disregarded [23:14] ryah: elliottcable: shrug [23:14] mscdex: even though you initially intended to use the buffered events [23:14] elliottcable: :x [23:14] ryan_gahl: right ok... so you want something like .unsuppress(discard [bool]) [23:15] ryan_gahl: can do [23:15] mscdex: something like that i suppose [23:15] ryan_gahl: but how about the granular/vs. non-granular question? [23:15] ryan_gahl: is it potentially useful to suppress/buffer one event but not others? [23:16] mscdex: probably [23:16] ryan_gahl: ok let me re-phrase that... is it valuable enough to warrant the engineering time :) [23:17] mscdex: like if you're pumping data and you're suppressing data events, but the stream ends unexpectedly, you'd want to catch the end event right away i think [23:17] ryan_gahl: i can be done with a global version in like a few minutes, otherwise maybe a couple more hours to make sure i get all the cases [23:17] ryan_gahl: would you? [23:17] mscdex: sure [23:18] ryan_gahl: i'd expect to want to re-roll the data AND the end events as they happened [23:18] mscdex: then you would suppress both events [23:18] Ori_P has joined the channel [23:19] ryan_gahl: but i mean, i can't think of a case where you'd say "end" happened... throw away all the data events [23:19] _announcer: Twitter: "Waiting for @sh1mmer's NodeJS / SSJS talk at #oscon. If you're into JavaScript or interested in the hype this will blow your mind." -- xnoɹǝʃ uɐıɹq. http://twitter.com/brianleroux/status/19291730471 [23:19] mscdex: if you have a chat server with file transfer capability, and a client disconnects while pumping is going on, the server can let the rest of the clients know that client disconnected right away [23:20] mscdex: it's not that you're throwing away the data events [23:20] mscdex: you're just suppressing them [23:20] ryan_gahl: hm [23:20] ryan_gahl: http://github.com/senchalabs/connect/blob/master/lib/connect/middleware/staticProvider.js#L55 [23:21] _announcer: Twitter: "reading this good old post by @jeresig on ES5 (which works in node.js) http://is.gd/dCEYj" -- jamescarr. http://twitter.com/jamescarr/status/19291835762 [23:21] lachlanhardy has joined the channel [23:22] ryan_gahl: so that's kind of my basic canonical real world use case... buffering for an async operation [23:23] zapnap has joined the channel [23:23] jesusabdullah has joined the channel [23:24] _announcer: Twitter: "Been playing with node.js a bit. Expect an article about it on Monday. :)" -- Jeff Kreeftmeijer. http://twitter.com/jkreeftmeijer/status/19292025508 [23:24] ryan_gahl: well ok... I'll keep plugging at the granular approach, i can see it being useful - i just need to find a nice structure to allow the re-rolling of "eventA" and "eventB" to remain in the order they happened while accomodating side effects like "during re-roll, .suppress("eventA") was called again" [23:25] _announcer: Twitter: "In Portland 255 for "Node.js and How JavaScript is Changing Server Programming" and Open Source Google Wave: Building Your Own Wave Provider" -- Charl van Niekerk. http://twitter.com/charlvn/status/19292144380 [23:26] elliottcable: oh joy. Somehow, I can’t even catch that SyntaxError… [23:27] elliottcable: ahhh ignore me :x [23:28] elliottcable: Awesome! http://drp.ly/1pBFG [23:28] elliottcable: Not ideal, but I can consider it good enough :3 [23:30] _announcer: Twitter: "Decided to go to "Kernel Developers Don't Bite" talk instead of the Node.js talk. #oscon" -- Joe Bowser. http://twitter.com/infil00p/status/19292421860 [23:30] _announcer: Twitter: "time to drink the @sh1mmer node.js koolaid at #oscon" -- Andy McKay. http://twitter.com/andymckay/status/19292445143 [23:31] mjr_: Oh, sh1mmer is giving the oscon node talk? [23:31] mjr_: Good thing you got that demo working like 15 minutes before then, eh? [23:32] pquerna: yeah [23:32] pquerna: hes just starting [23:32] pquerna: free donuts for questions apparently. [23:32] _announcer: Twitter: "nodejs talk starts off with incentive to get donuts...way to start off #oscon" -- sambao21. http://twitter.com/sambao21/status/19292571605 [23:32] _announcer: Twitter: "First thing in @sh1mmer 's talk on node.js: "Do you like donuts? Ask a question on topic, and you get a donut." I like this already." -- Fil Maj. http://twitter.com/filmaj/status/19292584611 [23:33] ajpiano has joined the channel [23:33] _announcer: Twitter: "At @sh1mmer's Node.js talk, preparing to GET MY MIND BLOWN again! #nodejs #oscon" -- brionv. http://twitter.com/brionv/status/19292651860 [23:34] stepheneb has joined the channel [23:34] _announcer: Twitter: "node.js is so good that the entire presentation is in comic sans and according to @sh1mmer we will still love him in the end #oscon" -- Daniella Valentin. http://twitter.com/danivalentin/status/19292699614 [23:34] _announcer: Twitter: ""This whole presentation will be in Comic Sans, and you'll still think I'm awesome. That's how good it is" #nodejs #oscon" -- James Walker. http://twitter.com/walkah/status/19292713632 [23:35] maqr: rofl comic sans [23:35] satori_: lol [23:36] elliottcable: is there a way to get the filename out of a `Script` instance? [23:36] _announcer: Twitter: ""node.js is so awesome that my presentation is entirely in Comic Sans and you'll still love me at the end" #nodejs #oscon ^TM" -- ActiveState. http://twitter.com/ActiveState/status/19292828982 [23:36] maqr: elliottcable: it's the third parameter when you make a Script [23:36] maqr: elliottcable: so, only if it's supplied, i guess [23:38] tjholowaychuk has joined the channel [23:38] jesusabdullah: COMIC SANS?! [23:38] jesusabdullah: How does the twitter response bot work again? [23:38] elliottcable: maqr 3» I’m just going to do `script.filename = filename` to store it for later retreival [23:38] satori_: My impression was that the filename param is just for nicer error messages? [23:38] jesusabdullah: !twitter @ActiveState Comic Sans? You monster! [23:38] jesusabdullah: Like that? [23:38] _announcer: Twitter: "@sh1mmer is a really great speaker. Enjoying the node.js talk. #oscon" -- Charl van Niekerk. http://twitter.com/charlvn/status/19292947097 [23:38] elliottcable: what bot? [23:38] Astro: hi elliottcable [23:38] jesusabdullah: the _announcer [23:38] elliottcable: satori_ 3» it is; I’d just think they’d have stored it somewhere [23:38] elliottcable: Astro 3» … hi [23:39] elliottcable: jesusabdullah 3» who does it tweet as? [23:39] Astro: elliottcable: looking for an xmpp lib again? [23:39] elliottcable: Astro 3» what? [23:39] satori_: sh1mmer is talking at oscon right now [23:39] pquerna: that was unreasonable. [23:39] satori_: ? [23:39] jesusabdullah: elliottcable: I forget! [23:39] pquerna: yes [23:39] jesusabdullah: nodejsbot maybe [23:39] jesusabdullah: Yeah [23:39] _announcer: Twitter: "#node.js talk at #oscon is the talk of the show so far!" -- krisread. http://twitter.com/krisread/status/19293029581 [23:40] mjr_: sh1mmer is really setting the twitters on fire [23:40] satori_: jesusabdullah: I think it is (!)tweet [23:40] _announcer: Twitter: "Server Side JavaScript node.js by @sh1mmer - and there are donuts!! #oscon" -- Pallavi Kaushik. http://twitter.com/pkaushik/status/19293055680 [23:40] maqr: sh1mmer kicks ass [23:40] jesusabdullah: satori_: thanks [23:40] brianleroux has joined the channel [23:40] elliottcable: oooo [23:40] jesusabdullah: !tweet @ActiveState Comic Sans? You monster! [23:40] elliottcable: I am so tempted to use that to abuse people [23:41] elliottcable: awwww it annotates it with the username! [23:41] maqr: wasn't that a sh1mmer quote, not an activestate one? [23:41] `: !tweet @elliottcable awesome. [23:41] jesusabdullah: where's Bastard when you need him? [23:41] elliottcable: hah [23:42] elliottcable: maqr 3» it was [23:42] _announcer: Twitter: ""How to get donuts Sir!" "I'm gluten-intolerant" "Okay, how to get a hug!" - # OSCON session node.js" [it] -- Michael Shadle. http://twitter.com/mike503/status/19293189282 [23:42] jesusabdullah: maqr: I thought I read it as activestate? <_> but I don't usually "do" twitter so [23:42] elliottcable: who in here is brianleroux? [23:42] elliottcable: jesusabdullah 3» blasphemy! [23:42] brianleroux: me? [23:42] jesusabdullah: pffsht [23:42] brianleroux: \me is confused [23:43] elliottcable: brianleroux 3» … damn. I … wow. I didn’t even think of that. I feel a little dumb now. [23:43] maqr: !tweet @sh1mmer This year, Comic Sans; next year, Papyrus? [23:43] aliem_ has joined the channel [23:43] _announcer: Twitter: "In the session about node.js... "There's actually a BBS written in JavaScript." #crazytown #oscon #nodejs" -- Zach Copley. http://twitter.com/zcopley/status/19293245283 [23:43] brianleroux: elliotcable: lol, are you in tom's talk at oscon right now [23:43] satori_: I am fairly amazed at the general interest and momentum that node has going now. This is great. [23:43] jesusabdullah: Oh [23:43] jesusabdullah: ActiveState was quoting shimmer [23:43] jesusabdullah: :E [23:43] creationix: anybody want to last minute proofread my article before It goes live? [23:44] satori_: why not. [23:44] jesusabdullah: Sure [23:44] maqr: satori_: i think it's really easy to extend, and that gives it the appeal... i feel like i've written useful things already, and i've only been at this a little more than a week [23:44] creationix: Links sent in pms [23:44] satori_: cool [23:44] maqr: i don't think i know enough to proof your articles yet :P [23:45] elliottcable: what’d __filename get replaced by? [23:45] elliottcable: creationix 3» sure [23:45] creationix: well, I'm pretty sure about the code, it's typos and bad grammar I'm looking for [23:45] _announcer: Twitter: ""Doug Crockford's JavaScript is so strict that uncaught exceptions would trigger global thermonuclear war" #oscon #nodejs" -- Zach Copley. http://twitter.com/zcopley/status/19293370920 [23:45] maqr: creationix: oh, i can do that [23:45] pgriess: creationix: sure [23:45] elliottcable: creationix 3» for one thing, I’m pretty sure Node.js should be capitalized… but I’m not sure [23:45] elliottcable: creationix 3» and 32bit shouldn’t have a dash… [23:46] creationix: elliottcable: it's lowercase in the logo [23:46] elliottcable: shouldn’t `wget -O-` be `wget -O`? [23:46] elliottcable: oh, dash for STDOUT [23:46] creationix: yep [23:46] pgriess: creationix: real men use curl. i'm just sayin' ;) [23:46] elliottcable: `require.paths` should be ’d or whatever markup you’re using [23:46] creationix: pgriess: ubuntu doesn't have curl by default [23:46] elliottcable: same for `lib` and `git` [23:47] elliottcable: OSX should probably be OS X [23:47] _announcer: Twitter: "having applause-off between #nodejs and "Perl Lightning talks" sessions #oscon" -- Arne Claassen. http://twitter.com/sdether/status/19293479991 [23:47] pgriess: creationix: that's disturbing [23:47] elliottcable: everythinge else seems good [23:47] creationix: pgriess: the linux thing? [23:47] creationix: elliottcable: thanks [23:48] elliottcable: no problem man (-: [23:48] pgriess: creationix: your example assums running wget from $HOME [23:48] elliottcable: so, what replaced __filename? [23:48] pgriess: creationix: which is fine, but should be mentioned (the $PATH assignment later depends on it) [23:49] creationix: pgriess: ok, put a note [23:49] creationix: elliottcable: it's not there? [23:49] elliottcable: I tried it in `node`, but it was undefined [23:49] elliottcable: I suppose that’s just an artifact of the REPL then [23:49] satori_: creationix: Looks good. How long did that writeup take you out of interest? [23:49] siculars has joined the channel [23:49] creationix: satori_: let me see, I timestamp it when I start [23:50] creationix: satori_: about 3 hours, proofreading included [23:50] _announcer: Twitter: "Node.js is a server-side Javascript implementation (using v8 from Google) that's <------- this fast --------> #oscon" -- Bill James. http://twitter.com/tankerbay/status/19293680610 [23:51] satori_: I have never been a keen blogger or good technical writer. I wish I did have skills in that area. Your tutorial is concise and should get anyone up to speed on running a featured node app. [23:52] creationix: my main motivation is to help people not have to come ask the same questions over and over on the mailing list and irc [23:52] creationix: but it's fun to write too [23:52] dnolen has joined the channel [23:52] elliottcable: brianleroux 3» I hope that goes on video somewhere [23:53] maqr: it's just a blog article? i can wait until it's live then i guess :P [23:53] jesusabdullah: creationix: How similar is wheat to jekyll? [23:53] creationix: jesusabdullah: it's not a static generator [23:53] creationix: but same in concept otherwise [23:53] jesusabdullah: creationix: orly? [23:53] creationix: jesusabdullah: yep, it's a connect app [23:53] jesusabdullah: Oh, neato [23:53] creationix: running node live on port 80 [23:53] pquerna: bleh [23:53] jesusabdullah: ACTION uses jekyll for his blog [23:53] pquerna: don't show apache benchmarks when i'm in the room [23:54] jesusabdullah: works pretty well for the dumb stuff I do [23:54] rauchg_: apache3 is gonna blow everything else out of the water [23:54] pquerna: yes, because it'll be written in node.js [23:54] pgriess: creationix: i really like all of the material but it sure covers a lot of ground -- maybe break out ivy installation into a separate tutorial [23:54] creationix: pquerna: ahh, you beat me to it [23:54] rauchg_: haha [23:54] jesusabdullah: haha [23:54] elliottcable: Hah! I jus typed ‘splot’ instead of ‘split.’ pretty sure that’s not a stdlib method. [23:54] creationix: pgriess: yeah, it's too long, but all related [23:54] pgriess: creationix: i think it's reasoinable to assume readers have node installed [23:55] jesusabdullah: It's weird to me seeing how many apache products are java-based [23:55] creationix: maybe I could break out the app [23:55] pgriess: creationix: yeah. the connect/spark stuff is where the real meat is. be nice to feature that up front a bit more [23:55] jesusabdullah: creationix: pgriess kinda has a point :S though, being able to pretty much be ready-to-go by grabbing Ivy is handy [23:56] pquerna: jesusabdullah: mistakes have been made, trying to fix it :) [23:56] jesusabdullah: XD [23:56] creationix: yeah, keep connect/spark in the same tutorial, but break out ivy into it's own [23:56] mjr_: pquerna: what's your objection to apache benchmarks? Are you trying to forget about apache? [23:57] isaacs has joined the channel [23:58] pquerna: mjr_: apache can line rate static files. If its not static files, your database or programing language determine the performance characteristics in most cases. [23:58] _announcer: Twitter: "@BelindaRunkle Donuts are In the Node.js session. #oscon" -- Tina Coleman. http://twitter.com/colemanserious/status/19294186972 [23:58] elliottcable: who *isn’t* trying to forget about Apache? [23:59] jesusabdullah: It did make for a pretty sweet music video [23:59] elliottcable: Mmkay! [23:59] elliottcable: Some ridiculously hacky workarounds later, I can now compile code from peoples’ files, and either get reliable stack traces, or at least warn the user when it’s unreliable! :D [23:59] jesusabdullah: auugh there are raw peanuts in my lunch [23:59] jesusabdullah: >_< [23:59] maqr: haha, donuts, sh1mmer is clever [23:59] jesusabdullah: My girlfriend loves them, but I think they're nasty