[00:00] micheil: not bad [00:01] micheil: modular: any affiliation with namecheap? [00:01] modular: if you register something through those links, i'll get a 15% cut [00:02] modular: other than that, it's just a personal project [00:03] robotarmy: modular: awesome [00:03] robotarmy: i love that [00:03] modular: thanks :) [00:03] robotarmy: SO COOL [00:04] willwhite: modular: very nice [00:05] robotarmy: modular: it needs a "BUY THEM ALL" [00:05] robotarmy: button :D [00:05] modular: hehe [00:06] robotarmy: seriously - will namecheap let you submit a big list? [00:08] modular: there's a "bulk domain search" tab on that page my links take you to. [00:13] ThePub has joined the channel [00:18] modular: alright, i'm going home. that site may crash or go down, i still have to implement some things. tomorrow is the public launch, though, so hopefully it stays up after that. :) [00:18] shadow_walker has joined the channel [00:21] jacobolus has joined the channel [00:22] gsmcwhirter has joined the channel [00:29] danielrmz has joined the channel [00:36] jamescarr has joined the channel [00:39] softdrink has joined the channel [00:40] __swanson_ has joined the channel [00:40] __swanson_: > anyone familiar with jade templates? having a simple issue that I just cant get right [00:41] __swanson_: https://gist.github.com/663463 -- cant get the actual value of item into the textarea, just displays the literal string "item" [00:41] brianmario has joined the channel [00:44] modular has joined the channel [00:46] benburkert has joined the channel [00:46] tj: __swanson_: textarea(...)= item [00:46] Astro has joined the channel [00:46] tj: otherwise item is just text [00:47] __swanson_: ah doh. thanks a lot! [00:47] NickP has joined the channel [00:47] ashb has joined the channel [00:48] __swanson_: learning haml-style templating and node is a providing many opportunities for me to feel dumb :) [00:48] hassox has joined the channel [00:49] Tim_Smart has joined the channel [00:51] roberthahn has joined the channel [00:53] Yuffster has joined the channel [00:54] benburkert has joined the channel [00:54] ben_alman has joined the channel [00:54] davida has joined the channel [00:56] saschagehlich: waah [00:56] saschagehlich: 2am... and one lonely node coder is still sitting in the office. [00:56] tekky has joined the channel [00:57] rcy has joined the channel [00:57] tekky has joined the channel [01:00] aconbere has joined the channel [01:04] saschagehlich: I have a little problem with a http.ClientResponse... I'm fetching a vimeo.com video page but it seems to leave the connection open for another 3 or 5 seconds. when I just do a request via curl, the connection automatically closes after the last bytes [01:05] banjiewen has joined the channel [01:06] jvolkman has joined the channel [01:10] hsuh has joined the channel [01:13] dguttman_ has joined the channel [01:13] Ori_P has joined the channel [01:13] naturalethic: you calling end() ? [01:13] naturalethic: er not sure if http requires that i've only used the regular socket [01:14] naturalethic: request.end(data) [01:14] naturalethic: otherwise it might sit and spin until vimeo times you out [01:14] naturalethic: or you time yourself out [01:15] naturalethic: also you could check the content length against the header and force close it if they match [01:15] saschagehlich: well yes but how do I know whether I get the whole data? [01:15] saschagehlich: vimeo does not send content-length with their html stuff [01:15] naturalethic: give me your sample link [01:15] saschagehlich: http://vimeo.com/3312240 [01:16] rwaldron_ has joined the channel [01:16] naturalethic: hmm yer right -- that's rather unkind of them [01:16] rwaldron_ has joined the channel [01:17] MrNibbles has joined the channel [01:17] modular: i get a content-length header in firefox [01:18] modular: try cloning a few headers from firefox, there's probably a magic one they're looking for. [01:18] jfd1 has joined the channel [01:19] saschagehlich: https://gist.github.com/95c1fd8489b718258adb [01:19] saschagehlich: strange, that code works [01:20] saschagehlich: must be doing something wrong then... [01:20] dnolen has joined the channel [01:23] modular: w [01:24] modular: oops, this is not my terminal window... [01:25] saschagehlich: got it... [01:25] saschagehlich: I accidently sent the headers I received from another response which seemed to confuse the vimeo server or sth like that [01:25] saschagehlich: btw, why the hell are they using apache.. [01:26] mtodd has joined the channel [01:28] naturalethic: hmm actress in that video isn't believable [01:29] saschagehlich: true [01:29] saschagehlich: but a good song anyway [01:29] naturalethic: yeah :) k guys i'm out [01:30] saschagehlich: anyone wants to try out my first pre-alpha node.js project? [01:33] zhesto has joined the channel [01:36] jamund has joined the channel [01:36] zhware has joined the channel [01:39] ryah_: saschagehlich: yes [01:39] ryah_: saschagehlich: is it a website? [01:39] saschagehlich: http://v5web.filsh.net - unfortunately it's only german yet but maybe you understand it [01:40] ryah_: ich kann deutsch [01:40] saschagehlich: ryah_: that's actually the only sentence you know in german, right? :P [01:41] ryah_: saschagehlich: no :) [01:41] ryah_: yeah it's cool - isn't this what felixge's thing does? [01:41] ryah_: transcode.it ? [01:42] ryah_: i actually don't have a movie to upload.. [01:42] saschagehlich: ryah_: no, it's something else. you enter a youtube / vimeo / dailymotion / google video link, the server downloads the video, converts it into the given format and presents it to the user [01:42] ryah_: transload.it, i mean [01:42] ryah_: ah [01:42] ryah_: ok [01:42] jamund_ has joined the channel [01:43] saschagehlich: I've done it in python and c++ before but let's see how well node.js will perform :) [01:44] ryah_: oh i like the progress bar [01:44] saschagehlich: :) [01:45] ryah_: awesome, seems to have worked [01:45] ryah_: well - it hasn't downloaded yet [01:45] ryah_: download is kind of slow. is node pushing that out? [01:45] saschagehlich: yep [01:45] ryah_: how is it doing it? [01:46] saschagehlich: opening up a readstream and writing the chunks to the response [01:46] ryah_: hm [01:47] ryah_: what's the cpu look like atm? [01:47] ryah_: as im downloading it? [01:47] saschagehlich: load 0.02 [01:47] saschagehlich: 0.0%us [01:48] ryah_: i wonder if that's node being slow - or if your server just doesn't have good bandwidth? [01:48] saschagehlich: well it should have a good bandwidth [01:48] saschagehlich: let me load the file via ssh to check the bandwidth... [01:48] saschagehlich: but maybe it's depending on the location [01:48] saschagehlich: it's an OVH server located in france [01:49] eee_c has joined the channel [01:49] batasrki has joined the channel [01:50] ryah_: well, im getting 50 kb/sec [01:50] ryah_: i guess it's not terrible [01:50] jamescarr: ' oh F'ing sweet [01:50] batasrki has left the channel [01:50] saschagehlich: huh [01:50] saschagehlich: only 80kb/s here [01:51] saschagehlich: 100... max. 110 [01:53] ryah_: saschagehlich: through ssh? [01:53] saschagehlich: yep [01:53] ryah_: ok, well maybe it's not node sucking :) [01:53] saschagehlich: Max: 1590.34 kBit/s [01:53] ryah_: always a worry [01:53] saschagehlich: that's pretty sad... [01:58] stepheneb has joined the channel [01:58] Tobsn has joined the channel [01:59] Tobsn: *tut [01:59] saschagehlich: I'm wondering whether I really need to push the static files through nginx? Wouldn't node.js be strong enough to send them as well? [02:00] __swanson_: so @ryah_ when are you doing a techzing interview :) [02:01] zentoooo has joined the channel [02:01] dgathright_ has joined the channel [02:01] Tobsn: saschagehlich, s3 cloudfront [02:02] jesusabdroolah has joined the channel [02:02] Tobsn: static.yourdomain.com/file.jpg [02:02] ajsie has joined the channel [02:02] Tobsn: i just bought cdn.cm exactly for this issue ;) [02:02] Tobsn: http://i.cdn.cm/lo/block/obg.gif [02:03] ajsie: what is Orion? [02:03] ajsie: as in Orion Node Riak [02:03] saschagehlich: Tobsn: expensive, isn't it? [02:03] Tobsn: whats expensive? [02:03] saschagehlich: s3 hosting [02:04] Tobsn: nich wirklich, S3 kost nichts mehr... das is veraltet dass die teuer sind. besonders in deutschland... wo alles 2 jahre hinterherhinkt :P [02:04] mjr_ has joined the channel [02:04] jamescarr: webworkers totally rock [02:04] saschagehlich: das kam überraschend. [02:04] sudoer has joined the channel [02:05] Tobsn: get yourself a AWS account, set up a S3 bucket, turn it into a cloudfront for the EU (if your traffic is mostly from germany etc.) and you're good to go. you can even cname subdomains to your cloudfront host. [02:05] willwhite has joined the channel [02:06] saschagehlich: but 150€ per tb is not cheap :D [02:06] Tobsn: if you want to serve it yourself - only static files (js, html, images, css) - look into lighttpd v2 [02:06] saschagehlich: s/€/$ [02:06] Tobsn: are you sure you use one TB? [02:07] saschagehlich: definitely [02:07] bbttxu has joined the channel [02:07] saschagehlich: 1,5 mio page impressions per day [02:07] Tobsn: thats not much [02:07] jamescarr: heh [02:08] saschagehlich: hm but whatever, I'll try serving them with nginx first [02:08] saschagehlich: if it's slowing down my webservers (I guess it won't) I'll switch over to s3 [02:08] Tobsn: also depends where your traffic is [02:09] gsmcwhirter: anyone used the jade client-side js port? [02:09] saschagehlich: mostly EU [02:09] saschagehlich: mostly germany (80-90%) [02:09] Tobsn: well, warent there like 20 hosters with unmetered traffic? [02:09] Tobsn: just get a hetzner server and tel them to give you one of their throw away servers and ask them about the traffic [02:10] Tobsn: *tell [02:10] saschagehlich: I'm currently hosting at OVH and the connections are slowing down sometimes [02:10] jamescarr: I've written a mess :( [02:11] saschagehlich: I talked to hetzner, wanted to rent 40 servers and they did not give me any discount [02:11] Tobsn: lol [02:11] Tobsn: you did it wrong [02:11] saschagehlich: so, hetzner is not a good partner ;) [02:11] Tobsn: i had only good experience with them in the past [02:12] saschagehlich: nope, never [02:12] Tobsn: well did you said you wanted to rent or did you actually rented 40 servers? [02:12] saschagehlich: my current main server is hosted by hetzner - 3 complete failures in the past 6 months. no good. [02:12] saschagehlich: and no support at all [02:12] Tobsn: hmm [02:13] saschagehlich: I said I wanted to rent 40 servers [02:13] elijah-mbp: lol [02:13] saschagehlich: they didn't even want to lower the setup fee [02:13] Tobsn: ping 75.126.236.133 [02:14] bpot has joined the channel [02:14] ooooPsss has joined the channel [02:14] Tobsn: avg. 66.305ms here [02:14] Tobsn: lemme know what youre latency is [02:14] saschagehlich: avg 181.299 [02:15] Tobsn: hmm [02:15] saschagehlich: versatel = crap. nvm. [02:15] Tobsn: thats softlayer - if the speed is decent enough i would go with those guys [02:15] gsmcwhirter: avg 75.24 for me [02:15] Tobsn: they give you everything... [02:15] Tobsn: gsmcwhirter. country? [02:15] gsmcwhirter: US [02:15] Tobsn: well... [02:15] Tobsn: haha [02:15] Tobsn: its about his speed from germany [02:16] gsmcwhirter: ah. heh. thats what i get for not reading the scrollback far enough =) [02:16] Tobsn: (interesting that im 10ms faster) [02:16] saschagehlich: Tobsn: I'm even getting a better result with a ovh server here [02:16] saschagehlich: but... gsmcwhirter: ping 188.165.219.142 [02:16] saschagehlich: bad connection to the US I think [02:16] Tobsn: 161.046 ms [02:16] gsmcwhirter: 179-ish [02:16] Tobsn: from san fran [02:16] Nevtus has joined the channel [02:16] Tobsn: lol gsmcwhirter, your internet sucks [02:16] saschagehlich: you see? [02:16] Nevtus has joined the channel [02:16] gsmcwhirter: college connection, and running ICS through another comp [02:16] gsmcwhirter: *shrug* [02:16] Tobsn: ah [02:16] saschagehlich: I'm getting about 57.000 here [02:16] davidascher has joined the channel [02:17] Tobsn: hmm [02:17] saschagehlich: ACTION is out for a smoke [02:17] ben_alman has joined the channel [02:17] Tobsn: well call up hetzner, let them give you their manager and tell them you want 40 dedicated servers with your specifications and you want to have a quote on that [02:17] meatmanek has joined the channel [02:17] Tobsn: *head of sales [02:18] saschagehlich: I talked to the datacentre manager and he told me he can not give me any discount, I have to pay the prices given on their website [02:18] overra has joined the channel [02:18] Tobsn: fyi, thats why i left germany... i hate the IT scene there. bunch of jerks ;) [02:18] siculars has joined the channel [02:18] Tobsn: well the DC managers can of course not give you any discounts [02:18] Tobsn: you have to talk to the guy above him [02:18] saschagehlich: mr hetzner [02:18] Tobsn: eins drunter [02:18] saschagehlich: he's like mr evil I guess [02:18] Tobsn: ;) [02:19] Tobsn: he's from south africa [02:19] saschagehlich: one million dollars! [02:19] Tobsn: and white [02:19] Tobsn: guess [02:19] Tobsn: ;) [02:19] saschagehlich: ACTION is out for a smoke now... relly. [02:19] saschagehlich: s/e/ea [02:19] meatmanek has left the channel [02:19] jamescarr: any idea why a callback for child.exec wouldn't get invoked? [02:19] jamescarr: in this case, I'm using child.exec to launch a web browser [02:20] Tobsn: jamescarr, so many reasons...... :) [02:20] gsmcwhirter: anyone have a recommendation for client-side templating? i want to use jade, but it seems the browser port is way out of date [02:20] jamescarr: :( [02:20] raz has left the channel [02:20] jamescarr: gsmcwhirter, haml.js? [02:21] jamescarr: what I want to know is who here is using the same template on the client and serverside for somethign? [02:21] Tobsn: tough http://www.hetzner.de/en/hosting/produkte_rootserver/eq10/ is really cheap... [02:21] eee_c has joined the channel [02:21] gsmcwhirter: jamescarr, i would if i could. some partials would be nice to re-use. haven't gotten around to it yet though [02:22] Tobsn: 5TB on 100mbit... with SSD drive for 125 bucks... i would just get 10 of them :D [02:22] gsmcwhirter: jamescarr, also, have a link to that? the first couple i pull up are server-side [02:23] jamescarr: gsmcwhirter, I assumed it worked client side too :( [02:23] jamescarr: if not, the best guess I can come with is mustache.js [02:23] gsmcwhirter: jamescarr, ah. it might. not sure how to handle the require stuff though [02:24] saschagehlich: Tobsn: get me 40 of that. 4000€ / month is too much [02:24] ooooPsss_ has joined the channel [02:24] Tobsn: whats your traffic a month? [02:24] saschagehlich: jamescarr: which callback is not getting invoked? [02:24] Tobsn: 10TB? [02:24] saschagehlich: Tobsn: haven't got any statistics about that yet. ovh is shit [02:24] saschagehlich: no, definitely much more [02:24] jamescarr: saschagehlich, lemme post a gist [02:25] Tobsn: 20? [02:25] saschagehlich: 30 maybe [02:25] Tobsn: k thats your outgoing traffic [02:25] saschagehlich: yep [02:25] Tobsn: how much storage for those static files? [02:25] saschagehlich: incoming even more [02:25] Tobsn: more? [02:25] jamescarr: https://gist.github.com/1e3f6cc2b24d46c0b6e8 [02:25] jamescarr: "got it" doesnt get called [02:25] Tobsn: well but the static files are only outgoing [02:26] saschagehlich: Tobsn: it's video conversion. in: 40mb hd mp4 file. out: 4 mb mp3 file [02:26] saschagehlich: only the static files? hm [02:26] jamescarr: also, the timeout doesnt kill... with process.exit() out though if I kill the node process chrome closes too (I want chrome to close) [02:26] saschagehlich: not that much, maybe about 2 tb [02:26] Tobsn: oh [02:26] Tobsn: ha [02:26] Tobsn: so its just dynamic traffic [02:26] Tobsn: thats not static [02:26] Tobsn: you just converting and sending it out again? [02:26] siculars_ has joined the channel [02:27] saschagehlich: yes [02:27] Tobsn: well thats a complete different problem [02:27] mtodd has joined the channel [02:27] Tobsn: does it matter if the user has to wait a second longer for his mp3 file? [02:27] saschagehlich: jamescarr: did you try it with another process? [02:27] saschagehlich: Tobsn: no, not really [02:28] Tobsn: well, softlayer.com, top right, "chat", and ask them about what they think. with softlayer you mostly get one of their admins to talk to you in the chat [02:28] tmpvar has joined the channel [02:29] saschagehlich: Tobsn: as I said, about 80 to 90% of my users are from germany....98% from europe [02:29] Tobsn: who cares [02:29] Tobsn: its a max 100ms delay [02:29] saschagehlich: do you have a softlayer server? [02:29] Tobsn: yep [02:29] Tobsn: plenty [02:29] jamescarr: saschagehlich, it works with non-daemon processes [02:29] Tobsn: you can host the "web" stuff in germany [02:29] Tobsn: and do the conversion big data stuff in usa [02:29] jamescarr: I mean, processes that dont "stay" [02:29] saschagehlich: could you send me a link of a file to check the download speed? [02:29] Tobsn: hmm k [02:30] saschagehlich: jamescarr: hmmm... dunno then [02:30] saschagehlich: maybe ask ryah [02:30] deepthawtz has joined the channel [02:32] jamescarr: sniff [02:32] jamescarr: I hope my dream doesn't die [02:33] saschagehlich: dreams never die when using node.js... [02:33] prettyrobots has joined the channel [02:33] jamescarr: I had a dream of using webworkers to spawn a server, spawn a broswer pointing to a page served by that server that runs tests on the client communicating the results via websocket.. [02:33] saschagehlich: jamescarr: did you try child_process.spawn? [02:34] jamescarr: then using webworkers to shut both down :) [02:34] jamescarr: Ah [02:34] bradleymeck has joined the channel [02:34] Tobsn: http://lulz.com/FreeBSD-8.1-BETA1-i386-bootonly.iso [02:34] jamescarr: HAHAHAHA [02:34] Tobsn: there ya go [02:34] jamescarr: yes but I made a mistake of leaving the callback in [02:34] jamescarr: spawn takes no callback [02:34] jamescarr: the bastard works :) [02:35] saschagehlich: Tobsn: 300 kb/s [02:35] saschagehlich: not that bad [02:35] Tobsn: its softlayer [02:35] jamescarr: oh man... I'm grabbing a cup of coffee and staying up all night till this spike is done [02:35] Tobsn: its the best hoster ever [02:35] jamescarr: I wanna see it work :) [02:35] Tobsn: and thats a server in dalls [02:35] mjr_: jamescarr: your plan seems fine, but why bother with webworkers? [02:35] Tobsn: you could get one in washington or new york [02:35] Tobsn: or miami [02:35] Tobsn: thats maybe faster [02:35] saschagehlich: hmmm [02:36] Tobsn: like i said, just chat with them [02:36] Tobsn: they're nice [02:36] bentruyman has joined the channel [02:36] saschagehlich: okay, will do that tomorrow [02:36] saschagehlich: 3:36 AM here... time to leave the office [02:36] saschagehlich: ;) [02:37] Tobsn: http://softlayer.com/network/peering/ [02:37] jamescarr: mjr_, serverside webworkers [02:37] Tobsn: ping those here: 206.126.115.22 198.32.160.27 198.32.124.221 [02:37] mjr_: Yeah, but why not just spawn a new child node? [02:38] bradleymeck has joined the channel [02:38] aldosarmiento has joined the channel [02:38] saschagehlich: hmm I'll have a look at that tomorrow [02:38] Tobsn: oh thats perfect for you [02:38] Tobsn: saschagehlich, http://lg.softlayer.com/ [02:38] saschagehlich: thanks for the tips :) [02:38] jamescarr: mjr_, I'm communicating data between them [02:38] Tobsn: its a speed test site from them [02:39] saschagehlich: wow that's cool [02:39] saschagehlich: full speed [02:39] Tobsn: i tell you, the admin interface is insanly good [02:39] mjr_: jamescarr: Oh, OK. That's a pretty good way to go then. [02:39] Tobsn: those guys are the best [02:39] Tobsn: since years [02:39] saschagehlich: okay, thanks :) [02:39] saschagehlich: cya guys [02:39] Tobsn: well there ya go - chose the DC that has the best ping/bandwidth [02:39] mjr_: Tobsn: I've been less than impressed with download speed from Softlayer in SEA to our office in SF. [02:39] Tobsn: n8 [02:39] Tobsn: seatle? [02:40] mjr_: We had some stuff at Software for a while, but it seemed like slow network. [02:40] Tobsn: i never had that experience [02:40] mjr_: Then we moved it to Amazon, and now it's fast network, but slow CPU. [02:40] Tobsn: yeah amazon is nothing for processing [02:40] Tobsn: with softlayer, what i found out, it matters where your traffic is and where the DC is your server is in [02:40] mjr_: It's really, embarassingly bad [02:41] Tobsn: for a bigger project we had once one in every of their main DCs and it was super fast [02:41] mjr_: I'm sure that matters for Amazon as well. [02:41] mjr_: I hope to try out Joyent soon. [02:41] mjr_: Maybe I'll give softlayer another go since you seem to pleased with them. [02:41] Tobsn: youre waiting on a coupon? [02:42] Tobsn: mjr, im very pleased... esp the service is incredible... just for once order a server with less HD space etc. than you actually need [02:42] Tobsn: and than upgrade it over the interface [02:42] Tobsn: takes 1-2 hours for them to rebuild your server with a RAID with no extra cost and no downtime [02:42] Tobsn: that was amazing. [02:42] jakehow has joined the channel [02:43] Tobsn: i still dont know how they do that [02:43] mjr_: I've got an instance to play with at Joyent, but our server software stack has a bunch of parts. [02:43] Tobsn: im still waiting for a coupon... kinda sucks [02:43] mjr_: And it wasn't that easy getting it all going on Solaris. [02:43] Tobsn: oh yeah i heard about that [02:43] Tobsn: its pretty awesome that they use solaris [02:44] Tobsn: i keep tell that to everyone who runs big sites that solaris scales way better than anything else [02:44] Tobsn: but its a pain in the ass thats for sure [02:44] mjr_: Yeah, I think it is ultimately a feature, but for me right now it is a bug as everything we do is on Linux. [02:44] mjr_: But I'm hopeful that it'll work out. [02:44] Tobsn: as long as you get your defaults running [02:44] mjr_: I'm getting really sick of giving Amazon so much money every month. [02:45] Tobsn: well... i guess its the comfort [02:45] Tobsn: every saw edgecast prices? ;) [02:45] meso_ has joined the channel [02:45] jchris has joined the channel [02:45] gwoo has joined the channel [02:46] Tobsn: btw. i always wondered if its cheaper to get tons of tiny vps's all over the network, all the static content cloned over every machine and load balanced over geo location per user... [02:47] jamescarr: hmmm... any ideas on how to stop a running express process? [02:47] Tobsn: but on the other side you can just pay for it and dont have to worry about it [02:47] Tobsn: jamescarr kill? [02:48] AAA_awright_ has joined the channel [02:48] jamescarr: I thought app might have a method [02:49] jamescarr: like stop() or something [02:49] jamescarr: sad panda [02:49] robotarmy has joined the channel [02:49] bradleymeck has joined the channel [02:51] Tobsn: githubs api is weird... sometimes there are two repos with the same name under the same user with different create times [02:54] jamescarr: app.close() claims it stopped, but the server is still running [02:54] jamescarr: BOO [02:54] deepthawtz has joined the channel [02:54] jamescarr: tjgillies, [02:54] jamescarr: wish tj was here [03:03] halfhalo has joined the channel [03:03] marshall_law has joined the channel [03:04] nodejs-log has joined the channel [03:08] jamescarr: oh man [03:09] jamescarr: this rocks [03:15] isaacs has joined the channel [03:16] bpot has joined the channel [03:16] noahcampbell has joined the channel [03:17] erlnoob has joined the channel [03:18] herbySk has joined the channel [03:20] Aria has joined the channel [03:21] Tim_Smart has joined the channel [03:22] galaxywatcher has joined the channel [03:24] eisd has joined the channel [03:25] tapwater has joined the channel [03:31] softdrink has joined the channel [03:31] brianc: what rocks? [03:33] dquestio1s has joined the channel [03:34] gwoo has joined the channel [03:36] bentruyman has left the channel [03:36] bentruyman has joined the channel [03:43] eisd has joined the channel [03:44] Me1000 has joined the channel [03:46] modular has joined the channel [03:52] Tim_Smart has joined the channel [03:53] isaacs has joined the channel [03:54] dquestio1s has joined the channel [03:54] isaacs: echosystm: npm help json ; npm help developers [03:54] mAritz: has someone here worked with backbone.js? i'm finding it hard to wrap my head around how to best built an app on this. any good articles out there? (besides the one from andyet.net which is kinda weird) [03:54] isaacs: inimino: dude, a crazy thing is happening. [03:55] megana: Hey isaacs! [03:55] isaacs: inimino: i switched from textmate to vim, and my code is starting to look more and more like yours [03:55] isaacs: hi, megana [03:56] inimino: isaacs ⋱ ha, it's crazy the way our tools can affect us :) [03:57] isaacs: definitely [03:57] megana: lol *takes inimino out of context* [03:57] tilgovi has joined the channel [03:57] inimino: ACTION feels suddenly decontextualized [03:57] megana: nice [03:57] isaacs: inimino: i think a lot of it is that i've been using a different color scheme, and because of switching to a new way of moving around, it's like every additional motion of the cursor feels extremely expensive. [03:58] isaacs: whitespace is just starting to seem less helpful [03:58] inimino: ah, yeah [03:58] megana: what's wrong with gedit??? [03:59] isaacs: plus i lost my really nice indentation thing from textmate, which makes it easier to just be lazy with spaces [03:59] inimino: yeah, when you have good syntax highlighting, whitespace starts to seem less attractive [03:59] marshall_law has joined the channel [03:59] inimino: heh [03:59] inimino: I've done most of my JavaScript in a text box in the browser, though. [03:59] inimino: I really miss vim. [03:59] isaacs: inimino: ew. [03:59] isaacs: why? [03:59] inimino: premature dogfooding. [03:59] isaacs: oh god [03:59] isaacs: no [04:00] megana: isn't textmate for mac? [04:00] isaacs: dude, don't enter the text editing business. [04:00] isaacs: megana: yeah [04:00] inimino: isaacs ⋱ too late :) [04:00] megana: is that the one with the leaf? [04:00] megana: or the one that makes you create projects for everything [04:00] megana: OMG day changed! [04:01] isaacs: megana: textmate is very extensible, non-modal, and has extremely good support for operating on folders and projects. [04:01] isaacs: megana: it's pretty lightweight, and actually quite nice. [04:01] isaacs: but, it crashes frickin CONstantly [04:01] isaacs: ; [04:01] inimino: isaacs ⋱ http://inimino.org/~inimino/blog/text_editor_requirements -- I don't think anybody else is building what I want. [04:01] megana: I found it frustrating that you have to have a project to work on folders... how do you feel about that? [04:01] inimino: I went off on a little detour into parser generators though :) [04:02] megana: does anybody else love notepad++ like I do? And at the same time hate them for making it only work on windows? [04:03] isaacs: megana: you don't have to have a project in textmate. just "mate ./some/folder" and it'll open in project-mode [04:04] isaacs: megana: "works only on windows" is a bit like saying "only works if you type with your feet while swimming" [04:04] megana: oh [04:04] megana: I know :P [04:04] megana: so... [04:04] megana: it's kind of useless [04:04] megana: but it has the best interface and syntax handling! [04:04] isaacs: megana: when i was on windows, i used SciTE [04:04] isaacs: scintilla text editor [04:04] isaacs: also works on gtk, i think [04:04] isaacs: but no mac [04:04] megana: no mac [04:04] isaacs: scite was really nice. extremely customizable. [04:05] megana: I like a text editor that does that thing where it highlights the other paranthesis / curly brace when you put the cursor near it [04:05] isaacs: inimino: ryah_ made a really good point about vim: "most of the time you're not actualy typing, you're moving text around. vim is good at that." [04:05] megana: and then auto-indents, and has syntax highlighting [04:05] inimino: isaacs ⋱ Yes, exactly. [04:06] isaacs: i'm not sure it's quite as comfortable for editing *prose* in markdown, though [04:06] inimino: vim is a powerful tool for moving chunks of text around. [04:06] isaacs: textmate is really nice for that. except when it crashes miserably [04:06] isaacs: or freezes up [04:06] Tobsn: megana, komodo. [04:06] megana: vim is only for terminal though [04:06] isaacs: megana: vim does that for me [04:06] inimino: isaacs ⋱ Try writing one sentence per line in Markdown. [04:06] megana: does it [04:06] isaacs: megana: and vim does have gui. check out macvim [04:07] isaacs: megana: yes! [04:07] megana: LoL I tried to image search that tobsn [04:07] isaacs: inimino: what's the benefit of that? [04:07] Tobsn: yeah good luck ;) [04:07] megana: it's a bunch of lizards ;D [04:07] inimino: isaacs ⋱ It makes editing easier. [04:07] isaacs: inimino: hm. [04:07] Tobsn: le me help you [04:07] Tobsn: again [04:07] Tobsn: http://tinyurl.com/2cpey8n [04:07] isaacs: inimino: i think i have vim set up to auto-wrap prosey things [04:07] jamescarr: hmmm [04:07] inimino: isaacs ⋱ It also makes it easier to scan for things in the text. [04:07] isaacs: inimino: markdown, commit messages, and plain text [04:09] jamescarr: whats a safe way to see if a global is available? [04:09] inimino: isaacs ⋱ Try turning it off and doing one line per sentence, I think you'll like it. [04:09] jamescarr: need a script to run standalone AND as a webworker [04:09] isaacs: jamescarr: if (typeof foo === "undefined") ... [04:09] megana: komodo looks like notepad++ :O [04:09] isaacs: jamescarr: or if (global.hasOwnProperty("foo")) [04:09] megana: does it have svn in it??? [04:09] inimino: isaacs ⋱ e.g. "ddp" to swap two sentences. [04:09] Tobsn: megana, im sure its on their website [04:09] megana: I thought you used it?? [04:09] Tobsn: i did [04:09] megana: oh [04:09] Tobsn: i still do [04:09] isaacs: inimino: yeah, that's kinda nice. but i don't find myself doing that *too* often. [04:09] Tobsn: btw. typeof is a function and undefined is a default variable? ... i cant memorize if its typeof() or typeof or "undefined" or undefined [04:09] isaacs: i edit prose a lot slower than editing code, i find. [04:09] isaacs: like, fewer motions, more thought out [04:09] inimino: isaacs ⋱ Basically you're giving up one of the semantically meaningful chunks when you auto-wrap lines, and in Markdown it's not necessary since only blank lines have any meaning. [04:10] isaacs: inimino: right, but i'm making it easier to *see* semantically meaningful chunks - paragraphs [04:10] megana: typeof bleh == "function" [04:10] inimino: Tobsn ⋱ typeof is an operator. [04:10] inimino: Tobsn ⋱ it returns a string [04:10] megana: what's up with === though [04:10] isaacs: megana: i just use === whenever i don't mean == [04:10] megana: so... !=? [04:10] Tobsn: lol [04:11] Tobsn: !== [04:11] isaacs: megana: that is, unless i actually *intend* type coercion for some reason [04:11] isaacs: like ==null to test for null or undefined [04:11] inimino: isaacs ⋱ I don't think it's easier to see, you still have blank lines between paragraphs either way. [04:11] megana: so what does === do? [04:11] isaacs: inimino: i know, but they don't look like blocks [04:11] Tobsn: type comp. [04:11] isaacs: megana: === is strict equality. [04:11] megana: and == isn't? [04:11] isaacs: v8> 0 == "0" [04:11] v8bot: isaacs: true [04:11] isaacs: v8> 0 === "0" [04:11] v8bot: isaacs: false [04:11] isaacs: megana: ^ [04:11] inimino: `=== [04:11] gbot2: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Operators/Comparison_Operators#Using_the_Equality_Operators [04:11] megana: oh [04:11] Tobsn: == doesnt test for the type [04:11] megana: so 0.0 !==== 0 [04:12] Tobsn: 8===> [04:13] megana: is there an ====? [04:13] inimino: no [04:13] jamescarr: thanks isaacs [04:13] inimino: he's gone [04:14] Tobsn: but there is a !=! [04:14] megana: oh ya? [04:14] Tobsn: means both are false [04:14] Tobsn: ;) [04:14] megana: :O [04:14] prettyrobots has joined the channel [04:14] megana: !====! means suspension bridge [04:14] jamescarr: goal post operator [04:14] Tobsn: -_- [04:14] jamescarr: like the ol' ufo operator, <=> [04:14] megana: lol [04:15] megana: what does ufo do? [04:15] inimino: it's a syntax error :) [04:15] megana: oh.. [04:16] jamescarr: in js it is [04:16] jamescarr: it exists in other langs [04:16] inimino: "unidentified foreign operator" [04:16] megana: so what do you guys think of ruby? [04:17] inimino: Are you learning it? [04:17] megana: just taking interest [04:18] Tobsn: a language made by someone who was bored for designers who cant code [04:18] inimino: It's similar to Python or Perl. [04:19] megana: why for designers? [04:19] Tobsn: so what do you guys think about that i build a thinkgeek annoytron in my coworkers tft [04:19] megana: tft? annoytron? [04:19] Tobsn: megana, because those were the first to use it for some reason [04:19] AAA_awright: !=! seems to be xor [04:20] megana: really? xor? [04:20] Tobsn: AAA_awright. that was a joke [04:20] megana: oh [04:20] inimino: It's not actually an operator, it's two. [04:20] inimino: != and ! [04:21] AAA_awright: Har har har har [04:21] jamescarr: fuck [04:21] AAA_awright: I completely failed to see that >_< [04:21] inimino: which is actually kind of the opposite of xor, but not only for Booleans. [04:21] jamescarr: too much wild hacking tonight [04:21] inimino: s/not only/only/ [04:21] Tobsn: lol... [04:21] AAA_awright: That's impressive, I'm going to have to use that and confuse people who read the code in the future [04:21] Tobsn: var != !var [04:22] Tobsn: true != !true [04:22] Tobsn: :) [04:22] megana: I kind of figured as much [04:22] inimino: js> true !=! true // true [04:22] gbot2: inimino: true [04:24] Tobsn: i wonder who bought a kinect today... [04:25] megana: what is kinect? [04:25] megana: I saw it in burgar king [04:26] megana: I thought it was burger king related [04:26] Tobsn: xbox thingy [04:26] Tobsn: http://www.xbox.com/en-US/kinect [04:26] Tobsn: hmm burgerking [04:26] megana: oh that stupid thing where it watches you move [04:27] Tobsn: last time i was at a burger king was 2008 [04:27] Tobsn: well it doesnt just watch you move [04:27] Tobsn: im just wondering who spends 160 bucks on it [04:27] megana: yeah... I regret going yesterday [04:27] Tobsn: thats as much as a new console itself [04:27] megana: it was like 7.5 for fries and a sandwich [04:27] megana: was there 10 minutes waiting [04:27] megana: and the food was garbage [04:28] stepheneb has joined the channel [04:28] megana: but I was hungry and wanted anything but pizza :P [04:28] megana: and it was right there along the walk home [04:28] megana: anyways... [04:28] megana: yeah [04:28] megana: I wonder if anyone will buy it too [04:28] megana: Microsoft can't seem to sell anything lately [04:28] Tobsn: http://www.xbox.com/en-US/Kinect/Launch [04:29] Tobsn: lol those videos are wmv files. [04:29] Tprice: ms sucks hands down [04:29] Tobsn: Tprice, well MS sucks but the xbox team is a different studio [04:29] Tobsn: they actually do a really good job with the xbox [04:29] megana: except for that thing where it breaks [04:29] Tobsn: needless to say they got bought in back in the day and have nothing to do with MS itself [04:30] Tobsn: guess thats the only way they can make good products [04:30] megana: that break [04:30] Tobsn: dont get them in touch with the MS nerds and all is good [04:30] megana: just saying [04:30] [[zz]] has joined the channel [04:30] megana: my ipad has no problems with red rings and melting gpu's playing games :P [04:31] robmason has joined the channel [04:31] megana: why is microsoft having so much trouble with that? [04:32] brianc: mmm...burger king [04:32] Tobsn: they dont [04:32] megana: no, not mmm brian :P [04:33] brianc: hah [04:33] Tobsn: i guess % wise there are more broken iphones than xboxes [04:33] megana: all that salt and grease will make you feel sick [04:33] ajsie has joined the channel [04:33] brianc: srsly it will [04:33] megana: broken xbox seems to be a sure thing, at least 75% chance. It seems to be a question of when not if [04:33] brianc: I don't eat the fast food [04:34] brianc: is like like like eating polution [04:34] ajsie: anyone knows what tool the author has used to build this page and the code sections? http://vowsjs.org/ [04:34] megana: yeah! [04:34] brianc: except without the 'captiain planet' part [04:34] megana: eat pollution [04:34] dohtem has joined the channel [04:34] dohtem has joined the channel [04:34] brianc: ajsie: no idea, was just wondering that the other day [04:34] megana: your body will thank you later by holding in all bodily waste [04:34] ajsie: looks nice .. i want those code boxes [04:34] brianc: ajsie: http://code.google.com/p/jsdoc-toolkit/ [04:35] brianc: so I was feeling way inspired by the open source awesomeness. if you think about it "twitter" was only possible because of open source. I wrote this song: http://static.brianc.me/pub/greeny.mp3 [04:35] Tobsn: 75%? [04:35] Tobsn: i have like 20 friends with an xbox and none of them ever broke [04:35] bartt has joined the channel [04:36] brianc: Tobsn: only 1 / 10 friends had a broken one. [04:37] Tobsn: failure rates,[2][3][4] with the latest estimate by warranty provider SquareTrade to be 23.7%[5], and the highest estimate being 54.2% by a Game Informer survey [04:37] Tobsn: there ya go [04:37] Tobsn: squaretrade is 23% [04:37] Tobsn: iphone has a failure rate of 26% [04:37] Tobsn: so more iphones break than xboxes [04:37] Tobsn: ;) [04:37] brianc: Tobsn: not enough iphones run Node.js! [04:38] ajsie: brianc: you are singing? [04:38] brianc: ajsie: I'm doing everything [04:38] Tobsn: http://brianericford.tumblr.com/post/731591456/failure-rate [04:38] ajsie: cool [04:38] Tobsn: lol theres an article about exactly that [04:38] Tobsn: xbox vs ipone [04:38] brianc: ajsie: <3 [04:38] Tobsn: lol. [04:38] ajsie: brianc: good song [04:39] brianc: ajsie: muchas gracias. it's still 'beta' ;) [04:39] ajsie: yeah im testing it out [04:40] Tobsn: brianc, i dont like that farting sound. [04:40] Tobsn: it overtones everything [04:40] marshall_law has joined the channel [04:40] brianc: Tobsn: yeah I got some shame-shames for that. I was experimenting w/ synth bass. [04:41] Tobsn: yeah its not good [04:41] Tobsn: http://www.thinkgeek.com/homeoffice/posters/e584/ [04:41] ajsie: brianc: ive got some feature requests [04:42] brianc: ajsie: let's have 'em [04:42] siedrix has joined the channel [04:42] ajsie: let me play with them with my mic.. i send it over sometime to you =) [04:42] brianc: ajsie: sweet. brian.m.carlson@gmail.com [04:42] ajsie: *saved* [04:43] jamescarr: killer [04:43] jamescarr: https://gist.github.com/663649 [04:43] brianc: if you have protools I can send you the session file if you'd rather [04:44] jamescarr: that snippet of code startups an express server that serves up jasmine specs and js sources, navigates a browser to it that causes the tests to run and be reported back via websockets... [04:44] jamescarr: then on test completion closes the browser and kills the server [04:44] brianc: jamescarr: NICE. is the full source available on the githubbb? [04:45] jamescarr: brianc, yes, doing some cleaning and doing a push soon [04:45] jamescarr: it's all been a spike so far tho [04:45] jamescarr: eventually I'll need to go back and put some proper tests around it :) [04:45] robmason_ has joined the channel [04:50] siedrix: hi, for websockets i use to do "require('ws')", but that doesn't work any more, did that change to net? [04:50] siedrix: or there are different things? [04:50] robmason_ has joined the channel [04:50] jamescarr: brianc, https://github.com/jamescarr/jasmine-tool [04:50] jamescarr: feel free to give it a whirl [04:51] jamescarr: "jasmine init" will create a basic jasmine dir setup with the example included on their site [04:51] jamescarr: (just make sure you run it in an empty dir) :) [04:51] brianc: siedrix: are you aware of socket.io? [04:52] brianc: jamescarr: sweet. will check it out tomorrow. energy level dropping fast tonight. [04:52] siedrix: yes, but thats external to node, right? [04:52] siedrix: does not change the hole ws to socket.oi? [04:52] jamescarr: siedrix, socket.io has a serverside component in node [04:53] AAA_awright has joined the channel [04:54] mikeal has joined the channel [04:56] siedrix: ok, i will use socket.io, thx [04:56] gerad has joined the channel [04:56] brianc: siedrix: yah socket.io is kinda the 'defacto' nowadays [04:56] brianc: I'm working on postgres client in node currently [04:56] gerad: ryah_: around? [04:57] javruben2 has joined the channel [04:58] jakehow has joined the channel [04:58] stagas_ has joined the channel [04:59] deepthawtz has joined the channel [04:59] hassox has joined the channel [05:00] iszak has joined the channel [05:00] masahiroh has joined the channel [05:00] iszak: How "stable" is the 3.0 branch? [05:01] Tobsn: do not use it [05:01] Tobsn: it will fry your harddrive [05:01] Tobsn: ;) [05:01] brianc: iszak: I haven't had any problems. [05:02] Tobsn: thats like asking how stable is office 2008 vs. office 207 [05:02] Tobsn: *2007 [05:02] Tobsn: :D [05:02] Tobsn: brb [05:02] jamescarr: hey, what's the module that creates colored terminal output? [05:02] jamescarr: I can look into vows to find out [05:02] brianc: I mean, if the first number after the "v" is a zero...probably not worlds most stable library, but we're Livin' on the edge *guitar solo* [05:02] JimBastard: jamescarr: colors [05:02] mikeal: i keep wanting to comment on list threads [05:03] mikeal: and then i realize i'm way too drunk [05:03] JimBastard: git@github.com:Marak/colors.js.git [05:03] JimBastard: https://github.com/marak/colors.js [05:03] brianc: mikeal: I am too. halp. [05:03] jamescarr: JimBastard, thanks [05:03] iszak: Is there anything I have to do to push the stream's write to the connection? [05:03] jamescarr: JimBastard, btw, you linked me to the admin panel for your site [05:03] Tprice: hey what would process.cwd() be for a module [05:03] jamescarr: but gave me no login :) [05:03] JimBastard: ahaha yeah [05:03] mikeal: brianc: haha [05:03] mikeal: so for serious [05:03] brianc: iszak: should go by itself, if "stream#write" returns false it means it wasn't written immediately [05:04] JimBastard: im testing it out right now some more [05:04] jamescarr: Tprice, cwd is the current working dir [05:04] Tprice: would it be the modules dir or the files the inports the module? [05:04] mikeal: can we talk about this headers thing [05:04] iszak: brianc, it returns true :/ [05:04] mikeal: is isaacs here? [05:04] jamescarr: oh man [05:04] iszak: the escape sequence \r\n is supported in JS right? [05:04] Tobsn: yep [05:04] brianc: iszak: yes. [05:05] mikeal: "\r\n" is just a string [05:05] jamescarr: am I a hypocrite? I wrote a framework to run jasmine tests and I didnt test drive it at all :S [05:05] Tobsn: only used in alert boxes :P [05:05] iszak: hmm, very peculiar. [05:05] jamescarr: it's hacking I guess I could say [05:05] mikeal: it's supported everywhere [05:05] brianc: iszak: can you gist the code with which you're having an issue? [05:05] mikeal has joined the channel [05:05] Tobsn: just keep in mind thats its mostly double quotes [05:05] Tobsn: :P [05:05] mjr_ has joined the channel [05:05] Tprice: any good forums for node? [05:05] Tobsn: whats a forum? [05:05] Tprice: where can i find more info about node? [05:06] Aria: Here, howtonode.org, lots of blogs out there. [05:06] mikeal: mjr_: you around? [05:06] mjr_: yo [05:06] mikeal: headers [05:06] mikeal: lets talk about it [05:06] mikeal: i'm drunk tho [05:06] Tobsn: stackoverflow.com, twitter, and blogs and the docu [05:06] brianc: Tprice: irc.freenode.net#node.js supposed to be alright [05:06] mikeal: so keep that in mind [05:06] mjr_: I love headers [05:06] mikeal: so [05:06] brianc: what kinda headers are we talkin? [05:06] Tobsn: yeah was thinking the same [05:06] mikeal: i think we should just make headers a special object [05:06] Tobsn: head from multiple females [05:06] Tprice: whats a good blog for info about node [05:06] Tobsn: ? [05:07] Tobsn: Tprice, he already told you [05:07] mjr_: I actually like that last "crazy idea" that isaacs suggested. [05:07] mikeal: and if you're doing things that requires multiple headers of the same name you use a special api [05:07] mjr_: It preserves order and even case. [05:07] brianc: Tprice: http://howtonode.org/ [05:07] strixv has joined the channel [05:07] strixv: Hey guys, having some trouble using connect-auth... I get it routing me to facebook, and then facebook authenticates me and goes to my callback address, passing in a "code" argument, but even the demo facebook app.js thinks I'm not authenticated [05:07] Tprice: like what would i use S_IRWXU for? [05:07] strixv: Am I missing a step? [05:07] Tprice: brianc> need more info then howtonode [05:07] mikeal: all arrays is SLOW [05:07] mtodd has joined the channel [05:08] Tobsn: strixv, stackoverflow, also they use tokens now and the examples from facebook itself are always broken [05:08] iszak: hmm. [05:08] Tobsn: Tprice [05:08] mjr_: mikeal: are you sure? I think ryah_ has a new http parser api that basically hands back an array of stuff in one big callback from C to JS. [05:08] Tobsn: wait i have the perfect link for you [05:08] mikeal: mjr_: the last suggestion was all arrays right? [05:08] strixv: Tobsn, thanks - nobody has a currently working example of using node + facebook auth though? [05:08] jamescarr: mikeal, sometimes I wonder if a index based hash is faster [05:09] jamescarr: mikeal, if you're doing numerical lookups it seems like it would be [05:09] mikeal: last time we benchmarked it, arrays were too slow [05:09] Tobsn: well maybe, i was looking for it like 3 month ago and there was nothing useful [05:09] mikeal: also [05:09] jamescarr: or not [05:09] mjr_: mikeal: yeah, to do one big array containing all the headers, and each element of the array is itself a two-element array: name, val. [05:09] Tobsn: Tprice, http://tinyurl.com/378q2pe [05:09] mikeal: if we write this code to pull out the memory allocations of strings [05:09] mikeal: it'll be an even bigger difference [05:10] mjr_: I don't remember the actual performance difference or where it was felt. [05:10] jamescarr: mikeal, what about simple objects? like var x = {0:'aaa', 1:'bbb'}; x[0] [05:10] mikeal: it was the hello world benchmark [05:10] mikeal: arrays just have more overhead than strings [05:10] mikeal: and we're too damn fast so you notice the difference [05:11] Tprice: Tobsn> thats no help [05:11] Tprice: your no help [05:11] Tprice: but thanks! [05:11] mikeal: i'd like to see a prototype object that has ways to deal with this [05:11] mikeal: and how it benchmarks [05:11] mikeal: cause prototype constructors get inlines [05:11] mikeal: er inlined [05:11] mikeal: i'm drunk, like i said [05:12] mikeal: but the other protoype methods for dealing with these cases should also get inlined [05:12] brianc: Tprice: http://ontwik.com/?s=node [05:12] iszak: PH [05:12] iszak: OH [05:13] mjr_: You know, if we just want to do better at hello world, we could just return the headers as one giant buffer by default. [05:13] mjr_: And not parse them at all. [05:13] Tobsn: im no help? [05:13] mjr_: Then if you want to parse headers, you can have your choice of different header parsing. [05:13] mikeal: if unmodified, yet [05:13] Tobsn: just google for it [05:13] mikeal: yes [05:13] mjr_: Lots of things don't need to look at the headers at all. [05:14] mikeal: that's an optimization that will rarely be used :) [05:14] mikeal: even with a proxy , you've gotta modify the host headers [05:14] jgautier_ has joined the channel [05:14] mikeal: but i agree that it should be htere [05:14] Aria: Ooo. Switchable parsers. Win! [05:14] mjr_: But yeah, most real work will involve a header set you can inspect and possibly modify [05:14] Tobsn: http://nodejs.se/ - http://howtonode.org/ - https://github.com/ry/node/wiki/modules [05:14] Tobsn: thats it. [05:14] jgautier_: anyone here used npm programmatically? [05:15] mikeal: if we just move the headers object to a real proto object, we can tackle all this shit indivually instread of treating every problem like all the problems we have [05:15] mjr_: mikeal: have you looked at the new http parser API? [05:15] mikeal: new api? [05:15] mjr_: I'm not sure if it has landed yet, but ryah_ was talking about it at your office [05:15] mikeal: i knew the streams were changing [05:15] mikeal: i was too busy running a fuckin meetup :) [05:15] mjr_: Basically the way the parser calls back into JS when it finds a header boundary [05:16] mikeal: speaking of [05:16] mikeal: i need ot send Joyent a bill [05:16] mjr_: Old way is to call back into JS for every new header name or header value. You set up a bunch of callbacks for those things, and C parser calls your JS code to build up headers however you like. [05:16] mjr_: But going back and forth between native and JS is more expensive than expected. [05:17] mikeal: that sounds really slow [05:17] Tobsn: joyent... do they ever send out those "coupon codes" [05:17] Tobsn: ? [05:17] mjr_: So the new way is to send back a single callback with all of the data available from the current read. [05:17] Tobsn: as long as i wait for that coupon code i couldve build my own cluster and run node in the cloud on solaris :P [05:17] mikeal: is there any reason we don't just hold it until the headres are finished? [05:18] Tprice: Tobsn: oh you mean GOOGLE it [05:18] mjr_: Tobsn: you could always pay Joyent a bunch of money for their regular hosting product. :) [05:18] Tprice: must have forgot [05:18] mjr_: mikeal: that's basically what the new way does [05:18] Aria: mikeal: Unbounded size ;-) [05:18] mikeal: Tobsn is a bot [05:18] mikeal: stop it [05:18] mjr_: mikeal: but it does it at the end of every read [05:18] Tobsn: mjr_, i want to see first what they duct-taped together [05:19] mjr_: Tobsn: oh, OK. Well it's pretty simple if you have a time machine. Just go back and enter node knockout. Then you'd have one right now and could go log in. [05:19] mikeal: for reliabiltiy, every read is good [05:19] Tobsn: *@! [05:19] mikeal: for performance, end of headers is great [05:19] Aria: Every read seems a good trade-off. [05:19] mjr_: For most requests, it'll get all of the headers in either 1 or 2 reads, probably 1. [05:19] Aria: ~most requests fit in a single packet, so... [05:19] mikeal: CAP is everywhere :) [05:20] Tobsn: well if i wouldve know that they gave out free accounts [05:20] Tobsn: i wouldve entered... [05:20] mikeal: if the browser doesnt' get all the headers in one read it crashes most of the time :) [05:20] robmason_ has joined the channel [05:20] mjr_: Tobsn: yeah, but thank god you still have that time machine. [05:20] Tobsn: mikeal, just look how others do it [05:20] Tobsn: lighttpd v2 is in dev right now [05:20] Tobsn: nginx probably has some sort of technique... [05:21] mikeal: who the fuck put this bot in here [05:21] mikeal: where do they life [05:21] Tobsn: bot? [05:21] tmpvar has joined the channel [05:21] mikeal: how do i punch them [05:21] mjr_: mikeal: you need internet face-stabbing tecnology. [05:21] Aria: Tobsn: lighttpd and nginx feed data into Javascript? [05:21] mjr_: It's new. [05:21] Tobsn: lol [05:21] mikeal: it's retarded [05:22] mikeal: it's worse than the bot in #couchdb and that is saying something [05:22] Tobsn: jesus, whatever... as far as i remember last time i got ryah in the lighttpd channel that helped a lot... [05:22] mikeal: Tobias|: fuck off [05:22] mikeal: whooops [05:22] Tobsn: ... [05:22] mikeal: Tobsn: fuck off [05:22] inimino: bot? [05:22] Tobsn: idk, hes drunk [05:22] twoism has joined the channel [05:23] mikeal: if Tobsn isn't a bot [05:23] Tobsn: drunk and talking about headers [05:23] inimino: heh [05:23] mikeal: then my whole world is blown [05:23] Tobsn: not the headers he could receive from girls [05:23] Tobsn: the headers in his code. [05:23] brianc: ACTION laughing [05:23] Tobsn: why would i be bot? [05:23] Tim_Smart: mikeal: Your world is blown I think. [05:23] Tobsn: *a [05:23] inimino: Pretty perceptive for a bot. [05:23] strixv: So nobody has connect-auth experience in here? I'm looking at the facebook.js code and it *seems* like it should be pulling this code response out of the returned URL. Man I wish I could sleep ;) [05:23] mikeal: i never wanted ops in this channel until right now [05:23] Tobsn: lol. [05:23] Tobsn: youre a kid [05:23] Tobsn: go drink some more ;) [05:23] Tobsn: i will [05:23] Tobsn: brb [05:24] mikeal: hold on [05:24] mikeal: you aren't a bot [05:24] mikeal: you actually rambled all that random shit [05:24] mikeal: without a script? [05:24] Tobsn: i say "now" when you get funny - so keep trying ;) [05:25] mikeal: whatever [05:25] Tobsn: hehe [05:25] mikeal: mjr_: really tho [05:25] mikeal: we should figure this out [05:25] pkrumins has joined the channel [05:25] pkrumins: sup manbrodudes [05:25] mikeal: cause we've been talking about it for like 6 months [05:25] mjr_: mikeal: I know, sad. [05:25] pkrumins: hackers and founders at yelp was so awesome [05:25] pkrumins: we got so much feedback on browserling [05:25] mjr_: I think we should wait until the new http parser API is in place [05:25] brianc: strixv: I haven't had much experience with connect-auth but what experience I've had with facebook, they change their api every other day it seems. connect-auth might just be out of date w/ their facebook integration. [05:25] pkrumins: it totally boosted our confidence that we'll succeed [05:25] mjr_: Because I'll bet it changes things. [05:26] mikeal: agreed [05:26] strixv: brianc: thanks, that's what Tobsn said too. Damn it [05:26] Aria: emit('error', 'ENEEDMORERUM') [05:26] mikeal: when is that landing? [05:26] mikeal: cause I want this stuff to be in 0.4 [05:26] inimino: EREDRUM [05:27] mikeal: and i have a feeling new http is going to land right before 0.3 turns in to 0.4 [05:27] mjr_: mikeal: I dunno. I do know that there are a lot of big changes in progress for 0.3. [05:27] mikeal: is someone working on EventSource? [05:27] mjr_: new HTTP, which will lead to better SSL. writev, eventsource, etc. [05:27] tmpvar: bah, yui3-core (60mb) simply will not install with npm [05:27] mikeal: cause i got another complaint about that today [05:27] tmpvar: or link for that matter [05:27] jamescarr: hmmm [05:27] tmpvar: can someone sanity check me? ive tried on 3 machines now [05:27] mjr_: I think he's also got the http parser doing a mandatory pause now. [05:28] tmpvar: npm install yui3-core [05:28] mikeal: as soon as pquerna started hacking on http i stopped caring, because i just trust that it will end up awesome :) [05:28] brianc: tmpvar: installed fine for me [05:29] mjr_: mikeal: yeah, pquerna needs to save us from a world with no SSL. He's our only hope. [05:29] mjr_: Apparently. [05:29] tmpvar: brianc, did you run it just now? [05:29] mikeal: totally :) [05:29] brianc: tmpvar: yes, just a moment ago [05:29] tmpvar: wow. must be my machine(s) [05:30] tmpvar: symlink time! [05:31] jamescarr: hmmm [05:31] jamescarr: anyway to kill ciricular references when using JSON.stringify? [05:31] mjr_: tmpvar: when I install yui3-core, npm sort of hangs. [05:32] tmpvar: mjr_, likewise, on osx ubuntu 10.4 and ubuntu 10.10 [05:32] mjr_: On this line: npm info preinstall yui3-core@2010.11.03 [05:32] mjr_: ? [05:32] tmpvar: 9.04? eh.. i forget [05:32] tmpvar: yep [05:32] mjr_: I'm on OSX [05:32] tmpvar: ive let that sit there for hours [05:32] mjr_: it's clearly not doing anything [05:32] tmpvar: yeah. quite unfortunately [05:32] mjr_: stuck waiting for something that'll never come [05:33] tmpvar: linking also fails [05:34] mjr_: The Frogurt is also cursed. [05:36] tmpvar: i did make the jump from sudo npm to ~/local npm.. perhaps that has something to do with it [05:37] mikeal: mjr_: you around this month? [05:37] mjr_: Yeah, for the next couple of weeks. Then I'm going back to the midwest for thanksgiving. [05:37] mjr_: In order to give thanks, like the pilgrims did. [05:37] mikeal: that whole wek? [05:37] mikeal: er week? [05:38] mjr_: And by that, I mean like Scott Pilgrim did. [05:38] mikeal: i need to plan the next oak.js [05:38] mjr_: Lemme check. [05:38] AAA_awright_ has joined the channel [05:39] SubStack has joined the channel [05:40] strixv: Fucking got it! connect-auth has current facebook integration, outdated fucking docs [05:40] mjr_: strixv: nice fucking work [05:41] mjr_: mikeal: waiting on reply from my wife who is also our family travel director, as well as her own person. [05:42] mikeal: hehe [05:42] strixv: It would be really awesome if connect-auth, with its hardcoded facebook callback URL, didn't start its config options with fb_callback = "" as if you could actually choose whatever you want [05:42] mikeal: what date is thanksgiving? [05:42] mjr_: mikeal: how many people came to the first oak.js? [05:42] mikeal: i capped rsvp [05:43] mikeal: but like 40 [05:43] mikeal: out of the 50 that rsvp's [05:43] mikeal: er rsvp'd [05:43] mjr_: nice. How was the vibe in the room? [05:43] mikeal: we can hold more tho [05:43] mjr_: Clueful? Fun? [05:43] mikeal: oh, it was a good time [05:43] jgautier_: anyone used this ajax.org stuff? [05:44] mjr_: I'm bummed that I missed it, but our trip to Hawaii was pretty epic. [05:44] mikeal: hawaii > oakland [05:44] mikeal: :) [05:44] mikeal: maybe the 17th? [05:44] path[l] has joined the channel [05:45] mjr_: That's probably fine with me. I'll let you know soon for sure. [05:46] mikeal: cool [05:47] mikeal: i want to have a node.js panel [05:51] mjr_: mikeal: Confirmed that Nov 17 is good for me. I'm looking forward to a node panel, whatever that means. [05:52] bartt has joined the channel [05:52] mikeal: hehe [05:52] mikeal: i'll try to work this out tomorrw [05:53] mikeal: mjr_: you wanna stop by tomorrow for open friday [05:53] admc has joined the channel [05:53] mjr_: I'll try to make it. We are right in the middle of our first node deployment, so I might not be able to get away tomorrow. [05:54] mikeal: afternoon? [05:54] mjr_: Finally going to run some real user traffic through a whole bunch of node code. [05:54] mikeal: i might not head in until later [05:55] mjr_: Yeah, I'll shoot for afternoon, and I'll know by lunchtime if that's going to work. [05:55] mikeal: you have like a whole QA dep [05:55] mikeal: haven't they tested this shit :) [05:55] mjr_: Yeah well, having n of something is amazingly more complicated than having 1 of that same thing. [05:55] modular: what's the best way to get node running as a service? [05:56] modular: i'm using it as a web server [05:56] modular: ubuntu 10 [05:56] mjr_: modular: I use upstart on ubuntu. [05:56] mikeal: cool [05:57] modular: mjr_: thanks [06:04] fangel has joined the channel [06:06] saikat has joined the channel [06:10] erlnoob has joined the channel [06:12] strixv: I get this *all the time* in node and can never figure out why: "Cannot set property 'version' of undefined" [06:12] strixv: (when trying to require some lib) [06:22] peutetre has joined the channel [06:26] Tprice: i keep getting "Terminated" with no error [06:26] Tprice: how do i get it to give me errors? [06:27] JimBastard: strixv: which lib? [06:28] JimBastard: Tprice: are you listening for error [06:28] strixv: Jimbastard: Right now express/connect, but I have that issue all the time. I am trying to use /support/specific_lib_versions in my code, but most of the libs just use like require('connect') anyway [06:28] strixv: It's impossible to keep all the versions, apis, etc of all the libs straight [06:28] JimBastard: i try to use npm for that [06:29] kixxauth has joined the channel [06:30] strixv: Yeah but I like to be able to take a snapshot of stuff as it's working [06:30] Tprice: JimBastard: no im not most of the time it just kills node and gives me an error [06:30] strixv: Like let's say I build a system, it works with node ver x, connect ver y, etc... [06:31] strixv: Well I don't want to, 3 months later, break the whole system when I use npm to update my version of node & connect [06:31] sudoer has joined the channel [06:31] strixv: And the APIs change so quickly, that's what would happen [06:31] strixv: Nothing built six months ago works anymore [06:32] JimBastard: strixv: you could make a package.json with your locked in requirements [06:32] langworthy has joined the channel [06:33] strixv: JimBastard: is that a feature of npm? Or something else? [06:33] JimBastard: we deploy apps based on package.json manifests [06:33] JimBastard: strixv: a little of both [06:33] JimBastard: i think npm download does it [06:33] JimBastard: not sure if its made it into the main branch [06:33] strixv: Ok that sounds like just what I need [06:33] strixv: "npm download?" [06:33] JimBastard: id check the man [06:33] strixv: hah npm is broken on my system anyway, I have an old version that will neither uninstall nor do anything [06:34] JimBastard: lol [06:34] JimBastard: that doesnt sound right, you can always remove it [06:34] JimBastard: tj has some thing for doing distros [06:34] JimBastard: that might help [06:35] JimBastard: you can always just vendor everything too [06:35] strixv: Any links/names? [06:35] strixv: (vendor everything?) [06:35] JimBastard: nDistro [06:35] strixv: Sorry mate, you're talking a bit over my head [06:35] strixv: I'm new to node [06:35] JimBastard: https://github.com/isaacs/npm/issues/issue/74/#comment_515111 [06:35] Aria: to "vendor" something is to copy it in verbatim and distribute with it. [06:35] bartt: If all I receive is a file descriptor, can I read the entire file into a buffer? [06:35] JimBastard: npm download is in the works [06:36] strixv: Aria, thanks, that's what I've been doing [06:36] strixv: The problem comes when the "vendored" libs have their own libs [06:36] strixv: For example, express uses connect [06:36] strixv: And instead of using the "vendor" version of connect, it just goes with require('connect') [06:36] bartt: Using fs.read(fd, buffer, offset, length, position, callback) perhaps? [06:36] pkrumins has joined the channel [06:36] pkrumins has joined the channel [06:37] bartt: Though I don't know the size/length of the file as I only have fd [06:38] danielrmz has joined the channel [06:39] hoodoos: well, read it until it returns 0 length [06:39] hoodoos: bartt, ^^^ [06:40] bartt: Using process.nextTick() hoodoos? [06:41] bartt: Keep checking the number of bytes read that the callback function receives? [06:41] Tprice: hey can someone give a hand http://pastebin.com/EujQmvtZ this creates aserver and wehn someone connect it should stream the file but i get "Terminated" in node [06:41] hoodoos: bartt, you mean how to call fs.read periodicly? [06:41] Tprice: is it that i need a buffer? [06:42] bartt: hoodoos: Not necessarily. My aim is to read the entire file, then do something with its contents. [06:42] Tprice: or should i not use fs.readFile? [06:42] hoodoos: bartt, just do like function readFile(){ fs.read(..., function(err, data){ if( data.length > 0 ){ ... readFile(); } else { // it ends here }});} [06:43] hoodoos: maybe there's a better way, since this way you have to control buffer and position yourself or anything else :) [06:44] bartt: hoodoos: but readFile() takes a file name, not a file descriptor. [06:44] hoodoos: bartt, readFile is just a function I imagined, call it whatever you want, it has fs.read inside [06:44] bartt: IC [06:45] hoodoos: JimBastard, is there any better way to read file by FD? [06:45] JimBastard: ? [06:45] Tprice: or should i use fs.ReadStream? [06:45] hoodoos: bartt's question about reading file having fd only [06:45] JimBastard: im not sure [06:45] bartt: Still, the callback in fs.read receives err, bytesRead [06:46] hoodoos: bartt, yes you need to keep track of possition for current fd [06:46] hoodoos: there should be a better way, but I can't find it in API.. [06:47] bartt: Now you know why I'm bringing it up here, hoodoos [06:47] bartt: :) [06:47] hoodoos: bartt, well, it doesn't sound really complex to me [06:47] hoodoos: just create some readFileByFd prototype and use it to read files :) [06:47] bartt: I didn't say that. Figured there might be an easier way. [06:48] hoodoos: can't you pass fd to readFile? [06:48] hoodoos: i mean have you tried? [06:50] hoodoos: bartt, how to get descriptor of file so I can test it? :)) [06:51] bartt: hoodoos: I haven't tried, but the API indicates file name only. [06:51] hoodoos: bartt, so how to get a descriptor? :) [06:51] bartt: To get a FD use fs.open [06:51] SamuraiJack has joined the channel [06:52] bartt: fs,open(path, flags, callback) [06:52] bartt: e.g. fs.open('/etc/passwd', 'r', function(err, fd){}) [06:52] hoodoos: hmm, bartt then you should have path to call open, no? why say that you have only descriptor?:) [06:53] bartt: hoodoos: I'm working on a module and was wondering if it would make sense to support both path AND fd. If I do, then the module would could receive the fd. [06:54] bartt: So it might be moot and not support a fd. [06:57] hoodoos: bartt, well, it doesn't work with fd.. so I guess you need to implement it yourself with read [06:57] bartt: yup [06:58] Tprice: createReadStream has an addListener right? [07:00] Tprice: so i can listen for 'data'? [07:00] hoodoos: Tprice, sure [07:00] hoodoos: Tprice, and listen for end [07:00] AAA_awright_ has joined the channel [07:00] hoodoos: and for anything else available in Stream :) [07:05] bartt has joined the channel [07:06] Tprice: hoodoos: this is what im trying to do http://pastebin.com/64etJqDy [07:06] stoneg has joined the channel [07:06] ph^ has joined the channel [07:07] Tprice: how should the res.write be like [07:08] hoodoos: Tprice, looks find to me, but end doesn't return chunk [07:08] hoodoos: it's just end [07:08] hoodoos: should just call response.end() there [07:09] Utkarsh has joined the channel [07:10] hoodoos: Tprice, works great for me :) [07:12] Tprice: you get a stream from the server? [07:12] Tprice: give me a sec [07:12] hoodoos: yes, tried with 50 megabytes file, steams well [07:12] hoodoos: *streams [07:14] Tprice: really im sorry what does your code look like [07:14] Tprice: for me all i get is node dies and give me this "Terminated" [07:14] hoodoos: http://pastebin.com/BdGWcwSL [07:16] Tprice: you know i think it might be the mime type [07:16] Tprice: i took out {'Content-Type':'video/mp4'} from my code [07:16] Tprice: and now the server does not crash [07:18] hoodoos: hmm [07:18] hoodoos: Tprice, really strange thing.. [07:18] aldosarmiento has joined the channel [07:19] hoodoos: Tprice, doesn't crash for me, but I don't have any mp4 file to test :) [07:20] hoodoos: it hits end event of stream with no failure.. [07:24] hoodoos: Tprice, i just tried with some avi file it even shows me video in SMPlayer.. cool! :) [07:24] Tprice: well just got this "FATAL ERROR: Committing semi space failed. Allocation failed - process out of memory" [07:24] Tprice: createReadStream read the hole file into memory? [07:25] hoodoos: shouldn't really, but I noticed memory's high usage too.. [07:26] nsolsen has joined the channel [07:27] pkrumins: hey anyone knows a good, free screen recording software for mac? [07:27] fjakobs has joined the channel [07:28] Tprice: {rss: 103952384, vsize: 129343488, heapTotal: 102762848, heapUsed: 85551828} [07:28] dgathright has joined the channel [07:28] Tprice: heapUsed just gets bigger and bigger [07:28] hoodoos: yes.. [07:28] hoodoos: player plays slower then you read :) [07:28] Br|ce has joined the channel [07:28] hoodoos: and stream got to keep it somewhere when you do respose.write [07:28] Br|ce: hi [07:29] Aria: Should pause the stream when write returns false writing to the player. [07:29] hoodoos: I dunno, just a clue [07:29] Aria: What sys.pump does. [07:29] Aria: Then when the player write drains, resume it. [07:29] Aria: Assuming the player has enough buffer, and you don't have to make contortions. [07:30] hoodoos: Aria, pause when write to http response returns false? [07:30] Aria: Yeah. [07:30] janm has joined the channel [07:30] Aria: Whatever stream you have outgoing. [07:30] hoodoos: okay [07:30] hoodoos: let me do it :) [07:30] Aria: (or just pump from one to the other if you can) [07:32] hoodoos: awesome! :) works really nice [07:33] hoodoos: Tprice, look at that http://pastebin.com/LyuV1DNZ [07:33] hoodoos: Tprice, Aria doesn't eat memory at all [07:34] Aria: nice. [07:38] Blink7 has joined the channel [07:39] Tprice: hoodoos: that works for you [07:39] Tprice: i font get the files steamed to the browser [07:39] hoodoos: hmm.. haven't tried with browser.. [07:40] hoodoos: it doesn't work with browser.. [07:40] hoodoos: Tprice, I guess you need to read more about streaming video to browser in common, since this solution works for mplayer great [07:43] garrensmith has joined the channel [07:43] teemow has joined the channel [07:46] Tprice: hoodoos: thanks you have been a great help [07:46] margle has joined the channel [07:46] bartt: hoodoos: 3 ways of reading a file's contents starting with just a FD: https://gist.github.com/663787 [07:46] Tprice: i think it has something to do with the mime type [07:46] mikew3c has joined the channel [07:47] bartt: /cc ashleydev ^^^ [07:48] hoodoos: bartt, well, sure, anyways it's all custom implementations and there's no such option in node api yet [07:48] stephank has joined the channel [07:49] jamescarr: so here's a preview: http://www.vimeo.com/16527665 [07:49] jamescarr: and yep, that's showing the results of specs for client side javascript, not serverside :) [07:50] hoodoos: bartt, second variant with loop.. wouldn't it just spam event queue and why do you call process.nextTick when fs.read is async already so it will allow tasks to run? [07:51] altamic has joined the channel [07:53] bartt: ah, good point. I doesn't add much. [07:54] bartt: ACTION updated https://gist.github.com/663787 [07:54] MikhX has joined the channel [07:54] tyfighter has joined the channel [07:55] krizsa has joined the channel [07:55] The_Surfer has joined the channel [07:58] ThePub has joined the channel [07:59] kawaz_air has joined the channel [08:03] MikhX has joined the channel [08:04] mraleph has joined the channel [08:04] simme has joined the channel [08:06] loxs has joined the channel [08:06] loxs: hi Astro, you around? [08:08] hellp has joined the channel [08:10] mif86 has joined the channel [08:12] hassox has joined the channel [08:12] yeevgen has joined the channel [08:13] brianmario has joined the channel [08:14] d0k has joined the channel [08:15] hassox_ has joined the channel [08:32] jetienne has joined the channel [08:32] markwubben has joined the channel [08:36] meatmanek has joined the channel [08:38] rikarends_ has joined the channel [08:39] Anti-X has joined the channel [08:44] tekky has joined the channel [08:45] iszak: When I write to stdout is there any way to preserve the already entered stdin? [08:46] rikarends has joined the channel [08:47] rikarends_ has joined the channel [08:48] virtuo has joined the channel [08:49] dtrasbo has joined the channel [08:49] dtrasbo has joined the channel [08:50] Druid_ has joined the channel [08:50] adambeynon has joined the channel [08:58] jankoprowski has joined the channel [09:00] javruben has joined the channel [09:00] tek has joined the channel [09:04] geronimo_ has joined the channel [09:07] jetienne: anybody using expressjs on a daily basis ? does it work well ? is it well maintained/documented ? [09:08] fbits has joined the channel [09:08] Anti-X: it's quite common [09:08] Tprice: hey on a on a http server whats the first event when someone connects? [09:09] Tprice: im getting "You have to call writeHead() before write()" [09:09] indutny has joined the channel [09:09] Anti-X: you need to output http headers before you write anything else [09:09] indutny: hi everyone! [09:10] indutny: (my github name:donnerjack13589) [09:10] jetienne: Tprice: there is a connect event from memory [09:10] Anti-X: what's that got to do with writing headers first? [09:10] Anti-X: the error says it all [09:11] Anti-X: in any case, setting them in different events is totally not the right way to do it [09:12] margle has joined the channel [09:12] Anti-X: events are not callbacks. you cannot guarantee that they will happen. [09:12] hsuh has joined the channel [09:12] jetienne: http://nodejs.org/api.html#event-connection-160 my bad the event is 'connection' [09:12] themiddleman has joined the channel [09:13] Tprice: well i do have writeHead before write [09:13] Tprice: take a look http://pastebin.com/3KLJf7Ai [09:14] Tprice: to catch the request should i use response.addListener('request', function(){} or http.addListener('connect', function(){ [09:14] Tprice: } [09:14] loxs has joined the channel [09:16] krizsa: Hi, anyone knows why is there no callback parameter for 'net.createConnection' ? I mean if the connection happens instantly I might miss the 'connect' event on the client socket before I could set up a listener for it... or am I missing something here? [09:17] garrensmith: jetienne: I'm using express. documentation is good and well maintained. Definitely worth using [09:17] jetienne: garrensmith: ok thanks [09:18] loxs: how can I sys.puts a whole object? [09:18] indutny: krizsa: you won't miss connection [09:18] indutny: all conenction process will go asynchronously [09:21] hassox_: hullo peeps [09:21] sixtus42 has joined the channel [09:21] ddollar has joined the channel [09:21] rikarends has joined the channel [09:21] Tprice: some using fs.statSync would be the wrong function to use? [09:21] jetienne: loxs: dont remember. but console.dir(yourobj) would do it [09:22] Anti-X: Tprice, that code is weird [09:22] Anti-X: i think you may have misunderstood what async means [09:23] Anti-X: and secondly, you're using a very old tutorial for whatever it is you're doing [09:24] dgathright has joined the channel [09:25] mytrile has joined the channel [09:25] Tprice: not using a tutorial just kind of doing it as i go along [09:25] Anti-X: http://pastebin.com/5PqpP7LX [09:25] Anti-X: this may give you some clues [09:25] rikarends has joined the channel [09:25] krizsa: indutny: What I don't see is why can I be sure that between var s = net.createConnection; and s.on("connect", cb); lines the event wont be emitted, hence lost... I believe you that is working I just would like to know how [09:26] benburkert has joined the channel [09:29] jfd1 has joined the channel [09:29] q_no has joined the channel [09:29] Tprice: Anti-X: i think the problem is line 13 var stats = fs.statSync(file); [09:29] Anti-X: no [09:29] tj has joined the channel [09:29] Anti-X: that's not a problem [09:29] garrensmith: loxs: console.dir(yourObj, true) will give a detailed output [09:30] JohnDav has joined the channel [09:30] Anti-X: jetienne, the expressjs author just walked in the door. you can ask him. [09:30] Anti-X: (tj) [09:30] tj: jetienne: whats up? [09:31] Tprice: but i have response.writeHead(200,head); before var test = fs.createReadStream('/home/torrents/test.mp4'); [09:31] Anti-X: and? [09:31] dquestions: j #iphonedev [09:31] Tim_Smart has joined the channel [09:31] Tprice: and it only does the response.write after createReadStream( [09:32] Anti-X: and? [09:32] Anti-X: put the writeHead after that too [09:32] jetienne: tj: nothing special :) just wanted to get a fell from user. trying to decide if it is a sensible choise for a new project. so asking people with field experiences [09:32] tj: ah gotcha [09:33] Anti-X: you were asking about whether it was well maintained [09:33] tj: it certainly is. many startups (including ours obviously) use it, so it wont be going anywhere [09:36] Tprice: might help if i upload to the right dir [09:36] Tprice: damn [09:36] jetienne: tj: ok [09:36] faust45 has joined the channel [09:41] caolanm has joined the channel [09:41] spetrea_ has joined the channel [09:41] TomsB__ has joined the channel [09:42] loxs: thanks, garrensmith [09:43] ruxkor has joined the channel [09:44] echox has joined the channel [09:44] ruxkor: wow, nice! so many people : ) [09:44] echox: hi there [09:44] Anti-X: y helo thar [09:44] xla has joined the channel [09:45] ruxkor: how do you guys organize a bigger project? are there any best-practices? [09:45] echox: node.js doesn't require any more then python? is this correct? [09:45] ruxkor: to build afaik yes [09:45] echox: I try to ./configure it on a fresh box [09:45] echox: and got the following build error [09:46] echox: ...../tools/wafadmin/Scripting.py line 146 except Utils.WafError, e: syntax error: invalid syntax [09:46] spetrea has joined the channel [09:46] jetienne: echox: which os are you running [09:46] echox: (message slightly edited beacause of the lack of copy and paste) [09:46] echox: its a fresh arch linux install [09:47] masm has joined the channel [09:47] echox: maybe something really basic is missing [09:47] echox: but I have no clue what this could be [09:47] ruxkor: python --version ? [09:47] echox: 3.1.2 [09:47] garrensmith: ruxkor: what do you mean by best practices? [09:48] ruxkor: hm afaik you need 2.X [09:48] echox: ooh ok [09:48] ruxkor: garrensmith: id like to split my server.js into several smaller chunks [09:48] ruxkor: but with the commonjs require() thing [09:48] ruxkor: how can i let my "chunks" interact? [09:49] ruxkor: (I started using node TODAY so maybe question is a bit basic) [09:49] Tprice: Anti-X: thanks for the help you where great! [09:49] ruxkor: I mean you have the exports object that your modules (aka chunks) have [09:50] garrensmith_ has joined the channel [09:50] echox: ruxkor: thanks, that works :-) [09:50] ruxkor: : ) [09:50] garrensmith_ has joined the channel [09:51] garrensmith: man my internet connection sucks, keeps dropping [09:51] path[l] has joined the channel [09:52] xla has joined the channel [09:52] ruxkor: ah yes and one other thing... how come ##.createServer(.......).listen.apply(null,MY_ARRAY) doesnt work? anybody ever tried something similar? [09:54] zemanel has joined the channel [09:55] Tprice: on the createReadStream function what does the object "fd" for? [09:55] Tprice: how do you cound the bytes been streamed? [09:55] mikedeboer has joined the channel [09:56] Tprice: count** [09:57] sixtus42: ruxkor: very likely the function is relying on "this" to be correct and you assign it to null. Do you grasp, what the first parameter of .apply() does? [09:57] StanAngeloff has joined the channel [09:58] ruxkor: yes.. how stupid.. setting to null sets the global object... [09:58] ruxkor: thx sixtus42 [09:59] ruxkor: : ( [09:59] ruxkor: : ) [10:00] Anti-X: :]-/-< [10:00] Anti-X: :]-\-< [10:00] Anti-X: :]-<-< [10:00] Anti-X: :]->-< [10:00] hoodoos: :]-8-< [10:00] sixtus42: ruxkor: that's not the global object, that's "this" [10:00] indutny: :8 [10:01] sideshowcoder has joined the channel [10:01] ruxkor: yes, by applying null you set the "this" inside the function you are applying the apply to to the global object, at least afaik [10:01] tj: sixtus42: "this" defaults to the global object, I think that is just what he means [10:01] tj: ruxkor: yup [10:02] tj: I believe they plan to change that actually [10:02] tj: but I dont know the details [10:02] robotarmy has joined the channel [10:02] zomgbie has joined the channel [10:02] zomgbie_ has joined the channel [10:02] tj: cant remember what it was going to be, just undefined or something [10:04] Anti-X: oh? [10:04] Anti-X: i find it very useful that null refers this to the global object [10:05] Anti-X: window/process (i presume) [10:05] sixtus42: global [10:05] Anti-X: window/global [10:05] Anti-X: sorry [10:05] sixtus42: no prob. I just think the global object is a stupid thing to begin with [10:05] sixtus42: but I didn't even know that .apply(null) will default to the global object [10:06] sixtus42: mostly because the node-repl has a very broken global object [10:06] Anti-X: maybe on the server side it's a bad idea, but in the browser, the window object is sort of necessary to contain everything [10:06] tj: I often see people do .apply(something || global, ...) but just .apply(something, ...) will do [10:06] sixtus42: and in the world of modules, there is more than one global object [10:07] indutny: sixtus42: so sad about it [10:07] sixtus42: indutny: no actually, that's a feature [10:07] Anti-X: speaking of which, why isn't process the global object? [10:07] Anti-X: that would make more sense to me [10:07] indutny: sixtus42: It gives you many abilities, and takes much too [10:08] sixtus42: indutny: running untrusted code without messing with global is very hard [10:08] mraleph has joined the channel [10:09] sixtus42: I like the Script object :-) [10:11] indutny: :) [10:11] indutny: sixtus42: running untrusted code on server-side is very risky at all [10:11] indutny: sixtus42: suppose that it must be running in a different context [10:12] ThePub has joined the channel [10:12] sixtus42: indutny: yes, you have to spawn a 2nd event loop (i.e. node process) and then you still need to rewire the global object [10:12] hoodoos: v8: Date.parse('2010-10-31T14:09:43.686Z'); [10:12] v8bot: hoodoos: 1288534183686 [10:12] hoodoos: v8: new Date('2010-10-31T14:09:43.686Z'); [10:12] v8bot: hoodoos: "Sun Oct 31 2010 10:09:43 GMT-0400 (EDT)" [10:13] Ori_P has joined the channel [10:13] sixtus42: tempted to ask v8 for "while(true) {}" just to illustrate the point of needing a 2nd event loop [10:14] sixtus42: v8: require [10:14] v8bot: sixtus42: ReferenceError: require is not defined [10:14] sixtus42: a v8 has a scoped global object :-) [10:14] stride: the bot? it imposes a timelimit I believe [10:14] indutny: v8: 1 +1 [10:14] v8bot: indutny: 2 [10:15] indutny: v8: eval('123'); [10:15] v8bot: indutny: 123 [10:15] indutny: v8: eval('(function(a, x){with(a) {return x;}})({x:1}, 2);'); [10:15] v8bot: indutny: 1 [10:15] indutny: v8: eval('(function(a, x){with(a) {return x;}})({}, 2);'); [10:15] v8bot: indutny: 2 [10:16] indutny: v8: while(1){} [10:16] indutny: hah [10:16] v8bot: indutny: Error: Timeout [10:16] indutny: ouch! [10:16] sixtus42: indutny: someone did their homework [10:17] indutny: v8: (function(){arguments.callee();})(); [10:17] v8bot: indutny: RangeError: Maximum call stack size exceeded [10:17] garrensmith: anyone deployed a nodejs server to the free aws instance? [10:17] indutny: v8: (function(){var a = new Array(10000);arguments.callee();})(); [10:17] v8bot: indutny: [10:17] indutny: ouch [10:17] indutny: v8: (function(){var a = new Array(100000);arguments.callee();})(); [10:17] v8bot: indutny: RangeError: Maximum call stack size exceeded [10:17] indutny: v8: (function(){var a = new Array(10000);arguments.callee();})(); [10:17] v8bot: indutny: [10:18] indutny: v8: fs [10:18] v8bot: indutny: ReferenceError: fs is not defined [10:18] stride: the bot works in querys as well btw.. ;) [10:18] tj: neat trick to implement __stack https://gist.github.com/663919 [10:19] Tprice: is there a way to count the bytes sent in a http request? [10:20] mraleph: why everybody tries to break the bot... [10:22] Lorentz: mraleph: Why not. [10:22] garrensmith: does safari work with socket.io, it keeps crashing on me [10:22] sixtus42: mraleph: it's just a security audit to show what do think of when running untrusted code [10:23] sixtus42: tj: neat indeed [10:23] tj: sixtus42: you can implement __line cleanly with that [10:23] tj: well "cleanly" for js at least [10:23] mraleph: Lorentz: well do it private chat with bot. it's not the first time I see people trying to break bot with infinite loops or stackoverflows [10:24] theBigZ has joined the channel [10:24] Lorentz: mraleph: Do you see me doing it in channel? [10:24] broquaint has joined the channel [10:25] mraleph: there is at least one simple way to break the bot I know of --- but nobody tries it... at least I've never seen them trying [10:25] indutny: v8: throw 1 [10:25] v8bot: indutny: undefined: undefined [10:25] mraleph: Lorentz: I was talking in general not about you, sorry. [10:25] indutny: v8: var a = new Array(10000); a = a.join('12314515556'); [10:25] v8bot: indutny: "123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123 [Output truncated...] [10:25] sixtus42: tj: ___line ? [10:25] indutny: v8: var a = new Array(1E6); a = a.join('12314515556'); [10:25] Tprice: ok i got this object "bufferSize: 65536" on a createReadStream [10:25] v8bot: indutny: "123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123145155561231451555612314515556123 [Output truncated...] [10:26] indutny: v8: var a = new Array(1E9); a = a.join('12314515556'); [10:26] Tprice: could i use that to count the bits sent? [10:26] v8bot: indutny: [10:26] tj: sixtus42: to get the lineno [10:26] tj: in the file [10:26] indutny: v8: var b = new Array(1E3); b = b.join('123'); var a = new Array(1E9); a = a.join(b); [10:26] tj: complimenting __dirname etc [10:26] v8bot: indutny: [10:26] sixtus42: tj: ah, you mean when reporting an error? [10:26] tj: no [10:27] tj: lots of languages have macros such as __LINE__ etc [10:27] indutny: v8: var a = 'v8: 123'; [10:27] v8bot: indutny: undefined [10:27] indutny: v8: 'v8: 123'; [10:27] v8bot: indutny: "v8: 123" [10:27] indutny: v8: ;// [10:27] v8bot: indutny: undefined [10:27] indutny: v8: // [10:27] v8bot: indutny: undefined [10:27] indutny: v8: /* [10:27] v8bot: indutny: SyntaxError: Unexpected token ILLEGAL [10:27] indutny: v8: break; [10:27] v8bot: indutny: SyntaxError: Illegal break statement [10:27] indutny: v8: return [10:27] v8bot: indutny: SyntaxError: Illegal return statement [10:27] indutny: v8: return 123; [10:27] v8bot: indutny: SyntaxError: Illegal return statement [10:27] jacobolus has joined the channel [10:28] sixtus42: tj: ah, I just don't see a use case for that at the moment… [10:28] sixtus42: indutny: ok, stop it [10:28] tj: there isnt one really, but it is neat to play with. __stack would be more useful IMO. the line macro was only really helpful in ruby since you could pass it to eval [10:29] tj: but with __stack you can access the functions, so it could actually be pretty powerful [10:29] benburkert has joined the channel [10:30] tj: fuck arguments.callee haha, now you can grab whatever you want [10:30] spetrea: anyone know about grep ? [10:30] spetrea: I need to use it with more than one pattern [10:30] spetrea: and \| is not helpful [10:31] spetrea: so I need something that will let me include,exclude at the same time [10:31] sixtus42: tj: Would be interesting to see if you can escape a Script.runInNewContext with that [10:31] margle has joined the channel [10:31] Anti-X has joined the channel [10:32] mikedeboer has joined the channel [10:33] Eber has joined the channel [10:35] jvolkman has joined the channel [10:37] tj: sixtus42: probably not no [10:37] sixtus42: tj: I would consider it to be a major security hole, but I haven't tried it either [10:37] StanAngeloff has joined the channel [10:38] stride: spetrea: lazy approach for single line search (don't know the regexp-way): grep "include" foo.txt | grep -v "exclude" [10:41] Anti-X has joined the channel [10:41] path[l] has joined the channel [10:41] spetrea: stride: only problem is I loose coloring for matches when the second grep is included [10:42] spetrea: lose or loose .. [10:42] path[l]2 has joined the channel [10:49] fermion has joined the channel [10:54] StanAngeloff_ has joined the channel [10:55] MattJ has joined the channel [10:56] garrensmith: does process.memoryUsage() include the memory usage of child processes? [11:00] stride: they have their own process id and virtual file stuff in /proc, right? so presumably not [11:01] Anti-X: test it and find out [11:01] Anti-X: and let us know [11:01] pkrumins has joined the channel [11:01] stride: wouldn't make sense imho [11:02] Anti-X: chrome is pretty eager to create new processes all the time so i would imagine V8 only measures memory usage of this one single process [11:04] stride: the v8 measures are only two of the values in the return there iirc, the other two are platform specific implementations, on linux stuff parsed out of /proc/<pid>/stat which would only be the original process [11:07] Tprice: is there another way other then the chunked way to stream file over the http server? [11:09] Doosje has joined the channel [11:09] Doosje: hi [11:10] faust45 has joined the channel [11:10] dtrasbo has joined the channel [11:13] javruben has joined the channel [11:14] javruben has left the channel [11:14] garrensmith: cool will take a look and see [11:14] zorzar_ has joined the channel [11:15] geronimo_ has joined the channel [11:15] Anti-X: Tprice, i think you'll find that is the definition of streaming [11:15] Anti-X: chunked [11:16] Anti-X: anyways why is it bad? [11:16] Anti-X: it should work for everything [11:17] zorzar_ has joined the channel [11:17] Doosje has joined the channel [11:17] Anti-X: sure, you get unknown estimates for when the download is complete, but other than that there's no real issue with it. [11:18] Tprice: im having issues with streaming an mp4 [11:18] Tprice: im looking at the header from a stream off apache [11:18] Tprice: and trying to get my header the same [11:18] Tprice: from node [11:19] Anti-X: you need to set Content-Length to the exact size of the file if you don't want to stream [11:19] Anti-X: and transfer-encoding to something other than chunked [11:19] Tprice: im getting the size from statSync [11:20] Tprice: look header from apache [11:20] Tprice: Connection:Keep-Alive [11:20] Tprice: Date:Fri, 05 Nov 2010 10:59:50 GMT [11:20] Tprice: ETag:"234c3cc-48485fa-493f28e9f0ec0" [11:20] Tprice: Keep-Alive:timeout=15, max=100 [11:20] Tprice: Server:Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_scgi/1.12 [11:20] Anti-X: none of those have anything to do with your stream [11:20] Tprice: any nodes header [11:20] Tprice: Accept-Ranges:bytes [11:20] Tprice: Connection:Keep-Alive [11:20] Tprice: Content-Length:75793914 [11:20] Tprice: Content-Type:video/mp4 [11:20] Tprice: ETag:234c3cc-48485fa-493f28e9f0ec0 [11:20] Tprice: Keep-Alive:timeout=15, max=100 [11:20] Tprice: Last-Modified:Sun Oct 31 2010 19:04:51 GMT-0500 (CDT) [11:20] Tprice: Transfer-Encoding:chunked [11:20] Tprice: wow [11:20] Tprice: sorry [11:20] Anti-X: none of those have anything to do with your stream [11:21] Anti-X: only content-length and transfer-encoding [11:21] Anti-X: so are you saying that apache isn't even outputting content-type? [11:21] Tprice: well from what i see no its not [11:22] Anti-X: could be that it doesn't have .mp4 in its config file though [11:22] Anti-X: i had to add .ogg to it recently [11:22] Tprice: well over apache it stream just fine [11:22] Tprice: but through node im getting nothing [11:23] Anti-X: well drop content length [11:23] Anti-X: you don't need that when it's chunked [11:23] Anti-X: could be that whatever is reading it is waiting for it to complete [11:23] Anti-X: since it has content-length [11:24] Anti-X: and since it's chunked, the content length is wrong, because chunked transfer adds some length data to each chunk [11:24] Anti-X: http is a PITA.. because in some cases it's lenient, and in other it's totally hitler [11:25] stride: ACTION throws soap over tcp at Anti-X  [11:25] Anti-X: soap! [11:25] stride: :> [11:25] Anti-X: i showered this morning [11:25] Anti-X: but thanks anyways [11:26] Tprice: no that didnt work [11:26] aliem has joined the channel [11:26] Tprice: i just dont under stand it [11:26] Tprice: really it should work [11:26] Anti-X: you removed content-length? [11:26] Tprice: yeah [11:26] Anti-X: gimme the link to your code again [11:26] stride: you might want to try dropping Accept-Ranges as well [11:27] stride: (if your streaming client uses them and your server doesn't interpret range queries that is) [11:27] Anti-X: node is chunked by default, so anything you do that offsets chunked you need to also change transfer-encoding, or it may cause a hickup for some users on bitchy browsers [11:27] Tprice: http://pastebin.com/fm0BfUER [11:28] Tprice: i remove all but Transfer-Encoding and Content-Type [11:28] Tprice: still the same [11:28] Anti-X: you really only "need" content-type [11:28] Anti-X: of all those headers of yours [11:29] stride: addListener.. haven't seen that one in a while :) [11:29] Anti-X: yeah didn't i tell you to change to .on? [11:30] Anti-X: and update your node installation [11:30] Tprice: yeah you did [11:30] Anti-X: you look like you're on 0.1 or something [11:30] Anti-X: it's at 0.3 [11:30] Tprice: freash install maybe a few days ago [11:31] Tprice: 0.2 something [11:31] Tprice: 0.2.4 i think [11:31] Anti-X: .addListener isn't even mentioned in the docs [11:31] Anti-X: use .on [11:32] Tprice: ok changed that [11:33] mr_daniel has joined the channel [11:35] Tprice: and i really dont think its the test.mp4 [11:35] Anti-X: well i see your problem [11:36] Anti-X: aside from ugly code [11:36] agnat has joined the channel [11:36] Anti-X: you're opening a readStream without a specified encoding [11:36] Anti-X: and sending it as 'binary' [11:36] Anti-X: opening without encoding means 'utf8' [11:36] Anti-X: i think [11:36] Anti-X: or at least buffer [11:36] Tprice: i have that test.setEncoding('binary'); [11:36] Anti-X: both which aren't binary [11:37] Tprice: line 32 [11:37] Tprice: or should it eb var test = fs.createReadStream(file,'binary'); [11:38] Anti-X: no [11:38] Anti-X: remove setEncoding line [11:39] Anti-X: and remove binary from write [11:39] Anti-X: i think [11:39] Anti-X: that should use buffer instead [11:39] Anti-X: binary is deprecated [11:39] Doosje: Does anyone know to to send and read hex bytes from the stream? (or has an example somewhere) [11:39] herbySk has joined the channel [11:40] Doosje: (it's a tcp connection btw ) [11:42] rnewson has joined the channel [11:43] Tprice: if i take out binary and then try yo wget the file from a nother server it start download then just stops [11:43] Tprice: 0kbs [11:43] Tprice: its really slow [11:46] Anti-X: try this: http://pastebin.com/xxzuaMEX [11:47] Tprice: wow you cut that down [11:47] Tprice: give me a sec [11:47] ruxkor: if I have a http connection, and the connection is open (eg for long polling), is there a way i can guarantee the connection is still open while sending the next message? the close emitter apparently doesnt work on http connections.. [11:48] Anti-X: Tprice, you may need to keep the 'end' on the test, and send response.end() there [11:48] Doosje: ruxkor: what did you use for detecting the conn. ends? [11:48] Anti-X: i haven't used sys.pump before so i don't know how it acts [11:48] nsolsen has joined the channel [11:48] Anti-X: try it first without [11:49] Doosje: ruxkor: i use this http://pastie.textmate.org/private/a2xrutwygfql7jqxslnniq [11:49] ruxkor: doosje: i dont have any clue actually. i thought that i "react" on a closing connection (eg storing the messages somewhere else) but since the close is not emitted.. [11:49] ruxkor: ah! [11:49] ruxkor: ok thx let me try this : ) [11:49] Tprice: with or with out it does not work [11:50] Tprice: with i get this { 'Content-Type': 'video/mp4' } terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped) [11:50] Anti-X: hah [11:51] unomi has joined the channel [11:51] Tprice: but i get 6 { 'Content-Type': 'video/mp4' } for one page load [11:51] Anti-X: wot [11:52] Nohryb has joined the channel [11:52] Anti-X: it's not that those were requests that were queued while you restarted? [11:52] ruxkor: doosje: no it doesnt work.. maybe because its an http request (I figure it works when using some other protocol?) [11:52] Anti-X: because that has happened to me before.. i send a request, server crashes, i restart, and all the requests flood in [11:53] Tprice: ah dont think so only get a console.log when i try to load the page [11:53] Doosje: ruxkor: i thought you were trying to detect a disconnect on a websocket [11:53] Tprice: this should wotk [11:53] Tprice: i just dont understand [11:54] Anti-X: does the file exist? [11:54] Anti-X: obviously it does or you'd have an error [11:54] Anti-X: nvm [11:56] ruxkor: doosje: no, thats the whole point.. its a "standard" http connection.. at least i think? I am trying to send messages to clients (web browsers) and I'd like to make sure these messages actually arrive (meaning there was no client timeout or maybe user closed browser window and so on) [11:56] Anti-X: ah, Tprice, the test.pause() should be && test.pause() [11:56] Anti-X: i think [11:56] Anti-X: not 11 [11:56] Anti-X: || [11:57] Anti-X: because true means it's clogged, so only then should it pause [11:57] Anti-X: false means it should keep going [11:59] Anti-X: true and false on the write i mean [11:59] Doosje: ruxkor: idk then, sorry [11:59] ruxkor: ok nvm thx anyways : ) [11:59] Tprice: the file exist [12:00] Tprice: what do you mean by && test.pause() [12:00] Anti-X: never mind [12:00] Anti-X: it was a version that i never pasted [12:00] Anti-X: :p [12:02] saschagehlich has joined the channel [12:03] Anti-X: Tprice, the apache file won't load either [12:04] Anti-X: http://pastebin.com/NfY6v5Qm [12:04] Anti-X: try this then [12:04] Anti-X: nvm line 8 [12:04] Anti-X: that was my local test [12:04] willwhite has joined the channel [12:05] phiggins has joined the channel [12:06] Doosje: Does anyone know to to send and read hex bytes from a tcp stream? (or has an example somewhere) [12:08] tj: Doosje: bitwise operators are your friend [12:09] agnat has joined the channel [12:09] ctp has joined the channel [12:10] Doosje: tj, can you help me start up ? let me paste what i got [12:12] Doosje: tj, here's what i got http://pastie.textmate.org/private/u0jepbeurdoajemzulqqcq [12:13] Doosje: but i need to send 14 bytes back to the person who connected [12:13] omarkj has joined the channel [12:13] Doosje: and catch the bytes they send back [12:21] saschagehlich: any of the socket.io devs here? [12:22] derencius has joined the channel [12:24] saschagehlich: how can I get the remote address of a socket.io client? [12:24] Doosje: saschagehlich socket.remoteAddress ? [12:28] Tprice: hello [12:29] StM| has joined the channel [12:33] Utkarsh has joined the channel [12:34] stephank: Doosje: I'm not sure what you're trying to do. Are you trying to send 14 random bytes, or a string of 14 characters containing hexadecimals? [12:35] stephank: Doosje: right now, you're assigning strings to Buffer indices, but you can just assign byte values. (It's comparable to PixelData in canvas, or ArrayData in WebGL) [12:36] Doosje: stephank: i want to send 14 random bytes to a client [12:36] eee_c has joined the channel [12:36] Doosje: the cleint responds and i need to catch that [12:36] Doosje: (in hex) [12:37] stephank: Doosje: okay, just get rid of `d2h` on line 17, and add a listener for the 'data' event [12:37] Doosje: k [12:39] stephank: Doosje: it's a bit tricky, the data event gets a Buffer of the data, but it could contain less or more than 14 bytes. That's TCP unfortunately, it's a continuous stream. [12:39] Doosje: so -> socket.on("data", function (data) { puts(data); }); //data shou;ld contain the bytes now? and how can i convert them into hex ? [12:40] stephank: Doosje: I guess you can use `d2h` for that, and iterate the buffer. `var i, length = data.length, result = ""; for (i = 0; i < length; i++) { result += d2h(data[i]); } puts(result);` [12:41] Doosje: thanks, let me try! [12:46] hsuh has joined the channel [12:48] Ari-Ugwu has joined the channel [12:49] johngbrooks has joined the channel [12:55] ysynopsis has joined the channel [12:56] hoodow has joined the channel [12:57] shadow_walker has joined the channel [13:00] jvolkman has joined the channel [13:00] femtoo has joined the channel [13:01] dnolen has joined the channel [13:01] shadow_walker has joined the channel [13:03] brianmario has joined the channel [13:04] stepheneb has joined the channel [13:06] hellp has joined the channel [13:09] derencius_ has joined the channel [13:11] xla has joined the channel [13:15] hellp has joined the channel [13:15] fangel has joined the channel [13:18] Utkarsh has joined the channel [13:20] davidsklar has joined the channel [13:21] StM_ has joined the channel [13:22] romainhuet has joined the channel [13:25] heavysixer has joined the channel [13:26] fangel has joined the channel [13:29] jetienne: npm ERR! Error: EACCES, Permission denied '/usr/local/bin/express@1.0.0rc4' [13:30] jetienne: npm ERR! sudon't! Running npm as root is not recommended! [13:30] jetienne: npm ERR! sudon't! Seriously, don't do this! [13:30] jetienne: some inconsistencies with permissions, no ? [13:30] bradleymeck has joined the channel [13:36] cyraxx: man, socket.io not correctly closing connections from firefox clients really is a problem [13:36] cyraxx: right now, i have 650 CLOSE_WAIT connections from one single client [13:36] willwhite has joined the channel [13:38] Aikar: best way for 2 node processes to communicate to each other over sockets -- ie not a child process like web workers (2 diff servers potentially) ? [13:38] robotarmy has joined the channel [13:40] agnat: Aikar: check out DNode: http://substack.net/posts/85e1bd/DNode-Asynchronous-Remote-Method-Invocation-for-Node-js-and-the-Browser [13:40] miccolis has joined the channel [13:40] jherdman has joined the channel [13:41] mtodd has joined the channel [13:42] mtodd_ has joined the channel [13:43] johngbrooks has joined the channel [13:44] Aikar: interesting [13:44] Aikar: that is useful to me thanks, but i was looking for something to pass clean json messages [13:45] bradleymeck: just send them over a socket, add a newline at the end of each message to have a delimeter [13:46] Aikar: so socket.io? [13:46] bradleymeck: that is probably overkill [13:46] Aikar: ohg i was hoping something would handle all the messaging parts [13:46] bradleymeck: you are just sending strings though? [13:46] Aikar: something like webworker but w/o the child process [13:46] Aikar: i wanna be able to do remoteServer.postMessage({cmd: 'foo', data: 'bar'}); [13:47] bradleymeck: so jsonrpc? [13:47] Aikar: and the other server receive it function(data) { console.log(data.cmd, data.data); } [13:47] bradleymeck: in that case just JSON.stringify and JSON.parse stuff over a socket [13:48] bradleymeck: no real point in that being a module [13:48] Aikar: yeah but then dont i have to handle chunked sends? [13:48] jetienne: var app = module.parent.exports; <- original use of module.* [13:48] Aikar: like half the json message being sent on a packet [13:48] bradleymeck: aikar, split it on newlines [13:48] bradleymeck: so if you dont have a newline, dont parse [13:48] bradleymeck: just add to a buffer [13:48] ooooPsss has joined the channel [13:50] StM has joined the channel [13:50] matt_c has joined the channel [13:51] shripadk has joined the channel [13:52] saschagehlich: did anyone ever try to communicate with a socket.io server in objective-c? [13:55] bradleymeck: saschagehlich, if you have a websocket system in objective c you can just use that [13:55] saschagehlich: how would I connect to the server then? with a ws:// url? [13:56] jtsnow has joined the channel [13:56] saschagehlich: socket.io.js is doing strange things with base.options.resource and a session id [13:56] bradleymeck: yes if you have a websocket protocol implementation [13:56] stride: saschagehlich: why don't you just use a tcp socket for that? [13:57] saschagehlich: stride: I already have a http server and socket.io stuff in there. don't want to create another socket. [13:57] eee_c has joined the channel [13:58] stride: saschagehlich: in that case: http://github.com/esad/zimt (don't know about that but it came up high on stackoverflow) [13:59] stride: although that seems a bit dated [13:59] shadow_w_ has joined the channel [14:00] saschagehlich: hmm okay, ty so far [14:00] stride: hm, yeah a guy on SO states that it doesn't work on iOS4 [14:01] eee_c1 has joined the channel [14:03] podman has joined the channel [14:06] tj has joined the channel [14:08] herbySk has joined the channel [14:09] stagas: is there a way to change Number setter to always use .toFixed(2) for example? [14:09] tj: Number setter? [14:09] saschagehlich: stride: well should not be a problem to code a ws integration for ios [14:10] stagas: or something [14:12] jetienne: stagas: like decimal in sql ? [14:12] deepthawtz has joined the channel [14:13] aheckmann has joined the channel [14:13] marshall_law has joined the channel [14:14] stagas: jetienne: I want perhaps a new object that inherits from Number that will always use toFixed(2) when getting without me typing it in in 1000 places [14:14] faust45 has joined the channel [14:15] jetienne: stagas: you wanna change the display ? or the storage? [14:15] stagas: jetienne: the display perhaps, don't mind about the storage [14:15] jetienne: stagas: i never tried it, but maybe .toString is overloadable [14:16] jetienne: if so, you may plug your .2 in htere? [14:16] tj: :s [14:16] Aikar: hmm [14:16] tj: dont do that... [14:16] tj: thats what arrays / functions are for :p [14:16] Aikar: i tried to install some old module through npm that failed (base64) [14:16] tj: displaying repetitive things [14:16] Aikar: now my npm is broke [14:16] sixtus421 has joined the channel [14:17] Aikar: nvm changing cwd seems to fix it [14:17] Aikar: var cwd = process.cwd(); Error: No such file or directory <odd [14:18] robotarmy has joined the channel [14:19] sixtus42 has joined the channel [14:19] adambeynon: whats the best/advised way to determine if my code is running in node or in narwhal? [14:19] Tprice: Allocation failed - process out of memory [14:19] Tprice: oh that sucks [14:20] Akufen has joined the channel [14:20] Akufen has joined the channel [14:20] eee_c has joined the channel [14:21] podman has joined the channel [14:22] podman has left the channel [14:23] derencius_ has joined the channel [14:23] eee_c has joined the channel [14:27] oal has joined the channel [14:28] danielrmz has joined the channel [14:28] Nohryb has joined the channel [14:29] bentruyman has joined the channel [14:30] Gruni has joined the channel [14:30] derencius_ has joined the channel [14:33] Aikar: how can i read data from stdin so i can type data into stdin and let the process read it? [14:34] Tprice: stdin.write() [14:34] stride: you can utils.pump it from your process's stdin to the stdin of your child process I believe [14:35] Aikar: nono i want to node script.js then type into the console window to send data to it (ie commands or testing stuff) [14:35] davidascher has joined the channel [14:35] AAA_awright: http://nodejs.org/api.html#process-openstdin-59 ? [14:35] Aikar: ty thats what i was looking for [14:35] softdrink has joined the channel [14:35] bradleymeck has joined the channel [14:36] pquerna: RFE: on call stack exceded, print the last 20 calls in the stack :( [14:36] LuigiMontanez has joined the channel [14:36] Gruni has joined the channel [14:37] bentruyman has left the channel [14:38] Utkarsh has joined the channel [14:39] bentruyman has joined the channel [14:40] aaron_____ has joined the channel [14:40] aaron_____: any expressjs ninjas in here today? [14:40] fjakobs: is there a known issue with the debugger for node on linux [14:40] stagas: almost got it. it's not great but better than .toFixed(2) all the time: https://gist.github.com/664231 [14:41] fjakobs: the cloud9 debugger works great on osx and cygwin but fails on linux [14:42] tj: aaron_____: whats up? [14:42] fjakobs: compiling master at the moment [14:42] tj: aaron_____: having an issue? [14:42] aaron_____: tj: hey tj; curious how I can register a mime type against a file extension so when staticProvider serves up the file, it's aware of the right content-type [14:42] aaron_____: tj: possible? [14:43] benburkert has joined the channel [14:43] tj: aaron_____: require('connect').utils.mime.types is the object containing the mime type mappings [14:43] tj: no formal api for adding more ATM [14:43] aaron_____: but I can just sorta stuff it in? [14:44] aaron_____: that works fine for me [14:44] tj: aaron_____: yup, just do connect.utils.mime.types['.foo'] = 'bar/baz' [14:44] aaron_____: awesome, thank you [14:44] aaron_____: that's the magic I needed :) [14:44] tj: would probably be nice to clean that up lol either at the connect or express level [14:45] brianc: tj: I vote express level. Rack's got the mime-type listing in the ruby world. [14:46] brianc: brianc: your vote counts for nothing [14:46] tj: brianc: connect is more like rack [14:46] Aikar: https://gist.github.com/664238 < whats up with this? im using websocket-client and websocket-server off NPM, the client successfully sees "Got Message: Connection: <ID>", and when i type into STDIN i see "got stdin: test" but the server sees nothing and the client receives nothing from server [14:46] tj: it is all there, it just doesnt have a nice interface for adding additional maps [14:46] matheeeny has joined the channel [14:47] danielrmz has joined the channel [14:48] ceej has joined the channel [14:48] danoyoung has joined the channel [14:49] brianc: tj: yah. Rack relies on appending directly to the dictionary of mime types as well [14:49] daniellindsley has joined the channel [14:49] danoyoung has left the channel [14:49] tj: brianc: is it as ugly as connect.utils.mime.types ? [14:49] tj: I dont remember [14:49] tj: been a while now [14:49] tj: I could easily add app.mime('.foo', 'asdfadfasdfasdf') [14:49] liar has joined the channel [14:49] brianc: Rack::Mime::MIME_TYPES[".sexy" => "application/brianc"] [14:50] wattz: morning [14:50] jamund has joined the channel [14:50] wattz: anyone here recommend a good js/node minifier for js and/or css? [14:50] brianc: err i think that arrow operator isn't the right one [14:50] wattz: all i see so far is uglifyJS [14:50] sth: Why would you minify node code? [14:50] brianc: Rack::Mime::MIME_TYPES[".boom"] = "application/x-ohno!" [14:50] tj: yeah [14:50] wattz: sth: note for node code [14:51] wattz: for my node jake file for client-side js/css [14:51] wattz: finally breaking away from jake on narwhal... so slow and not very smooth [14:51] jamund has joined the channel [14:51] brianc: wattz: I think quite a few people use the closure compiler from google [14:51] wattz: i guess i could just reach out to the google Closure compiler api :P [14:51] wattz: brianc: yeah, just java or a webservice [14:52] wattz: you would think google would have a C++ counterpart due to v8 [14:53] stride: pquerna: how do you catch call stack exceeded? trying to reproduce it just gives me an uncatchable error in /src/node.js:63 [14:53] figital has joined the channel [14:53] Throlkim has joined the channel [14:54] brianc: stride: might not be able to catch that. it's kinda a fatal error. generally means you have an infinite level of recursion some where, yes? [14:55] Aikar: might not be able to... the nature of a call stack overflow is yea.... catching it would add yet another level to the stack lol [14:55] bradleymeck: wattz a C++ counterpart to closure compiler? [14:55] Aikar: batteries [14:55] stride: sure, true point but it breaks execution there anyway so it might as well offer something to get it going again [14:56] Nohryb has joined the channel [14:57] Aikar: so noone knows of a really clean "start a server on this port, start a client and connect to server IP:port, send plain json data back and forth in messages package? trying to get the websocket-(client|server) packages to work but its being iffy [14:58] juan77 has joined the channel [14:59] juan77: good morning, my first post! [14:59] juan77: how I can send json to client using express/node? [14:59] tj: juan77: res.send(myObject) [14:59] bradleymeck: Aikar, sending json on a port is sending a string, just send it [14:59] tj: juan77: ex: res.send({ error: "oh noes!" }) [14:59] juan77: cool, I forgot that is JS. [15:00] Anti-X: how is that cool [15:00] sth: Don't you need to use JSON.stringify first? [15:00] juan77: thx tj [15:00] Aikar: bradleymeck: yeah but i was hoping for something that handles partial strings due to TCP/IP networking where the data could be chunked etc [15:00] tj: sth: not with express no [15:00] Anti-X: forgetting that it's JS isn't cool! [15:00] sth: mk [15:00] tj: well when using res.send() [15:00] Anti-X: socket.io also stringifies for you [15:00] saschagehlich has joined the channel [15:00] Anti-X: in the appropriate transports [15:01] juan77: yeah, I'm here to use socket.io :D [15:01] bradleymeck: aikar, make a delimeter (generally \n) append to each of the messages, when recieving, dont try to parse until you see a \n (invalid in json) [15:01] bradleymeck: it takes like 5 lines of code [15:01] cferris has joined the channel [15:01] Doosje: a little question, how to excecute code wich i type on the console? [15:01] Anti-X: 1 line if you're awesome [15:01] brianc: Doosje: start up the REPL (read, eval, print loop) by typing "node" at a console without giving it a filename as a second argument [15:02] bradleymeck: ewww 1 line having both send and recieve info [15:02] brianc: Anti-X: ha! [15:02] Aikar: yeah i was just kinda expecting it to already of been written lol since its such a small thing. im mainly in R&D stage atm so trying to find whats all avail [15:02] Aikar: but didnt know [15:02] tj: bradleymeck: what? [15:02] Aikar: \n was illegal [15:02] bradleymeck: its too minimal to really have a general module [15:02] bradleymeck: tj, sending json over tcp [15:03] brianc: Aikar: node.js is really young and not a lot has been written yet. a blessing & a curse. you could whip up a little project & throw it on the githubs. [15:03] tj: ah :) [15:03] Aikar: yeah i understand that, but there is actually alot of good stuff written already :P socket.io is going to save me a ton of time [15:03] Aikar: i thought id have to write all that fallback stuff myself [15:04] brianc: Aikar: absolutely lot of good stuff already written. just saying sometimes that piece you really need...you gotta brew your own potion [15:04] Anti-X: well technically, node is far ahead of what python 3 were able to come up with once all their libraries became incompatible [15:05] Aikar: np i can do that, technically the websocket stuff would work for me but its being iffy and not playing nice [15:05] brianc: yah did __not__ mean to bash the node. i blub node. [15:05] brianc: it seems like the websocket stuff might be overkill if you're using server to server communication. [15:06] Aikar: yeah it is, which is why i was asking lol [15:06] rwaldron_ has joined the channel [15:06] juan77: soory for a newbie question: i will try to use express, but my app is too big to code in one file, how I can use server.js for routing only and call "controllers" that are located in controllers folder, for example I would like to do: app.get('/user/:id', loadUser, function(req, res) { res.send(req.results); }); where loadUser is located on controller/userController.js? [15:07] juan77: is there a good example to see? [15:07] Aikar: lol i recognize that snippet of code from yesterday reading expressjs [15:07] tj: lol [15:07] juan77: yes Aikar, is from there :D [15:08] Anti-X: what i don't like is people who jump straight into the framework without bothering to learn the basics of how node works [15:08] Anti-X: as with any language [15:08] Aikar: do app.get('/:controller/:action', or so, then dynamically load the script based on req.args.controller or w/e the syntax was [15:09] tj: yeah, some people start with the basics, and some people start with the higher level stuff [15:09] Anti-X: yeah and then they get stuck with the basics [15:09] tj: whatever works, but yeah it doesnt really help when you dont know what is related to the framework and what is node [15:09] bradleymeck: sadly some ppl never learn the basics, been to a job interview where they said if i didnt know jquery i didnt know javascript [15:09] juan77: hi Anti-X thanks for this! I agree with you, but isn't trivial and and if you have something that I need to learn is welcome. [15:09] Aikar: heh well id consider myself on a high enough level of programming to understand basic fundamentals of programming in any lang, so i do tend to jump into complicated stuff and figure out how it works. I learn best that way [15:09] brianc: bradleymeck: haha [15:10] stride: bradleymeck: yuck.. [15:10] juan77: and I'm agree with Aikar :D [15:10] tj: bradleymeck: haha, I feel the opposite, when I DONT use jQuery (and dont need to) I feel freeeeee [15:11] brianc: tj: agreed [15:11] tj: aside from jquery handling cross browser stuff, I would never use it [15:11] Anti-X: i use a mixture of jquery and plain old js [15:11] bradleymeck: sadly in all the recent job stuff I have done, if I dont know X framework, they say i cant learn it cause I dont know the language [15:11] Aikar: what about jQuery.live()? I use that occasionally, no clue how to do it w/o jQuery lol [15:11] brianc: I actually most experienced w/ ExtJS from a browser library standpoint...is that "too enterprisey"? [15:12] Anti-X: bradleymeck, are you talking about grep-recruiters? [15:12] Aikar: brianc: extjs was fun but yeah its such a huge lib its really only worth it if your making big use of what extjs provides [15:12] bradleymeck: lol extjs is rather nice for the fact it can serialize/deserialize stuff [15:12] sonnym has joined the channel [15:12] Aikar: Ext.Connect was interesting [15:12] bradleymeck: anti-x im talking about places im sending in resumes [15:12] Aikar: made use of that [15:12] floyd has joined the channel [15:13] Aikar: jquery is nice for the fact its small, you can load it to do small things. [15:13] Anti-X: bradleymeck, yeah... IT is sort of a bitch when it comes to resumes.. because HR people are HR people for a reason... they can't do IT. So they get a list of requirements from whoever is hiring, and then they filter out any CV that doesn't have those exact specs [15:13] Anti-X: even though you can have them, just worded differently [15:13] bradleymeck: yea, but ive been looking for a couple weeks [15:14] prettyrobots has joined the channel [15:14] Aikar: a quick $('div#id ul.dynamicList li').live('click',function() {}); where the li elements are dynamic is pretty quick [15:14] andykent has joined the channel [15:14] EyePulp has joined the channel [15:15] jamund: Doing some really simple stuff with notde and socket.io. Wondering if anyone can give me some help. Basically when a client connects to the server I just want to send it some data. It sounds pretty simple and I've gotten more complex things to work before, but it seems this one way communication is giving me grief (probably a typo or something). Anhone want to take a shot at it? [15:15] eee_c has joined the channel [15:17] jamund: http://jsbin.com/equte4/edit [15:18] Aikar: jamund: did you look at the chat room demo [15:19] Yuffster has joined the channel [15:19] jamund: Aikar: will look at it now. i've gotten more complex colloborative apps working, not sure what i'm missing. the client just doesn't seem to receive the message [15:19] tapwater has joined the channel [15:20] Blink7 has joined the channel [15:20] juan77: hi, any location for how modularize a node.js app? [15:20] Aikar: your .connect doesnt list a port # [15:20] jamund: ;-) [15:21] jamund: just added a line above it [15:21] jamund: sorry [15:21] jamund: var socket = new io.Socket(null, {port: 5666}); [15:22] jamund: so the client does connect (according to node). i'm just not seeing anything show up in the console on the client side [15:23] shripadk: jamund: you need to put the broadcast stuff in client.on('connect', fn)... [15:24] rpflo has joined the channel [15:25] andykent: We are running node 0.2.4 in a production system. We write line seperated JSON objects to disk for every request using something like fs.write(fd, JSON.stringify(obj)+'\n') the server receives =~ 100 req/sec through a single process without an issue but around every 3,000 lines written the first 3 characters of a line will be munged into garbage. Any ideas? is this a bug? or is just blindly calling fs.write() without a callback inherently dangerous? [15:26] benburkert has joined the channel [15:29] shadow_walker has joined the channel [15:29] jamund: shripadk: hmm...that callback isn't ever getting called. you mean like this? [15:29] jamund: socket.on('connection', function(client) { [15:29] jamund: client.on('connect', function() { [15:29] jamund: console.log("broadcasting to client"); [15:30] stepheneb has joined the channel [15:30] shripadk: jamund: are you including json.js? which browser are you testing it on? [15:31] jamund: shripadk: i am not. testing on safari 5. that might be it though. [15:32] gerad has joined the channel [15:32] shripadk: don't forget to sudo! for flashsocket transport sudo is a requisite... [15:33] jamund: shripadk: cool. i gotta run. thanks for the tips. not working yet though ;-) [15:34] shripadk: ok [15:34] jakehow has joined the channel [15:34] sivy has joined the channel [15:36] kriszyp has joined the channel [15:37] iammerrick has joined the channel [15:38] andykent: anyone got any suggestions? :( [15:39] technoweenie has joined the channel [15:39] shripadk: andykent: ? [15:40] evanpro has joined the channel [15:41] andykent: We are running node 0.2.4 in a production system. We write line seperated JSON objects to disk for every request using something like fs.write(fd, JSON.stringify(obj)+'\n') the server receives =~ 100 req/sec through a single process without an issue but around every 3,000 lines written the first 3 characters of a line will be munged into garbage. Any ideas? is this a bug? or is just blindly calling fs.write() without a callback inherently dangerous? [15:42] mif86 has joined the channel [15:43] themiddleman has joined the channel [15:46] podman has joined the channel [15:46] Mikushi has joined the channel [15:47] podman has left the channel [15:48] andykent: shripadk: did that make sense? [15:48] shripadk: andykent: no :( never encountered that before. [15:49] andykent: shripadk: oh well. I'll post to the mailing list. See if I get any more luck there. Thanks for taking a look though. [15:50] muk_mb has joined the channel [15:53] jamund has joined the channel [15:54] danslo has joined the channel [15:55] kriszyp_ has joined the channel [15:55] indutny has joined the channel [15:56] indutny: hey all! [15:56] indutny: Got something to announce here [15:56] indutny: https://github.com/donnerjack13589/nodeapp [15:56] indutny: it's a nodejs restfull framework [15:56] indutny: almost inspired by couchapp [15:57] indutny: so you can create folder [15:57] indutny: place sub-folders and files here [15:57] cagdas has joined the channel [15:57] indutny: all files under _files sub-folder anywhere will be served as static files [15:57] indutny: other files will be parsed, using extensions processor [15:57] indutny: that can be setup using options [15:58] indutny: the result of running nodeapp on this folder [15:58] indutny: is connect.js middleware function [15:58] indutny: i released first proto-version [15:58] indutny: all suggestions and feature requests will be welcome [15:58] indutny: thank you [15:59] slickplaid: ACTION is looking now [15:59] tj: indutny: eval() ? :s [15:59] indutny: :) [15:59] amerine has joined the channel [15:59] indutny: your suggestion? [16:00] indutny: if I'll use process.compile [16:00] indutny: I can't catch errors [16:00] indutny: (By the way nodeapp supports autoreload feature, using mikeal watch module) [16:00] slickplaid: s/eval/evil [16:00] slickplaid: / [16:00] indutny: (P.S. this feature is in development, but works now for me) [16:01] indutny: tj: what can I use instead of eval? [16:01] tj: I dont know exactly what you are doing there, but why do you need eval? [16:03] benburkert has joined the channel [16:03] eee_c has joined the channel [16:03] indutny: v8: ['are', 'there', 'anyone', 'here?'].join(' ') [16:03] v8bot: indutny: "are there anyone here?" [16:04] indutny has left the channel [16:04] indutny has joined the channel [16:04] evanpro: "s/eval/evil/" ++ [16:05] stagas: so it's like multiple handlers in multiple files, routed by their folder [16:05] stagas: ? [16:06] lobglot has joined the channel [16:07] __swanson_ has joined the channel [16:09] Tprice: how much memory does node need to run well? [16:10] matt_c has joined the channel [16:13] JohnDav has joined the channel [16:13] rwaldron__ has joined the channel [16:13] Gruni has joined the channel [16:14] benburkert has joined the channel [16:14] twoism has joined the channel [16:14] donnerjack13589 has joined the channel [16:14] donnerjack13589: sorry [16:15] donnerjack13589: internet connection problem [16:15] donnerjack13589: stagas: something like that [16:16] donnerjack13589: stagas: but note that you can create before.get.js or view.post.js or after.update.js [16:16] donnerjack13589: so you can override handlers by method [16:16] donnerjack13589: also [16:16] donnerjack13589: if you have following directory structure [16:16] donnerjack13589: . [16:16] donnerjack13589: before.js [16:16] donnerjack13589: somedir/ [16:16] donnerjack13589: somedir/before.js [16:16] donnerjack13589: somedir/view.js [16:17] donnerjack13589: somedir/after.js [16:17] donnerjack13589: after.js [16:17] rauchg_ has joined the channel [16:17] donnerjack13589: first of all before.js in the root folder will be called [16:17] donnerjack13589: next before in somedir [16:17] donnerjack13589: then view [16:17] donnerjack13589: and then after [16:17] donnerjack13589: from somedir and from root [16:18] jfd1 has joined the channel [16:18] donnerjack13589: stagas: Have I answered to your question? [16:19] stagas: donnerjack13589: kind of. why don't you try explaining all that in the readme? [16:20] saikat has joined the channel [16:26] devinus_ has joined the channel [16:27] gsmcwhirter has joined the channel [16:30] jvolkman has joined the channel [16:31] ctp has joined the channel [16:32] banjiewen has joined the channel [16:32] andykent has left the channel [16:33] markwubben has joined the channel [16:33] gf3 has joined the channel [16:33] Tprice: hey can someone give a hand [16:34] Tprice: im getting this error “buffer:222 ret = this.parent.binaryWrite(string, this.offset + offset, maxLength);” [16:34] unomi has joined the channel [16:35] Tprice: on something like this buf.write(chunk,'binary',bufPos); [16:41] programble has joined the channel [16:41] programble has joined the channel [16:43] ctp has joined the channel [16:43] benburkert has joined the channel [16:44] maru_cc has joined the channel [16:44] svnlto has joined the channel [16:45] Max-Might has joined the channel [16:47] saschagehlich: Tprice: please post the whole stacktrace [16:49] omarkj has joined the channel [16:50] sveisvei has joined the channel [16:50] MikhX has joined the channel [16:50] noahcampbell has joined the channel [16:51] shadow_walker has joined the channel [16:52] mikeal has joined the channel [16:53] creationix has joined the channel [16:55] omarkj has joined the channel [16:55] stephank has joined the channel [16:59] eee_c has joined the channel [17:00] omarkj has joined the channel [17:00] langworthy has joined the channel [17:02] langworthy has joined the channel [17:03] altamic has joined the channel [17:04] sudoer has joined the channel [17:04] nolan_d: I'm trying to use connect-auth with express such that the main part of my site uses form-based auth while my API uses http basic. Kind of at a loss as to how to do this. [17:04] nolan_d: Form-based auth seems to work. [17:05] willwhite has left the channel [17:05] nolan_d: The trick is that I don't know how to get my http basic auth called. Where do I need to initialize it? Alongside form-based auth in the main app? [17:06] gwoo has joined the channel [17:07] nolan_d: I don't get the difference between initializing a handler with app.use(connectauth(...)) and the authenticate([], ...) call. Do I need to use one before the other? [17:08] svnlto_ has joined the channel [17:13] q_no has joined the channel [17:14] unomi has joined the channel [17:15] bpot has joined the channel [17:16] omarkj has joined the channel [17:17] dxld has joined the channel [17:20] nolan_d: Ah, NM, figured it out, one is the name. Not sure why there's a distinction between the string name and the actual object, but alas. [17:21] deepthawtz has joined the channel [17:22] dxld has left the channel [17:22] gf3 has joined the channel [17:27] tmpvar has joined the channel [17:28] johngbrooks has joined the channel [17:37] murz has joined the channel [17:38] donnerjack13589 has joined the channel [17:38] twoism has joined the channel [17:39] mAritz has joined the channel [17:39] Tprice: on this function http://nodejs.org/api.html#event-data-24 [17:39] technowe_ has joined the channel [17:40] Tprice: can i do data.length = bit or bytes? [17:40] kayue has joined the channel [17:40] kayue has left the channel [17:41] amerine has joined the channel [17:44] jacobolus has joined the channel [17:45] mattly has joined the channel [17:49] langworthy has joined the channel [17:49] meatmanek has joined the channel [17:50] donnerjack13589 has joined the channel [17:50] donnerjack13589: ok,i'm here again [17:50] donnerjack13589: :) [17:51] aconbere has joined the channel [17:51] mrjjwright has joined the channel [17:53] dnm_ has joined the channel [17:54] dnm_ has left the channel [17:54] meatmanek_ has joined the channel [17:57] shadow_w_ has joined the channel [17:59] modular has joined the channel [17:59] LuigiMontanez1 has joined the channel [18:00] sudoer has joined the channel [18:00] KungFuHamster_ has left the channel [18:01] davidascher has joined the channel [18:01] modular: any way to check the system time in node.js? [18:02] V1 has joined the channel [18:03] mjr_ has joined the channel [18:06] robmason has joined the channel [18:06] norviller has joined the channel [18:06] stride: v8: new Date(); // @ modular [18:06] v8bot: stride: "Fri Nov 05 2010 14:06:34 GMT-0400 (EDT)" [18:07] modular: thanks [18:08] agnat has joined the channel [18:09] Gehhilfe has joined the channel [18:10] shadow_walker has joined the channel [18:12] donnerjack13589 has joined the channel [18:13] amerine has joined the channel [18:13] hellp has joined the channel [18:13] tilgovi has joined the channel [18:14] rauchg_ has joined the channel [18:16] saikat has joined the channel [18:16] omarkj has joined the channel [18:19] bradleymeck has joined the channel [18:19] jodaro has joined the channel [18:19] viirya has joined the channel [18:20] jodaro has left the channel [18:23] donnerjack13589 has joined the channel [18:23] banjiewen has joined the channel [18:24] banjiewen has joined the channel [18:24] ryan[WIN] has joined the channel [18:25] agnat_ has joined the channel [18:26] olivvv_ has joined the channel [18:26] olivvv_: hi [18:27] olivvv_: I'm trying to get node running [18:27] olivvv_: using http://node-js.prcn.co.cc [18:27] olivvv_: so I run node.exe [18:27] olivvv_: type % node example.js in the console [18:28] olivvv_: but http://127.0.0.1:8124/ is still unreachable [18:28] olivvv_: when typing the command, what is it suppose to answer ? [18:28] mjr_: Wow, node.exe [18:28] olivvv_: I get : ... [18:28] mjr_: That's pretty cool. [18:28] olivvv_: if it works [18:28] mjr_: indeed [18:29] stride: ACTION has other words for that.. [18:29] mjr_: what is example.js? [18:29] bartt has joined the channel [18:29] olivvv_: http://nodejs.org/ [18:29] olivvv_: comes in with node [18:29] olivvv_: in the yip [18:30] olivvv_: I guess its pretty self-explanatory, just a hello word to get started [18:30] stride: is it outputting the "Server running" part? [18:30] olivvv_: no [18:30] olivvv_: just ... [18:30] rikarends: we have full osx/lin/windows binary builds of latest stable node in here (via git) github.com/ajaxorg/node-builds [18:30] stride: did you type the % character in as well? [18:31] devinus_ has joined the channel [18:31] mjr_: If you don't see "Server running at..." then it isn't working. [18:32] omarkj has joined the channel [18:32] olivvv_: rikarends:I think it is the same files that I have [18:33] rikarends: olivvv_: we use it to submodule it in our projects so they always have working node binaries [18:33] stride: olivvv_: did you type the % in front of the command? if so, drop that one :) [18:33] tj: rikarends: howcome you guys dont version the binaries? [18:33] tj: that would be nice [18:34] noahcampbell has joined the channel [18:34] olivvv_: stride: ok, I did ctrl + C then node example.js, but I still get only ... and server is not reachable [18:35] stride: meh. in that case.. use a real OS.. :)) [18:35] olivvv_: rikarends: I could not build node on my fresh cygwin install, http://gyazo.com/c4c6958b239de030c7cb3a132062a93b.png https://github.com/ry/node/issues/issue/391 [18:35] olivvv_: could it be the same issue [18:35] olivvv_: that is preventing node.exe to work properly [18:35] Tprice: the emit function is it so i can emit from a function i made? [18:35] Tprice: like a custom one [18:36] olivvv_: stride:Yeah, sure, but currently only have a crappy vista laptop [18:36] wink_: olivvv_: http://www.virtualbox.org [18:36] stride: olivvv_: that was merely a joke, indicating that I don't have more ideas on it :) [18:36] ossareh has joined the channel [18:36] rikarends: tj: we use github hashes. but yeah we should tag them actually [18:36] rikarends: tj: i'll do that [18:36] benburkert has joined the channel [18:36] tj: rikarends: ohhh I see :) awesome [18:37] cheesebread has joined the channel [18:37] tj: if they are versioned I can definitely use those [18:37] rikarends: tj: no i mean we just use 'stable' and via submodules our projects link to a hash. but yeah they should be properly versioned [18:37] tj: gotcha [18:37] tj: tags would be great [18:37] Tprice: no? [18:39] rburhum has joined the channel [18:39] figital has joined the channel [18:40] rikarends: tj: just testing my last commit on linux and i'll tag the binaries v0.2.4 [18:40] tj: rikarends: awesome! cool man [18:40] rcy has joined the channel [18:41] TheEmpath has joined the channel [18:41] bahamas has joined the channel [18:42] devinus: woah cool [18:42] devinus: false.__proto__.constructor.superclass.__proto__ [18:45] admc has joined the channel [18:46] isaacs has joined the channel [18:48] agnat_ has joined the channel [18:48] saikat has joined the channel [18:52] olivvv_: isn't node logging an error message somewhere if it fails at starting ? [18:53] bradleymeck has joined the channel [18:54] brianc: .__proto__ => This property is deprecated and shot not be used in new code: use Object.getPrototypeOf instead. [18:56] mraleph has joined the channel [18:58] boaz has joined the channel [19:00] brianc: strange [19:02] jfd1 has joined the channel [19:02] rpflo has joined the channel [19:03] CIA-93: node: 03Ryan Dahl 07writev * re955b1f 10/ src/node_io_watcher.cc : s/writer_node/watcher_obj/g (+7 more commits...) - http://bit.ly/bf1zbQ [19:03] rauchg_: http://www.learnboost.com/introducing-node-canvas-server-side-html5-canvas-api/ [19:05] slickplaid: cloud9 needs some kind of access restriction [19:06] bradleymeck: rauchg_ nice [19:06] brianc: I'd be interested in y'all's feedback on this query API for a postgreSQL client I'm working on...https://github.com/brianc/node-postgres/wiki/Client#method-query-prepared [19:07] brianc: it seems common to pass a "callback" as a 2nd parameter [19:07] brianc: but the method needs to take so many OTHER parameters [19:08] brianc: it would end up being 3 or 4 other parameters. do you think it'd be better to just pass all the parameters or use a "options" object? I don't really like methods with 4+ arguments, but I wanna do this the "node way" if there is such a thing [19:09] bradleymeck: rauchg_ can that be used with multiple image formats? animated gif would be crazy for a few things [19:09] ceej has joined the channel [19:09] tj: bradleymeck: just png ATM [19:10] javruben has joined the channel [19:10] matt_c_ has joined the channel [19:10] V1: tj: does it support transparency? [19:10] tj: V1: yup [19:10] V1: I wonder if i can build serverside heatmaps with it using with my speedo.no.de source code [19:11] slickplaid: hmm could possibly stream multiple gif's into an animated gif with node [19:11] mape: Anyone here poked with socket.io and used paths to define things? [19:11] slickplaid: pretty easily [19:11] javruben: tj: congrats on the release! [19:11] tj: javruben: thanks ! [19:11] tj: still a WIP but so far so good ! [19:11] javruben: we should definitely work together [19:11] brianc: tj: awesomesauce [19:12] rikarends: tj: cool! checking it now [19:12] tmpvar: tj, are you at learnboost? [19:13] tj: tmpvar: yip [19:13] tj: yup * [19:13] tmpvar: ah, i thought you were at sencha [19:13] tmpvar: things are starting to make sense ;) [19:13] tj: I was lol ive been with the learnboost guys for about 3 months i think [19:13] tj: give or take [19:13] tj: i think a bit less [19:13] tmpvar: ah, cool [19:13] liar has joined the channel [19:14] bradleymeck: yea, animated gifs are serial, so it would be cool to see if we could stream them [19:14] javruben: tj: haha nice refresh trick ;) [19:14] bradleymeck: idk how most image libraries handle them [19:14] tj: javruben: stole that from rikarends lol I was like ooo that would work well for the clock example [19:15] javruben: hehe yeah I know, im sitting across from him, we're both enjoying your video [19:16] tj: oh :) haha [19:16] dguttman has joined the channel [19:17] V1: building cairo under mac, sucks [19:17] tj: V1: if you have x11 etc it should be there already [19:17] tj: but yeah, might package some of those deps if people find it annoying [19:17] V1: I got x11 but i need java dev build [19:17] rikarends: yeah i was going through the same pain [19:17] rikarends: mine is nice and prebuilt :) [19:19] tj: rikarends: so ironic that we were working on the same projects at pretty much the same time lol [19:19] tj: so random [19:19] rikarends: yeah we actually had it 80% done or so already 6 months ago or something, we just recently decided to push the last bit out [19:19] tj: oh wow nice [19:20] tj: i just started about a month ago [19:20] javruben: tj: well I had to beat rik to finish it [19:20] javruben: he just wanted to work on cloud9 [19:20] rikarends: it was just gathering dust [19:20] tj: :D [19:20] rikarends: the thing is our O3 layer allows us to make components for any dynamic language [19:20] javruben: also having the build system helped :) [19:20] rikarends: so we had this thing running in a plain V8 commandline shell [19:21] rikarends: it also has scan-from-twain and barcode recognition components in there [19:21] rikarends: and output as pdf stuff [19:21] tj: I plan on utilizing the cairo pdf / svg backends when available [19:22] rikarends: yeah thats a nice feature of cairo [19:22] tj: need to work on the rest of the api first though [19:23] zomgbie has joined the channel [19:24] V1: attempt #3 to install cairo :) [19:25] rikarends: attempt #2 at getting macports [19:25] brianc: rikarends: why no homebrew? [19:25] V1: homebrew doesn't have cairo installation ;) [19:25] brianc: V1: word [19:25] rikarends: cause thats not in the howto im following to compile cairo [19:26] jamund has joined the channel [19:26] JohnDav has joined the channel [19:28] thejefflarson has joined the channel [19:29] V1: tj, i cant find getImageData / putImageData in node-canvas.. Or am i looking at the wrong files? [19:29] modular: alright, let's see if node.js can withstand the might of hacker news.. http://news.ycombinator.com/item?id=1874465 [19:29] tj: V1: its not there yet, its not 100% done :p this is 0.0.1 [19:29] rikarends: tj: did you see how we do JS api's in C++? [19:30] tj: rikarends: took a peek at the code but didnt look into it much [19:32] strixv has joined the channel [19:32] strixv has left the channel [19:33] rwaldron has joined the channel [19:33] rikarends: Cairo looks pretty clean in terms of API to Canvas. We are using AGG for the performance. It was atleast a couple of times faster in tests [19:33] strixv has joined the channel [19:33] tj: yeah it is a good fit, FF uses it [19:33] tj: webkit as well [19:33] ctp has joined the channel [19:34] rikarends: It was specced for doing thousands of charts a sec on a serverfarm so better cpu performance was key [19:34] strixv: Anybody got a second to suggest some best practices to a relative node/express/mongoose beginner? [19:34] strixv: I'm having difficulty making my projects seem even kind of organized [19:35] tj: rikarends: fair enough. I havent even begun optimization yet [19:35] jimt has joined the channel [19:35] rikarends: im still building cairo [19:35] V1: pff, i wish i had glass fiber internet at home instead of at the office.. I'm still building cairo [19:36] rikarends: our canvas compiles in 18 seconds flat with all dependencies [19:36] rikarends: inlined [19:36] V1: but the question is.. does it support getImageData ;) [19:36] JohnDav: V1: did you get a 100% spike with the updated versions ? [19:36] rikarends: we have binary access api's yes but they are not 'canvas' apis [19:36] mjr_: modular: how many concurrent connections are you handling so far? [19:37] V1: JohnDav: Nope, i attacked the latest socket.io + node.js v.0.3.1alpha with 1000 req / sec and it still worked fine [19:38] tj: rikarends: yeah the build is the main flaw right now I suppose, although I built cairo in a min or two on our linux machines [19:38] tj: with no problems [19:38] Tprice: should this not work? [19:38] Tprice: http://pastebin.com/0vcRJQAr [19:38] tmpvar: rikarends, doesnt the speed depend on the cairo backend thats in use? [19:38] modular: mjr_: it's hard to say, i don't have much in the way of metrics built, just a simple log. [19:38] Tprice: im trying to test for a file [19:38] rikarends: tmpvar: technically it does, but on servers you wont get openGL [19:38] Tprice: if true or not [19:39] ecodude has joined the channel [19:39] rikarends: tmpvar: also AGG actually beats the crap out of most GL accelerated 2D vectors too [19:39] rikarends: ---> Configuring db46 [19:39] rikarends: Error: db46 requires the Java for Mac OS X development headers. [19:39] rikarends: Error: Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719> [19:39] rikarends: Error: Target org.macports.configure returned: missing Java headers [19:39] ecodude: hi - newbie looking for help with installation on cygwin [19:40] tj: macports == boo [19:40] brianc: ecodude: did you check the node wiki on github? [19:40] javruben: tj: does it run on windows? [19:41] tj: javruben: no clue, I will likely never try, because I hate windows [19:41] javruben: oef, 'hate' strong word, what did it do to you? [19:41] ecodude: yes - am getting a python 4628 fork ..died waiting for dll loading.. [19:41] tmpvar: rikarends, thats is really surprising.. i was under the impression that AGG was more focused on high quality, not perf [19:41] Tprice: if the file is true then it should come out true [19:41] Tprice: but it does not run through the fs.Stat [19:41] rikarends: tmpvar: its focussed on both, but you are right its very anal about quality [19:41] rikarends: tmpvar: there are some drawing things that can go faster in AGG if its not quality optimized [19:42] Ori_P has joined the channel [19:42] tj: javruben: it sucked lol :p [19:42] mikeal has joined the channel [19:42] javruben: haha, fair enough [19:42] rikarends: tmpvar: we just did a basic comparison and AGG was miles ahead. Also GL accell was and is not available in any server environment [19:43] tj: but nah I mean it should work fine, I cant personally verify that but cairo should make easy work of that [19:43] javruben: alright [19:43] V1: \o/ finally! it's done! I just wasted 30 minutes of my life installing cairo [19:43] tmpvar: rikarends, got ya [19:43] javruben: what are you using the canvas api for internally, i read something about reports? [19:43] tj: yup reporting among other things [19:43] javruben: V1: you and many others :) [19:44] ecodude: brianc: did check the wiki, did a rebaseall but with no luck... [19:44] JohnDav: V1: hmm pretty cool... [19:44] rikarends: V1: actually i wasted 20 minutes and i still dont have cairo :) [19:44] javruben: tj: cool, will be looking forward to your blog article on that [19:44] tj: javruben: hey hey :p no bashing, I couldnt get yours to work with anything but the one test [19:44] V1: tj: info canvas@0.0.1 Failed to exec preinstall script [19:44] mjr_: modular: you can do: "lsof -p nodepid | grep TCP | wc -l" for a crude metric [19:44] tj: V1: gist? [19:44] javruben: tj: sorry, we'll get your tests to run soon [19:44] V1: tj: https://gist.github.com/664664 [19:45] rikarends: i just wanna play with it [19:46] tj: V1: apparently config failed, I thought npm used to output that, might have to cat that file [19:46] StanAngeloff has joined the channel [19:46] V1: if you refresh the gist you will see a cat of the config.log [19:46] tj: will check it out in one second [19:47] tmpvar: there aint no party like a cairo compilation party [19:47] tmpvar: btw, tj.. i get an undefined symbol on ubuntu 10.10 [19:48] jamund: V1: i didn't catch what you're trying to do, but would the o3-canvas library work for you? I've done some things with it. pretty cool. [19:48] slickplaid: Socket.io question... how can i access the Listener::broadcast(); function once i set io=require('socket.io'); io.listen(server); Would it be io::Broadcast at that point? or io.Listener::Broadcast? [19:48] naturalethic has joined the channel [19:48] V1: jamund: I'm attempting to install the node-canvas of learnboost ;) [19:48] danielrmz has joined the channel [19:49] V1: slickplaid: i think you can do io.broadcast() [19:49] slickplaid: I think you're right :D [19:49] rauchg_: slickplaid: var listener = io.listen(server); [19:49] rauchg_: listener.broadcast() [19:49] slickplaid: ty [19:49] bradleymeck: mmmm, xpath in browser is fail support wise [19:50] tj: V1: lame, waf is trying pkg-config failing there.. hmm [19:50] V1: tj: Yeah, there isn't a pkg-config on a mac :) [19:51] tj: V1: ive got it :) [19:52] tj: node uses check_cfg() as well [19:52] jesusabdroolah: I wouldn't show anyone how it actually works, though--my idea was mostly, "magic!" [19:52] jchris has joined the channel [19:52] jesusabdroolah: er [19:53] jesusabdroolah: HOW DID THAT HAPPEN [19:53] jesusabdroolah: the window I was typing in, like [19:53] jesusabdroolah: I must've accidentally hit ctrl-n [19:53] jesusabdroolah: so, erm [19:53] jesusabdroolah: HAY GUISE [19:53] ecodude has left the channel [19:53] c4milo has joined the channel [19:54] halfhalo: ACTION turns on tape recorder [0*0] [19:54] c4milo: tj !!! [19:54] tj: !! [19:54] rauchg_: !!!!! [19:54] jesusabdroolah: I saw one of those really old-school tape reel machines at Value Village a few weeks back [19:54] jesusabdroolah: It was "transistorized" [19:54] c4milo: tj: good job with node-canvas, congrats [19:54] tj: thanks man [19:55] tj: just need to get it building easier for people :) haha [19:55] jesusabdroolah: link? [19:55] c4milo: tj: cairo is a nice library , good catch [19:55] tj: ya its great i love it [19:55] devinus: what's the writev branch for? [19:55] jesusabdroolah: I'm unfamiliar with it :( [19:55] gkatsev: jesusabdroolah: you accidentally the window? [19:55] jesusabdroolah: YES I DID [19:55] jesusabdroolah: accidentally the ENTIRE window [19:56] jimt_ has joined the channel [19:56] gkatsev: lol [19:56] c4milo: tj: what do you mean with easier ? [19:56] guitt has joined the channel [19:56] c4milo: tj: easier than node-waf configure build ? [19:57] killfill: one could make a watermark middleware so it adds one when serving images, with node-canvas.. :P [19:57] tj: c4milo: some people are having issues installing cairo [19:57] gkatsev: node-canvas? what? [19:57] c4milo: tj: FAQ ? [19:58] rikarends: alright the race is on! testcases are being fixed on node-o3-canvas :) [19:58] Zeph\k0d3 has joined the channel [19:58] bartt has joined the channel [19:58] jesusabdroolah: I want a link to this other canvas! [19:58] jesusabdroolah: I will follow BOTH [19:58] halfhalo: you would, wouldn't you [19:59] janne has joined the channel [19:59] Zeph\k0d3: hello [19:59] tj: rikarends: plural? there was only one [19:59] rikarends: tj: oh well your tests thing :) [19:59] gkatsev: https://github.com/learnboost/node-canvas [19:59] jesusabdroolah: Sweet [19:59] tj: rikarends: ah :) [19:59] jesusabdroolah: Man [19:59] tj: we can share the love [19:59] tj: lol [20:00] gf3 has joined the channel [20:00] rikarends: tj: Zeph\k0d3 has been doing the hard work on o3-canvas [20:00] jesusabdroolah: How am I going to choose server-side canvas implementations? [20:00] jesusabdroolah: >:O [20:00] rikarends: jesusabdroolah: wait for the performance benchmark showdown! [20:00] javruben: tj: yes dont think rik is the smart guy, he's just pretending [20:00] gkatsev: lol, mongoose. [20:00] jesusabdroolah: Ali...Ali's sister...Ali...Ali's sister... [20:00] Zeph\k0d3: rik is just pushing me along [20:01] tj: its not about performance at the moment, its about working [20:01] gkatsev: I guess I'll just use mongodb with node. Though, someone probably has a couchdb plugin as well [20:01] olivvv__ has joined the channel [20:01] tj: but it does just fine anyway [20:01] agnat__ has joined the channel [20:01] javruben: tj: but if you're sending 50k reports out over email, its nice to be fast though [20:01] jesusabdroolah: It's about slick apis obviously [20:01] V1: rauchg_: did you do any performance test for flash policy serving? Because flash is still hitting your server on :843 before it attempts to fetch the xml over the regular connection [20:01] tj: scale out my friend [20:01] ryan_gahl has joined the channel [20:01] Zeph\k0d3: ACTION is currently getting the testcases to work on the o3 canvas [20:02] ryan_gahl: mikeal: ping [20:02] jesusabdroolah: go zeph! [20:02] gkatsev: tj: you are a part-time zookeeper? [20:02] tj: gkatsev: haha I have 4 ferrets [20:02] rauchg_: V1: the problem is socket.io shouldn't take over the port 843, it'd be incompatible with other flash apps :/ [20:02] rauchg_: but i'll run some tests [20:02] V1: rauchg_: and the initialization of flash transport is already slow as f*ck because it needs to download a 130kb ungzip'd file. [20:02] gkatsev: tj: nice. [20:02] gkatsev: I have a cat. [20:03] V1: rauchg_: than make it optional instead of required [20:03] V1: instead of deleting* [20:03] rauchg_: V1: yep, will do [20:03] rauchg_: it'll be back on 0.6.1 [20:03] tmpvar: node: symbol lookup error: build/default/canvas.node: undefined symbol: _ZN2v811HandleScopeC1Ev [20:03] V1: rauchg_: Good, i already hacked it my own code :) [20:03] rauchg_: pull req ? [20:04] V1: rauchg_: will do, gotta finish my article first [20:04] rauchg_: k thanks V1 [20:04] tj: tmpvar: hmm will look into that [20:05] rikarends: tmpvar: i think that means you have a mismatch between your node binary and your v8 headers or something [20:05] tmpvar: ah, perhaps its using the system level instead of deps in node [20:06] elijah-mbp has joined the channel [20:06] rikarends: its a module break thats in the latest 0.3.x vs 0.2.x [20:06] rikarends: but not in node the v8 lib in node. [20:06] tmpvar: ah [20:06] tj: tmpvar: ohh yeah, im using 0.2.4 I should mention that in the readme [20:07] tmpvar: ah [20:08] tmpvar: i've been using 0.3.x because of the set-cookie fix [20:08] tmpvar: hrm. [20:08] mattly has joined the channel [20:09] rikarends: tmpvar: curious now about my binary, try: git clone http://github.com/ajaxorg/node-o3-canvas [20:10] tj: actually I am using 0.2.3 because 0.2.4 had a shit fit over some streaming stuff I was doing [20:10] rikarends: tmpvar: cd node-o3-canvas/example; node nodeanim.js [20:10] rikarends: tmpvar: same error? [20:10] tmpvar: sec [20:10] c4milo: 0.2.4 is not the stable version ? [20:11] tj: supposed to be [20:11] tj: but there is always an -ish on that stable :p [20:11] c4milo: I think Ryan should use branches for unstables and prereleases [20:11] rikarends: tmpvar: you can try a node 0.2.4 binary here: git clone http://github.com/ajaxorg/node-builds [20:11] tmpvar: rikarends, same problem, yes [20:11] c4milo: like 0.3.0-pre It shouldn't be a tag [20:11] rikarends: tmpvar: then you should be able to run either of them [20:11] c4milo: but anyways [20:12] tmpvar: rikarends, right.. [20:12] rikarends: node-builds/osx64/node ... [20:12] tj: im going to clamp the npm install < 0.3.x [20:12] rikarends: pick a platform [20:12] danielrmz has joined the channel [20:12] ecodude has joined the channel [20:12] tmpvar: damn, this split is causing all sorts of problems [20:13] ecodude: brianc: found a fix at http://blog.brev.name/2010/09/nodejs-on-windows-7-under-cygwin.html [20:13] tj: isaacs: is { "node": ">= 0.2.3 <= 0.3.0" } valid ? how would you express that [20:13] isaacs: tj: yes, and that's how you express it. [20:13] tj: isaacs: k great [20:13] isaacs: tj: you can also use || in the latest npm [20:14] isaacs: tj: { "engines" : { "node" : ">=0.3.2 || <0.2.5" }} [20:14] isaacs: tj: for cases where a bug is introduced in 0.2.5 and fixed in 0.3.2 [20:14] rikarends: tmpvar: can you run it now? [20:15] tj: isaacs: my bad, i wand >= 0.2.3 but < 0.3.0 [20:15] tj: want * [20:16] isaacs: tj: ">=0.2.3 <0.3.0" [20:16] tmpvar: rikarends, give me a couple mins [20:16] isaacs: it goes ({operator}{version}\s)+ [20:16] tj: isaacs: cool thanks man [20:16] isaacs: np [20:18] c4milo has left the channel [20:18] Ari-Ugwu has joined the channel [20:19] ctp has joined the channel [20:21] shripadk has left the channel [20:22] siculars has joined the channel [20:24] pedrobelo has joined the channel [20:25] mobruben has joined the channel [20:25] bradleymeck has joined the channel [20:26] Zeph\k0d3: ok, it is now showing the whole list of testcases like node-canvas.. lets see how many I can get correct tonight :) [20:26] mobruben has joined the channel [20:26] tmpvar: rikarends, looks like that works [20:29] danielrmz has joined the channel [20:29] rikarends: tmpvar: alright. [20:33] meatmanek has joined the channel [20:33] robmason has joined the channel [20:35] shadow_w_ has joined the channel [20:36] pkrumins has joined the channel [20:36] kordless has joined the channel [20:37] masm has joined the channel [20:38] derencius has joined the channel [20:43] altamic_ has joined the channel [20:43] jacobolus has joined the channel [20:44] temoto has joined the channel [20:46] temoto: Is there any movement towards sequential no-callback style? Via some kind of threads or continuations or something else. [20:47] bradleymeck: no, and no desire for it [20:48] bradleymeck: there are many threads in the mailing list about why [20:48] rikarends: apparently fibers fuck up scope state [20:48] rikarends: asana is happily ignoring this though [20:49] bradleymeck: yes, and also they cause a need for semaphores or extremely careful planning [20:49] blowery has joined the channel [20:49] bradleymeck: not to mention hiding flow of a program [20:49] Anti-X: temoto, if you have async pains, try https://github.com/creationix/step [20:49] Tprice: does googles closure-compiler work well with node? [20:49] naturalethic has joined the channel [20:50] Anti-X: why would you want it to? [20:50] temoto: Thanks. [20:50] Tprice: make the code smaller [20:50] Anti-X: compressing server side code? [20:50] Anti-X: what's the point of that? [20:51] meatmanek has joined the channel [20:51] Tprice: somelongfunctionname = a [20:51] Tprice: mostly that [20:51] Anti-X: it's server side... [20:51] Anti-X: it's not going to be transferred anywhere [20:51] Tprice: good point [20:52] Anti-X: making your code smaller and unreadable is just silly [20:52] Tprice: haha and a pain to debug [20:53] temoto has left the channel [20:53] Tprice: but i dont think you would debug compressing code [20:58] V1: Pfff, writing articles is hard work [20:58] tj: rikarends: tested 100 renders of your demo image (drawAnim2). my results: 1034ms yours: 11330ms [20:59] rikarends: tj: must be something horribly wrong then [20:59] gf3: isaacs: ping [20:59] isaacs: hi [20:59] isaacs: what's up? [20:59] rikarends: tj: first im getting the tests to look the same, then i'll do a performance pass [21:00] V1: tj: and memory usage? [21:00] rikarends: tj: its probably doing something broken with memory [21:00] tj: V1: need a minute, going to set up some more [21:00] gf3: isaacs: I'm having an issue with `npm bundle`, it's complaining when searching for one of my dependency's dependancy [21:00] tj: rikarends: definitely a possibility [21:00] mape: V1: With your nodeKO project, did you fiddle with socket.io and cross origin requests? [21:00] isaacs: gf3: ok [21:00] belltoy has joined the channel [21:00] isaacs: gf3: is that dependency in the registry? [21:01] gf3: isaacs: this may be useless, but: http://img.gf3.ca/07e699ea496f9109fc5f979489fd9b57.png [21:01] gf3: isaacs: yes, it's one of my libs [21:01] V1: mape: nope, the only issues i had was with broken flash fallbacks, but those are all resolved in the latest builds of socket.io [21:01] isaacs: gf3: gists are much more helpful, i can't bump up the font size on an image [21:01] mape: V1: k [21:01] belltoy has left the channel [21:02] isaacs: gf3: i can't dig into this at the moment, can you post an issue on it? [21:02] gf3: isaacs: sure thing, thanks [21:02] tapwater_ has joined the channel [21:04] rikarends: tj: we haven't done many memory/leak checks yet. so im pretty sure its still nasty [21:04] Zeph\k0d3: ACTION is still getting used to the whole node.js coding paradigm [21:04] tj: rikarends: me neither, valgrind is being a piece of crap on my machine for some reason [21:04] javruben has joined the channel [21:04] rauchg_: gf3: that's a beautiful terminal [21:05] gf3: rauchg_: thanks :) [21:05] tj: gf3: looks like candy :D [21:05] tj: me wants to eat [21:05] tj: terminal [21:05] rauchg_: tj++ [21:05] v8bot: rauchg_ has given a beer to tj. tj now has 1 beers. [21:05] gf3: tj: :) I love working in it [21:05] rauchg_: gf3++ [21:05] v8bot: rauchg_ has given a beer to gf3. gf3 now has 1 beers. [21:05] rauchg_: rauchg_-- [21:05] v8bot: rauchg_: Don't cheat! You can't give a beer to yourself. [21:05] tj: my terminal is transparent so it kinda hurts my brain lol i swear it is making me go blind [21:05] rauchg_: me too [21:05] rauchg_: purple on black [21:05] rauchg_: kills my eyes [21:06] Zeph\k0d3: btw - which testimage exactly are we talking about? [21:06] rikarends: tj: we usually do memleak tracing with the O3 layer, i dont like the external tooling much for that stuff [21:06] tj: rikarends: gotcha [21:06] jimt has joined the channel [21:07] tj: im no pro, this is my first "real" c++ project [21:07] rikarends: Zeph\k0d3: the chart thing i think [21:07] tj: ive done a decent amount of c but nothing insane [21:07] tj: c++ I generally dislike lol [21:07] femtoo has joined the channel [21:07] rikarends: tj: the bulk of my personal work in architecture and code is in O3 itself. i've been writing C++ systems for ages [21:08] tj: rikarends: nice :) [21:08] rikarends: tj: or atleast behind the code in O3 [21:08] Zeph\k0d3: ACTION has been writing C++ for ages as well [21:08] Zeph\k0d3: but mostly dsp and gfx engines.. not for web [21:08] mape: V1: But the flash fallback should handle cross origin as long as I have added a cross domain policy on port 843? [21:08] rikarends: tj: the idea of the thing is to write C++ once in a nice clean way and be able to use the components in browsers as plugins, but also serverside in things like nodejs [21:08] rauchg_: mape: correct [21:08] rikarends: tj: so this canvas component can go to ruby/python also in a flash [21:09] rikarends: tj: if we care enough to write up the script binding layer for it [21:09] mape: rauchg_: All I'm getting is [WebSocket] Error in Actionscript. Use a try/catch block to find error. But I've had it working when it isn't cross origin [21:09] tj: rikarends: ya, I saw the js glue thing [21:09] Zeph\k0d3: rikarends: I might actually want to build that lua binding [21:09] tj: neat stuff [21:09] Zeph\k0d3: this js is irking me up [21:09] Zeph\k0d3: I want some performance. [21:09] ossareh has joined the channel [21:10] jesusabdroolah: pffsht [21:10] rikarends: Zeph\k0d3: sure that should be easily doable. maybe we can tweak the layer a bit more [21:10] jesusabdroolah: "performance" [21:10] tmpvar has joined the channel [21:10] rikarends: tj: i architected the layer to be fully jittable with only a single functioncall overhead [21:10] softdrink has joined the channel [21:10] rikarends: tj: but right now its running in generic mode [21:11] mape: rauchg_: And when using rememberTransport, does it set the cookie to the path and not to the root? [21:11] Zeph\k0d3: jesusabdroolah: some of us care [21:11] rikarends: tj: its nice though that we wont have to rewrite any components to get that [21:11] V1: mape: you should be using the insecure version of the flashsocket [21:11] jesusabdroolah: Heh :) [21:11] mape: oh [21:11] V1: mape: that is the only version that supports cross origin. [21:11] tj: rikarends: yeah that is neat conceptually binding-wise [21:11] mape: V1: Great, thanks [21:12] rikarends: tj: its neat, but not all that useful 'right now' but it does allow us to scale all the way up with the ever optimizing JS engines [21:13] rikarends: Mozilla made some steps where you can hint your C layer to be traced [21:13] V1: mape: https://github.com/gimite/web-socket-js/blob/master/WebSocketMainInsecure.zip [21:13] tj: rikarends: cool cool [21:14] tj: I wanted something similar for general bindings [21:14] gf3: isaacs: Issue is here: https://github.com/isaacs/npm/issues/issue/349 Thanks! [21:14] jesusabdroolah: I should care more about performance, since I end up working on scientific projects relatively often [21:14] rikarends: tj: all generic binding things i found either sucked at being nicely integrated in something like JS [21:14] mape: V1: jup [21:14] rikarends: tj: or had 0 performance [21:14] tj: rikarends: haha yeah, one of those [21:14] rikarends: tj: so o3 is the attempt to solve that [21:15] rikarends: tj: this canvas component also compiles as a browser plugin in IE now :) [21:15] rikarends: not that people care [21:16] gf3: rauchg_, tj: My code also looks like candy :) http://img.gf3.ca/6dde9f403e8f762d1c6b9262f4795f02.png [21:16] tj: gf3: haha sweet [21:16] bradleymeck: anyone in here good with xpath [21:17] tj: bradleymeck: http://css2xpath.appspot.com/ [21:17] isaacs: gf3: that color scheme makes my eyeballs twitch [21:17] V1: nice tripple ;;; gf3 [21:17] jgautier has joined the channel [21:17] jgautier: whats the best way to generate a pdf in node? [21:17] gf3: V1: so I don't miss it, for debugging only [21:17] roberthahn: bradleymeck: i am, what's up? [21:17] Anti-X: is that a color scheme? [21:17] gf3: isaacs: haha, I find it easy to visually parse [21:17] Anti-X: i thought it was vomit [21:18] roberthahn: bradleymeck: (only have a minute though - have to get supper ready for the fam) [21:18] isaacs: gf3: i've been liking the "camo", "desertEx" and "earendel" vim color schemes lately. [21:18] jimt_ has joined the channel [21:18] isaacs: gf3: i need lower contrast [21:18] mape: V1: Thanks a lot, works perfectly now, except for rememberTransport spamming cookies for each path [21:19] gf3: isaacs: I just discovered this bad boy, been meaning to try it out: http://forrst.com/posts/Clouds_Midnight_for_Vim-yZn#comment-land [21:19] alystair has joined the channel [21:19] V1: mape: I didn't even notice that yet, the cookie spam [21:19] gf3: isaacs: http://fredhq.com/projects/clouds/ (Click Javascript on the midnight side) [21:19] creationix_ has joined the channel [21:19] isaacs: yeah, pretty nice [21:20] mape: V1: mm yeah, seems it doesn't set the cookie to the root path, so when you move around it starts adding tons of them [21:20] alystair: isaacs: having trouble with npm install [21:20] tj: rikarends: weird, the require() for your lib is hanging on me [21:20] isaacs: alystair: gist!!!! [21:20] tj: but it worked just a minute ago [21:20] V1: mape: patch & pull :p [21:20] isaacs: alystair: er, what's the problem? [21:20] tj: looking into it [21:20] rikarends: tj: thats weird.. havent had that [21:20] mape: V1: hehe yeah, got to make my own stuff work first though ;) [21:20] alystair: I'm using nodejs debian package and nodejs runs via 'nodejs' and not 'node' [21:20] tj: rikarends: 99% sure it is because I am requireing it from a different location, but that is odd [21:20] blaines has joined the channel [21:21] alystair: so your install script errors out because 'node' doesn't exist [21:21] rikarends: tj: its 2 js files that just wrap the .node binary [21:21] prettyrobots has joined the channel [21:22] isaacs: alystair: ok [21:22] isaacs: alystair: ln -s $(which nodejs) /usr/local/node [21:22] isaacs: er, /usr/local/bin/node [21:22] tj: rikarends: the darwin one is failing for some reason [21:22] tj: and then it just hangs [21:22] rikarends: tj: you are on osx? [21:22] bradleymeck: tj you cant do what i want in css :/ [21:23] tj: bradleymeck: oh :p nvm [21:23] tj: rikarends: yeah. i took out the top try/catch and got rror: Cannot find module '../o3.js' [21:23] LuigiMontanez has joined the channel [21:23] rikarends: tj: yeah its doing a bunch of try catches to platform detect [21:23] bradleymeck: basically, "//text()[contains(translate(.,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'search')]" , trying to do case insensitive text search returning nodes, but doesnt work [21:23] LuigiMontanez has left the channel [21:24] tj: rikarends: its not working :( [21:24] rikarends: tj: if you know what platform you are on just rip everything out except the module.exports = require('./...') [21:24] tj: but it does from the examples dir [21:24] tj: yeah ill do that for now i guess [21:24] rikarends: tj: it works for everywhere i tried but its still a bit hacky since i dont know 'exactly' what platform im on [21:25] tj: gah [21:25] alystair: hmm guess I should be running node unshared :p [21:26] alystair: which means I need to uninstall the package first, bah effort [21:27] tj: rikarends: woah.. weird.. now the example that was working before hangs as well [21:27] rikarends: tj: euhhhhhhhhh [21:27] rikarends: tj: alright you've done it now. my module doesnt like you anymore :) [21:27] tj: haha apparently [21:28] danielrmz has joined the channel [21:28] rikarends: but i have no clue whats wrong sorry [21:28] rikarends: random hanging now whilst it worked before doesnt ring a debug bell here [21:28] danielrmz has joined the channel [21:29] danielrmz has joined the channel [21:29] gf3: bradleymeck: sounds like a job for not xpath :) [21:30] alexfner has joined the channel [21:30] tj: rikarends: now its working again haha [21:30] alystair: isaacs: has anyone approached you with a real "please-pwn-my-machine-kthx" package? [21:30] isaacs: alystair: hehe, no :) [21:30] slaskis has joined the channel [21:31] alystair: maybe just make it echo out something silly if you're not running it under sudo [21:31] bradleymeck: gf3 sounds like its painful to manage nodes myself otherwise ;) [21:32] rikarends: tj: anyway i think it still has quite a few hairy issues. in its current form its been tested to the point of 'hey there is an image coming out of it' But perf/mem stuff is not hard so that will be soon. [21:32] alystair: "this nodejs installation now has magical bacon powers" [21:32] gf3: bradleymeck search plain text, then find nearest node [21:32] alystair: ACTION notes to self to make an app with 'bacon' and 'morebacon' flags [21:33] jgautier: http://www.uncrate.com/men/culture/drinks/bacon-soda/ [21:33] bradleymeck: gf3, working in browser :( nearest node might be a lie when it comest to text nodes [21:33] bradleymeck: anywho almost figured it out [21:34] alystair: isaacs: maybe install.sh should be part of the repo? [21:35] gf3: bradleymeck: sounds neat, what are you making? [21:37] bradleymeck: some evil search functionality [21:37] olivvv__: can somebody help with getting my virtual box to work properly ? http://gyazo.com/9773e317840f092ff1b819030574809d.png [21:37] springmeyer has joined the channel [21:38] tj: olivvv__: did you give it a disk image? [21:38] tj: if not that is your problem :p [21:38] V1: @jgautier http://www.royalbaconsociety.com/blog/bacon-reviews/bacon-beer-yes/ :) [21:39] olivvv__: tj;where do i check that ? I thought it had automatically detected the right stuff during install [21:39] m3nt0r has joined the channel [21:42] mikedeboer has joined the channel [21:42] jgautier: V1 even bett4er! [21:42] alexfner: if the iPad had websockets, that would make this so much easier! [21:42] olivvv__: there is file>global settings>general and there is some path information to the virtualbox directory, other than that I see nothing related to a disk [21:42] meandi has joined the channel [21:44] StanAngeloff_ has joined the channel [21:45] aconbere has joined the channel [21:46] saikat has joined the channel [21:46] StanAngeloff__ has joined the channel [21:47] tmpvar has joined the channel [21:47] creationix: did we ever fix the bug in node where it refused to accept some valid headers? [21:48] creationix: *techically* headers can start with some non alpha chracters, and node crashes in these cases [21:48] bnoordhuis has joined the channel [21:49] creationix: ryah_: ping [21:49] ryah_: creationix: pong [21:50] creationix: ryah_: did you see my question about the http parser? [21:50] V1: alexfner: The upcomming iOS will bring websockets to mobile safari [21:50] ryah_: creationix: not sure [21:50] ryah_: creationix: certainly it doesn't crash [21:50] mjr_: V1: are you sure? The iOS 4.1 beta had websocket, and they removed it for the general release. [21:50] creationix: well, it fails the parsing [21:51] alexfner: V1: which one? [21:51] alexfner: V1: which update? [21:51] ryah_: creationix: could be - do you have an example? [21:51] mjr_: V1: they put ws back in iOS 4.2 beta, but who knows if they'll keep it in for the general release. [21:51] Gehhilfe has left the channel [21:51] V1: I'm running an iPad with iOS 4.2 beta 3 and it has websockets [21:51] creationix: ryah_: suppose a header starts with something crazy like "_eep-Alive" [21:52] ryah_: creationix: that's invalid http, i believe [21:52] creationix: node will throw a "Error: httpClient error Parse Error" [21:52] creationix: ryah_: The field-name must be composed of printable ASCII characters  [21:52] creationix:         (i.e., characters that have values between 33. and 126.,  [21:52] creationix:         decimal), except colon. The field-body may be composed of any  [21:52] creationix:         ASCII characters, except CR or LF.  [21:52] creationix: the parser seems to be looking for explicitly alpha characters [21:53] ryah_: creationix: link? [21:53] creationix: sure, just a sec [21:54] mjr_: V1: I just tried an iPad with the 4.2 GM seed, and it also has ws. Maybe it'll go out this time. [21:55] creationix: ryah_: http://www.w3.org/Protocols/rfc822/3_Lexical.html, let me see if I can find the http page that had it [21:55] drudge_ has joined the channel [21:56] ryah_: creationix: a section in 2616 ... [21:56] bnoordhuis: ryah_: rfc2616 refers to rfc822 [21:57] creationix: ok, so 822 is part of 2616 then? [21:57] creationix: (I'm new to all this http rfc stuff) [21:57] V1: mjr_: sure hope so, [21:57] ryah_: nm, found it [21:57] bnoordhuis: creationix: with regard to headers, yes [21:57] ryah_: bnoordhuis: 2616 defines everything [21:58] ryah_: wrt to message parsing [21:58] ryan_gahl has left the channel [21:58] bnoordhuis: ryah_: from 4.2: follow the same generic format as that given in Section 3.1 of RFC 822 :) [21:58] matt_c has joined the channel [21:58] stride: creationix: 822 is talking about text messages on a higher level and was defined before 2616, in which they refer to the other one [21:58] ryah_: creationix: yeah, i guess you're right - did you run into a specific real-life message? [21:58] creationix: I see in 4.2 of 2616 [21:58] ryah_: creationix: which failed? [21:59] creationix: ryah_: yep [21:59] ryah_: creationix: can i put it into my test suite? [21:59] altamic has joined the channel [21:59] creationix: ryah_: all you need is a header with a non alpha character at the start [22:00] creationix: ryah_: do you need the exact headers we saw in the wild? [22:00] freeformz has joined the channel [22:00] creationix: and should I file a node bug? [22:01] ryah_: creationix: i don't need it - i like having my little collection of oddities [22:01] ryah_: produced by real-life software [22:02] creationix: ryah_: https://gist.github.com/0b118168961709e64115 [22:02] bnoordhuis: ryah_: what would happen if the http status line has non-ascii characters in it? some java application servers do that [22:02] ryah_: creationix: crazy [22:02] creationix: yeah, not sure about the connect close at the end wither [22:03] creationix: strange software [22:03] creationix: and the funny thing is it seems to return proper headers if you request from curl instead of node [22:03] ryah_: creationix: can you file a bug for me in ry/http-parser ? [22:04] creationix: sure [22:04] modular: mjr_: that lsof command says 98... i'm quickly approaching 10000 searches since i posted it to hacker news 2 hours ago. [22:05] mjr_: modular: and probably like 0% CPU utilization, and oh, 18MB of RSS I'd guess? [22:06] BillyBreen has joined the channel [22:06] aho has joined the channel [22:06] mjr_: Time to go home early. [22:06] modular: mjr_: 24m, load is at 0.01 [22:08] creationix: ryah_: https://github.com/ry/http-parser/issues/#issue/15 [22:08] creationix: ryah_: there was the same issue already there, I added more info [22:08] sonnym has joined the channel [22:10] creationix: ryah_: would you be able to get to this bug quickly or would you prefer I submit a patch for me? I need it fixed pretty quickly. [22:10] creationix: s/for me/from me/ [22:11] Omni5cience has joined the channel [22:12] ph^ has joined the channel [22:13] dgathright has joined the channel [22:14] ryah_: creationix: im working on it now [22:16] ryah_: real life http is awful [22:16] ryah_: s/real life// [22:16] SubStack: what about fantasy http? [22:18] ryah_: creationix: you odn't want me to interpret "_eep-Alive" as "Keep-Alive" do you? [22:18] ryah_: creationix: because - that would be total insanity - or? [22:18] inimino: looks like some proxy mangling [22:19] inimino: the parser should probably just pass it through [22:19] BillyBreen has left the channel [22:20] eee_c has joined the channel [22:23] rwaldron has joined the channel [22:24] evanmeagher has joined the channel [22:26] InsDel has joined the channel [22:26] sudoer has joined the channel [22:26] mape: tj: Btw great work on the canvas implementation :) [22:26] tj: mape: thanks man! its not over yet :) [22:26] tj: fun/interesting project tho [22:26] mape: hopefully not :) How is the performance? [22:27] tj: good [22:27] tj: https://gist.github.com/664922 [22:27] tj: I can only test a subset of theirs since it doesnt fully work yet [22:27] tj: neither of us have optimized though [22:28] slaskis: wow, looking great so far [22:28] tj: I should benchmark some browser implementations too. I know toDataURL() for example is roughly 10x faster than in FF [22:28] tj: at least last time I tried [22:28] mape: Hmm funny that there are two implementations released so close to eachother [22:29] tj: ahaha yeah i know.. I was going to release that day too actually [22:29] tj: but needed to get some docs together [22:30] bradleymeck has joined the channel [22:30] mape: tj: "Although node-canvas is extremely now," [22:30] bnoordhuis: ryah_: could/would you take this http parser patch? https://gist.github.com/664983 [22:30] mape: under Benchmarks in the readme [22:30] tj: mape: my bad [22:30] bnoordhuis: i'd like to preserve this behaviour [22:31] tj: haha [22:31] tj: fixed [22:31] tj: thanks [22:31] mape: np [22:31] tj: i should really read what I type [22:31] slaskis: i think the api in node-canvas feels more natural, more node.js i guess :P [22:31] tj: sure does [22:32] Zeph\k0d3: tj: slowly working my way back to feature parity :-) [22:32] Zeph\k0d3: tj: just added lineWidth, lineCap, lineJoin, globalAlpha [22:32] tj: :) [22:32] tj: nice nice [22:32] Zeph\k0d3: checking back my transform logic now, something went wrong somewhere [22:33] Zeph\k0d3: I also found out that the default nodeJS build script uses a VERY low optimization level [22:33] tj: i was getting segfaults BTW [22:33] tj: I forget what I was doing [22:33] tj: console.log(ctx.pngBuffer()) I think [22:33] Zeph\k0d3: yeah, quite possible still.. lots of unhandled edgecases [22:33] tj: does it? via node-waf? I didnt check that [22:34] Zeph\k0d3: I am personally only testing only windows and cygwin. rikarends is doing the osx64/lin32/lin64 basic "does it work" checks for me [22:34] Zeph\k0d3: -only+on [22:34] tj: windows hey [22:34] tj: hmmMMM [22:34] Zeph\k0d3: once it stabilizes a bit I'll move to those platforms [22:35] ryah_: bnoordhuis: im working on it now [22:35] Zeph\k0d3: I prefer devtools on windows... sorry [22:35] ryah_: bnoordhuis: it's not so easy because it breaks tests [22:35] tj: fair enough [22:35] bnoordhuis: ryah_: my patch or creationix's request? [22:35] tj: i thought that, before I stopped using it, and then I was like oh wow windows is brutal [22:36] bnoordhuis: mine is just a test case [22:36] ryah_: bnoordhuis: oh sorry [22:36] Zeph\k0d3: ACTION is generally working on www.blokmodular.com [22:37] ryah_: bnoordhuis: gladly [22:37] jamund: Struggling with spawning a new process. [22:37] creationix: ryah_: yeah, just pass it through, no auto correction [22:38] sideshowcoder has joined the channel [22:38] benburkert has joined the channel [22:38] ryah_: bnoordhuis: rebase on master please [22:38] Zeph\k0d3: tj: do you know the policy of the effect of transformation matrix on stuff like lineWidth? [22:38] ryah_: creationix: fixed in http-parser i'll merge it into node after i figure out mnot's stuff [22:39] gkatsev: anyone using node-boilerplate? and do you know why when I clone the repo I get no files in the html5-boilerplate dir under lib? [22:39] creationix: ryah_: awesome, thanks [22:39] ryah_: creationix: https://github.com/ry/http-parser/commit/51de89f8b026b38ff8edb9e68fdbbf08b499a61d [22:40] ryah_: bnoordhuis: nm - it's just one chunk, i can do it [22:40] bnoordhuis: i have faith in you :) [22:41] jamund: http://jsbin.com/ifiqu4/edit - new process doens't appear to work, returns exit code of 1. is that a bad error? [22:41] tj: mape: https://gist.github.com/664922#comments [22:41] tj: I will try the others [22:42] ryah_: bnoordhuis: merged thanks [22:42] bnoordhuis: my pleasure, ryah_ [22:42] rikarends: tj: i think there is something terribly wrong with how i set the build flags on this [22:42] mape: tj: nice [22:43] rikarends: it should be within percentage range of the 'workload' calls [22:43] Zeph\k0d3: tj: in the "states" test you have arc(5,5,-1) which is technically missing 2 arguments.. (and therefore throwing an invalid arg count exception on the o3 canvas) what were you trying to test with that statement? [22:43] tj: yikes FF is just locking right up [22:44] eee_c1 has joined the channel [22:44] rikarends: things like lineTo only measure api overhead though. with O3 in 'generic' mode the api overhead is what is measured. Still should only be alittle slower though [22:44] tj: Zeph\k0d3: hmm let me take another look in a second [22:44] Zeph\k0d3: I guess you were testing some path-state-saving there.. [22:48] slickplaid: var slicky = { holding: beer++; } [22:48] slickplaid: slicky.refreshed = function(beer){ if(beer) return true; } [22:48] slickplaid: just sayin [22:49] bradleymeck has joined the channel [22:50] tj: Zeph\k0d3: I must have copy/pasted another test and left that in some how lol its nothing to do with the test [22:50] tj: but yeah it should throw as well [22:50] Zeph\k0d3: ok, removing it made the test pop up nicely :) [22:50] shadow_walker has joined the channel [22:50] jacobolus has joined the channel [22:50] rcy has joined the channel [22:51] Zeph\k0d3: some other tests contain a bit of redundancy too [22:51] tj: nothing wrong with redundancy my friend [22:52] tj: especially when it comes to testing [22:52] Zeph\k0d3: makes the purpose of the test harder to decipher [22:52] gkatsev: ACTION is an idiot. Had to to run the command git submodule update --init --recursive [22:55] Anti-X: tests have a purpose? i thought they were there just to make the team leader happy [22:56] bradleymeck has joined the channel [22:56] rikarends: k without any fixes just adding -O3 puts us at around 5 secs for 100x the chart [22:57] tj: I cant remember what mine was now [22:57] stride: Anti-X: all those var foo = true; assertTrue(foo); files? yeah.. [22:57] rikarends: tj: cairo is by default compiled with high perf flags [22:58] tj: I meant the render duration [22:58] rikarends: oh 1000ms or so [22:58] rikarends: although i have not been able to test it yet cause i cant get cairo to work on my osx install [22:59] rauchg_: rikarends: port install cairo [22:59] dnolen has joined the channel [22:59] creationix1 has joined the channel [22:59] tj: I built pixman/cairo from source as well without troubles [23:02] mjr_ has joined the channel [23:03] faust45: tj: can i make rounded corners for any png file with node-canvas? [23:04] tj: faust45: uhh probably lol I wouldnt really recommend it for that.. we had other things in mind :p lol not just proxying some image to add rounded borders :p [23:04] tj: but you would need the PixelArray implementation in there for that [23:04] Zeph\k0d3: or image to image drawing [23:04] tj: yup, I have both almost done [23:05] tj: but I dont like to merge to master until I am happy with things [23:05] jacobolus has joined the channel [23:05] Zeph\k0d3: :-) [23:05] Zeph\k0d3: well in that case Id never commit a thing.. this is CANVAS we are talking about [23:06] Zeph\k0d3: a "standard" so hip they had to add fucking dropshadows.. [23:06] tj: haha [23:06] rikarends: thats probably a managerial decision [23:07] rikarends: 'does it have dropshadows? NO? fix that now!' [23:07] Zeph\k0d3: MAKE IT BLUR [23:07] davida has joined the channel [23:08] stride: why doesn't it blink?! [23:08] Zeph\k0d3: I could do with serverside colorcycle animations ;) [23:08] cardona507 has joined the channel [23:10] tj: rikarends: ah, yeah I am not -O3 either [23:10] tj: cairo perhaps (hopefully) but not me [23:12] jamund: fixed my spawn problem. arguments need to be an array. [23:12] jamund: :) [23:12] faust45: tj: for what stuff we can use node-canvas? [23:12] tj: whatever you want [23:12] tj: when the image related stuff is done it will be more useful in that respect [23:13] jchris has joined the channel [23:14] faust45: tj: my current project i need resize images and make round corners [23:16] mape: faust45: might want to look at https://github.com/aheckmann/gm [23:16] faust45: mape: i not found way make rounded corners with gm [23:17] tj: ah, nice -O3 helps a bit [23:17] jagwio has joined the channel [23:17] mape: faust45: oh yeah, perhaps not the rounded corners, but resizing and whatnot seems easier [23:18] tj: yeah, you cant do that stuff right now anyway [23:18] faust45: tj: node-canvas require cairo, but i don't found cairo package in Ubuntu [23:18] miccolis has joined the channel [23:19] tj: faust45: apt-get install libcairo2-dev [23:19] langworthy has joined the channel [23:19] faust45: tj: thanks [23:22] devinus_ has joined the channel [23:22] faust45: tj: i try install cario in mac port install cairo, but it's try install to many Dependencies Fucking crazy port try install sqlite3 [23:23] rikarends: tj: on a plain vanilla box im down to 1.4 secs node-canvas to 2.5 secs node-o3-canvas [23:23] rikarends: tj: i had every bad compiler flag in the book on it [23:23] Zeph\k0d3: and that is before actual optimizing :D [23:23] Zeph\k0d3: lots of bad code still in there [23:23] tj: faust45: uhhh lol what [23:25] jjcm: Zeph\k0d3: Bad code you say? [23:25] jjcm: ACTION is the sultan of bad code. [23:25] jjcm: ACTION writes "if ( foo == true )" [23:25] tj: haha [23:26] faust45: what i am doing wrong i dont need sqlite3 [23:26] devinus_ has joined the channel [23:26] rauchg_: but sqlite3 needs you [23:27] tj: i have no clue [23:27] saikat has joined the channel [23:27] tj: it should only really depend on pixman / libpng [23:28] tj: for the stuff I am currently doing with it at least [23:29] pkrumins_ has joined the channel [23:29] pkrumins_ has joined the channel [23:29] SubStack_ has joined the channel [23:30] davidascher has joined the channel [23:31] Zeph\k0d3: jjcm: not THAT bad [23:31] Zeph\k0d3: just "first quick try" code with no optimization in mind [23:31] Zeph\k0d3: mostly in terms of "try something easy first so you wont have to rethink your clever optimization once you are getting close to covering all the needed features" [23:31] robotarmy has joined the channel [23:32] siculars has joined the channel [23:32] faust45: tj: i can install only port install pixman libpng? instead of cairo [23:33] jjcm: Zeph\k0d3: So no, "if ( foo == false ) return false;" ? [23:33] tj: not instead of cairo .. those are dependencies of cairo [23:33] tj: but the package manager should handle those for you, I was just confused why sqlite is in there [23:33] jjcm: Zeph\k0d3: But those are my favorites :( [23:33] miccolis has joined the channel [23:34] faust45: tj: not only sqlite, xorg-libX11 libxml2 [23:34] Zeph\k0d3: jjcm: well.. I wont try and cramp your style [23:34] tj: faust45: weird [23:34] ossareh has joined the channel [23:35] rikarends: cairo wants java headers here [23:35] faust45: tj: full list dep http://friendpaste.com/1j5DCrlWsvLxdnzp9jyZvG [23:35] jjcm: Zeph\k0d3: Real men use chained ternary statements on one line instead of switches. [23:36] tj: faust45: not sure what to tell you man, I got it running on several servers in minutes [23:36] Zeph\k0d3: I have abandoned my masculinity ages ago.. I prefer code I understand 4 years from now ;) [23:36] faust45: tj: What os in server? [23:37] eisd has joined the channel [23:38] d0k has joined the channel [23:39] ph^ has joined the channel [23:40] rikarends: tj: btw in your bench, which call actually compresses to Png? [23:40] rikarends: tj: toBuffer()? [23:41] SubStack has joined the channel [23:41] tj: yeah, it uses my PNGStream to construct the node Buffer object [23:42] davidascher has joined the channel [23:42] [[zz]] has joined the channel [23:43] creationix has joined the channel [23:44] tekky has joined the channel [23:46] sveisvei has joined the channel [23:49] Aria has joined the channel [23:49] rikarends: tj: since we both use libPNG i find it odd its x4 off [23:49] rikarends: tj: must be some setting or something typo [23:50] tj: who knows [23:51] sudoer has joined the channel [23:52] javruben: joost may know [23:52] tg has joined the channel [23:54] mattly has joined the channel [23:55] Zeph\k0d3: zeph knows too [23:55] Zeph\k0d3: and has fixed a few things [23:55] javruben: yay! [23:57] hassox has joined the channel [23:58] hassox has joined the channel