[00:00] locksfree has joined the channel [00:00] tmcw has joined the channel [00:01] EagleCoder has joined the channel [00:01] Lingerance has joined the channel [00:01] Lingerance: https://gist.github.com/1233654 <-- anyone know why the first instanceof Function check is failing? [00:01] nuck has joined the channel [00:01] jonrohan has joined the channel [00:02] TooTallNate: Lingerance: in the REPL, every module has it's own set of the native objects (i.e Array, Function) [00:02] TooTallNate: so replcontext.Function !== othermodule.Function [00:03] Lingerance: Ah, lovely. [00:03] TooTallNate: instanceof is not generally "cross-context safe" [00:03] TooTallNate: see lib/util.js for some cross-context friendly versions (isDate(), isError()) [00:03] reid has joined the channel [00:04] craigpetchell has joined the channel [00:04] replore has joined the channel [00:04] replore_ has joined the channel [00:05] davidbanham has joined the channel [00:07] replore has joined the channel [00:07] replore_ has joined the channel [00:07] Lingerance: I don't see any is*() functions in util in the REPL or either set of docs. [00:07] jellosea: does anyone know what the implemetnation of an array in v8 is? is it a link list? [00:07] Lingerance: Scratch that. [00:07] jellosea: how expensive are the pop operations [00:09] AaronMT has joined the channel [00:15] ChrisPartridge: jellosea: considering pop removes the last element, it won't have to re-address each item in the array - so i would hazard to guess not very expensive at all [00:16] dylang_ has joined the channel [00:17] jellosea: oh [00:17] jellosea: ChrisPartridge: how do i remove the firsrt elemetn [00:17] Lingerance: shift() [00:18] normanrichards has joined the channel [00:24] wadey has joined the channel [00:24] craigpetchell has joined the channel [00:25] dmkbot has joined the channel [00:26] EhevuTov has joined the channel [00:26] bnoordhuis has joined the channel [00:28] jslatts has joined the channel [00:28] nuck has joined the channel [00:29] EyePulp: I thought it was unshift() [00:29] konobi: that inserts at the front [00:29] EyePulp: shift adds one to the beginning [00:29] EyePulp: ACTION is all mixed up [00:29] konobi: inverse [00:29] EyePulp: aha [00:30] MacDiva has joined the channel [00:30] konobi: shift(), unshift(item) [00:31] EagleCoder has joined the channel [00:31] Me1000 has joined the channel [00:32] innociv: Dealing with arrays is what I hate most about JS. [00:32] jzacsh has joined the channel [00:33] jtsnow has joined the channel [00:34] phiggins has joined the channel [00:35] aho: *shrug* [00:35] aho: it's the part i enjoy most [00:35] Frippe has joined the channel [00:36] JakeyChan has joined the channel [00:36] k1ttty has joined the channel [00:37] markdaws has joined the channel [00:39] davidbanham has joined the channel [00:40] v8bot_ has joined the channel [00:41] tizzo-afk has joined the channel [00:47] ditesh|cassini has joined the channel [00:48] dreamdust: @innociv: Maybe you'd find http://streamjs.org/ useful? Ignoring the name and sensational tone. [00:48] perezd has joined the channel [00:48] albertosheinfeld has joined the channel [00:49] innociv: I like simply using mootools array extensions. [00:49] albertosheinfeld: When should i use Node.js? [00:50] MooGoo: sometime next week [00:50] albertosheinfeld: lol [00:50] Lingerance: When it's the right rool for the job. [00:50] Cromulent has joined the channel [00:50] mandric has joined the channel [00:50] MooGoo: ok I'll ask here too... [00:50] albertosheinfeld: yeah but what's an example of that? why don't just use apache or any other server side technology? [00:50] innociv: When you need something that doesn't always run on a page request. [00:51] MooGoo: airplane programed in nodejs ? good : great [00:51] innociv: Apache doesn't do serverside javascript. [00:51] albertosheinfeld: i know it doesn't but it does php and i can talk with the server using ajax... [00:52] MooGoo: someone should make a node-autopilot module [00:52] innociv: But ajax is javascript on the client. nodejs is javascript on the server. Kind of makes sense to write back and forth with the same language. [00:52] innociv: And node.js does websockets easy. [00:52] albertosheinfeld: that's the only plus i see (websockets) [00:52] mike5w3c has joined the channel [00:52] albertosheinfeld: cause as far as i know, node just doeesn;t scale [00:52] innociv: If you have a php app you're already using, use apache and php. If you are making your own real time application, you should certainly make it with node. [00:53] innociv: How doesn't it scale? When apache is using 4-8mb per user, and node a few kb. [00:53] Nuck|mobile has joined the channel [00:53] albertosheinfeld: so what will you do when you have a million users doing millions of requests? [00:53] innociv: The same thing you'd do on apache, run it on multiple processes/servers? [00:53] MooGoo: sell out to google and retire [00:53] innociv: Haha yeah that too. [00:54] gazumps has joined the channel [00:54] dmkbot1 has joined the channel [00:54] albertosheinfeld: ok so my question is how do you run multiple node servers as one? behind a load balancer i mean... [00:54] albertosheinfeld: is it possible already? [00:54] tmzt: can also try fpm for php or some other fcgi setup [00:54] innociv: Yes. They can communicate to each other through a socket iirc. [00:54] diamonds has joined the channel [00:54] diamonds has joined the channel [00:54] innociv: The video on the node.js page explains this toward the end. [00:55] innociv: www.nodejs.org [00:55] albertosheinfeld: thanks! [00:55] albertosheinfeld: i will deffinitely check it out [00:55] albertosheinfeld: so you are telling me that node can scale? this is the first time i hear this... many people have told me it just doesn't [00:55] innociv: Each process will run independantly, but can communicate with each other, the same way you would scale something like google onto multiple servers even if you're only doing it for multiple threads. [00:56] albertosheinfeld: and since it also only run on one thread it just cannot compare with other server techs like apache [00:56] innociv: Lots of websites are using node.js to handle hundreds of thousands of concurrent connections, so I'd think it scales. [00:56] innociv: Anyway, scale compared to what? [00:56] Me1000 has joined the channel [00:56] MooGoo: anything can scale if you throw enough hardware at it [00:56] innociv: What else does real time data like it does that scales? [00:56] innociv: You can't compared apache delivering static pages to node.js delivering real time interaction between users... [00:57] MooGoo: apache is 1 thread per request [00:57] MooGoo: lots of overhead [00:57] albertosheinfeld: yeah Moo, but it can cost you X times more [00:57] albertosheinfeld: to throw 10 servers than to throw 2 [00:57] MooGoo: nodejs "doesnt scale" for the same reason any other new platform doesnt [00:57] albertosheinfeld: i think 2 apache servers well configured could handle more than 5 node servers (i dont know) [00:57] innociv: If you don't need node.js, don't use it. Node.js allows you to develope much richer applications much easier. [00:57] albertosheinfeld: i want to use it, i loooove javascript [00:58] MooGoo: it just hasnt been tested as much as apache [00:58] innociv: If you just need a basic website, don't use it. And yeah node.js is still young and being improved. [00:58] jslatts has joined the channel [00:58] MooGoo: if PHP can scale....node can [00:58] innociv: Yeah [00:58] innociv: I don't see how php is going to run better than node.. so much overhead. [00:59] albertosheinfeld: yeah but multithreaded [00:59] MooGoo: think of it instead of 1 request per thread, a crap ton of requests per thread [00:59] albertosheinfeld: why facebook is on php and not in node? [00:59] MooGoo: facebook php? [00:59] innociv: facebook is older than node [00:59] albertosheinfeld: so what? [00:59] Skyec: facebook actually changed php to run faster [00:59] albertosheinfeld: exatly [01:00] albertosheinfeld: you can't do that to javasciprt [01:00] Lorentz: Facebook is written in PHP, but it's because they have existing source code to work with (why rewrite everything?), and they do crazy stuff with php. [01:00] albertosheinfeld: or node (for now) [01:00] MooGoo: yea [01:00] Lorentz: iirc they compile php to binary with hiphop. [01:00] MooGoo: its because it works and everyone uses it [01:00] innociv: php has a lot of nice things, like image editing libraries. [01:00] Lorentz: I think they actually wrote hiphip. [01:00] Lorentz: hiphop. [01:00] MooGoo: heh [01:00] MooGoo: php has lots of functions [01:00] innociv: albertosheinfeld, I use php for basic pages. I have node.js just for real time data. [01:00] Skyec: this sounds a lot like a "screwdriver is better than a hammer" argument [01:00] innociv: You can use them together [01:00] innociv: skyec, yeah exactly. [01:00] albertosheinfeld: the thing is [01:01] Skyec: "Screwdriver is better! It screws and unscrews!" etc [01:01] saikat has joined the channel [01:01] albertosheinfeld: that i have a website with a lot of concurrent users, i want to start adding websockets to it [01:01] MooGoo: and it can kinda hammer if you flip it upside down [01:01] Skyec: work out your requirement, use the right tool/technology. simple [01:01] innociv: albertosheinfeld, you'll also note this channel has 50% more people than php's when php is 10x older. Not sure that means anything. [01:01] albertosheinfeld: but i am afraid to start a new technology without knowing where are the limits, that's why i'm asking [01:01] MooGoo: well [01:01] Skyec: ask the right questions, don't try and make generalized comparisons [01:01] MooGoo: nodejs modules are generally not nearly as mature or plentifuly as PHP and such [01:02] JaKWaC_ has joined the channel [01:02] MooGoo: which is a good reason not to use it for the time being [01:02] innociv: You can do anything with node.js. The only limit may be effeciency, and I guess we're not sure how to overcome that limit. node.js does use a lot of cpu(But low memory) [01:02] MooGoo: does it? [01:02] innociv: what I hear. And it makes since, being javascript VM and all [01:02] innociv: sense* [01:02] albertosheinfeld: well on real time apps that's waht matters [01:02] innociv: But on a cheap dedicated server can still handle tens or hundreds of thousands of people [01:02] MooGoo: PHP/Python/Ruby are all VM's [01:02] CStumph_ has joined the channel [01:03] MooGoo: and js has considerbly more resources dedicated to making it fast [01:03] albertosheinfeld: simple requests you mean? [01:03] innociv: Aren't google still working on V8 as well and making it faster? [01:03] CStumph_ has left the channel [01:03] innociv: Because, yeah, it runs on chrome. Google wants chrome to be fast. Needs a good JS engine. [01:03] innociv: JS has gotten faster and faster on the browser end the past few years. [01:03] MooGoo: a single node instance should be able to easily handle thousands of users [01:03] innociv: I'd say easily tens of thousands. [01:04] albertosheinfeld: that's nonesense guys.. it depends completely on the request types [01:04] mikeycgto has joined the channel [01:04] mikeycgto has joined the channel [01:04] albertosheinfeld: you can have a heavy data request or a simple message passing request [01:04] innociv: I have a dual core 2.4ghz opteron. Of course it's only using one core. My server not even running at 5% cpu to handle a thousand. [01:04] albertosheinfeld: and that's a completely differnet story [01:04] innociv: And yes, it depends on how much work the js is doing. [01:04] Brandon_R has joined the channel [01:04] Brandon_R: hello guys [01:04] MooGoo: that would seem to apply to all languages [01:04] innociv: If you're looping over tens of thousands long arrays every request, yes that's slower, and it's still cpu. [01:05] Brandon_R: is this for real? [01:05] Brandon_R: http://www.youtube.com/watch?v=JF3KMqkIXwE [01:05] innociv: But php has a ton of overhead unless you really chop it up to scale it back. [01:05] innociv: basic php install is tons of overhead. [01:05] albertosheinfeld: i agree there [01:05] aho: v8 is already a lot faster than php, ruby, or python [01:05] aho: doesnt really matter for most apps though [01:05] infynyxx has joined the channel [01:05] MooGoo: not just that...ever request spawns a new thread, loading php and all of its thousands of global functions [01:05] MooGoo: every time [01:05] MooGoo: reloading sessions and what not [01:06] innociv: Yep [01:06] MooGoo: sessions in nodejs are regular variables [01:06] albertosheinfeld: well thanks for the info, great discussion, i'll definitely try it out on a simple application to see how it goes [01:06] Brandon_R: php is too blah for me [01:06] diamonddog: php is a geat language, but yet incomparable to node performance wise, if you are looking for node like php lib you can try http://phpdaemon.net/ [01:06] MooGoo: is there a mod_node out there? [01:06] innociv: node.js is one instance, just like the instance on a single browser, that's constnatly running. You can keep doing a loop in it, regardless of the number of connections to it. [01:07] Brandon_R: very nice [01:07] airhorns has joined the channel [01:07] innociv: albertosheinfeld, it's easy to get started. [01:07] innociv: Assuming you've compiled something from source before. [01:07] albertosheinfeld: where is the best tutorial out there? [01:07] innociv: the wiki [01:07] albertosheinfeld: sure i have [01:07] albertosheinfeld: ok [01:07] innociv: there is a bit of lack of documentation. [01:08] innociv: But once you have it installed, you just make a javascript file, put in a port and ip to listen to, and tada. [01:08] AvianFlu: http://docs.nodejitsu.com [01:08] innociv: Oh, nice, i needed that site too :p [01:08] z6Dabrata has joined the channel [01:08] Brandon_R: did any of you guys check this out [01:08] MooGoo: I liked the old style node.js docs better [01:08] willwhite has joined the channel [01:08] Brandon_R: possible nodejs exploit [01:08] Brandon_R: http://www.youtube.com/watch?v=JF3KMqkIXwE [01:08] innociv: I just got started with node.js yesterday and I've already made a cross-domain websockets connection that's sending/receiving data. About to work on my first ajax request. [01:09] Brandon_R: programming in nodejs is really fast [01:09] MooGoo: really fast? [01:09] Brandon_R: take a look at how many top noch addons there are [01:09] MooGoo: too fast sometimes [01:09] innociv: You can use jquery or mootools with it, no? mootools has a serversidejs package. [01:10] albertosheinfeld: btw, anyone going to f8 tomorrow? [01:10] MooGoo: still hard to find a decent sqlite3 modules [01:10] MooGoo: among others [01:10] c4milo has joined the channel [01:10] codely has joined the channel [01:10] albertosheinfeld: i'll be there [01:11] Cromulent has joined the channel [01:11] MooGoo: wtf is even going on in that takedown video [01:11] clu3 has joined the channel [01:11] Brandon_R: i have no idea moogoo [01:12] Brandon_R: i just searched nodejs and it popped up [01:12] MooGoo: that doesnt look like logs from stock nodejs [01:12] sechrist: it's really fast [01:12] MooGoo: besides...if your node process happens to crash....you can always start a new one [01:13] sechrist: I node code like zoom zoom [01:13] MooGoo: there are modules for that [01:13] MooGoo: nodejs was purpose built to run irc bots you know [01:14] darshanshankar: albertosheinfeld: wish i was! didn't buy tickets :( [01:14] sechrist: I use it to run botnets [01:14] sechrist: a few hundred thousand dnode connections to browsers is pretty much a botnet [01:15] innociv: Well, after you learn it it's fast... [01:15] sechrist: google has a botnet too [01:15] Brandon_R: google is a botnet [01:15] amigojapan has joined the channel [01:15] Brandon_R: do you guys use tdd? [01:16] jonrohan has joined the channel [01:17] codely: hey isaacs you around? [01:17] codely: Brandon_R: yeah [01:17] Brandon_R: nice [01:17] Brandon_R: got any examples? [01:17] codely: anyone else using a git repo especially git repo that is private as a module dependency? [01:17] isaacs: codely: hi [01:17] isaacs: what's up? [01:17] codely: Brandon_R: i use testosterone [01:18] Brandon_R: cool name [01:19] codely: isaacs: i can git clone a repo in this format on the command line right so .. git@github.com:me/repo.git but the format that npm accepts, fails? it's a private repo that i have access to… git://github.com/me/repo.git [01:19] codely: so the first i can git clone, the second (format npm takes right?) fails .. any ideas? [01:19] codely: I'm on 1.0.30 sorry to bother but i know git is a new feature? [01:20] codely: "/var/folders/v8/3vjpw929241_bzx3qs2vhhjw0000gn/T/npm-1316654400810/1316654400810-0.7368899518623948"` failed with 128 [01:20] isaacs: codely: fixed on HEAD, not released yet [01:20] CStumph_ has joined the channel [01:21] codely: just git clone https://github.com/isaacs/npm.git && cd npm && sudo make install? [01:22] davidascher has joined the channel [01:22] enhydra has joined the channel [01:23] codely: yeah i have so many items in /lib for this project ready to use across the board internally .. ergo private on these :/ [01:25] MooGoo: did we ever decide if nodejs is ready to power airplanes [01:25] devongovett has joined the channel [01:26] codely: isaacs: the head meaning?? [01:26] codely: committed or? [01:26] isaacs: codely: meaning committed on master, yeah [01:26] davidban_ has joined the channel [01:26] codely: cool thx [01:26] codely: appreciate it a ton, i spent like 2 hours checking ssh keys on my other machine :P [01:26] MooGoo: issacs what do you think....node-autopilot? [01:27] davidcoallier has joined the channel [01:28] CStumph_ has joined the channel [01:28] codely: hah [01:29] Isaiah has joined the channel [01:29] MooGoo: im not sure if async programing is conducive to not crashing [01:29] codely: hey isaacs i git cloned npm, sudo make install - npm -v still says 1.0.30 which i get .. but n o resolution ? [01:30] ditesh|cassini has joined the channel [01:30] isaacs: ah, hadn't pushed [01:31] isaacs: fixed on f461ecd215111ec4bfc608d327ddb80439390907 [01:31] RDove has joined the channel [01:31] codely: sweet [01:31] codely: ty [01:31] dynacker: :-) [01:31] isaacs: np [01:31] codely: my girlfriend makes jokes at home when i say "coming to bed!" she says [01:31] codely: ' [01:31] codely: "GIT PUSH HUH!?" [01:32] ChrisPartridge: isaacs: setup node and npm on a new machine last week, when using npm install - it appears to be putting modules in ~/node_modules rather than node_modules in the application folder - any idea what would cause this? [01:32] schwab has joined the channel [01:33] isaacs: ChrisPartridge: it walks up the tree to find a node_modules or package.json to determine the root [01:34] jldbasa has joined the channel [01:35] codely: :/ is not in the npm registry. [01:35] codely: npm ERR! 404 You should bug the author to publish it. [01:35] mhiku has joined the channel [01:36] codely: what format will work for a git repo with the latest on the HEAD? isaacs [01:36] postwait has joined the channel [01:36] chance- has joined the channel [01:37] isaacs: codely: $ npm install git+ssh://git@github.com:isaacs/sax-js.git [01:37] isaacs: sax@0.2.4 ./node_modules/sax [01:38] isaacs: i mean, *THAT* one won't work, since you're not isaacs [01:38] isaacs: $ npm install git+https://github.com/isaacs/sax-js.git [01:38] isaacs: sax@0.2.4 ./node_modules/sax [01:38] isaacs: but that one will [01:38] codely: ahh [01:38] mhiku has joined the channel [01:39] davidbanham has joined the channel [01:39] saikat has joined the channel [01:40] [diecast] has joined the channel [01:40] [diecast] has joined the channel [01:40] [diecast] has joined the channel [01:40] kennberg has joined the channel [01:41] brianseeders has joined the channel [01:41] davidbanham has joined the channel [01:41] [diecast]: what is the name of the module or script that allows multiple node versions within a virtual type env [01:42] z6Dabrata has joined the channel [01:43] z6Dabrat_ has joined the channel [01:44] Eber has left the channel [01:45] CarterL has joined the channel [01:45] flexd has joined the channel [01:47] socketio\test\74 has joined the channel [01:47] socketio\test\18 has joined the channel [01:49] neoesque has joined the channel [01:49] Skyec: is there a standard convention that I should be following for callback fucntions? e.g. function(err,result); etc [01:50] freewil: yes [01:50] freewil: first param is usually always err [01:50] freewil: defacto node standard [01:50] Skyec: is there somewhere I can look to know what the convention is? [01:51] Skyec: i'm ujst wondering if there's a reference or an article [01:51] freewil: not that i know of [01:51] Skyec: okay, thanks [01:51] freewil: most libraries follow that convention though [01:51] innociv: http://pastebin.com/aDNz6BM6 I can't figure out what this is about when I simply try to bind express with the hello world ontop of doing something with socket.io. At first I thought I might have something already bound on that port/ip, but that doesn't seem to be the case. [01:51] Skyec: yeah, that's been my observation too [01:52] Skyec: innociv: don't you need to put in a res.end()? [01:52] Skyec: oh wait.. nevermind [01:52] konobi: Skyec: cove? [01:52] Skyec: konobi: what is cove? [01:53] konobi: Skyec: nvm... your nick is very similar to someone I know [01:53] Skyec: no poroblem [01:53] chance- has joined the channel [01:55] d0k has joined the channel [01:56] hornairs has joined the channel [01:59] dominictarr has joined the channel [02:00] innociv: ok wtf [02:00] jmoyers: innociv yo [02:00] jmoyers: you are binding to 80 [02:00] jmoyers: you need root for that [02:00] jmoyers: are you running root? [02:00] innociv: Oh [02:00] jmoyers: bind to 8080 [02:00] jmoyers: lower numbered ports are priveleged [02:00] maxogden: i use port 1492 because i love america [02:00] jmoyers: maxogden++ [02:00] v8bot_: jmoyers has given a beer to maxogden. maxogden now has 2 beers. [02:00] jonrohan has joined the channel [02:00] ChrisPartridge: isaacs: ah ok, thanks - somone must of npm installed in ~ [02:00] innociv: I want to bind to 80 though. [02:00] Oi has joined the channel [02:00] innociv: Lol, Max. [02:01] jmoyers: why? [02:01] jmoyers: dont run node as root [02:01] jmoyers: bind to a higher numbered port, and use iptables to forward [02:01] jmoyers: or some such [02:01] isaacs: i use port 15443 because my name is isaac [02:01] innociv: Oh [02:01] isaacs: or 0x15AAC [02:01] maxogden: lolz [02:01] TooTallNate: isaacs: that port is too high :p [02:01] isaacs: 88748? [02:01] isaacs: nah, it's fine [02:02] isaacs: just bump up your ephemeral port limit [02:02] yuwang has joined the channel [02:02] TooTallNate: haha for sure [02:02] innociv: That's weird though. On all the other httpd's you just bind to 80. [02:02] isaacs: oh, i geuss it is beyond the 2byte limit, huh? [02:02] jmoyers: there are ways to use a privileged port and then downgrade your permission and such [02:02] TooTallNate: isaacs: ya there's that ;) [02:02] jmoyers: i am not super aware of the downsides or upsides innociv, perhaps someone else can comment [02:03] isaacs: innociv: on the other httpd's, you have to start them as root. [02:03] jmoyers: but don't they jail them? [02:03] isaacs: innociv: and then they setuid to some other "http" or "www" user [02:03] TooTallNate: innociv: there's no technical reason you can't run as root, we're just saying there's better ways [02:03] jmoyers: like apache's process isn't root [02:03] jmoyers: its run under a jailed user is it not? [02:03] isaacs: jmoiron: no, it setuids [02:03] jmoyers: ah [02:03] isaacs: jailed user, not a "jail" in the bsd sense [02:03] jacobolus has joined the channel [02:03] tbranyen: like literally incarcerated [02:03] phiggins has joined the channel [02:04] isaacs: http.createServer(handler).listen(80); process.setuid("nobody") [02:04] isaacs: you can only do that as root [02:04] tbranyen: isaacs: i always wondered if that was the best way, seems like something like authbind is cleaner [02:04] tbranyen: philosophically [02:04] broofa_ has joined the channel [02:04] torsd has joined the channel [02:04] jmoyers: yeah, but is there an objective reason? [02:04] jmoyers: i've wondered myself [02:04] konobi: setuid and setgid together at least [02:05] isaacs: well, on solaris, you could just start hte process as "nobody", adn give "nobody" the right to run on port 80 [02:05] jmoyers: i just use iptables prerouting and be done with it :P [02:05] saikat has joined the channel [02:05] tbranyen: heh friend sitting next to me argues that, dropping privs in your code is how you're supposed to do it... so i guess i'm just misinformed [02:06] isaacs: npm does that in the child processes it creates if you're runing as root [02:06] kurtzhong has joined the channel [02:06] tbranyen: i guess it just seemed kinda weird to me [02:06] isaacs: yeah [02:07] tbranyen: authbind has been working, but its kind of a pain to have to set it up every time [02:07] lepht has joined the channel [02:07] Emmanuel_ has joined the channel [02:07] softdrink has joined the channel [02:07] jmoyers: huh [02:07] jmoyers: is listen synchronous? [02:08] AvianFlu: jmoyers: I think it takes a callback? [02:08] innociv: I'll do the port forwarding. Just seems weird, like more overhead. [02:08] kurtzhong has joined the channel [02:08] abraxas has joined the channel [02:08] TooTallNate: jmoyers: i think the port binding part (the first part) is synchronous [02:08] jmoyers: in that case, it out to be liste(80, function(){ process.setuid('nobody') }); i suppose [02:08] jmoyers: ah, gotcha [02:08] TooTallNate: then listening on the port is async [02:08] [diecast]: what is the name of the module or script that allows multiple node versions within a virtual type env [02:09] jmoyers: innociv well these fine gentlemen are suggesting you run as root and drop priviledges [02:09] innociv: Drop priviledges? [02:09] jmoyers: nvm [02:09] TooTallNate: innociv: setuid(), setgid() [02:09] jmoyers: change the user to a less privileged user, with setuid [02:09] chance- has joined the channel [02:09] jmoyers: so you start as root, but move to somebody who can't destroy your whole shit [02:10] innociv: So I need to make a new user in debian with the privs to do pretty much nothing but run something on port 80? [02:10] isaacs: the thing is, you trust YOUR code [02:10] isaacs: but your code is opening up a door to the outside world, and might have cracks [02:10] isaacs: so you need to downgrade perms so that an attacker, if he gets in, can't do much [02:10] jmoyers: innociv if debian has the ability to do that, sure [02:10] jmoyers: then you don't need to start as root [02:10] jmoyers: isaacs unless there's a local root exploit ;P [02:11] jmoyers: then just go home and cry [02:11] innociv: What do you mean by not start as root? [02:11] isaacs: jmoyers: sure, but then you can't safely run ANY server as anyone [02:11] innociv: Like I can't even sudo node file.js. Says there is no such command as node. [02:11] jmoyers: we should just shut the internet down imo [02:11] isaacs: innociv: man sudo; man visudo; man sudoers [02:12] isaacs: innociv: configure sudo to keep your env consistent [02:12] arpunk has joined the channel [02:13] innociv: See, now it gets all complicated for me. [02:14] maxogden: node helloworld.js throws a weird exception for me: "Sorry you must learn Unix before using this program" [02:14] dynacker: Skyec: [02:14] chance- has joined the channel [02:14] jmoyers: ;-) [02:15] innociv: Lol [02:15] jmoyers: innociv it doesn't get complicated until you deploy [02:15] jmoyers: develop on 8080 [02:15] normanrichards has joined the channel [02:15] jmoyers: it doesn't make a difference [02:15] jmoyers: then you learn about that shit once, and move on [02:15] [diecast]: was anyone in here at the meetup tonight at pivatol [02:15] jmoyers: something like no.de or nodejistu probably abstracts all this business away [02:16] innociv: It's not going to take me long to deploy this, so yeah, need it listening on 80. [02:16] zeiris has joined the channel [02:17] mrryanjohnston: innociv: can't you jhust port forward from incoming 80 to 8080? [02:17] innociv: Yeah. [02:19] lepht1 has joined the channel [02:20] EhevuTov has joined the channel [02:20] jacobolus has joined the channel [02:21] Nuck has joined the channel [02:21] Peniar has joined the channel [02:23] _jhs has joined the channel [02:25] vns has joined the channel [02:26] vns_ has joined the channel [02:31] willwhite has joined the channel [02:32] paz1200 has joined the channel [02:33] Vertice has joined the channel [02:33] nerdfiles has joined the channel [02:34] nerdfiles has left the channel [02:34] Vertice has joined the channel [02:34] hidden has joined the channel [02:37] NewCoder has joined the channel [02:38] nerdfiles2 has joined the channel [02:39] nerdfiles2 has left the channel [02:40] githogori has joined the channel [02:41] mandric has joined the channel [02:41] anveo has joined the channel [02:42] broofa has joined the channel [02:42] smathy has joined the channel [02:44] blueadept: any mongodb pros in here right now? [02:44] blueadept: nobody alive in #mongodb [02:45] bnoordhuis has joined the channel [02:46] innociv: Hm so if I bind to localhost:3000, what would I actually be forwarding to on iptables? [02:47] ditesh|cassini has joined the channel [02:48] mrryanjohnston: ? [02:49] mrryanjohnston: innociv: 80->3000 [02:51] Eber has joined the channel [02:51] jmoyers: innociv iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 [02:51] Eber: what is the window relative od node.js? [02:51] jmoyers: most probably [02:51] Eber: like, the main global namespace? [02:51] vidi has joined the channel [02:52] innociv: Oh I thought I'd need to have the ip. [02:52] schwab has joined the channel [02:53] chance- has joined the channel [02:54] jmoyers: Eber globals object [02:55] micheil has joined the channel [02:55] mandric has joined the channel [02:58] JakeyChan has joined the channel [02:58] langworthy has joined the channel [03:01] k1ttty has joined the channel [03:01] nuck has joined the channel [03:03] vidi has joined the channel [03:03] Me1000 has joined the channel [03:04] hswolff has joined the channel [03:08] davidbanham has joined the channel [03:10] Aikar: how can i determine if there is a getter on an object defined by obj.__defineGetter__ ? [03:11] jmoyers: Aikar __lookupGetter__? [03:11] Aikar: nvm, __lookupGetter__ [03:11] Aikar: yeah just found it [03:11] jmoyers: not sure if its implemented in v8, though [03:11] jmoyers: presume it is [03:11] Aikar: it is [03:11] Aikar: just tested on node shell [03:13] MooGoo: Object.getOwnPropertyDescriptor should work too [03:15] ben_alman: is there a synchronous method to test if a certain path exists? [03:15] tbranyen: fs.statSync [03:15] boehm has joined the channel [03:15] ben_alman: thanks [03:16] jmoyers: we should get stackoverflow points for #node.js [03:16] jmoyers: also #javascript [03:16] MooGoo: clearly [03:17] chance- has joined the channel [03:17] MooGoo: we got beer at least [03:17] ben_alman: tbranyen, fs.statSync throws an exception if the path doesn't exist [03:17] ben_alman: is there a way to do it without handling an exception? [03:18] ben_alman: hmmn SO says path.existsSync [03:18] ben_alman: didn't see it in the docs [03:18] jmoyers: ben_alman uuh [03:18] jmoyers: path.exists [03:19] jmoyers: is probably a better choice [03:19] jmoyers: methinks [03:19] ben_alman: path.exists is async [03:19] ben_alman: but there is a Sync variant [03:19] avih has joined the channel [03:19] jmoyers: ben_alman https://github.com/joyent/node/blob/master/lib/path.js#L416 [03:20] ben_alman: yes [03:20] ben_alman: i know, i'm trying it [03:20] ben_alman: see my comment 10 lines or so up :) [03:20] jonrohan has joined the channel [03:20] ben_alman: that's awesome that it just does stat in a try/catch [03:20] chilts: ben_alman: thanks for the hashchange plugin to jQuery :) [03:20] ben_alman: chilts, np [03:20] chilts: ACTION throws a random appreciation out there :) [03:20] ben_alman: glad to help [03:20] jmoyers: ben_alman sorry, my brainbox is broken from looking at objective-c all day [03:21] ben_alman: np i understand. obj-c will fuck anybody up [03:21] ben_alman: i had to write a screensaver in it once [03:21] avih has joined the channel [03:23] stash1 has joined the channel [03:24] avih has joined the channel [03:24] bnoordhuis: https://github.com/blog/936-one-million [03:25] icewhite has joined the channel [03:25] jmayfield has joined the channel [03:28] JakeyChan has joined the channel [03:30] innociv: for some reason when I try to restart networking, it doesn't like that -t "iptables-restore v1.4.8: Line 118 seems to have a -t table option." Even though what jmoyers said, "innociv iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000" is pretty much what' at http://www.debian-administration.org/articles/73 .. [03:31] MooGoo: iptables voodoo [03:31] abraxas has joined the channel [03:32] bnoordhuis: innociv: put the -t nat bit first [03:32] mandric has joined the channel [03:32] innociv: you mean before -A? [03:32] zmbmartin has joined the channel [03:32] marcello3d has joined the channel [03:32] bnoordhuis: innociv: yes [03:33] jmoyers: iptables-save rules are beyond my skillset ;-) [03:33] Eber has left the channel [03:33] innociv: same error. [03:34] bnoordhuis: oh wait, you're running it from iptables-restore [03:34] bnoordhuis: remove the -t flag altogether [03:34] dmkbot has joined the channel [03:34] secoif has joined the channel [03:34] secoif_ has joined the channel [03:35] bnoordhuis: innociv: did you paste that `iptables etc.` line in a file that you're trying to load with iptables-restore? [03:35] jmoyers: uuuh [03:35] meso has joined the channel [03:35] innociv: Yeah, minus the "iptables" [03:35] jmoyers: iptables-save file, -t rules need to be at the bottom of the file, no [03:35] jmoyers: ? [03:35] bnoordhuis: innociv: don't do that [03:35] schwab has joined the channel [03:35] innociv: Oh [03:35] bnoordhuis: first, run execute that iptables one-liner from the cli [03:36] bnoordhuis: then do iptables-save > my.rules [03:36] jmoyers: if you run the command, then iptables-save, it should have the rule baked into the routing table, no? [03:36] jmoyers: bnoordhuis ^ that [03:36] innociv: Er also I only want to rerout port 80 on a certain ip. [03:37] innociv: iptables -A PREROUTING -t nat -i eth0 -p tcp --d ip.ip.ip.ip -dport 80 -j REDIRECT --to-port 3000 ? [03:37] bnoordhuis: yes [03:37] innociv: sorry -d not --d [03:37] Coin has joined the channel [03:38] innociv: Says multiple d flags not allowed, when I only have that one. [03:39] towski has joined the channel [03:39] innociv: oh oops [03:39] innociv: i had -dport instead of --dport [03:39] jmoyers: oh the magic and wonder of iptables [03:40] innociv: :( [03:40] dmkbot has joined the channel [03:40] Spion has joined the channel [03:41] MooGoo: -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT [03:41] MooGoo: hm [03:42] MooGoo: though I'm sure the configuration is compleatly different for each distroy [03:42] MooGoo: distro [03:42] innociv: how do I make sure that's running and saved in my /etc/iptables.up.rules? [03:43] MooGoo: that was pulled from /etc/sysconfig/iptables [03:43] MooGoo: but this is centos [03:43] innociv: I'm on debian. [03:44] MooGoo: dunno how it works for debian, but on cent changing that file and restarting iptables works [03:44] ronnieboy has joined the channel [03:44] innociv: Doesn't seem to be working. If I go to domain.net:3000 I see my helloworld. at just domain.net it's page not found. [03:44] MooGoo: RH-Firewall is cleary a centos thing [03:44] innociv: Yeah on debian if I just change the file, /etc/iptables.up.rules and restart my box on networking, it uses those rules [03:45] MooGoo: whats listening on 80 [03:45] zmbmartin has joined the channel [03:45] MooGoo: oh [03:45] MooGoo: you want a port redirect [03:45] innociv: nothing [03:45] innociv: yeah [03:45] innociv: Listening on 3000. Want going to domain.net to send them to domain.net:3000. [03:45] chance- has left the channel [03:46] pyrotechnick has joined the channel [03:50] kurtzhong has joined the channel [03:50] pongwon has joined the channel [03:52] DennisRasmussen has joined the channel [03:53] m0: How do we inspect the object in nodejs? [03:53] pyrotechnick: console.dir [03:53] pyrotechnick: util.inspect [03:53] pyrotechnick: eyes.inspect [03:53] pyrotechnick: node-inspector [03:53] pyrotechnick: console.log(JSON.stringify(FOO)) [03:54] MooGoo: go on [03:54] pyrotechnick: process.stdout.write [03:54] AAA_awright: console.log() alone also works [03:54] AAA_awright: v8: console.log({hi:x}); [03:54] v8bot_: AAA_awright: ReferenceError: x is not defined [03:54] AAA_awright: er [03:54] pyrotechnick: lol [03:54] AAA_awright: v8: console.log({hi:"x"}); [03:54] v8bot_: AAA_awright: CONSOLE: [{"hi": "x"}], OUTPUT: undefined [03:54] pyrotechnick: dir is more correct but meh [03:55] m0: pyrotechnick: thanks, have any idea how to convert a Buffer into a JSON object? [03:55] pyrotechnick: .toString() [03:55] pyrotechnick: or set the encoding [03:55] pyrotechnick: if its not utf [03:56] AaronMT has joined the channel [03:57] m0: pyrotechnick: the string coming back is "{"foo": "bar\"what\""}, and JSON.parse complains because the slash isn't escaped [03:57] m0: pyrotechnick: then I tried replace and it still didn't like it. [03:58] pyrotechnick: JSON.parse parses JSON [03:58] pyrotechnick: that isn't JSON [03:58] pyrotechnick: give it JSON [03:58] pyrotechnick: then it will be happy [03:59] m0: pyrotechnick: it is JSON coming from Google+ API. [03:59] pyrotechnick: they're doing it wrong. [03:59] m0: pyrotechnick: for example, the reduced string that is failing: JSON.parse('{"foo":"\""}') [03:59] m0: Should be: [04:00] m0: pyrotechnick: JSON.parse('{"foo":"\\""}'), how do we fix that? [04:00] pyrotechnick: im not sure [04:00] pyrotechnick: if some JSON api wasn't giving me JSON i'd question using it [04:00] pyrotechnick: the next step, if i had to would be to clean it up [04:01] pyrotechnick: have fun with that [04:01] MooGoo: >> JSON.parse('{"foo":"\""}') [04:01] JakeyChan_ has joined the channel [04:01] MooGoo: >> try { JSON.parse('{"foo":"\""}') } catch (e) { print(e) } [04:01] MooGoo: >> 4 [04:01] MooGoo: sigh [04:01] m0: I will submit a bug report, in the meantime, I will just do replace \\n with \\\\n [04:02] MooGoo: v8: JSON.parse('{"foo":"\""}') [04:02] v8bot_: MooGoo: SyntaxError: Unexpected token ILLEGAL [04:02] MooGoo: v8: JSON.parse('{"foo":"\\""}') [04:02] v8bot_: MooGoo: {"foo": """} [04:02] marcello4d has joined the channel [04:02] jzacsh has joined the channel [04:02] jzacsh has joined the channel [04:02] MooGoo: double backslashes would seem trivial [04:02] princyp has joined the channel [04:02] m0: How would you do a backslash? [04:03] MooGoo: v8: JSON.parse('{"foo":"\""}'.replace(/\\/g, '\\\\')) [04:03] v8bot_: MooGoo: SyntaxError: Unexpected token ILLEGAL [04:03] PuffTheMagic has joined the channel [04:04] m0: http://pastebin.com/etRSdUQ9 [04:04] MooGoo: v8: '{"foo":"\""}'.replace(/\\/g, '\\\\') [04:04] v8bot_: MooGoo: "{"foo":"""}" [04:04] brianc has joined the channel [04:04] m0: v8: JSON.parse('{"foo":"\""}'.replace(/\\/g, '\\\\')) [04:04] v8bot_: m0: SyntaxError: Unexpected token ILLEGAL [04:04] MooGoo: v8: '{"foo":"\""}'.replace(/\\/g, '$') [04:04] v8bot_: MooGoo: "{"foo":"""}" [04:04] MooGoo: v8: '{"foo":"\""}'.replace(/\\/g, 'Q') [04:04] v8bot_: MooGoo: "{"foo":"""}" [04:05] MooGoo: v8: '{"foo":"\\""}'.repasl;fjal;sfiialace(/\\/g, 'Q') [04:05] v8bot_: MooGoo: ReferenceError: fjal is not defined [04:05] brianc: anyone know how to get the session id client-side with socket.io? can't find documentation on it [04:05] tokumine has joined the channel [04:05] MooGoo: invalid json is invalid json [04:06] MooGoo: v8: '{"foo":"\\""}'.replace(/\\/g, '////') [04:06] v8bot_: MooGoo: "{"foo":"////""}" [04:06] MooGoo: v8: '{"foo":"\\""}'.replace(/\\/g, '//') [04:06] v8bot_: MooGoo: "{"foo":"//""}" [04:06] MooGoo: argh [04:07] MooGoo: its too late for js [04:07] m0: Exactly [04:07] cying has joined the channel [04:07] m0: Make a C++ v8 extension that overrides http get data? [04:08] MooGoo: why would you need a v8 extension to do that [04:08] m0: How would we make it work? [04:09] MooGoo: if google is spewing out invalid JSON then it really should not work [04:09] MooGoo: where exaclty are you getting this from [04:09] dreamdust has joined the channel [04:09] CarterL has joined the channel [04:10] m0: https.get({ host: 'www.googleapis.com', path: '/plus/v1/people/'+googleUserID+ [04:10] khrome_ has joined the channel [04:11] MooGoo: googleUserId eh [04:11] jslatts has joined the channel [04:11] k1ttty has joined the channel [04:11] perezd has joined the channel [04:11] MooGoo: is that your gmail address [04:11] perezd: nodejs peeps, whats the preferred way to resize/crop photos? [04:11] MooGoo: photoshop [04:11] pyrotechnick: node_canvas? [04:11] perezd: was using node-imagemagick, but it sucks [04:11] MooGoo: just use imagemagick then [04:12] perezd: was wondering if there were any breakthroughs that made it suck less [04:12] pyrotechnick: node_canvas [04:12] albertosheinfeld has joined the channel [04:12] pyrotechnick: node_canvas [04:12] pyrotechnick: node_canvas [04:12] dexter_e has joined the channel [04:12] albertosheinfeld: Anyone here uses Backbone?? i have a question regarding collections [04:12] perezd: pyrotechnick: interesting [04:13] perezd: pyrotechnick: it doesn't really support resizing, itself.. [04:13] m0: MooGoo: that is your google plus profile id [04:13] pyrotechnick: perezd: can you resize in canvas2d? [04:13] perezd: err I guess it does.. [04:13] pyrotechnick: yep [04:14] hdon- has joined the channel [04:14] OmidRaha has joined the channel [04:14] pyrotechnick: its perhaps slightly overkill for JUST resizing [04:14] pyrotechnick: but not cropping or anything else [04:14] pyrotechnick: it's perfect [04:14] perezd: cropping? [04:15] pyrotechnick: perezd nodejs peeps, whats the preferred way to resize/crop photos? [04:15] maxogden: perezd: what sucks about node-imagemagick? seemed like a pretty straightforward binding. is it slow? [04:15] pyrotechnick: are you trolling? [04:15] perezd: I'm not trolling... [04:15] perezd: I saw resizing support in canvas, but not cropping [04:15] perezd: maxogden: imagemagick is straightforward, I just tend to hate imagemagick in terms of supporting installations of it [04:16] MooGoo: you can crop all day long with canvas [04:16] MooGoo: among other things [04:16] perezd: hmm [04:16] perezd: well, thanks for the leads! I'll look into it [04:16] MooGoo: assuming it is remotly similar to browser canvas [04:16] maxogden: someone should write a hosted cropping service [04:16] maxogden: node-sharecropper [04:16] perezd: maxogden: YES. [04:16] maxogden: ACTION rimshot [04:16] pyrotechnick: there are. [04:16] perezd: I've wanted to do this [04:16] pyrotechnick: there's SaaS for images [04:16] pyrotechnick: like panda but for images [04:17] perezd: oh, thats true, there are.. [04:17] maxogden: i wrote a _changes feed async resizer https://github.com/maxogden/dbemitter/blob/master/tests/imageresize.js [04:17] perezd: hmmmmm [04:17] pyrotechnick: i forget what they're called [04:17] maxogden: works between servers thanks to couch [04:17] perezd: maxogden: <3 it. [04:17] perezd: I am a big couch nerd too [04:17] pyrotechnick: http://www.uploadjuicer.com/ [04:17] saikat_ has joined the channel [04:18] pyrotechnick: shut down lol [04:18] pyrotechnick: theres others [04:18] perezd: ugh, nervous about that sort of shit [04:18] pyrotechnick: yeah i wouldn't do that unless you're app is dying under the load [04:18] bombworm has joined the channel [04:18] pyrotechnick: it's alot of moving parts just to resize an image [04:19] CIA-54: node: 03Ben Noordhuis 07v0.4 * r9ef962f 10/ src/node_crypto.cc : [04:19] CIA-54: node: crypto: fix error message buffer overrun [04:19] CIA-54: node: ERR_error_string() expects a buffer of at least 256 bytes, the input buffer [04:19] CIA-54: node: was not even half that size. Use ERR_error_string_n() instead. - http://git.io/-Z750w [04:19] CIA-54: node: 03Ben Noordhuis 07v0.4 * r3a9b08f 10/ src/node_crypto.cc : crypto: look up SSL errors with ERR_print_errors() - http://git.io/r93ywA [04:19] CIA-54: node: 03Ben Noordhuis 07v0.4 * rfdb0eb5 10/ src/node_crypto.cc : crypto: fix read of potentially uninitialized variable - http://git.io/ADtIEw [04:19] CIA-54: node: 03Ben Noordhuis 07v0.4 * r93aad55 10/ src/node_crypto.cc : crypto: fix delete of potentially uninitialized pointer - http://git.io/mw-lEA [04:19] maxogden: future project #283482 is to make a SETI@home volunteer processing framework using node that lets you donate computrons to process remote queues for open data projects [04:24] SomeoneWeird has joined the channel [04:25] SomeoneWeird: With express, where abouts do the 'views' go? [04:25] SomeoneWeird: actually, im stupid. sorry. [04:27] davidascher has joined the channel [04:28] dreamdust: @SomeoneWeird: Everybody is ignorant, but on different subjects. [04:28] dreamdust: :) [04:28] SomeoneWeird: :) [04:29] maxogden: "i wasnt able to intuit the express DSL... i am worthless!" [04:30] d_low has joined the channel [04:30] d_low has joined the channel [04:31] binaryjohn has joined the channel [04:34] stisti has joined the channel [04:35] innociv: Erm well it seems that I'm being told my port forward from 80 to node's port is working. There is data being transfered. But when I go to domain.net I get nothing. If I go to domain.net:1492 I get the hello world. So confusing. [04:38] maxogden: i usually use nginx for upstream proxying like that. or couchdb. not sure what you're using [04:38] innociv: I use lighttpd. It shouldn't be bound to that address, though [04:38] innociv: Doing it on the firewall I'd think would be simpler. [04:40] fangel has joined the channel [04:42] JaKWaC has joined the channel [04:43] jmayfield has joined the channel [04:43] lz has joined the channel [04:43] lz has joined the channel [04:45] cmeiklej0hn has joined the channel [04:46] jmoyers has joined the channel [04:46] perezd: maxogden: I love syncable.org [04:47] perezd: best animation evar [04:47] innociv: Lol [04:47] innociv: Nice [04:48] pamorf has joined the channel [04:48] innociv: I'm disappointed that it's a gif, and not some canvas magic. [04:49] freeformz has joined the channel [04:50] darshanshankar has joined the channel [04:51] jmoyers: anyone familiar with the jsgi stream story? [04:51] jmoyers: im trying to grok 'forEachable' streams per https://github.com/mjijackson/strata/issues/2#issuecomment-2163155 [04:51] jmoyers: all this Q. business, and promises and such [04:52] jmoyers: UNSETTLING, i must say [04:53] JaKWaC has joined the channel [04:54] jmoyers: oh noooes [04:54] maxogden: perezd: thanks. innociv: i should write node-dog-barfing-sunglasses-on-frog [04:54] SomeoneWeird: haha [04:55] innociv: Yep. [04:55] caffine has joined the channel [04:55] innociv: You need to sync up the sunglasses for each user so they see the same streaming sunglasses. [04:56] tilgovi has joined the channel [04:56] tilgovi has joined the channel [04:57] bartt has joined the channel [04:57] DennisRasmussen has joined the channel [04:57] torsd has joined the channel [04:58] innociv: How do i run a node as a daemon? [04:59] hermanjunge has joined the channel [04:59] AvianFlu has joined the channel [05:00] innociv: oh nohup [05:00] pyrotechnick: innociv: node FILE & [05:01] StanlySoManly has joined the channel [05:01] pyrotechnick: u can bring it back with fg [05:01] innociv: ehh [05:01] rmzg: haha [05:01] rmzg: I love how people think '&' is the same as 'daemon' [05:01] pyrotechnick: its still bound to your tty though [05:01] pyrotechnick: yep what he said [05:02] innociv: Ok [05:02] SamuraiJack has joined the channel [05:04] marcello4d: css n00b question: how do you center one div in its parent? [05:04] marcello4d: margin: 0 auto doesn't seem to be working (chrome 14 or whatever) [05:04] maxogden: awesome use for the #node.js irc channel but you probably have to set an explicit width on the child div for margin: 0 auto to do anything [05:05] marcello4d: ah [05:05] Ned_ has joined the channel [05:05] marcello4d: no way to just have it use whatever size it has... [05:05] innociv: Apparenlty my port forward setup should be working, but I get ... http://pastebin.com/18bETmNs [05:05] marcello4d: I guess I can work with that, cheers [05:05] jmoyers: whatever size it has is 100% [05:05] marcello4d: I set it to inline block, figured that'd be enough [05:06] marcello4d: the element inspection shows the rect being the small size, not 100% [05:06] karboh has joined the channel [05:06] marcello4d: but an explicit width does do the trick [05:06] innociv: The parent needs to be display:block and have a fixed width, or all of its parents need to have a % width, for margin: 0 auto; to work [05:06] monokrome: Does anyone know if there is a middleware or other type of module provided with Stylus which allows you to watch a directory's styles for changes? [05:07] marcello4d: thanks guys! :) [05:07] innociv: inline-block might not work on ie6 and ie7 [05:07] monokrome: Essentially, I am trying to have my node development server do `stylus -w` [05:07] marcello4d: monokrome: not quite the same thing, but I think express will do that for you if you run it in dev mode [05:07] monokrome: marcello4d: I am using express. Express supports CSS preprocessors?... [05:08] marcello4d: innociv: yea, I'm aware. I choose to ignore them, I'm using canvas ;) [05:08] copongcopong has joined the channel [05:08] marcello4d: monokrome: it looks like stylus has a middleware built in [05:09] marcello4d: http://stackoverflow.com/questions/5612777/stylus-and-express-stylesheets-are-not-re-compiled-when-modified [05:09] monokrome: Just noticed that! I wonder if it does what I need :) [05:09] marcello4d: I'm personally not quite using that setup anymore, though I used it in an early prototype [05:09] kmiyashiro: monokrome: pretty sure if your env is development it will re-compile on change [05:10] monokrome: I wonder if it requires on startup for production [05:10] monokrome: s/requires/compiles/ [05:11] innociv: Can anyone figure why i'm getting connection refused? node.js is listening on port 1492. I have iptables set to forward port 80 to 1492. http://pastebin.com/18bETmNs [05:12] jmoyers: innociv undoubtedly your iptables [05:12] maxogden: innociv: ive never used iptables sorry [05:12] jmoyers: iptables-save and see if you've duplicated the rule, for instance [05:12] innociv: I don't know what to look at with them. :( [05:12] jmoyers: you can flush a particular table, also [05:12] innociv: Oh yeah I ahve to rule in there 3 times.. [05:13] jmoyers: thats wrong [05:13] innociv: I don't want to flush, that removes them all, no? [05:13] jmoyers: is it in the nat table? [05:13] innociv: nat table? [05:13] jmoyers: yes, but then you can re-add just the one ;P [05:13] avalanche123 has joined the channel [05:13] innociv: But then I lose all my other unrelated rules [05:13] jmoyers: in your iptables-save output [05:13] jmoyers: you will see *nat [05:14] jmoyers: stuff below that is in the nat routing table [05:14] jmoyers: yes, if you have other unrelated nat rules, you will [05:14] SubStack: pkrumins wrote a node-iptables [05:14] innociv: the odd thing is that I don't see the rule in iptables-save [05:14] innociv: I see them if I iptables -t nat -n -L [05:14] SubStack: true story [05:15] aeo has joined the channel [05:15] aeo: Hi, guys. [05:15] jmoyers: no idea about the inconsistency :P [05:15] innociv: iptables -L doesn't seem to match my /etc/iptables.up.rules which is where I think the problem lies.. [05:15] aeo: I'm getting an error [05:15] aeo: RangeError: Maximum call stack size exceeded [05:15] aeo: Which is most likely due to a bug in my code. [05:15] aeo: The problem is, it came with no stack trace. [05:16] aeo: Is there any way to get a stack trace when Node crashes with a call stack overflow? [05:16] JakeyChan has joined the channel [05:17] marcello4d: whale oil beef hooked. I'm out. [05:17] marcello4d: have a good night all, thanks for the non node help :) [05:17] jmoyers: innociv man iptables shows a -D option for deleting a particular rule [05:18] aeo: I mean, Node does give a line number [05:18] aeo: function toId(text) [05:18] innociv: yeah I need the line number. Not sure how to ge that [05:18] aeo: It's a function that does no recursion. [05:18] innociv: for the rule [05:18] AvianFlu: aeo: it often means you're doing too much recursion [05:18] AvianFlu: oh [05:18] AvianFlu: I mean, what does it do [05:18] aeo: AvianFlu: I know I'm doing too much recursion. The problem is that Node isn't giving me a stack trace, so I don't know where the too much recursion is happening. [05:19] aeo: The crash is at line 1 of a JavaScript file. [05:19] AvianFlu: is this a file you can gist me? [05:19] aeo: AvianFlu: http://pokemon.aesoft.org/data/simulator.js [05:19] aeo: Not a Gist, but hopefully good enough? [05:20] dmkbot has joined the channel [05:20] aeo: Line 1 is the function declaration of toId [05:20] aeo: Which doesn't do any recursion [05:20] jmoyers: ACTION waits for AvianFlu to scroll through that entire file. [05:21] hermanjunge has joined the channel [05:22] AvianFlu: you should throw that into jshint or something [05:22] aeo: jshint? [05:23] Spion_ has joined the channel [05:23] Lingerance: toId could be one line BTW: return (!text || 'string' != typeof text) ? '' : text.replace(/ /g, '') [05:23] aeo: AvianFlu: This is what the error message is, btw: http://d.pr/hAYw [05:24] overclk has joined the channel [05:24] aeo: As I said, the fact that the call stack overflowed doesn't worry me. I'm just wondering why I didn't get a stack trace. [05:24] aeo: Is this normal? [05:24] jmoyers: stack is lost with async stuff [05:24] SubStack: v8: (function (text) { return text && (typeof text === 'string') && text.replace(/ /g, '') || '' })('lu l z ') [05:24] v8bot_: SubStack: "lulz" [05:24] jmoyers: though i grep your file there, no event emitter, no process.nextTick [05:25] aeo: jmoyers: The entire file is synchronous. [05:25] aeo: I mean, it does have its own event system, but the events are blocking and inline and all that [05:25] jmoyers: so actually, presumably its probably a red herring that its even pointing at that file? [05:25] aeo: jmoyers: That's a possibility. [05:26] k1ttty has joined the channel [05:26] jmoyers: also a pokemon simulator? [05:26] jmoyers: RAD [05:26] jmoyers: haha [05:26] aeo: I just want to know why the call stack overflowed and the error has no stack trace or anything [05:26] aeo: jmoyers: Totally! :D [05:26] chapel: v8: (function (text) { return text && (typeof text === 'string') && text.replace(/\s/g, '') || '' })('lu l z ') [05:26] v8bot_: chapel: "lulz" [05:27] chapel: v8: (function (text) { return text && (typeof text === 'string') && text.replace(/\s/, '') || '' })('lu l z ') [05:27] v8bot_: chapel: "lul z " [05:27] jmoyers: like i said, node has a shit debugging story for cases where it loses the stack currently [05:27] aeo: jmoyers: http://pokemon.aesoft.org/data/desktopui.png [05:27] aeo: Looks like this when it's not crashed [05:27] chapel: v8: (function (text) { return text && (typeof text === 'string') && text.replace(/\s/g, '') || '' })('lu l z \n ') [05:27] v8bot_: chapel: "lulz\n" [05:27] jmoyers: something like https://github.com/tlrobinson/long-stack-traces perhaps [05:27] jmoyers: though i'm not even sure that is your problem [05:27] Guest81341: this is a seriously scary example of what people do with node :) [05:27] chapel: v8: (function (text) { return text && (typeof text === 'string') && text.replace(/\s/g, '') || '' })('lu l z \ ') [05:27] v8bot_: chapel: "lulz" [05:29] aeo: toId is optimized for readability, anyway [05:29] zeade has joined the channel [05:29] aeo: Although the first line is kinda redundant with the second line [05:30] aeo: Hmm, [05:31] aeo: jshint is saying 'Missing "use strict" statement.' a lot [05:31] aeo: what does that mean? [05:31] maxogden: aeo: ES5 strict mode, its very googleable [05:33] jmoyers: jshint will sooo not solve your problem [05:33] jmoyers: can you gist the code calling this simulator library? [05:35] minorblend has joined the channel [05:36] innociv: http://pastebin.com/B0n808ef are the rules I have for iptables. [05:37] aeo: jmoyers: I'll need a while to learn how to use gist [05:37] aeo: jmoyers: Until then, it's here: http://pokemon.aesoft.org/data/battle-server.js [05:37] arpunk has joined the channel [05:38] jmoyers: aaaah, these massive files are massive [05:40] AvianFlu: lol jmoyers totally called me out on my pokemon cop-out suggestion XD [05:40] aeo: jmoyers: :| I don't have much experience coding. [05:40] SubStack: v8: (function (text) { return text && (typeof text === 'string') && text.replace(/^ |([^\\]) /g, '$1').replace(/\\ /g, ' ') || '' })(' lu l z \\ ') [05:40] v8bot_: SubStack: "lulz " [05:40] temp01 has joined the channel [05:40] SubStack: chapel: :p [05:40] aeo: Is there a better way to arrange files? [05:40] jmoyers: aeo yes, yes there is [05:41] broofa has joined the channel [05:41] aeo: I don't even know if I'm using Node modules correctly. :| [05:41] jmoyers: Room, Lobby belong in their own files, imo [05:41] jetienne has joined the channel [05:41] jmoyers: but anyway [05:41] pyrotechnick has joined the channel [05:43] jmoyers: aeo but seriously, can you try installing long-stack-traces? [05:43] aeo: jmoyers: Possibly. Am I using Node modules correctly? [05:43] jmoyers: aeo https://github.com/tlrobinson/long-stack-traces/blob/master/examples.js apparently all you need to do is require the module [05:43] aeo: jmoyers: So all I have to do is install long-stack-traces, and wait for it to crash again? [05:43] jmoyers: and it monkey patches the shit out of eventemitter and such [05:43] jmoyers: thats … a theory [05:43] jmoyers: :-) [05:44] dgathright has joined the channel [05:45] innociv: Anyone have ideas of what else I should be looking at for this port forwarding problem? Trying to direct port 80 on an ip to 1492 where I have node.js running, so when someone goes to http://ip it's the same as going to http://ip:1492 [05:46] polotek has joined the channel [05:46] ph^ has joined the channel [05:46] innociv: .. That pokemon thing is awesome [05:47] jmoyers: innociv did you get the rule dedouped? [05:47] innociv: yeah [05:48] innociv: there is my new rules save in this paste: http://pastebin.com/B0n808ef [05:48] aeo: innociv: Awesome in what way? [05:49] innociv: aeo, you wrote that and think you aren't good at programming? [05:49] langworthy has joined the channel [05:49] innociv: The animations are so nice. It's just so .. I don't know the word. It's just so legit. [05:49] aeo: innociv: Well, I won't say I'm bad at programming. More, I don't know JS programming best practices. [05:50] aeo: Since I'm completely self-taught. [05:50] innociv: Ah yeah. [05:51] Nuck|mobile has joined the channel [05:51] monokrome: Anyone know why this isn't compiling CSS files with Stylus? https://gist.github.com/1234138 [05:52] godzirra: Does anyone have a good tutorial on authentication with node.js? What I'm doing isn't working. :/ [05:52] godzirra: For some reason my form isn't passing the parameters to res.query... Shouldn't this work? res.send('
'); [05:52] jmoyers: innociv did you set up these rules in the filter table? [05:52] SubStack: godzirra: post data is different because it arrives on stdin [05:53] SubStack: or well [05:53] SubStack: it arrives as a stream I mean to say [05:53] SubStack: node is not cgi >_< [05:53] innociv: filter table? I had them written on.. something.. and used restore and save [05:53] godzirra: Oh. So I just need to read it in differently? [05:53] godzirra: Okay, i'll google that. [05:53] SubStack: godzirra: anyhow you can req.on('data', fn) and req.on('end', fn) to read the post data [05:53] innociv: iptables-restore iptables-save [05:53] godzirra: Got it. Thanks. :) [05:53] godzirra: I didn't realize it was different. [05:54] SubStack: and there's node-formidable and {express,connect}.bodyParser to decode the post data for you automagically [05:54] godzirra: Yeah, i'm using bodyParser. [05:54] godzirra: Just didn't realize what it did. [05:55] SubStack: bodyParser puts the post values into req.params or some such [05:55] godzirra: body :D [05:56] godzirra: Thanks.. Authentication seems weird in node.js, but I assume its just because its new. [05:56] godzirra: to me at least [05:56] SubStack: it's more raw [05:56] Ned_ has joined the channel [05:57] SubStack: until you get into userspace that is [05:57] jmoyers: innociv i'm curious if the prerouting rule is getting hit at all [05:57] innociv: well [05:57] jmoyers: running iptables -t nat -L -v, whats the packet count? [05:57] robhawkes has joined the channel [05:57] jmoyers: ACTION suspects the ip address [05:58] innociv: it appears to [05:58] innociv: 123 6072 REDIRECT tcp -- eth0 any anywhere ...69 tcp dpt:www redir ports 1492 [05:58] innociv: 123 packets, 6072 bytes. [05:58] jmoyers: then its one of the filters, i guess? [05:59] innociv: hm? [05:59] godzirra: SubStack: is there a good less complicated way to do authentication? [05:59] innociv: port 80 should be accepted for all ip's [05:59] aeo: jmoyers: Hi. [05:59] bEEEviz has joined the channel [06:00] aeo: jmoyers: This is the error that long-stack-traces is giving: http://d.pr/raLr [06:00] aeo: Much improved over regular Node. :P [06:00] jmoyers: hmm, and you're bound on the right address in the node process [06:00] jmoyers: hahah aeo -- bummer man [06:00] aeo: I have no idea what that means. [06:00] jmoyers: thats why i said '… maybe' [06:00] aeo: Oh, you're talking to someone else [06:00] aeo: On the upside [06:01] aeo: I've figured out what causes the crash [06:01] innociv: going to that ip on port 1492 works. I get my "hello world" [06:01] innociv: Port 80 gives connection refused. [06:01] innociv: If ip tables was blocking port 80, it'd hang for a while as well. it responds instantly [06:02] zmbmartin has joined the channel [06:02] jmoyers: welllll [06:03] piscisaureus has joined the channel [06:04] goodwill has joined the channel [06:04] zmbmartin has joined the channel [06:04] goodwill: joshontheweb: ping [06:05] tmcw has joined the channel [06:05] innociv: yeah.. I'm not sure what I should be looking at this [06:05] innociv: Don't know how to figure out the issue [06:06] jmoyers: iptables is a bitchfuck [06:06] jmoyers: thats all i have to say [06:06] innociv: the netfilter channel being really unhelpful. [06:07] goodwill has left the channel [06:08] minorblend has joined the channel [06:09] aeo: I THINK I FIGURED IT OUT [06:11] minorblend has joined the channel [06:11] aeo: innociv: Thank you! [06:11] innociv: Me?! [06:11] innociv: I dont' think I did anything. [06:12] innociv: Might it be that my ip address ending in 69 is eth0:2 on /etc/network/interfaces? I dunno.. [06:14] yozgrahame has joined the channel [06:14] luckysmack_ has joined the channel [06:15] aeo: innociv: Well, you provided moral support. [06:15] aeo: And gave me some advice about how I shouldn't stuff everything into a few .js files [06:15] jmoyers: innociv uh, guessing at this point -- set a --dst ip? [06:15] jmoyers: perhaps its mapping back to loopback? [06:16] aeo: Oh, wait [06:16] aeo: that was jmoyers [06:16] innociv: yeah [06:16] aeo: lol [06:16] aeo: Sorry, I'm a bit distracted here. >_< [06:17] Peniar has joined the channel [06:18] darshanshankar_ has joined the channel [06:21] luckysmack_: yes i am a new node user, so im not spam. Im really interested, but I have a domain expiring that iv'e never used, and don't need it. Was wondering if anyone wanted it for whatever reason. Otherwise it's going to expire. if not oh well. [06:22] luckysmack_: Just want to fint it a good home. lol [06:25] innociv: What was the domain name? I must have missedi t. [06:26] aeo: I, too, did not see the domain name. [06:26] Lingerance: Likewise [06:28] luckysmack_: heh, oops. [06:28] luckysmack_: PIVOTALCODE.NET [06:28] Ned_ has joined the channel [06:28] Lingerance: I'll pass. [06:29] pyrotechnick: http://www.drawastickman.com/ [06:29] luckysmack_: after registering it, I had found other products that were somewhat close to the name. so i didn't use it. [06:29] random123: Why would anyone want that domain name? [06:30] robotmay has joined the channel [06:30] random123: Have you lost your marbles sir [06:30] innociv: Yeah I don't see anything alluring about that domain name. [06:30] innociv: If it was fucking.pro, I'd want that one. [06:30] luckysmack_: lol, thats why im not using it. [06:30] luckysmack_: heh [06:31] innociv: Should just let it expire [06:31] luckysmack_: heh [06:31] jhurliman has joined the channel [06:32] aeo: Yeah, it's a .net [06:32] aeo: No one wants .nets [06:33] aeo: Now if you had pivotalcode.com I'd be interested. ;) [06:33] luke` has joined the channel [06:34] luckysmack_: eh, i dont [06:35] JakeyChan_ has joined the channel [06:35] DrMcKay has joined the channel [06:35] innociv: well [06:36] innociv: netfilter channel is telling meit's working because the packet counter goes up on a request to port 80. But, I don't get the same thing viewing http://ip:80 as I do with http://ip:1492 [06:37] TomY has joined the channel [06:37] SomeoneWeird: maybe node can tell you havn't binded to :80 from the request and won't respond innociv ? [06:37] innociv: Oh? [06:38] SomeoneWeird: not sure, just a guess [06:38] sfoster has joined the channel [06:38] ph^ has joined the channel [06:38] polotek: ryah: hey you there? [06:40] innociv: Okay [06:40] innociv: I give up on this. [06:40] innociv: What do I look into to simply run node.js on port 80? [06:40] innociv: setuid? [06:41] Morkel has joined the channel [06:41] jmoyers: yurp, process.setuid [06:41] innociv: also, how do I quit the node when I ran node FILE &? When I type fg i'm getting the curl manual coming up [06:42] cying has joined the channel [06:42] akiva has joined the channel [06:42] random123: innociv, what happens when you go to 127.0.0.1? [06:42] jmoyers: ps -ax | grep 'node', kill the process [06:42] chjj: innociv: you can either type jobs, and kill by job id, type ps -A, kill by pid, or killall node, kill `pidof node`, etc [06:43] random123: Or you can just type "killall node" [06:43] herbySk has joined the channel [06:43] innociv: yeah killall node sounds goo [06:43] innociv: d [06:43] innociv: or finding it in htop and killing the one. [06:43] random123: innociv, what about my earlier Q? [06:43] innociv: what do you mean by go to? It's a linux box i'm using ssh to connect to. You mean curl it? [06:44] innociv: curl 127.0.0.1 gives me couldn't connect to host [06:44] TylerS has joined the channel [06:44] random123: innociv, OK, well, I didn't get your earlier messages, I just go the part about running node on 80 [06:44] jmoyers: also innociv btw, prettttty sure its that FORWARD rule in you filter table [06:45] innociv: i think it probably is too... but i'm fialing at it or something [06:45] innociv: failing* [06:45] random123: innociv, well on the box Node is running, you should be able to curl localhost and get output on 80 [06:45] random123: innociv, Am I misunderstanding the Q? [06:46] innociv: I think you are. Need root to bind on 80 [06:46] jmoyers: innociv http://lists.netfilter.org/pipermail/netfilter/2006-October/067083.html - no examples of using mark, though [06:46] innociv: "iptables -A FORWARD -p tcp -m state --state NEW -d #.#.#.69 --dport 1492 -j ACCEPT", shouldn't it be this? [06:46] innociv: or should the port be 80? [06:47] TylerS: Noob question - if I want to install node for all users, would I set the prefix during the configure step of installation to /usr/local/bin ? [06:47] random123: TylerS, you can set it to /usr [06:48] TylerS: great, thanks [06:48] jmoyers: innociv looks pretty reasonable ;-) [06:48] random123: TylerS, keep the install folder so you can run "make uninstall" later if you want [06:48] dmkbot has joined the channel [06:48] innociv: either one doesn't work [06:48] jmoyers: don't know if its going to have --state NEW though [06:49] innociv: http://www.debian-administration.org/articles/73 the first comment here [06:49] al3xnull has joined the channel [06:49] innociv: "I think that was because your default policy for FORWARD was ACCEPT." However, my default rule for forward is accept [06:50] innociv: so shouldn't be request [06:50] innociv: required* [06:50] stagas has joined the channel [06:51] zmbmartin has joined the channel [06:51] innociv: http://www.debian-administration.org/articles/386 [06:51] innociv: Seems to imply what i have should work too [06:52] mike5w3c has joined the channel [06:52] jmoyers: except for they're flushing the tables [06:53] innociv: what else could be in there that's messing them up?.. [06:54] tobmastr has joined the channel [06:54] stagas_ has joined the channel [06:54] groom has joined the channel [06:55] dgathright has joined the channel [06:56] dmkbot has joined the channel [06:56] mraleph has joined the channel [06:57] random123: innociv, your problem doesn't really make any sense, but that isn't a Node.js problem try #netfilter [06:58] jmoyers: im sure it does make sense [06:58] necrodearia has joined the channel [06:58] beevi7 has joined the channel [06:58] jmoyers: we all just suck at iptables [06:58] jmoyers: thems just the facts [06:58] DrMcKay: great -.-. my bot crashes with no stacktrace when reporting a gh issue [06:58] random123: What was the problem? [06:59] innociv: I tried netfilter. Going to try to simply run node.js on port 80 now [06:59] jmoyers: port forwarding from 1492 -> 80 not working [06:59] jmoyers: something in *filter table is screwing the pooch [06:59] innociv: from 80 to 1492. [06:59] jmoyers: right right, a little late :P [06:59] innociv: maybe it's "-A FORWARD -j REJECT --reject-with icmp-port-unreachable" [07:00] jmoyers: thats why im saying [07:00] jmoyers: its the FORWARD rule [07:00] jmoyers: at least when you pasted it, it was the only one [07:00] jmoyers: remove that rule, tell me what happens [07:00] innociv: ahh [07:00] jmoyers: you can always add it back :P [07:01] beevi7: hey [07:01] innociv: could not connect still it seems [07:02] Wa has joined the channel [07:02] innociv: I did iptables -D FORWARD -j REJECT --reject-with icmp-port-unreachable [07:02] beevi7: how do i upgrade my (self compiled) node installation? just checkout the new version and compile it again? [07:02] ditesh|cassini has joined the channel [07:02] innociv: connection refused, so, yeah [07:02] jmoyers: sigh [07:03] jmoyers: don't know what to tell you [07:03] random123: Yes, but why would you want the Gateway's Port 1492 to forward to Port 80 on the internal0,00 network? [07:03] fangel has joined the channel [07:03] innociv: I.. don't know? [07:04] innociv: I have node.js running on port 1492. if I go to http://ip:1492 that connects. I want it to work the same if you just go to http://ip [07:04] zmbmartin has joined the channel [07:04] ivanfi has joined the channel [07:05] stagas has joined the channel [07:05] random123: Well, you are on a Gateway right? That would be the reason to forward, so you must have root on the Gateway to do this [07:05] Margle has joined the channel [07:05] dmkbot has joined the channel [07:05] random123: So you can foward Port 80 on the Gateway to Port 1492 and you would get the desired results [07:05] jmoyers: fuck it, just sudo node, .listen(80), and .setuid('nobody') [07:05] jmoyers: go forth [07:05] innociv: I don't know what the term means, or how to do that. [07:06] DrMcKay: I'm really a *dumb* person. [07:06] innociv: when i do "sudo node FILE" i get command not found. [07:06] jmoyers: absolute path [07:06] jmoyers: or set up environment [07:06] innociv: ah right [07:06] DrMcKay: (util.format on v0.4.11) [07:07] random123: Are you trying to set up iptables on the same computer than Node is running, because that is not the purpose of forwarding the port [07:08] innociv: Yes I was. [07:08] innociv: It's a dedicate server with a few ip's. I have node running on it. [07:08] random123: Does that computer have a dedicated IP or is in on DHCP or something in an internal network? [07:09] jmoyers: what in the fuck are you talking about [07:09] jmoyers: iptables can definitely forward a port locally [07:09] jbpros has joined the channel [07:09] innociv: Has 5 dedicated ips. [07:09] stagas has joined the channel [07:10] random123: Why the hell would you get 5 on one computer? [07:10] innociv: Because I'm crazy. [07:10] Ned_ has joined the channel [07:10] random123: But why? [07:10] dmkbot has joined the channel [07:10] innociv: Because I can only bind one thing to one port on one ip?.. [07:11] random123: You can use nginx [07:11] random123: And have 1 IP [07:11] innociv: Then you have to forward on nginx [07:11] jmoyers: if.. everything you're doing is http [07:11] innociv: hit that httpd for no reason [07:11] beevi7: can anyone tell me what "middleware" is in node.js terminology? is it some sort of "plugin" for node? [07:12] innociv: okay anyway [07:12] jmoyers: beevi7 if its from express or jsgi, its a way to mutate an http response [07:12] innociv: bind to port 80, here igo.. [07:12] beevi7: ah i see [07:12] innociv: so first i need to to like.. sudo -s and create "nobody"? [07:12] random123: Yes, well, I see no reason to have 5 IPs anyway, you can just map domains to certain services [07:12] jmoyers: or require certain permissions for a route, or whatever [07:12] godzirra has joined the channel [07:13] random123: Instead of IP to certain services [07:13] random123: That is costly [07:13] jmoyers: what.. do you think domains map to? [07:13] jmoyers: everything isn't http [07:13] jmoyers: you cant use a reverse http proxy for everything [07:13] beevi7: so if anybody is talking about "middleware" it is always linked to the http module, correct? [07:13] jmoyers: beevi7 .. maybe? [07:13] jmoyers: i've heard stream middleware bandied about -- createFilter api [07:13] jmoyers: not necessarily http [07:14] random123: I can't think of any type of server where you would need more than 1 IP [07:14] random123: If you can name one [07:14] beevi7: so it's "something" that extends any module's functionality? [07:14] random123: More than 1 IP on a computer* [07:15] jmoyers: sure -- i have a custom UDP based protocol, and nodes in our network dedicated to mixing audio streams, transceiving audio streams, managing state [07:15] pyrotechnick has joined the channel [07:16] innociv: should i have a new group for this user, too? [07:16] random123: So, based on the domain, which is sent by DNS to the server, you can do different things [07:16] jro_ has joined the channel [07:16] vguerra has joined the channel [07:17] jmoyers: beevi7 its a piece of software that sits between two endpoints and does something to the data moving between [07:17] random123: just like, if you have one apache server, it can host multiple domains on 80 using virtual host [07:17] djcoin has joined the channel [07:17] random123: its the same technique any server can use [07:17] Ned_ has joined the channel [07:17] dominictarr: hey, does any one know about the status of Stream.pause() on unix pipes? [07:18] random123: so if they connect to x.com, it will connect to 1.1.1.1 and pass x.com to server, and server does X, y.com and so on [07:18] jmoyers: random123 yes, you can proxy anything [07:18] dominictarr: for me it's closing the stdout in the upstream process. [07:18] jmoyers: but as you move away from standard protocols [07:18] jmoyers: you have to start writing that software yourself [07:19] jmoyers: because X-Forwarded-By and shit is http specific [07:19] beevi7: ok, think i got it. thank you :) [07:19] jmoyers: so the question is: do i write a custom proxy, or do i add a single ip address? [07:19] jmoyers: depending on your timeline and shit, you buy the ip address [07:19] jmoyers: pretty simple [07:19] adambeynon has joined the channel [07:20] mikedeboer has joined the channel [07:22] innociv: jmoiron, is process a global variable, not something I need to define? [07:23] dmkbot has joined the channel [07:23] Ned_ has joined the channel [07:23] emattias has joined the channel [07:23] random123: wwwhaa [07:24] innociv: Oh he left [07:24] dmkbot has joined the channel [07:24] innociv: uhh that's not working. ;/ [07:24] random123: innociv, what is your problem? [07:24] DrMcKay: k, bot *should* work now [07:24] kmox83 has joined the channel [07:24] raphdg has joined the channel [07:24] innociv: And yeah it is [07:25] cpetzold has joined the channel [07:26] ablomen has joined the channel [07:26] innociv: http://pastebin.com/CTRUJce7 Getting connection refused :/ [07:26] innociv: Seems to start fine. [07:27] random123: Is that computer on a dedicated IP? [07:27] innociv: yes [07:27] blaenk has joined the channel [07:27] blaenk has joined the channel [07:28] random123: Why are you setting the uid to httpd? [07:28] Ned_ has joined the channel [07:28] blup has joined the channel [07:28] innociv: So that that's the user it uses? [07:29] random123: What happens if you just do listen(80) ? You should be able to get that working FIRST before you start narrowing your configuration [07:30] random123: Do you have root on your server? [07:30] innociv: Yes [07:30] minorblend has joined the channel [07:30] random123: Try SSH in as root and run it with just .listen(80) [07:31] innociv: I need to put a port in there. [07:31] innociv: er [07:31] innociv: ip [07:31] random123: Why? [07:31] anoop: can I initialize and use a dict object just like in python? [07:31] innociv: Because I have lighttpd bound to the main ip already [07:31] innociv: tells me address already in use [07:31] arpunk has joined the channel [07:32] innociv: ... OKAY now this is weird [07:32] random123: Alright, I suggest you just use nginx then [07:32] innociv: I can bind it to another ip on port 80 [07:32] innociv: but it gives me connection refused on the other [07:33] johnwards has joined the channel [07:33] maligree has joined the channel [07:33] cjheath_ has joined the channel [07:34] stonebranch has joined the channel [07:34] locksfree has joined the channel [07:34] innociv: my server is blocking port 80 on just that one ip. No idea why [07:35] random123: Maybe its not even binding to that IP at all [07:35] innociv: it is [07:35] innociv: port 1492, 3000, 8000, whatever work on that ip [07:35] innociv: but not port 80.. [07:35] innociv: and i mean it's binding, but refusing connections [07:35] innociv: if it couldn't bind, it'd throw an error [07:36] sam350 has joined the channel [07:37] innociv: but it looks like i'm not using port 80 that ip for anything so.. [07:37] Lingerance: netstat -lntp [07:37] random123: How much are these IPs costing you? [07:37] [AD]Turbo has joined the channel [07:37] innociv: notta [07:37] random123: How is that? [07:38] mklappstuhl has joined the channel [07:38] innociv: lingerance, yeah i know.. nothing was running on port 69. have something running on 68. If I bind node.js to 69:80 it shows up [07:39] innociv: my server keeps refusing connectiong to ...69:80 though. [07:39] mpavel has joined the channel [07:39] [AD]Turbo: hi there [07:40] Druide has joined the channel [07:40] _kud has joined the channel [07:40] innociv: wait a second.. [07:40] innociv: that's becuase the forward rule i think [07:41] innociv: Haha.. yeah [07:42] random123: Why did you even add it, you are doing everything ass backwards lol [07:42] bradwright has joined the channel [07:42] jacobolu_ has joined the channel [07:43] Lingerance: ACTION finds just using nginx for sending to multiple node.js processes so much easier [07:44] innociv: I use lighttpd ,and could probably do that, but meh [07:44] random123: Well if you are getting free IP address more power to you, but I don't get how [07:44] innociv: 5 just came with my server. [07:45] Lingerance: One of my local ISPs gives 8 IPs per customer. [07:45] innociv: It's funny, because we're running out of IPs. [07:45] random123: I would have just got a VPS, $10 a month Rackspace, why the need for this costly dedicated server? [07:45] Lingerance: For their cheapest plan (which is 200$/mo as it's satelite) [07:45] innociv: Power? [07:45] innociv: a $10 VPS isn't enoug. [07:46] innociv: I used to have a $30 or something VPS with Linode. Outgrew it. [07:46] [diecast] has joined the channel [07:46] [diecast] has joined the channel [07:46] [diecast] has joined the channel [07:46] svnlto has joined the channel [07:46] Kai` has joined the channel [07:46] Lemon|mbp has joined the channel [07:46] random123: That $10 a month VPS can handle a shit ton of traffic, are you sure you need more power? [07:47] Lingerance: Most VPS hosts are pretty bad when you get to the point where you need to use load balancing. [07:47] Lingerance: Uptime [07:47] innociv: I use almost a terabyte of bandwidth a month [07:48] innociv: Of purely transfering data, no downloads. [07:48] boehm has joined the channel [07:48] innociv: and mysql needs a few hundred megs of memory. [07:48] ajsie has joined the channel [07:48] mpavel has left the channel [07:48] innociv: I'd rather pay $30 a month instead of $60 a month if i could, for sure. [07:48] atiti has joined the channel [07:49] bartt has joined the channel [07:49] tanepiper has joined the channel [07:49] topaxi has joined the channel [07:49] innociv: Part of that issue is me using long polling. Lots of bandwidth. If I rewrote one of my apps to use socket.io I could probably cut my bandwidth by half, or more... [07:49] daleharvey has joined the channel [07:49] tomh has joined the channel [07:50] random123: Yes, well bandwidth is never an issue with a VPS, its just CPU/Memory [07:50] whoops has joined the channel [07:50] innociv: vps usually have pretty limited bandwidth [07:50] ralph has joined the channel [07:51] random123: You just pay X cents per GB of bandwidth [07:51] kbni has joined the channel [07:51] innociv: ... like 10 cents per gb. Wayyyy too much [07:51] random123: How much is the dedicated hosting per month? [07:51] copongcopong has joined the channel [07:52] innociv: $60 [07:52] fly-away has joined the channel [07:52] random123: Where at? [07:52] innociv: for 2x 2.4ghz, 2gb of ram, 2terabytes of transfer. Not a bad deal.. [07:52] nimstr has joined the channel [07:52] innociv: Joe's datacenter in kansas. [07:52] cosmincx has joined the channel [07:52] nimstr has left the channel [07:52] metadaddy has joined the channel [07:53] random123: Well I think in any case Rackspace is gonna beat Joes Datacenter [07:53] innociv: They pretty much have my same server for $40 per month. Well, 2ghz not 2.4ghz. [07:53] innociv: What do you mean? [07:53] aaronmcadam has joined the channel [07:54] footyfish has joined the channel [07:55] Nomon_ has joined the channel [07:55] mc_greeny has joined the channel [07:57] MrTopf has joined the channel [07:57] abraxas: Anyone here used node-http-proxy before? [07:57] abraxas: Kinda curious about its performance overhead and stability [07:57] random123: innociv, I don't know, it would just seem like a company like Rackspace could do better than some small Datacenter [07:57] innociv: Rackspace is soooo expensive. [07:58] metellus has joined the channel [07:58] piscisaureus_ has joined the channel [07:59] Ned_ has joined the channel [07:59] yogurt_truck has joined the channel [07:59] AvianFlu: abraxas it's stable, lightweight, and performant if you don't buffer your requests [08:00] bergelmir has joined the channel [08:00] spolu has joined the channel [08:00] abraxas: if you don't buffer requests? [08:00] abraxas: i want to use it for long polling.. bad idea? [08:01] xDelph has joined the channel [08:01] AvianFlu: no, not at all [08:01] abraxas: what do you mean by "buffer your requests"? [08:01] uchuff has joined the channel [08:01] AvianFlu: it's just that the more you alter a request along the way, the less performance you get [08:01] AvianFlu: general principle [08:02] AvianFlu: don't touch it too much, good performance [08:02] AvianFlu: etc [08:02] random123: innociv, what about Amazon EC2? A lot of huge companies like Foursquare use it [08:03] piscisaureus_ has joined the channel [08:03] jj0hns0n has joined the channel [08:03] roidrage has joined the channel [08:03] innociv: It's ok. [08:04] iaincarsberg has joined the channel [08:04] Ned_ has joined the channel [08:04] abraxas: AvianFlu: I am not planning on altering it at all. [08:05] abraxas: AvianFlu: What I'm trying to do is, if the path matches a certain route, I want to send it into an http server. And if it doesn't match that, I want to respond to the browser directly. [08:05] abraxas: AvianFlu: Should be easy and performant? [08:05] diamonds has joined the channel [08:05] AvianFlu: yep. [08:05] abraxas: Great! Thanks a lot [08:06] abraxas: Oh, and "directly" may mean long polling.. so not directly, I guess. [08:06] abraxas: But you mentioned that's no problem. [08:06] Peniar has joined the channel [08:06] indutny has joined the channel [08:06] bergie has joined the channel [08:06] AvianFlu: you're not modifying request bodies or trying to inject js into the pages on the way back [08:06] AvianFlu: so you should be ok [08:07] zcopley has joined the channel [08:07] jwcooper has joined the channel [08:08] beawesomeinstead has joined the channel [08:08] sriley has joined the channel [08:08] Glenjamin has joined the channel [08:08] willwhite has joined the channel [08:09] chunhao_ has joined the channel [08:10] majek_ has joined the channel [08:11] cjheath has joined the channel [08:11] Frippe has joined the channel [08:13] hola has joined the channel [08:14] alexdoom has joined the channel [08:14] hola: Yo every [08:14] salazr_ has joined the channel [08:14] kbni has joined the channel [08:15] zomgbie has joined the channel [08:15] robotmay has joined the channel [08:16] JasonSmith has joined the channel [08:16] dnyy has joined the channel [08:17] ryanseddon has joined the channel [08:17] sylvinus has joined the channel [08:17] mattly has joined the channel [08:18] stravid has joined the channel [08:19] aron_ has joined the channel [08:21] benvds has joined the channel [08:21] herbySk has joined the channel [08:21] HardPhuck has joined the channel [08:22] eldios has joined the channel [08:22] blissdev has joined the channel [08:22] jeremyselier has joined the channel [08:22] romainhuet has joined the channel [08:23] AD7six has joined the channel [08:24] mklappstuhl has joined the channel [08:24] bergelmir has joined the channel [08:24] jwcooper has joined the channel [08:24] cosmincx has joined the channel [08:25] dscape has joined the channel [08:25] JKarsrud has joined the channel [08:26] TomY has joined the channel [08:26] liveink has joined the channel [08:26] kuebk has joined the channel [08:26] niftylettuce has joined the channel [08:27] liar has joined the channel [08:27] owenb has joined the channel [08:28] justicefries_ has joined the channel [08:28] Hosh has joined the channel [08:29] piscisaureus_ has joined the channel [08:30] nym has joined the channel [08:30] spolu has left the channel [08:31] piscisaureus_ has joined the channel [08:31] icewhite has joined the channel [08:31] MrTopf has joined the channel [08:34] cmeiklej0hn has joined the channel [08:34] igl has joined the channel [08:35] lmatteis has joined the channel [08:35] jacobolus has joined the channel [08:36] mpavel has joined the channel [08:36] CIA-54: libuv: 03Bert Belder 07prefork * r84e969e 10/ (prefork.c src/win/tcp.c): prefork III - http://git.io/T0Rm1A [08:37] tobie has joined the channel [08:37] mpavel has left the channel [08:38] Marak has joined the channel [08:38] kulor-uk has joined the channel [08:39] Styles has joined the channel [08:39] hellp has joined the channel [08:40] Raynos has joined the channel [08:40] khrome has joined the channel [08:41] sveisvei has joined the channel [08:43] olegp has joined the channel [08:44] copongcopong has joined the channel [08:45] icebox has joined the channel [08:47] Aiden has joined the channel [08:47] shipit has joined the channel [08:48] icewhite has joined the channel [08:48] markwubben has joined the channel [08:48] khrome_ has joined the channel [08:50] Layke has joined the channel [08:50] khrome__ has joined the channel [08:50] Layke: Hey, so I have a PHP script send somethign to my node server.. I'm just doing $fp = stream_socket_client('tcp://localhost:8124'); and sending a json encoded message. [08:50] __doc__ has joined the channel [08:51] Layke: Since I am going to have lots of messages, whic should trigger different events, is it correct to have a "type" property in the JSON? [08:51] Layke: Or should I be capturing the message via a different method? [08:51] Lingerance: You might want to look at JSON-RPC [08:52] Lingerance: Either actually use JSON-RPC, or just read the spec (2.0 preferably) and figgure out what you can use from it. [08:52] Glenjamin: Layke: i'd say thats up to you as to how you design your protocol, but that in general makes sense [08:52] Layke: I wanted to keep it as low level as possible. [08:53] Glenjamin: sending a stream of json messages down a single connection > POSTing JSON over HTTP [08:53] sylvinus has joined the channel [08:53] Layke: So, if you had a PHP server needing to communicate with a node.js, you would use curl from the PHP? [08:53] Lingerance: No [08:53] fayce has joined the channel [08:54] Lingerance: I use JSON-RPC over straight TCP, no HTTP [08:54] Layke: O, I haven't heard of that before. [08:54] Layke: Can you point me in any direction? [08:55] Lingerance: It's actually written in a way that suggests it was designed with normal TCP in mind. [08:55] Lingerance: Hmm? [08:55] Glenjamin: npm question: how do I set a password for adduser to push on from multiple computers? [08:56] SubStack: Lingerance: you should check out dnode! [08:56] SubStack: it's like jsonrpc with callbacks [08:56] Lingerance: So is my stack. [08:56] Lingerance: But I have the advantage of a well understood protocol that I can use with other languages. [08:57] Glenjamin: the JSON-RPC protocol is basically "send json" [08:57] Layke: Well, I might be thinking of this wrong Lingerance, but I've only ever used JSON-RPC via javascript to my PHP server. Firstly, I would grab all of the available methods by doing reflection of the class on the server, then I would send it to the client, then I would call the method that I need. [08:58] Lingerance: I don't know why you're polling it for a list of methods [08:58] Layke: It could just be a reuirement of dojo.Rpc [08:58] Layke: That's what I've always been brought up on. [08:59] pgherveou has joined the channel [08:59] dmkbot: joyent/node: 03jbergstroem: running test GH-814 sometimes leaves trailing processes - https://github.com/joyent/node/issues/914 [08:59] icebox has joined the channel [09:00] burningdog has joined the channel [09:01] pgherveou: hello guys, I am trying to implement my own session store taking connect redis store as an example, I don't see any refresh function that would erase expired session, how is it managed ? [09:02] Layke: So Lingerance, if I create a json-rpc server on node, I would just create a correctly formed message in PHP like I have been doing currently, and send it via the same tcp socket stream that I have currently? [09:02] Lingerance: Yes [09:03] Glenjamin: assuming you make the node server in such a way that it can accept packets in that way [09:03] amigojapan has joined the channel [09:03] Layke: Okay thanks. I didn't realise, but now I think about it, my initial question was actually should I use JSON-RPC, except type: "foo" would of mean method: "foo" :) [09:03] Layke: Glenjamin, currently I'm running a net server. [09:04] Layke: net = require('net'); then accepting the stream. But I think I will try and Google JSON-RPC for node.js [09:04] Glenjamin: how are you delimiting the end of a packet? [09:04] Layke: Since I don't want to have to manage all the possible responses. [09:04] Layke: Glenjamin, I don't, I thought net did that for me by using steam.on('data' ? [09:05] adambeynon has joined the channel [09:05] AD7six has joined the channel [09:05] Layke: ie, this is what I just cooked up, http://pastie.org/2572805 [09:06] Ned_ has joined the channel [09:06] zemanel has joined the channel [09:06] Lingerance: net = require('net'); then accepting the stream. But I think I will try and Google JSON-RPC for node.js <-- most of the current libraries assume you want to do it over HTTP, so you'll need to hack one to get around that. I'm unfortunately unable to share mine. [09:06] jonaslund has joined the channel [09:07] Lingerance: You also have the option of dnode, but you'll have to find a PHP library for that (it's also a JSON protocol) [09:07] Layke: lol Yeah. I'm using websocket.io atm, if I could connect to that I would just use that. [09:07] xDelph: hi guys, i have a problem to give to you (two in fact but the second is not the most important for now) [09:08] Layke: Sorry socket.io [09:08] xDelph: i use express and websocket-server to create my server [09:08] xDelph: and the client (an iphone) is connecting on this [09:08] xDelph: but no app.get('/****'... work [09:09] xDelph: what can i do to see where is the problem? [09:09] xDelph: app = express.createServer [09:09] xDelph: server = websocket.creteServer({server: app}) [09:10] Industrial: Anyone here use Mongoose and DBRef's ? [09:10] Industrial: How do I fetch multiple levels deep with .populate() ? [09:11] Industrial: e.g. n joins deep in 1 query [09:12] aaronmcadam has joined the channel [09:14] xDelph: noone can help me? [09:14] Industrial: thats the problem with such a lively ecosystem [09:14] Industrial: noone is really using the same libraries because there 20 of each [09:14] Industrial: :p [09:14] xDelph: your're right :) [09:15] Industrial: which means no 'support' / people not on IRC [09:15] Layke: Lingerance, you are right. I found nothing that will support JSON-RPC over TCP socket message, and not http. [09:15] xDelph: but even there a lots of library for the same things, some of them are more used than the others [09:15] copongcopong has joined the channel [09:15] jwcooper has joined the channel [09:15] bzinger has joined the channel [09:16] jetienne has joined the channel [09:16] xDelph: i hop that someone use express + websocket-server :s [09:16] polotek: SubStack: hey man [09:17] stagas: xDelph: I don't think websocket-server attaches to another server, it creates a new one so your express app may be overwritten [09:17] stagas: xDelph: I mean not used at all [09:18] whitman has joined the channel [09:18] xDelph: stagas, if fact, express allow me to create some get /balabl [09:18] xDelph: stagas, and websocket-server is use for the connection [09:19] onre: umh [09:19] onre: why do you use websocket-server there? [09:19] xDelph: but here it's express that doesn't work because the client can't be a /aaaa [09:19] onre: express provides its own server [09:19] onre: that's how i've always done it [09:20] irahgel has joined the channel [09:21] xDelph: onre, because i must have a websocket server [09:21] case_ has joined the channel [09:22] xDelph: and for now can't test if the websocket work because express doesn't work [09:22] Juan77 has joined the channel [09:23] xDelph: i have this probleme because i've update node.js and the express modules [09:24] relax has joined the channel [09:24] wbednarski has joined the channel [09:24] SubStack: polotek: ahoy! [09:25] polotek: SubStack: would you consider surfacing the parsing function form optimist? making it a little more general [09:25] deadman87 has joined the channel [09:26] SubStack: you can already do require('optimist').parse() [09:26] SubStack: > require('optimist').parse('--x=5 -b'.split(' ')) [09:26] SubStack: { _: [], '$0': 'node', x: 5, b: true } [09:26] polotek: hmmm [09:27] deadman87: Hey everyone! [09:27] polotek: I'll play around with that [09:27] Industrial: wtb LearnBoost on IRC :( [09:28] deadman87: I had an idea.. Not sure how feasible or doable it is but here it goes: Create a host-in-a-box type solution with node.js [09:28] Glenjamin: you mean like nodejitsu? [09:28] deadman87: I mean ... have one node app that handles mail/dns/database/etc [09:29] icewhite has joined the channel [09:29] deadman87: I see there are node.js projects scattered about on github that do all these things [09:29] robhawkes has joined the channel [09:29] deadman87: nodejitsu hosts node.js apps... I envision something more generic that can host simple html/images as well [09:30] deadman87: from an end user's point of view: Login using FTP, upload files, done [09:30] deadman87: from an Admin's point of view: Log into the control panel (or command line), create user, assign domain [09:31] Shrink has joined the channel [09:31] deadman87: the admin scripts then handle DNS, mail, etc automatically [09:32] deadman87: There are DNS/Mail/FTP servers written in node.js already [09:32] e6nian has joined the channel [09:33] xDelph: so stagas, onre, any solution for me, to see where the problem is (i handle listening, connection, error and request on express but none of this listeners tell me a problem) [09:35] stagas: xDelph: I'm not sure I understand what the problem is, maybe gist some code? [09:35] xDelph: var app = express.createServer(); [09:35] xDelph: [09:35] xDelph: app.get('/*', function(req, res) { [09:35] xDelph: console.log("app get /*"); [09:35] xDelph: }); [09:35] xDelph: app.addListener('listening', function() { [09:35] robhawkes has joined the channel [09:35] xDelph: console.log("app listening"); [09:35] xDelph: }); [09:35] xDelph: i received the listening, but the get doesn't work [09:36] replore_ has joined the channel [09:36] replore has joined the channel [09:36] vidi has joined the channel [09:37] xDelph: sorry for the copy/paste, i forget pastbin [09:37] mklappstuhl: anyone here who would explain to me how I should use callbacks to use the client i created in an init function in other functions?: https://gist.github.com/08aa57d8e1a49b5e5237 [09:37] mklappstuhl: rmzg: are you a black magician? [09:39] stagas: xDelph: hm try res.send('foo') in app.get maybe that's the issue [09:40] rendar has joined the channel [09:40] jetienne has joined the channel [09:41] Skomski has joined the channel [09:42] xDelph: stagas, this doesn't work, and as i work on the server and not on the client, i've no idea what's the client have as the answer [09:42] xDelph: and my console.log doesn't work so i think the problem is in the call, but how can i handle this [09:44] stagas: xDelph: app.get callback (and the console.log) will only fire on a request, are you making a request to test it? [09:46] xDelph: stagas, yes, i sure than the client make a certain request [09:46] xDelph: stagas, but even with this get, the console.log doesn't work :s [09:47] stagas: xDelph: does it work without the websocket? [09:48] xDelph: no [09:48] Renegade001 has joined the channel [09:48] xDelph: stagas, no, and the connection with the websocket and done after the get [09:49] xDelph: stagas, the client do this : get /resources, connection to the websocket, speak with the server [09:51] random123 has joined the channel [09:51] stagas: xDelph: dunno I don't see an error in that code [09:52] xDelph: stagas, that's the problem :s [09:54] fg3 has joined the channel [09:58] e6nian: hidden: lol [09:58] Ned_ has joined the channel [10:00] xDelph: stagas, is any function exist in express to see each call (like get, the listener, etc...) ? [10:00] xDelph: stagas, or if the creation is ok? [10:01] stagas: xDelph: I think app.routes.all() [10:01] FireFly has joined the channel [10:01] markwubben has joined the channel [10:01] xDelph: stagas, like app.routes.all(function(a, b)) work? [10:02] jbpros has joined the channel [10:02] stagas: xDelph: no it should return the routes object, so just console.log it [10:02] xDelph: ok, i test it now [10:03] xDelph: stagas, it give me an error : TypeError: Cannot set property 'middleware' of undefined [10:04] Ned_ has joined the channel [10:05] cjroebuck has joined the channel [10:06] stagas: xDelph: dunno, use gist.github.com or pastebin and paste your entire code [10:06] aron_ has joined the channel [10:07] aron_ has joined the channel [10:09] Ned_ has joined the channel [10:12] robhawkes has joined the channel [10:14] Ned_ has joined the channel [10:15] Shrink has joined the channel [10:15] pgherveou: Hello there I am trying to implement a session store, I don't really get how to deal with browser session lifetime cookie, connect doc says to set session.cookie.expires to false, how do my session store knows when to delete it then ? [10:19] wbednarski has joined the channel [10:20] Ned__ has joined the channel [10:20] Margle has joined the channel [10:24] junkee[] has joined the channel [10:24] zemanel has joined the channel [10:25] Ned_ has joined the channel [10:27] phluffy has joined the channel [10:28] confoocious has joined the channel [10:30] MrTopf_ has joined the channel [10:30] Ned_ has joined the channel [10:30] random123 has joined the channel [10:35] jldbasa has joined the channel [10:36] Ned_ has joined the channel [10:37] CrisO has joined the channel [10:42] Ned_ has joined the channel [10:42] azeroth_ has joined the channel [10:43] TheJH_phone has joined the channel [10:43] ph^ has joined the channel [10:46] kb has joined the channel [10:47] Ned_ has joined the channel [10:47] kb: hi.. i wanted to know if anyone has tried node.js on hpux [10:48] burningdog has joined the channel [10:48] kb: btw Hpux -> http://en.wikipedia.org/wiki/HP-UX [10:48] CrisO has joined the channel [10:49] CrisO has joined the channel [10:50] kb: has anyone has tried node.js on hpux [10:52] Ned_ has joined the channel [10:52] kb: has anyone has tried node.js on hpux [10:54] whitman has joined the channel [10:54] deadman87 has joined the channel [10:55] jetienne has joined the channel [10:55] sam350 has joined the channel [10:56] kb: has anyone has tried node.js on hpux ? [10:56] kb: [10:57] SamuraiJack has joined the channel [10:57] Ned_ has joined the channel [10:57] whitman: Any admins of npmjs.org around? There appears to be a problem with the SSL certificate on https://registry.npmjs.org/ [10:58] SubStack: SSL is pesky all around [10:59] SubStack: ACTION is trying to figure out how to use authorized keys with https [10:59] ekes: Can't see a problem with the certificate. [10:59] ekes: It's self-signed. [11:00] whitman: ekes, if I try an npm install I get an invalid protocol error. [11:00] SubStack: what version of npm? [11:00] whitman: 1.0.30 [11:00] SubStack: also what node version [11:00] SubStack: hmmm [11:00] whitman: 0.4.12 [11:01] emattias_ has joined the channel [11:01] Layke: Can someone explain this: https://github.com/ericflo/node-jsonrpc It's not on the NPM right? [11:01] whitman: There's also https://github.com/isaacs/npm/issues/1444 which popped up about an hour ago [11:01] Layke: So how should I install it? [11:01] Vennril has joined the channel [11:01] jtsnow has joined the channel [11:02] Oi has joined the channel [11:03] SubStack: hahaha lame [11:04] SubStack: Layke: you pretty much don't [11:04] SubStack: npm search jsonrpc [11:04] SubStack: there are a few one there already [11:04] Layke: It doesn't have a package.json [11:04] Oi has left the channel [11:04] Layke: yeah, the others expect you to use your http module, which I don't want to do. [11:04] Layke: I'll try the json-rpc2 though. [11:05] medice: what am i misunderstanding here.. trying to use mongoose and extend mode by defining UserSchema.methods.saveNewUser, but inside this.find, save or any other model methods are not available [11:05] Layke: (I know they will all use http module, but I mean they would use the same port etc) [11:05] medice: *extend model [11:06] zomgbie has joined the channel [11:07] jetienne has joined the channel [11:09] SubStack: somebody do this: curl -k https://71.198.76.38:8081/ [11:09] SubStack: for science! [11:09] mrryanjohnston: boop [11:10] Lemon|mbp has joined the channel [11:12] ph^ has joined the channel [11:18] jetienne has joined the channel [11:19] SubStack: aha thanks! [11:21] jtsnow has joined the channel [11:23] SubStack: the 'data' I'm getting from req.client.encrypted in this https server is different every time >_< [11:24] SubStack: I just want the pubkey plaintext and a verified boolean [11:25] phiggins has joined the channel [11:27] cjm has joined the channel [11:27] mklappstuhl: hey, I am having a hard time understanding how I should build up some db abstractions: https://gist.github.com/08aa57d8e1a49b5e5237 ... Somebody recommended to use callbacks but I don't know how I should use them... [11:30] sfoster has joined the channel [11:31] SubStack: mklappstuhl: instead of returning values, you call a supplied function callback from an argument [11:33] mklappstuhl: SubStack: and what should this function do? could you outline it in code? i think that would greatly help to understand [11:35] kimico has joined the channel [11:37] stonebranch has joined the channel [11:37] SubStack: function foo (cb) { db.bar(function (err, res) { if (err) { cb(err) } else cb(null, res.name) }) [11:37] dingomanatee: Is there an easy way to do an MD5 on a file in node? [11:37] SubStack: something like that [11:37] SubStack: then you call foo with a callback [11:38] sharkbird has joined the channel [11:38] max_dev has joined the channel [11:38] SubStack: > require('crypto').createHash('md5').update(fs.readFileSync('package.json')).digest('hex') [11:38] aron_ has joined the channel [11:38] SubStack: '0dbce0e13f1e30d8032c8d5ccf800154' [11:38] SubStack: dingomanatee: ^^^ [11:39] hswolff has joined the channel [11:39] dingomanatee: Thanks. Now get some sleep! [11:41] Raynos: mklappstuhl: https://gist.github.com/3bc77f6b4fdd642db7d9 [11:43] Morkel has joined the channel [11:45] dingomanatee: Has anyone gotten notify working on the MacOSX? [11:45] SubStack: oh great now https is telling me: [11:45] SubStack: curl: (35) Unknown SSL protocol error in connection to localhost:8081 [11:46] SubStack: silly tls noise [11:46] robhawkes has joined the channel [11:48] marcello3d has joined the channel [11:48] brianseeders has joined the channel [11:49] pyrotechnick1 has joined the channel [11:49] mklappstuhl: Raynos: thanks, that really really helped to understand... mainly I was only searching for "this." but I got it I think :) [11:50] mklappstuhl: SubStack: also thanks to you [11:53] emattias has joined the channel [11:53] Juan77 has joined the channel [11:54] kbni has joined the channel [11:54] scott_gonzalez has joined the channel [11:56] motill has joined the channel [11:56] TheJH has joined the channel [11:57] jbpros has joined the channel [11:57] ph^ has joined the channel [11:58] azend has joined the channel [11:59] pyrotechnick1 has left the channel [12:00] bshumate has joined the channel [12:00] bshumate has joined the channel [12:00] dylang has joined the channel [12:01] _kud has joined the channel [12:02] deedubs has joined the channel [12:03] Epeli: How can I easily compile node-canvas on Ubuntu 10.4? [12:04] joshfng has joined the channel [12:04] Epeli: it has no libjpeg8 [12:04] wbednarski has joined the channel [12:04] monokrome: I have a base64 representation of a file for storing in a document, but want to decode it back into UTF-8. Does node provide a way to decode base64? [12:04] Epeli: I'm trying to use Travis-ci [12:04] deedubs has joined the channel [12:05] Ned_ has joined the channel [12:05] phiggins has joined the channel [12:07] jetienne has joined the channel [12:10] jomoho has joined the channel [12:10] ivanfi has joined the channel [12:11] deedubs has joined the channel [12:12] lz has joined the channel [12:13] simenbrekken has joined the channel [12:14] TheJH: monokrome, new Buffer(encodedString, 'base64').toString('utf8') [12:14] fermion has joined the channel [12:15] monokrome: Ah! Much easier. Thank you, TheJH. [12:17] Renegade001 has joined the channel [12:17] pgherveou has joined the channel [12:19] spcshpopr8r has joined the channel [12:21] wbednarski has joined the channel [12:25] pyrotechnick1 has joined the channel [12:29] Morkel: is no.de a good service to host a small node.js app? [12:30] Ned_ has joined the channel [12:30] Nss has joined the channel [12:30] emattias has joined the channel [12:30] JakeyChan has joined the channel [12:32] pyrotechnick1 has left the channel [12:33] zomgbie has joined the channel [12:34] timing has joined the channel [12:34] timing: O thi is the channel! I was also in #node and #nodejs [12:35] Industrial: (go go gadget server autojoin) [12:35] fairwinds has joined the channel [12:35] timing: I try to compile node on freebsd but I get an error somewhere halfway [12:35] patrickgamer has joined the channel [12:36] timing: This is the last line of gmake: [12:36] timing: {task: cxx_link node_main_5.o,node_5.o,node_buffer_5.o,node_javascript_5.o,node_extensions_5.o,node_http_parser_5.o,node_constants_5.o,node_file_5.o,node_script_5.o,node_os_5.o,node_dtrace_5.o,node_string_5.o,node_zlib_5.o,timer_wrap_5.o,handle_wrap_5.o,stream_wrap_5.o,tcp_wrap_5.o,udp_wrap_5.o,pipe_wrap_5.o,cares_wrap_5.o,stdio_wrap_5.o,tty_wrap_5.o,process_wrap_5.o,v8_typed_array_5.o,node_cares_5.o,node_net_5.o,node_signal_watcher_5.o,node_stat_watcher_5.o,node [12:36] kmox83 has joined the channel [12:36] fumanchu182 has joined the channel [12:38] Layke: Can someone please just do a little sanity check for me. I've not been using node for a long time and trying to use some JSON-RPC package that I installed via npm, but I'm sure that there is a bug in that package. which just doesn't make sense to me. [12:38] Layke: If you click here: https://github.com/Philipp15b/node-jsonrpc2 [12:39] dylang has joined the channel [12:41] Layke: Yeah it was abug, was about to link to the GitHUb repo, and it doesn't have the same line. [12:41] rfay has joined the channel [12:44] mike5w3c_ has joined the channel [12:45] Arenstar has joined the channel [12:47] c4milo has joined the channel [12:48] copongcopong has joined the channel [12:48] fangel has joined the channel [12:50] ditesh|cassini has joined the channel [12:51] davidsklar has joined the channel [12:52] kriszyp has joined the channel [12:55] Ned_ has joined the channel [12:58] normanrichards has joined the channel [12:58] TheJH: piscisaureus, piscisaureus2, pquerna, ryah: would one of you be able to quickly show something to isaacs? I think it's pretty critical... I'd say more only in query [12:58] piscisaureus2: TheJH: what is it about? [12:59] gnuanu has joined the channel [13:00] fangel has joined the channel [13:01] patrickgamer has left the channel [13:03] ericography has joined the channel [13:09] joshkehn has joined the channel [13:10] fg3 has joined the channel [13:10] Industrial: mehh :( Why aren't the guys that made Mongoose never online :( [13:10] Industrial: online as in right here [13:11] Industrial: and aren't as in are [13:11] robhawkes has joined the channel [13:12] micheil has joined the channel [13:12] TheJH: !npm owner mongoose [13:12] jhbot: owners: tmpvar , rauchg , tjholowaychuk , aaron [13:13] Industrial: oh ;p [13:14] Industrial: I can't set model instance properties after a find. e.g. myUser.profile = new UserProfile({}) myUser.save(function(e) {}) will just not work :S [13:14] burningdog has left the channel [13:14] Industrial: Also, when doing a .populate(), how do I populate deeper then one level? [13:14] blup has joined the channel [13:14] Ned_ has joined the channel [13:14] Industrial: like doing multiple joins [13:15] Industrial: with SQL [13:18] sivy has joined the channel [13:20] Ned_ has joined the channel [13:21] pgherveo_ has joined the channel [13:23] pgherveou has joined the channel [13:23] lazyshot has joined the channel [13:23] thomblake has joined the channel [13:24] mbrevoort has joined the channel [13:24] herbySk has joined the channel [13:24] thomblake has left the channel [13:24] Morkel has joined the channel [13:26] ap3mantus has joined the channel [13:26] pgherveou has joined the channel [13:26] mklappstuhl has joined the channel [13:27] socketio\test\74 has joined the channel [13:29] gjohnson has joined the channel [13:30] jtrudeau has joined the channel [13:30] CarterL has joined the channel [13:31] Industrial: TheJH: as I said, none of them are here :) so I have to use non instant communication [13:33] johnwards_ has joined the channel [13:33] ivanfi has left the channel [13:35] pgherveou has joined the channel [13:36] JasonJS has joined the channel [13:37] pgherveou has joined the channel [13:38] sonnym has joined the channel [13:38] chia has joined the channel [13:40] random123: �� [13:41] johnwards has joined the channel [13:44] OmidRaha has left the channel [13:45] Ned_ has joined the channel [13:46] DennisRasmussen has joined the channel [13:48] eee_c has joined the channel [13:50] infynyxx has joined the channel [13:50] Frippe has joined the channel [13:50] Frippe has joined the channel [13:50] jslatts has joined the channel [13:50] rurufufuss has joined the channel [13:51] kmiyashiro has joined the channel [13:53] denom has joined the channel [13:55] liar has joined the channel [13:55] pandeiro has joined the channel [13:55] benvds has joined the channel [13:56] hswolff has joined the channel [13:56] k1ttty has joined the channel [13:56] Industrial: What's wrong here? https://gist.github.com/89a9835f0ba54f1cef13 [13:56] MacDiva has joined the channel [13:58] spcshpopr8r has left the channel [13:59] lepht has joined the channel [13:59] danmactough has joined the channel [13:59] bnoordhuis has joined the channel [14:00] ksheurs has joined the channel [14:03] replore_ has joined the channel [14:03] replore has joined the channel [14:03] mklappstuhl has joined the channel [14:04] spolu has joined the channel [14:05] spolu: hi everyone, node-waf configure build, my .node file ends up in build/Release/XXXX.node instead of build/default/XXXX.node is that normal? [14:07] beevi7: hey [14:07] zomgbie has joined the channel [14:07] beevi7: i created a small library with geo functions [14:07] beevi7: https://github.com/manuelbieh/Geolib/blob/master/geolib.js [14:07] clu3 has joined the channel [14:08] DrMcKay has joined the channel [14:08] beevi7: i tested it and it works with node [14:08] DrMcKay: bnoordhuis: bot got fixed, I believe [14:08] sonnym has joined the channel [14:08] beevi7: var geolib = requre("./geolib").geolib; [14:08] DrMcKay: bnoordhuis: (util.format on v0.4.12 is a fail) [14:08] beevi7: geolib.myFunction(); [14:09] bnoordhuis: DrMcKay: no! util.format is win! (i wrote part of it) [14:09] beevi7: is there a smarter way to do that? how can I change the lib so i just need to do var geolib = require("./geolib") for example? [14:09] bnoordhuis: spolu: yes, normal in 0.5.x [14:09] spolu: bnoordhuis: [14:09] spolu: bnoordhuis: ok! [14:09] DrMcKay: bnoordhuis: not when you use it on v0.4.12 :D [14:09] bnoordhuis: DrMcKay: what's the problem? [14:10] DrMcKay: bnoordhuis: it doesn't exist there? [14:10] spolu: bnoordhuis: is there some specific resources for 0.5.x add-ons? [14:10] spolu: bnoordhuis: or a project working on 0.5.x ? [14:10] bnoordhuis: spolu: check out my projects, most all work on 0.5.x [14:11] spolu: bnoordhuis: ok! [14:11] bnoordhuis: spolu: node-buffertools in particular has some hacks to work properly with both 0.4.x and 0.5.x [14:11] spolu: bnoordhuis: cool! [14:11] bnoordhuis: DrMcKay: yes, util.format is a recent addition [14:12] Industrial: beevi7: module.exports [14:12] nimstr has joined the channel [14:13] nimstr has left the channel [14:13] xerox: beevi7: module.exports = theobject [14:13] xerox: beevi7: http://nodejs.org/docs/v0.4.11/api/modules.html [14:13] xerox: oops too late [14:14] beevi7: cool. i'll try this. and is there a way to check whether i am in a webbrowser or not? [14:14] willwhite has joined the channel [14:14] beevi7: (maybe check for Window object?) [14:14] tilgovi has joined the channel [14:14] tilgovi has joined the channel [14:15] Ned_ has joined the channel [14:15] Renegade001 has joined the channel [14:16] DrMcKay: bnoordhuis: but yeah, generally, it's lovely :) [14:16] Glenjamin: is util.format sprintf? [14:16] bnoordhuis: Glenjamin: sprintf-like [14:16] Glenjamin: hooray! [14:16] bnoordhuis: not 100% feature complete, %f for example doesn't work yet [14:16] Glenjamin: if it supports %s, then it has parity with 'stuff' + variable + 'more stuff' [14:17] jetienne has joined the channel [14:17] Glenjamin: which is what i'd like to stop using :) [14:17] Glenjamin: %f is intended to wrap Number.prototype.toFixed ? [14:18] bnoordhuis: yes [14:18] stash1 has joined the channel [14:18] okuryu has joined the channel [14:18] Glenjamin: some sort of array formatting option would be cool [14:19] bnoordhuis: array formatting? [14:19] Glenjamin: a shorthand for "%s" <- array.join(", ") [14:19] Glenjamin: maybe [14:19] Glenjamin: maybe not [14:20] bnoordhuis: it already does that [14:20] wbednarski has joined the channel [14:20] DrMcKay: Glenjamin: require('util').format("%s", [1,2,3]) -> '1,2,3' [14:20] bnoordhuis: or just `console.log("%s", [1,2,3])` :) [14:20] jslatts has joined the channel [14:21] Glenjamin: except my delimeter was ", " [14:21] Glenjamin: with a space [14:21] Glenjamin: i dunno how the syntax would work actually, but being able to specify the glue in the format string would be cool [14:21] sonnym has joined the channel [14:21] bnoordhuis: too kitchen sink-y to my taste [14:22] bnoordhuis: if you want special formatting, you're better off doing it yourself [14:22] brianloveswords has joined the channel [14:22] Glenjamin: but the separator is part of the formatting of the overall output, with only %s you have to separate [14:22] mkrecny has joined the channel [14:23] Glenjamin: consider util.format('[%s]', a.join('-')) vs util.format('[%-a]', a) [14:23] Glenjamin: i'm not 100% on this, but you can see why it might make sense? [14:24] zomgbie has joined the channel [14:24] bhu1st has joined the channel [14:24] Lemon|mbp has joined the channel [14:25] bnoordhuis: we're not going to do that, the idea behind util.format is to keep it stupid simple [14:25] spolu: Any body would have a clue about that error: [14:25] spolu: Error: /usr/local/lib/node_modules/io/build/Release/index.node: undefined symbol: _ZTV5Index [14:25] spolu: at Object..node (module.js:456:11) [14:25] spolu: at require (module.js:361:17) [14:25] Glenjamin: yeah, makes sense [14:25] Poetro has joined the channel [14:26] DrMcKay: spolu: compilation failed hard, I guess [14:26] DrMcKay: spolu: try make distclean && ccache -C and rebuild [14:26] spolu: DrMcKay: talking about node itself? [14:27] DrMcKay: spolu: no, the module you're using [14:27] DrMcKay: spolu: do that if it was an incremental build, only, of course [14:27] spolu: ok let's check [14:28] spolu: DrMcKay: yet I use node-waf + npm [14:28] DrMcKay: !npm search io [14:28] jhbot: packages (short format, truncated): NormAndVal, async-memoizer, configurator, exceptional-node, express-session-mongo, glob-trie.js, johnny-mnemonic, libxmlext, msgpack, namespaces, node-arse, node-assert-lint-free, node-casa, nodeDocs, proxio, resourcer, stylewriter, tasks, tav, termutil [14:28] miccolis has joined the channel [14:28] davidascher has joined the channel [14:28] DrMcKay: spolu: how is this module called? [14:29] spolu: DrMcKay: Index [14:29] beevi7: doesnt work [14:29] spolu: DrMcKay: well index.node -> with a functionTemplate Index [14:29] thinkling has joined the channel [14:29] DrMcKay: spolu: this? http://search.npmjs.org/#/Index [14:29] spolu: DrMcKay: no. mine [14:30] beevi7: TypeError: Object # has no method 'getDistance' [14:30] beevi7: what's wrong?! [14:30] beevi7: var module = require('module'); [14:30] beevi7: module.exports = geolib; [14:30] DrMcKay: spolu: uhm, OK. so you wrote the C++ code? [14:31] spolu: DrMcKay: yes [14:31] beevi7: (geolib is defined earlier) [14:32] smtlaissezfaire has joined the channel [14:32] DrMcKay: spolu: and after trying to use it in node, it errors out with that weird error? [14:32] spolu: DrMcKay: yes when I include the module [14:33] JasonJS: socket.io question: Is there anyway for a client to immediately detect a server crash instead of waiting for the timeout? I'm thinking the answer is no unless you have a really really fast heartbeat but I figured I'd ask. [14:34] DrMcKay: spolu: huh, I have no idea where this _ZTV5Index comes from [14:34] madsleejensen has joined the channel [14:34] mandric has joined the channel [14:34] xerox: JasonJS: you could lower the timeout? [14:34] spolu: DrMcKay: well must be a symbol that does not get resolved, as if some linking went wrong [14:35] xerox: JasonJS: or make something server-side that proxies the socket.io, and immediately 404s if the backend is dead ? [14:35] BillyBreen has joined the channel [14:36] PNegri2 has joined the channel [14:36] colinclark has joined the channel [14:37] JasonJS: xerox: Yeah - that's what I figured. Thanks for the feedback. [14:37] xerox: sure! [14:38] fatjonny has joined the channel [14:38] dylang has joined the channel [14:38] aheckmann has joined the channel [14:38] beevi7: ok, can anybody tell me what is wrong here? [14:38] aconbere has joined the channel [14:38] beevi7: http://pastebin.com/C07LMsLg [14:39] beevi7: http://pastebin.com/ktC9yUju [14:39] ap3mantus has joined the channel [14:39] beevi7: http://bieh.name:3001/ [14:39] Poetro1 has joined the channel [14:39] rfrey has joined the channel [14:40] aelien27 has joined the channel [14:40] Ned_ has joined the channel [14:41] joshthecoder has joined the channel [14:41] DennisRas has joined the channel [14:41] brianc has joined the channel [14:41] misterncw has joined the channel [14:42] thinkt4nk has joined the channel [14:42] stagas has joined the channel [14:42] JasonJS: beevi7: I don't think you need to specify 'var module = require("module");' in the mod - plus you've got an extra semi-colon before your function() [14:43] joshkehn has joined the channel [14:43] JasonJS: beevi7: the 'var module' may be overriding the default module scope [14:43] cying has joined the channel [14:44] meso has joined the channel [14:44] CoverSlide has joined the channel [14:45] max_dev has joined the channel [14:45] phiggins has joined the channel [14:45] hellp has joined the channel [14:45] spolu: bnoordhuis: do you have an Add-on relying on ObjectWrap & FunctionTemplates w/ prototypes? [14:46] pickels has joined the channel [14:46] bnoordhuis: spolu: yes, check out node-iconv [14:46] spolu: bnoordhuis: cool! thanks! [14:46] adambeynon has joined the channel [14:47] meandi has joined the channel [14:48] rjd7 has joined the channel [14:48] JasonJS: beevi7: Yeah - I removed the require module line you have (and the extra semicolon) and it seems to be working [14:48] jetienne has joined the channel [14:48] stash1 has joined the channel [14:49] JasonJS: beevi7: My understanding is that the 'require' statement implicitly creates the module object around the included file [14:49] JasonJS: beevi7: So you don't need to define it yourself [14:50] tokumine has joined the channel [14:51] sonnym has joined the channel [14:51] murilobr has joined the channel [14:52] dgathright has joined the channel [14:52] Ned_ has joined the channel [14:54] d3x7r0 has joined the channel [14:54] Poetro has joined the channel [14:55] JasonJS: What options are out there for different node servers to communicate with each other? I'm leaning towards just using socket.io and socket.io-client [14:55] DrMcKay: JasonJS: hook.io [14:55] brianloveswords has joined the channel [14:55] crashing has joined the channel [14:56] context: hook.io looks WAY nicer than websocket for process communication [14:56] DrMcKay: JasonJS: http://www.youtube.com/user/MarakSquires <- lots of awesome tutorials [14:56] JasonJS: Only problem with using hook is that I'm also going to be communicating with non-node servers and I'd like a consistent method. Websockets seemed to fit the bill [14:56] context: jasonjs: then id use some sort of pubsub [14:56] context: not websockets. [14:57] JasonJS: context: Why is that? [14:57] blax has joined the channel [14:57] context: cause its a proper solution. you want to send messages, pubsub is a real solution. websocket is just "lets make a connection" [14:57] shiawuen has joined the channel [14:57] mikeal has joined the channel [14:57] joshkehn: pubsub can be used over a websocket. [14:58] joshkehn: A websocket is just the underlying protocol. [14:58] joshkehn: Like HTTP or whatever. [14:58] context: joshkehn: yes, but why not use a solution that already exists. now HE is in charge of connection management, message management, etc etc etc [14:58] joshkehn: Not if you use something like socket.io instead. [14:58] context: message passing, message holding, queueing, [14:58] context: logging [14:58] joshkehn: ja ja, I know what you're saying. [14:58] Glenjamin: its like the difference between TCP and HTTP (sort of) [14:58] context: like i said.... proper solution [14:59] robertfw has joined the channel [14:59] MooGoo: maybe one day node will have shared memory capabilities [14:59] blax: hello there, is there a way to make async http request that will retry itself after some timeout (if not succeeded)? [14:59] Glenjamin: websockets are a stream, not a protocol [14:59] crashing has joined the channel [14:59] context: glenjamin: correct. [14:59] DrMcKay: MooGoo++ [14:59] v8bot_: DrMcKay has given a beer to MooGoo. MooGoo now has 3 beers. [14:59] Glenjamin: well, technically they *are* a protocol [14:59] joshkehn: Glenjamin: It's a layer on top of HTTP [14:59] DrMcKay: that would be awesome [14:59] joshkehn: So it's sort-of like a protocol. [14:59] joshkehn: But not “technically” it's own. [14:59] Glenjamin: yeah, but it behaves much like a protocol-agnostic transport stream for building protocols on top of [14:59] joshkehn: Right [15:00] joshkehn: So you want to serve content to a lot of people, you don't say you're going to use “HTTP” [15:00] kevwil has joined the channel [15:00] joshkehn: You say I'm going to use Apache to serve over the HTTP protocol. [15:00] context: wow. this is actually happening [15:00] Renegade001 has joined the channel [15:01] context: yes! you CAN use websocket. yes! it WILL work. BUT you ARE reinventing the wheel for what you asked for. [15:01] context: now get back to work ! :p [15:01] joshkehn: Hence why I suggested socket.io. [15:01] MooGoo: apparently DrMkay got me to level 1 [15:01] joshkehn: ACTION flips back to vim [15:02] initialize has joined the channel [15:02] context: joshkehn: correct. i generally tell people what they are looking for, not what they ask for :p [15:02] beevi7: JasonJS works fine, thank you! :) [15:02] joshkehn: context: Good practice. :) [15:02] JasonJS: beevi7: np [15:02] grekko has joined the channel [15:03] _jhs has joined the channel [15:03] blax: I'll ask again since it somehow got lost, does anybody know a way to make http request that will be repeated after some timeout (until it succeeds)? [15:03] devongovett has joined the channel [15:04] ngl has joined the channel [15:04] JasonJS: blax: Check the response code and reissue the request [15:04] joshkehn: setInterval ? [15:04] DrMcKay: mikeal: SYN? [15:04] mikeal: yyup [15:05] DrMcKay: mikeal: does you watch really handle ignoreDotFiles? [15:05] initialize2 has joined the channel [15:05] JasonJS: blax: If the server doesn't respond with a 200 kick off the request again [15:05] DrMcKay: mikeal: it seems like this option just doesn't matter, and filter function doesn't seem to be called as well [15:05] mikeal: i think it didn't [15:05] mikeal: and then someone patched it [15:06] initialize3 has joined the channel [15:06] xDelph has left the channel [15:06] mikeal: and i haven't pushed a next version [15:06] mikeal: it was broken [15:06] Ned_ has joined the channel [15:06] CarterL has joined the channel [15:06] mikeal: yeah, here it is [15:06] blax: yeah,bu I will have many different requests and I need to keep track of those that haven't succeeded yet [15:06] mikeal: here, i'll push a new version now [15:06] DrMcKay: mikeal: thank you :) [15:07] Twelve-60 has joined the channel [15:07] blax: do I have to keep this data somewhere or could I somehow automatically send the same request given only response? [15:07] erichynds has joined the channel [15:07] initialize has joined the channel [15:07] SomeoneWeird has joined the channel [15:08] SomeoneWeird: Is there any other node irc libraries other than irc-js? [15:08] DrMcKay: SomeoneWeird: node-irc [15:08] blax: oh wait, i think I get it - rubberducking working again, thanks ;) [15:09] SomeoneWeird: thx DrMcKay [15:09] Draggor: SomeoneWeird: looking for just a lib or an outright bot to mod? [15:10] gnuanu has joined the channel [15:10] SomeoneWeird: just looking for something to connect and send messages [15:10] SomeoneWeird: so a library should suffice [15:10] avalanche123 has joined the channel [15:10] softdrink has joined the channel [15:11] EvRide has joined the channel [15:12] spolu: DrMcKay: _ZTV5Index was a reference to a destructor that was not implemented [15:12] sub_pop has joined the channel [15:12] DrMcKay: spolu: good to know (some reading on this?) [15:12] N0va has joined the channel [15:13] spolu: DrMcKay: no just a long hour of looking for a needle :) [15:13] DrMcKay: spolu: ah, those lovely times debugging errors that shouldn't've even occured [15:14] spolu: DrMcKay: always a pleasure especially when I'm done with it :) [15:14] EyePulp has joined the channel [15:14] DrMcKay: spolu: :) [15:15] DrMcKay: argh, keyboard shortcuts would be great to have in search.npmjs.org [15:15] Draggor: SomeoneWeird: I use one simply called 'irc' for my ircbot (which is simply called 'ircbot' in npm) [15:15] maligree_ has joined the channel [15:16] SomeoneWeird: ok thanks Draggor [15:16] Druide: haha https://lh4.googleusercontent.com/-wa_9PdLghhs/TntDNEz9KUI/AAAAAAAAAVI/1C8lDcoF4K8/s816/11%2B-%2B1 [15:16] CoverSlide: haha? [15:17] Druide: boring booth [15:17] Vertice has joined the channel [15:18] CoverSlide: I always dreamt of something beautiful [15:18] CoverSlide: between conception and a funeral [15:18] DrMcKay: CoverSlide: I think it's called life... [15:18] DrMcKay: patch for those keyboard shortcuts would be easy [15:18] DrMcKay: time to fork [15:19] piscisaureus_ has joined the channel [15:19] tmcw has joined the channel [15:20] wookiehangover has joined the channel [15:21] tek has joined the channel [15:21] Draggor: actually I just realized I need to update my github readme [15:21] cjroebuck has joined the channel [15:21] sonnym has joined the channel [15:21] bEEEviz has joined the channel [15:22] ph^ has joined the channel [15:22] broofa: Anyone here familiar with apricot/jsdom/sizzle modules? The performance is *horrible*... like so horrible I have to think I'm doing something wrong. [15:23] pjacobs has joined the channel [15:23] tbranyen: broofa: well yeah... is going to be horrible [15:23] bEEEviz: how can i check if i'm running a script in a browser or on node? [15:23] tbranyen: broofa: its like proof of concept shit, useful for bdd and stuff [15:23] DrMcKay: bEEEviz: window [15:24] DrMcKay: bEEEviz: (check for it's existance) [15:24] bEEEviz: yes. that's what i thought [15:24] bEEEviz: but i'm doing something wrong. wait [15:24] broofa: tbranyen??? what is... sizzle? jsdom/apricot seem to have been around a while. [15:24] tbranyen: broofa: jsdom is slow [15:24] levi501d has joined the channel [15:24] bEEEviz: ah [15:24] bEEEviz: i'm stupid, sorry [15:24] bEEEviz: ;) [15:24] tbranyen: broofa: sizzle is like years older than jsdom [15:24] bEEEviz: works fine. thanks [15:25] bEEEviz: if(typeof window != 'undefined') { window.geolib = geolib; } else { module.exports = geolib; } [15:25] broofa: tbranyen - okay, but this is like 100x slower than I would expect. e.g. doing "find(*)" to get all elements in http://nodejs.org/docs/v0.4.12/api/ takes several minutes. :( [15:25] bEEEviz: is this way "best practice"? [15:26] louissmit has joined the channel [15:26] broofa: 'Tracked this down to the "makeArray()" method which calls item() for every dom element... which in turn appears to be doing a recursive search through the whole DOM in jsdom. [15:26] tjholowaychuk has joined the channel [15:26] tbranyen: broofa: well i mean... dude its not meant to be used in node [15:26] tbranyen: if you're having performance issues, i'd say thats what happens [15:27] tbranyen: don't use it for anything other than experimentation [15:27] dob_ has joined the channel [15:27] dmkbot has joined the channel [15:27] tbranyen: sizzle was designed for browsers [15:27] tbranyen: broofa: use querySelectorAll if its avail [15:27] tbranyen: i can't remember if that was implemented in jsdom [15:27] FireFly|n900 has joined the channel [15:28] lz: why not use the jquery module? [15:28] tbranyen: because thats retardedly overkill [15:28] DrMcKay: mikeal: not that I'm harassing you somehow, but did you push it already? I can't see any changes in npm nor git [15:28] mikeal: sorry, got caught up with some other stuf [15:28] tbranyen: lz: jquery is a cross browser normalization lib [15:28] tbranyen: what does that have anything to do with node [15:28] DrMcKay: mikeal: OK, not a problem :) [15:28] tbranyen: really confuses me that people want to use it there [15:29] lz: true [15:29] bEEEviz: is this "best practice"? [15:29] bEEEviz: if(typeof window != 'undefined') { window.geolib = geolib; } else { module.exports = geolib; } [15:29] lz: how about node.io? [15:29] CoverSlide: because it's still a lot easier than document.getElementById().getElementsByClassName().childNodes[] [15:30] Ned_ has joined the channel [15:30] DrMcKay: uhm... 'connect UNKNOWN'? what error is that? [15:31] DrMcKay: it got raised in net_uv.js [15:31] jvdev has joined the channel [15:31] jonrohan has joined the channel [15:31] Argoe has joined the channel [15:32] davida has joined the channel [15:32] CoverSlide: probably a default: in a switch for the error handler [15:33] CoverSlide: it'd be nice if it showed errnos [15:34] DrMcKay: CoverSlide: yeah, definitely [15:34] bradleymeck has joined the channel [15:34] bradleymeck: what are some service management systems besides init.d and upstart? (and do they already have node libraries) [15:34] DrMcKay: bradleymeck: systemctl (Fedora and Arch) [15:35] piscisaureus_ has joined the channel [15:35] DrMcKay: bradleymeck: it's controlled through dbus, so this kind of lib should be easy [15:35] Layke: for node, forever [15:36] eee_c has joined the channel [15:36] bradleymeck: layke im deving forever to add in true service management rather than just process, thats why im looking for systems in order to determine an adapter interface ;-) [15:37] emattias has joined the channel [15:37] anveo has joined the channel [15:38] DrMcKay: bradleymeck: I'm currently writing something like nodemon for forever, would you guys prefer a regex based .foreverignore or a .gitignore-like .foreverignore? [15:38] CoverSlide: but then will it be linux-only? [15:38] CIA-54: libuv: 03Marek Jelen 07master * rd9fb84c 10/ config-unix.mk : build: absorb CFLAGS from environment - http://git.io/db0Ocw [15:38] DrMcKay: CoverSlide: it already is [15:38] CoverSlide: because i'm not sure what osx, *bsd, solaris use [15:38] DrMcKay: CoverSlide: *it's already Unix-pnly [15:38] mjijackson has joined the channel [15:39] fangel has joined the channel [15:39] bradleymeck: CoverSlide it has a posix fallback with init.d scripts [15:39] DrMcKay: actually, it can be currently used on any system that supports `ps`, I think [15:39] bradleymeck: DrMcKay, a true library that matched .gitignore would be great so we could have cohesion [15:39] bnoordhuis: DrMcKay: re connect UNKNOWN: unmapped (in libuv) sys error [15:40] bradleymeck: regexp is generally overkill [15:40] bnoordhuis: DrMcKay: if you put strace or truss on it and tell me what errno it is, i'll add it [15:40] DrMcKay: bnoordhuis: happens here: https://github.com/joyent/node/blob/v0.5.7/lib/net_uv.js#L552 [15:40] DrMcKay: bnoordhuis: and I have no idea how to reproduce :< [15:40] herbySk has joined the channel [15:41] DrMcKay: bradleymeck: OK. that would be fun, it's a hard thing to implement [15:41] DrMcKay: bradleymeck: (I think I will have to do some glob-matching by myself) [15:41] bradleymeck: DrMcKay, yea definately hard to implement [15:42] bEEEviz: uhm [15:42] DrMcKay: because I can't find a way to have fnmatch return true for: /usr/aaaaa and pattern aaa* [15:42] fg3 has joined the channel [15:43] pgherveou has joined the channel [15:43] DrMcKay: even if there's a way, glob is not a dependency you like to have [15:44] stephank has joined the channel [15:44] CoverSlide: maybe glob should be in core [15:44] wookiehangover has joined the channel [15:45] DrMcKay: bnoordhuis: ^ ? [15:45] birusainju has joined the channel [15:45] bnoordhuis: DrMcKay: sorry? [15:45] CoverSlide: bnoordhuis: glob in core? [15:45] bnoordhuis: guess my answer :) [15:45] DrMcKay: no? [15:45] bnoordhuis: correct [15:46] bradleymeck: glob is not really all that common in need, just a few libraries here and there [15:46] varun has joined the channel [15:46] CoverSlide: maybe it could be useful in fs or path [15:47] siculars has joined the channel [15:47] dguttman has joined the channel [15:48] DrMcKay: I think I will try to use that: https://github.com/isaacs/minimatch [15:49] DrMcKay: also, I could swear that I didn't see it in npm search just few days ago :/ [15:49] MrNibbles has joined the channel [15:49] Glenjamin: pure-js glob maybe [15:49] Glenjamin: but not the C backed one [15:49] jetienne has joined the channel [15:49] Glenjamin: minimatch looks good [15:49] DrMcKay: Glenjamin: looks like this one is pure [15:49] DrMcKay: btw, is there some JS conference being held in Warsaw now? [15:50] wbednarski has joined the channel [15:50] DrMcKay: ah, onGameStart [15:50] sonnym has joined the channel [15:51] CoverSlide: Michael Budzynski? [15:51] CoverSlide: That sounds like a fake name [15:51] DrMcKay: CoverSlide: lol [15:52] Glenjamin: the tap lib used to test minimatch sounds cool [15:52] Glenjamin: although for a test output format standard, I've never heard of it before :s [15:53] patcito has joined the channel [15:53] kkaefer: tjholowaychuk: hey, can I do an expresso release? [15:53] tjholowaychuk: kkaefer yeah sure man [15:53] TheJH has joined the channel [15:53] CoverSlide: apparently it's popular in Perl [15:53] smathy has joined the channel [15:54] kkaefer: tjholowaychuk: I mean in npm [15:54] Ned_ has joined the channel [15:54] tjholowaychuk: right right, do you know if i can add contributors with npm? [15:54] tjholowaychuk: haven't tried [15:54] kkaefer: yes [15:54] bEEEviz: when i have a closure [15:54] blup: could i create a tutorial script that records my mouse movements and client hash changes? [15:54] kkaefer: npm owner add kkaefer expresso [15:55] bEEEviz: (function(window) { })(this); [15:55] bEEEviz: is it still possible to find out if i'm in a browser or will i have to rename my window reference variable? [15:55] bEEEviz: since "this" is {} in node [15:55] tjholowaychuk: kkaefer should be ready to go [15:55] kkaefer: cool, thanks [15:55] bEEEviz: and so window is not longer undefined [15:56] wookiehangover has joined the channel [15:56] mjijackson: tjholowaychuk: you made some interesting comments on HN yesterday. [15:56] Glenjamin: bEEEviz: you could check window for some window attributes [15:56] Glenjamin: window && window.userAgent or something [15:56] bEEEviz: sure [15:56] Jippi has joined the channel [15:57] CoverSlide: technically this isn't {} [15:57] bEEEviz: but i'm not sure if there is an attribute which is exactly the same in every browser in the universe [15:57] Glenjamin: you dont have to check the value [15:57] Glenjamin: just existance [15:57] freeformz has joined the channel [15:57] bEEEviz: i meant that [15:57] Glenjamin: window has a spec :) [15:57] bEEEviz: you know that thing called internet explorer? ;) [15:58] Glenjamin: window.navigator should do it [15:58] bEEEviz: i'm not sure if internet explorer 4 has window.userAgent or window.navigator [15:58] bEEEviz: ;) [15:58] CoverSlide: window.userAgent ? [15:59] Frippe has joined the channel [15:59] paulwe has joined the channel [15:59] herbySk has joined the channel [15:59] CoverSlide: window.navigator I think is the standard [15:59] bEEEviz: ok, thanks. i'll just use it [15:59] dmkbot has joined the channel [16:00] Frippe_ has joined the channel [16:00] Frippe__ has joined the channel [16:00] robi42 has joined the channel [16:00] DrMcKay: bnoordhuis: I think I can reproduce this issue [16:00] DrMcKay: bnoordhuis: what do you need? [16:01] bnoordhuis: DrMcKay: the errno that's returned by (presumably) the connect syscall [16:01] bnoordhuis: DrMcKay: `strace -e connect node script.js` should print it out [16:01] guillermo has joined the channel [16:01] DrMcKay: bnoordhuis: k, it just will take a second [16:02] DrMcKay: or... [16:02] DrMcKay: !ping [16:02] dmkbot: DrMcKay, pong [16:02] EagleCoder has joined the channel [16:02] DrMcKay: no, actually, happens at some random interval [16:02] CarterL has joined the channel [16:03] metellus has joined the channel [16:03] arnee has joined the channel [16:05] Xeon06_ has joined the channel [16:05] Xeon06_: Hey guys [16:05] Xeon06_: Can anybody explain the rationale behind this http://nodeguide.com/style.html#quotes [16:06] isaacs has joined the channel [16:06] CoverSlide: It's a crockford recommendation [16:06] tbranyen: lol, telling people what quotes to use [16:06] Xeon06_: Ughh [16:06] tbranyen: the javascript community is so fucked sometimes [16:06] bradleymeck: Xeon06_ you can embed json in single quote strings easily [16:06] bradleymeck: but meh [16:06] CoverSlide: so if you have html in your string, the attributes would be quoted [16:06] tbranyen: you can embed single quotes in double quote strings easily [16:06] tbranyen: xD [16:07] TheJH: isaacs, you're here! :) [16:07] CoverSlide: with double quotes [16:07] isaacs: hello :) [16:07] Xeon06_: What if you need single quotes :O [16:07] DrMcKay: isaacs: you! [16:07] CoverSlide: \' [16:07] CoverSlide: or ' in html [16:07] DrMcKay: ACTION tries to remember this question he wanted to ask [16:07] bradleymeck: ACTION wants ftw(3) :( [16:07] odyniec has joined the channel [16:08] CoverSlide: ftw(3)? [16:08] joshkehn: Using single quotes gets me in trouble when I switch to Java / C [16:08] DrMcKay: CoverSlide: file tree walk or something [16:08] DrMcKay: CoverSlide: posix function [16:08] CoverSlide: oh [16:08] eignerchris has joined the channel [16:08] CoverSlide: ftw(3) FTW! [16:09] DrMcKay: isaacs: I know! do you want keyboard shortcuts in search.npmjs.org? [16:09] DrMcKay: isaacs: something like Google has [16:09] motill has joined the channel [16:10] benvds has joined the channel [16:10] nibblebot has joined the channel [16:11] WRAz has joined the channel [16:13] DrMcKay: bradleymeck: just bindings or implemented in JS or in core? [16:13] bradleymeck: core since windows support would be painful [16:13] Xeon06_ has joined the channel [16:14] DrMcKay: bradleymeck: looks like a reasonable thing for libuv... [16:14] Xeon06_ has left the channel [16:14] akiva has joined the channel [16:15] jaequery has joined the channel [16:15] khrome_ has joined the channel [16:16] joshkehn: I have a mongoose question if anyone is up for it. [16:16] DrMcKay: joshkehn: shoot [16:16] joshkehn: I need to have two mongoose objects. [16:17] joshkehn: One pointing to our main database and the other to a small aux. database. [16:17] joshkehn: Now the way the models got setup is a bit funky. [16:17] joshkehn: It uses Express, so in the main app.js there's a [16:17] joshkehn: app.set('mongoose', mongoose) [16:17] joshkehn: `mongoose` was in turn setup with the appropriate config file for that environment. [16:18] murilobr has joined the channel [16:18] joshkehn: I either need to create a new mongoose object or alter the database for a select number of models. [16:18] joshkehn: Which is easier / recommended? [16:19] Ned_ has joined the channel [16:20] joshkehn: Really I would just like to say, in the model, something like [16:20] joshkehn: mongoose.select_database('other') [16:20] HektoR has joined the channel [16:20] joshkehn: DrMcKay: Thoughts? [16:21] jtsnow has joined the channel [16:21] sonnym has joined the channel [16:21] _kud has joined the channel [16:22] DrMcKay: joshkehn: processing [16:22] Shrink has joined the channel [16:22] Shrink has joined the channel [16:23] DrMcKay: joshkehn: what's the problem? can't you just have another connection object? [16:23] joshkehn: Ja. In theory. [16:24] BillyBreen has joined the channel [16:24] joshkehn: Actually. [16:24] dmkbot has joined the channel [16:24] joshkehn: Let me try something. [16:25] ekryski has joined the channel [16:25] davidwalsh has joined the channel [16:27] evil_bankster has joined the channel [16:28] MUILTFN has joined the channel [16:28] avalanche123 has joined the channel [16:29] matomesc has joined the channel [16:29] nibblebot: tjholowaychuk: does expresso@latest install correctly with npm@latest for you, i'm having trouble with the makefile jscov deps [16:29] japj has joined the channel [16:29] tjholowaychuk: nibblebot not sure, i think kkaefer just released a new one [16:29] kkaefer: nibblebot: sorry, that's me [16:29] kkaefer: nibblebot: working on it [16:30] kkaefer: nibblebot: seems npm doesn't include the deps folder [16:30] kkaefer: not sure why :/ [16:30] nibblebot: maybe you need __dirname instead of ./ ? that had bitten me a lot [16:31] tjholowaychuk: jscov is a dependency in package.json [16:31] tjholowaychuk: oh maybe not [16:31] tjholowaychuk: wtf [16:31] tjholowaychuk: thought it was [16:32] kkaefer: wellit's a submodule [16:32] creationix has joined the channel [16:32] evil_bankster has left the channel [16:33] gnuanu has joined the channel [16:33] ronnieboy has joined the channel [16:34] kkaefer: doh [16:34] kkaefer: user failure ;) [16:35] matjaz has joined the channel [16:35] bartt has joined the channel [16:36] balgarath: we upgraded the http-proxy package to 0.7 the other day, and are getting a "response.resume error: Cannot resume() closed Socket" every few minutes. is anyone else seeing this? [16:36] kkaefer: hmm, would like to get rid of jscov as a hard dependency [16:36] kkaefer: nibblebot: can you try again now please? [16:36] xeodox has joined the channel [16:36] CoverSlide: everyone who installed expresso would like to get rid of jscov [16:37] gazumps has joined the channel [16:37] xeodox: I want to combine all my javascript files. (I don't care about minifying). What's the best node.js module that can do this? I looked on the site and there are 3 of them, but which is best for combining? [16:37] DrMcKay: hey, would GH repo rename do some harm to forks? [16:37] fmeyer has joined the channel [16:38] CoverSlide: combine js files? fs is really all you need [16:38] DrMcKay: or wait, actually no, it's GH user rename [16:39] fmeyer: [D [16:40] jonrohan has joined the channel [16:41] Renegade001 has joined the channel [16:41] xeodox: CoverSlide…how? [16:42] johnkpaul has joined the channel [16:43] johnkpaul: Does anyone know what I should do to resolve this error when using node? Error: EPIPE, Broken pipe [16:43] CoverSlide: fs.writeFileSync('newFile.js', fs.readFileSync('file1.js') + ';' + fs.readFileSync('file2.js')) [16:43] broofa has joined the channel [16:43] CoverSlide: sync version [16:43] CoverSlide: async a bit more complicated [16:43] dmkbot has joined the channel [16:43] johnkpaul: I'm using v0.4.11 [16:44] Remoun has joined the channel [16:44] hornairs has joined the channel [16:44] Ned_ has joined the channel [16:44] jetienne has joined the channel [16:45] jonrohan has joined the channel [16:46] michael has joined the channel [16:46] vipaca has joined the channel [16:46] vipaca has joined the channel [16:46] jbpros has joined the channel [16:47] TooTallNate has joined the channel [16:49] markdaws has joined the channel [16:49] smtlaissezfaire has joined the channel [16:49] Ned_ has joined the channel [16:49] Dulak has joined the channel [16:49] Dulak has joined the channel [16:49] MooGoo: cat file1.js file2.js file3.js > bigfile.js [16:50] sonnym has joined the channel [16:50] StanlySoManly has joined the channel [16:50] harthur has joined the channel [16:51] CoverSlide: MooGoo: if the file begins with `(function ...` you're fucked [16:51] xerox: ender.js [16:52] CoverSlide: well unless the previous file is correctly semicoloned [16:52] joshkehn: ;(function [16:52] MooGoo: im sure adding the ; between files using bash isnt hard [16:52] CoverSlide: yeah, that works too [16:53] N0va` has joined the channel [16:56] trotter has joined the channel [16:56] N0va has joined the channel [16:57] junkee[] has joined the channel [16:57] towski has joined the channel [16:58] muspelheim has joined the channel [16:58] nimstr has joined the channel [16:58] nimstr has left the channel [16:59] stagas_ has joined the channel [16:59] skiz has joined the channel [16:59] jj0hns0n has joined the channel [16:59] DrMcKay: I'm going to hospital, if I'm not back this week, someone get my TODO list done [16:59] duko has joined the channel [16:59] DrMcKay: (basically, forever watching files) [17:00] eee_c has joined the channel [17:01] halcyon918 has joined the channel [17:01] MrNibbles has joined the channel [17:02] langworthy has joined the channel [17:03] alvaro_o has joined the channel [17:03] fearphage: is there a nondunit channel? if not, does anyone know where I can find an example of a nodeunit config file? i just really want it to ignore a single file in the tests directory [17:03] sub_pop has joined the channel [17:04] harth has joined the channel [17:04] gjohnson_ has joined the channel [17:04] devongovett has joined the channel [17:04] dgathright has joined the channel [17:05] gr-eg has joined the channel [17:05] kenperkins has joined the channel [17:06] robotmay has joined the channel [17:07] JaKWaC has joined the channel [17:07] hermanjunge has joined the channel [17:07] hermanjunge: hi [17:07] hermanjunge: looking to test/develop an https site [17:07] CoverSlide: vows [17:07] CoverSlide: !next [17:07] hermanjunge: verisign certificates are $ 400 [17:07] CoverSlide: oh [17:07] CoverSlide: self-sign stuff [17:08] hermanjunge: are there a cheap altertnative (since is testng/develop) [17:08] CoverSlide: there's also cacert [17:08] gregpascale has joined the channel [17:08] CoverSlide: http://www.cacert.org/ [17:08] hermanjunge: they are for free [17:08] hermanjunge: yes, that's I'm looking for [17:09] hermanjunge: I am not expending $400 yet [17:09] brianloveswords has joined the channel [17:09] hermanjunge: thank you CoverSlide [17:09] avalanche123 has joined the channel [17:09] CoverSlide: any reason why self-signing wouldn't work if you're only testing? [17:09] Sami_ZzZ has joined the channel [17:09] hermanjunge: Haven't fully test it yet [17:10] hermanjunge: but my app is an https inside a fb canvas [17:10] CoverSlide: oic [17:10] Morkel has joined the channel [17:10] hermanjunge: I was afraid to have tech problems with FB [17:10] hermanjunge: one more quest [17:10] hermanjunge: the leading exclamation sign issues commands? [17:11] adambeynon has joined the channel [17:11] broofa has joined the channel [17:13] Xano has joined the channel [17:13] Xano has left the channel [17:14] Ned_ has joined the channel [17:16] confoocious has joined the channel [17:16] confoocious has joined the channel [17:17] netlemur has joined the channel [17:17] hermanjunge: cacert sucks [17:17] hermanjunge: they just don't like my phrases [17:18] davidascher has joined the channel [17:18] eignerchris_ has joined the channel [17:19] vidi has joined the channel [17:20] sonnym has joined the channel [17:22] martinisoft has joined the channel [17:22] jhurliman has joined the channel [17:22] Spion has joined the channel [17:23] creationix: who even has cacert's root pre-installed? Is that any better than self-signing? [17:25] CoverSlide: creationix: are you looking forward to working for Meg Whitman? [17:26] jtsnow has joined the channel [17:26] nibblebot: kkaefer: works, thanks! [17:27] Renegade001 has joined the channel [17:27] creationix: CoverSlide: I don't get the feeling that we'll be HP long-term [17:27] navaru: Does anyone here made a project using serialport module? [17:27] JSManiacs has joined the channel [17:27] jetienne has joined the channel [17:28] bruce has joined the channel [17:30] Me1000 has joined the channel [17:31] neilk_ has joined the channel [17:32] creationix has left the channel [17:33] CoverSlide: hmm cacert isn't currently on any browsers, but they have requested to be on firefox and safari [17:33] cpetzold has joined the channel [17:33] pgherveou has joined the channel [17:34] hebz0rl has joined the channel [17:35] hellp has joined the channel [17:35] gautema has joined the channel [17:37] CIA-54: libuv: 03Igor Zinkovsky 07master * r019e6ed 10/ src/win/fs-event.c : windows: NextEntryOffset is relative, not absolute - http://git.io/Tq6xNQ [17:37] JaKWaC has joined the channel [17:37] mikedeboer has joined the channel [17:37] _64k has joined the channel [17:38] aheckmann has joined the channel [17:39] Lemon|mbp has joined the channel [17:40] reid has joined the channel [17:40] jslatts_ has joined the channel [17:40] jY has joined the channel [17:41] pizthewiz has joined the channel [17:42] _sorensen_ has joined the channel [17:42] jY: is there a way to send stdout from a spawn() when it happens.. not just when the process is done? [17:42] carlosfeyt has joined the channel [17:43] carlosfeyt: hi [17:43] MooGoo: on('data', function(){}) ? [17:43] CoverSlide: jY: var cp = child_process.spawn('name'); cp.stdout.on('data',function(){}) [17:43] tylerstalder has joined the channel [17:43] CoverSlide: .spawn doesn't wait for the process to end, you're thinking of exec() [17:44] jY: CoverSlide, strange i'm doing that [17:44] jY: maybe it's the process i'm running then.. but it doesn't happen if i run it from command line [17:46] AvianFlu has joined the channel [17:46] CoverSlide: odd [17:46] CoverSlide: try cp.stdout.pipe(process.stdout) [17:46] maligree has joined the channel [17:46] CoverSlide: or maybe it's outputting to stderr [17:49] EagleCoder has joined the channel [17:49] stonebranch has joined the channel [17:49] muspelheim has joined the channel [17:49] sonnym has joined the channel [17:50] rakesh314 has joined the channel [17:53] CrisO has joined the channel [17:53] langworthy has joined the channel [17:53] eldios has joined the channel [17:54] joeytwiddle has joined the channel [17:58] __tosh has joined the channel [17:58] jmoyers has joined the channel [17:59] cying has joined the channel [17:59] Country has joined the channel [18:01] dguttman_ has joined the channel [18:02] ErikCorryV8 has joined the channel [18:10] mklappstuhl has joined the channel [18:10] nuck has joined the channel [18:12] Me1000 has joined the channel [18:13] dandean has joined the channel [18:13] muspelh has joined the channel [18:13] gregmore_ has joined the channel [18:14] cpetzold has joined the channel [18:15] denom has joined the channel [18:17] muspelhe has joined the channel [18:17] gjohnson_ has joined the channel [18:19] sonnym has joined the channel [18:20] maushu has joined the channel [18:22] fly-away has joined the channel [18:24] kunalc has joined the channel [18:24] grekko has joined the channel [18:25] sub_pop has joined the channel [18:27] khrome_ has joined the channel [18:29] gxdssoft has joined the channel [18:30] CarterL has joined the channel [18:31] lz has joined the channel [18:32] motill has joined the channel [18:36] bradleymeck has joined the channel [18:36] broofa has joined the channel [18:36] aconbere has joined the channel [18:39] MatthewS has joined the channel [18:40] sonnym has joined the channel [18:43] mklappstuhl has joined the channel [18:45] shipit has joined the channel [18:45] yyamano has joined the channel [18:45] c4milo: tjholowaychuk: Tj wuz up. Is there a shortcut in express or connect to send a 201 and a location header pointing to the same app in a different route? [18:46] tjholowaychuk: yup res.redirect() [18:46] tjholowaychuk: specifically res.redirect(url, 201) [18:46] hermanjunge has joined the channel [18:46] mikl has joined the channel [18:46] c4milo: it's a rest api [18:46] CoverSlide: a 201? [18:46] tjholowaychuk: 301* [18:46] CoverSlide: you mean 301? [18:46] c4milo: tjholowaychuk: I did that and it returned html [18:46] c4milo: I mean 201 [18:47] tjholowaychuk: c4milo yeah based on Accept it will give html or plain-text [18:47] tjholowaychuk: the body doesn't really matter [18:47] tjholowaychuk: 201 isnt a redirect [18:47] tjholowaychuk: 3xx [18:47] c4milo: http://developer.github.com/v3/pulls/ [18:47] c4milo: tjholowaychuk: look in that page for Location [18:48] tjholowaychuk: oOoO fancy new api stuff [18:48] tjholowaychuk: hm [18:48] tjholowaychuk: ah i see " For 201 (Created) responses, the Location is that of the new resource which was created by the request" [18:48] c4milo: yep [18:48] tjholowaychuk: fair enough [18:49] tjholowaychuk: well i mean if you're getting specific with the body [18:49] tjholowaychuk: just do [18:49] c4milo: I guess normally http clients follow the Location [18:49] tjholowaychuk: res.header('Location', url); res.send({ some: 'data' }) [18:49] AvianFlu_ has joined the channel [18:49] tjholowaychuk: res.statusCode = 201 [18:50] c4milo: tjholowaychuk: yeah I konw that, I just was double checking with you. You have lots of hidden shortcuts ^^ [18:50] sonnym has joined the channel [18:50] c4milo: tjholowaychuk: thanks man [18:51] c4milo: tjholowaychuk: have you have time to work on mocha/ [18:51] c4milo: ? [18:51] eignerchris has joined the channel [18:51] martin2 has joined the channel [18:51] tjholowaychuk: a little [18:51] tjholowaychuk: just cleaned a few things up [18:51] ekryski has joined the channel [18:51] joshkehn: Any good modules for working with images in node? [18:51] c4milo: tjholowaychuk: what did you finallly decide about before, after, etc? [18:52] CoverSlide: working with images? [18:52] CoverSlide: lide modifying them? [18:52] joshkehn: Maybe [18:52] joshkehn: Not necessary right now [18:52] CoverSlide: like you would with gd in php? [18:52] AvianFlu: joshkehn, I'm pretty sure I saw a node imagemagick thing linked somewhere [18:52] CoverSlide: i think there's a node-gd [18:52] AvianFlu: and by "somewhere" I mean "20 minutes ago on github" [18:52] mike5w3c has joined the channel [18:52] joshkehn: Basically I want to get basic image information like size and type. [18:52] CoverSlide: i haven't tried node-canvas but it looks cool [18:53] balbeit has joined the channel [18:53] joshkehn: Just image.get_width / get_height would work for now [18:53] sonnym1 has joined the channel [18:54] tjholowaychuk: image.get_width ? lol [18:54] tjholowaychuk: this isnt ruby :p [18:54] balbeit: I'm using Node v0.4.12 with the latest CoffeeScript, but whenever I run any "coffee" command I get an "Error require.registerExtension() remove. User require.extensions instead." at node.js:134. Any ideas? [18:54] nuck has joined the channel [18:54] reid has joined the channel [18:54] joshkehn: tjholowaychuk: ja, I was omitting the ()'s [18:54] tjholowaychuk: camelcase! [18:55] CoverSlide: get_width could be a getter [18:55] joshkehn: tjholowaychuk: Depends on what the existing format is [18:55] joshkehn: I can go getWidth or get_width. [18:55] CoverSlide: how about .retrieveHorizontalDimensions() [18:56] joshkehn: CoverSlide: This isn't Java. ;) [18:56] CoverSlide: haha [18:56] FireFly|n900 has joined the channel [18:57] MooGoo: the JS designers never got that memo [18:57] aron_ has joined the channel [18:57] markwubben has joined the channel [18:57] CoverSlide: Actually the memo was `Make it look like Java` [18:57] CoverSlide: according to Eich [18:58] colinclark has joined the channel [18:58] joshkehn: I thought it was “Make a language, we don't have any needs right now so it needs to be flexible.” [18:58] MooGoo: I think the DOM designers used that memo as their bible [18:58] kkaefer: var idf = new ImageDimensionsFactory(); [18:59] kkaefer: idf.retrieveDimensions(image) [18:59] joshkehn: kkaefer: You're missing the [18:59] joshkehn: GenericImage image = new JpegImage('path/to/file.jpg') [18:59] mynameisbender has joined the channel [19:00] CoverSlide: oh jeez [19:00] CoverSlide: node-imagemagick is just a child_process runner [19:00] MooGoo: heh [19:00] kkaefer: heh [19:00] MooGoo: your surprised? [19:01] CoverSlide: i expected a binding to libmagick [19:01] kkaefer: I once found this sqlite library that ran the sqlite3 binary with child_process [19:01] MooGoo: oiaksdjklasjd [19:01] kkaefer: and piped stuff from stdin/stdout [19:01] MooGoo: so kkaefer...sqlite3 on .5? [19:02] kkaefer: MooGoo: yeah... have to find time to update it :/ [19:02] kkaefer: it'll be ready for the .6 release though [19:02] brianc: is http.ServerRequest a pipeable stream? [19:02] MooGoo: I wish I knew shit about C++/v8 [19:03] brianc: MooGoo: v8's c++ code is very clean, very easy. node source is good learning place. [19:03] kkaefer: v8 is actually pretty awesome [19:03] kkaefer: yeah, agreed [19:03] brianc: at least the public v8 c++ api [19:03] MooGoo: yar so I've heard [19:03] brianc: the internals are MADNESS [19:03] aho has joined the channel [19:03] MooGoo: black box [19:04] Draggor: What do people need v8 knowledge for? [19:04] MooGoo: to fix muscle cars [19:04] brianc: Draggor: doing bindings between node & c/c++ libraries [19:04] Draggor: Oh okay [19:04] CoverSlide: isaacs has some nice v8 documentation somewhere [19:04] kkaefer: http://izs.me/v8-docs/main.html [19:04] Draggor: brianc: I did the nicer bindings to bigint [19:04] isaacs: http://izs.me/v8-docs/ [19:04] CoverSlide: sweet [19:04] Draggor: isaacs: that site saved my butt [19:04] AAA_awright: It looks like autogenerated documentation [19:04] kkaefer: http://create.tpsitulsa.com/wiki/V8_Cookbook has some good pointers [19:05] MooGoo: my inital foray into v8 was to find a way to expose the scope chain to JS [19:05] MooGoo: but I couldnt figure it out [19:05] Draggor: Getting everything to garbage collect correctly was interesting [19:05] kkaefer: yeah, it's just doxygen, but still pretty useful [19:05] brianc: is there a good node module which pipes 1 incomming stream into many outgoing streams handling the pause/resume stuff ala stream.pipe does for a 1->1 ? [19:05] Draggor: Doing bindings for the most part is rather straightforward [19:05] Frippe_ has joined the channel [19:05] gregmoreno has joined the channel [19:05] JaKWaC: I'm trying to "extend" a functions prototype. I have a really simple example of what I want to do, basically I have a show function that returns some data. I want to extend that function so it will return the data in uppercase. I have a gist! https://gist.github.com/1235688 [19:06] JaKWaC: I'm getting a `TypeError: undefined is not a function` as I'm not sure how to capture the original function before I overwrite it. [19:06] Draggor: If people want to see a straightforward set of bindings, check out this: https://github.com/substack/node-bigint [19:06] ErikCorryV8 has joined the channel [19:07] brianc: Draggor: yeah GC is the tricky part. The node::ObjectWrap in v0.5.x should help w/ that [19:07] stash1: nice, been looking for V8 API docs [19:07] Draggor: brianc: I did all this on v0.4.x [19:08] max_dev has joined the channel [19:09] slifty has joined the channel [19:09] jonaslund: MooGoo: that's a weird thing to try [19:09] brianc: JaKWaC: https://gist.github.com/1235713 [19:09] MooGoo: yes...I like to do things I'm not supposed to [19:09] Draggor: actually okay the c++ constructor on bigint is a wee bit odd [19:10] MooGoo: tho SpiderMonkey used to have __parent__ [19:10] JaKWaC: brianc: Ah! Thanks [19:11] brianc: JaKWaC: :) [19:11] koosh has joined the channel [19:11] jonaslund: MooGoo: If you implement the spec literally you'll have a "scope" chain (it's a trivial way to do a js interpreter) [19:11] tauren: WAYYYY off topic question. Apologies in advance. A few months ago I saw some startup site that sells high fashion products, but lets users setup their own stores to sell these products to their friends. For some reason I recall it being associated with node, like perhaps they were using it as the platform. [19:11] tauren: anyone know what the website is? [19:12] CoverSlide: http://nodejs.org ??? [19:12] jonaslund: MooGoo: one of the first optimizations any compiler/jit writer should do though is to do specific structures with direct pointers to handle all closed over variables (and nothing else) [19:12] brion has joined the channel [19:12] brion has joined the channel [19:12] blup has joined the channel [19:12] CoverSlide: sorry, i only read one line at a time [19:12] eric_b has joined the channel [19:12] CoverSlide: tauren: shopify? [19:12] Lemon|mbp has joined the channel [19:13] jonaslund: MooGoo: if you really want to mess with that look at how eval is implemented since it will force the compiler to put all directly visible variables into the function instances [19:13] brianc: shopify is rails i believe [19:13] jonaslund: MooGoo: if a variable shadows another one i think it won't matter though [19:13] tauren: CoverSlide: no, not shopify. i'm aware of them... thanks though! [19:13] MooGoo: interesting [19:14] jonaslund: ACTION made a toy JS-C translator [19:14] pgherveo_ has joined the channel [19:14] jonaslund: was some 2-4x slower than V8 last year [19:14] MooGoo: the only use case I could really think of was implemnting a string format function that could use variables from the scope it was called in [19:14] MooGoo: instead of needing to be passed explicetly [19:14] jonaslund: for my trivial tests thatis :) [19:14] jonaslund: but it lacked any kind of type specialization so well [19:15] arpunk has joined the channel [19:15] MooGoo: that doesnt sound bad [19:15] MooGoo: actually [19:15] jonaslund: (that was pretty ok though compared to rhinos 22x slower :D ) [19:16] jonaslund: the JVM is pretty bad for implementing languaes with dynamic typing though [19:16] mroman has joined the channel [19:16] CoverSlide: jdk<7 yes [19:16] jonaslund: even with invokedynamic in java7 they will still need to put any nonlocal numbers into objects [19:17] zmbmartin has joined the channel [19:18] Ned_ has joined the channel [19:18] jonaslund: so given A and B being 2 integers you will get an memory allocation for C=A+B (to be fair V8 need to create an object for double values once it leaves the local scopes last i checked) [19:18] codehero has joined the channel [19:19] jonaslund: but integers will be fine [19:20] sonnym has joined the channel [19:20] kulor-uk has joined the channel [19:21] necrodearia has joined the channel [19:23] slifty_corsair has joined the channel [19:24] jtrudeau has joined the channel [19:25] ErikCorryV8: jonaslund: Yes, only doubles in local variables are unboxed. [19:25] mraleph has joined the channel [19:25] ErikCorryV8: And in arrays. [19:25] ErikCorryV8: But inlining can stretch the definition of 'local' [19:26] ErikCorryV8: V8 is different from all other VMs there by the way. [19:26] ErikCorryV8: All the others have unboxed doubles as a basic datatype. [19:27] ErikCorryV8: We judged that doing the same would speed up fp-intensive code, but at the expense of making the whole of the rest of the VM more complex and slower. [19:27] Me1000 has joined the channel [19:27] ErikCorryV8: So we didn't do it :-) [19:27] jonaslund: yeah i've been looking at making my toy compiler into something proper and that's one thing i've pondered on a fair bit [19:28] ErikCorryV8: On average we are still ahead of Kraken, the most FP heavy benchmark out there. So it's working out fine I think. [19:28] jonaslund: (mainly from experience writing some other toy compiler ages ago that did just that... eschewed "big" basic types for word sized objects all over the place and boxed doubles) [19:28] mraleph: I disagree that fat values make system a lot more complex. [19:28] wbednarski has joined the channel [19:28] mraleph: they just make it a lot more fatter [19:28] tbranyen: trim that fat [19:28] jonaslund: actually [19:28] ErikCorryV8: The others mostly use the NaN trick. There are around 2^52 different ways to code NaN. You can use that space to code all integers and pointers. [19:28] jonaslund: i came up with an idea that might be good actually [19:29] jonaslund: (Do credit me if you find it useful ;) ) [19:29] ErikCorryV8: mraleph: Search the VM for all the places where we test for a Smi. Now you have to test for an unboxed double too. [19:29] CoverSlide: oooh: http://arewefastyet.com/ <<-- Mozilla is really close in kraken [19:29] mraleph: ErikCorryV8: smi goes away. [19:29] jonaslund: SMI ? [19:29] ryanmcgrath_ has joined the channel [19:29] mraleph: ErikCorryV8: unboxed local ints come [19:29] tjholowaychuk: jonaslund small int [19:29] tjholowaychuk: ? [19:29] tjholowaychuk: iirc [19:30] jonaslund: ah [19:30] tjholowaychuk: i read v8 on the plane [19:30] tjholowaychuk: haha [19:30] tylerstalder has joined the channel [19:30] tjholowaychuk: took me a while too i was like wtf is a smi [19:30] jonaslund: the basic problem with nan-coding would be that you add overhead for all non-doubles [19:30] mraleph: ErikCorryV8: but maybe you can also have smi.. benifits are unclear. [19:30] martinisoft has joined the channel [19:30] mraleph: but it's all purely theoretical... [19:31] bradleymeck: I just wish function allocation vs object allocation was closer (though last i checked was like a year ago) [19:31] jonaslund: one encoding i was thinking of was having "int32 type; int32 values", where type is just a type tag [19:31] jonaslund: APRT [19:31] jonaslund: from a NaN mask [19:31] ErikCorryV8: The others have Smis still AFAIK (Smi = small-integer: A 31 bit integer tagged as a misaligned pointer) [19:31] jonaslund: so basically you'd store a type [19:31] jonaslund: but if any "high" bit is set [19:31] jonaslund: you know that it's a NaN tagged value [19:31] jonaslund: then when doing double operations you xor [19:31] mraleph: ErikCorryV8: into NaN box you can put int32 [19:31] ErikCorryV8: (Actually the pointers are the ones that are misaligned, the Smis have a 0 at the end. [19:33] ErikCorryV8: Jonaslund, there are different ways to encode it with different tradeoffs. But the world is moving towards 48+ bits of address space so you better have a solution there too. [19:33] mraleph: hehe [19:33] jonaslund: yeah this is a 32bit thing [19:34] bingomanatee_ has joined the channel [19:34] mraleph: otherwise you make it to hackernews with "jonaslund's VM has 2^18 gb memory limit" [19:34] aheckmann has joined the channel [19:34] mraleph: and twitter will explode [19:34] avalanche123 has joined the channel [19:35] JasonJS_ has joined the channel [19:35] codehero has left the channel [19:36] JaKWaC has joined the channel [19:37] _64k has joined the channel [19:40] ErikCorryV8: Looking at http://nodejs.org/docs/v0.4.7/api/fs.html#fs.read [19:40] ErikCorryV8: Which is all very nice and dandy [19:41] ErikCorryV8: But how do I know when the file is all read? [19:41] ErikCorryV8: Do I get an error? [19:42] klovadis has joined the channel [19:43] lz: erikcorryv8 you get a callback [19:43] CoverSlide: doesn't the callback get called every time you run the function? [19:44] AvianFlu: ErikCorryV8, fs.readFile is a convenience method that will do a whole file at once for you [19:44] AvianFlu: that might help [19:45] AvianFlu: I've either used that or fs.createReadStream, though, so I can't really say :( [19:45] CoverSlide: I'd prefer fs.createReadStream() and .on('data' and .on('end' [19:45] Ned_ has joined the channel [19:45] lz: yea seems like callbacks for file read always get called and it's up to you to throw errors [19:45] AvianFlu: or fs.createReadStream.pipe(somewhereElse) [19:45] lz: ACTION uses .createReadStream() himself [19:45] cconstantine: does anyone know how to tell mongoskin (or the native mongo driver) how to set slaveOK to true? [19:47] MacDiva has joined the channel [19:48] knifed has joined the channel [19:49] cole_gillespie has joined the channel [19:49] ErikCorryV8: I get a callback when it has read some data, but what do I get when I reach the end of the file? [19:50] Vennril has joined the channel [19:50] parshap has joined the channel [19:50] bnoordhuis: ErikCorryV8: fs.read()? [19:50] sonnym has joined the channel [19:50] grekko has joined the channel [19:50] CoverSlide: maybe you check your length parameter to bytesRead ? [19:50] CoverSlide: though that would be shitty [19:51] CoverSlide: but eof shouldn't return an err [19:53] mehtryx has joined the channel [19:53] tokumine has joined the channel [19:54] CoverSlide: :q [19:55] cconstantine: figured it ok: setting slaveOk is a per-query thing. pass it in as an option [19:55] cconstantine: s/ok/out [19:55] chia has joined the channel [19:56] matjaz has joined the channel [19:56] eldios has joined the channel [19:57] tomtomaso has joined the channel [19:57] pickels has joined the channel [19:58] hydrozen has joined the channel [20:00] davidcoallier has joined the channel [20:01] ianl`: A mongoose query is not executing, any ideas? http://pastie.org/2575515 [20:03] hydrozen: Anybody used mongoose ORM? I'm wondering if there's a way to specify an order to findOne so that it picks a specific record. [20:04] jslatts has joined the channel [20:05] ambroff has joined the channel [20:06] ianl`: hydrozen: model.findOne({'_id':ID}, function (err, doc) {}) [20:06] martinisoft has joined the channel [20:07] joshkehn: hydrozen: You really shouldn't use findOne if you are trying to get the first in an order [20:07] hydrozen: ianl`: yes, but lets say i want to get a record with some attribute = something and that was updated last [20:07] joshkehn: Just use find() and grab the first cursor. [20:07] mraleph: ErikCorryV8: why not use readFileSync? [20:07] hydrozen: joshkehn: so i just use find and specity limit(1) ? [20:07] mraleph: ErikCorryV8: no callbacks. [20:07] joshkehn: hydrozen: Sure [20:07] joshkehn: findOne is just an interface to find() [20:07] joshkehn: https://gist.github.com/1235880 [20:08] ErikCorryV8: I didn't start using node.js so I could call functions with the word 'Sync' in them! [20:08] whitman has joined the channel [20:08] ErikCorryV8: That's like driving your convertible with the roof up! [20:10] whitman: Does anyone know of a good command router, rather than web router, so I can do something like router.on('hello :name', function(name) { console.log('Hello ' + name); }); ? [20:10] tjholowaychuk: whitman eventemitter2 ? [20:10] tjholowaychuk: it's kinda like that [20:11] tjholowaychuk: not really a router but it might be what you're looking for [20:11] CoverSlide: ErikCorryV8: it appears the best you can do is compare your length parameter to the bytesRead argument in the callback [20:11] whitman: tjholowaychuk, thanks, I'll take a look. [20:11] AvianFlu: whitman: http://github.com/hij1nx/eventemitter2 [20:12] whitman: AvianFlu, yea, looking at it now. [20:12] CoverSlide: but fs.createReadStream and .on('data' and .on('end' i think would be the preferred method if you want to read the whole file incrementally [20:12] cjm has joined the channel [20:12] DrMcKay has joined the channel [20:12] CoverSlide: or fs.readFile if you're ok with reading it all at once [20:13] CoverSlide: like file_get_contents() in php [20:13] sam350 has joined the channel [20:14] eventualbuddha has joined the channel [20:15] ianl`: any ideas why mongoose is not executing my queries? http://pastie.org/2575515 [20:15] joshkehn: ianl`: I don't do CS. [20:15] joshkehn: Sorry [20:18] CoverSlide: yes! coffeescript is the problem! [20:18] zeade has joined the channel [20:18] random123 has joined the channel [20:18] whitman: tjholowaychuk, looked at it, doesn't quite do what I want but thanks anyway. [20:18] joshkehn: CoverSlide: I didn't say that [20:18] joshkehn: I just said I couldn't help. [20:19] CoverSlide: well [20:19] CoverSlide: i just said it [20:19] sonnym has joined the channel [20:19] CoverSlide: eww [20:19] CoverSlide: mongodb://localhost/peewithus [20:19] ianl`: yes [20:19] ianl`: justmessinaroundbro [20:20] k1ttty has joined the channel [20:20] drderidder has joined the channel [20:20] dreamdust has joined the channel [20:21] slifty has joined the channel [20:21] iammerrick has joined the channel [20:21] maligree has joined the channel [20:22] FireFly|n900 has joined the channel [20:23] jakehow has joined the channel [20:25] stephank has joined the channel [20:27] gazumps has joined the channel [20:28] Raynos: Can anyone recommend reading material on high level web application architecture using node.js ? [20:28] perezd has joined the channel [20:28] Raynos: All I know is EDA & hook.io is awesome [20:28] Raynos: I dont have any examples [20:28] perezd: EDA [20:28] perezd: ? [20:28] else has joined the channel [20:28] SubStack: isaacs: http-signature is excellent [20:28] MUILTFN has joined the channel [20:28] JaKWaC has joined the channel [20:29] isaacs: awesome :) [20:29] DrMcKay: isaacs: would you like keyboard shortcuts in search.npmjs.org? [20:29] DrMcKay: ACTION will spend this week in bed, sooo... [20:29] SubStack: now testling can have github/ssh style authorized keys for authentication [20:30] isaacs: DrMcKay: i wouldn't invest too much effort in that site. it's all getting redone [20:30] _64k has joined the channel [20:30] isaacs: DrMcKay: but if you wanna do it, i'll pull it, if it works well and doesn't break anything [20:30] DrMcKay: isaacs: redone? [20:30] isaacs: DrMcKay: yah [20:31] isaacs: like, as a proper html site that is google-able [20:31] ryanj has joined the channel [20:31] isaacs: still in couchdb [20:31] BillyBreen has joined the channel [20:31] isaacs: just not all client-side [20:31] whitman: isaacs, I think there's an issue with http proxies in 1.0.30, I keep on getting Error: Invalid protocol when trying to install modules. [20:31] cying_ has joined the channel [20:31] DrMcKay: isaacs: ah, OK [20:31] DrMcKay: isaacs: still, I will do it [20:31] CoverSlide: haha i love this [20:31] CoverSlide: my company has a lifetime subscription plan [20:31] CoverSlide: but there's an asterisk [20:32] CoverSlide: *Plan expires after 5 years [20:32] isaacs: whitman: maybe you're using the https registry, but your proxy only supports http? [20:32] DrMcKay: CoverSlide: lol [20:33] whitman: isaacs, the proxy supports https fine, all the network traffic of a University goes through it. I also tried setting the registry to use http and the error is the same. [20:33] Ned_ has joined the channel [20:33] dgathright_ has joined the channel [20:33] isaacs: whitman: please gist the entire error, from $ to $ [20:33] isaacs: all the output [20:33] akiva: So, any reason why my Jakefile is always returning error Error: No Jakefile. Specify a valid path with -f/--jakefile, or place one in the current directory. ? I know it's there, I can see it and everything. When I try to manually run it like `jake -C /xxx/xxx` it just keeps returning that error [20:33] akiva: Does it need chmod 755? [20:33] akiva: Right now its just rw/r/r [20:33] akiva: I am totally baffled [20:34] whitman: isaacs, ok to PM you the gist url? [20:34] isaacs: whitman: of course [20:34] adambeynon has joined the channel [20:35] isaacs: whitman: make sure it's a private gist if you want to keep it secret! [20:35] whitman: isaacs, I've set it to private, hence I wanted to PM rather than paste in here :) [20:36] akiva: Anyone here using Jake at all? I am new to using it. [20:37] TheJH has joined the channel [20:37] jbpros has joined the channel [20:38] aron_ has joined the channel [20:39] CoverSlide: there's like 3 jakes for node [20:39] onlytracks has joined the channel [20:39] CoverSlide: wait [20:39] CoverSlide: nvm [20:39] akiva: lol [20:39] akiva: There are like three jakes. Only one for node [20:39] CoverSlide: but there is a jake for node and a jake for ruby [20:40] akiva: And one for narhwale [20:40] CoverSlide: i don't know if they're compatible at all [20:40] akiva: But I am obviously referring to the Node one [20:40] akiva: They are not [20:40] CoverSlide: that sucks [20:41] AphelionZ has joined the channel [20:43] zmbmartin has joined the channel [20:44] shipit has joined the channel [20:44] kuebk^ has joined the channel [20:44] socketio\test\04 has joined the channel [20:46] Raynos: perezd: event driven architecture [20:47] perezd: Raynos: ah, new acronym, me likely [20:47] gazumps has joined the channel [20:47] perezd: likey* [20:47] aconbere has joined the channel [20:47] onethirtyfive has joined the channel [20:47] akiva: I found the problem [20:48] akiva: And as usual, it was a user error [20:48] akiva: lol [20:48] eee_c has joined the channel [20:51] jonrohan has joined the channel [20:53] smathy has joined the channel [20:53] saikat has joined the channel [20:54] martinisoft: anyone here know of some good articles/docs on making a DSL with coffeescript ?? [20:54] devongovett has joined the channel [20:54] eee_c has joined the channel [20:55] akiva: You mean a la Sinatra [20:55] akiva: ? [20:55] stagas has joined the channel [20:55] akiva: martinisoft: have a look around at Node frameworks. I recall coming across one recently built around coffeescript [20:55] aheckmann has joined the channel [20:56] martinisoft: akiva: sort of like that [20:56] Wizek has joined the channel [20:57] random123: Ya Zappa is coffee [20:57] mikedeboer has joined the channel [20:58] random123: https://github.com/mauricemach/zappa DSL on top of express, socket.io etc [20:58] zeiris has joined the channel [20:59] DarkGrey has joined the channel [20:59] mynameisbender has joined the channel [20:59] siculars has joined the channel [21:00] martinisoft: thanks guys [21:01] bnoordhuis: https://admin.fedoraproject.org/updates/F14/FEDORA-2011-12302 <- someone's been reading charlie stross! [21:01] akiva: Yeah, it was zappa [21:01] akiva: Cheers [21:02] kkszysiu has joined the channel [21:04] DrMcKay: bnoordhuis: :D [21:05] jonrohan has joined the channel [21:06] KingJamool has joined the channel [21:06] lz: haha [21:06] lz: "it fixed everything I wanted!!" [21:09] n1mmy has joined the channel [21:09] smtlaissezfaire_ has joined the channel [21:11] amasad has joined the channel [21:12] necrodearia has joined the channel [21:13] gjohnson has joined the channel [21:14] qbert65536 has joined the channel [21:15] jslatts has joined the channel [21:15] StanlySoManly1 has joined the channel [21:16] smus has joined the channel [21:16] amasad: Would appretiate some help: [21:16] amasad: I have a simple static file server in node on solaris, and all im doing is streaming files to the http response object using fs.createReadStream(file).pipe(res) [21:16] amasad: After having the server run for about two days, I get an error "(node) Hit max file limit. Increase "ulimit - n" [21:16] amasad: Btw on the "top" command the "SIZE" column is ever increasing but the RES is stable at ~20M [21:17] colinclark has joined the channel [21:18] Ned_ has joined the channel [21:19] levi: Sounds like your files are not being closed. [21:19] metellus has joined the channel [21:19] \ask has joined the channel [21:19] apoc has joined the channel [21:19] tuhoojabotti has joined the channel [21:19] trupppOFF has joined the channel [21:20] amasad: From what I understand the pipe command should close the files automatically [21:20] BrianTheCoder has joined the channel [21:20] maxogden: amasad: you can listen for 'close' events to make sure [21:20] amasad: ok [21:22] onlytracks has joined the channel [21:22] isaacs: amasad: what version of node? [21:23] amasad: v0.4.2 [21:23] nforgerit has joined the channel [21:23] isaacs: amasad: upgrade to 0.4.12 [21:23] isaacs: amasad: is this on no.de? [21:24] amasad: No, its on a paid smartmachine [21:24] isaacs: ok [21:24] amasad: Wouldn't that be downgrading? [21:24] Lingerance: Is no.de back up? [21:24] isaacs: that's a little easier then. just build and install the new node. i think you can probably do `pkgin update` and then `pkgin install node` [21:24] isaacs: no [21:24] isaacs: amasad: 12 > 2 [21:24] maxogden: what is larger, 2 or 12 [21:24] maxogden: :D [21:24] isaacs: it's a vector, not a decimal [21:24] amasad: lol ok [21:24] jesusabdullah: What's pkgin? [21:25] isaacs: pkgin is smartos's package manager [21:25] mehtryx has joined the channel [21:25] jesusabdullah: ah [21:25] amasad: I want minum downtime, the server is online at http://repl.it/ [21:25] amasad: I know that [21:25] amasad: how much downtime will that be? [21:25] spolu has joined the channel [21:26] Nuck_ has joined the channel [21:26] jesusabdullah: How long would it take to reboot the process? [21:26] tizzo-afk has joined the channel [21:26] jesusabdullah: You can make it before the install, and the install is fast and probably won't actually break your program as its running <_<; [21:26] amasad: its instant [21:26] jesusabdullah: So I *bet* you can install the new node, and then just reboot your node server and you'll be good [21:27] jesusabdullah: but don't take my word for it! [21:31] Ricki__ has joined the channel [21:31] FireFly|n900 has joined the channel [21:31] abjorn has joined the channel [21:32] StanlySoManly has joined the channel [21:33] amasad: isaacs: nodejs-0.4.2 = Evented I/O for V8 javascript [21:33] amasad: isaacs: thats the only nodejs package available [21:34] amasad: I ran update, all is up-to-date [21:37] diamonddog has joined the channel [21:39] Ned_ has joined the channel [21:40] nforgerit has joined the channel [21:41] cjroebuck has joined the channel [21:44] Ned_ has joined the channel [21:45] nuck has joined the channel [21:45] kylefox has joined the channel [21:46] Oi has joined the channel [21:46] brolin has joined the channel [21:47] onar has joined the channel [21:47] Nuck has joined the channel [21:48] r04r has joined the channel [21:49] spolu has left the channel [21:50] Ned_ has joined the channel [21:53] qbert65536 has joined the channel [21:53] mraleph has joined the channel [21:54] Nuck|mobile has joined the channel [21:54] Wa has joined the channel [21:55] Nuck|mobile has joined the channel [21:55] Ned_ has joined the channel [21:56] CIA-54: libuv: 03Ben Noordhuis 07master * r3368d6c 10/ (6 files in 2 dirs): [21:56] CIA-54: libuv: unix: stub file watcher implementation [21:56] CIA-54: libuv: The file watcher API has not been implemented on all Unices yet. [21:56] CIA-54: libuv: Provide stubs on those platforms so libuv at least compiles. - http://git.io/S1HdLA [21:56] Nuck|mobile has joined the channel [21:56] max_dev has joined the channel [21:56] amasad: isaacs: Looks like it worked!! Thanks a lot, I really appreciate it. [21:57] Nuck|mobile has joined the channel [21:57] perezd: anyone here have any recommendations for profiling nodeJS ? articles, etc. I'd love to use something visual, like Instruments on OS X [21:58] JSManiacs has left the channel [21:58] zeiris has joined the channel [21:58] neilk_ has joined the channel [21:59] hermanjunge has joined the channel [22:00] perezd: anyone here using Instruments for profiling their app? [22:00] edwardmsmith has joined the channel [22:00] robotmay has joined the channel [22:00] sonnym has joined the channel [22:00] Ned_ has joined the channel [22:01] mraleph: instruments will show you only information for C++ code [22:02] perezd: so the dtrace that comes with node is JS specific? [22:02] Lingerance: There's no dtrace with node.js [22:03] Lingerance: (At least not in the Arch packages) [22:03] qbert65536: perezd, node-inspector does a wonderful job [22:03] jslatts has joined the channel [22:03] perezd: qbert65536: is there a way to have that activate when you are running the tests? [22:03] mraleph: there probes, but I doubt it works on anything other than solaris [22:03] qbert65536: what tests [22:03] perezd: qbert65536: my tests [22:03] perezd: lol, sorry [22:04] qbert65536: that im not sure, https://github.com/dannycoates/node-inspector , says optional v8-profiler, not sure how that is setup [22:04] perezd: interesting, thanks [22:05] kenperkins: has the feeling on needing to front node with nginx changed? [22:05] bnoordhuis: Lingerance: dtrace is sunos specific [22:05] bnoordhuis: and node *has* dtrace support [22:05] Ned_ has joined the channel [22:06] qbert65536: kenperkins, we use authbind at beta.formhog.com , for http://thecodebase.com/bang/ I use apache ProxyPass, but only because everything else on that server uses apache [22:07] qbert65536: kenperkins, Im guessing no though ;) [22:07] kenperkins: ew apache :) [22:07] qbert65536: its hard to avoid [22:07] bnoordhuis: kenperkins: i worked on apache >:( [22:07] kenperkins: mentioning apache in a nodejs room seems kind of funny [22:08] CoverSlide: ACTION washes hands [22:08] aho: there is nothing wrong with apache, really [22:09] jesusabdullah: except that it's apache [22:09] jesusabdullah: >:P [22:09] CIA-54: libuv: 03Igor Zinkovsky 07master * rf9ad0a7 10/ src/win/fs-event.c : windows: fire UV_CHANGE in case of overflow - http://git.io/aFLEeA [22:09] halcyon918: jebus, I wasn't expecting my IRC client to play a sound with that devil smiley... [22:09] junkee[] has left the channel [22:10] lz: anyone know how to set an update handler on couchdb? [22:10] qbert65536: halcyon918, what irc client ? [22:10] qbert65536: I want sounds! [22:10] sub_pop has joined the channel [22:11] CoverSlide: haha [22:11] halcyon918: qbert65536: Trillian [22:11] Ned_ has joined the channel [22:11] ap3mantus has joined the channel [22:11] halcyon918: I just had my headphones on, no music though (I don't know why) and then BAM devil smiley [22:12] davidbanham has joined the channel [22:12] qbert65536: halcyon918, hehe, I have those moments where I've been wearing headphones for like an hour and I forget there is no music playing [22:12] Lingerance: >:P more noises! [22:12] robertfw has joined the channel [22:12] erichynds has joined the channel [22:13] halcyon918: qbert65536: happens more than I'd like to admit... [22:13] AvianFlu: 4Colors are cooler. [22:13] kenperkins: man I can't figure out how to do ssl termination [22:13] kenperkins: we're thinking of https by default, but don't know if we want node to do the termination [22:13] kenperkins: what do you guys do [22:13] bnoordhuis: kenperkins: do you have specialized hardware like an f5 load balancer? [22:13] kenperkins: not yet [22:13] kenperkins: we're all cloud [22:14] bnoordhuis: oh, i've heard of the cloud [22:14] bnoordhuis: it's like a lot of computers altogether right? [22:14] Wizek has joined the channel [22:14] kenperkins: rackspace specifically, but jsut standard vms [22:14] kenperkins: could move to amazon, or othjers [22:14] kenperkins: nodejitsu wants us hosted there ;) [22:14] bnoordhuis: doesn't rackspace offer ssl termination? it thought they did [22:14] bnoordhuis: *i [22:14] qbert65536: ACTION looks up ssl termmination [22:15] kenperkins: bnoordhuis: sadly not yet on their load balancers [22:15] halcyon918: I <3 my F5s [22:15] kenperkins: you have BigIPs? [22:15] CoverSlide: 4blah [22:15] kenperkins: what would a redundant f5 setup cost me for ssl termination and load balancing [22:15] kenperkins: ACTION has no idea [22:15] qbert65536: F5 ? Never heard of it [22:15] halcyon918: if you have to ask... too much [22:16] bnoordhuis: kenperkins: eur 4000 x 2 i think? [22:16] CoverSlide: 4,8blah [22:16] kenperkins: be honest, I'm in a well funded startup [22:16] bnoordhuis: the catch with f5 is that they charge you an arm and a leg for extra modules [22:16] Ned_ has joined the channel [22:16] kenperkins: like the ssl mod [22:16] bnoordhuis: my previous-previous employer had that, don't know if they were charged extra for it [22:17] [Alecs] has joined the channel [22:17] halcyon918: http://www.f5.com/products/hardware/big-ip.html [22:17] CoverSlide: clipboard runs on node? [22:17] kenperkins: Cover: you bet it does [22:17] CoverSlide: sweet [22:17] kenperkins: you have an account? [22:18] shipit has joined the channel [22:18] CoverSlide: no, i dont [22:19] CoverSlide: don't even know what it is [22:19] devongovett has joined the channel [22:21] kenperkins: :( [22:21] kenperkins: it lets you clip the web :) [22:21] kenperkins: pm ur email if you'd like me to send an invite [22:21] Ned_ has joined the channel [22:22] joshkehn has joined the channel [22:22] kenperkins: halcyon918: do you have an idea of what something would cost me? [22:23] bnoordhuis: kenperkins: node can handle ssl (albeit a lot slower than plain http) [22:23] bnoordhuis: or you can have haproxy do the ssl termination for you [22:23] bnoordhuis: if money is an issue, that is [22:23] kenperkins: yea I know, we do https termination with node on some admin machines, but I don't know how it scales [22:23] kenperkins: I thought HAProxy doesn't do SSL termination [22:24] chrislorenz has joined the channel [22:24] onlytracks has joined the channel [22:24] halcyon918: kenperkins They have a whole host of hardware options, and they vary depending upon quantity and stuff... I'm at a big company, so I'm sure we get the big ones and heavily discounted, so I probably couldn't give you a number that would be accurate for you [22:24] halcyon918: I can ping some people, though, if you're interested... [22:24] kenperkins: gotcha [22:25] kenperkins: ok, so haproxy can route ssl, but not terminate it [22:26] halcyon918: apache can do SSL offloading [22:26] halcyon918: erm, I'm pretty sure it can [22:26] bnoordhuis: kenperkins: right you are [22:27] halcyon918: I've had HTTPS to apache and then the HTTP request proxied to Tomcat [22:27] bnoordhuis: halcyon918: apache does [22:27] kenperkins: I want to figure out what's the best way to handle the overhead of ssl termination: opinions vary: some people say just let your application cluster handle it because it's easy to scale out an app cluster. Some people say front your apps with nginx/apache or an application that specializes in ssl termination [22:27] bnoordhuis: i can dream the mod_ssl source code... [22:27] kenperkins: others say use dedicated hardware like bigIP etc [22:27] bnoordhuis: oh, the choice is easy if you have dedicated hardware [22:28] kenperkins: I don't yet [22:28] kenperkins: but I Could if I needed to [22:28] bnoordhuis: if you don't, just terminate on the front-end server [22:28] bnoordhuis: if the load becomes too high (unlikely!) turn it into a reverse proxy [22:28] halcyon918: if you have dedicated hardware, that's often the most efficient... [22:28] halcyon918: it also reduces the complexity of your application deployments to offload it [22:28] bnoordhuis: ssl overhead was a big deal ten years ago [22:28] _kud has joined the channel [22:28] bnoordhuis: now? not so much [22:29] igl1 has joined the channel [22:29] mehlah has joined the channel [22:29] halcyon918: well, I see it more of a complexity thing... not whether it's computationally expensive [22:29] bnoordhuis: hmm, it's not that hard to set up is it? [22:30] bnoordhuis: you can automate it with a 20 line puppet script [22:30] halcyon918: HAH... hard, no, but you don't know the kinda people I work with [22:30] bnoordhuis: that's true, i don't [22:31] bnoordhuis: tell me [22:31] halcyon918: it also depends on your operations environment... I don't control the deployment of my application to QA, Preview and Prod... having to also account for SSL in the app config and deployment is another spot Operations can get it wrong [22:31] rmzg has joined the channel [22:31] kylefox has joined the channel [22:33] CrisO has joined the channel [22:33] halcyon918: I have a hard enough time getting my developers to make web applications properly let alone having them also worry about SSL... half the team are client-side developers and when I say "Just update your apache config" their eyes cross and drool drips from the corners of their mouths [22:33] kenperkins: puppet solves all that for me [22:33] joshkehn has left the channel [22:33] kenperkins: I don't even worry about setting up ssl on my front end [22:34] kenperkins: I'm just debating scaling out my front end (nginx) using something else for termination (pound), buying hardware (bigIp) or just simplifying my stack and letting node do both ssl termination, page composition, and apis [22:34] normanrichards has joined the channel [22:34] r04r has joined the channel [22:34] ceej has joined the channel [22:35] Guest84057: ⚽ [22:35] bnoordhuis: kenperkins: node speaks ssl pretty well [22:35] bnoordhuis: but there are still some rough edges [22:36] kenperkins: do you know of these rough edges first hand? or an article? [22:36] halcyon918: I dunno... I'll take segmenting my architecture to isolate areas of competency over stacking everything together [22:36] bnoordhuis: first hand, i work on node :) [22:36] kenperkins: ah, you're a contributor? [22:37] bnoordhuis: most issues arise under heavy load + error conditions [22:37] bnoordhuis: yes [22:37] kenperkins: cool [22:37] bnoordhuis: or committer, rather [22:37] cjm has joined the channel [22:37] kenperkins: whatever [22:37] kenperkins: what kind of issues? [22:37] nibblebo_ has joined the channel [22:37] CoverSlide: especially since node compiles ssl now [22:37] CoverSlide: *openssl [22:37] kenperkins: what do you mean that that? [22:38] bnoordhuis: kenperkins: stuff like this: https://github.com/joyent/node/issues/1719 [22:38] kenperkins: is that in 5+? [22:38] bnoordhuis: yes [22:38] bnoordhuis: we bundle openssl now as a fallback [22:38] bnoordhuis: and because most distros still ship openssl releases from 2005 >:( [22:39] CoverSlide: i dunno about `most` [22:39] Cromulent has joined the channel [22:40] jmayfield has joined the channel [22:40] CoverSlide: debian and any `enterprise` distro, sure [22:41] jmayfield has left the channel [22:41] kenperkins: where are we at on the 0.5 == stable progress [22:41] kenperkins: tbh I've been heads down on feature code [22:41] bnoordhuis: 0.5 is not stable yet, maybe in a month or two [22:42] kenperkins: rgr [22:44] CoverSlide: back when 0.5.0 was released, didn't ryah say 0.6.0 would be out in `a few weeks` [22:44] bnoordhuis: 'a few weeks' is a relative concept [22:45] tjholowaychuk: im glad it's taking longer [22:45] tjholowaychuk: cant keep up [22:45] CoverSlide: like `i only drank a few beers`? [22:45] MrNibbles has joined the channel [22:46] kenperkins: a few weeks is t-shirt size for XL [22:46] kenperkins: which is like a few weeks or 2 years [22:46] kenperkins: but a lot more than 1 week [22:49] robertfw has joined the channel [22:52] robotmay_ has joined the channel [22:55] nibblebot has joined the channel [22:55] Lingerance: Are there any real promises libraries (IE ones that don't use callbacks to "return" the value)? [22:56] cjm has joined the channel [22:56] [[zzz]] has joined the channel [22:56] Lingerance: ... or rather Futures. [22:59] kenperkins: promises as in nonces? [23:00] MooGoo: node-lies [23:00] CoverSlide: there are shitloads of promise libraries [23:00] Lingerance: Most use callbacks though [23:01] softdrink: node-fibs [23:01] Lingerance: I'd like something like: future = asyncSomething(...); console.log(future.value + 3) // blocks until the async is done and gives a value. [23:01] CoverSlide: unfortunately that's not how javascript works [23:01] kenperkins: wait [23:02] AAA_awright: And it's just a bad idea [23:02] kenperkins: are you asking for a syncronous callback promise library? :) [23:03] cole_gillespie has joined the channel [23:03] Lingerance: Pretty much. [23:03] Lemon|mbp has joined the channel [23:05] jldbasa has joined the channel [23:07] Ned_: does node.js have some sort of destructor concept ? [23:07] maxogden: Lingerance: there are people trying to hack 'real' futures into JS but the correct answer is to use the streams API in node from what i can tell [23:08] CoverSlide: You mean does JavaScript have a destructor concept? [23:08] CoverSlide: no [23:08] fairwinds has joined the channel [23:08] Lingerance: Anything good for dealing with wrapping up a bunch of async stuff that needs to be brought together then? [23:08] Ned_: CoverSlide: right, sucks to be me :p [23:09] Ned_: CoverSlide: trying to find a nice way to deal with child processes on exit [23:09] Skyec: Lingerance: isn't that just a normal closure? [23:09] Lingerance: IE: I have 4 events that are completely seperate from each other, but I have a fith that depends on the values given to the other 4. [23:10] Skyec: i'm unsure what you mean by asychronous call but blocks [23:10] Lingerance: I could chain them, but that's fairly slow as each is a database lookup. [23:10] n1mmy has joined the channel [23:10] Skyec: it sounds like you want threading [23:11] Lingerance: I don't think you understand the issue (I'm not talking about futures right now) [23:11] maxogden: Lingerance: github/caolan/async has some sugar like that [23:11] MooGoo: sounds like he wants coroutines [23:11] Skyec: yeah , I was just about to say that too maxogden [23:11] Skyec: https://github.com/caolan/async [23:11] MooGoo: or continuations [23:12] brolin_ has joined the channel [23:13] markdaws has joined the channel [23:13] cjm has joined the channel [23:14] g4 has joined the channel [23:14] Lingerance: Yeah, async.parallel looks like it. [23:14] pgherveou has joined the channel [23:15] pgherveou has joined the channel [23:17] brolin has joined the channel [23:18] metellus has joined the channel [23:19] g4 has joined the channel [23:20] isaacs has joined the channel [23:21] zeade has joined the channel [23:22] dylang has joined the channel [23:23] dylang_ has joined the channel [23:23] rfay has joined the channel [23:23] zemanel has joined the channel [23:23] ChrisPartridge has joined the channel [23:24] cjm has joined the channel [23:31] matyr has joined the channel [23:33] MrNibbles has joined the channel [23:33] wadey has joined the channel [23:34] murilobr has joined the channel [23:35] g4 has joined the channel [23:35] dominictarr has joined the channel [23:36] cjheath_ has joined the channel [23:37] nibblebot has joined the channel [23:39] smus has joined the channel [23:39] jonrohan has joined the channel [23:41] normanrichards has joined the channel [23:43] zivester has joined the channel [23:45] nforgerit has joined the channel [23:46] amscotti has joined the channel [23:46] Frippe has joined the channel [23:46] dgathright has joined the channel [23:47] rchavik has joined the channel [23:49] max_dev has joined the channel [23:49] g4 has joined the channel [23:49] softdrink has joined the channel [23:52] r04r has joined the channel [23:52] saikat has joined the channel [23:54] rchavik has joined the channel [23:54] robotmay has joined the channel [23:55] wadey has joined the channel [23:55] brianseeders has joined the channel [23:59] test has joined the channel [23:59] test: test [23:59] test: test [23:59] rchavik_ has joined the channel [23:59] mrryanjohnston: test!