[00:00] aurynn: Whoops. [00:00] aurynn: that broke Node. [00:02] Tim_Smart: ryah_: Trying to fix this test: http://github.com/ry/node/blob/master/test/simple/test-http-server.js#L38-46 [00:03] Tim_Smart: ryah_: Does net.Server#close() close all incoming connections also? [00:05] aurynn: Hm [00:05] aurynn: Not bad. [00:05] aurynn: I'm doing a PG query every 0.0012 seconds [00:06] technoweenie has joined the channel [00:07] polotek_ has joined the channel [00:07] rauchg_ has joined the channel [00:09] ryah_: Tim_Smart: no [00:09] eazyigz has joined the channel [00:09] Tim_Smart: OK interesting. Its throwing a "Stream is not writable.". Time to dig around. [00:10] ryan_gahl has joined the channel [00:10] ryah_: really looking forward to landing this: [00:10] ryah_: http://github.com/ry/node/commit/6c4e2fb87e8b006cf7baf8ab4c5a8b38de3fa497 [00:10] aurynn: And that's with a console log on every query response [00:11] aurynn: and doing 6-stage prepared queries for every pass. [00:11] aurynn: That's pretty damn good [00:11] bbttxu has joined the channel [00:11] polotek_ has left the channel [00:11] Tim_Smart: ryah_: Nice. [00:12] ryah_: Tim_Smart: after pquerna's http branch is done, i think we can justify it [00:12] Tim_Smart: ryah_: Sure. Keeps 'net' clean. [00:13] aheckmann has joined the channel [00:15] evanmeagher: polotek: sorry for high latency. re: flux, i usually just change to one of the 3-4 built-in settings [00:17] CIA-94: node: 03Micheil Smith 07master * r818e56d 10/ Makefile : Disable make manpage, this is broken and can prevent node from installing correctly. - http://bit.ly/9oydM4 [00:17] willwhite has joined the channel [00:17] [[zz]] has joined the channel [00:19] craiggles has joined the channel [00:19] craiggles: hey guys. [00:19] craiggles: trying to install node with cygwin, tutorial says, `git checkout [latest-stable-tag, e.g., v0.2.4] [00:19] craiggles: ' .. what's the latest version of node? [00:20] saschagehlich: craiggles: 0.3.0 [00:20] saschagehlich: well that's the latest tag [00:20] technoweenie: v 0.2.4 is the latest 'stable' one: http://github.com/ry/node/downloads [00:20] micheil: ryah_: I'm going to work on the manpage next [00:20] craiggles: Thanks.Thanks. [00:21] saschagehlich: craiggles: you can see the tags with "git tag" btw [00:21] craiggles: Thanks. [00:21] sebastiandeutsch has joined the channel [00:21] craiggles: I've got node working on my ubuntu machine, just on my laptop atm and it's got xp. [00:23] micheil: saschagehlich: no. [00:23] micheil: 0.2.4 is latest stable [00:23] micheil: 0.3.0 is latest unstable [00:24] saschagehlich: micheil: well yea, the latest stable. he didn't ask for the latest stable ;) [00:24] micheil: while 0.3.0 has been released, it's not ready for deployment or wide spread usage [00:24] saschagehlich: i knoe [00:24] saschagehlich: w [00:24] micheil: latest-stable-tag isn't 0.3.0. [00:25] micheil: it's v0.2.4 [00:25] micheil: craiggles: see ^ [00:25] craiggles: ah alright, thanks. [00:25] saschagehlich: so don't checkout 0.3.0 ;) sry [00:25] craiggles: :P [00:26] craiggles: is there an `easy' way to read input from user? someone gave me a link the other day about building stdin as such, but i was hoping for a simple function rather having to DIY. [00:27] polotek: craiggles: what do you consider easy? [00:27] markwubben has joined the channel [00:27] craiggles: well, for easy i'd consider a function that is already defined, so i could just simply write some code, say, `var userInput = stdin.read();' [00:28] erobit has joined the channel [00:28] polotek: craiggles: you won't get that [00:28] craiggles: of course, if this is not possible, i'm fine with doing what needs to be done. [00:28] polotek: read() has to block until the input is read [00:28] siong1987 has joined the channel [00:28] polotek: that's not how node works [00:28] polotek: you should be reading stdin as a stream [00:28] zentooo has joined the channel [00:29] craiggles: i've never really learned about streams as such, i've always just used predefined methods, it's just i'm wanting to learn javascript/node by puzzles, http://golf.shinh.org/all.rb , and some require input from the user. [00:29] Tim_Smart: pquerna: Yeah pipelining isn't quite working. [00:29] banjiewen_ has joined the channel [00:30] polotek: craiggles: ah, I see. node will introduce a few new paradigms for doing the "usual" things. [00:30] polotek: Streaming io is a pretty important one [00:30] sprout has joined the channel [00:31] siong1987 has joined the channel [00:32] craiggles: Yeah, do you think i'm going about it in the right way, that is trying to improve my javascript knowledge with puzzles. [00:32] craiggles: well, challenges more than puzzles, as such. [00:32] Me1000 has joined the channel [00:33] dguttman has joined the channel [00:33] polotek: craiggles: well it's not a bad idea in theory [00:34] polotek: but the problem is you'll run into a lot of issues doing that with javascript/node [00:34] craiggles: Oh :/ [00:34] polotek: javascript doesn't have any of the traditional libs for doing the usual stuff [00:34] polotek: like i/o [00:34] craiggles: well, you see, i'm wanting to learn javascript, the language itself, and then DOM. [00:34] polotek: node adds a lot of apis for that stuff [00:34] polotek: but it's almost all non-blocking [00:34] polotek: so it looks and feels a lot different than what you'll see in other languages [00:35] craiggles: so I was thinking of learning to use node for near enough all my programming tasks, then move onto DOM after i'm somewhat decent with javascript, and then finally canvas/webgl dev (my final goal) [00:36] polotek: craiggles: http://nodejs.org/api.html#process-openstdin-59 [00:36] softdrink1: craiggles: stock up on antidepressants for when you have to deal with IE. [00:36] polotek: from the node docs [00:36] micheil: craiggles: well, put it this way, that could be a library you could write [00:36] polotek: that's how you read stdin [00:36] micheil: openstdin, and then emit like line events or things like that [00:36] micheil: so you can build step based command line apps. [00:36] craiggles: softdrink1, heh. [00:36] micheil: (although, node's target is in servers) [00:37] craiggles: I can safely say i'm fine with HTML and CSS, I've just never got around to learning server side, nor javascript very well. [00:37] craiggles: I mean I can get my way around with it knowing C style syntax, and some of it's quirks, and googling. [00:37] craiggles: but i'd like to know it as my primary langauge. [00:37] bbttxu has joined the channel [00:38] micheil: craiggles: trust me, JS as a primarily language is great. [00:38] micheil: I'm like that. [00:38] softdrink1: brb [00:38] craiggles: :) [00:38] softdrink has joined the channel [00:38] polotek: craiggles: does that example make any sense? [00:39] craiggles: polotek, yeah kinda :) [00:39] craiggles: when it's getting data, say, oh we got this data.. when it's ended say it's ended [00:39] polotek: craiggles: exactly [00:39] polotek: but a few gotchas (remember node is still new and evolving) [00:40] craiggles: right. [00:40] polotek: you need the setEncoding call to get strings. otherwise you will get a Buffer object [00:40] craiggles: so i've got node working with cygwin. [00:40] polotek: which represents binary data [00:40] craiggles: but i pressed a key (not sure which), and now when i press backspace triangles (well they appear to resemble triangles), are apeparing. [00:41] polotek: and more importantly, the data chunks do not break on a line. they get sent in random chunks depending on how the os decides to feed data to you [00:41] polotek: so you have to do some processing [00:41] craiggles: oh and btw, should i be using console.log or process.stdout.write [00:41] polotek: craiggles: never tried node on cygwin [00:42] sebastiandeutsch has joined the channel [00:42] polotek: craiggles: console.log is for convenience. it'll do some formatting and add newlines [00:42] sprout has joined the channel [00:43] craiggles: so yeah, i'm trying to think of some little projects to attempt with node, my goals have already been ruled out because javascript was not suited (all in all java is most suited due to reflection.), with ruby all i did for fun was irc bots and scrapers. [00:48] polotek: man I love having 8GB of ram [00:48] polotek: now all I need is a gigabit pipe at my house [00:50] softdrink has joined the channel [00:50] deepthawtz has joined the channel [00:51] craiggles: heh. [00:52] craiggles: I only have 1GB on this laptop, and 4GB on my desktop, 4 does my though. [00:52] EyePulp: anyone have a favorite lib for date manipulation under node? [00:52] craiggles: (the backspace error only seems to have when i have an anonymous function [00:52] EyePulp: (beyond rolling one's own, that is) [00:52] softdrink: EyePulp: to do what exactly? [00:52] saschagehlich: "Date" [00:53] EyePulp: softdrink: mainly to do time interval calculations and modifcations [00:53] eddanger has joined the channel [00:54] eddanger has joined the channel [00:54] EyePulp: saschagehlich: naturally one can write it directly from the Date() object up, but one could also re-write node from the ground up, yet we don't... we use the work of others to move more quickly. =) [00:54] softdrink: i don't have a good one in mind, but i spent far too much time at a previous job dealing with date math [00:54] craiggles: it's possible to make site scraper with node, yeah? [00:55] EyePulp: softdrink: in JS or another language? [00:55] micheil: craiggles: yes [00:55] softdrink: in js [00:55] igorgue has joined the channel [00:55] EyePulp: craiggles: yes [00:55] ryan_gahl: http://www.datejs.com/ [00:55] craiggles: good good. [00:55] craiggles: oh hey ryan_gahl, thanks for the awesome library. [00:55] softdrink: ah yes, datejs is quite handy [00:55] EyePulp: ryan_gahl: danke - was browsing that already [00:55] EyePulp: anyone using it server-side? [00:56] ryan_gahl: EyePulp: if there's no DOM interaction, it's just a drop-in [00:56] leeeb has joined the channel [00:57] ryan_gahl: might need to mod slightly at bottom to export it's main namespace object [00:57] craiggles: oh I like datejs [00:57] micheil: ryah_: interest level in still pursuing rewriting argv / argc handling? and interest level in patching v8 to provide a IsFlag api? [00:57] craiggles: reminds me of ruby, 5.days.ago [00:57] micheil: (like, do you still want those things?) [00:57] eddanger has joined the channel [00:58] craiggles: but instead, `(5).days().ago();' or `5 .days().ago();' [00:58] micheil: ryan_gahl: if it does: )(this); [00:58] micheil: it'll work automatically in node. [00:58] tlrobinson has joined the channel [00:58] ryan_gahl: actually yeah... it just mods "Date" [00:58] ryan_gahl: so just a require [00:59] eddanger has joined the channel [00:59] craiggles: btw node documentation iis nice. [00:59] creationix has joined the channel [00:59] micheil: var d = new DateTime(); d.days(5).ago() [00:59] micheil: would be better. [00:59] ryan_gahl: i like semicolons [00:59] micheil: craiggles: which documentation? [00:59] craiggles: the core. [00:59] craiggles: http://nodejs.org/api.html [00:59] micheil: oh. [01:00] micheil: see: http://static.brandedcode.com/node-docs/ [01:00] craiggles: 404 [01:00] micheil: that's the 0.3.X docs [01:00] micheil: http://static.brandedcode.com/node-doc/ [01:00] micheil: my bad [01:00] craiggles: cheers. [01:00] craiggles: bookmark'd [01:01] micheil: don't book mark it. As soon as node 0.3.0 or the next version is released, the site will probably get updated [01:02] zentoooo has joined the channel [01:03] bradleymeck has joined the channel [01:05] jpld has joined the channel [01:05] jpld has joined the channel [01:06] igorgue has left the channel [01:06] mtodd has joined the channel [01:06] craiggles: noticed that there was a C/C++ link addon on that link, minecraft (game), has a C library, would it be possible to somehow, from that (because it's C), port it to node as an addon? basically meaning that you could spawn items from node itself, rather than having to use C, if this is possible i'd love to attempt it myself, but i'm clueless in the area. [01:06] EyePulp: thanks for the datejs pointer ryan_gahl - should work well [01:06] jpld has joined the channel [01:06] jpld has joined the channel [01:06] ryan_gahl: EyePulp: np [01:07] micheil: craiggles: I'd say start simple. [01:07] chapel: craiggles << are you talking about using node to make a mc manager? [01:07] ThePub has joined the channel [01:07] craiggles: chapel, kinda. [01:07] craiggles: micheil, yeah i guess i should. [01:07] micheil: integrating and working with C in node can get really complicated very quickly [01:08] craiggles: well, i'm just curious atm. [01:08] chapel: I have thought of similar, but am not in the skill range to do it atm [01:08] craiggles: i won't do it lol, just wondering. [01:08] micheil: craiggles: read the node source code then [01:08] micheil: craiggles: although, integrating anything into node is theoretically possible [01:08] craiggles: i'm fairly new to javascript, nevermind node, i think i ought to get to grips and learn them both first. [01:08] micheil: there's currently a project working on fuse bindings [01:08] micheil: so you can write a node app that's a file system [01:08] vnguyen_ has joined the channel [01:09] craiggles: it's just people are recommending that you learn more when you have projects, it's just all the things i want to do are always too complex/not doable with js. [01:09] chapel: micheil << what about http://github.com/rbranson/node-ffi ? [01:09] micheil: chapel: yeah, that's good too, but once again, things can get confusing quickly [01:09] chapel: craiggles << with node, anything is possible [01:09] micheil: if you're just starting node, I would not recommend trying to do C/C++ modules [01:09] chapel: its just a matter of do you want to spend the time and trouble of doing it [01:09] chapel: :) [01:10] craiggles: heh yeah of course, thanks. [01:10] abustin has joined the channel [01:10] chapel: craiggles << I am still working on my first project, I have rewritten it 3 times, and about to do a 4th. As I learn more about js and node, I see better ways of doing things [01:10] micheil: but seriously, if you want to do C stuff, give this a read: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod [01:10] craiggles: chapel, i find that brilliant. [01:10] micheil: and http://pod.tst.eu/http://cvs.schmorp.de/libeio/eio.pod [01:10] craiggles: I did that with my Ruby IRC bot. [01:10] craiggles: I must have rewritten it at least 10 times. [01:11] admc has joined the channel [01:11] craiggles: contineously improving. [01:11] aurynn: eventually, you have to ship something. [01:11] chapel: well sure [01:11] chapel: the 4th rewrite will be my last [01:11] chapel: at least before I make it production ready [01:11] micheil: I constantly rewrite things I learn from node core [01:11] craiggles: :) [01:12] craiggles: chapel, thanks for the link, but yeah i'll be leaving C for a veryyy long time. [01:12] micheil: like I knew I can decrease the memory footprint per connect and increase the parser throughput on node-websocket-server [01:12] craiggles: first things first, eh? :) [01:12] chapel: whats funny, my 2nd project was super simple, and only took me a day or so to get running and usable (though its nothing more than a glorified shell script) [01:13] craiggles: what projects have you done so far with node? [01:13] craiggles: to give me an idea of what people are doing. [01:14] aurynn: I've been working on the postgres.js driver [01:14] craiggles: not sure what that is, googling. [01:14] aurynn: postgresql? [01:14] chapel: my 2nd one that I have running now is a script that goes to a site, checks a certain element for a change, if its changed, it posts the link to twitter, checks every minute [01:14] aurynn: well-known sort of database. [01:15] Tim_Smart: aurynn: Is it a pure ecma version of http://github.com/ry/node_postgres? [01:15] craiggles: are there multiple versions? [01:15] craiggles: just a google search reveils three different authors. [01:15] craiggles: you being one. [01:16] chapel: my first one is more complex, accessing an api, getting data, organizing/parsing it, putting it in a database, the complexities come in with having to do so many api calls for the different information I need and keeping data consistent and correct [01:16] craiggles: awesome chapel. [01:16] aurynn: Tim_Smart, It's an upgrade of creationix's postgres-pure [01:16] craiggles: i'd like to make a few simple (well i hope they're not complicated) projects with node. [01:16] aurynn: craiggles, afaik, I'm the only actively maintained one [01:17] aurynn: Tim_Smart, which was pure-js [01:17] craiggles: basically some to get me the current top 40 music tracks, another for the lotto results, irc bot. [01:17] craiggles: oh, and i could go into facebook api [01:17] Tim_Smart: aurynn: Right. Have you benched against ry's one? [01:17] craiggles: cooool that's an idea. [01:17] aurynn: Tim_Smart, not yet [01:17] aurynn: what's ry's do? [01:17] ryan_gahl: aurynn: is yours the official postgres one that was announced recently? [01:17] chapel: another project I have an idea for is a twitter filter, as your twitter timeline comes in, you can hide certain tweets and define why you dont like them, and subsequent tweets that match it will be hidden [01:18] aurynn: ryan_gahl, yeah. My company is picking up official support [01:18] Tim_Smart: aurynn: Same thing, it just wraps the postgres C api. [01:18] ryan_gahl: aurynn: cool [01:18] aurynn: Tim_Smart, I meant, what sort of performance does it have? [01:18] Tim_Smart: aurynn: Not sure, haven't tried postgres. [01:18] chapel: craiggles << irc bot, check out jerk [01:18] chapel: `google jerk node [01:18] gbot2: http://www.google.com/search?q=jerk+node [01:18] Tim_Smart: Just interested to see the differences between pure js and C++ [01:18] craiggles: thanks, a friend of mine has made an irc bot with node and jerk [01:19] craiggles: riven. [01:19] micheil: craiggles: I'm the author of the primary "just" websockets server, also working on things like cross eventemitters and fancy stuff between browser/client comms [01:20] craiggles: awesome :D [01:20] chapel: aren't you trying to rewrite http-client as well? [01:20] craiggles: I'm a teenager who hasn't got anything to show. [01:20] micheil: ACTION is 18. Being a teenager isn't an excuse [01:20] chapel: well be glad you are so young in a time like this [01:20] micheil: :P [01:20] chapel: I wish I was your guys age and had toys like this [01:21] craiggles: micheil, i'm not using it as an excuse :) [01:21] micheil: craiggles: sure sounded like it. [01:21] Tim_Smart: chapel: pquerna and myself are rewriting http. [01:21] craiggles: guess it did. [01:21] chapel: 9 years ago, I had html/tables and phpnuke [01:21] chapel: ah pquerna thats it :) [01:21] craiggles: I've got no excuse for why i've got nothing to show. [01:21] micheil: craiggles: oh. yeah, I'm also a very regular contributor to node itself. [01:22] craiggles: I mean, I constantly read and improved my HTML/CSS skills for around 6 months, and would have been seen as a brilliant learner. [01:22] micheil: Tobias|: do you think we have enough people to start a young ones clan in here? :P [01:22] craiggles: Then I just stopped doing so much, stopped reading all the tutorials, the specs (not that i read mcuh of the css) [01:22] ooooPsss has joined the channel [01:22] polotek: Tim_Smart: what's going on with the http rewrite exactly? [01:22] craiggles: and I never got around to learning clientside/serverside (well, basics of client isde)) [01:22] mrjjwright has joined the channel [01:22] chapel: youngnoders.com [01:23] craiggles: so that's why i'm wanting to get good with javascript, use it as my main language, build things. [01:23] Tim_Smart: polotek: Factoring in the new SSL securepair. And just general cleanup I guess. [01:23] polotek: word. no api changes so far? [01:23] Tim_Smart: API will be the same. [01:23] craiggles: so yeah, we've somewhat established my starting points :0 [01:23] micheil: setSecure is deprecated, isn't it? [01:23] craiggles: :)* [01:23] Tim_Smart: micheil: Not yet. Not on server anyway. [01:23] polotek: okay see you guys. good luck craiggles [01:24] craiggles: bye polotek, thanks. [01:24] micheil: craiggles: easiest way to start with node: pick a web service you love, that has an api, and write a wrapper for it [01:24] polotek has left the channel [01:24] craiggles: micheil, not that I *love* facebook, but i presume they've got an api? [01:24] craiggles: would you recommend wrapper for facebook chat? [01:24] chapel: yeah they have an api :) [01:24] micheil: yeah, facebook have an api, it's just massive and awful. [01:24] craiggles: oh. [01:24] micheil: (imho.) [01:24] chapel: facebook chat is xmpp or whatever [01:25] chapel: jabber protocol [01:25] craiggles: hmm, what other sites do i use that have an api. [01:25] chapel: twitter [01:25] chapel: well I dont know if you use it [01:25] Tim_Smart: craiggles: Facebook Chat has a Jabber interface. Make a Jabber lib. [01:25] craiggles: don't personally use it. [01:25] chapel: but it has an easy to get into api [01:25] craiggles: Tim_Smart, wouldn't that be complicated for just staritng out? [01:25] craiggles: starting* [01:25] micheil: craiggles: or, browser http://github.com/ry/node/wiki/Modules and if you see something missing, write it. [01:25] Tim_Smart: craiggles: Don't know. [01:25] Tim_Smart: The XMPP module for node is pretty good I think. [01:26] craiggles: I might start with some simple scrapers. [01:26] micheil: craiggles: why not write a scraper module? [01:26] chapel: craiggles << you dont have to do an api wrapper, you could write simple apps, maybe a mud server? [01:26] elijah-mbp has joined the channel [01:26] craiggles: micheil, I like that idea, but i'd have to make an efficient parser, no? [01:26] chapel: could do that, scraper that is [01:26] chapel: craiggles [01:26] craiggles: I think I recall seeing a jQuery-like module for node [01:26] micheil: var myScraper = new Scraper(function(data){ // do matches, return matches[]}) [01:26] chapel: well all you need is http (which exists) and jsdom (which exists) [01:27] chapel: so you would take those two and make a module that is easy to use [01:27] craiggles: jsdom, that's it. [01:27] chapel: I use jsdom with jQuerify [01:27] chapel: its pretty nice [01:27] chapel: a little heavy on memory [01:27] micheil: myScraper.connect(port, host) [01:27] craiggles: thanks for the idea. [01:27] chapel: but it works [01:27] chapel: you could also use YUI node [01:27] craiggles: cygwin is acting up on me, i'll have to wait until tomorrow :/ [01:27] micheil: myScraper.request(path, options) [01:27] craiggles: well, rather later today when i wake up [01:28] chapel: also, get a linux install :P [01:28] chapel: or osx [01:28] chapel: worth it [01:28] jvolkman_ has joined the channel [01:28] micheil: very worth it. [01:28] banjiewen has joined the channel [01:28] craiggles: chapel, i do :) [01:28] craiggles: well, on my desktop. [01:28] chapel: you could run a virtual linux install [01:28] chapel: vmware or whatever [01:28] craiggles: just my desktop is loud as hell, so i come on the laptop after around 01:00 [01:28] craiggles: this laptop is too terrible for virtual box. [01:28] chapel: oh, is your desktop linux? [01:28] craiggles: yeah. [01:28] craiggles: well, dual boot. [01:28] chapel: cause you could just remote to it [01:28] chapel: ssh [01:29] craiggles: i'd have to have it on. [01:29] craiggles: and it's too loud. [01:29] chapel: ah [01:29] craiggles: thus the reason i come onto laptop. [01:29] craiggles: oh, i've just thought. [01:29] chapel: well install linux on the laptop :) [01:29] craiggles: i could ssh into my vps [01:29] chapel: or that [01:30] craiggles: I would install linux on this but it's my dads laptop that he doesn't use, but i'm not allowed to `fuck it up' he says (meaning removing windows), and this is going to my brother for christmas any how / [01:30] craiggles: off santa, heh. [01:30] craiggles: so, if i've got enough money left after driving lessons etc, i'll be buying myself a laptop. [01:30] craiggles: putting linux on it, and just having my desktop for gaming. [01:30] micheil: craiggles: so? remove windows and put some really arcane linux distro on it [01:31] mrjjwright has joined the channel [01:31] ryan_gahl: like slackware [01:31] craiggles: micheil, are you referring to the laptop or desktop. [01:31] Yuffster has joined the channel [01:31] micheil: laptop [01:31] craiggles: i've literally only got like a week left with the laptop, so i won't be adding another os. [01:31] chapel: :) [01:31] chapel: ssh into your vps should be fine [01:31] craiggles: before it magically goes back to the shop, heh. [01:32] craiggles: chapel, yeah could do that for now :) [01:32] aurynn: virtual machines [01:32] craiggles: aurynn, I mentioend before, the specs of this laptop are hardly ideal for virtualb ox. [01:33] isaacs: i just typoed "programmatically" as "programmagically" [01:33] craiggles: either way it's fine, i'll be able to node from say 12:00-00:00 most days, (obv not full stop :P) [01:33] isaacs: it is my new favorite word. [01:33] craiggles: oh and before i mentioned minecraft C libary. [01:33] micheil: maybe this weekend I'll get a chance to do the mixdown.. [01:33] craiggles: i've also got an arduino, which has C library. [01:33] chapel: yes do it micheil [01:33] chapel: I want to listen [01:34] micheil: chapel: I've been well busy this week. [01:34] chapel: ryah_ needs to respond to Jason at TechZing podcast, so he can get on there and be interviewed! [01:34] micheil: started doing the doc split patch yesterday morning, finished part of it about 1 hr ago. [01:35] micheil: chapel: nah-ah! the changelog has first dibs :P [01:35] micheil: ACTION is also from The Changelog podcast [01:35] sprout has joined the channel [01:35] chapel: heh, well he just needs to respond so he can schedule a date [01:36] micheil: chapel: it's the same with the changelog :P [01:36] chapel: well I keep bugging ryah_ hopefully he will respond :) [01:36] chapel: though whenever he is on any podcast, I'll listen [01:36] Eber has joined the channel [01:36] chapel: bleh, afk [01:37] micheil: chapel: we've been trying since last year. [01:37] micheil: no luck so far, so, yeah. [01:37] micheil: (well, maybe not last year, but near-enough, I'm sure.) [01:39] ben_alman has joined the channel [01:41] craiggles: I see String.reverse(); is not defined, is this not defined in ECMA 262? just writing str.split('').reverse().join(''); is a bit tedious, and sure i could encapsulate it by writing my own reverse function, but i'd prefer it to be a standard function. [01:42] erobit has joined the channel [01:42] SubStack has joined the channel [01:44] eddanger has joined the channel [01:44] bpadalino: that is such a weird request [01:45] eddanger has joined the channel [01:45] craiggles: heh, how so [01:45] craiggles: a common string function is missing and i'd like to see it, what's so weird about that? [01:46] javruben2 has joined the channel [01:46] bpadalino: i guess that's good, but if it isn't part of ecma, how is that helpful ? [01:46] gerred has joined the channel [01:47] craiggles: no, i was asking if it was defined in ecma. [01:47] aurynn: I'd check the ecma spec? [01:47] craiggles: brb. [01:48] craiggles: Array.prototype.reverse was the only reverse function I found. [01:48] bpadalino: i suppose you could write your own String.prototype.reverse [01:49] craiggles: Yeah, I said that, I was just saying I'd prefer for it to be in the spec then have to define it myself. [01:49] craiggles: No biggie though. [01:49] technoweenie has joined the channel [01:51] bpadalino: it doesn't seem weird to complain about something not being in a spec in a channel that really doesn't define the spec ? [01:52] craiggles: lol i was just saying my thoughts, not complaining as such, and yes i know you guys don't define the specs. [01:52] craiggles: well, this channel specificially shall i say. [01:52] craiggles: leave this conversation here. [01:53] ben_alman has joined the channel [01:53] ryan_gahl: craiggles: var str = "1234"; strReversed = str.split('').reverse().join(''); [01:53] ryan_gahl: that's why there's no need for a string.prototype.reverse [01:54] bpadalino: waaaay too tedious [01:54] craiggles: thanks, but i already knew that syntax. [01:54] craiggles: (earlier post) [01:54] craiggles: talking to you guys isn't going to make it magicially appear in the spec so i'll just start my own encapsulation library. [01:55] ryan_gahl: ok, saw that you knew reverse existed on array, wasn't sure if you made the connection to using it in that way [01:55] Crshman_ has joined the channel [01:55] abustin has joined the channel [01:56] craiggles: yeah before i just summarised it as, `str.split('').reverse().join('');` .. thanks though, and then i double-checked whether String.prototype.reverse existed by a quick search, but only Array.prototype.reverse did :) [01:56] ryan_gahl: i guess, if you feel the need to encapsulate things that are already easy, do it up :) //missed that first one my bad [02:01] robotarmy has joined the channel [02:02] aurynn: I'd set it up as a snippet in my editor [02:02] cardona507 has joined the channel [02:04] craiggles: I think i'll be off to bed shortly. [02:05] AAA_awright: Has there been any attempt to program a Google Wave client with Nodejs, or the concurrent editing? [02:06] craiggles: hasn't google wave development been halted? [02:06] evanmeagher: interally, yes [02:07] evanmeagher: the interesting code of wave will supposedly be repurposed in other projects [02:07] evanmeagher: at least they say [02:07] evanmeagher: s/interally/internally [02:07] erobit has joined the channel [02:11] langworthy has joined the channel [02:13] rwaldron has joined the channel [02:13] mikeal: hrm... [02:13] mikeal: where is tmpvar [02:13] erobit has left the channel [02:13] Crshman_ has joined the channel [02:13] chapel: mikeal << are you using _changes with couchdb to spawn node jobs? [02:14] mikeal: yes [02:14] chapel: is there any documentation on that pairing? [02:14] bbttxu has joined the channel [02:14] mikeal: does anyone else use jsdom? [02:14] chapel: I do [02:14] chapel: off and on [02:14] mikeal: chapel: it's pretty simple, you just sit on the continuous feed and trigger an internal event [02:15] mikeal: continuous _changes feed is just lines of JSON with newline seperators in between [02:15] chapel: can I keep-alive? [02:15] mikeal: chapel: does it spit out a jump print of a buffer when you use it? [02:15] bentruyman has joined the channel [02:15] mikeal: chapel: yeah, pass feed=continuous [02:15] mikeal: as a querystring to the http request [02:15] chapel: kk [02:16] chapel: hmm, jump print? [02:17] mikeal: it happens when i use jQuerify [02:18] chapel: well not sure what you mean exactly, sorry [02:18] jperras has joined the channel [02:19] danielrmz has joined the channel [02:19] JimBastard has joined the channel [02:19] chapel: when I juse jQueryify, it seems to work as expected [02:19] shadow_walker has joined the channel [02:20] chapel: though I did have an issue that the first time it checked, it didn't output everything from the selector properly, but it was inconsistent in that front, I just worked around it [02:21] flippyhead has joined the channel [02:21] bartt has joined the channel [02:22] abustin has joined the channel [02:22] bartt has joined the channel [02:22] shripadk has joined the channel [02:23] ryan_gahl: mikeal: I use jsdom, gist? [02:23] unomi has joined the channel [02:23] mikeal: hold on [02:23] ryan_gahl: k [02:23] mikeal: i'm trying to not use jqueryify [02:23] mikeal: just using some innerHTML [02:23] ryan_gahl: (i currently have extjs vs. jquery, but am aiming to swap them) [02:24] severla has joined the channel [02:24] severla: hello, i need some help with mongoose models ... how do i get the id as a hex string? [02:25] Raevel: severla: i'm also wondering about this [02:26] Yuffster has joined the channel [02:27] abustin has joined the channel [02:28] rob has joined the channel [02:28] ryan_gahl: mikeal: sidetalk when you can spare some brain cells... what do you think of BigCouch? [02:28] rob: I'm having some trouble installing npm [02:29] mikeal: BigCouch is cool [02:29] mikeal: it's a pretty direct implementation of the dynamo paper and i uses couchdb as the underlying document store [02:29] ryan_gahl: they manage to maintain parity with couch API? [02:29] ryan_gahl: as in new releases [02:29] severla: Raevel: apparently this can do model._partials._id [02:34] cloudhead: anyone got sendfile working? [02:34] mikeal: ryan_gahl: mostly [02:34] mikeal: there can be differences sometimes [02:34] mikeal: like for a while they had a hard time support the _changes feed [02:35] mikeal: supporting [02:35] mikeal: but now they are pretty up to date [02:35] ryan_gahl: that's a big one [02:35] ryan_gahl: cool [02:35] ryan_gahl: full map/reduce + http interface [02:35] mikeal: fuckin jsdom [02:35] mikeal: it prints whatever script tag i add to it [02:36] ryan_gahl: gist dude [02:36] chapel: gist would help :) [02:37] ryan_gahl: you messin with jquery-tmpl by any chance? [02:37] ryan_gahl: ACTION wonders what mikeal means by "print" [02:38] mikeal: like to the terminal [02:38] ryan_gahl: ah [02:38] chapel: hmm [02:38] mikeal: this is the latest release [02:38] mikeal: i'm gonna try master [02:39] cardona507_ has joined the channel [02:40] mmattozzi has left the channel [02:41] chapel: no gist? [02:41] ryan_gahl: FWIW I'm using http://github.com/tmpvar/jsdom/tree/c85357e73e5d46ca53fe276da06dad04acd11c0b [02:42] chapel: newest for me [02:43] mikeal: i figured it out [02:43] chapel: what was it? [02:44] CIA-94: node: 03Ryan Dahl 07master * r9bea4c8 10/ bin/node-repl : X the node-repl script - http://bit.ly/9x5SZK [02:44] CIA-94: node: 03Ryan Dahl 07master * rfa7dcbe 10/ (Makefile tools/node-waf bin/node-waf): Install node-waf - http://bit.ly/awnOk3 [02:46] ryan_gahl: mikeal: do tell [02:47] mikeal: process.binding('evals').Script.runInNewContext [02:47] flippyhead_ has joined the channel [02:48] ryan_gahl: any chance you can put that in... ahem... context? [02:49] yviktorov has joined the channel [02:49] mikeal: hold on [02:49] mikeal: debugging [02:49] ryan_gahl: :) kk [02:50] ryan_gahl: ACTION eats popcorn in wait [02:50] banjiewen has joined the channel [02:51] ThePub has joined the channel [02:51] mikeal: what the fuck is going on [02:52] mikeal: so [02:52] mikeal: line 338 in index.js [02:52] mikeal: fails [02:53] mikeal: and there is some aweful code that tries to catch it [02:53] mikeal: and just prints a bunch of crap [02:54] mrjjwright has joined the channel [02:54] bbttxu has joined the channel [02:54] mikeal: why is all the indentation in this library aweful [02:54] ryan_gahl: ask tmpvar [02:54] ryan_gahl: so... can't really help without seeing the goods [02:55] ryan_gahl: i can only say, i don't experience the problem [02:58] yviktoro` has joined the channel [03:00] robotarmy has joined the channel [03:00] yviktoro` has joined the channel [03:02] mbrochh has joined the channel [03:02] mbrochh has joined the channel [03:03] JimBastard: mikeal: problems in the jsdom? [03:03] JimBastard: i can yell at tmpvar? [03:03] mikeal: yup [03:03] JimBastard: he was just here [03:03] JimBastard: whats the issue? [03:04] mikeal: exception using jqueryify [03:04] JimBastard: mikeal: do the tests pass? [03:04] JimBastard: which version of node? [03:05] mikeal: 0.2.4. [03:05] JimBastard: thats odd [03:05] JimBastard: is there a gist? [03:05] JimBastard: i can try running locally to reproduce? [03:05] ryan_gahl: gist?? what's that :P [03:06] mikeal: http://gist.github.com/652814 [03:06] chapel: finally [03:06] chapel: oh damn [03:06] mikeal: those are the tests [03:06] mikeal: the gist doesn't tell you once [03:07] mikeal: sorry [03:07] JimBastard: ? [03:07] mikeal: the exception is not helpful [03:07] mikeal: and it lies [03:07] ryan_gahl: ok, what I've been trying to say, gist the source [03:07] JimBastard: what is causing the exception? [03:07] JimBastard: you got code? [03:07] ryan_gahl: exactly [03:08] ryan_gahl: are you using level 1? 2? [03:08] mikeal: haha [03:08] mikeal: ok [03:08] mikeal: here's the deal [03:08] mikeal: minified jquery breaks in node [03:08] mikeal: when you run it through Script.runInNewContext [03:08] JimBastard: lol [03:08] JimBastard: i think thats funny [03:09] JimBastard: regular jquery works? [03:09] Tim_Smart: ryah_: pquerna: http://github.com/Tim-Smart/node/commit/a140aa9b40bfa69ad477307cd3b9cca8358243af [03:09] mikeal: yup [03:09] JimBastard: well, thats an odd bug [03:09] mikeal: i pulled the jquery out of the jsdom tests and it works [03:09] mikeal: the exception is just undefined is not a function [03:09] chapel: I am using the minified jquery [03:09] mrjjwright has joined the channel [03:09] chapel: and it works [03:10] chapel: of course Im not using it the same way you are [03:10] ryan_gahl: mikeal... is your copy of jquery just d/led from jquery.com then? [03:10] mikeal: yup [03:10] ryan_gahl: because "minified" is not the issue [03:10] ryan_gahl: the version that ships with jsdom is slightly modded [03:10] ryan_gahl: same type of deal i had to do with Extjs [03:11] mikeal: whatever kinda optimizations the closure compiler does are breaking [03:11] ryan_gahl: you need to make sure the browser, window, navigator, etc... objects are visible to the script at load time [03:11] chapel: hmm, I am using jquery min directly from jquery.com [03:12] ryan_gahl: well anywho, you got this [03:14] mikeal: yeah, i'm good [03:14] jjcm: Guys [03:14] jjcm: I am officially an idiot [03:14] jjcm: http://leb.net/blinux/ [03:14] mikeal: tell tmpvar that he should .toString() the buffer he gets from readFile [03:14] jjcm: I just spent 10 minutes on that site looking for screenshots. [03:15] mikeal: otherwise when things fail it prints the buffer and that is just aweful [03:15] chapel: lol jjcm [03:15] ryan_gahl: jjcm that is epic [03:16] JimBastard: jjcm: are you blind? [03:16] jjcm: I was getting so annoyed, my inner voice was going, "Why the hell dont they have screensho... ohhhhhh....." [03:16] ajpiano has joined the channel [03:17] jjcm: JimBastard: If I were blind, would I be looking for screenshots? [03:17] JimBastard: mikeal: line number? patch? halp [03:17] ryan_gahl: JimBastard: that was also epic [03:17] ryan_gahl: jjcm: your not seeing JimBastard's joke... 3Xepic [03:18] JimBastard: im glad we have a moderator, thanks ryan_gahl ! [03:18] ryan_gahl: heh [03:18] JimBastard: :-D [03:18] ryanfitz has joined the channel [03:18] Aria has joined the channel [03:19] jjcm: :< [03:19] JimBastard: i don't see the humor in any of this [03:20] chapel: :( [03:21] ryan_gahl: that's because you are a bastard [03:21] mikeal: JimBastard: 377 [03:21] mikeal: in index.js [03:21] JimBastard: http://instantrimshot.com/classic/?sound=rimshot [03:21] pedrobelo has joined the channel [03:23] pedrobelo has joined the channel [03:23] alexfner has joined the channel [03:23] ctp_ has joined the channel [03:24] alexfner: best websocket spec 76 compatible node module anyone? I'm looking for one specifically that won't fall back on AJAX long polling or anything like that and is just a web socket server [03:24] JimBastard: alexfner: micheil has one [03:24] willwhite has joined the channel [03:24] alexfner: JimBastard: this one? http://github.com/miksago/node-websocket-server [03:25] JimBastard: http://github.com/miksago/node-websocket-server [03:25] JimBastard: aye [03:25] alexfner: cool [03:26] alexfner: just wanted to see if this was the best one [03:28] dquestions has joined the channel [03:29] JimBastard: alexfner: its pretty much that or socket.io right now [03:30] JimBastard: i dont know if there are many others [03:30] JimBastard: maybe a few others, not as popular [03:30] dnolen_ has joined the channel [03:30] dquestions: is it just me or is socket.io current release not working with IE 8 or firefox and only chrome? [03:30] dquestions: i did a git clone [03:31] dquestions: cd socketio , git submodule init, git submodule update, cd into examples, sudo node server.js [03:31] mikeal: does jsdom have a way for me to make it aware of the source url? [03:32] Aria: Um. I don't believe so. Why do you need that? [03:33] dquestions: which version of socketio are known to work? [03:34] dquestions: The problem is that in IE and firefox i just get "Connecting..." that never connects [03:35] AAA_awright has joined the channel [03:37] dquestions: i tried doing git checkout 0.5 [03:37] JimBastard: mikeal: source url ? [03:37] JimBastard: what is that [03:37] mikeal: for instance [03:37] JimBastard: is it a property of the DOM ? [03:38] mikeal: window.location.href is the path to index.js [03:38] JimBastard: ? [03:38] mikeal: there is some stuff in the DOM that is different when it relates to a particular URI [03:39] mikeal: but jsdom treats every body that it creates a window out of as the same source URI [03:39] JimBastard: so make a new window? [03:39] JimBastard: or set the location of the window? [03:39] mikeal: i can set that individual property [03:39] mikeal: that's what i'm already doing :) [03:39] mikeal: but there is other stuff in the dom spec [03:40] Aria: Yeah. It's something that's not well developed yet there. [03:40] Aria: (which spec, by the way?) [03:40] JimBastard: you should prob be discussing this with tmpvar [03:40] JimBastard: he should be around soon [03:41] JimBastard: ACTION summons tmpvar [03:41] tmpvar has joined the channel [03:41] tmpvar: yo [03:41] JimBastard: [23:31] does jsdom have a way for me to make it aware of the source url? [03:41] JimBastard: [23:38] there is some stuff in the DOM that is different when it relates to a particular URI [03:41] JimBastard: [23:39] but jsdom treats every body that it creates a window out of as the same source URI [03:41] JimBastard: [23:39] so make a new window? [23:39] or set the location of the window? [23:39] i can set that individual property [03:42] tmpvar: mikeal, you around? [03:43] mikeal: yes [03:43] tmpvar: re: there is other stuff in the dom spec, what are you refering to? [03:43] tmpvar: mikeal, ^^ [03:44] mikeal: i can't remember offhand [03:44] mikeal: i can look tho [03:44] mikeal: it might not be in level 1 [03:44] hober has joined the channel [03:44] tmpvar: mikeal, you are probably right [03:45] tmpvar: we are slowly working through level2.. i need to take another plane ride to jump start it im thinking [03:45] shaver: or DOM0, like document.domain [03:45] shaver: *fistshake* [03:45] tmpvar: shaver, hrm? [03:45] shaver: DOM0 is pain, wrapped in a knuckle sandwich [03:45] shaver: document.domain doubly so [03:46] tmpvar: shaver, im guessing level 0 isnt a w3c spec? [03:46] mikeal: i would love it if window.location was better :) [03:47] tmpvar: mikeal, me to :) [03:47] tmpvar: too* [03:47] eee_c has joined the channel [03:47] mikeal: i have a lot of code around that uses window.location.hash [03:47] tmpvar: ah [03:48] tmpvar: unfortunately thats sort of in "implement at your own disregard" land [03:48] tmpvar: aka BOM [03:48] shaver: DOM0 is specified in HTML5 [03:48] shaver: by painstaking and incredibly high-fidelity reverse engineering [03:49] tmpvar: ah, so thats why Aria hate me.. hah [03:49] mikeal: god bless however did that work [03:49] shaver: Ian Hickson [03:49] tmpvar: s/hate/hates [03:49] shaver: mikeal: sorry for not making it to node.js -- two nights in a row at the office until 11:30, I needed to see the family, and collapse [03:49] shaver: plus, Giants traffic == ugh [03:49] Aria: Hehe. Yep. [03:49] Aria: HTML5 is awesome in that it specifies this crap. [03:50] hober: indeed. [03:50] Aria: But HTML5 is pain because it specifies this crap. [03:50] tmpvar: mikeal, so the work it two parts.. 1) get tests 2) implement [03:50] sh1mmer has joined the channel [03:50] mikeal: shaver: no problem, there will be another next month :) [03:50] tmpvar: both are equally as difficult [03:50] shaver: we have DOM0 tests [03:51] Aria: I need my biggest customer to stop breaking their servers so I can get back to hacking on stuff like this. [03:51] bradleymeck has joined the channel [03:51] tmpvar: Aria, what are your thoughts on this? does html5 spec out new dom/bom stuff? [03:51] Aria: Some yeah. [03:51] igorgue has joined the channel [03:51] tmpvar: interesting [03:51] tmpvar: i'd be interested in pulling those tests into jsdom [03:52] tmpvar: and for god [03:52] tmpvar: 's sake, if anyone decides to find/write BOM tests.. please let me know [03:52] tmpvar: we're in no-mans land there [03:52] Aria: http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window [03:55] Aria: The whole 'browsing context' stuff in there is useful. [03:55] AAA_awright: What ever happened to the W3C? [03:55] Aria: They got slow? [03:55] deepthawtz has joined the channel [03:56] Aria: (In theory, each document gets its own window, and a WindowProxy is a persistent object that's used across documents.) [03:56] Aria: http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#windowproxy [03:57] Aria: Lovely fun, eh? [03:57] tmpvar: hrm [03:57] chapel: if you are just doing parsing, ie only care about the html, would it be faster/efficient to just parse it using regexp? [03:57] Aria: chapel: If you need to parse a regular language subset of HTML, sure ;-) [03:58] Aria: But HTML is not a regular language, so Regular Expressions can't match it. [03:58] chapel: well sure [03:58] tmpvar: this spec does reference back to w3c at some point though. for instance Document [03:58] Aria: Yeah. It's totally a 'way forward' spec, not a 'reinvent the wheel' [03:59] chapel: well what if you know exactly what you are looking for in the html, I mean jquery with jsdom makes it dead simple, but uses a ton of memory [03:59] tmpvar: that is fine. I highly doubt they have a test suite for Window though [03:59] mtodd has joined the channel [03:59] tmpvar: chapel, then you use a sax parser [03:59] tmpvar: and collect the items that you need [04:00] tmpvar: Aria, I must admit I'm fairly perplexed by this. how can you have a spec without tests?! heh [04:00] tmpvar: i guess because its a working draft its ok [04:01] indexzero has joined the channel [04:01] Aria: Heh. Well . . . At some point, you need one or the other. [04:01] tmpvar: have you seen tests for Window in the html5 test suite? [04:01] Aria: In this case, the spec. [04:01] Aria: I haven't, not in the ruby library I've been ~porting/rewriting. [04:01] indexzero: isaacs: yt? [04:01] Aria: It pretty much ignores that part, since it's not really applicable. Since we're making a whole js environment, it is here. [04:01] tmpvar: are you running against: http://dev.w3.org/html5/tests/ ? [04:02] Aria: Nope. [04:02] Aria: But it's a good idea. [04:02] Aria: (I'm not doing any validation yet -- just the parsing algorithm and a test suite designed to exercise that) [04:02] tmpvar: got ya [04:02] yviktoro` has joined the channel [04:02] Aria: (I'm using the suite in html5lib) [04:03] tmpvar: this looks promising (http://dev.w3.org/html5/tests/submission/Microsoft/windowobject/) if you trust the provider ;) [04:03] Aria: (It's a set of documents and serializations of parse trees.) [04:03] Aria: I do. MS knows exactly how they've botched it ;-) [04:03] hober: There's going to be a big test drop at TPAC in a couple of weeks [04:03] Aria: Only one test in there though [04:03] tmpvar: hober, TPAC? [04:03] Aria: Sweet. [04:03] tmpvar: Aria, yeah [04:04] hober: tmpvar: w3c's tech plenary [04:04] tmpvar: ok [04:04] mikeal: hrm [04:04] mikeal: jquery's .attr('src') doesn't seem to work with jsdom [04:04] tmpvar: so until then its level 1/2/3 [04:05] tmpvar: thats odd, let me try it out [04:05] mikeal: http://gist.github.com/652893 [04:06] mikeal: inside that each loop [04:06] tmpvar: i'd expect an "a" to have an href not a src? [04:06] mikeal: $(n).attr('src') is blank [04:06] mikeal: oh yeah, i'm a retard [04:07] tmpvar: haha, np [04:07] Aria: That always throws me. [04:07] Aria: (vice versa, though -- I use href when I should use src) [04:07] tmpvar: likewise [04:07] tmpvar: ok [04:08] tmpvar: so basically we're not in horrible shape, but I'd like to call to arms anyone that wants a full dom to make a topic branch and start making tests pass in level2/3 :) [04:08] tmpvar: that way when these tests for html5/dom0/etc drop we'll be ready ... [04:09] shadow_walker has joined the channel [04:09] Aria: I'll see if I can't pry any time out of my clients this week. [04:09] Aria: Just gotta stop having them change security on their servers and break all the things those servers do. [04:09] tmpvar: tell 'em you're a noder now. [04:09] tmpvar: :P [04:09] Aria: Hehe. [04:09] Aria: If only noding paid the bills directly and immediately. [04:10] hober: I imagine it will soon enough [04:10] Aria: (and didn't require applying for jobs on the left coast) [04:10] micheil: alexfner: socket.io 0.7 or 0.8 will use node-websocket-server [04:10] Aria: (I like my mountains.) [04:10] hober: Aria: whereabouts are you? [04:10] micheil: alexfner: and I can assure you that node-websocket-server is the most spec compliant node websocket server. [04:10] ysynopsis has left the channel [04:10] micheil: it supports both draft 76 and 75 [04:10] hober: I would have s/the left coast/the bay/, since I'm already on the coast (San Diego) :) [04:11] alexfner: micheil: ah, I like node-websocket-server, I don't want a fallback with ajax long polling or anything else ;) [04:11] micheil: and will support draft-03 or -04 when I implement it. [04:11] robmason_ has joined the channel [04:11] micheil: hey robmason_ [04:12] robmason_: micheil: hey? [04:12] Aria: hober: Ridgway, CO. Middle of nowhere. [04:12] micheil: robmason_: I wasn't after anything or something, just thought I'd say hi. [04:12] hober: oh, rad. I've really liked CO when I've been there. Mostly Colorado Springs & Denver. [04:14] Aria: Mmm. I used to live in Denver. Nice, for a city. [04:14] Aria: I'm now deep rural. Right at the base of the mountains. [04:14] Aria: And we've had relatively good internet access in this state since 1995, so hey! [04:15] ThePub has joined the channel [04:19] galaxywatcher has joined the channel [04:20] rcy has joined the channel [04:23] igorgue has left the channel [04:27] shadow_walker has joined the channel [04:31] alexb_ has joined the channel [04:38] mbrochh has joined the channel [04:45] abustin has joined the channel [04:46] Yuffster_work has joined the channel [04:51] mrjjwright has joined the channel [04:54] ang has joined the channel [04:55] EyePulp has joined the channel [04:57] ang: hi. I'm running the node_chat example from http://github.com/ry/node_chat .. and I was just checking on the memory usage via a "ps aux" and wondering why the VSZ is high: [04:57] ang: ang 13330 0.0 4.4 622752 11288 pts/0 Sl+ 00:36 0:00 /home/ang/node-v0.2.4/node server.js [04:58] mjr_: RSS is what matters [04:58] mjr_: 11MB is pretty reasonable. [05:00] micheil: also, in 0.3.X, that'll be hopefully a little bit less [05:00] micheil: as we're really working hard to make node much more memory effcient [05:00] ang: ok, was just curious as to why it's such a huge number compared to the RSS :) [05:00] robmason has joined the channel [05:02] SubStack has joined the channel [05:03] mjr_: vsz is pretty much magic. [05:03] mjr_: Unless there is swapping going on, it almost never helps to know. [05:05] yumike has joined the channel [05:07] saikat: is there a function that is map but changes the original array instead of creating a new array? [05:09] mjr_: saikat: you can assign the results of arr.map() back to arr. [05:10] mjr_: arr = arr.map(fn); [05:10] saikat: yeah [05:10] saikat: that's what i'm doing now [05:10] saikat: just was curious [05:11] saikat: i have an array of objects and wanted to do something like arr.map(function(val) { val.prop2 = newVal}) instead of arr.map(functoin(val) { return {prop1 : val.prop1, prop2 : newVal} })) [05:12] zomgbie has joined the channel [05:13] muk_mb has joined the channel [05:14] mjr_: just use arr.forEach then I guess. [05:14] saikat: oh right [05:14] saikat: thanks [05:15] mjr_: my computer has become slow and swappy. I must reboot it. [05:17] macguyver has joined the channel [05:17] macguyver: how do you guys organize your node.js scripts? [05:17] macguyver: im missing a scripting framework for all js scripts/libraries [05:18] micheil: macguyver: what do you mean? [05:18] macguyver: micheil: lets say like Thor (ruby) in the backend [05:18] micheil: I don't know anything about thor. [05:20] macguyver: you just put everything inside a script and run it...but then you realize that there are parts reusable for other scripts .. how have you organized your scripts/libraries for reusage [05:20] rbranson: noteworthy finding of the day: IPv6 address space has 1,487,079,723,990,878,876,600 addresses per square inch of land on earth [05:20] modular has joined the channel [05:21] mjr_ has joined the channel [05:22] dohtem has joined the channel [05:22] dohtem has joined the channel [05:22] dquestions has joined the channel [05:24] Utkarsh has joined the channel [05:33] dgathright has joined the channel [05:37] ThePub has joined the channel [05:37] Tim_Smart: pquerna: http://github.com/Tim-Smart/node/tree/http-streams if you are around. [05:37] Tim_Smart: pquerna: For some reason it is slower than master, but I think we can turn that around. [05:39] Utkarsh has joined the channel [05:39] brianmario has joined the channel [05:41] masahiroh has joined the channel [05:48] ryah_: Tim_Smart: is it passing tests/ [05:48] Tim_Smart: ryah_: Yeah. [05:48] Tim_Smart: The server is anyway [05:49] Tim_Smart: I didn't run all the tests though. [05:51] dquestions has joined the channel [05:53] ThePub has joined the channel [06:00] bearnard has joined the channel [06:03] alexb_: When should i use web workers instead of child process API? [06:03] JimBastard: alexb_: when you need to distribute a job? [06:03] JimBastard: child process api will let you spawn stuff quickly [06:03] alexb_: I want to isolate my main daemon from job memory leaks or crashes [06:03] JimBastard: there are a few tools that do that [06:04] alexb_: Better to run jobs in a child process? [06:05] JimBastard: depends on what you are doing i suppose [06:05] ThePub has joined the channel [06:05] alexb_: Tag cloud caching [06:06] JimBastard: hrmm? [06:06] alexb_: And index generation stuff [06:06] alexb_: I find the node.js gc doesn't really work properly for complicated stuff [06:06] alexb_: Er v8 i gurus [06:07] alexb_: I guess [06:07] JimBastard: i like turtles [06:07] JimBastard: sorry, im a bit lost [06:08] Tim_Smart: alexb_: Web workers will work just as well as child_processes. [06:08] JimBastard: alexb_: you could try something like http://github.com/technoweenie/coffee-resque [06:08] matjas has joined the channel [06:11] alexb_: Hmm coffee script + Redis though, I will give web workers a shot since im used to using them in the browser [06:11] SamuraiJack has joined the channel [06:13] ngw has joined the channel [06:15] dquestions has joined the channel [06:23] Tim_Smart: ryah_: For some reason when I use 'ondata' instead of 'on('data')', the 'end' event won't fire :/ [06:23] ryah_: Tim_Smart: hm [06:23] ryah_: *shrug* [06:23] Tim_Smart: ryah_: I think using on('data') is slowing it down some. [06:26] ryah_: Tim_Smart: probably [06:26] ryah_: Tim_Smart: how far behind are you? [06:26] ryah_: and what are you measuring? [06:26] Tim_Smart: ryah_: I'm just using benchmark/http-simple for now [06:27] ryah_: Tim_Smart: how - what response size? i often test with /bytes/123 [06:27] Tim_Smart: I'll get ondata working then try again. [06:27] ryah_: the ondata / on('data') should be only 5% or so [06:27] Tim_Smart: OK. [06:30] V1 has joined the channel [06:31] ryah_: need to figure out a way to automate a few of these max connection tests.. [06:32] ivanfi has joined the channel [06:33] V1: Create a small botnet :)? [06:33] JimBastard: ryah_: would a node script suffice? [06:33] JimBastard: or do you need to spawn up a bunch of vps instances? [06:34] muhqu has joined the channel [06:35] V1: http://github.com/newsapps/beeswithmachineguns <-- load testing over EC2 with automatic scaling up and down of instances [06:35] ryah_: oh, i just need to run benchmark/idle_server.js and benchmark/idle_clients.js [06:36] Tim_Smart: ryah_: OK this brings it pretty close http://github.com/Tim-Smart/node/commit/7f895db037d0c26a7600a8ba61555dfb3dfd263f [06:36] Tim_Smart: I might run a profile and get an idea where the time is going. [06:37] ryah_: do you have that hot path that i have? [06:37] Tim_Smart: Yeah. [06:38] mbrochh has joined the channel [06:38] TomY has joined the channel [06:39] ryah_: you shouldn't turn it into a buffer [06:39] ryah_: just dump it to the socket as a string [06:39] ryah_: e.g. here http://github.com/Tim-Smart/node/blob/7f895db037d0c26a7600a8ba61555dfb3dfd263f/lib/httpoutgoing.js#L140 [06:40] Tim_Smart: Yeah, I just have to patch _childWrite [06:41] ryah_: hopefully with the new writev stuff and string pointers these sort of hacks wont be necessary [06:42] mtodd has joined the channel [06:43] mjr_: Did recent changes in master break npm? http://gist.github.com/653037 [06:44] easternbloc has joined the channel [06:45] ThePub has joined the channel [06:46] alexfner has joined the channel [06:57] stride: morning guys. there's no way to follow these organisation/group accounts on github, right? [06:57] technoweenie has joined the channel [06:57] mjr_: ryah_: this npm crash seems to be related to your lib/timers.js work [06:57] ryah_: hm [06:57] ryah_: yeah [06:57] mjr_: Which I just now noticed is there [06:58] ryah_: it seems he's passing null to clearTimeout [06:58] mjr_: so a bug in npm was previously getting silently ignored [06:58] mjr_: perhaps? [06:59] mjr_: Did any other behavior with timers get changed that might cause him to pass in null? [06:59] ryah_: yeah - i'm okay with handling clearTimeout(null) [06:59] ryah_: shrug [06:59] mjr_: OK, want me to patch that? [07:00] ryah_: already did. incoming. [07:01] mjr_: nice [07:01] CIA-94: node: 03Ryan Dahl 07master * r7a48fd8 10/ (lib/timers.js test/pummel/test-timers.js): Handle null values in clearTimeout - http://bit.ly/9rt0b1 [07:01] shouvik has joined the channel [07:02] mjr_: 0.3.x is getting a bunch of pretty serious work done on it [07:04] ryah_: yep, it's nice [07:04] TomY has joined the channel [07:04] ryah_: i feel like we've been holding back on a lot of work [07:04] faust45 has joined the channel [07:04] ryah_: for the sake of 0.2 stability [07:05] ryah_: i hope tim gets the server up to speed. would like to land that refactor [07:08] chapel: just reminding you ryah_ to respond to that email about the podcast :P [07:08] zentoooo has joined the channel [07:08] ryah_: chapel: i did [07:08] ryah_: yesterday in fact [07:08] chapel: did you? awesome [07:08] ollie has joined the channel [07:09] chapel: sorry I didn't know, I am not in direct contact with the podcast guys, just a listener [07:09] MattJ has joined the channel [07:09] V1: ryah_: Are there any plans on updating the no.de installations? [07:09] chapel: :) [07:10] ryah_: V1: in what way? [07:10] ryah_: V1: you should get new versions rolls out automatically [07:11] V1: ryah_: That is odd, when I do a node_g -v it says v0.2.0 [07:11] ryah_: there are a few things in the knockout versions that were not 'upgradable' [07:11] ryah_: V1: hm... do ls /usr/nodejs/ [07:11] V1: I would than have expected it would be running v0.2.4 [07:11] ryah_: (or maybe it's /opt/nodejs ) [07:11] V1: 0.2.0 is the latest version listed there [07:12] ryah_: oh - well you should be getting a new version soon [07:12] ryah_: kind of surprised that's not done yet [07:12] V1: Same, thats why I asked [07:12] macguyver: where is the node_libraries installed when you installed node as root? [07:13] ryah_: macguyver: /usr ? [07:13] macguyver: ryah_: yeah but i cant find the exact location [07:14] Tim_Smart: ryah_: Things are a little behind now https://gist.github.com/d50bb80f1bde19b99a64 [07:14] Tim_Smart: I think there might be a few things I am missing though. [07:14] ryah_: macguyver: /usr/lib/node [07:14] macguyver: ryah_: no such folder [07:15] macguyver: im running ubuntu [07:15] ryah_: Tim_Smart: ah you're using make bench :) [07:15] ryah_: nice [07:15] delapouite has joined the channel [07:15] virtuo has joined the channel [07:17] qFox has joined the channel [07:17] SubStack has joined the channel [07:17] dgathright has joined the channel [07:20] digitalspaghetti: have to post this one for the sheer HURF DURFery: http://behind-the-enemy-lines.blogspot.com/2010/10/cease-and-desist.html [07:22] jimt_ has joined the channel [07:25] ph^ has joined the channel [07:26] jetienne has joined the channel [07:27] Druid_ has joined the channel [07:27] ThePub has joined the channel [07:27] jimt has joined the channel [07:28] guybrush: digitalspaghetti: haha [07:28] dgathright has joined the channel [07:28] karsten_ has joined the channel [07:28] delapouite has joined the channel [07:29] karsten_ has left the channel [07:30] karboh has joined the channel [07:30] digitalspaghetti: guybrush: indeed, people are stupid :( [07:30] aubergine has joined the channel [07:32] Anti-X has joined the channel [07:34] jimt_ has joined the channel [07:35] Crshman_ has joined the channel [07:41] crohr has joined the channel [07:42] adambeynon has joined the channel [07:45] unomi has joined the channel [07:45] Anti-X has joined the channel [07:45] kkaefer: anyone here who can explain crypto's Credentials object? [07:46] kkaefer: damn, meta question ;) [07:46] kkaefer: specifically, I'm interested in the shouldVerify property [07:46] kkaefer: why is it part of Credentials? [07:47] digitalspaghetti: kkaefer: be warned, Crypro is changing heavily (but i don't know the answer to your question) [07:47] kkaefer: digitalspaghetti: I know, and I want to help changing it ;) [07:47] margle has joined the channel [07:48] digitalspaghetti: ahh, k then ;) [07:48] digitalspaghetti: Tim_Smart or micheil might be able to help [07:49] micheil: what? [07:50] micheil: kkaefer: um, it's going to be changing somewhat. [07:50] micheil: you'll still do: crypto.createCredentials [07:51] kkaefer: I'm interested in the purpose of the shouldVerify property [07:51] kkaefer: why is it part of Credentials? [07:51] micheil: oh, I couldn't tell you on that. [07:51] micheil: all I know is the basic usage. [07:51] kkaefer: it seems to be a flag for verifying the other party's credentials [07:52] micheil: pquerna: knows the details, he can be git blamed for it iirc., [07:52] kkaefer: thanks [07:52] micheil: (we are working actively on better documentation. So I'll take note that this needs to be done.) [07:55] mikeal has joined the channel [07:57] fbits has joined the channel [07:57] ThePub has joined the channel [08:00] jetienne has joined the channel [08:04] jimt has joined the channel [08:10] Neil__ has joined the channel [08:11] stephank has joined the channel [08:14] digitalspaghetti: http://openkeyval.org/ [08:17] micheil: hey, any of you fine folks into music & want to win a copy of a magazine? http://www.optussoundscribe.com/blog/2369/Win-a-copy-of-the-new-November-triple-j-Magazine [08:17] micheil: [08:18] jetienne: node-static author is around ? [08:18] micheil: nupo [08:19] cyraxx: anyone from debuggable around? [08:19] jetienne: i wish node-static author would kept his library runnable with current stable node [08:19] micheil: cyraxx: by the looks, no [08:19] rikarends has joined the channel [08:19] stoneg has joined the channel [08:20] jetienne: backrolling to node 0.2.3 for streamie [08:20] peutetre has joined the channel [08:21] cyraxx: micheil: do you know the guys' nicks when they're here? [08:21] micheil: felixge and... someone else [08:21] cyraxx: okay, thanks [08:21] jetienne: cyraxx: it may be on the transload website [08:23] romainhuet has joined the channel [08:24] chapel: micheil: what kind of music do you like? [08:24] micheil: any and all [08:24] chapel: how about www.bankai.fm ? [08:24] micheil: Indie, Alternative, Rock, Acid Jazz, Jazz, hip hop, etc [08:24] micheil: electro is cool too. [08:25] chapel: its a friend of mine who is from melb [08:25] micheil: nice [08:25] micheil: well, yeah, with that comp. provided we can post it to you, you'll be able to win it. [08:26] chapel: well, its just for a magazine? [08:27] micheil: true, but it's a damn good magazine [08:27] micheil: and it's not much work [08:27] micheil: sign the peitition on the site, add a comment, and you're in the draw. [08:28] pufuwozu has joined the channel [08:29] dtrasbo has joined the channel [08:29] jetienne: digitalspaghetti: is that yours ? [08:29] bearnard has joined the channel [08:31] macguyver: JimBastard: its ready soon? =) [08:31] JimBastard: sigh [08:31] JimBastard: i got up from laying down for that [08:31] JimBastard: nov 1, you'll get an email [08:32] JimBastard: :-) [08:32] ajsie: 3 days more :( [08:34] ajsie: I have a node exported module .. how can I "require()" it? [08:35] dquestions has joined the channel [08:37] jetienne: node0.2.2 is the max possible for node-static [08:38] mbrochh has joined the channel [08:39] rikarends has joined the channel [08:40] jetienne: ajsie: how is it called ? is it installed by npm ? [08:41] ajsie: thats what i wonder .. how should i do to be able to require() them [08:41] ajsie: what are best practices [08:41] jetienne: ajsie: i dont understand what you want [08:41] ajsie: i want to have one set of modules every file in my ubuntu os can require() [08:41] jetienne: rephrase to be understable [08:42] ThePub has joined the channel [08:42] aubergine has joined the channel [08:44] ajsie: i have a module .. how do i make it universal so i can use require("module") from any file [08:44] jetienne: ajsie: you make it installable by npm. search "npm github" for more info on how to do it [08:45] javruben has joined the channel [08:51] AAA_awright: ajsie: put it in your NODE_PATH [08:52] AAA_awright: ajsie: http://nodejs.org/api.html#module-resolving-325 [08:52] ajsie: AAA_awright: weird ... i am root .. running "echo $NODE_PATH" gives me nothing [08:53] AAA_awright: That's not the only place Node.js searches but you can pass it to node if you want to [08:53] AAA_awright: NODE_PATH=lib node script.js [08:54] AAA_awright: And of course, don't do anything as root that you don't need to! [08:54] d0k has joined the channel [08:54] robinduckett has joined the channel [08:55] micheil: hey, folks, if you have any quams with the current documentation, could you add an issue to: http://github.com/miksago/node/issues [08:55] micheil: or to http://github.com/ry/node/issues [08:55] robinduckett: qualms? [08:55] ajsie: AAA_awright: yeah maybe my system is corrupcted cause i ran things as root [08:56] micheil: robinduckett: or them. [08:56] zomgbie has joined the channel [08:57] micheil: bbl. [08:57] sideshowcoder has joined the channel [08:58] Utkarsh has joined the channel [08:59] ajsie: can i install a local npm package without publishing it? [08:59] ajsie: i have a folder with package.json .. how do i install it? [08:59] guybrush: ajsie: http://github.com/isaacs/npm/blob/master/doc/install.md [09:00] guybrush: there is even a nice man-page `npm help install` [09:00] Crshman_ has joined the channel [09:01] aubergine_ has joined the channel [09:01] shadow_walker has joined the channel [09:02] tek has joined the channel [09:03] xla has joined the channel [09:03] V1: I'm planning of adding SPDY protocol support for node, but I'm wondering what would be the best way of implementing it.. Adding a new server format. eg: require('spdy').createServer() or find someway to extend the http.createServer with SPDY support so you only to "code" one server instance [09:04] shadow_w_ has joined the channel [09:05] jetienne: V1: i would say "extend http.createServer" but if you are implementing SPDY this is the least of your problem. SPDY is major work [09:05] Nohryb has joined the channel [09:05] V1: jetienne: I know, protocol handling will be painful :) [09:06] chapel: whats spdy? [09:06] themiddleman has joined the channel [09:07] jetienne: http://www.chromium.org/spdy/spdy-whitepaper <- i would love if it could take off. especially on mobile/wifi [09:07] V1: A faster protocol than HTTP [09:07] guybrush: i like how its named [09:08] V1: There is already a small implementation of SPDY for python, so that gives me some initial code to fork off. [09:08] guybrush: V1: I cant wait to follow the repository :D [09:08] V1: ;D [09:09] ryanfitz has joined the channel [09:10] aubergine has joined the channel [09:11] V1: Cant wait to get started on it, just got to finish up a couple of things before I can get started with it. [09:12] dquestions has joined the channel [09:13] aliem has joined the channel [09:18] alexb_: Chromium supports spy? [09:19] V1: Yes [09:19] clynx has joined the channel [09:20] AAA_awright: How many SHA1 hashes should I be able to do per second? [09:20] alexb_: Pretty cool [09:21] pufuwozu has joined the channel [09:22] meandi has joined the channel [09:23] Tim_Smart: AAA_awright: Depends on the data you are hashing [09:23] teemow has joined the channel [09:26] AAA_awright: Tim_Smart: Short strings, I can seem to do a thousand a second or so [09:27] ThePub has joined the channel [09:27] Anti-X has joined the channel [09:31] daglees has joined the channel [09:31] daglees has joined the channel [09:33] AAA_awright: nvm false alarm, milliseconds :p [09:37] bearnard has joined the channel [09:38] Tim_Smart: Hmm https://gist.github.com/b6c49e2a47c4e2b60f55 [09:38] Tim_Smart: Strings are a PITA [09:41] pquerna: jetienne: someone needs to make a stream implementation for node.js of spdy (and keep the http.js api) [09:41] pquerna: V1: yeah, just create a new module, with its own createServer; [09:42] pquerna: V1: just match all the methods that http has, use the same objects as much as possible [09:42] jetienne: pquerna: im so agreeing [09:42] Tim_Smart: pquerna: I'm optimizing server atm. [09:42] Tim_Smart: Got it to pass tests [09:43] V1: Well SPDY is just another flavor of HTTP / tpc so .end() and .write() etc will still have the same behavior [09:43] pquerna: kkaefer: figure out the creds question? [09:44] stride: are there any SPDY clients in the wild? [09:44] stride: or is that still some weird chrome patch like it was back when the paper was published? [09:46] jetienne: stride: it needs more love [09:47] ThePub has joined the channel [09:48] pquerna: Tim_Smart: are you profiling for these optimizations? [09:48] Tim_Smart: pquerna: Profiling and benching yes. [09:49] shadow_walker has joined the channel [09:49] pquerna: Tim_Smart: sweet [09:50] pquerna: stride: its compiled into all chrome builds now i thought [09:52] stride: no idea, everything related to chrome and spdy I can find dates back to 2009 [09:57] pquerna: stride: they goog guys were talking about it at velocity this year. They are on v3 of the protocol, and seem to intend to ship it. [09:57] pquerna: stride: v2 is whats out in th ewild right now, v3 has some changes that should make it pretty solid. My impression was google would ship it in chrome, and then turn it on for their own sites to make em faster on some random day :) [09:58] Tobias|: That would be nice [09:58] V1: I think Google already ships it inside of Chrome [09:58] pquerna: yup [09:58] StanAngeloff has joined the channel [09:58] aubergine has joined the channel [09:59] Tobias|: Although I question how much faster things will be if they're already gzipped [09:59] V1: 40% [09:59] alexb_: Is that smaller or faster? [09:59] pquerna: V1: v3 they were rev'ing to include things like transporting websocket over it [09:59] V1: http://www.chromium.org/spdy/spdy-whitepaper See the tables [09:59] pquerna: alexb_: spdy basically means the client and server can always pipeline [09:59] pquerna: (and they can respond in any order) [10:00] Tobias|: V1, that doesn't explicitly state if gzip compression is enabled on the typical HTTP sites or not [10:00] V1: SPDY websockets would be awesome. [10:00] pquerna: http with full pipelining isn't that far off [10:00] pquerna: but no one can do pipelining because of proxies and bad servers etc [10:00] alexb_: I wish gzip and pipelining were in core [10:00] pquerna: so, if you just ssl it, and use a protocol that requires pipelining + multiplexing [10:01] pquerna: and reduce some duplicate data in the headers [10:01] pquerna: you end up with spdy [10:01] alexb_: Spdy is ssl? [10:01] pquerna: it currently requires ssl [10:01] alexb_: Hmm so you need a certain [10:01] alexb_: A Cert [10:01] Tobias|: No [10:01] Tobias|: Just generate your own [10:02] pquerna: not really. [10:02] pquerna: i mean, if you want it to work, you'll pay the tax [10:02] pquerna: but for testing a self cert is fine [10:02] V1: But implementing it in Node will be painfull, 1) binary sucks in node, 2) ssl sucks in node 3) There probably more things that will totally suck :D [10:03] mikedeboer has joined the channel [10:04] V1: But I'm gonna have so much fun with implementing it :) [10:04] jetienne: there is a packing lib to help binary stuff [10:05] pquerna: V1: use master, securePair [10:05] pquerna: V1: securepair + node-strtok should make it pretty easy [10:06] jetienne: with spdy, firesheep wont be there :) [10:06] pquerna: alexb_: i think adding gzip to core will be done. [10:06] rauchg_ has joined the channel [10:07] pquerna: alexb_: its an 'easy' patch after all this stream refactoring [10:07] sebastiandeutsch has joined the channel [10:07] pquerna: though the optimizations are making that harder :) [10:08] pquerna: Tim_Smart: you don't get chunking errors now? [10:08] Tim_Smart: pquerna: With server no. I might have broke client slightly though. [10:09] pquerna: Tim_Smart: on server [10:09] Tim_Smart: It seems ClientConnection is adding some overhead - so we won't be able to get quite as fast as before. [10:10] Tim_Smart: pquerna: Nope. Are you? [10:10] pquerna: Tim_Smart: https://gist.github.com/fc86c94cf8164532ebf1 [10:11] pquerna: Tim_Smart: yes, curl -i -vv http://127.0.0.1:8124/ [10:11] omarkj has joined the channel [10:11] pquerna: Tim_Smart: its missing the initial chunk length [10:11] Tim_Smart: I think I fixed that. [10:12] Tim_Smart: I wasn't converting the length properly. [10:13] zomgbie has joined the channel [10:13] Tim_Smart: I'm just seeing if I can speed a couple things up, then I'll commit what I got. [10:14] pquerna: okay [10:14] mAritz has joined the channel [10:14] aubergine has joined the channel [10:15] Nohryb_ has joined the channel [10:15] Ori_P has joined the channel [10:15] agnat has joined the channel [10:16] Tim_Smart: The other profile I did was a bit dodgy. The latest: https://gist.github.com/2c7946594e45ff6d08c0 [10:16] shadow_walker has joined the channel [10:16] Tim_Smart: I got a few ideas to get the parser times a bit faster. [10:17] Tim_Smart: A lot of time is going into String::WriteUtf8 [10:17] Tim_Smart: Grr [10:19] killfill has joined the channel [10:19] Tim_Smart: pquerna: pushed. [10:19] antris: anyone know how to get firebug lite to display automatically on IE? [10:19] antris: or do i have to click the bookmark every time [10:20] sth: you could just run the code on window load. [10:20] mAritz: Tim_Smart: i wanted to bench biggie-orm vs nohm and ran into a weird issue with biggie-orm. everytime i ran it, it got slower for 50-100% until i flushed the db. (i did it with 1000 iterations) [10:20] Tim_Smart: 50%-100%? [10:21] mAritz: (btw: turns out nohm is approximately 20-30% slower. since i've put a lot of work in nohm and now even have a small dbexplorer webinterface for it, i've decided to stick to nohm for now.) [10:21] mAritz: yes. started with ~200ms. next iteration ~250-300ms, next ~400ms (or something like that) and so on. [10:21] Tim_Smart: What did you bench it with? [10:22] mAritz: your stress.js [10:22] Tim_Smart: Ah, it doesn't clear the database each time you run it. [10:22] mAritz: yes, but its still weird. nohm didn't have that behaviour. [10:22] Tim_Smart: mAritz: It does a record update for each entry... [10:23] mAritz: no, only for the 1000 created records?! [10:23] Tim_Smart: So it has to update 2x as many items each time you run it. [10:23] Tim_Smart: Nope. [10:23] mAritz: did i misread the code? damnit [10:23] mAritz: :D [10:23] mAritz: okay then, my bad. sorry. [10:24] Tim_Smart: mAritz: http://github.com/biggie/biggie-orm/blob/master/extra/stress.js#L43 [10:24] Tim_Smart: It creates 1000 users, saves them, gets them all, updates them all, saves them again. [10:24] mAritz: yeah, i thought it was operating on the collection, not the usermodel ^^ [10:25] mAritz: in that case my nohm benchmark is off as well. [10:25] Tim_Smart: OK. [10:25] Tim_Smart: Let me know the results :) [10:25] mAritz: hm, if i do one, i will. :D [10:26] Tim_Smart: I will be attempting a partial re-write of the redis code for it soon anyway. [10:26] Tim_Smart: It might be a little bit slower, but will use atomic transactions as much as possible. [10:27] Tim_Smart: So I can do unique checks the proper way etc. [10:28] ryanfitz has joined the channel [10:35] rubyphunk has joined the channel [10:35] mAritz: hm, btw: the way i do unique checks i setnx the unique key for the validation to a value that is not an id. then in the multi/exec saving process i set the unique key to the proper id. this way you can theoretically clean up broken uniques in maintenance mode. [10:37] agnat has joined the channel [10:38] fbits has joined the channel [10:38] Bacta has joined the channel [10:38] mbrochh has joined the channel [10:38] pquerna: Tim_Smart: if possible, smaller/one change a time, its hard to follow and try to fix the client with bigger commits that change multiple things [10:39] shripadk has joined the channel [10:39] Bacta: Is this still considered a toy? [10:39] Tim_Smart: pquerna: Ya. I'll try settle down a bit :) [10:40] Bacta: I've been looking at it for an app where we would like to make use of web sockets, our Apache/WSGI stack doesn't look up to the job [10:40] margle has joined the channel [10:41] panosjee has joined the channel [10:42] galaxywatcher has joined the channel [10:42] saschagehlich has joined the channel [10:43] panosjee: hi guys, i am a noob to node.js and I have a problem install node-redis [10:45] pandark_ has joined the channel [10:45] pufuwozu has joined the channel [10:48] fermion has joined the channel [10:49] javruben2 has joined the channel [10:49] saschagehlich: panosjee: what kind of problems? [10:50] rikarends has joined the channel [10:51] pquerna: Tim_Smart: hmm. things like _childWrite, should we really just eat the data there? [10:51] pquerna: (in server, i thought it used to buffer if data was being written from the wrong client?) [10:51] pquerna: s/client/child/ [10:51] sechrist: SubStack: you there? [10:51] Anti-X has joined the channel [10:51] Tim_Smart: pquerna: I do check I think. if (this._outgoing[0] === child) { ... [10:52] Tim_Smart: If not, it returns false. [10:53] pquerna: yes, returning false, but not buffering it? [10:53] Tim_Smart: Ah yes. [10:53] Tim_Smart: It will need to pop it back on _output [10:55] Tim_Smart: You think child._output.unshift(data) + _outputEncoding will be fine? [10:55] pquerna: kinda a layering violation, but meh [10:55] Tim_Smart: OK. I'll let you decide :) [10:55] Tim_Smart: haha [10:56] panosjee: saschagehlich i used npm to install the redis-client [10:56] panosjee: it did install it but once i require the lib i get Error: Cannot find module './../.npm/redis-client/0.3.3/package/redis-client' [10:56] saschagehlich: please show me your code [10:56] panosjee: two other packages (socket.io and node-static) have been install succesfully though [10:57] panosjee: just one line: var redis = require("redis-client"); [10:57] pquerna: will have to set hot=false too. [10:59] pquerna: pushed [10:59] SubStack: sechrist: yep [11:00] sechrist: SubStack: Do you think _why's unholy can compile dnode-ruby [11:00] sechrist: and have dnode-ruby double as dnode-python as well? [11:00] sechrist: I guess that depends on eventmachine? [11:00] Ori_P_ has joined the channel [11:01] SubStack: wow neat, hadn't heard of this before [11:01] SubStack: you could certainly try [11:01] sechrist: apparently the damn bytecode is very similar [11:01] sechrist: however it's dependency libs I think will be the problem [11:01] pquerna: Tim_Smart: are you on linux? is make test doing better for you? [11:02] Tim_Smart: pquerna: I am on Ubuntu, yeah. [11:02] Tim_Smart: pquerna: make test is failing on file system stuff for me. [11:04] aliem_ has joined the channel [11:04] pquerna: Tim_Smart: mm. well, i get plenty of http failures on osx :) [11:04] fbits has joined the channel [11:05] pquerna: what do we want to do about request.connection [11:05] blaines has joined the channel [11:05] pquerna: it appears to be a 'public' ish api [11:05] pquerna: previously it exposed the raw net stream [11:05] Tim_Smart: I say keep it. [11:05] pquerna: well, yeah. kinda. [11:05] pquerna: except it shouldn't be the netstream [11:05] pquerna: should it? [11:05] Tim_Smart: Yeah it should have the net.Stream [11:06] pquerna: shouldn't it be .cleartext on the ssl case? [11:06] Tim_Smart: Yeah. [11:06] rasztasd has joined the channel [11:06] pquerna: okay [11:06] blaines has joined the channel [11:08] sechrist: SubStack: actually, how involved is actually implementing dnode? [11:08] Tim_Smart: Well it is getting pretty close to the speed before the change around. [11:08] sechrist: I have no idea of all that's required to do it properly [11:08] sechrist: walk looked pretty cool [11:08] pquerna: Tim_Smart: yeah, need to get 100% test cases passing i think to get the merge form ryah next [11:09] Tim_Smart: pquerna: Ya. I'll have a quick poke at httpparser then take a look at the tests. [11:12] bearnard has joined the channel [11:13] zorzar has joined the channel [11:13] sechrist: SubStack: another similar way to do this: python's inline perl [11:17] SubStack: sechrist: well I've built 3 implementations so far so it can't be too hard [11:18] sechrist: I guess the reason I'm reluctant to start is that I only have like maybe 1-2 hours worth of python experience [11:18] sechrist: hence the desire to plop node in front of it [11:18] SubStack: yeah that might make it hard [11:18] mytrile has joined the channel [11:18] sechrist: it's not so much the basic language that would bite me, it's going to be the weird iterators and stuff [11:19] sechrist: x object is not iterable! [11:19] digitalspaghetti: holy woop, batman: http://github.com/welterde/nodecraft [11:19] sechrist: holy [11:19] sechrist: shit [11:19] thansom has joined the channel [11:23] mlangenberg: I am having some bad performance issues with my node server in production. [11:23] mlangenberg: Turned out the problem is having SSL enabled on the HTTP server. [11:23] mlangenberg: 3674 64.4% 0.0% /usr/lib/libcrypto.so.0.9.8 [11:23] Tim_Smart: pquerna: Yeah master got around 5500 req/s, http-streams around 4700 req/s [11:23] ctp has joined the channel [11:23] Tim_Smart: Oh the pain :( [11:23] mytrile: Hey, guys. I wonder if it's possible to use curl to get an external page end then throw it in the response and if its possible how can be to this ? [11:25] sth: I wouldn't use curl, rather http.createClient() [11:25] sideshowcoder has joined the channel [11:26] mlangenberg: Anyone else having similar bad experience with SSL enabled? [11:27] pquerna: mlangenberg: i'm not sure what you mean by performance issues [11:28] mlangenberg: When I run the same test with SSL enabled, CPU usage increases form 5% to 15%. [11:28] pquerna: yes. [11:28] mytrile: sth: oh, thanks [11:28] pquerna: it is after all, encryption. [11:29] mAritz: so, what can you with require.cache/require.resolve? [11:29] mlangenberg: And it increases lineary ... an additional client doubles the load. [11:29] pquerna: depending on the benchmark, youmight just be spending all your time doing RSA; Short lived connections are extremely expensive for ssl. [11:29] pquerna: (esp since node has no real ssl session caching yet) [11:29] mlangenberg: I am using Faye for the Client and the server. [11:29] aubergine has joined the channel [11:30] mlangenberg: My test exists of sending 4 chat messages / second, with only two clients. [11:30] mlangenberg: Would using an NginX frontend save some CPU load ... or would it just move it from one process to the other? [11:31] mr_daniel has joined the channel [11:31] mlangenberg: Ofcourse that totally kills using WebSockets :-( [11:31] pquerna: are they persistent connections? [11:31] mlangenberg: Faye has a fallback WebSocket/jsonp/long-poll. [11:31] pquerna: ah [11:32] eee_c has joined the channel [11:32] ryanfitz has joined the channel [11:32] mlangenberg: Should be persistent connections ... but NginX can't handle HTTP/1.1, right? [11:32] pquerna: nginx would save cpu for long-polling. just because of session stuff. [11:32] bentomas has joined the channel [11:32] derencius has joined the channel [11:32] pquerna: for websocket, it shoudl be just shifting cpu usage. [11:33] mlangenberg: Apart for that it probably won't even work with WebSockets. [11:33] bearnard has joined the channel [11:33] bentomas has left the channel [11:34] sechrist: SubStack: I have dnode-perl serving python with inline-python (sort of) [11:34] sechrist: time to sleep though [11:34] sechrist: SubStack: http://search.cpan.org/~neilw/Inline-Python-0.20 [11:42] shimondoodkin has joined the channel [11:44] mlangenberg: pquerna: that would actually mean using WebSocket over SSL is flawed ... [11:45] Ori_P_ has joined the channel [11:45] mlangenberg: pquerna: With 3 clients, sending each 4 messages/second, causes a 45% CPU load. [11:46] kawaz has joined the channel [11:47] c4milo has joined the channel [11:47] Sembiance: wow, that's insane amount of load [11:48] mlangenberg: 65% of the time is spent is /usr/lib/libcrypto.so.0.9.8 [11:49] kkaefer: pquerna: no [11:49] kkaefer: pquerna: I understand what it does [11:49] kkaefer: pquerna: but I don't know why it's in credentials [11:49] mlangenberg: And I am using a pretty high-end server [11:50] Sembiance: mlangenberg: So what code is actually doing the call to encrypt? [11:50] Sembiance: mlangenberg: Socket.IO? Node.JS itself? [11:50] pquerna: kkaefer: okay, well, the first real reason, is that when OpenSSL has a callback, you must return inside that C callstack, the result. [11:51] pquerna: kkaefer: credentials is badly name, it should just be called 'SSL Context' or 'Secure Context' [11:51] mlangenberg: Sembiance: I can't see that with node-profile right? [11:51] kkaefer: pquerna: ah, ok [11:52] Anti-X has joined the channel [11:52] pquerna: (the returning inside the C callstack means, you cannot call into javascript code basically, because doing that in node.js implies you can start doing async things, which you can't really) [11:53] kkaefer: pquerna: as far as I can see, credentials only consists of the SecureContext object and the shouldVerify property [11:53] V1 has left the channel [11:54] path[l] has joined the channel [11:54] c4milo has joined the channel [11:56] Akufen has joined the channel [11:56] Akufen has joined the channel [11:56] kkaefer: pquerna: is there a reason why the SecureContext instance is wrapped into another object? [11:56] alexb_ has joined the channel [11:57] kkaefer: (Credentials) [11:58] jacobolus has joined the channel [12:00] eee_c has joined the channel [12:02] shouvik has joined the channel [12:03] Nohryb has joined the channel [12:03] fangel has joined the channel [12:04] agilandfast has joined the channel [12:04] fangel: is there anyway to catch syntax-errors on require("..") calls? wrapping the require-call in try/catch doesn't seem to be good enough :) [12:04] robinduckett has joined the channel [12:08] Gruni has joined the channel [12:10] Tobias| has joined the channel [12:11] aubergine_ has joined the channel [12:11] mlangenberg: pquerna: Sembiance ... the bottleneck was actually in another piece of code _doing_ an SSL http request to an external server ... I should batch those requests first. [12:12] Tim_Smart: pquerna: I'm off to bed. Good luck with the http tests and performance :) [12:13] jamescarr: hey, I gave an intro to node.js presentation last night that went well, had an interesting question about the underlying mechanisms... [12:13] jamescarr: does V8 make use of th OS scheduler in any way to provide the async behavior? [12:13] Tim_Smart: Btw, I tried reverting to the old style of buffering and writing, and it only went slower. [12:14] Tim_Smart: So I'm not quite sure we are losing so much time, but meh. [12:14] Tim_Smart: *where we [12:15] Tim_Smart: Probably somewhere in the abstraction of layers. [12:15] Ori_P has joined the channel [12:17] janm has joined the channel [12:20] pquerna: the tubes. [12:21] pquerna: (took all the time) [12:21] phil has joined the channel [12:22] mr_aleph: jamescarr: V8 has nothing to do with async. It's beyond it's scope of responsibilities. [12:23] ooooPsss has joined the channel [12:24] Tim_Smart: pquerna: Duh! All my _combine work was going to waste due to the call to _cycle() on every write() [12:25] chapel: hmm, well my small experience with js tells me that js is an async language, and not node specific, so in turn v8 is async by nature of being based around js [12:25] V1 has joined the channel [12:26] ivanfi has left the channel [12:26] chapel: mind giving some upvotes? http://news.ycombinator.com/item?id=1846903 [12:26] shirro has joined the channel [12:27] danoyoung has joined the channel [12:27] chapel: v8: 0.1 + 0.2 [12:27] v8bot: chapel: 0.30000000000000004 [12:27] chapel: heh [12:27] mr_aleph: chapel: that depends on your definition of async. [12:28] chapel: well mr_aleph I am relatively new [12:28] chapel: so I am no expert in that [12:28] pquerna: hmm. ./test/simple/test-http-304.js [12:28] chapel: just was sharing what I thought on the little I know [12:29] leeeb has joined the channel [12:29] stride: chapel: node is async in the way that other stuff can work while you're waiting for I/O stuff to finish, which then triggers some callback. nothing that's really affecting v8 in general [12:30] chapel: sure stride, I know this [12:30] echosystm has joined the channel [12:30] echosystm: can someone explain to me why math performance is slow in javascript? [12:31] chapel: but js by its own nature is async, is it not? what it is used for in the browser is different and limited, but it still is async, or am I totally off base and people have been lying to me? [12:31] stride: echosystm: probably because it stuffs everything in floats and has to convert those all the time [12:31] mr_aleph: echosystm: dynamic typing + crazy implicit conversions + underlying Number type is double = slowpoke math [12:32] echosystm: ah [12:32] stride: chapel: in that case every language that supports function pointers / references or the concept of callbacks is async [12:32] echosystm: "crazy implicit conversions" ? [12:32] mr_aleph: echosystm: ToNumber(undefined) = NaN, ToInt32(undefined) = 0 [12:33] echosystm: right [12:33] StanAngeloff has joined the channel [12:33] Craig` has joined the channel [12:33] Craig`: Hey. [12:33] theasta has joined the channel [12:33] Craig`: on my ubu machine :) [12:34] theasta has left the channel [12:35] shadow_walker has joined the channel [12:38] eikke has joined the channel [12:39] mbrochh has joined the channel [12:39] mbrochh has joined the channel [12:39] eikke: did anyone ever work on request Range support for serving files with node? [12:40] Gruni has joined the channel [12:44] Anti-X has joined the channel [12:47] ntelford has joined the channel [12:49] Gruni has joined the channel [12:51] aubergine has joined the channel [12:52] ysynopsis has joined the channel [12:52] Tim_Smart: eikke: There are a few modules around that handle that I think/ [12:55] okuryu has joined the channel [12:59] Tim_Smart: pquerna: OK I'm off. I pushed a couple small commits. [13:00] dnolen_ has joined the channel [13:02] micheil: chow Tim_Smart [13:03] hellp has joined the channel [13:05] jtsnow has joined the channel [13:06] pquerna: Tim_Smart: k [13:07] pquerna: hmm. test-http-client-parse-error. [13:07] pquerna: it 'passes', but doesn't exit. [13:08] Tim_Smart: Heh. [13:09] Tim_Smart: Man I have just realised how complicated http really is. [13:09] micheil: ryah_: do you think we could replace tick_spinner with libev's ev_suspend and ev_resume? [13:09] Tim_Smart: http is really deceiving. [13:09] case__: http is a mess, but a lot less than ftp :) [13:11] Craig`: what's the best way to load the markup of an external page? (it's xml if it matters) [13:11] micheil: the description on ev_suspend and ev_resume is: These two functions suspend and resume an event loop, for use when the loop is not used for a while and timeouts should not be processed. [13:11] TomsB has joined the channel [13:12] oal has joined the channel [13:13] pquerna: Tim_Smart: yes :) [13:16] shadow_walker has joined the channel [13:16] trotter has joined the channel [13:17] Ari-Ugwu has joined the channel [13:17] sideshowcoder has joined the channel [13:18] mw has joined the channel [13:19] bbttxu has left the channel [13:20] gf3 has joined the channel [13:21] kriszyp has joined the channel [13:26] gf3 has joined the channel [13:26] boaz has joined the channel [13:26] Nohryb: v8: arguments.callee.toString() [13:26] v8bot: Nohryb: ReferenceError: arguments is not defined [13:26] Nohryb: v8: this [13:26] v8bot: Nohryb: {} [13:29] rauchg_ has joined the channel [13:30] ben_alman_ has joined the channel [13:30] gf3 has joined the channel [13:32] davidsklar has joined the channel [13:32] Oliv_Oil has joined the channel [13:33] jherdman has joined the channel [13:34] davidwalsh has joined the channel [13:35] dtrasbo: I'm using fs.stat inside a function of an object - but in the callback "this" seems to change - shouldn't it stay the same within callbacks? [13:37] softdrink has joined the channel [13:37] JohnDav has joined the channel [13:39] dtrasbo: more specifically it becomes an empty object: {} [13:41] dtrasbo: v8: fs.stat(); [13:41] v8bot: dtrasbo: ReferenceError: fs is not defined [13:41] dtrasbo: v8: require(); [13:41] v8bot: dtrasbo: ReferenceError: require is not defined [13:41] dtrasbo: meh [13:42] dtrasbo: node: 'hello?' [13:45] aheckmann has joined the channel [13:47] digitalspaghetti: ok, who posted the minecraft server written in nodejs on hacker news :D [13:48] EyePulp has joined the channel [13:51] matt_c has joined the channel [13:54] femtoo has joined the channel [13:54] micheil: dtrasbo: v8bot executes things within an v8 context, not a node context. [13:55] dtrasbo: micheil: which is sort of the conclusion I came to [13:55] micheil: yeah [13:55] micheil: so, what's the issue with fs.stat? [13:55] dtrasbo: "this" changes within the callback [13:55] dtrasbo: to {} [13:56] dtrasbo: not so handy when you're using it in a function of an object [13:56] dtrasbo: you can work around it by setting whatever variables you need *outside* the callback though.. [13:56] micheil: dtrasbo: hhmm.. can you pastie / gist your code? [13:56] jimt_ has joined the channel [13:57] micheil: I think I know what's happening. [13:57] bentruyman has joined the channel [13:58] dtrasbo: micheil: sorry, it got complicated so I did a git reset --hard two mins ago :( [13:58] micheil: >_> [13:58] micheil: okay, basically, all fs stuff generally runs the callback within the global scope. [13:59] johngbrooks has joined the channel [13:59] micheil: given: [13:59] jrockjiggz has joined the channel [13:59] micheil: fs.stat(fd, function(){ /* this in here == the anon function */ }); [13:59] micheil: I think. [14:00] dtrasbo: micheil: but if I console.log(this) it shows {} [14:00] dtrasbo: as opposed to [Function] [14:01] micheil: okay.. [14:01] micheil: well, they all get called with: [14:01] micheil: (*callback)->Call(v8::Context::GetCurrent()->Global(), argc, argv); [14:01] dtrasbo: aha [14:01] micheil: so, I'm trying to figure out what v8::Context::GetCurrent()->Global() is [14:01] jimt has joined the channel [14:02] dtrasbo: micheil: I think it's the (e.g.) current module in node [14:02] dtrasbo: the exports/this object [14:02] micheil: I think it's actually Global [14:03] dtrasbo: I'm using fs inside of a module [14:03] dtrasbo: but no [14:03] dtrasbo: my logic doesn't make sense [14:04] micheil: yeah, it's Global [14:04] dtrasbo: it can't be "exports" because then the constructor function I'm making in there should show [14:04] Nohryb has joined the channel [14:05] micheil: // Create the one and only Context. [14:05] micheil: Persistent context = v8::Context::New(); [14:05] micheil: v8::Context::Scope context_scope(context); [14:05] micheil: node.cc, line 1922 [14:05] dtrasbo: why don't they just call the function I'm passing normally? [14:06] dtrasbo: and not within a completely different context, notably [14:06] dtrasbo: it's unintuitive [14:07] micheil: dtrasbo: well, I'm pretty sure it'd be theoretically possible to allow you to pass a this arg [14:07] micheil: so, [14:07] micheil: fs.stat(fd, callback, thisArg) [14:07] micheil: where callback is called within thisArg [14:07] micheil: it can't automatically get the thisArg / context [14:08] micheil: does that sort of make sense? [14:08] dtrasbo: yeah [14:08] micheil: Node only has one context, the global context [14:08] dtrasbo: I mean [14:08] dtrasbo: it is a complete bummer that it is that way [14:08] dtrasbo: but it makes sense, yes [14:08] micheil: so, unless a function is told to execute in a given scope, then it can't and will execute with undefined scope, which means it executes in the global scope [14:09] zum: v8: 1+2 [14:09] v8bot: zum: 3 [14:09] zum: v8: this [14:09] v8bot: zum: {} [14:09] micheil: it's actually pretty standard for javascript. [14:09] micheil: dtrasbo: I'm pretty sure if you look at the DOM Events interfaces, then it'd be the same there [14:09] dtrasbo: micheil: well they set this manually somehow I think [14:10] dtrasbo: micheil: e.g. to whatever element you've selected [14:10] micheil: hmm.. [14:11] jvolkman_ has joined the channel [14:12] dtrasbo: micheil: for example: https://gist.github.com/b7733ddbb0bc37aa4416 [14:12] siculars has joined the channel [14:13] micheil: uh [14:13] micheil: DOM Events != jQuery [14:13] micheil: jquery does weird shit to the thisArg [14:14] micheil: like, to set thisArg, you do: fn.apply(thisArg, arguments[]) or fs.call(thisArg, argument1, argument2, ...) [14:15] micheil: so, for $.fn.each, it's like, fn.apply(jQueryContext, [item, i]) [14:16] ntelford has joined the channel [14:16] micheil: DOM Events is like, document.addEventListener(evt, callback, useCapture) [14:16] dtrasbo: ahh [14:16] micheil: node's event system and callback system work similar to that, iirc. [14:17] dtrasbo: well I haven't used those within a non-global context [14:17] dtrasbo: so it haven't caught me [14:17] micheil: in theory, I believe we could add in support to be able to pass a thisArg, if we so chose to. [14:17] pufuwozu has joined the channel [14:17] _figital has joined the channel [14:17] dtrasbo: micheil: I guess - it just baffles me it's the only way around it [14:18] dtrasbo: micheil: it can't be very pretty [14:18] micheil: like, you could do: var fn = function(){ ... }; [14:18] yhahn has joined the channel [14:18] micheil: although, the easiest way is to simply do something like: [14:18] micheil: var self = this; [14:18] micheil: fs.stat(fd, function(){ self.something ... }); [14:19] micheil: (call var self what ever you want, but I think self to be a general cross-library/framework standard/pattern) [14:20] dtrasbo: micheil: good idea [14:20] dtrasbo: micheil: thanks for the help - I'll have another stab at this [14:21] matt_c has joined the channel [14:21] yatiohi has joined the channel [14:21] dtrasbo: micheil: I somehow convinced myself I needed a way to compile all my client-side js into one file [14:22] stride: micheil: Function.call lets you specify what "this" means in the called context iirc [14:22] bradleymeck has joined the channel [14:22] micheil: dtrasbo: or, look at something like LABjs [14:22] micheil: stride: yeah. see the stuff with fs.call(thisArg, arguments...) [14:22] micheil: and fn.apply(thisArg, arguments) [14:22] micheil: s/fs/fn/ [14:23] micheil: where fn is short hand for Function [14:23] rwaldron has joined the channel [14:23] stride: yeah. might be useful for event handlers if that doesn't have performance implications [14:23] micheil: ryah_: could you give me a ping when you're about, it's about libeio error handling (see thread on libev mailing list) [14:24] micheil: well, in events.js, when you emit() it calls all listener in the scope of the emitter [14:24] micheil: theory says it would be possible to add in storage so it's: [14:25] micheil: _events = {name: [cb, thisArg]} [14:25] micheil: but that means extra data stored and overhead [14:25] micheil: so, it's really just easier and more efficient to use a var self = this; style thing [14:25] stride: yeah [14:27] stride: anybody here who happens to be familiar with the node-mysql code? [14:27] herbySk has joined the channel [14:32] softdrink has joined the channel [14:32] ceej has joined the channel [14:33] derencius has joined the channel [14:33] micheil: stride: not I [14:33] micheil: felixge would be the person you need [14:33] EyePulp has joined the channel [14:36] willwhite has joined the channel [14:37] gerred has joined the channel [14:39] mbrochh has joined the channel [14:40] pquerna: down to 5 test case failures on http-streams. [14:40] pquerna: 2 of them are upgrade. [14:40] pquerna: one is a connection refused on http-proxy, really clueless [14:41] pquerna: one other is setting a timeout on the http client (needs new method) [14:41] pquerna: and the other one is expecting missing pause method [14:42] micheil: pquerna: just found out that node kinda does fs errors wrong. [14:42] micheil: :/ [14:43] micheil: pquerna: upgrade errors? show me, I'll see if I can help, I wrote part of the upgrade js [14:44] rauchg_ has joined the channel [14:44] pquerna: micheil: one is using the wrong variable. [14:44] micheil: it seems for pretty much every libeio call, we should be checking if req->result < 0 and use that as the error case indicator [14:45] pquerna: micheil: when upgrading, you want the encrypted stream right? [14:45] micheil: umm, yeah, I think so. [14:45] pquerna: yeah. [14:45] pquerna: looks like that was old behavoir [14:45] micheil: you want access to the socket. [14:45] micheil: so, normally it's: [14:45] micheil: update(req, socket, upgradeHead) or similar [14:46] micheil: socket is the socket that has the ondata event [14:46] micheil: erm "data" event [14:46] pquerna: fixed [14:46] pquerna: 4 failures left. [14:46] micheil: k [14:46] EyePulp has joined the channel [14:46] micheil: what's the next one? [14:47] rauchg_: eikke: i believe there was a patch for connect somewhere [14:47] rauchg_: not sure if it got merged in [14:47] micheil: pquerna: so, yeah, due to the way we're handling errors in node_file.cc, means that stuff can be easily broken, like sendfile [14:47] kkaefer: pquerna: do you think renaming "createCredentials" to 'createContext' is a good idea? [14:48] pquerna: test-http-set-timeout.js, test-http-proxy.js, test-http-upgrade-client2.js [14:49] pquerna: and test-pipe.js [14:49] pquerna: kkaefer: yes [14:49] pquerna: kkaefer: been trying to avoid changing apis though, but I'd support renaming it. [14:49] micheil: pquerna: back trace for http-update-client2? [14:50] pquerna: micheil: https://gist.github.com/8ec1353527fa19f8de93 [14:50] gwoo has joined the channel [14:50] micheil: pquerna: that's server side that error [14:50] pquerna: hmm [14:50] micheil: server.emit("upgrade" [14:51] micheil: both client and server upgrade emit's have the almost same signature [14:52] EyePulp has joined the channel [14:52] micheil: http://github.com/pquerna/node/blob/http-streams/lib/httpserver.js#L184 [14:52] micheil: second argument emitted should be the request socket [14:52] technoweenie: micheil: hey where was that makefile you pointed to maybe yesterday that had a good test line [14:52] micheil: technoweenie: felixge/node-mysql [14:52] technoweenie: running each test file through node [14:52] technoweenie: thanks [14:53] technoweenie: nfi how makefiles work, ha [14:53] micheil: technoweenie: I think this is better: http://gist.github.com/653692 [14:53] jetienne has joined the channel [14:53] micheil: the basics of makefiles are easy [14:53] micheil: it's the complicated stuff that's hard. [14:53] pufuwozu has joined the channel [14:54] technoweenie: sure [14:54] technoweenie: all i know is rake, so i can guess what a lot of that crap means [14:54] digitalspaghetti: micheil: agreed, and also 'ant' is ugh [14:54] micheil: digitalspaghetti: remember ant from jquery days? [14:54] digitalspaghetti: yes! [14:54] micheil: ugh. [14:54] shirro has left the channel [14:55] micheil: technoweenie: I've actually moved node-websocket-server locally to use make over rake [14:55] pquerna: micheil: hmm. fixed the first problem, though looking at figuring out a new one. The test case calls socket.end on the client side. It expects the client to also emit 'end' after that. That doesn't seeem right. [14:55] technoweenie: yea makes sense [14:55] micheil: and now I've got a way to test it! :D [14:55] technoweenie: coffeescript has cake :) [14:55] pquerna: micheil: it worked in the past because the client obejct was the same net.stream, but not now.. [14:55] micheil: pquerna: the error looks like you're emitting the wrong thing [14:55] technoweenie: http://github.com/frank06/riak-js/raw/1780c01a45f7355a7f99ebfe9273ebc94820f047/Makefile frank06 moved coffeescript => js generation to a Makefile [14:55] pquerna: micheil: this is a different error, i fixed that [14:56] micheil: pquerna: updated backtrace? [14:56] micheil: I'm looking at: https://gist.github.com/8ec1353527fa19f8de93 [14:56] pquerna: micheil: no backtrace, onEnd is never called. [14:56] micheil: :/ [14:57] pquerna: though, i guess [14:57] pquerna: end should be calle don the client [14:57] pquerna: once its upgraded [14:57] micheil: umm, yes [14:57] pquerna: as you can't do anything with it [14:57] mikew3c has joined the channel [14:57] robinduckett: so [14:57] micheil: but the server can also end() or destroy() a connection, which ever is the right fn name [14:57] micheil: I think it's destroy() [14:57] robinduckett: who's seen the node.js minecraft server? [14:58] technoweenie: robinduckett: i saw the github page for it [14:58] micheil: robinduckett: I don't even know what minecraft is.. *slow* [14:58] robinduckett: made by nornagon some dude i swear i know from creatures. [14:58] robinduckett: micheil: do you value your productivty? [14:58] micheil: robinduckett: well, I must, I don't regularly game. [14:58] robinduckett: micheil: then I will not elabourate for your sake. [14:59] technoweenie: its a cash cow for some indie game dev [14:59] micheil: robinduckett: feel free to, I'm not likely to get hooked. [14:59] robinduckett: http://www.minecraft.net [14:59] robinduckett: you basically go around punching trees [14:59] robinduckett: until you have enough wood to craft a pickaxe [14:59] robinduckett: then you can mine rock and iron and gold and stuff [14:59] robinduckett: you can build with the rock [14:59] technoweenie: in the alpha one, you just build shit block by block [15:00] micheil: robinduckett: k, that doesn't phase me the slightest. [15:00] robinduckett: you can also get wire and switches and build 16-bit ALUs inside the game. [15:01] robinduckett: problem? :D < troll smiley [15:01] robinduckett: but yeah [15:01] robinduckett: someone made a server for the multiplayer version in nodejs [15:01] micheil: robinduckett: right... I'll stick to working on node.js and playing the occassional twisted / odd game for an hour or so every few months. [15:01] EyePulp has joined the channel [15:02] micheil: ACTION doesn't generally play games. but does enjoy a halo match over drinks [15:02] tj has joined the channel [15:03] technoweenie: well the point is, there's a popular indie game, and someone made a server for multiplayer games in node.js [15:04] micheil: okay [15:05] technoweenie: omg make requires tabs [15:05] micheil: technoweenie: yeah, that's kinda shit about it, but you get over that. [15:06] technoweenie: yea its ensuring i'll never write a makefile [15:06] technoweenie: only ever cargo cult one [15:06] technoweenie: 100s of makefile startup ideas i'll never pursue [15:07] xla has joined the channel [15:07] pufuwozu has joined the channel [15:07] micheil: technoweenie: well, yeah, the other odd thing is like @ and - everywhere [15:07] micheil: trial and error testing, fuck yeah. [15:07] technoweenie: whats .PHONY [15:07] tj: haha makefile tabs are the worst part [15:07] micheil: no idea. [15:08] technoweenie: how do i even make a tab [15:08] tj: .PHONY: a b c means that those are not targets [15:08] micheil: uhh? [15:08] Yuffster has joined the channel [15:08] micheil: tj: english? [15:08] micheil: :P [15:09] rcy has joined the channel [15:09] pquerna: micheil: http://github.com/pquerna/node/compare/http-streams#diff-9 [15:09] technoweenie: http://makepp.sourceforge.net/1.18/t_phony.html [15:09] micheil: tj: what do you mean, not targets? [15:09] tj: the targets are just output files for example book.pdf: a.html b.html [15:09] tj: book.pdf is the target [15:09] technoweenie: oh that means its not generating a file [15:09] Eber has joined the channel [15:09] micheil: pquerna: I guess. [15:09] tj: and all: book.pdf book.mobi [15:09] tj: etc [15:09] tj: .PHONY: all [15:10] jimma_ has joined the channel [15:10] pquerna: micheil: with that change, http-stream passes, and old code would work with it too [15:10] pquerna: micheil: it seems more correct to me though; client is not _ending_ just because of an upgrade. [15:10] Eber: guys, help! I need a new laptop to development... mac is not an option! I'm between a lenovo and a dell machine... Any ideas of what should I get? [15:10] micheil: pquerna: try running node-websocket-server on it (just checkout and startup the echo-server.js from examples [15:10] Eber: It needs to run Linux flawlessly (Ubuntu) [15:10] micheil: lenovo are shite. [15:10] tj: has there ever been a nodejs survey of any kind? [15:10] tj: cant remember [15:10] micheil: dell is the way to go, I'd say [15:11] micheil: tj: like? [15:11] vastak has joined the channel [15:11] Eber: micheil: really? why lenovo is not good? [15:11] tj: micheil: dunno, just general stuff. maybe what they thought of it, how often they use it, are they employed to work on node related software [15:11] micheil: well, they are machines built to a price. [15:11] micheil: or have been, in my experience with them [15:12] tj: might be interesting [15:12] tj: if we came up with some Qs [15:12] pquerna: micheil: is it supposed to do something, the echo server? just says 29 Oct 08:11:44 - Listening for connections. [15:12] Eber: i don't have lots of money... it can't be too much expensive, but has to be good... [15:12] micheil: the NSW education department uses them exclusively, and while they are okay, they aren't anything special or decent [15:12] micheil: pquerna: then open client.html in say chrome [15:12] Me1000 has joined the channel [15:12] micheil: Eber: I'd go dell. [15:12] temp01 has joined the channel [15:12] Eber: micheil: ok! dell 1 x lenovo 0 [15:13] garrensmith: morning all [15:13] Eber: micheil: can you think of another brand worh looking at? [15:13] micheil: tj: yeah, could be [15:13] micheil: Eber: uhh.. personally, I use a MBP [15:13] micheil: HP is also fairly good, iirc. [15:13] garrensmith: Eber: MBP FTW!!! [15:13] garrensmith: :-) [15:13] Eber: micheil: I wish I could get a MBP... [15:14] micheil: although, my current MBP set me back 3000$ on student pricing [15:14] Eber: I live in Brazil... a MPC is almost three times the price you can pay on the States... [15:14] Eber: MBP* [15:14] garrensmith: can anyone recommend some good c book for the more advance stuff, I would like to improve my C stuff so that Libev would actually make sense [15:14] indexzero has joined the channel [15:15] micheil: garrensmith: I'd say just read the code, look at gnu c reference and cplusplus.com [15:15] micheil: or .org [15:15] micheil: http://www.cplusplus.com/ [15:15] garrensmith: micheil: ok will do thanks [15:16] garrensmith: is libev in C or C++? [15:16] micheil: garrensmith: it will eventually make sense (that's how I learnt it :/ ) [15:16] micheil: both [15:16] micheil: C++ is a superset of C, iirc. [15:16] tj: im pretty sure libev is just c [15:16] garrensmith: so why does node have .cc extension from my varsity days .cpp was the c++ file name [15:16] tj: garrensmith: there are quite a few extensions you can use [15:17] garrensmith: tj Initially I though just C no classes [15:17] tj: .cc looks better IMO [15:17] mr_aleph: micheil: that is not true [15:17] micheil: garrensmith: well, yeah, file extensions mean pretty much jack all. [15:17] garrensmith: tj which compiler is node using gcc or clang? [15:17] micheil: mr_aleph: okay, well, feel free to prove me wrong, but what you can do in C you can generally do in C++ [15:17] micheil: ev.c / ev.h [15:17] micheil: eio.c and eio.h [15:18] tj: garrensmith: i believe it can compile via clang now [15:18] tj: not 100% on that [15:18] garrensmith: tj which is the better compiler at this stage? [15:18] jamund has joined the channel [15:18] mr_aleph: micheil: that is true. in sense what you can do in C you can also do in Pascal ;-) [15:18] tj: g++ valid cpp extensions: cc cp cpp CPP c++ C [15:18] micheil: mr_aleph: uhh.. Pascal's like, the stuff you lot were probably using before my tenth birthday. [15:19] micheil: erm. 5 rather. [15:19] micheil: or just before I was born. [15:19] mr_aleph: micheil: http://www2.research.att.com/~bs/bs_faq.html#C-is-subset [15:19] tj: garrensmith: i havent had issues with g++, id imagine most of us use it [15:19] garrensmith: mr_aleph: I wanna see nodePascal [15:19] garrensmith: tj ok cool thanks [15:19] mr_aleph: micheil: lol. I am not that old, AFAIK only 6 year older than you [15:20] micheil: mr_aleph: it's a case of a square is a rectangle but a rectangle isn't necessarily a square [15:20] pufuwozu has joined the channel [15:20] micheil: mr_aleph: hmm, so you'd be 24? [15:20] mr_aleph: garrensmith: well there is JS VM written in Pascal. [15:20] mr_aleph: micheil: I think so, yes. [15:21] garrensmith: mr_aleph: impressive [15:21] micheil: mr_aleph: fair enough, but either way, mainstream pascal programming was well before my time [15:22] garrensmith: micheil: ouch I did pascal in school, about 10 years ago now. Good times :-) [15:22] mr_aleph: micheil: i spent 3 years of my life doing compiler/VM in Modula-2/Oberon-2 which are almost like Pascal in some sense. [15:22] mr_aleph: that was fun. sometimes. [15:23] micheil: ACTION is a javascript programmer learning other languages [15:23] javajunky has joined the channel [15:25] BHSPitCSP: ACTION is a C/C++/PHP/ObjC programmer learning javascript [15:26] garrensmith: ACTION is a C# programmer learning javascript [15:26] tj: ACTION is javascript [15:26] Lorentz: ACTION is a all sorts of programmer learning even more random stuff [15:26] technoweenie: you're not your programming language [15:27] tj: :D [15:27] gkatsev: tj: you are javascript? [15:28] tj: gkatsev: yup im a vm [15:28] tj: im idling right now [15:28] tj: with some coffee [15:28] gkatsev: lol [15:29] kkaefer: pquerna: http://github.com/ry/node/pull/383 [15:29] fangel: ACTION is a developer using the best language for the job at hand :) [15:31] nerdEd has joined the channel [15:31] bentruyman has joined the channel [15:32] V1: ACTION is going home ^_^ [15:33] robotarmy has joined the channel [15:33] technoweenie: so after the coffee, you'll be running for awhile and crash hard when it wears off [15:33] tj: yup [15:34] kkaefer: off topic: is it possible to add another commit to a pull request? [15:34] kkaefer: (after the pull request was created) [15:34] micheil: hey, if mikeal happens to ask where I am in about 3 hours, can someone tell him to look at skype? [15:34] micheil: kkaefer: they auto add [15:34] kkaefer: ah! [15:34] micheil: yeah [15:34] kkaefer: so I just commit to the branch? [15:34] shadow_walker has joined the channel [15:34] micheil: yeah [15:34] kkaefer: awesome :) [15:35] technoweenie: kkaefer: depends... if the head ref is a branch, then we'll move the ref up as the branch is updated [15:35] micheil: technoweenie: out of curiosity, can we export data from github issues? [15:35] technoweenie: yup [15:35] micheil: how? [15:35] technoweenie: http://develop.github.com/p/issues.html [15:35] micheil: oh. api. [15:36] davidascher has joined the channel [15:36] micheil: technoweenie: not to worry :) [15:36] technoweenie: ? [15:37] sprout has joined the channel [15:37] aurynn has joined the channel [15:38] andrewa2 has joined the channel [15:38] deepthawtz has joined the channel [15:39] micheil: technoweenie: well, yeah, I didn't think to check the api, but that makes senes [15:39] micheil: *sense [15:39] bpot has joined the channel [15:39] tj: does/could/should the buffer api have a concat method? I need to join a bunch [15:41] micheil: tj: no, but I do have one for joining buffers [15:41] micheil: or not [15:41] daniellindsley has joined the channel [15:41] micheil: tj: see tim-smart's node-redis, that has it [15:42] kkaefer: github++ [15:42] v8bot: kkaefer has given a beer to github. github now has 1 beers. [15:42] mlangenberg: Am I supposed to reuse the HTTPS client I get returned from: http.createClient(port, host, true)? [15:43] micheil: mlangenberg: you can, but you don't have to. [15:43] mr_aleph: garrensmith: http://besen.sourceforge.net/ <- if you want to implement nodePascal :-) [15:43] tj: micheil: ah i was just wondering if maybe node in 0.3.x had it [15:43] micheil: tj: nup [15:43] tj: ill whip something up, might be cool to have in core [15:43] micheil: ACTION really wants node 0.3.x to have Buffer#indexOf [15:44] kkaefer: micheil: yeah, me too [15:44] micheil: anyway, night folks. [15:44] kkaefer: micheil: is there another patch for that? [15:44] micheil: ACTION has a patch to support indexOf [15:44] micheil: but it won't be included yet. [15:44] kkaefer: hm, I wrote one too recently [15:45] micheil: kkaefer: this is a C patch [15:45] mlangenberg: micheil: but will it speed up when I need to do multiple SSL requests a second? [15:45] micheil: memchr [15:45] kkaefer: http://github.com/ry/node/pull/374 [15:45] kkaefer: ah, then I have seen that one [15:45] micheil: mlangenberg: no idea on that. [15:45] mlangenberg: micheil: For instance, does it support HTTP keep-alive? [15:45] kkaefer: memchr is slower on my machine than a for loop btw [15:45] micheil: mlangenberg: once again, I'm not sure [15:45] kkaefer: that pull request is dirty because i failcommitted [15:45] micheil: kkaefer: depends on the buffer. [15:45] mikew3c_ has joined the channel [15:45] micheil: anyway, night folks. [15:45] kkaefer: micheil: might be [15:45] dmcquay has joined the channel [15:46] tj: micheil: later, make a node survey! [15:46] tj: haha [15:46] tj: for changelog [15:46] micheil: tj: how aboutfor the noded [15:46] tj: sure :) [15:47] micheil: ACTION damn hates hayfever. [15:50] devinus_ has joined the channel [15:50] davidascher has joined the channel [15:52] davidascher has joined the channel [15:52] rpflo has joined the channel [15:53] ajpiano has joined the channel [15:55] matt_c has joined the channel [15:55] davidascher has joined the channel [15:56] virtuo has joined the channel [15:56] matt_c has joined the channel [15:56] faust45 has joined the channel [15:59] pufuwozu has joined the channel [16:00] tapwater_ has joined the channel [16:02] jchris has joined the channel [16:03] bradleymeck: ACTION goes off to write up a huge thing on why evented and threaded code should be different [16:05] jimt_ has joined the channel [16:06] aconbere has joined the channel [16:07] gerred has joined the channel [16:11] yviktorov has joined the channel [16:11] jose___ has joined the channel [16:13] gf3 has joined the channel [16:13] cardona507 has joined the channel [16:13] tj: ryah_: would you be interested in a Buffer#concat() in node? [16:15] jimt has joined the channel [16:18] davidascher has joined the channel [16:19] deepthawtz has joined the channel [16:22] langworthy has joined the channel [16:23] pufuwozu has joined the channel [16:23] mtodd has joined the channel [16:24] eddanger has joined the channel [16:25] Mikushi has joined the channel [16:26] cagdas has joined the channel [16:27] aubergine_ has joined the channel [16:27] rbranson: gdb really goes above and beyond sometimes [16:27] rbranson: (gdb) print (xmlNodePtr)xmlCopyNode(xerror->node, 2) [16:27] rbranson: $7 = (xmlNodePtr) 0x0 [16:30] JohnDav has joined the channel [16:32] JohnDav: rauchg_: assertion day haha [16:32] shadow_walker has joined the channel [16:32] Sembiance: I'm working on switching over my production site to use Fugue+Node.JS+Connect instead of PHP :) [16:32] rauchg_: JohnDav: :D [16:33] Sembiance: should be fun :) [16:33] rauchg_: everyone is invited to assertion day :P [16:33] JohnDav: hahaha [16:33] JohnDav: let's celebrate the assertions :p [16:34] rauchg_: so far they all assert haha [16:34] JohnDav: lol [16:34] rauchg_: 100% 30 tests - 66.12% coverage [16:34] JohnDav: had 8 in the last 12 hours [16:35] rauchg_: d'oh [16:35] rauchg_: i wish we had repro steps [16:35] rauchg_: and a failing test [16:35] JohnDav: ah, the test is still failing ? [16:35] alexfner has joined the channel [16:36] rauchg_: nop, we don't have a test for that [16:36] jetienne has joined the channel [16:36] rauchg_: cause i don't know how we can reproduce it [16:36] rauchg_: yet ;P [16:37] JohnDav: yeah [16:37] sprout has joined the channel [16:37] JohnDav: guess we'll need a botnet to reproduce this lol [16:37] dahankzter has joined the channel [16:37] MikhX has joined the channel [16:38] JohnDav: if i do a catch on uncaughException.. you think the server will not stay stable ? [16:39] springmeyer has joined the channel [16:39] pufuwozu has joined the channel [16:39] Craig` has joined the channel [16:39] Craig`: Hey guys. [16:40] kjeldahl has joined the channel [16:41] tj: Craig`: hey hey [16:42] Craig`: how would i go about scraping a site? [16:42] Craig`: i'm attempting to use the lyricsfly api [16:42] Craig`: i've gotten the basic syntax for the url, and now i need to load it. [16:42] Craig`: then parse it's xml [16:42] kjeldahl has joined the channel [16:43] tj: quite a few choices [16:43] tj: libxmljs provides bindings to libxml2 [16:43] tj: but i believe there are quite a few others [16:43] tj: jsdom [16:43] rauchg_: JohnDav: it's hard to tell, i think it should though [16:43] banjiewen has joined the channel [16:44] rauchg_: Craig`: you should always try regular expressions first [16:44] rauchg_: and go from there [16:44] gf3: yup [16:44] rauchg_: if it gets too complicated [16:44] gf3: +1 there [16:44] gf3: REGEX [16:44] rauchg_: jsdom [16:44] Craig`: rauchg_, i know regex. [16:44] JohnDav: rauchg_: i guess i should give it a try... that would be a good temporary solution for those having this problem till we figure this out [16:44] WatermelonStorm has joined the channel [16:44] rauchg_: yep [16:44] WatermelonStorm: Hey. [16:44] rauchg_: JohnDav: make sure to log all of them tho [16:44] rauchg_: console.error(err.stack) [16:44] Craig`: but i'd prefer to use a library then create my own parser [16:44] Craig`: because it'd be highly inefficient. [16:44] WatermelonStorm: I am a bit confused right now with the synchronous nature of node.js. [16:45] gf3: Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. [16:45] JohnDav: rauchg_: got ya [16:45] WatermelonStorm: Well, "confused"... [16:45] tj: gf3: pff :p regexps are awesome [16:45] sechrist: freakin ie requires ".test" for regexes [16:45] sechrist: no other browsers complain [16:45] gf3: tj: NO U [16:45] tj: ACTION brb [16:46] WatermelonStorm: path.exists(), for instance. [16:47] WatermelonStorm: I'd prefer to have some kind of aynchronous version, heh, for what I'm doing... [16:47] WatermelonStorm: Or I'm just completely doing something wrong. [16:47] WatermelonStorm: Or doing something completely wrong. [16:47] dgathright has joined the channel [16:48] robmason has joined the channel [16:50] WatermelonStorm: Thing is... [16:50] Craig`: http://github.com/tmpvar/jsdom/blob/master/example/node-xml/run.js .. could i use an external document for the argument to parser.parse? [16:50] WatermelonStorm: I want to read a configuration file before running something else. [16:51] Anti-X: so why can't i call document.getElementById from inside an event?! GARRRRR [16:51] Anti-X: as in browser [16:51] Anti-X: i wanna punch the wall soon [16:51] WatermelonStorm: But I'm apparently doing something wrong due to the synchronous nature of node.js. [16:52] WatermelonStorm: Could somebody give me a helping hand? [16:52] fangel: well, technically there is a flag to do syncronous file-reads.. but better yeah, do something like readConfig( function(config) { startApp(config) } ); [16:53] fangel: *better yet, do.. [16:55] ryanfitz has joined the channel [16:55] WatermelonStorm: fangel: Hmm. [16:56] fangel: (if that tiny example made sense) [16:56] WatermelonStorm: It didn't quite make sense. [16:56] WatermelonStorm: To me. [16:56] fangel: basically, you need to read the config, and then provide a callback function that gets called when the config is read, that then starts the app with the config [16:56] junkee[] has joined the channel [16:56] WatermelonStorm: So it's basically encapsulating everything, so to speak? [16:57] heavysixer has joined the channel [16:57] brianmario has joined the channel [16:57] WatermelonStorm: I mean, well, yeah... [16:57] WatermelonStorm: I'm more used to C. [16:57] WatermelonStorm: With it's asynchronousness. [16:57] mbrochh has joined the channel [16:57] WatermelonStorm: *its [16:58] dgathright has joined the channel [16:58] meandi2 has joined the channel [16:58] WatermelonStorm: fangel: I really do like node.js's facilities for networking and all. [16:58] WatermelonStorm: But it's occasionally a bit confusing. [16:59] WatermelonStorm: When used to C. [16:59] WatermelonStorm: *When being used to C. [16:59] fangel: .. you've gotten the terms mixed.. :) synchronous = wait till the IO is done to processed = blocking.. :) [16:59] fangel: *to proceed [16:59] MikhX has joined the channel [17:00] gf3: Raevel: what version of node are you using? [17:00] pufuwozu has joined the channel [17:01] Craig`: so yeah, i asked before and you solved the xml parsing issue, but how would i go about loading an external document, you didn't cover that bit :) [17:04] WatermelonStorm: fangel: Yup, I got them mixed. [17:05] Raevel: gf3: heya friend! [17:05] gf3: hey [17:05] Raevel: 0.2.1 it seems [17:05] jchris has joined the channel [17:05] gf3: mmm [17:05] Raevel: haven't bothered checking for updates or anything [17:05] fangel: and yes, it is a bit confusing at first.. it's a bit easier if you've done tons of event'ed things in browsers before, but yeah.. [17:06] dgathright has joined the channel [17:09] deepthawtz has joined the channel [17:09] flippyhead has joined the channel [17:10] jchris has joined the channel [17:10] agnat has joined the channel [17:10] ooooPsss has joined the channel [17:11] benburkert has joined the channel [17:12] langworthy has joined the channel [17:14] pufuwozu has joined the channel [17:14] tj: haha i see there is another dup[2] patch [17:16] Craig`: my terminal is lagging like hell for keystrokes. [17:18] noahcampbell has joined the channel [17:19] trotter has joined the channel [17:20] c4milo: tj: currently all the test of connect run without errors ? [17:20] tj: c4milo: one error [17:20] technoweenie has joined the channel [17:21] c4milo: tj: this ? http://gist.github.com/653936 [17:21] tj: yup [17:21] c4milo: hum [17:21] tj: thats the issue you were talking about last time [17:21] mraleph has joined the channel [17:22] Wyverald has joined the channel [17:23] tj: anyone know if Buffer* Buffer::New(char* data, size_t length) { is newish? [17:23] TheEmpath has joined the channel [17:23] romainhuet has joined the channel [17:23] meandi has joined the channel [17:25] muk_mb has joined the channel [17:26] Gehhilfe has joined the channel [17:29] jpld has joined the channel [17:34] c4milo: tj: I think so [17:34] c4milo: tj: http://github.com/ry/node/commit/dd5273747670bf1be250df7b84525096e1d23775 [17:34] tj: c4milo: ah, its all good then im just doing a memcpy anyway [17:35] bartt has joined the channel [17:37] Craig`: Hey guys, can someone help please. [17:37] Craig`: http://pastie.org/1258483 [17:37] jvolkman__ has joined the channel [17:38] Craig`: the example uses jQuery as a function, (jquery as parameter), but jQuery isn't defined for me, or so i was told [17:38] Craig`: and typeof jquery is undefined. [17:44] gmosx has joined the channel [17:44] ryah_: The message requires moderation because the user does not have permission to post. [17:45] ryah_: oops [17:45] ryah_: :) [17:45] TheEnd2012 has joined the channel [17:45] jbenesch has joined the channel [17:46] pquerna: so [17:46] pquerna: in the pristine streams doc [17:47] pquerna: we only did buffers [17:47] gf3 has joined the channel [17:47] pquerna: but that makes the http server so [17:47] pquerna: slow. [17:47] pquerna: so, tim put it in doing the string writes [17:47] pquerna: but securepair so far, is only taught to do buffers only [17:47] pquerna: so, i guess the conclusion is [17:47] pquerna: give in [17:47] Craig`: someone help me, please? :) [17:47] pquerna: and streams can get written in buffers [17:48] V1 has joined the channel [17:48] mAritz: Craig`: looking into it [17:48] Craig`: Thanks. [17:50] bearnard has joined the channel [17:51] jchris has joined the channel [17:51] mAritz: Craig`: it appears as though that's a mistake in the blogpost. he probably did something like var jquery = window.jquery and forgot to put it there. jsdom readme+examples only show usage of window.jquery. [17:51] Craig`: ah I see. [17:52] Craig`: btw, when i run it i get lots of hex down the screen. [17:52] mAritz: ?! [17:52] Craig`: iirc it said something about buffer first (can't see the very top now) [17:52] Craig`: Buffer [17:52] isaacs has joined the channel [17:52] mAritz: there's nothing that logs/outputs in your pastie?! [17:53] Craig`: I know. [17:53] mAritz: in general: http://nodejs.org/api.html#buffers-2 [17:54] peol has joined the channel [17:54] draco2003 has joined the channel [17:55] Craig`: this is the output i was referring to.. http://pastie.org/1258508 [17:55] peol: Hi, when compiling from git (with --prefix=/usr and checkinstall), is there some special trick to get node-waf working? Complains about the c header files not being copied over. Google gives me nothing. Any ideas? [17:55] Craig`: aha, got the whole error. [17:55] Craig`: wrote it to a file witih `>' [17:56] mAritz: no idea what that is. maybe a problem in jsdom or sth like that :/ [17:56] Craig`: http://pastebin.com/377vpP26 [17:56] indexzero: isaacs: you around? [17:56] isaacs: yo [17:56] mAritz: you could manually convert it to a string and see what it says ;) [17:56] softdrink: hooray for super simple unit testing! if i run any of my classes by themselves, the tests run :D http://dl.dropbox.com/u/543400/simpletest.png [17:56] pharkmillups has joined the channel [17:57] indexzero: any idea when 0.2.5-2 is going to land? [17:57] indexzero: that little sudo fix I submitted would be really helpful [17:58] isaacs: oh, i guess i can bump the version now. [17:58] indexzero: isaacs: Thanks [17:58] Craig`: so yeah, this is directed at anyone, if you know a fix for http://pastebin.com/377vpP26 please help? :D my code is.. http://pastie.org/1258483 [17:58] isaacs: indexzero: the issue is that i just landed a massive refactor and kinda wanna play with it a bit more before sicking it on people [17:58] indexzero: hmm ... ok [17:58] isaacs: indexzero: all output (logging and stdout) goes through lib/utils/output.js [17:59] isaacs: indexzero: colors are only added if the dest is a tty, and you can set --outfd and --logfd to a file descriptor or a stream object [17:59] benburkert has joined the channel [17:59] mAritz: GOD DAMNIT, i just lost my taskbar xD [17:59] isaacs: ALSO! there's an npm.on("log" ...) event [17:59] indexzero: Craig`: What version of node / jsdom / everything are you using? [17:59] indexzero: isaacs: nice, that'll be really helpful [17:59] isaacs: indexzero: so you can respond to log messages as they come in, regardless of the loglevel [18:00] loke_ has joined the channel [18:00] Craig`: node -v [18:00] Craig`: v0.3.0-pre [18:00] isaacs: indexzero: i'm considering adding a npm.on("log:info", npm!log:warn npm!log:error etc. [18:00] Craig`: oh, i thought i had 0.2.4. [18:00] ryah_: pquerna: yes, sockets (at least) must support socket.write("string") [18:00] isaacs: indexzero: so you can just handle the ones that you care about [18:00] indexzero: Craig`: Yeah, try 0.2.4 or 0.3.0 [18:00] ryah_: pquerna: because of the optimization that can be made [18:00] draco2003: still trying to wrap my head around node.js and trying to learn through converting the socket.io chat example to a pixel tracker with report page. i have the pixel count part working, but trying to figure out how to pass that count to the listening clients at an interval [18:00] ryah_: pquerna: also no one likes buffers, really [18:00] loke_: anyone that succedded to make cloud9 work with npm? [18:00] Craig`: indexzero, easy way to downgrade? [18:00] draco2003: http://pastebin.com/etJ9GiiF is the code so far (not much further than the chat example [18:01] indexzero: isaacs: why the ':' instead of '.' for namespaced events? [18:01] vnguyen has joined the channel [18:01] isaacs: indexzero: oh, um... cuz... i've used yui3 a lot and that's what it uses? [18:01] indexzero: Craig`: make distclean && git checkout v0.3.0 && make && make install [18:01] mjr_: Everybody loves Buffers compared to parsing binary protocols with strings [18:01] indexzero: from your node directory [18:01] isaacs: indexzero: i guess on("log.level") is fine, though [18:01] mjr_: Other than that, kind of annoying compared to strings. [18:01] isaacs: ryah_: yeah, what mjr_ said. [18:01] pquerna: ryah_: it seems like we should just require all stream interfaces to accept strings in their writes. [18:01] indexzero: isaacs: Ahhh, I've never used YUI [18:02] isaacs: ryah_: buffers are pretty much ideal (and absolutely required) for binary protocols. [18:02] indexzero: I usually go with '.' because that's the jquery namespaced events, but it's really a style thing [18:02] Craig`: indexzero, what directory should i be iN? [18:02] indexzero: Craig`: The directory where node is: cd /path/to/node [18:02] pquerna: ryah_: without a doubt its more work for the stream author, but doing anything else is a lie to them about what the'll encounter. [18:03] Craig`: error: pathspec 'v0.3.0' did not match any file(s) known to git. [18:03] indexzero: Craig`: git pull [18:03] indexzero: then try again [18:03] Craig`: The project was not configured: run "waf configure" first! [18:04] Craig`: i don't have waf. [18:04] indexzero: ah yeah, ./configure before make and make install [18:04] indexzero: yeah you do [18:04] indexzero: cd /path/to/node && make distclean && ./configure && make && makeinstall [18:04] indexzero: *make install [18:04] indexzero: not makeinstall [18:04] springmeyer has joined the channel [18:04] mjr_: isaacs: how did your oak.js talk go? [18:05] mjr_: BTW, Oakland is a real city that people have heard of. [18:05] isaacs: mjr_: awesome. you were missed. [18:05] isaacs: mjr_: i know, right? [18:05] mjr_: Yeah, I wish I could have been there. But Kauai is really nice. [18:05] isaacs: kauai is nicer than oakland. [18:05] Anti-X: oh look, it's the thing that does that thing. [18:05] Anti-X: with the thing. [18:06] isaacs: and probably even better coffee, since the coffee i'm drinking right now is was actually born in hawaii [18:06] Anti-X: isn't oakland just an appendix to SF? [18:07] Anti-X: did i offend? [18:07] Anti-X: sorry ;p [18:08] ryah_: pquerna: indeed [18:08] davidascher has joined the channel [18:10] mikeal has joined the channel [18:15] rasztasd has left the channel [18:16] davida has joined the channel [18:16] ajsie has joined the channel [18:16] ajsie: should i install node.js with sudo? [18:17] ajsie: ./configure && make && make install or sudo ./configure && sudo make && sudo make install [18:17] mjr_: ajsie: probably not [18:17] Mikushi: depends [18:17] mjr_: But depending on your config, you might have to [18:17] ajsie: what config? [18:17] Mikushi: usually goes like this: ./configure, make, sudo make install [18:17] meandi2 has joined the channel [18:18] ajsie: okay [18:18] ajsie: ill try that [18:18] ajsie: everyone else can use it? [18:18] ajsie: or do other users have to install it again [18:20] mw has joined the channel [18:20] shadow_walker has joined the channel [18:21] flintf has joined the channel [18:21] StanAngeloff_ has joined the channel [18:22] Mikushi: ajsie: normally everybody can use it, might have to do sudo node file.js. (i personnally don't have to on Ubuntu 10.04) [18:23] daglees has joined the channel [18:23] ajsie: okay thanks [18:23] ajsie: Mikushi: but what happens if i use make install with no sudo [18:23] romainhuet has joined the channel [18:23] ajsie: then only that user can use it? [18:23] ajsie: or wont it work at all [18:23] saikat has joined the channel [18:24] bruse: you'll probably have to change the path it installs to [18:24] bruse: if you dont want to install it with sudo [18:26] Draggor: Oh haooy days, nodejs is compiling under cygwin on win7 [18:27] Draggor: happy* [18:27] Anti-X: of course it is [18:27] Anti-X: it's node [18:27] ajsie: i try to install npm. why does it says dont use sudo but i cannot install it without [18:27] ajsie: curl http://npmjs.org/install.sh | sh gives me NOT OK [18:27] ajsie: curl http://npmjs.org/install.sh | sudo sh works .. but is telling me dont use sudo [18:27] ajsie: this sudo not sudo is very confusing [18:27] Draggor: it took some rebaseall magic fixing [18:28] isaacs: ajsie: go to http://github.com/isaacs/npm/ and look at the "Permission Errors" section [18:28] ajsie: ok [18:29] xla has joined the channel [18:30] sudoer has joined the channel [18:30] Mikushi: ajsie: Me if i make install without sudo, it just fails, for permission reason. (it's not only NodeJS, any make install in general i need to run as sudo) [18:30] femtoo has joined the channel [18:31] murz has joined the channel [18:31] Gehhilfe has joined the channel [18:32] ajsie: could someone tell me where .node_libraries is .. i installed it with ./configure && make && sudo make install but cant find that folder [18:32] jesusabdullah: It might not exist (yet) [18:33] jesusabdullah: mkdir ~/.node_libraries [18:33] jesusabdullah: perhaps [18:33] junkee[] has left the channel [18:34] ajsie: jesusabdullah: but when does it exist ? [18:34] jesusabdullah: when you MAKE it! [18:34] ajsie: i didnt have to i recall [18:34] jesusabdullah: LET THERE BE ~/.node_libraries ! [18:34] jesusabdullah: Hmm [18:34] jesusabdullah: I'm not sure [18:34] saschagehlich has joined the channel [18:36] c4milo has joined the channel [18:41] Anti-X: yeah right [18:41] Anti-X: i bet you stoled it! [18:41] jesusabdullah: >:O [18:42] jesusabdullah: MY SECRET [18:43] mAritz: anyone here know expresso and has it running with coverage? i'm trying to specify my ./models folder as --include but jscoverage is still trying to use ./lib [18:45] V1 has joined the channel [18:46] teemow has joined the channel [18:49] MikhX has joined the channel [18:50] tj: mAritz: yeah it is hardcoded to ./lib right now [18:50] tj: --include just unshifts that require path [18:51] mAritz: hm, any chance that you could hotfix that? [18:52] erobit has joined the channel [18:52] erobit: hi folks, is it possible to do something like a redirect with the response output [18:53] tj: mAritz: not right away sorry [18:53] mAritz: ok, i'll symlink lib to models then :( [18:53] erobit: I am uploading images /upload and want to redirect back to / after the images are uploaded and resized [18:54] tj: erobit: http://en.wikipedia.org/wiki/Meta_refresh [18:55] pedrobelo has joined the channel [18:58] bradleymeck has joined the channel [18:58] blaines has joined the channel [18:59] mAritz: tj: what do you do with the stuff that's in lib-cov? (just a js file in my case) [19:00] programble has joined the channel [19:00] mAritz: it didn't output it like you've written in the docs [19:00] tj: lib-cov is a dir containing the contents of ./lib but instrumented by node-jscoverage [19:01] tj: when the instrumented js is run with the tests, i can report on the path coverage [19:02] robmason has joined the channel [19:03] c4milo has left the channel [19:04] femtooo has joined the channel [19:06] mAritz: hm, i still don't get it :D [19:06] tj: :p [19:06] mAritz: shouldn't running expresso -I lib --cov test/* do that? [19:06] admc has joined the channel [19:07] tj: -I lib just exposes your lib, so you can require('foo') instead of require('../lib/foo') [19:07] tj: which is important for --cov because --cov instruments ./lib and creates ./lib-cov so require('foo') is still valid [19:08] elijah-mbp has joined the channel [19:08] cloudhead has joined the channel [19:09] mAritz: ahhh, got it to work... i didn't properly execute my code yet :) [19:09] mAritz: awesome [19:10] tj: i suggest a makefile w/ $ make test [19:10] tj: its annoying typing that stuff all the time [19:10] tj: and makes it easier for other people [19:11] mAritz: it's a personal webapp, not really intended for others to use, for now. ;) [19:12] tj: ah [19:12] davidascher has joined the channel [19:14] mAritz: new issue: i have to ctrl+c after starting it or it won't output anything. (doesn't matter if i do it with -c or not) probably an issue on my end or is it a known problem with expresso? [19:14] tj: your end [19:14] tj: you have something active, a connection, timer, etc [19:14] davida has joined the channel [19:15] jvolkman_ has joined the channel [19:15] mAritz: shouldn't, but i'll have a look around. :( [19:16] jakehow has joined the channel [19:16] tj: db connection? [19:16] mAritz: oh, yeah... redis [19:16] mAritz: just got that :D [19:16] mAritz: (looking at my actual code sometimes helps... stupid brain not working correctly) [19:18] mytrile has joined the channel [19:18] JohnDav_ has joined the channel [19:19] sh1mmer has joined the channel [19:19] mAritz: is there a way to call something after all tests have run? or do i have to create a test for that and run them serially? [19:20] tj: if you run parallel you need to track that [19:20] tj: otherwise the last "test" function can close the connection [19:21] tj: so you can use it like a hook instead of a test [19:21] bradleymeck has joined the channel [19:21] tj: parallel testing is only good when you have very little to no state [19:21] tj: otherwise you will probably be better off with --serial [19:23] rikarends has joined the channel [19:25] mAritz: thanks :) [19:25] mAritz: works [19:29] Crshman_ has joined the channel [19:29] jvolkman__ has joined the channel [19:29] Anti-X: http://thedailywtf.com/Articles/SQL-Error-191-Nested-Way-Too-Fing-Deeply.aspx [19:30] Anti-X: <3 [19:31] dguttman has joined the channel [19:31] tj: jesus [19:33] aubergine has joined the channel [19:33] mAritz: haha, i had that happen to me once too. it was of course a dynamically build query and not intended for what the marketing department was doing with it. (not my code, just working on old stuff) [19:33] zomgbie has joined the channel [19:35] boaz_ has joined the channel [19:36] tj: its quiet in here today [19:38] gmosx has joined the channel [19:42] pandark_ has joined the channel [19:45] ben_alman has joined the channel [19:45] davidascher has joined the channel [19:45] shadow_walker has joined the channel [19:49] Anti-X: if it's too quiet for you, you can read about the kerbleckistanian php developer http://thedailywtf.com/Articles/Maybe-I-Needing-Later.aspx [19:49] rauchg_ has joined the channel [19:49] mAritz: damnit, i had stuff to do Anti-X! [19:49] Anti-X: lies [19:51] mAritz: you got me :( [19:51] mAritz: (no, i do have stuff to do... i'm just really good in procrastinating :/) [19:51] jchris has joined the channel [19:51] siculars has joined the channel [19:52] MikhX has joined the channel [19:53] SubStack_ has joined the channel [19:54] stepheneb has joined the channel [19:54] rwaldron_ has joined the channel [19:56] robotarmy has joined the channel [19:59] phiggins has joined the channel [20:02] cognominal has joined the channel [20:04] svnlto has joined the channel [20:04] MikhX has joined the channel [20:06] femtoo has joined the channel [20:06] V1 has joined the channel [20:07] Anti-X: 400! [20:07] Anti-X: oh damn [20:07] Anti-X: 399 [20:08] V1: Ohic [20:08] tilgovi has joined the channel [20:08] andrewa2 has left the channel [20:11] Connorhd has joined the channel [20:13] bentomas has joined the channel [20:14] creationix has joined the channel [20:15] garrensmith has joined the channel [20:18] Wizek: Hi! How do I make a javascript functon with indefinite number of arguments? [20:19] langworthy has joined the channel [20:19] bgoldman has joined the channel [20:19] tj: Wizek: arguments.length [20:19] tj: and a for loop [20:20] Wizek: ty tj [20:20] garrensmith: Wizek: you could also try using an object hash = function ({arg1: "", arg2: "" }) [20:21] bgoldman: im having a problem doing an HTTP POST with http.createClient. im using req.write() for the post body but on the other server the post is empty. additionally, doing console.log on the return value of req.write() shows false. any ideas? [20:23] jvolkman_ has joined the channel [20:24] blackbrrr has joined the channel [20:24] ossareh has joined the channel [20:26] mjr_: bgoldman: did you do req.end() after sending the post body? [20:27] bgoldman: mjr: i did. however, the return false happened for req.write() which obviously occurs before req.end(). shouldnt req.write() return true? why would it reutrn false? [20:28] mjr_: req.write() returning false just means that there is TCP backpressure [20:28] mjr_: node will buffer and deliver when it can [20:28] MrTAteMyBals has joined the channel [20:28] mjr_: It's pretty common [20:28] MrTAteMyBals: lol [20:28] JimBastard: oops [20:29] teemow has joined the channel [20:29] bgoldman: mjr: on the other end im writing $_GET and $_POST to a log file with PHP. $_GET contains data, $_POST does not [20:29] svnlto has joined the channel [20:29] bgoldman: mjr: have you done an HTTP POST with node.js before? [20:34] mattdennewitz has left the channel [20:34] mtodd has joined the channel [20:34] mjr_: bgoldman: I have done all manner of HTTP with node. [20:34] bgoldman: any ideas why this might not be working then? [20:34] mjr_: I wrote a little HTTP protocol tracer to help with this sort of thing. [20:35] mjr_: npm install pcap [20:35] mjr_: will give you a program called http_trace [20:35] mjr_: But anyway, I'll bet it is something simple. Can you gist your code> [20:35] mjr_: ? [20:35] bgoldman: yes [20:35] gmosx has left the channel [20:36] bgoldman: mjr: http://gist.github.com/654360 [20:36] eee_c has joined the channel [20:39] ngw has joined the channel [20:39] mjr_: you want to send a url-encoded form body? [20:39] mjr_: er, body, with whatever that content type is [20:40] bgoldman: mjr: i overrode the variable "post" with simple data that doesnt need to be urlencoded: 'foo=bar&baz=qux' [20:45] mjr_: bgoldman: http://gist.github.com/654371 [20:45] mjr_: It looks like your example is from the middle of something complicated [20:45] mjr_: So it's not very easy for me to fix [20:45] mjr_: But the code I just posted should do the same thing. I just tested it, and it posted successfully. [20:46] ryan_gahl has joined the channel [20:46] mjr_: No response body though. [20:46] mjr_: bgoldman: you might find that mikeal's "request" library makes this easier. Try "npm install request" [20:46] gkatsev: is there a debugger that can be used with node? [20:47] _alex has joined the channel [20:47] bgoldman: mjr: thanks! can you change the post params and run that snipped again so i can check if it hit my log file? [20:47] mjr_: bgoldman: http://github.com/mikeal/node-utils/tree/master/request/ [20:48] mjr_: sent [20:48] mjr_: just download the code in that gist and run it yourself. It'll work with stock node, no tricks. [20:48] bgoldman: mjr: thank you. can you send me the link to your amazon wishlist? [20:49] mjr_: bgoldman: just buy me a beer when we meet in person. [20:49] bgoldman: mjr: hah. what state are you in [20:50] mjr_: At this very moment, I'm in Hawaii, but I normally live in SF. [20:50] SubStack: where in hawaii? [20:50] bgoldman: nice i used to live in norcal too, im back to LA, but i come to SF once a month or so [20:50] mjr_: SubStack: on Kauai, on the north side. [20:50] SubStack: neat [20:51] SubStack: I was in Hilo for two weeks this summer. Neat place. [20:51] bgoldman: mjr: what are you doing on #node.js while on vacation? lol [20:51] mjr_: We are toying with the idea of moving here. [20:51] naturalethic has joined the channel [20:51] mjr_: The wife and kids love it, and aside from the lack of a tech scene, it's pretty fantastic. [20:53] benoitc has joined the channel [20:53] benoitc: morning' [20:53] SubStack has joined the channel [20:53] mjr_: morning [20:53] benoitc: am trying to compile node on openbsd [20:53] mjr_: node.js will slowly subsume the entire couchdb community. [20:53] SubStack: pesky network >_< [20:54] benoitc: but node_native.h is missing [20:54] benoitc: smth like it [20:54] Anti-X: we should rewrite node in branfuck [20:54] Anti-X: brainfuck [20:54] gkatsev: brainfuck interpreter in node? [20:54] benoitc: or in erlang [20:54] Anti-X: gkatsev, opposite [20:54] Anti-X: node interpreter in bf [20:55] pquerna: mjr_: morning [20:56] pquerna: mjr_: http://github.com/pquerna/node/compare/http-streams [20:56] rikarends has joined the channel [20:56] gkatsev: bf interpreter in bf that also interprets node? [20:56] pquerna: mjr_: down to 3 or 4 test failures. [20:56] benoitc: not sure how node_natives.h is built [20:57] devinus_: Alright guys I need ideas... I've done an LRU cache, a linked list implementation, and a binary search tree implementation in Node.js, what other basic CS ideas could I implement? [20:57] Anti-X: node paths [20:57] Anti-X: util functions for calculating node stuffs [20:57] devinus_: preferably of the same or slightly increased difficulty [20:58] mjr_: pquerna: the world is nearly saved [20:58] mjr_: pquerna: so much progress because of the Giants' recent success? [20:59] devinus_: Anti-X: like A* ? [20:59] ben_alman has joined the channel [20:59] pquerna: mjr_: yes, the world does revovle around the giants. [20:59] Anti-X: devinus_, if you're really up on time, how about implementing the Decimal class from python? it's an implementation of the IBM floating point thingy thangy... that does things right and all [20:59] pquerna: mjr_: and my beard. [20:59] mjr_: It all makes so much sense now. [20:59] bearnard has joined the channel [21:00] Anti-X: no precision errors! [21:00] Anti-X: doesn't that sound nice [21:00] Anti-X: we could totally make a stock market app in node [21:00] Anti-X: with the 1 millionth of a cent precision [21:01] pquerna: Go [21:01] pquerna: or Rust. [21:01] pquerna: thats what you are looking for Anti-X. [21:01] Anti-X: Go as in google? [21:01] rikarends has joined the channel [21:01] pquerna: Anti-X: rust, http://github.com/graydon/rust/wiki/Project-FAQ go: http://golang.org/ [21:02] Anti-X: no i'm not looking for that [21:02] Anti-X: ;) [21:03] boaz has joined the channel [21:03] Anti-X: what ever made you reach that conclusion... [21:03] pquerna: i want go to be popular. [21:04] pquerna: you wanted to do math [21:04] pquerna: i mean, at least Decimals imply, math. [21:04] Anti-X: do you know python's Decimal class? [21:04] boaz_ has joined the channel [21:05] pquerna: i have used it. in software. I wouldn't say, expert knowledge. [21:05] Anti-X: so then you know what i mean when i say "port it to node"? [21:05] Anti-X: and you somehow connected that with Go and Rust [21:05] pquerna: yes [21:06] Anti-X: maybe you should see a doctor [21:06] pquerna: the inefficiencies of crossing the c++ boundaries in v8 still seem so expensive, if you wanted to do serooius work in deicmal type things, you shouldn't use [21:06] pquerna: i was just using my handy jump to conclusions map [21:06] pquerna: mat. [21:07] pquerna: shouldn't use node, and I hate Java, and most people hate C [21:07] pquerna: so that pretty much leaves Rust and Go [21:07] ph^ has joined the channel [21:07] Anti-X: i'm not exactly saying that python's implementation is spectacularly fast either [21:07] Anti-X: it's more the accuracy i'd love to have [21:07] femtooo has joined the channel [21:07] Anti-X: not necessarily the speed [21:08] pquerna: also, i want to get more peple using Go [21:08] pquerna: so it dosn't die [21:08] gkatsev: which Go? [21:08] Anti-X: if nobody uses it, it deserves to die! [21:08] pquerna: the google go lang [21:08] SubStack: hah true [21:09] SubStack: haskell is good for number-heavy stuff too [21:09] jchris has joined the channel [21:09] Anti-X: and for going insane [21:09] tj: haskell is pretty damn snappy from what I have tried [21:09] SubStack: also true [21:09] gkatsev: fortran, ftw! [21:09] gkatsev: :P [21:09] Anti-X: i gotta 1 up you there, punch cards ftw! [21:10] JimBastard: 100100100100 [21:10] SubStack: haskell sucks at wrapping c libs though since you've got to convert nice functional types into impure c structures [21:10] SubStack: and that transition can be pretty slow [21:10] tj: true [21:11] tj: yeah i imagine some bindings are insanely awkward [21:12] mraleph: pquerna: AFAIK there is some ongoing effort to decrease cost of JS -> C++ calls in V8. [21:13] mraleph: pquerna: but to get decent speed for custom numeric type you should probably hack-hack-hack inside codegen and ICs [21:14] Anti-X: you could probably do the decimal system in c++, but the problem is: the numbers need to be strings to keep precision, and numeric strings have a tendency to change size, often. [21:14] bearnard has joined the channel [21:14] Anti-X: so that would be hell in c++ [21:14] Anti-X: i suppose [21:15] herbySk: mraleph: maybe they could make math in js fast, instead... [21:15] eee_c has joined the channel [21:16] iigrat has joined the channel [21:16] teemow has joined the channel [21:17] aho has joined the channel [21:17] aho: aww... missed the over 400 peak :> [21:17] Sembiance: heh [21:18] mraleph: herbySk: well. math in JS is kinda slow by definition of JS :-) [21:19] pedrobelo has joined the channel [21:20] Anti-X: math in JS is useless per definition of floating points [21:20] abustin has joined the channel [21:21] pedrobelo has joined the channel [21:21] mraleph: Anti-X: it's even worse than that. [21:21] herbySk: mralpeh: by definition of JS it should be superfast, since there is only one number type, and that is native to the processor... I ssuspect it is so slow because of integer "optimizations" [21:21] herbySk: mraleph: ^^^ [21:21] mraleph: JS math is an attempt to combine floating point math with bitwise int32 math [21:22] aho: tm/jm is fairly good at doing math in a loop though [21:22] tj: haha "smis" [21:22] Anti-X: wot [21:22] herbySk: mraleph: it really strange if two math operation and one toString is slower than no math operation, two toStrings and one substring [21:22] cloudhead: what's the status on HTTPS? [21:22] pquerna: mraleph: for all the issues, i like it more than Lua's number type :) [21:23] mraleph: throw in some dynamic typing and some crazy implicit conversions and you will get crazy JS math [21:23] abustin has joined the channel [21:23] mAritz: tj: funny story, i just forgot to do the beforeExit in my async test and seriously started doubting my sanity because something just didnd't work even though there was absolutely no reason for it not to work... except for the missing beforeExit :D [21:23] pquerna: cloudhead: http://github.com/pquerna/node/compare/http-streams [21:23] tj: mAritz: ah :) [21:23] bradleymeck: mraleph by definition it is not, look at lua's math [21:23] bradleymeck: it is stupidly faster than js [21:24] pquerna: cloudhead: maybe submitted for merging to master today; (who knows when it merges). But https in 0.2/released versions is kinda broken. I wouldn't recommend using it for most use cases. [21:24] mraleph: Lua is so much cleaner and so much simpler to optimize =) look at what Mike Pall have done with LuaJIT2... [21:24] tj: the lua vm is tinyyy [21:24] pquerna: true [21:25] mraleph: There is a huuuge difference between Lua math semantic and JS math semantic. [21:25] faust45 has joined the channel [21:25] bradleymeck: how so? [21:25] mikeal has joined the channel [21:25] mraleph: bradleymeck: e.g. no implicit conversions [21:26] mraleph: no builtin bitwise operators. [21:26] mraleph: no valueOf etc. [21:26] mraleph: but valueOf counts as implicit conversion. [21:26] pquerna: http://lua-users.org/wiki/NumbersTutorial [21:26] pquerna: everything is a float by default. [21:27] bradleymeck: but still even with that, on pidigits you are looking at 160x speedup? I doubt that is the ideal [21:27] mraleph: bradleymeck it's gmp [21:27] mraleph: binding =) [21:28] mraleph: look at the source [21:28] ph^ has joined the channel [21:28] bradleymeck: i thought no bindings were allowed in the language comp [21:28] bradleymeck: ACTION goes off to look [21:29] herbySk: v8: 4+String("5") [21:29] v8bot: herbySk: "45" [21:29] cloudhead: pquerna: ok, thanks [21:29] herbySk: v8: 4+null [21:29] v8bot: herbySk: 4 [21:29] pquerna: cloudhead: hopefully the next 0.3 release will have all of it [21:29] bradleymeck: wonder if you could do a double adder kinda thing and just run a test before heavy math [21:30] ph^ has joined the channel [21:30] ryan[WIN]: lua does have a non-double-float type [21:30] ryan[WIN]: it has a pointer type [21:30] ryan[WIN]: but hardly anyone uses it [21:30] pquerna: ryan[WIN]: no. bad. [21:30] pquerna: doing math with light user data objects :P [21:30] ryan[WIN]: hey [21:30] ryan[WIN]: i've seen worse [21:30] ryan[WIN]: :D [21:30] herbySk: v8: 4+Object.create(String("5")) [21:30] v8bot: herbySk: TypeError: Object prototype may only be an Object or null [21:30] cloudhead: pquerna: cool, nice work [21:30] mraleph: i am a huge fan of Lua actually, so I pay close attention =) [21:31] hsuh has joined the channel [21:31] sonnym has joined the channel [21:31] ryan[WIN]: lua has a bunch of really cool user libraries and such [21:31] herbySk: I think best number system is in Smalltalk... and while doing int operations, it can be pretty fast as well with good VM [21:31] ryan[WIN]: and it's fairly easy to embed and work with on the c/c++ side [21:31] Oliv_Oil has joined the channel [21:32] mraleph: and Mike Pall's jit is extremely nice piece of code. [21:32] mraleph: I am really impressed. [21:32] pquerna: yes, but then about 2 people in the universe know lua [21:32] pquerna: and google hired 1.5 of them [21:32] mAritz: tj: back to doubting my sanity. i added the beforeExit function but it still won't wait for my async callbacks. and it's not taking 2 seconds, so it shouldn't be the timeout. [21:32] bradleymeck: i fricking love lua, but it is somewhat limiting at times [21:33] mraleph: hope V8 will beat luajit2 eventually =) [21:33] mAritz: (increasing the timout to 100000 did not help either) [21:33] ryan[WIN]: lua has gotten a lot better over the years [21:33] ryan[WIN]: i remember using it in 2001 and just writing my own vm instead because it had no threading or scheduling [21:33] ryan[WIN]: then they added it like a year or two later [21:33] tj: mAritz: gist your test [21:34] tj: mAritz: also are you using --serial? [21:34] ryan[WIN]: the only issue i have with Lua is that it's not very easy to cleanly serialize [21:34] mAritz: tj: yes. but it's the same without serial [21:35] tj: mAritz: with --serial its not called before exit, it is the function you call to tell the test that it is done [21:35] mAritz: (almost... fails differntly actually) [21:35] ryan[WIN]: they should have put some serialization routines in the core vm [21:35] tj: mAritz: so foo: function(assert, done){ setTimeout(done, 200) } [21:35] tj: will move it to the next test after 200ms [21:35] tj: they mean different things depending on the mode you use [21:35] mraleph: herbySk: well. pure integer operations are pretty fast with V8 too. [21:36] ryan[WIN]: i mostly used lua when working with games and my own engines and the difficulty I had was doing a guaranteed state serialization/load [21:36] herbySk: mraleph: maybe, my case where math was slower than string was float math... [21:36] mAritz: so, in which mode is it supposed to wait for done to be called? [21:36] ryan[WIN]: so that you could like save the game/quit/come back [21:37] ryan[WIN]: but you can't really hook a lua vm that's in execution that way [21:37] mAritz: ah, in serial. i see. now it seems to work [21:37] jfd1 has joined the channel [21:37] mAritz: that's a little confusing in the docs [21:37] mraleph: herbySk: there is a nasty issue with float math in V8 --- it requires allocation. [21:37] tj: mAritz: yeah sorry the docs are not great [21:37] tj: havent put tons of effort into them [21:38] tj: because test frameworks are boring [21:38] mAritz: :D [21:38] aurynn: I think test frameworks are fun [21:38] mAritz: i haven't done any documentation for any of my node stuff yet, so i shouldn't complain ;) [21:38] rpflo has joined the channel [21:38] mraleph: herbySk: if you have something like a benchmark where math is unreasonably slow you can send it to v8-users mailing list or maybe even open an issue. [21:39] herbySk: mraleph: hmm... that may be the answer... [21:39] ossareh has joined the channel [21:39] ryan[WIN]: so in a lot of games that use lua they don't actually dump the state of their various lua vm's - they make it so that the engine passes them some sort of state and the script runs relatively stateless [21:39] tj: aurynn: the test coverage portion was kinda fun the rest is super boring [21:39] ryan[WIN]: which is "acceptable" to the end user but not as cool [21:40] mraleph: ryan[WIN]: I think 5.1 will solve it. AFAIK they finally provided API that would allow to cleanly serialize closures [21:40] mraleph: *5.2 [21:41] ryan[WIN]: yeah but that's way too long :D [21:42] ryan[WIN]: 5.1 was 2006 [21:42] ryan[WIN]: and by the time 5.1 was around that was a huge pain point for lua [21:42] aurynn: tj, it can be. But, it's a hugely important bit of infrastructure.. and that is exciting. [21:42] herbySk: mraleph: http://jsperf.com/string-plus-vs-math-plus, seems very contraintuitive to me [21:42] tj: aurynn: agreed as far as importance goes [21:42] tj: i guess its just been done so much that its not overly interesting [21:43] tj: I have a cool CI server idea that might be more interesting to work on [21:43] mraleph: herbySk: what is counterintuitive? [21:43] mraleph: herbySk: for me the first one is faster =) [21:45] ctp has joined the channel [21:45] herbySk: mraleph: for me, the second is faster (in chrome 7). and when I tried similar code in node, the string was faster than math, too [21:45] mraleph: herbySk: I am on chrome 8.0.552.0 (Official Build 62249) dev which has V8 2.4.8 inside. [21:46] quirkey has joined the channel [21:46] mraleph: herbySk: strange. really strange. I will look into it. [21:46] herbySk: well, I did the tests on node a few months ago.... maybe _now_ it is already better (which would be fine) [21:47] bradleymeck: on es-discuss they brought up an interesting problem, async gc (even concurrent) as being a problem that may need to be addressed in the future for js [21:48] mraleph: herbySk: probably there was some nasty bug in arithmetic --- like allocating some garbage temporaries or using wrong instruction in generated code. Unfortunately nothing pops into mind. [21:49] _alex has joined the channel [21:49] tj has joined the channel [21:49] mikew3c has joined the channel [21:49] herbySk: mraleph: glad to know it now works as expected. [21:51] mraleph: bradleymeck: well... you need concurrent GC if you want to reduce pauses to negligible values :-) [21:52] mraleph: bradleymeck: can you post a link to thread? [21:53] elijah-mbp has joined the channel [21:55] devinus_: anybody know how to manually trigger GC? [21:57] mraleph: devinus_: there is node-gc module or either you can probably start node with --expose-gc to get access to gc function. [21:58] mraleph: devinus_: but why do you want to trigger GC? [21:58] devinus_: mraleph: to reclaim my memories [21:58] devinus_: node takes too much GBs [22:00] Anti-X: amnesia? [22:00] aurynn: Node eats teh gigs! [22:00] mechanate has joined the channel [22:01] mraleph: devinus_: Are you sure that you are not getting GCs? Run with --trace-gc to figure that out. Another fact: node sends idle notifications to V8 which will trigger GC eventually. [22:01] matjas has joined the channel [22:02] mraleph: V8 by itself will consume no more than 1gb. Other memory is probably consumed by C++ runtime [e.g. for buffers and who knows whats else] --- it can be reserved/committed but not used. [22:03] devinus_: mraleph: sorry, i was just trolling. i was just curious if there was a way to do it [22:06] StanAngeloff has joined the channel [22:06] mraleph: devinus_: --expose-gc is probably your way to go. [22:07] jmaister has joined the channel [22:08] itissid has joined the channel [22:11] devinus_: mraleph: are you really familiar with v8 CL options? [22:11] pufuwozu has joined the channel [22:11] cloudhead has joined the channel [22:12] pedrobelo has joined the channel [22:12] itissid: orlandov: Hey this node-SQLITE does a thread pool? Isnt there a new SQLite Async module http://www.sqlite.org/c3ref/vfs.html... Isnt using node js thread pool ultimately a less scalable option? [22:12] bearnard has joined the channel [22:13] itissid: Actually http://www.sqlite.org/asyncvfs.html [22:13] devinus_: i wonder why --use_flow_graph is false by default [22:13] bnoordhuis has joined the channel [22:13] femtoo has joined the channel [22:14] itissid: I think HTML5 web data bases do it like you do to... [22:15] mraleph: devinus_: because there is no spoon or flow graph if that matters :-) [22:15] mraleph: devinus_: if my memory does not fail me it was removed. [22:15] tj: spoon? [22:16] mraleph: tj: Matrix quote *sigh* [22:16] tj: haha [22:17] mraleph: tj: I know only two movie quotes =) [22:17] mraleph: the second one is "it's not a tumor!" [22:17] tj: would be cool if we took one of the ecma parsers and graphviz or something to render CFGs [22:17] tj: hmmmm [22:18] sh1m has joined the channel [22:18] mraleph: parser usually produces AST not CFG :-) [22:18] tj: yeah i know but im sure you could whip something up [22:19] mraleph: devinus_: well to some extent I am familiar with V8 options. [22:19] tj: it would be an interesting little project i think [22:20] hellp has joined the channel [22:21] bnoordhuis: hey all, any core hackers around? [22:24] mjr_: bnoordhuis: usually. What's up? [22:24] bnoordhuis: i've got an idea i want to pitch, see if it's any good [22:25] bnoordhuis: specifically, the way to do async i/o with libev + libeio [22:25] bnoordhuis: is that up your alley? [22:25] mjr_: kind of, but I'm about to step away for a bit. [22:26] bnoordhuis: bummer (but don't let me keep you) [22:26] bnoordhuis: i'll send it off to the mailing list then [22:26] jacobolus has joined the channel [22:27] jesusabd1llah has joined the channel [22:30] jfd1 has joined the channel [22:32] mikeal has joined the channel [22:33] Tim_Smart has joined the channel [22:35] Tim_Smart: pquerna: How goes http? [22:37] Uierth has joined the channel [22:38] shirro has joined the channel [22:40] pquerna: Tim_Smart: good [22:41] Tim_Smart: Just catching all the http complexities I see :) [22:41] pquerna: Tim_Smart: https://gist.github.com/0269cb6171126348ffa5 [22:41] pquerna: yeah, after the last push [22:41] pquerna: those are the only 2 plain-http failures [22:41] pquerna: few ssl issues to nail still [22:42] pquerna: i have no idea why the first one dies with connection refused [22:42] evanmeagher has joined the channel [22:42] Tim_Smart: Hmm [22:42] Tim_Smart: I wonder how far behind master we are in terms of performance. [22:43] pquerna: i want to get to 100% first tbh [22:43] pquerna: we can always optimize once all tests pass [22:43] pquerna: and then know bout regressions [22:43] Tim_Smart: Yeah I'm +1 on that too. [22:43] pquerna: it really shouldn't be much more. [22:44] pquerna: zero byte chunks was the last one [22:44] pquerna: had me wiresharking and hair pulling for a second [22:44] Tim_Smart: Yeah, but optimizing ecmascript is a wierd thing. [22:44] ossareh has joined the channel [22:45] pquerna: don't tell me you want to switch to lua too :) [22:45] Tim_Smart: Hah [22:45] Tim_Smart: I haven't used lua, so I got no opinions on it :) [22:46] MikhX has joined the channel [22:47] ajpiano has joined the channel [22:51] echosystm has joined the channel [22:51] echosystm: does expressjs have an irc channel somewhere? [22:51] echosystm: i cant seem to find it [22:51] tj: nope [22:51] tj: might be a good idea tho [22:51] echosystm: rightyo [22:51] ysynopsis has joined the channel [22:52] echosystm: this is OT, but im curious about something... [22:52] echosystm: expressjs seems to put range requests in the uri resource segment like collection/.. [22:52] echosystm: conversely, pintura uses the Range http header [22:53] tj: :s [22:53] echosystm: aren't both of these wrong? [22:53] tj: that is probably just an example.. [22:53] tj: showing that you could grab say users 3..7 [22:53] echosystm: i mean, i would have thought they would be part of the query on a collection [22:53] tj: it has nothing to do with the response body range [22:53] tj: yeah Range has nothing to do with htat [22:53] tj: that * [22:53] altamic has joined the channel [22:54] tj: I suppose you could :s but that is very weird [22:54] echosystm: eg. /collection?id=gt(1);id=lt(10)/ [22:54] echosystm: something like that is more correct no? [22:54] tj: you can do whatever you want though... /collection/2/10 /collection?from=2&to=10 [22:54] tj: /collection/2..10 [22:54] peol: If node-waf is failing with node.h / node_events.h no such file after a make install from git, what should I try from there? Google tells me nothing :/ [22:54] tj: all up to you my friend [22:55] peol: I figure it should install itself in /usr/local, which my NODE_PATH is set to [22:55] erobit has joined the channel [22:55] bearnard has joined the channel [22:55] tj: echosystm: personally id use .. i think its pretty clean and expressive [22:56] tj: express-ive haha... durr.. [22:56] echosystm: it confuses the semantics though [22:56] tj: how [22:56] echosystm: eg. /people/1..12/accounts/ [22:56] noahcampbell has joined the channel [22:56] bnoordhuis: peol: what version of node [22:57] echosystm: do we really want the accounts for all people 1..12 ? [22:57] tj: echosystm: whats wrong with that [22:57] peol: bnoordhuis: from git, 0.3.1pre (?) [22:57] tj: echosystm: then you would have /person/1/account [22:57] bnoordhuis: the master is in some upheaval right now, it might be broken [22:57] tj: not /people ... [22:57] peol: bnoordhuis: oo [22:57] bnoordhuis: you could try downgrading to 0.3.0 [22:57] tj: echosystm: its just an example man lol do whatever you want [22:57] echosystm: ok [22:58] peol: bnoordhuis: Yeah, I'll do that. Thanks :) [22:58] bnoordhuis: you're welcome :) [22:58] bartt: Hi tj: will you accept http://github.com/senchalabs/connect/pull/138 now that sencha labs has my TCA? I'm asking b/c you closed the pull request. [22:58] echosystm: i'm just curious about whats most standard [22:58] echosystm: the pintura range header thing is clearly broken though [22:58] abustin has joined the channel [22:58] tj: bartt: i merged it before the cla haha [22:59] echosystm: the http spec is only supposed to be bytes [22:59] tj: echosystm: yeah that is just wrong [22:59] bartt: Oh, I hadn't notice tj. LOL [22:59] bartt: Thx! [23:00] isaacs: anyone want bash completion in npm? [23:00] tj: echosystm: Range: users=2-10 haha i dunno, i guess you could do something like that [23:00] tj: super weird tho I think [23:00] echosystm: it goes against the spec though [23:00] isaacs: tj: are you tjholowaychuk? [23:00] tj: yeah [23:00] isaacs: nice. [23:00] isaacs: like the shortened nick [23:01] echosystm: besides, we already have uris for specifying "what" we want to request [23:01] tj: now i can confuse people even more, tj / tjholowaychuk / visionmedia [23:01] echosystm: headers should only be used for "how" [23:01] tj: wish i could change visionmedia without messing everything up [23:01] tj: echosystm: yeah, I definitely wouldnt recommend that [23:04] yhahn has left the channel [23:04] tj: anyone have cool canvas examples that dont require jquery or big libraries? [23:04] tj: need some more uses to test node-canvas [23:07] Ori_P has joined the channel [23:13] erobit has left the channel [23:16] davidwalsh has joined the channel [23:16] Tim_Smart: echosystm: There is a couple exceptions, like 'Range' headers. [23:17] Tim_Smart: Web media players often use them to skip sections of a video. [23:18] pquerna: acrobat for the longest time was the main user of them [23:18] pquerna: for progressive loading of PDF files [23:18] pquerna: back when the internet was slow [23:18] pquerna: so like 4 years ago. [23:18] tj: damn canvas api not being chainable :( [23:19] springmeyer has joined the channel [23:19] naturalethic has joined the channel [23:22] sudoer has joined the channel [23:23] Tim_Smart: Heh http://arewefastyet.com/?machine=5 [23:23] Tim_Smart: Mozilla just took the spidermonkey cake. [23:23] Tim_Smart: *sunspider [23:24] tj: haha FF looks nuts on there, the others are so constant [23:25] Tim_Smart: Problem is, FF's rendering engine is hella slow. [23:25] Tim_Smart: Chrome still feels way faster on actual websites. [23:26] pquerna: okay fixed the timeout one [23:26] tj: yeah I was just looking at some of that. my canvas implementation is almost 3x faster than FF in some cases [23:27] tj: and toDataURL() is like 10x faster [23:27] tj: which is kinda odd because they both use cairo [23:27] mraleph: Tim_Smart: Sunspider measures things that does not really matter. [23:27] Tim_Smart: mraleph: Is the v8 bench any better though? [23:28] tj: what do those benchmarks actually bench? [23:28] pquerna: mraleph: i really want to make a whole suite of node benchmarks tbh [23:28] mraleph: TIm_Smart: I would say - yes. There are several issues with SS that V8 bench suite tries to avoid. [23:28] pquerna: mraleph: take a look at a few patterns in node (http, maybe one of the redis clients, templating, etc) [23:28] mraleph: pquerna: that would be cool [23:29] pquerna: (and setup nightly graphs of it of course) [23:29] mraleph: TIm_Smart: first of all just suming up times like SS does it stupid. it's like suming up apples and oranges. [23:30] Tim_Smart: mraleph: Yeah. Mozilla has a couple other test suites around. [23:30] mraleph: also many SS benches are just strange --- like loop with bitwise operation that runs for 2 ms. [23:30] mraleph: nobody really cares about this 2ms loop. [23:31] mraleph: V8 tries to cover different areas like GC, speed of method invocation (i.e. overhead of OOP programming in JS) etc. [23:31] Tim_Smart: http://krakenbenchmark.mozilla.com/ is interesting, [23:31] devinus_ has joined the channel [23:32] cadorn has joined the channel [23:32] mraleph: Mozilla's Kraken is also a strange beast. For example there are several benches there which are almost the same --- they just do FFT + some small postprocessing step after FFT. [23:33] mraleph: and due to typo in this benchmarks they really exercise how fast your JS engine can multiply NaN and undefined =) [23:33] mraleph: there is a bug filed for that. [23:33] naturalethic has joined the channel [23:33] Tim_Smart: Haha awesome. [23:34] mraleph: and all Kraken benchmarks are about number crunching loops if I remember correctly. [23:35] mraleph: tracing compilers usually blossom on this kind of code [23:35] pquerna: Tim_Smart: so, just econnreset + some event flow issues in securepair [23:36] JimBastard_ has joined the channel [23:36] Tim_Smart: Nice. [23:36] pquerna: Tim_Smart: can you try the test cases on linux? [23:36] Tim_Smart: OK. [23:38] mraleph: I like the following paraphrase: there are lies, damned lies and benchmarks =) [23:38] JimBastard_: the hackernews censorship never ceases to amaze me [23:38] sprout has joined the channel [23:38] pquerna: JimBastard_: then apply for YC [23:38] SubStack: one of us, one of us [23:38] JimBastard_: i posted some potentially damaging comments about a merger that just happened and they deleted it within 15 seconds lol [23:39] JimBastard_: literally [23:39] JimBastard_: banned a new account/ip and removed post in < 15 seconds [23:39] naturalethic has joined the channel [23:39] pquerna: yes, thats not appropriate for HN. [23:39] pquerna: its not techcrunch [23:39] JimBastard_: its a privately owned site, they can do what they want [23:39] Tim_Smart: pquerna: All the test's are crashing (haven't got to the http ones yet) :/ [23:39] JimBastard_: i just dont think people understand how tight of a control they keep on the content [23:40] Tim_Smart: ryah_: https://gist.github.com/44c09dfc0f8749db8c3f [23:40] pquerna: Tim_Smart: hmm [23:40] Tim_Smart: I think it something to do with 32 bit [23:40] pquerna: Tim_Smart: hmm. no idea what to do then. [23:41] Tim_Smart: Anyway, I'll just run the http ones. [23:41] pquerna: k [23:41] rnewson has joined the channel [23:41] JimBastard_: i actually got a check today from my first startup ever. after 5 years i finally got the last disbursement check [23:41] JimBastard_: it was not a lot of money >.< [23:42] JimBastard_: stupid %0.25 ownership [23:42] evanmeagher has joined the channel [23:43] SubStack: ACTION dilutes JimBastard_  [23:44] naturalethic has joined the channel [23:44] JimBastard_: no no, no dillution [23:44] JimBastard_: that was the agreed upon number [23:44] JimBastard_: lol [23:44] JimBastard_: it was more of just a bonus i guess [23:44] JimBastard_: i was most junior guy there [23:45] Tim_Smart: pquerna: test-http-wget fails because child_process is failing [23:46] Tim_Smart: Well I think so anyway. [23:46] Tim_Smart: Actually, it times out. [23:46] pquerna: Tim_Smart: yeah i mean, if all your other test cases fail or crash, I doubt much is going to work [23:46] mAritz: tj, regarding connect-redis prefixes: what if i'm already using all redis dbs? :D [23:47] mjr_: Then you get double Redis points. [23:47] mjr_: You can redeem them later. [23:47] tj: mAritz: there is a limit? [23:47] mAritz: ;D [23:47] mAritz: i believe it's 16 [23:47] dgathright has joined the channel [23:47] tj: haha well when you actually are using 16 let me know :p [23:47] tj: I dont want to prefix [23:47] mjr_: You can crank up that limit in the config file also [23:48] mAritz: ok, wait a sec... spamming my db :P [23:48] tj: thats a dirty solution IMO [23:48] mAritz: yeah, i know. that's why i'm not writing in the issue anymore. :D [23:48] tj: but it would be nice to have the SELECT option in there [23:49] mAritz: yep, but using the exposed client works as well for me right now. [23:49] Tim_Smart: pquerna: I think it is the test runner failing... [23:49] mjr_: multi-dbs is going away in the brave new world of redis cluster. [23:49] Tim_Smart: pquerna: Running them manually works fine. [23:49] mAritz: mjr_: seriuosly? :( [23:50] mjr_: mAritz: yes, but don't worry, nobody is going to force you to upgrade. [23:50] mAritz: haha... super. i'll just neglect updates :D [23:50] siculars_ has joined the channel [23:50] tj: mjr_: really? do you know why? [23:51] mjr_: tj: antirez wrote about it on the Redis list. Basically he added multiple dbs before all of the new data types were in. Now that zsets and hashes are in, he thinks multi-dbs should go away. [23:52] tj: ah [23:52] mjr_: Also, it is apparently hard to reconcile with his clustering scheme. [23:52] tj: gotcha [23:52] mjr_: So who knows. [23:52] tj: I guess the session stuff could just be a hash [23:52] mjr_: Perhaps the userbase will demand multiple dbs in future versions, and he'll figure something out. [23:52] tj: instead of prefixing keys [23:53] mjr_: in 2.0.x Redis, using hashes is much more memory efficient than building up complex keys [23:53] mjr_: Anyway, look at me, I read the Redis list. [23:54] bradleymeck has joined the channel [23:55] Tim_Smart: pquerna: OK. unix to the rescue. for file in test/simple/test-http*; do ./node $file; done; [23:55] pquerna: heh [23:56] Yuffster_work has joined the channel [23:56] Tim_Smart: pquerna: http-proxy throws, and http-tls throws [23:56] dguttman has joined the channel [23:57] Tim_Smart: ECONNREFUSED for proxy, and http-tls seemed to take ages, and eventually threw an assertion error. [23:57] [[zz]] has joined the channel [23:58] tj: mjr_: the session data is just serialized as json, so i dont think it would be more efficient to use a hash [23:58] naturalethic has joined the channel [23:58] tj: but I think I know what you meant [23:59] mjr_: tj: I'm just regurgitating things I read recently that may or may not apply. [23:59] mjr_: And feeling guilty for distracting the crucial HTTP and SSL refactor discussion. [23:59] pquerna: Tim_Smart: yeah, i found a way to make it go faster, but its not pushing all the data in/out