[00:00] Tobsn: you should do a "WARN No old version installed in ..." [00:00] breccan has joined the channel [00:00] Tobsn: or no other version or something [00:00] Tobsn: because if you read it while installing it sounds like it didnt installed it [00:00] isaacs: from npm's pov they're two separate commands [00:00] isaacs: but yeah, i should suppress that so it doesn't warn [00:00] Tobsn: yep [00:00] Tobsn: one fix a day [00:00] Tobsn: :P [00:01] isaacs: only one? bah. [00:01] isaacs: ;) [00:01] Tobsn: you know that same thing happened with me and php around 9 years ago. first it was humane, than i found so many bugs that they just gave me full cvs access on php.net - still have the tobsn@php.net [00:01] eddorre: I installed node.js using the instructions on Github (clone repo, make, make install). Node version is 0.5.0-pre. I thought version 0.4x was stable. Is this not what I want? [00:02] Tobsn: isaacs, wait until i start using the shit out of it [00:02] Tobsn: which starts right now [00:02] errorhandler has joined the channel [00:02] xandrews has joined the channel [00:03] devrim: guys how do i use $1 $2 inside ./node x.js $1 $2 ? [00:03] dguttman_ has joined the channel [00:03] ckknight: process.argv [00:04] devrim: thx! [00:04] saikat has joined the channel [00:04] boccato has joined the channel [00:06] varioust has joined the channel [00:07] Hbomb has joined the channel [00:07] marklubi has joined the channel [00:08] sivy has joined the channel [00:08] marklubi: is there anyone here that can help me with some character encoding questions? [00:10] Hbomb: Hi [00:10] Hbomb: anybody there? [00:10] aho: use utf-8. always. for everything. [00:11] aho: problem solved :> [00:11] marklubi: lol. I wish [00:11] jakehow has joined the channel [00:11] ckknight: sometimes it makes sense to use UCS-2, like for in-memory string manipulation. Granted, Javascript already does this for you. [00:12] marklubi: we have a piece of client software that accepts Latin1 (IS0-8859-1) but crashes on certain UTF-8 characters [00:12] hvgotcodes: how do i configure simple things like server url across environments? [00:12] devrim: ckknight this is a bash related question but do u also know how to get all arguments ./x.bash $1 $2 $3 at once ? [00:13] eee_c has joined the channel [00:14] postwait has joined the channel [00:14] pyrotechnick1 has joined the channel [00:14] ckknight: devrim: prrocess.argv is an array [00:14] devrim: no i know, this is for my build file [00:15] devrim: ./run $1 $2 $3 [00:15] devrim: should be passed to the line node $1 $2 $3 [00:15] devrim: i was wondering if i could just do node $* [00:15] devrim: so everything that's passed from bash file is passed to node [00:16] ckknight: oh [00:16] ckknight: yeah, I'm pretty sure $* would work [00:16] ckknight: try it out! [00:16] devrim: i totally made it up :) [00:16] devrim: u sure? ) [00:16] ckknight: yeah, I'm pretty sure [00:16] ckknight: I remember using $* [00:17] ckknight: and $#, but I think that's for the count [00:17] devrim: it totally did work :) http://d.pr/eYTf [00:17] devrim: haha [00:17] devrim: i have developed linux intuition over the year i guess ) [00:17] devrim: *s [00:18] themiddleman_itv has joined the channel [00:18] honey_badger has joined the channel [00:19] __sorin__ has joined the channel [00:22] dcampano has joined the channel [00:24] nvardar has joined the channel [00:25] arpegius has joined the channel [00:26] sako has joined the channel [00:27] mscdex: marklubi: have you looked at using node-iconv? [00:27] shiawuen has joined the channel [00:27] mnutt has joined the channel [00:27] devrim: how to kill node from within ? ( php equivalent die() ?) [00:27] tjholowaychuk: devrim process.exit() ? [00:27] tjholowaychuk: i dont remember what die() does [00:27] devrim: right [00:27] hvgotcodes: how do i configure simple things like server url across environments? [00:28] devrim: tj awesome job with cluster - we're going to be using it! [00:28] hvgotcodes: so in dev server might be localhost, but in prod it will be myapp.com [00:28] marklubi: mscdex: not familiar with it, I will take a look. thanks [00:28] tjholowaychuk: devrim: thanks man [00:28] mscdex: marklubi: i've used it before when needing to work with latin1: https://github.com/bnoordhuis/node-iconv [00:29] marklubi: mscdex: do you know off hand if I would be able to write latin1 to a socket stream with it? [00:29] honey_badger: anyone using tor within nodejs or any other like socks proxies in tor [00:30] honey_badger: ** in node [00:30] mscdex: marklubi: you can write any raw data to a socket with a Buffer object [00:30] mikeal has joined the channel [00:30] marklubi: mscdex: cool, thanks [00:31] mscdex: node-iconv accepts strings or buffers and outputs buffers [00:34] jano has joined the channel [00:40] edude03 has joined the channel [00:41] azeroth_ has joined the channel [00:45] ditesh|cassini has joined the channel [00:46] newy: hvgotcodes: set environment variables! [00:47] hvgotcodes: newy: how to read them? [00:49] ckknight: hvgotcodes: process.env [00:50] unomi has joined the channel [00:50] dguttman has joined the channel [00:50] dguttman has joined the channel [00:51] chrislorenz has joined the channel [00:51] demastrie has joined the channel [00:51] newy: hvgotcodes: if (process.env.PRODUCTION) { HOST= [00:51] newy: "this"; } [00:52] demastrie has left the channel [00:52] newy: and set PRODUCTION=1 as an environmental, or obviously your if statements could work off different values of the same vars. [00:52] hvgotcodes: newy: ah thanx [00:52] stbuehler has joined the channel [00:52] Corren has joined the channel [00:53] deepthawtz has joined the channel [00:54] stbuehler: hi! just wanted to say that crypto.Hmac doesn't work with binary keys (from Buffer of course) - probably a utf-8 conversion or whatever... (binary data works) [00:55] ChrisPartridge has joined the channel [00:55] ckknight: hvgotcodes: it's recommended to use NODE_ENV=production, so check process.env.NODE_ENV === "production" [00:56] dguttman_ has joined the channel [00:58] hvgotcodes: ckknight: night [00:58] hvgotcodes: i mean thanx ;) [00:58] ckknight: alright then [00:58] ckknight: *thumbs up* [00:58] Billbad has joined the channel [00:59] hvgotcodes: ckknight: is there a way to catch a generic error, to prevent node from exiting? [00:59] c4milo1 has joined the channel [00:59] c4milo1 has left the channel [01:00] c4milo1 has joined the channel [01:00] ckknight: hvgotcodes: process.on('uncaughtException', function (err) { console.error(err); }) [01:00] hvgotcodes: ckknight: thats for a js exception in the server code? [01:01] ckknight: correct [01:01] hvgotcodes: very nice [01:01] hvgotcodes: so i can just write that anywhere? [01:01] ckknight: yeah, but I'd do it in your app.js [01:01] hvgotcodes: damn asynchronous stuff is scrambling my brains [01:02] ckknight: so say you have (function() { doSomething(); throw new Error(); doSomethingElse(); }()); doSomething() will run, your handler will run, and doSomethingElse() will not run, since the error bubbled up to the top by that point. [01:02] hvgotcodes: right [01:02] hvgotcodes: like exceptions work in any language i guess [01:02] ckknight: yep [01:02] ckknight: you just catch it before it bubbles up to the VM [01:03] hvgotcodes: right [01:03] hvgotcodes: ckknight: where is that documentation for the process stuff? [01:03] ckknight: http://nodejs.org/docs/v0.4.6/api/process.html [01:04] hvgotcodes: does your uncaughtException example prevent node from exiting? [01:04] malkomalko has joined the channel [01:04] hvgotcodes: never mind, says in docs that the process does not exit [01:05] ckknight: yep, but you can do process.exit() in your uncaughtException if you want [01:06] pyrotechnick1 has left the channel [01:06] pyrotechnick has joined the channel [01:06] ngs has joined the channel [01:07] Viper-7 has joined the channel [01:08] tmpvar has joined the channel [01:08] hvgotcodes: ckknight: thats useful, i need to send a webserver request when my node shuts down [01:08] hvgotcodes: although if the process is just killed, how would i detect? [01:08] ckknight: use the 'kill' event [01:09] mattrobenolt has left the channel [01:09] hvgotcodes: ckknight: fancy [01:09] hvgotcodes: i like it [01:09] tjholowaychuk: you cant ignore kill [01:10] hvgotcodes: what does See sigaction(2) for a list of standard POSIX signal names mean [01:10] Tobsn: hmm node.js ./configure gives me a Checking for openssl : not found [01:10] ckknight: yeah, I don't know of a good way to send a web request at that time, since that's async. [01:10] Tobsn: anyone know why thats showing up if openssl and libssl is installed? [01:10] ckknight: well, you could theoretically do that in-sync [01:11] hvgotcodes: tjholowaychuk: is there any way to detect any time the process exits, regardles of why it is exiting? [01:11] tjholowaychuk: hvgotcodes: from the process itself or a parent process? [01:11] tjholowaychuk: or another process? [01:11] hvgotcodes: from within node [01:11] tjholowaychuk: within the process itself no [01:11] hvgotcodes: i want to detect whenever the node server dies or exits [01:11] themiddleman_itv has joined the channel [01:11] stepheneb has joined the channel [01:12] hvgotcodes: and send a webservice request notifying of the shutdown [01:12] tjholowaychuk: to a certain degree you can but not certain signals etc [01:12] hvgotcodes: tjholowaychuk: yeah, i mean there is no way to send that if the power goes off, right? [01:12] tjholowaychuk: nope [01:12] pyrotechnick: Tobsn: you on OSX? [01:13] pyrotechnick: for it to be fully reliable hvgotcodes you'd have to remotely monitor the machine [01:14] tjholowaychuk: hvgotcodes: ^ what he said [01:14] JusticeFries has joined the channel [01:14] tjholowaychuk: hvgotcodes: things like cluster will help with failures [01:14] tjholowaychuk: but not the machine itself [01:15] ardcore has joined the channel [01:15] ardcore has left the channel [01:15] pyrotechnick: Tobsn: what platform are you on mate? [01:15] Tobsn: oh [01:15] pyrony has joined the channel [01:15] Tobsn: sorry missed the first one [01:15] Tobsn: debian [01:15] pyrotechnick: i think its [01:15] Tobsn: squeeze [01:15] pyrotechnick: sudo apt-get install libssl-dev [01:15] pyrotechnick: ill check [01:15] Tobsn: its already installed [01:15] Tobsn: openssl, libssl-dev [01:15] pyrotechnick: check pkg-config [01:15] Tobsn: thats why its so weird [01:16] pyrotechnick: ive seen that before [01:16] broofa has joined the channel [01:16] pyrotechnick: it was because my pkg-config was screwed [01:16] pyrotechnick: permissions were stuffed up [01:16] Tobsn: hmm [01:16] pyrotechnick: ill find the command [01:16] marklubi has left the channel [01:16] Tobsn: the server is fresh, basically everything is installed over root [01:16] JusticeFries_ has joined the channel [01:17] tshpaper has joined the channel [01:18] pyrotechnick: pkg-config --print-variables openssl [01:18] pyrotechnick: pkg-config --exists openssl [01:19] pyrotechnick: pkg-config --libs openssl [01:19] pyrotechnick: what'd you get for those? [01:20] abraxas has joined the channel [01:21] brianloveswords has joined the channel [01:21] Tobsn: pyro http://pastebin.com/3ckqCAwQ [01:25] Tobsn: lol [01:25] Tobsn: pyrotechnick, apt-get install pkg-config [01:25] Tobsn: fixed it. [01:26] pyrotechnick: yeah that must be a relatively old debian [01:26] pyrotechnick: or non-standard install [01:26] Tobsn: squeeze [01:26] pyrotechnick: i've seen it before that's why i suggested it as the first port of call [01:26] pyrotechnick: what is squeeze? [01:26] pyrotechnick: is that like hugs [01:26] Tobsn: debian 6 [01:26] Tobsn: released 2 month ago [01:26] pyrotechnick: oh damn [01:26] pyrotechnick: thought i was getting some kind of internet loving [01:26] Tobsn: ;) [01:26] pyrotechnick: anyway enjoy ssl [01:26] Tobsn: well it comes here without any tools [01:26] Tobsn: i had to install build essentials etc. to compile anything [01:26] abraham has joined the channel [01:26] pyrotechnick: if you're doing anything crazy we have some extensions to crypto [01:27] Tobsn: i guess its just obvious that pkg tools where missing [01:27] Tobsn: extensions to crypto? [01:27] pyrotechnick: ecdsa and that kind of thing [01:27] pyrotechnick: random number from openssl [01:27] Tobsn: oooh [01:27] pyrotechnick: etc etc [01:27] Tobsn: thats what you mean [01:27] Tobsn: nah, i just wanted to get the "not found" to disapear [01:27] Tobsn: :P [01:28] pyrotechnick: ryah: if we get ecdsa support up to scratch would it make it into node? [01:28] pyrotechnick: Tobsn: lol really? [01:28] Tobsn: yep :P [01:28] pyrotechnick: perfectionist? [01:28] pyrotechnick: i like it [01:28] Tobsn: cause i never saw that before [01:28] JusticeFries__ has joined the channel [01:28] pyrotechnick: you probly want it anyway man [01:28] Tobsn: if i would be perfectionist i would try to get the other "not found" gone too [01:28] pyrotechnick: a few popular libs rely on it [01:29] Tobsn: Checking for header port.h : not found [01:29] Tobsn: Checking for header sys/event.h : not found [01:29] Tobsn: Checking for function kqueue : not found [01:29] pyrotechnick: not all of them are nessecary [01:29] Tobsn: i guess that would be just libevent etc. [01:29] pyrotechnick: like that last one for instance [01:29] pyrotechnick: some of those are fallbacks i think [01:29] Tobsn: yeah kqueue is probably not really used at all [01:29] Tobsn: well its not stopping from configuring or compiling [01:29] pyrotechnick: not on debian i dont think [01:30] piscisaureus: I think kqueue is used but not port [01:30] pyrotechnick: thats for BSD i think [01:30] amerine has joined the channel [01:30] Tobsn: but i never had that working [01:30] pyrotechnick: and maybe mac... [01:30] Tobsn: (i really never cared cause configure and make finished fine) [01:30] pyrotechnick: nah i think mac has the shit one [01:30] JusticeFries has joined the channel [01:31] Tobsn: hey whats the auth key file again? [01:31] Tobsn: authorized_keys? [01:31] pyrotechnick: yep [01:31] Tobsn: thx [01:31] pyrotechnick: without the question mark [01:32] Tobsn: damn [01:32] Tobsn: okay, database server template almost done [01:32] Tobsn: now tomorrow i need to figure out how to turn off eth0 on those things [01:32] pyrotechnick: wats that? [01:32] Tobsn: anyway, thanks for the help [01:32] pyrotechnick: no worries bro, good luck with it all [01:32] Tobsn: pyro, for rackspace [01:33] Tobsn: its like the 50th time im doing this... but every time i compile mongodb/node/etc. it has other issues [01:33] Tobsn: shits changing too fast [01:33] harth has joined the channel [01:33] Tobsn: look at isaacs, hes releasing a stable NPM version twice a day ;) [01:33] Tobsn: brb [01:34] tjholowaychuk: isaacs: tty.getWindowSize(), any objections to tty.window.width etc? I guess it doesn't really fit with the rest [01:35] msilverman2 has joined the channel [01:38] tjholowaychuk: isaacs: or at least returning an object like tty.windowSize().width etc [01:38] kawaz_air has joined the channel [01:40] mike5w3c has joined the channel [01:40] johnciacia has joined the channel [01:40] azeroth_ has joined the channel [01:42] piscisaureus: tjholowaychuk: +1 for returning an object. The current api is inconsistent anyway, the [x, y] order is not the same getWindowSize and moveCursor and cursorTo [01:43] tjholowaychuk: ah yeah haha i was confused when it was y/x not x/y [01:44] EM03 has joined the channel [01:44] EM03: hey ......how long would it take for a python/ruby dev to learn nodejs ? [01:47] sivy has joined the channel [01:49] kawaz_ai_ has joined the channel [01:49] boogyman has joined the channel [01:49] ckknight: EM03: not too long if you're willing to grasp the async concepts. [01:50] EM03: i reallt want to jump right in and start working with express web framework etc [01:51] tjholowaychuk: EM03: if you are from ruby land express is kinda similar to sinatra [01:51] tjholowaychuk: though it has evolved alot but that was what it was originally based on [01:51] tjholowaychuk: tty module ftw http://cl.ly/69Z5 [01:52] EM03: I noticed that [01:52] EM03: looks sorta like sinatra [01:52] langworthy has joined the channel [01:52] zivester has joined the channel [01:52] EM03: https://github.com/Rixius/protoype.node.js << what do you guys think of this? [01:52] zentoooo has joined the channel [01:53] EM03: This excites me as I love prototypejs in the browser [01:53] EM03: does node js have good stuff to deal with mysql and dates? [01:53] steveklabnik: express looks neat [01:54] drudge: express is awesome [01:54] EM03: I sitl like ruby but it looks like me and JS could work very well [01:54] mscdex: EM03: node-mysql and your favorite browser-based date lib? [01:54] steveklabnik: EM03: i'm particuarly interested in combining the two, actually [01:54] Xano has joined the channel [01:54] mscdex: date.js or whatever you want [01:54] steveklabnik: i think there's some neat stuff there. [01:54] EM03: combining what? [01:54] steveklabnik: sinatra apps and node apps [01:54] steveklabnik: that work together [01:55] steveklabnik: basically. [01:55] EM03: i mean with that prototype js thing for node .....js is very much like ruby for me [01:56] tjholowaychuk: if you try and make js like ruby i think you will miss the beauty of it [01:56] tjholowaychuk: i would start off simple, dont use classical inheritance libraries etc [01:57] chrislorenz has joined the channel [01:58] EM03: i mean just use some of prototype in node js [01:58] EM03: like 'adsfsdf'length [01:58] EM03: or the .each which I think is pretty cool [01:58] tjholowaychuk: yeah js Array#forEach is.. lame [01:58] tjholowaychuk: not sure why they named it that [01:59] mscdex: because it iterates over the array? [01:59] mscdex: :P [01:59] EM03: .each is different [01:59] tjholowaychuk: haha yeah its just gross looking [01:59] tjholowaychuk: might as well been forEachValueInThisArray [02:00] EM03: what is? [02:00] EM03: in ruby .each is beautiful ......I can't believe it would be bad in js [02:00] tjholowaychuk: ruby is kinda meh [02:00] tjholowaychuk: dododododo endendendend [02:00] EM03: blocks are good and its nice to have methods [02:00] EM03: on data types [02:01] steveklabnik: i always miss blocks when I code in other languages now. [02:01] mscdex: ACTION shakes a fist at ruby [02:01] tjholowaychuk: ruby is a hack [02:01] tjholowaychuk: one giant hack [02:01] EM03: your probably right .....but blocks are good [02:01] mscdex: non-blocking ftw [02:01] mscdex: :-D [02:01] dmcquay has joined the channel [02:02] steveklabnik: mscdex: there are a few non-blocking ruby libraries. [02:02] steveklabnik: ;) [02:02] EM03: so if prototypejs works for node like that guy did ....then we really might have something here [02:02] dmobile has joined the channel [02:02] mikeal has joined the channel [02:02] EM03: but doing some business logic in js scares me but maybe thats just me [02:02] pcardune has joined the channel [02:02] mscdex: it's just you! [02:02] mscdex: :) [02:02] dmobile: is there a way to measure server memory usage in a node app? [02:02] mscdex: dmobile: process.memoryUsage() [02:03] dmobile: perfect thanks [02:03] mscdex: that's the process's memory usage [02:03] EM03: well we really might have something here [02:03] EM03: 10 years of ruby and python dev all down the drain [02:03] steveklabnik: naw [02:04] mscdex: system memory usage is under require('os').freemem() and require('os').totalmem() [02:04] steveklabnik: languages expand your brain. [02:04] mscdex: subtract the two :P [02:04] dansays has joined the channel [02:05] EM03: one thing i like about python is that it is sorta explicit so for the most part you know where stuff is coming from [02:05] varioust has joined the channel [02:05] EM03: now ruby has some cool things like blocks etc but some stuff you use in ruby you just dont know how it works and its harder to figure out [02:05] tjholowaychuk: EM03: yeah thats the reason i dislike ruby, shit coming from all over [02:05] tjholowaychuk: commonjs modules are really explicit [02:05] EM03: yea man [02:05] tjholowaychuk: and you can rename shit as you like [02:05] dmobile: mscdex: got it, thanks [02:05] DTrejo has joined the channel [02:06] EM03: with ruby you just got stuff from everywhere [02:06] tjholowaychuk: var Bar = require('progress-bar') even if it's ProgressBar internally etc [02:06] steveklabnik: it's a cultural thing. i prefer to not have the mental overhead of explicitness. [02:06] kawaz_air has joined the channel [02:06] EM03: explicitness can go oveboard as well buuut with ruby it can be a bit much [02:06] jesusabdullah: Something I've seen from python that I didn't like was importing something entirely for the side effects [02:06] jesusabdullah: like, you don't actually *get* anything to use [02:07] jesusabdullah: the import just runs the program [02:07] EM03: quck example .....mako cheetah etc all the python template engines are explicit where I can use them with whatever .....with ruby erubis etc etc ......you have to create glue code [02:07] jesusabdullah: Very strange, weaksauce pattern. [02:07] EM03: ruby does it more than python [02:07] EM03: man I love prototypeJS [02:09] DTrejo: JimBastard: I AM SENDING YOU AN INVITATION [02:09] robmason has joined the channel [02:09] EM03: mootools is good to [02:09] DTrejo: you may enjoy [02:09] jesusabdullah: One thing I kinda miss from, say, python, is being able to "import *" [02:10] jesusabdullah: usually it's frowned upon, but sometimes it's really nice [02:10] EM03: import * is considered bad [02:10] jesusabdullah: Trust me, I know that [02:10] EM03: heheh [02:10] jesusabdullah: but, for example, it's nice to "from numpy import *" if you want to do something pylab-esque [02:11] jesusabdullah: (try ipython --pylab sometime) [02:11] EM03: well I could have some fun here with node js and prototype js ....might have a universal language for complete development [02:11] jesusabdullah: It's easy enough to just do the equivalent to, "from numpy import array, linspace, wtfever..." with require, though. [02:11] EM03: does node.js do any sort of OO ? or does not enforce anything like that? [02:11] arpegius has joined the channel [02:12] ckknight: EM03: it's not node.js' place to enforce that. [02:12] constantx has joined the channel [02:12] jesusabdullah: Indeed [02:12] EM03: ah cool cool [02:12] jesusabdullah: node.js is just a runtime with some nice libs, basically [02:12] ckknight: EM03: all that it cares about it if you call response.end() :P [02:12] EM03: so I can use prototypes assuming that guys node.js port works right? [02:12] tbranyen: oh man i have a feeling that i'm gonna get node.js running on a ps3 tonight [02:12] tjholowaychuk: tbranyen: hah sweet! [02:12] tjholowaychuk: doing what? [02:12] EM03: any orm in node? probably getting pushy [02:12] tbranyen: tjholowaychuk: i'd like to get cluster working on it xD [02:12] ckknight: EM03: many people use OO, depending on their various definitions of OO [02:12] DTrejo: tbranyen: nicee. [02:13] tbranyen: just because [02:13] tjholowaychuk: tbranyen: sweet man, let me know how it goes [02:13] ckknight: EM03: I use Mongoose which interacts with MongoDB. [02:13] DTrejo: tbranyen: so you can compute while you game? [02:13] tbranyen: DTrejo: lol i haven't played a game on this thing in months [02:13] EM03: ckknight: I would prefer to use mysql [02:13] DTrejo: :) [02:13] tbranyen: partially why i don't mind if i brick it [02:13] ovnicraft has joined the channel [02:13] ckknight: EM03: I'd reevaluate and either use a real SQL engine like postgres or go the other way and use a NoSQL engine [02:13] ckknight: EM03: that's me, though. There are mysql clients for node.js. [02:14] EM03: don't like mysql? [02:14] dshaw_ has joined the channel [02:14] ckknight: no, not after dealing with it. [02:14] EM03: seems a bit to close to hacky PHP I know [02:14] EM03: but [02:14] EM03: mysql 5.5 is the fastest relational database on this planet right now [02:14] EM03: the improvements made in 5.5 are crazy [02:15] ckknight: fastest using MyISAM, right? [02:15] EM03: no [02:15] EM03: InnoDB [02:15] EM03: they completely optimized the whole thing in 5.4 and 5.5 heavily [02:15] ckknight: hmm, I stopped at 5.1 [02:15] ckknight: so I can't say at this point. [02:16] EM03: 5.4 and 5.5 was all performance releases for the most part .....oracle has some fairly dedicated people to it .....i know it seemed like it would be the opposite but fair is fair [02:16] kawaz_ai_ has joined the channel [02:17] ckknight: EM03: well, just search on github or google for mysql clients built for node.js, I've seen at least one. [02:18] prettyrobots: felixge has the one that I use. [02:18] aroop has joined the channel [02:18] saikat has joined the channel [02:19] prettyrobots: EM03: I'm glad someone else around here likes MySQL (and SQL in general). [02:19] ckknight: heathens. [02:19] ckknight: :P [02:19] prettyrobots: It's all the ORM nonsense that I hate. [02:19] ckknight: I'm actually a fan of SQL, but I've just been burned hard on MySQL in the past. [02:20] prettyrobots: It needs baby sitting. [02:20] prettyrobots: PostgreSQL is easier to manage, but less popular for reasons I don't understand. [02:20] prettyrobots: But, I like SQL. [02:21] ckknight: postgres was a lot slower for a long time. [02:21] prettyrobots: Yeah, but not for a long time. [02:21] ckknight: since about postgres 7 [02:21] ckknight: I think. [02:21] prettyrobots: I remember it back in the day. [02:22] prettyrobots: It implemented every little thing in SQL, poorly. [02:22] ckknight: it also had the general philosophy that being right > being fast [02:22] ckknight: mysql took the opposite approach :P [02:23] prettyrobots: Worse is better wins again. [02:23] ditesh|cassini has joined the channel [02:24] ckknight: off I go. [02:25] __sorin__ has joined the channel [02:28] EM03: the last release of mysql was super solid .....super solid [02:28] sh1mmer has joined the channel [02:29] Yuffster has joined the channel [02:31] tbranyen: if you love it so much why dont you [02:32] systemfault: marry it? [02:32] sirkitree has joined the channel [02:33] augustl: what's a good way to keep a process open? [02:33] augustl: my process connects to some sockets, but doesn't always keep the connections up [02:33] augustl: so currently it exits when no connections are up, as expected [02:33] augustl: I want to keep it alive though [02:33] seivan has joined the channel [02:34] k1ttty has joined the channel [02:35] __sorin__ has left the channel [02:35] binaryjohn has joined the channel [02:36] mike5w3c has joined the channel [02:38] ditesh|cassini has joined the channel [02:39] augustl: calling `process.stdin.resume();` works, apparently [02:40] augustl: smells a bit like a hack though.. [02:40] augustl: are there other ways? [02:41] cloudhead: augustl: reconnect on disconnect? [02:42] augustl: cloudhead: for this application, I don't want to do that [02:42] augustl: I'm disconnecting if there's no activity for x seconds, and connect again when I have data to write [02:43] cloudhead: hmm, and where do you get that data from? [02:43] dansays has joined the channel [02:43] cloudhead: like, how do you know when you have new data to write? [02:43] augustl: from http requests [02:43] reid has joined the channel [02:43] cloudhead: ok [02:43] Emmanuel__ has joined the channel [02:43] cloudhead: so don't you have some sort of setInterval? [02:43] cloudhead: which polls? [02:43] gazumps has joined the channel [02:43] augustl: doh, that's wrong. I get them from a stomp mq [02:43] augustl: nope.. [02:43] cloudhead: ah hm [02:44] cloudhead: aren't you bound to that socket then? [02:44] cloudhead: how do you communicate with the queue? [02:44] augustl: ah good point [02:44] Swimming_bird has joined the channel [02:44] augustl: the problem occurred only when I had a bug in the code that reconnects to the stomp MQ when the connection is lost [02:44] augustl: so it didn't reconnect [02:44] cloudhead: ah [02:44] cloudhead: there you go [02:44] augustl: so the reconnection and/or the actual connection will keep it up, then :) [02:45] augustl: since the reconnection happens in a setTimeout [02:45] cloudhead: as long as you keep 1 socket open, you'll be fine [02:45] cloudhead: yea [02:45] augustl: thanks :) [02:45] jpld has joined the channel [02:45] cloudhead: np [02:46] cloudhead: augustl: also check out https://github.com/cloudhead/node-syslog/blob/master/lib/node-syslog.js#L113-116 [02:46] cloudhead: it's some reconnection code I wrote [02:46] cloudhead: might give you ideas or w/e [02:46] augustl: that's a nice way to throttle the retries [02:46] augustl: I just do a retry every second now [02:47] cloudhead: yea that works too [02:47] prettyrobots: cloudhead: How do you do it? [02:47] cloudhead: you don't have anything to buffer either, cause you're reading [02:47] ckknight has joined the channel [02:47] cloudhead: prettyrobots: do what? [02:47] prettyrobots: Have you ever written a blog post on how you organize your time, producivity? [02:48] cloudhead: hmm no I haven't [02:48] cloudhead: I was thinking about it [02:48] prettyrobots: The stuff you create looks so very *finished*. [02:48] honey_badger has left the channel [02:48] prettyrobots: And you have a couple of different projects that really are quite large and dispirate. [02:49] prettyrobots: Like LESS versus Vows. I find it's a real challenge to split my attention like that. [02:49] cloudhead: yea it's pretty hard to keep up with everything actually [02:49] cloudhead: especially issues people are having [02:50] jamesarosen has joined the channel [02:50] prettyrobots: I feel a real prod when someone reports a bug. [02:50] prettyrobots: First, surprised I have a user, then eager to keep them. [02:50] cloudhead: haha [02:50] cloudhead: yea, I was like that at first [02:51] cloudhead: but now it's unmanageable [02:51] cloudhead: I feel bad [02:51] tbranyen: lol [02:51] prettyrobots: Ugh. That doesn't sound promising. [02:51] tbranyen: i wish people reported more bugs [02:51] cloudhead: cause my projects have dozens of issues [02:51] reid has joined the channel [02:51] cloudhead: and I don't have time to help everyone [02:51] prettyrobots: tbranyen: Yeah. The feedback has a positive effect, too. [02:52] cloudhead: I think less.js's issue list is like 100+ or something [02:52] tbranyen: cloudhead: thats fine, its open source so at least there is the potential for others to come around and help [02:52] cloudhead: yea for sure [02:52] dabailey_ has joined the channel [02:52] prettyrobots: less.js is popular and the user base is not a good source for a hacker base. [02:52] cloudhead: ^ true [02:52] neorab has joined the channel [02:52] cloudhead: I get much more outside contribution to my node projects [02:53] prettyrobots: My one project that people used, I got patches with the issues. That was a good feeling. [02:53] mikeal has joined the channel [02:53] cloudhead: yea that's good [02:53] cloudhead: but it's still hard [02:53] cloudhead: even if I had a patch with every single issue [02:53] cloudhead: because I'd have to review it [02:54] cloudhead: make sure it doesn't break anything, or that there isn't a cleaner way to do it [02:54] robotarmy has joined the channel [02:54] robotarmy has joined the channel [02:54] gm__ has joined the channel [02:54] prettyrobots: Still, I'm interested in how you get things to that finished state. LESS and Vows look like shrink wrapped software. [02:54] gm__: heya [02:54] gm__: anyone using node and zeromq ? [02:54] gm__: need some help on pub/sub + multicast [02:54] cloudhead: hehe [02:54] pyrotechnick: yeah i was playing with it last night [02:54] pyrotechnick: it's freaking sweet [02:54] pyrotechnick: didnt get that far sorry [02:55] augustl: gm__: used node and activemq, not sure if that helps.. [02:55] tbranyen: cloudhead: you don't unit test? [02:55] pyrotechnick: zero's a little different [02:55] augustl: stomp is stomp is stomp, I suppose [02:55] gm__: I think it's more a problem that I'm not knowing how to use zeromq.. [02:55] pyrotechnick: it dont even pack a queue out of the box lol [02:55] augustl: or doesn\t zeromq use stomp? [02:55] cloudhead: tbranyen: it depends on the software [02:55] pyrotechnick: gm__ have you watched the video? [02:55] pcardune has joined the channel [02:55] pyrotechnick: its like 2 hours long it's pro [02:55] prettyrobots: So, I guess I should create an issue asking you to write a blog post. [02:55] gm__: I picked it because its brokerless and has multicast [02:55] cloudhead: tbranyen: but even then, tests aren't perfect, you can catch some errors by just looking at the code [02:55] tbranyen: i'm sure less has unit tests [02:55] __sorin__ has joined the channel [02:56] cloudhead: yea it has tests [02:56] gm__: pyrotechnick: I can say I saw it, alto not in the see-everything-linearly-at-once sense [02:56] tbranyen: cloudhead: right i mean reviewing code is never a bad thing [02:56] cloudhead: but I just can't merge something without examining it first [02:56] cloudhead: it freaks me out [02:56] SubStack: pyrotechnick: what is zeromq good at? [02:56] tbranyen: ha yea [02:56] SubStack: might make a good dnode adapter [02:56] tbranyen: i thought you meant for the code you wrote [02:56] SubStack: cloudhead: likewise [02:56] gm__: I think that I'm between not understanding the node.js binding and not executing well what I'm doing inside an event emitter [02:56] gm__: heh [02:57] SubStack: and then sometimes you think your code is wrong but it's actually the tests [02:57] mike5w3c_ has joined the channel [02:57] augustl: so does zeromq use stomp? [02:57] cloudhead: tbranyen: oh yea no, I mean you get a patch, sometimes you just read it and spot errors cause the author isn't as familiar with your code as you are [02:57] SubStack: or then other times you might think that but your code was wrong after all [02:57] gm__: I'm using it to multicast events between two node processes form inside an customized event emitter [02:57] cloudhead: SubStack: scary thing :D [02:57] gm__: augustl: no, it's their own proto [02:57] SubStack: or perhaps both your code and tests were wrong [02:57] SubStack: all have happened [02:57] cloudhead: yea [02:57] augustl: I see [02:58] pyrotechnick: SubStack: different paradigms, it's very flexible [02:58] tbranyen: cloudhead: i'm relatively new to test driven dev, but it seems like the way to go on personal projects [02:58] pyrotechnick: and blocking [02:58] cloudhead: so at least I like to make sure the logic works in my brain [02:58] pyrotechnick: it's very good at blocking [02:58] SubStack: blocking /o\ [02:58] pyrotechnick: i wish i had four hands [02:58] gm__: very handy I have to say I'm just not that familiar with it and how it deals and block's node's loop [02:58] pyrotechnick: so i could give that blocking [02:58] pyrotechnick: four thumbs down [02:58] reid has joined the channel [02:58] tbranyen: i wish i could write more tests on stuff i do at work but it really depends on the project [02:59] cloudhead: tbranyen: yea, I write some of my code that way, but sometimes I just go from A-Z with no tests cause the context switching is not good [02:59] SubStack: it's hard to write tests for complicated interface heavy stuff :/ [02:59] cloudhead: and yea I don't even bother with that ^ [02:59] prettyrobots: Tests are fun with coverage. [02:59] SubStack: test when it's easy to do so! [02:59] tbranyen: SubStack: heh i wrote a jquery plugin that polyfills position fixed completely in IE 6, thought it was good to go until i started writing tests [02:59] SubStack: and stack the cards so it's usually easy [02:59] tbranyen: and testing visual stuff is a pain [02:59] cloudhead: if it's not critical stuff, I let the users test as they use it ;p [03:00] tbranyen: realized it was mostly broken under a lot of situations [03:00] gm__: no tests for me. [03:00] cloudhead: the thing I realized is that most stuff only breaks once [03:00] SubStack: tbranyen: indeed I'm writing some png tests right now [03:00] tbranyen: binary data? [03:00] SubStack: can't just compare to a hash because the output is nondeterministic [03:00] cloudhead: hahahaha [03:00] tbranyen: you can be reasonably sure? [03:00] cloudhead: SubStack: why is it nondeterministic? [03:01] tbranyen: collisions are rarer than the lottery [03:01] cloudhead: rounding errors? [03:01] SubStack: not sure yet [03:01] cloudhead: weird [03:01] tbranyen: crap might not get node on ps3 tonight, can't find my ps2 to usb adapter [03:02] tbranyen: curse you model m [03:02] SubStack: clackedy clack [03:02] tbranyen: thats what i get for being hipster [03:02] SubStack: I had a similarly clacktastic keyboard in highschool [03:02] gm__: no one is hipster than I right now [03:02] SubStack: not a proper model m though [03:02] gm__: node and zeromq, my screen reeks of hackernews [03:03] gm__: if I get someone with some money around and a cup of coffee people will think that my name is tech co-founder [03:03] perezd has joined the channel [03:03] cloudhead: lol [03:03] cloudhead: what are you doing with zeromq? [03:04] Sarajevo has joined the channel [03:04] Sarajevo: whats node.js [03:04] gm__: I have a distributed event emitter that I wrote some time ago using udp [03:04] gm__: and multicast [03:04] Sarajevo: is that a javascript or smth [03:04] ChrisPartridge: Sarajevo: nodejs.org [03:04] SubStack: Sarajevo: it's just some tricks for getting v8's javascript engine to read in files and tcp streams [03:04] cloudhead: he's trolling [03:04] prettyrobots: http://nodejs.org/ [03:04] tbranyen: Sarajevo: i would have accepted a java scripts as well [03:04] gm__: everythin was ok until I needed big messages. so I've decided to try zeromq because it has batching, slicing, etc, and also pub/sub using multicast [03:04] stepheneb has joined the channel [03:04] gm__: but [03:05] SubStack: gm__: or dnode! (maybe) [03:05] gm__: dont know dnode [03:05] gm__: mine is really simple [03:05] SubStack: it is fun times [03:05] SubStack: ACTION <-- author [03:05] cloudhead: gm__: hm yea if you have big messages I can see the benefit [03:05] gm__: but I think I messed up because zeromqblocks and I can send events to the emitter [03:05] gm__: SubStack: url plz [03:06] gm__: I mean [03:06] Sarajevo has left the channel [03:06] tbranyen: cya [03:06] SubStack: gm__: https://github.com/substack/dnode [03:06] gm__: for the stuff I do, I abuse event emitters so having a drop-in distributed event emitter is like natural [03:06] SubStack: also this http://substack.net/posts/9bac3e/Roll-your-own-PubSub-with-DNode [03:06] gm__: but I've forgot that I'm not that good on js [03:07] gm__: SubStack: pub sub with node I already have [03:07] gm__: github.com/gleicon/editor.js [03:07] gm__: and github.com/gleiconpubsub_ws [03:07] gm__: ops [03:07] gm__: github.com/gleicon/pubsub_ws [03:07] SubStack: that just covers how to do pubsub with dnode [03:07] jaket has joined the channel [03:07] SubStack: dnode is not just pubsub [03:07] gm__: if you go to editor.7co.cc there is a live app for collab text editing [03:07] tsesame has joined the channel [03:08] gm__: dnode is nice [03:08] gm__: but is not what I want to do really [03:08] SubStack: what do you want to do? [03:08] tsesame: Nice to see node mentioned in the last js definitive guide edition [03:08] gm__: I want to attach in a multicast group and have all emit() calls sent to it, serialized with my protocol, so my other nodes can receive and process it [03:09] gm__: I already have that with udp, but I want bigger messages and a bit mor of control [03:09] tsesame: good examples too [03:09] tbranyen: tsesame: wait really? [03:09] tbranyen: 5th edition? [03:09] tsesame: 6th [03:09] tsesame: just got it in the mail [03:09] tbranyen: heh i have 4th haven't upgraded yet [03:09] tsesame: yeah I think it's time :) [03:09] tbranyen: but it covers js 1.5! [03:10] gm__: well, back to vim :) [03:11] brianc has joined the channel [03:12] brianc: hai [03:13] SubStack: oh hello [03:13] tsesame: I have the 4th edition as well and the new one is like 30% thicker [03:13] tsesame: crazy [03:13] tbranyen: wtf [03:13] langworthy has joined the channel [03:13] tbranyen: how is that possible [03:13] tbranyen: haha [03:13] tsesame: lots of new content [03:13] tsesame: it documents jquery [03:14] tbranyen: that doesn't seem right [03:14] tsesame: meh [03:14] brianc has left the channel [03:14] brianc has joined the channel [03:16] NuckingFuts has joined the channel [03:18] dnolen has joined the channel [03:19] mnutt has joined the channel [03:20] skm has joined the channel [03:21] ckknight: tsesame: mentioning jquery seems good (as well as other frameworks), but "documenting" seems bad. [03:21] tbranyen: omg linux booted woot [03:21] tbranyen: this is nuts [03:22] chrislorenz has joined the channel [03:22] tsesame: well I think the idea may be to perk a casual reader's interest enough to refer them to real documentation [03:23] tsesame: it's not exhaustive [03:23] Corren has joined the channel [03:24] ckknight: tsesame: alright then. [03:24] skm has joined the channel [03:25] Yuffster has joined the channel [03:25] enos_feedler has joined the channel [03:25] ArtistConk has joined the channel [03:25] deedubs has joined the channel [03:25] tsesame: ckknight: I was surprised to see an entire chapter dedicated [03:26] brianc: does anyone recommend a gnome irc client? [03:26] gkatsev: irssi :P [03:28] brianc has left the channel [03:28] litropy has joined the channel [03:31] rchavik has joined the channel [03:31] Gregor: Although I rarely use jQuery myself, it's practically transcended "third-party library" status and achieved "standard library" status, in terms of how often it's used. [03:32] litropy: I've been told node.js might help with my issue. It seems the last page of comcast.com's login process runs javascript that seemingly encrypts the ASP ticket, then tells the form it populates to post to the server. See more here: http://stackoverflow.com/questions/5726728/bash-curling-comcast-com-for-my-bill-amount-and-bill-date [03:32] jacobolus has joined the channel [03:33] chrislorenz has joined the channel [03:34] gkatsev: Gregor: also, it ships with ASP.NET MVC and rails and many more. [03:34] litropy: I'm only assuming the javascript encrypts the ASP ticket, because I see an empty placeholder within the form, and doing a normal curl with all the static form data the page presents returns back with the same page. [03:34] Yuffster has joined the channel [03:34] litropy: [03:34] tbranyen: Gregor: and its coding style is pretty prolific in the JS community [03:34] tbranyen: not to say it invented it, but definitely popularized [03:35] gkatsev: that isn't really a good thing :/ [03:35] brianc has joined the channel [03:36] Viriix has joined the channel [03:36] tbranyen: no? i've been using it as inspiration for my convenience api [03:36] tbranyen: looks damn good imo [03:36] gkatsev: I'm not a bit fan of the jquery style [03:37] tbranyen: gkatsev: http://pastie.org/1817838 example [03:37] sreeix has joined the channel [03:38] litropy: I'm a big fan of convenience, which is why I decided to write a program that pulls my bill dates and amounts. Electric and gas were easy - php_imap the bill amount within the monthly email. But Comcast doesn't include the bill amount within the email. So, here I am. [03:38] captain_morgan has joined the channel [03:38] tbranyen: litropy: wow thats kind of a cool idea [03:39] Spion_ has joined the channel [03:39] systemfault: gkatsev: I really hate the abuse of chaining in jQuery [03:39] litropy: tbranyen, yep. gonna even have an internal site for my roomie with a paypal link [03:39] tsesame: the chaining style of jquery is catching on [03:39] tsesame: js visualization tools like protovis and d3 are using the same concept [03:39] SubStack: fluent interfaces! [03:40] SubStack: they're like monads only not [03:40] gkatsev: chaining is annoying, sometimes. Makes it hard to keep track of what is happening if you chain more than like twice. Or if each chain function is like 20 lines long [03:40] SubStack: chaining is awesome [03:40] SubStack: node-rfb is basically one giant chain [03:40] tsesame: true, but then you're not forced to write chains that long, only when it makes sense and reads like a nice sentence [03:41] tsesame: one can write horrible code with chains [03:41] tsesame: I just really like how succinct the function names are [03:41] tsesame: and it handles ajax like a charm [03:41] tbranyen: tsesame: i'm liking the new deferreds in jquery ajax [03:42] litropy: So guys, could node help with this? I don't want to use a web browser. Instead, I'm curling my web page, then I want to run all the javascript within the page. Keep in mind, some scripts are linked, and not actually in the page curl sends back. [03:42] tbranyen: litropy: you looked at jsdom? [03:42] tbranyen: since that does what you're asking i think [03:43] tsesame: tbranyen: I haven't used them yet [03:43] litropy: tbranyen, ah. heh, I was following your advisement sequentially. [03:43] litropy: looking ... [03:44] tsesame: litropy: Are you trying to simulate a browser environment on the server? [03:44] mbrevoort has joined the channel [03:44] tbranyen: litropy: i wrote a screenscraper for gist lookup with jsdom until i realized there was a link i could use instead [03:44] litropy: tsesame, see: http://stackoverflow.com/questions/5726728/bash-curling-comcast-com-for-my-bill-amount-and-bill-date [03:45] boaz has joined the channel [03:47] micheil: SubStack: node-rfb? [03:47] SubStack: yeps [03:47] tbranyen: litropy: i think jsdom will help you [03:47] micheil: SubStack: link? [03:47] SubStack: cleaning that up right now since it's had some bitrot [03:47] SubStack: http://github.com/substack/node-rfb [03:48] devrim: anybody got this error from mongoose before ? 'Trying to open unclosed connection' http://d.pr/mQNZ [03:48] micheil: SubStack: there's some odd stuff in there.. [03:48] x_or has joined the channel [03:49] ryan[WIN] has joined the channel [03:49] kawaz_air has joined the channel [03:49] tsesame: litropy: You noticed that %3fm%3dse is ?m=se [03:49] micheil: SubStack: in fact, at times [03:49] tsesame: url decoded [03:49] micheil: I have no idea wtf that code is doing [03:49] litropy: tsesame, yes, but I'm not sure what that means. [03:50] pedrobelo has joined the channel [03:50] SubStack: micheil: it's just this trick http://substack.net/posts/cb328d [03:50] deedubs: anyone using jade on the client side? [03:50] tsesame: the "backTo" looks to be a callback URL to redirect to, and the ?m=se is an added parameter that goes w/ the callback [03:51] tsesame: that's as far as I can tell, but I would mess around with maybe sending it back decoded [03:51] tsesame: a "redirectback" if you will [03:52] micheil: SubStack: I'm still not sure exactly what you're doing there. [03:52] jacobolu_ has joined the channel [03:53] azeroth_ has joined the channel [03:55] edude03 has joined the channel [03:55] litropy: tsesame, I tried it. Note how everthing after the '?' is URL-encoded - that's so that ASP's listener doesn't have to decode. [03:56] kawaz_air has joined the channel [03:56] mnutt has joined the channel [03:56] tsesame: litropy: the equals (=) are not encoded when they normally should be [03:57] tsesame: to me that means the target of the encoding is the value of that parameter, not the entire query string after the ? [03:58] Xano has joined the channel [03:58] indutny has joined the channel [03:58] litropy: also note I have , which looks like a placeholder for the encrypted ASP ticket javascript might create before posting the form back to the server. [03:59] litropy: tsesame, I'll re-run it. [04:00] tsesame: I don't see that in the stackoverflow posting [04:01] mike5w3c has joined the channel [04:02] ditesh|cassini has joined the channel [04:03] tsesame: Rhino + env.js make a good browser-simulated environment on the server [04:04] jjmalina has joined the channel [04:06] litropy: tsesame, I need to add it to the SO post [04:06] litropy: tsesame, do you have comcast? [04:07] litropy: does anyone have comcast? [04:07] tsesame: no sorry, fios [04:08] SubStack: verizon couldn't even find my address [04:08] SubStack: thinking about getting comcast since at&t won't sell me dsl either [04:08] jacobolus has joined the channel [04:08] randallagordon has joined the channel [04:08] SubStack: since I don't have a "payment history" and they can't dig up any records for my SSN [04:08] tsesame: are you far from the city? [04:08] SubStack: in a pretty urban area of oakland [04:09] tsesame: weird [04:09] pyrotechnick: substack im going to make a dnode visualisation [04:09] SubStack: pyrotechnick: rock! [04:09] SubStack: pyrotechnick: are you speaking at the gaming meetup in the city next week? [04:09] pyrotechnick: just working out how to do it agnostically now [04:09] pyrotechnick: umm [04:09] pyrotechnick: is it being organised by bingo? [04:09] SubStack: node.js for gamers or whatever it's called in SF [04:09] pyrotechnick: by bindomanatee/dave? [04:09] SubStack: possibly [04:09] pyrotechnick: yeah [04:10] pyrotechnick: i think so [04:10] pyrotechnick: skyping in i think [04:10] pyrotechnick: are you? [04:10] SubStack: groovy! [04:10] SubStack: yeah I'll whip up a talk [04:10] pyrotechnick: but i dont have much prepared [04:10] pyrotechnick: yeah [04:10] pyrotechnick: mines going to be a bit rough [04:10] pyrotechnick: hopefully ill just be answering questions i can answer mostly [04:10] pyrotechnick: ill just show off toe im not sure i can be arsed making another game [04:10] pyrotechnick: i made tron for the guys here in brisbane, it went really well [04:10] SubStack: awesome [04:10] pyrotechnick: in like [04:10] pyrotechnick: 40 mins [04:10] SubStack: haha [04:11] pyrotechnick: some moments were a bit awkward [04:11] pyrotechnick: like my 3d wasnt working and stuff [04:11] pyrotechnick: got caught out by some gotchas [04:11] SubStack: I'll just talk about dnode a bit and why it rocks for making games [04:11] pyrotechnick: but i managed to keep it rolling fairly smoothly [04:11] pyrotechnick: yeah [04:11] pyrotechnick: for real [04:11] pyrotechnick: aight i wont steal your dnode thunder if i go before you then [04:11] SubStack: pyrotechnick: by all means! [04:11] pyrotechnick: ill just say yeah we're usin dnode substacks gunna show u after [04:11] pyrotechnick: hopefully the link isnt too shit [04:11] pyrotechnick: i wonder what time itll be here [04:11] pyrotechnick: do u know the time exactly? [04:12] SubStack: 19:00 PST [04:12] SubStack: *PDT [04:12] pyrotechnick: san fran time [04:12] pyrotechnick: ? [04:12] SubStack: yes [04:12] pyrotechnick: wats the date [04:12] pyrotechnick: ive asked dave a billion times and hes like ill get it to you [04:12] SubStack: Thursday, April 28, 2011 [04:12] pyrotechnick: is there a site or something [04:12] SubStack: http://www.meetup.com/Node-js-Serverside-Javascripters-Club-SF/events/16674393/ [04:13] Aria has joined the channel [04:13] SubStack: pyrotechnick: This will be sweet. You go first and then they'll pay more attention to me I suspect [04:14] skohorn has joined the channel [04:14] pyrotechnick: because ill suck? [04:14] pyrotechnick: thats 1pm here [04:14] pyrotechnick: hmm [04:14] pyrotechnick: might chuck a sicky [04:14] SubStack: nah because you'll have a sweet real-world example [04:14] pyrotechnick: ahh [04:14] pyrotechnick: yeah [04:15] SubStack: and then people will be more interested to know what's going on behind the scenes [04:15] pyrotechnick: if you're around my tonight ill link you [04:15] SubStack: ok sure [04:15] pyrotechnick: going to chuck it up tonight and try to keep it up from now on [04:15] pyrotechnick: gotta sort a database out [04:15] pyrotechnick: probs just redis [04:15] litropy: tsesame, tryed all your approaches; negative on all accounts. same result. [04:16] litropy: looking at jsdom [04:19] jesusabdullah: SubStack: Is that meetup going to be televised? [04:19] SubStack: not sure! [04:19] pyrotechnick: yeah on espn [04:19] pyrotechnick: professional game development sport [04:19] litropy: found a meme in my travels: turtles. e.g. But after that it's turtles all the way down. Twitter for example does this window.top.location, turns out that jsdom does not define window.top and BOOM! [04:20] litropy: ph, do I have turtles. lol [04:20] litropy: s/ph/oh/ [04:20] SubStack: all the way down [04:24] jesusabdullah: Sounds awesome XD [04:27] tilgovi has joined the channel [04:30] ChrisPartridge: Wow, devel branch of cloud9 is quite nice [04:31] rfay has joined the channel [16:48] nodelog has joined the channel [16:48] mscdex: well, in that case, you can do http.get() and it'll call .end() for you automatically [16:48] mscdex: :p [16:48] pastak has joined the channel [16:48] unomi: http://www.yuiblog.com/blog/2011/04/19/yui-open-hours-thurs-apr-21st/ [16:51] colinclark has joined the channel [16:51] hvgotcodes: mscdex: what do you mean? [16:52] nvardar has joined the channel [16:52] aguynamedben has joined the channel [16:53] hebz0rl has joined the channel [16:53] mileswu has joined the channel [16:54] mscdex: hvgotcodes: it's just a shortcut for GET requests... http.get(opts, callback); instead of: var req = http.request(opts, callback); req.end(); [16:54] Rubikzube has left the channel [16:54] mjr_ has joined the channel [16:54] hvgotcodes: mscdex: oh great [16:54] hvgotcodes: any insight how to test this without needing the actual server i am GETTING from [16:55] jacobolus has joined the channel [16:56] kmwallio has joined the channel [16:56] mileswu: I seem to have a build error whilst trying to build Node.js, and I'm not quite sure what is going wrong. the error is pasted here: https://pastee.org/ema23 [16:56] mileswu: has anyone else had this problem? [16:58] mnutt has joined the channel [16:58] sendark: mileswu: hmm not sure maybe you should post the entire output [16:58] dylang has joined the channel [16:58] dgathright has joined the channel [16:59] sako has joined the channel [16:59] mscdex: mileswu: what platform are you building on? [17:00] mileswu: mscdex: linux x86-64 [17:00] perezd has joined the channel [17:00] mscdex: what version of node? [17:00] mileswu: I've tried both 0.4.6 and git HEAD [17:01] mscdex: mileswu: hmmm, yeah post the entire output if you can [17:01] mileswu: sure let me get it now [17:02] [[zzz]] has joined the channel [17:02] mileswu: https://pastee.org/qduxb [17:02] piscisaureus has joined the channel [17:03] siculars has joined the channel [17:04] wadey: rbranson: I found a few bugs with node-ffi when compiling with a shared libev [17:05] wadey: i'll try to get the patch up to you soon, i haven't made sure it doesn't break the non-shared build yet [17:05] abasababa has joined the channel [17:06] rook2pawn has joined the channel [17:07] ardcore has joined the channel [17:07] mscdex: mileswu: out of curiousity, which distro and what version of gcc do you have? [17:07] mileswu: gcc version 4.4.5 (Gentoo Hardened 4.4.5 p1.2, pie-0.4.5) [17:07] davidascher has joined the channel [17:08] arpegius has joined the channel [17:09] levi501d has joined the channel [17:09] jtsnow has joined the channel [17:10] ardcore has left the channel [17:12] sh1mmer has joined the channel [17:13] mikedeboer has joined the channel [17:14] mscdex: mileswu: yeah that's odd. you should be able to get around that by changing 'snapshot=on' to 'snapshot=off' in node's wscript [17:14] phiggins_afk has joined the channel [17:14] mscdex: mileswu: but either way i'd post to the nodejs mailing list about it [17:15] mscdex: might be gentoo-specific or something. i compile with gcc 4.4.3 on ubuntu x64 [17:16] matjas has joined the channel [17:16] k1ttty has joined the channel [17:17] leetreveil has joined the channel [17:17] mscdex: mileswu: fwiw, it appears a similar problem existed when building chromium on gentoo hardened: http://bugs.gentoo.org/361747 [17:17] mscdex: maybe it's related somehow [17:17] mscdex: not sure [17:19] gluis has joined the channel [17:19] darshanshankar has joined the channel [17:22] [[zz]] has joined the channel [17:23] aho has joined the channel [17:23] jscheel: hey guys, I'm trying to figure out how to write to the stdin of a child process (the process is an interactive shell). Here's where I'm at, but it doesn't seem to ever write to stdin: http://pastie.org/1819846 [17:23] jscheel: well, it get's to my write command (stdout returns ">>>"), but my write never occurs [17:23] xtianw has joined the channel [17:28] nvardar_ has joined the channel [17:29] mscdex: jscheel: erm.. don't you want code.shift() instead? [17:29] mscdex: :) [17:29] coreb has joined the channel [17:30] jscheel: mscdex: hehe, oops, yes :p [17:30] jscheel: but [17:30] jscheel: still not success [17:30] pyrony has joined the channel [17:31] vikstrous1 has joined the channel [17:31] JulioBarros has joined the channel [17:31] jscheel: I simplified the example down to it's core [17:31] jscheel: http://pastie.org/1819874 [17:32] visa has joined the channel [17:32] newy_ has joined the channel [17:32] stonebranch has joined the channel [17:32] mileswu: mscdex: hm i'll try the snapshot=off thing again [17:33] mscdex: jscheel: are you sure your if-statement is evaluating to true? perhaps there's a newline after the prompt? [17:33] mileswu: what is weird tho, is that node-0.4.6 builds fine via the portage package manager [17:33] mileswu: so atm im trying to see what it does differently [17:33] hellp has joined the channel [17:33] steph021 has joined the channel [17:33] JulioBarros has joined the channel [17:33] mscdex: jscheel: also, you may need to do data.toString === '>>>' [17:33] jscheel: mscdex: yeah, the condition is successful [17:33] mscdex: hrmm [17:33] mscdex: mileswu: odd [17:34] steffkes has joined the channel [17:34] mscdex: mileswu: it'd be interesting to see the "recipe" it uses for building and installing [17:34] Yuffster_work has joined the channel [17:35] jmazzi has joined the channel [17:35] jmazzi: is there anything like nokogiri for node? [17:35] jamarparris has joined the channel [17:36] mraleph: mileswu: probably it fails to map codespace; do you have hard limits on virtual memory configured on your box? [17:36] brianc: jmazzi: jsdom maybe? [17:36] mraleph: s/codespace/coderange/ [17:36] mileswu: mscdex: it seems like the package manager compiles against a shared version of v8 (which is older than the one that node tries to pull in statically) [17:37] mileswu: mraleph: there shouldn't be any limits setup [17:37] newy_ has joined the channel [17:37] mraleph: mileswu: what does ulimit -v say? [17:38] mikeal has joined the channel [17:38] arpegius has joined the channel [17:39] mileswu: unlimited [17:39] jscheel: mscdex: yeah, when I add a console.log under my condition, it's definitely firing [17:39] mscdex: hmm [17:39] mraleph: mileswu: hmm. that's strange [17:39] mileswu: I'm guessing it's somehow related to the underlying v8 compile, but as to why I'm not sure [17:40] mileswu: oh well, it's not a big deal [17:41] mileswu: since it seems to be perfectly happy linking against my distro's v8 [17:42] Astro has joined the channel [17:42] mscdex: jscheel: what if you spawn booish's executable directly instead of the /usr/bin/booish shell script? [17:42] Country has joined the channel [17:42] jamarparris has left the channel [17:43] mscdex: jscheel: because the code looks fine to me [17:43] NuckingFuts has joined the channel [17:44] sdecastelberg has joined the channel [17:44] jscheel: mscdex: well, booish is the interactive shell [17:44] jscheel: mscdex: well, it's a repl [17:44] stefounet has joined the channel [17:44] stefounet has left the channel [17:44] mscdex: jscheel: right, but the actual executable is booish.exe or whatever [17:45] mscdex: jscheel: it looks like /usr/bin/booish is a wrapper [17:45] jscheel: mscdex: oh, didn't know. lemme give it a try [17:45] mscdex: i'd give it a try, but i don't have mono installed [17:47] jscheel: mscdex: poop, same thing [17:48] jscheel: mscdex: I guess I could write the code out to a temp file, execute the file as a boo script, then delete the file when it's done [17:49] gmarcus: mikeal: Hi. I am using your spider module. It is looking awesome, but am having problems with memory. [17:50] mikeal: i'm looking at that now [17:50] jscheel: mscdex: I wish I could just pipe code in directly to boo, but they wrote it to expect only a filename [17:50] gmarcus: mikeal: I would be happy to provide more info. I am already runnning the latest commit. [17:51] xastey has joined the channel [17:51] vikstrous1: quick question: I'm breaking up my node app into multiple files and I have to do require()'s at the beginning of each one. Is that bad? [17:51] kmiyashiro has joined the channel [17:51] jesusabdullah: Nope! [17:51] mikeal: i wonder if it's a leak in spider [17:52] mikeal: or if that last page exposes a leak in jsdom [17:52] vikstrous1: it just seems like things that i already required should be available to my other files somehow [17:52] gmarcus: mikeal: I doubt it is that specific page, since all of these pages are using the same template from itunes.apple.com [17:52] blueadept has joined the channel [17:53] gmarcus: mikeal: but sure, it could be a leak with jsdom...I have heard others complaining about jsdom performance and memory leaks [17:53] mikeal: tmpvar: do you know of any existing leaks in jsdom? [17:53] pquerna: https://github.com/racker/node-cassandra-client [17:54] Country has joined the channel [17:54] nvardar has joined the channel [17:54] eb4890 has joined the channel [17:54] JulioBarros has joined the channel [17:55] tmpvar: mikeal: yes [17:55] mikeal: how bad? [17:55] tmpvar: Script.runInNewContext() seems to never free memory [17:56] tmpvar: so if you use a ton of memory by loading say.. jQuery or YUI.. that process is going to spike [17:56] brianc: vikstrous1: it's not bad at all, no. you can require modules "globally" but I would very much not recommend it [17:56] mikeal: ok [17:56] mikeal: if i create a lot of jsdom objects over time is there an issue with them getting freed [17:57] tmpvar: mikeal: its a shame, really. I haven't had a chance to repro in a smaller example, yet. maybe tonight [17:57] eldios has joined the channel [17:57] mikeal: this is leaking [17:57] mikeal: https://gist.github.com/934787 [17:57] mikeal: i can't find an obvious place that i'm keeping a reference to all the jsdom stuff that is created [17:59] rbranson: weday: alright awesome.. I'm actually going to not be a bastard and pull in stuff and release a new version sometime today [17:59] rbranson: was for wadey, god damn psuedo-dyslexia [17:59] rbranson: can't spell a damn thing [17:59] wadey: rbranson: haha, no worries :) [18:02] ChocoTaco: If I have an ObjectWrap class, and then I have an object in JS that's a "subclass" of the ObjectWrap (the ObjectWrap class is in the prototype chain and the constructor was applied) can I still get my internal object out of that JS Object with Unwrap? [18:02] tmpvar: mikeal: that uses jquery [18:02] mikeal: yup [18:02] tmpvar: something in there is not freed [18:02] kawaz_air has joined the channel [18:02] mikeal: sheeit [18:03] gmarcus: mikeal: tmpvar: Here is a screenshot of some 'spider' running under the profiler http://twitpic.com/4nob49 [18:03] ph^ has joined the channel [18:05] indutny has joined the channel [18:05] mikeal: i think that (closure) is the reference to the ctx when calling Script.runInContext [18:05] tfe_ has joined the channel [18:05] tfe_ has joined the channel [18:06] JulioBarros has joined the channel [18:06] bingomanatee has joined the channel [18:08] levi501d has joined the channel [18:08] arpegius has joined the channel [18:09] cloudhea1 has joined the channel [18:09] cloudhead_ has joined the channel [18:10] dgathright_ has joined the channel [18:10] vikstrous1: brianc: okay thanks I guess I'll just keep doing what I'm doing [18:13] sako has joined the channel [18:13] Astro has joined the channel [18:16] Country has joined the channel [18:17] levi501d has joined the channel [18:17] langworthy has joined the channel [18:20] russell_h: is it considered more acceptable to write Node's name as "NodeJS" or "Node.js" or something else entirely? [18:20] eee_c1 has joined the channel [18:20] eee_c2 has joined the channel [18:20] sledge: russell_h: nOdE:Js [18:20] russell_h: heh [18:20] jtrudeau has joined the channel [18:20] mikeal: russell_h: we dont' really have a standards, we use them all interchangably [18:21] mjr_: Is there some way to help V8's heap profiler give more useful information? [18:21] jetienne has joined the channel [18:21] MikhX has joined the channel [18:21] dragunov11 has joined the channel [18:21] mjr_: Like, "(closure)" is probably accurate at some level, but could be just about anything. [18:22] mjr_: They have that function.displayName thing for the debugger. [18:22] mraleph: I don't remember whether that is limitation of profiler or GUI [18:22] russell_h: mikeal: ok, glad that wasn't just my immagination [18:23] jetienne has left the channel [18:23] brianmario has joined the channel [18:23] ilya has joined the channel [18:23] mraleph: profiler can stream heap snapshots in JSON format [18:23] Max-Might has joined the channel [18:23] mjr_: cool [18:24] tilgovi has joined the channel [18:24] mjr_: Is there any way to help it give better results by organizing code differently? [18:24] mjr_: Like naming functions, displayName, that type of thing. [18:24] mraleph: if only I knew. [18:25] aheckmann has joined the channel [18:26] ilya: if I have a server.js that spawns a webserver and I require('./server') in another file and run it with node - will the server be spawned? [18:27] sako has joined the channel [18:27] MattJ has joined the channel [18:28] indutny has joined the channel [18:29] tbranyen: ilya: yes it executes all JS in that file, so long as you aren't wrapping it in a nested function call [18:30] ilya: tbranyen: then why would I get ECONNREFUSED from it? I don't get it, it's exactly the same as it was before. Well, only that now it's an express server. [18:32] bradleymeck has joined the channel [18:33] visa has left the channel [18:33] indiefan2a1 has joined the channel [18:33] Stan____ has left the channel [18:34] zilch has joined the channel [18:34] pdonald has joined the channel [18:34] mbrevoort has joined the channel [18:34] indiefan2a1 has joined the channel [18:35] CIA-72: node: 03isaacs 07master * r5cfac21 10/ (lib/fs.js src/node_file.cc test/simple/test-fs-chmod.js): GH-853 fs.fchmod and fs.fchown - http://bit.ly/hXygnc [18:35] CIA-72: node: 03isaacs 07master * refca5f8 10/ doc/api/fs.markdown : docs for chown/chmod - http://bit.ly/gWaYzI [18:35] CIA-72: node: 03isaacs 07master * r3935adc 10/ (lib/fs.js src/node_constants.cc): GH-853 fs.lchown and fs.lchmod - http://bit.ly/gcEWzu [18:36] eee_c has joined the channel [18:36] indiefan2a has joined the channel [18:37] zylo has joined the channel [18:38] indiefan2a has joined the channel [18:38] ExsysTech has joined the channel [18:39] arpegius has joined the channel [18:39] indiefan2a has joined the channel [18:39] arkx has joined the channel [18:40] indiefan2a has joined the channel [18:41] wadey: rbranson: I added a comment to this commit as well: https://github.com/substack/node-ffi/commit/321e09e58512269e1f4f1d756844712b3aafbd0b#commitcomment-352350 [18:41] varioust has joined the channel [18:41] robmason has joined the channel [18:42] indiefan2a has joined the channel [18:42] pedrobelo has joined the channel [18:43] indiefan2a has joined the channel [18:43] CIA-72: node: 03Nebu 07master * r934c82b 10/ doc/api/readline.markdown : Partially documented the readline module. - http://bit.ly/hXGlrf [18:43] gattuso has joined the channel [18:44] Astro has joined the channel [18:44] kawaz_air has joined the channel [18:45] piscisaureus has joined the channel [18:45] kmiyashiro: noob question [18:45] kmiyashiro: how do I load a static json to fake a db call in express? [18:46] zilch: A little offtopic, How do I refer to a particular line or set of line which in some git repository say on github ? [18:46] wils_: can node generate a mysql dump? [18:46] zilch: kmiyashiro, you want to fool whom ? the user-agent ? [18:46] indiefan2a has joined the channel [18:46] kmiyashiro: no no, I'm just testing [18:47] ilya: kmiyashiro: json = fs.readFileSync('./file.json') would work afaik [18:47] wils_: I mean, I'd like to add a button in my page "create dump", user clicks and the dump will be generated :) [18:47] asdfsafdsa: eww dump [18:47] llkazu has joined the channel [18:47] kmiyashiro: ilya: awesome, thanks. There's no connect/express way to do that? [18:48] zilch: I want to use it in my markdown files .. [18:48] ilya: kmiyashiro: I don't know, I use this in my unit tests. I just read the file into var and use it as a dummy data. [18:48] zilch: kmiyashiro, please put it in gist to let us know the code [18:48] kmiyashiro: there really isn't any code right now, just a base express app [18:49] ovnicraft has joined the channel [18:49] zilch: kmiyashiro, connect/express do provide that [18:49] kmiyashiro: just trying to load data from a file to use in the view [18:49] kmiyashiro: as opposed to hardcoding it in the app.js [18:49] zilch: kmiyashiro, httpServer.use(express.static(__dirname + '/public')); [18:49] Country has joined the channel [18:50] kmiyashiro: right, I have that [18:50] ilya: zilch: doesn't that just spawn a static file server? [18:50] zilch: kmiyashiro, is it not working ? [18:50] V1 has joined the channel [18:50] kmiyashiro: so should I just send a request in the middleware to retrieve the json from itself? [18:50] kmiyashiro: seems kind of a roundabout way [18:50] Bodil has left the channel [18:51] zilch: ilya, i am not aware of that I am going by code example I have seen [18:51] raynos has joined the channel [18:52] ilya: zilch: ah, ok. But I think kmiyashiro is trying to read the file data to use in the app later. [18:52] zilch: ilya, i suppose you mean to say that connect would not be a right way ? [18:52] kmiyashiro: ilya: that's correct [18:52] zilch: ilya, ahh !! [18:52] ilya: zilch: no, I'm using express myself, but this isn't what he asked for, lol. [18:53] zilch: kmiyashiro, then fs.read is way to go [18:53] kmiyashiro: I see [18:53] kmiyashiro: thanks! [18:53] zilch: ilya, :) [18:53] ilya: zilch: yeah :)) [18:53] nibblebot: what's the correct way to copy a file; on SO, someone mentions opening a readable and writable stream for the origin and target files respectively and then using util.pump() but the node 0.4.6 manual says util.pump() is experimental. thoughts? [18:53] zilch: Hey Guys, anybody who is markdown guru ? [18:54] kmiyashiro: worked, yay [18:54] jesusabdullah: A *guru* ? [18:54] ilya: kmiyashiro: wooooooo! [18:54] jesusabdullah: I've used markdown regularly, but idk if it's complicated enough for anyone to be a *guru* in it [18:54] jesusabdullah: zilch: What's up? [18:54] zilch: I want to refer to a line of, say my js file which is part of a github [18:55] zilch: opps , I want to refer to a line of, say my js file which is part of a github [18:55] stefounet has joined the channel [18:56] zilch: Let me rephrase for everybody [18:56] zilch: Want to refer to single line of .js file hosted on github, in my markdown. How do I do that ? [18:57] boccato has joined the channel [18:57] Tobsn has joined the channel [18:57] kawaz_air has joined the channel [18:57] Tobsn: tjholowaychuk [18:57] indiefan2a has joined the channel [18:57] Tobsn: http://tjholowaychuk.com/ [18:57] zilch: I am aware that the GitHub Flavoured Markdown do add some flavour, but not sure about this [18:58] tjholowaychuk: Tobsn: yo [18:58] Tobsn: you see the pictures in the cluster live post? [18:58] tjholowaychuk: yeah [18:58] tjholowaychuk: amazon [18:58] Tobsn: http://tjholowaychuk.com/post/4712080732/cluster-live-0-0-1 [18:58] tjholowaychuk: is fucked [18:58] Tobsn: now theyre gone [18:58] Tobsn: ;) [18:58] zilch: Guess, once this is possible, it would be easy to have CodeWalkThrough.md, just like README.md [18:58] steveklabnik: zilch: if you click on line numbers, it'll give you a link. like https://github.com/hotsh/rstat.us/blob/development/public/js/main.coffee#L3 [18:58] Tobsn: oh okay [18:58] Tobsn: i see [18:59] steveklabnik: yeah [18:59] steveklabnik: amazon takes down like half the web now [18:59] dgathright_ has joined the channel [18:59] Tobsn: lol [18:59] V1: Do I hear a scale fail here? [18:59] V1: It's your own fault for not deploying on multiple data centers [18:59] Tobsn: no no no [18:59] Tobsn: this cant be [18:59] raynos: Single point of failure anyone? [18:59] V1: yes yes yes [18:59] Tobsn: amazon S3 is in the cloud! [18:59] ilya: no way [18:59] zilch: steveklabnik, k, it is that easy !! [18:59] zilch: :p [19:00] Tobsn: the cloud does not go down! [19:00] Tobsn: ;) [19:00] kawaz_air has joined the channel [19:00] tjholowaychuk: haha [19:00] V1: Tobsn: it's not a "cloud" it's just hosting platform that upload you shit to a single datacenter [19:00] Tobsn: ha... clouds do not go down, they stay up. the irony. [19:00] sivy has joined the channel [19:00] Tobsn: V1 well to a single datacenter of your choice [19:00] Tobsn: take that! :P [19:01] ilya: V1: single as in one geolocation for everybody? [19:01] V1: Ha! that just roofs my point, its your own fault, the `cloud` is still alive [19:01] Tobsn: so if tj wouldve used the asien datacenter it would still be up [19:01] mjr_: This Amazon thing is pretty bad [19:01] Tobsn: ergo its tj's fault [19:01] Tobsn: mjr_, in general its pretty awesome [19:02] mjr_: It makes me feel smarter for not deploying on Amazon. [19:02] Tobsn: i never had issues but im also using cloudfront cnames for everything... never ever had anything running straight over S3 [19:02] tjholowaychuk: Tobsn: it's a cloudapp image [19:02] jonaslund: what is up with amazon ? [19:02] tjholowaychuk: cloudfront [19:02] tjholowaychuk: sucks [19:02] mjr_: But this kind of cascading failure could happen to anybody. [19:02] Tobsn: why? [19:02] Tobsn: never had issues [19:02] ilya: tjholowaychuk: I have a question about express, if you don't mind [19:02] tjholowaychuk: i cant stand amazon's apis [19:02] tjholowaychuk: brutal [19:02] Tobsn: oh haha [19:02] Tobsn: well [19:03] Tobsn: as long as you just upload and delete [19:03] mjr_: The very mechanisms that are in place to make it more reliable have backfired and made it less reliable. [19:03] tjholowaychuk: ilya: yeah sure shoot [19:03] Tobsn: you dont run in any issues [19:03] ilya: tjholowaychuk: this here - https://groups.google.com/d/msg/express-js/_HEdiN7qTHQ/IfBs28k5vPkJ [19:03] Tobsn: the only thing that still freaks me out is that it will create buckets at the very moment you upload a file in a bucket that doesnt exist [19:03] Tobsn: thats kinda crazy [19:03] V1: Depends, atleast with amazon you know `where` you code is deployed with other `cloud` hostings you have muss less control. [19:03] Tobsn: you mean EC2? [19:04] Tobsn: btw. im with rackspacecloud on cloud hosting [19:04] Tobsn: cause EC2 is a fucking pure crazyness [19:04] V1: I run on joyent and EC2 [19:04] tjholowaychuk: ilya: Status is not a header field [19:04] tjholowaychuk: ilya: try res.statusCode = 404; [19:04] Tobsn: but i need to take a look into scalr.com - some say its pretty neat [19:04] Tobsn: and a cheap alternative to those other guys [19:05] V1: EC2 gives me my scalability fix :p and allows me to experiment with different techniques, which I think is awesome [19:05] Tobsn: oh rackspacecloud has now load balancers since a week [19:05] baudehlo1: and gives you experience of massive amounts of downtime, so you learn about redundancy [19:05] hvgotcodes: where is the documentation on how to read parameters off a request? [19:05] Tobsn: baudehlo1, haha yep. [19:05] V1: my servers are not down :D [19:05] Tobsn: rackspace is basically tested by me haha [19:06] Tobsn: when they started with the cloud stuff i jumped on it and blew it up to 120 nodes [19:06] Tobsn: all doing stuff [19:06] Tobsn: i broke their system daily [19:06] Tobsn: down to a point where i couldnt edit my server over the iphone app [19:06] Tobsn: the app just crashed [19:06] baudehlo1: jeez. [19:07] baudehlo1: all these cloud hosting services seem like a great idea, until they aren't. [19:07] Tobsn: took them around a month to get everything stable and now its running smooth (that was end of 2009 when i wrecked their shit) [19:07] indiefan2a1 has joined the channel [19:07] maushu has joined the channel [19:07] baudehlo1: we have about 6000 servers and I can't remember the last time we had a major outage. [19:07] zcopley has joined the channel [19:07] baudehlo1: actually I can, when TAT-14 got cut. [19:07] ilya: tjholowaychuk: yay, worked! [19:08] ilya: awesome, thanks! [19:08] hwinkel has joined the channel [19:08] tjholowaychuk: np [19:08] raynos: Am I the only one who self hosts from a physical box? I guess I should get one of those clouds? [19:09] arpegius has joined the channel [19:09] baudehlo1: tjholowaychuk: hey how do I break out of a typo in cluster's repl? [19:09] duncanbeevers: raynos: What do you do when you have to close your laptop? [19:10] raynos: ducanbeevers: take the server down. [19:10] baudehlo1: backspace fails, and then I get "..." and can't terminate the line without disconnecting. [19:10] MatthewS has joined the channel [19:10] bojicas has joined the channel [19:10] raynos: That's why I'm going to buy a plug server. As long as I can fix my memory leaks it should be enough. Just need to make sure I dont get popular. [19:10] tjholowaychuk: baudehlo1: what does it do? just hang? [19:11] baudehlo1: not really hang... [19:11] baudehlo1: I can keep pressing enter. [19:11] baudehlo1: but I want it to go back to the prompt. [19:11] baudehlo1: only way I can do it is ctrl-] and quit and start over. [19:11] Astro has joined the channel [19:11] tjholowaychuk: hmm not sure, i'll have to try [19:11] baudehlo1: just wondered if I was missing some magic incantation. [19:12] baudehlo1: also supporting ctrl-d would be nice. [19:12] tjholowaychuk: wonder if it does that for a regular node repl [19:12] tjholowaychuk: (regular local socket repl that is) [19:12] baudehlo1: no, in the node repl I have full readline support [19:12] baudehlo1: oh... maybe. [19:12] tjholowaychuk: but over telnet? [19:12] baudehlo1: dunno. [19:12] baudehlo1: didn't try [19:13] tjholowaychuk: I doubt it's just cluster [19:13] baudehlo1: didn't know you used a standard module. [19:13] tjholowaychuk: yeah pretty sure i am [19:13] baudehlo1: nm then. [19:14] tjholowaychuk: there are few things that dont work quite right over telnet for some reason [19:14] baudehlo1: although a quit() method would be nice too. [19:14] tjholowaychuk: havent really looked into it [19:14] tjholowaychuk: haha eyah [19:14] tjholowaychuk: .exit [19:14] tjholowaychuk: is lame [19:14] baudehlo1: oh does .exit work? [19:14] tjholowaychuk: i always type quit() too and break shit [19:14] tjholowaychuk: yeah [19:14] tjholowaychuk: that is node's thing [19:14] tjholowaychuk: i dont like it though [19:14] baudehlo1: put that in the help() [19:14] bingomanatee has joined the channel [19:14] zilch has joined the channel [19:14] baudehlo1: no, ctrl-d would make more sense. [19:15] baudehlo1: anyhow, enough bitching, I should send patches. [19:15] ilya: anybody experiencing issues with FB connect? [19:16] JusticeFries has joined the channel [19:18] CIA-72: node: 03isaacs 07master * r0b3ecc0 10/ (doc/api/repl.markdown lib/repl.js): [19:18] CIA-72: node: Close #955 Change ^C handling in REPL [19:18] CIA-72: node: Press with text on the line: Cancels [19:18] CIA-72: node: Press on a bare line: Print a message [19:18] CIA-72: node: Press again on a bare line: Exit - http://bit.ly/fpTCqP [19:19] varioust has joined the channel [19:20] country_ has joined the channel [19:20] sdecastelberg has joined the channel [19:21] CIA-72: node: 03Wade Simmons 07v0.4 * rd00739c 10/ lib/repl.js : make it possible to do repl.start('', stream) - http://bit.ly/gu36Yj [19:21] gattuso has joined the channel [19:21] wadey: hooray :) [19:21] varioust_ has joined the channel [19:24] hvgotcodes: is it standard practice to put all event handling in another file? [19:25] Gruni has joined the channel [19:25] stefounet has joined the channel [19:26] Rubikzube has joined the channel [19:26] johnciacia_ has joined the channel [19:27] CIA-72: node: 03Tim Baumann 07v0.4 * r6c7c4ae 10/ lib/repl.js : Don't overwrite an user-specified repl.writer - http://bit.ly/hR02zI [19:27] Rubikzube: Does anyone know how to get nodeunit to print out the messages associated with assertions when running from the command line? [19:27] raynos: hvgotcodes: depends how big your project is. I would place event handling near the data that emits and handles the events. If its a complex system I would write a generic wrapper around the event code. [19:27] tmpvar has joined the channel [19:27] hvgotcodes: raynos: what do you mean by that? also simple question, i have an method that emits an event under an if -- i can return after that emit to not do the rest of the method right? [19:28] BrianTheCoder has joined the channel [19:28] timmywil has joined the channel [19:28] rfay has joined the channel [19:29] raynos: hvgotcodes: yes you can return after the emit. [19:29] hvgotcodes: also, if in my request handler i emit events that start things happening, is it bad to pass the response to the handlers so they can write data when the events come back? [19:30] raynos: Well It's a bit difficult to see how you can structure your event based code without any knowledge of your code ;) [19:30] raynos: No having your response in an event handler is fine. [19:31] raynos: Emitting your response object down the event emitter might not be clever though [19:31] hvgotcodes: raynos: what might be a better idea? [19:32] hvgotcodes: basically i am handling a request that can cause many things to happen [19:32] raynos: depends on what the code is doing. Show me a gist or something. [19:32] hvgotcodes: so it might run a process and return the result [19:32] hvgotcodes: or it might run a process, which when done starts another process, and then returns the result [19:32] hvgotcodes: etc [19:32] hvgotcodes: raynos: ok will gist it in a minute [19:33] raynos: hvgotcodes: http://jsfiddle.net/yxegP/ [19:33] varioust has joined the channel [19:34] c4milo: tjholowaychuk: hey! [19:34] tjholowaychuk: hey [19:35] micheil has joined the channel [19:35] Me1000 has joined the channel [19:35] hvgotcodes: raynos: https://gist.github.com/c4fc030410c2457ddf08 [19:37] raynos: hvgotcodes: makes me wonder where the response is going. why does it have to go down an event emitter rather then being passed to a function directly. [19:38] techwraith has joined the channel [19:38] hvgotcodes: raynos: i was thinking because refreshing the source might take a while [19:38] raynos: event emitters are blocking [19:38] hvgotcodes: oh [19:38] raynos: Use streams or sub processes. [19:39] hvgotcodes: so no diff between events and just calling the functions [19:39] hvgotcodes: raynos: im not that advanced [19:39] hvgotcodes: documentation? [19:39] mnemonic: hi [19:39] kmiyashiro has joined the channel [19:39] arpegius has joined the channel [19:40] stefounet has joined the channel [19:40] raynos: hvgotcodes: http://nodejs.org/docs/v0.4.6/api/all.html#child_process.spawn and tcp sockets. [19:40] hvgotcodes: raynos: the refresh and the sha1 will definitely be invoked via exec [19:40] hvgotcodes: if that is what you mean [19:40] raynos: All javascript computation is single threaded and blocking. if you want to do heavy computation pass to another process. [19:41] hvgotcodes: raynos: are tcp sockets for http? [19:41] raynos: A general question, is a web worker like API coming in the near future or far future? [19:41] raynos: hvgotcodes: tcp sockets are for tcp. HTTP is a layer ontop of TCP. TCP is just bi-directional socket. [19:42] kawaz_air has joined the channel [19:42] raynos: use net.createServer and net.createConnection. You'll need to start your process as a seperate node program. [19:44] llkazu: raynos, there's a web worker module on there [19:44] patcito has joined the channel [19:44] llkazu: https://github.com/pgriess/node-webworker [19:44] kriszyp has joined the channel [19:44] llkazu: its not bad [19:45] hvgotcodes: raynos: cant i use response.write? [19:45] Aria has joined the channel [19:45] hvgotcodes: over and over [19:45] cryptix has joined the channel [19:45] hvgotcodes: and then end whent the final step is done [19:45] raynos: hvgotcodes: yes you can it will just block. [19:45] bingomanatee has joined the channel [19:45] hvgotcodes: raynos: you mean the entire node server will block [19:46] raynos: llkazu: I heard rumours nodejs was going to give us sub processes through a webworker API. I know there are 3rd party application that will do this [19:46] NuckingFuts has joined the channel [19:46] raynos: hvgotcodes: Any time any javascript runs your nodejs server is blocking. That's why all IO is non-blocking. [19:46] llkazu: ya, its supposed to come in a future release. :-/ I'm betting far. [19:46] wink_: the webworker stuff does in fact spawn extra processes [19:46] hvgotcodes: raynos, right but everything I am doing that takes a while is a call to exec [19:46] wink_: and its awesome [19:46] cryptix has joined the channel [19:47] hvgotcodes: so that is asynch right? [19:47] raynos: hvgotcodes: exec probably calls a childprocess. [19:47] hvgotcodes: in the callbacks, ill write 'step 1 done', then 'step 2 done' and each exec comes back [19:47] raynos: Yes that's fine. [19:47] hvgotcodes: so the connection will stay open, but the hard work will be done asynchronously [19:47] hvgotcodes: right? [19:47] raynos: exec should be non-blocking unless your using poorly written 3rd party code [19:47] robmason has joined the channel [19:48] hvgotcodes: ok -- so now with all this, should i be using events or just methods to start the asynch stuff? [19:48] hvgotcodes: my intuition tells me it doesnt matter [19:48] cryptix1 has joined the channel [19:49] cryptix has joined the channel [19:50] raynos: doesnt really matter [19:50] raynos: events are useful if multiple or 0 things bind to it. [19:50] hvgotcodes: i dont have to define a function before it is used right? in the same file [19:51] raynos: use events when you dont care what listens to events [19:51] raynos: If one thing listens to your event then just call it directly [19:51] raynos: No. [19:51] raynos: function declaration are hoisted to the top. the interpreter parser twice. [19:51] hvgotcodes: raynos: you mean if i only have on thing with a listener, a function is just as good [19:51] tbranyen: raynos: if you don't bind to an error event and it emits it'll throw an exception [19:51] raynos: Once to get variables and the second time to execute [19:52] raynos: tbranyen: I didn't know that. [19:52] tbranyen: so not always good for 0 things bound [19:52] tbranyen: in that case [19:52] tbranyen: yea me neither until i read the docs on it heh [19:52] icebox has joined the channel [19:52] isaacs: hey, wow, i just realized that this AWS fiasco is hitting npm, through couchone... that sucks. [19:52] isaacs: either that, or my network is just hosed atm [19:52] isaacs: oh, now it's working fine. yep, probably my network [19:52] wink_: what a trainwreck for the amazon engineers today [19:52] tbranyen: :( [19:53] raynos: tbranyen: https://github.com/joyent/node/blob/master/lib/events.js#L40 it does throw it. [19:53] mikeal has joined the channel [19:53] tbranyen: raynos: ? i know i just said that [19:54] tbranyen: heh [19:54] raynos: tbranyen: I needed to read the source to confirm it! I like to see it. [19:54] jackbach has joined the channel [19:54] akraut has joined the channel [19:54] akraut has left the channel [19:54] jackbach: hi there! [19:55] Country has joined the channel [19:55] raynos: Hey jack. [19:55] stefounet has joined the channel [19:55] jackbach: anyone using redis? which client do you guys use? [19:55] jackbach: hey raynos! [19:56] tjgillies: #haskell is hating on node right now [19:56] techwraith: node_redis :) [19:56] tjgillies: i think its mostly thinly veiled jealousy [19:57] techwraith: tj: lol [19:57] jackbach: techwraith, is node_redis the most active? or why did u choose this one? [19:57] raynos: haskell is a pretty awesome language, whats the be jealous of. [19:57] techwraith: Most active by far I think [19:57] jonaslund: functional people can be fanatics [19:57] tbranyen: ha i get so much hate in another channel with a haskell dev [19:57] raynos: jonaslund: js is functional. [19:57] jackbach: techwraith ok thanks :) [19:58] tbranyen: haskell looks interesting and very confusing [19:58] gattuso has joined the channel [19:58] raynos: haskell looks confusing, Ill stick to C-LISP [19:58] Rubikzube_ has joined the channel [19:58] raynos: It's only what 10gigs these days? [19:58] steveklabnik: learn you a haskell [19:58] steveklabnik: it's gooood [19:59] jacobolus has joined the channel [19:59] hvgotcodes: raynos: so if i change the code i should you, but used functions, i still have handlers that will call those functions for the exec calls -- will that be a problem? [19:59] ckknight has joined the channel [19:59] raynos: shouldn't be a problem. [19:59] hvgotcodes: cool [19:59] ckknight: hey beautiful people [20:00] hvgotcodes: thanx -- ill let you know how this works [20:00] tjgillies: raynos: clisp is sooo slooow, SBCL ftw ;) [20:00] mikedeboer has joined the channel [20:00] bingomanatee has joined the channel [20:00] raynos: I havn't got a good scheme interpreter of choice yet. [20:00] ckknight has joined the channel [20:01] sjmikem has joined the channel [20:02] raynos: hvgotcodes: I would pass the callback to the function and keep the response handling code visible. Basically your saying do some computation then run _my_ code when your done. Keeps it more readable. I don't have to follow the response and figure out where its going [20:02] aheckmann has joined the channel [20:02] tjgillies: raynos: http://www.winestockwebdesign.com/Essays/Lisp_Curse.html [20:03] hvgotcodes: raynos: good idea [20:03] piscisaureus_ has joined the channel [20:05] RusAlex has left the channel [20:06] demastrie1 has joined the channel [20:06] __tosh has joined the channel [20:06] demastrie1 has left the channel [20:06] eventi has left the channel [20:07] jtrudeau has joined the channel [20:08] karboh has joined the channel [20:09] sunblush has joined the channel [20:09] eee_c1 has joined the channel [20:09] raynos: Does anyone have a good article on identifying memory leaks in node? [20:09] arpegius has joined the channel [20:10] devinus has joined the channel [20:11] Tobsn: identifying? [20:12] tbranyen: raynos: use valgrind or xcode instruments? [20:12] raynos: identifying as in from source code. [20:12] tbranyen: huh [20:12] raynos: I want to be able to look at a bunch of closures and see the memory leaks. [20:12] raynos: Basically I dont know how clever the V8 GC is. [20:13] path[l] has joined the channel [20:13] Xano has joined the channel [20:17] ckknight: raynos: it's only somewhat clever. If a closure is created (and stored) that _can_ have a reference to a large piece of memory that you meant to just destroy, you'll probably want to null it out appropriately. [20:17] JusticeFries has joined the channel [20:18] jga023 has joined the channel [20:18] sorens3n has joined the channel [20:18] NuckingFuts has joined the channel [20:19] path[l]: could someone help me with these questions? http://stackoverflow.com/questions/5699807/multiple-writes-on-a-writestream-in-node-js . I've asked on the node.js google group too, but no luck so far [20:19] matjas has joined the channel [20:19] ilya has joined the channel [20:19] pietern has joined the channel [20:20] raynos: path[l]: can you gist a link to node-dirty code [20:20] pquerna: path[l]: re: 1), it could be more efficient, with how writes are done in a seprate thread pool [20:20] pquerna: path[l]: so, yes, more switching with tons of tiny writes, will not be efficient as large block writes [20:20] path[l]: raynos: sure thing. it's just a single file anyway. [20:21] pquerna: path[l]: re: 2, its the former, a drain event will be emitted when the whole file queue is gone [20:21] pquerna: path[l]: re: 3, i believ eon an error will be emitted in that case, once error is emitted, generally, for a file IO operation, I wouldn't expect being able to do anything except force close it [20:21] ilya: nodeunit's test.throws doesn't work for me for some reason. It just dumps the stack in console and doesn't catch the error. [20:22] kriszyp has joined the channel [20:22] arlolra has joined the channel [20:23] path[l]: raynos: pquerna: thanks a lot. One follow up question [20:23] path[l]: err [20:23] path[l]: raynos: https://github.com/felixge/node-dirty/blob/master/lib/dirty/dirty.js [20:23] path[l]: pquerna: thanks a lot. One follow up question about 1. [20:23] stefounet has left the channel [20:23] path[l]: I understand why bundling writes helps. But why not just one big bundle? [20:24] ezmobius has joined the channel [20:24] raynos: path[l]: multi threading. [20:25] raynos: so it can scale. [20:25] raynos: I assume the underlying file IO is multi threaded. [20:26] path[l]: oh I see [20:26] path[l]: hmm [20:26] path[l]: I wasnt expecting that [20:26] path[l]: but the writes would have to be sequential though [20:26] methym has joined the channel [20:27] zylo has joined the channel [20:27] path[l]: they cant go out of order [20:27] raynos: That's true. That wouldn't make sense. [20:28] gattuso has joined the channel [20:29] raynos: I'd have to go read the .write sourcecode. [20:29] path[l]: ah ok [20:29] demastrie has joined the channel [20:29] hvgotcodes: does response have a flush on it? [20:30] hvgotcodes: i am doing multiple writes, but they are not showing up [20:30] FireFly|n900 has joined the channel [20:30] hvgotcodes: the request just times out [20:30] raynos: path[l]: its more efficient to start writing earlier then later [20:30] demastrie has left the channel [20:30] path[l]: and about the last question I had. pquerna pointed out that once error is emitted, I wouldnt be able to do anything on the stream. this suits me fine. But am I also guaranteed to not have a drain event fire? [20:30] path[l]: raynos: ok, so I see why it might be better to potentially start off at some size [20:31] country_ has joined the channel [20:32] eventi has joined the channel [20:33] hvgotcodes: hmm putting a response end causes the stuff to be written, but all at once, which is not what we wanted [20:33] mbrevoor_ has joined the channel [20:33] Venom_X has joined the channel [20:34] bradleymeck has joined the channel [20:34] raynos: hvgotcodes: you want `res.writeContinue()` [20:34] hvgotcodes: raynos: yeah i just saw that [20:34] hvgotcodes: will try [20:34] raynos: that might be asking the client to send the request body though. [20:35] hvgotcodes: raynos: hmm it doesnt take an argument -- not sure how to use it [20:35] boaz has joined the channel [20:35] raynos: I dont think you want that actaully. [20:35] hvgotcodes: might have to put a header on the response to indicate that the response is broken up [20:36] eee_c has joined the channel [20:36] raynos: Try testing with curl [20:36] raynos: it might be the browser not support HTTP 1.1 [20:37] raynos: path[l]: I left an answer btw. [20:37] path[l]: thanks raynos :) [20:38] mattly has joined the channel [20:38] raynos: path[l]: I came here to escape SO. It's addicting. [20:38] EM03: question ..... [20:38] path[l]: haha [20:38] EM03: does npm always just put the modules in the current dir in node_modules? [20:39] ckknight: raynos: let the rest of us max out our SO rep [20:39] isaacs: EM03: not "just" that, but mostly that, yeah :) [20:39] EM03: is that how it should be? [20:39] devinus has left the channel [20:39] isaacs: EM03: with the -g flag, it installs into /usr/local/lib/node_modules [20:39] isaacs: EM03: yeah, that's on purpose [20:39] isaacs: ACTION <-- npm author [20:39] raynos: ckknight: I'm pretty close to max. It's all yours. [20:39] EM03: i man for every project i need to re install everything? [20:39] aleksey has joined the channel [20:39] ckknight: lol, raynos [20:39] EM03: where should I put that dir? [20:39] isaacs: EM03: yep. if you require() something, it should be installed in that project. [20:40] hvgotcodes: raynos: its chrome, it probably supports it [20:40] arpegius has joined the channel [20:40] EM03: this is an express project [20:40] raynos: ckknight: I've caught that 10k rush. I'll slow down again once I hit 10k. [20:40] isaacs: EM03: if you have tremendous hundreds of express projects, and want to have them all share the same express install, then you can do `npm link express` in each of them [20:40] EM03: so express somedir ....i should put the module dir in that dir? [20:41] EM03: i installed express with -g because i wanted the express command on my path [20:41] isaacs: EM03: ok [20:41] isaacs: so now you also want to require() express, right? [20:41] badslug has joined the channel [20:41] isaacs: EM03: cd my-express-project; npm link express [20:42] EM03: well i was installing some other stuff [20:42] EM03: jade [20:42] EM03: template engine [20:42] a|i has joined the channel [20:42] a|i: when running 'npm bundle', do I have to manually create package.json? [20:43] stalled has joined the channel [20:43] robmason has joined the channel [20:44] isaacs: EM03: sure sure [20:44] EM03: i did -g with express did I do a wrong thing? [20:44] isaacs: EM03: it's really more isolated and better in general to install things locally [20:44] isaacs: EM03: but if you install them globally, then that can be more convenient in some cases. [20:45] isaacs: even though it's a bit sloppier [20:45] EM03: well i needed express on my path [20:45] isaacs: sure [20:45] FireFly|n900 has joined the channel [20:45] isaacs: you can install it in both places :) [20:45] EM03: so I could have an express command [20:45] isaacs: it's not a very big program :) [20:45] EM03: ah [20:45] isaacs: npm install express -g ; npm install express [20:45] EM03: that way require will still use local but i have my global command? [20:46] isaacs: or you could add /usr/local/lib/node_modules to your NODE_PATH environment var. [20:46] isaacs: and just install everything globally that you use [20:46] isaacs: personally, i find that a bit of a sloppy approach, but you can totally do it that way [20:46] isaacs: a|i: yes [20:46] kmiyashiro has joined the channel [20:47] isaacs: a|i: if you like npm bundle, get npm 1.0. instructions on the github readme. it bundles by default (see my conv with EM03 ^) [20:47] a|i: isaacs: thanks. [20:47] raynos: isaacs: awesome job on npm. I love it! [20:47] isaacs: :) [20:48] a|i: isaacs: I don't really want to package a module, just want to make node_modules/ to make cloudfoundry happy. [20:48] DoNaLd`: tjholowaychuk: hi .. thank you for your quick implementation of issue #3 :) .. but it is me not clear from you example, how can i use it .. this require implementation [20:49] isaacs: a|i: package.json isn't just for things that get published. [20:49] tjholowaychuk: DoNaLd`: it might not solve what you are doing [20:49] tjholowaychuk: i dont really understand what the issue is [20:49] tjholowaychuk: but it was something i needed too [20:49] a|i: isaacs: I see. [20:49] monteslu has joined the channel [20:49] isaacs: a|i: it just defines a node program's entry points and dependencies in a consistent way [20:50] isaacs: a|i: think of it as a combination of gemfile and gemspec. [20:50] a|i: isaacs: at the same time, it contains all the author's name and stidd which is not related. I wish it could be like rails Gemfile. [20:50] a|i: stuff* [20:50] isaacs: a|i: that stuff is all optional, though [20:50] EM03: isaacs: so just put it in both locations? [20:50] EM03: still a bit confused hehe [20:51] bartt has joined the channel [20:51] isaacs: EM03: sure. that's the simplest way. [20:51] a|i: isaacs: I think it would be great to not to mix the conecpts of packaging as a module, and the app dependencies. [20:51] isaacs: EM03: a) put express in both places. b) install express globally, then "npm link express" in your projects. b) add the global root to your NODE_PATH environment var. [20:52] EM03: the global root already works for me out of box on my path [20:52] isaacs: a|i: "packaging as a module" is just making a tarball with your folder and pacakge.json file [20:52] sunblush has joined the channel [20:52] techwraith: isaacs: two b's? [20:52] cloudhead has joined the channel [20:52] isaacs: EM03: then it sounds like you're good :) [20:52] isaacs: techwraith: two b's? [20:53] mediacoder has joined the channel [20:53] a|i: isaacs: sure, but the purpose is different. it's like 'rails bundle' doesn't really make a gem, it only compiles the deps for your app. [20:53] piscisaureus has joined the channel [20:53] isaacs: a|i: the node/npm "package" model is a bit simpler, i think [20:54] isaacs: a "package" is just a folder with a package.json file, or a tarball of the sam. [20:54] isaacs: *same [20:54] a|i: isaacs: I agree. [20:54] DoNaLd`: tjholowaychuk: ok :) i will try it explain again, i have app.js .. in this file i create my new function with name my_function .. from this app.js a call index.ejs file .. and in his index.ejs file i have included jquery.js file .. and i will use this defined my_function in this jquery.js file [20:55] tjholowaychuk: DoNaLd`: if you are not using that function on the server-side as well as the client-side why not just serve it in a regular public/foo.js file? [20:55] SvenDowideit has joined the channel [20:55] raynos: donald you can't call server side functions from the client [20:55] hvgotcodes: raynos: im utterly stumped on how to stream text back to the browser as it becomes available [20:55] raynos: not easily / straightforwardly anyway [20:56] isaacs: a|i: people sometimes get a bit hung up on the words, i think. "Oh, but this isn't a 'packaged' module, really." [20:56] tjholowaychuk: raynos: with express-expose you can :D [20:56] raynos: hvgotcodes: let me hack it around and see if I cna fix it. [20:56] tjholowaychuk: but it's not RPC [20:56] tjholowaychuk: so you are limited [20:56] isaacs: a|i: my response: "It's one file, and it's json, which is about the easiest format in the world. Srsly. Get over it." [20:56] hvgotcodes: raynos: cool [20:56] hvgotcodes: thanx [20:57] raynos: donald: you can use something like now.js for RPC. [20:57] a|i: isaacs: I think for bundling an app, we could have a json file which is a subset of package.js. something that only the value of "dependencies" goes there. [20:58] isaacs: a|i: is it really that hard to give it a name and version, too? [20:58] isaacs: a|i: maybe `npm init` can help [20:58] kmiyashiro: tjholowaychuk: Can you use normal js in jade files? [20:58] isaacs: a|i: all that's required is name and version. [20:58] kmiyashiro: like local.var.toLowerCase() [20:59] tjholowaychuk: kmiyashiro: yeah [20:59] eb4890 has joined the channel [20:59] DoNaLd`: tjholowaychuk: raynos . sorry .. i cannot imagine how .. i need see some example :( [20:59] SubStack: ACTION puts some xml strings in isaacs's json [20:59] kmiyashiro: hm, doesn't seem to be working for me [20:59] a|i: isaacs: all I'm saying is that, I think bundling an app is a subset of bundling a module. [20:59] tjholowaychuk: kmiyashiro: you might be doing something wrong as far as which locals are available [20:59] tjholowaychuk: we have hundreds of jade templates [20:59] isaacs: a|i: "app", "module", whatver. they're all just programs. [20:59] raynos: donald: http://nowjs.com/ check out their video [20:59] tjholowaychuk: so it's definitely js expressions :p [20:59] isaacs: a|i: packaging a program = adding one file to the root of it [21:00] brianc: tjholowaychuk: jade in the browser? Even IE6? I see on the readme it says it has clientside support, but then I hear things...wispers on the wind...about jade not running client side [21:00] kmiyashiro: oh.. nm [21:00] a|i: isaacs: the _purpose_ is different. [21:00] constantx_ has joined the channel [21:00] isaacs: a|i: this might be helpful: http://howtonode.org/how-to-module [21:00] kmiyashiro: was using #{varname} instead of just varname when referencing it [21:00] isaacs: a|i: but a thing does not have to be just one thing [21:00] isaacs: a|i: is express an "app" or a "module" or a "utility"? [21:00] tjholowaychuk: brianc: probably not IE, I dont personally ever touch IE so I haven't put effort into that [21:00] tjholowaychuk: brianc: probably a few es5 specifics still in there too [21:01] isaacs: a|i: it has a bin, and a bunch of require()able stuff [21:01] dshaw_ has joined the channel [21:01] isaacs: it's a collection of modules. [21:01] isaacs: but whatever. it's a folder with a package.json. that's it. [21:01] mnutt has joined the channel [21:01] isaacs: that's all npm or node care about [21:01] tjholowaychuk: kmiyashiro: #{} escapes, !{} does not, but yeah interpolation should be fine [21:01] brianc: tjholowaychuk: okay...as long as you don't use "properties" most everything else can be worked around. I'll give it a shot one day and send you a ziplock back of the tears I cry if it doesn't work [21:01] DoNaLd`: raynos: ooo .. thank you :) .. I'm going to look at it :> [21:01] a|i: isaacs: the puspose of express is to be used by many people, the purpose of me bundling my app is to keep cloudfoundry informed about deps. cloudfoundry doesn't care who I am or what my github page is. [21:02] isaacs: a|i: the tax is very low :) [21:02] tjholowaychuk: brianc: haha :D [21:02] isaacs: a|i: ok, so don't put those bits of metadata in the package.json file [21:02] a|i: isaacs: let's agree to disagree :) good job on npm! [21:02] isaacs: a|i: you can probably find the creativity to come up with a name and version, though [21:03] isaacs: a|i: rational people actually can't agree to disagree. [21:03] isaacs: a|i: at least one of us is wrong or crazy :) [21:03] isaacs: or the question doesn't matter [21:04] ph^ has joined the channel [21:04] a|i: isaacs: by the way, you might want to update the instructions: curl http://npmjs.org/install.sh | npm_install=rc sh never works on mac and linux, only curl http://npmjs.org/install.sh | sh worked for me [21:05] sorens3n: i'm inclined to agree with isaacs on this one [21:05] a|i: the first command created permission problems [21:05] sorens3n: love npm btw [21:05] bradleymeck: isaacs rational people can, it just takes 1 irrational person in the conversation [21:06] mbrevoort has joined the channel [21:08] raynos: hvgotcodes: I see your problem. I don't know enough about HTTP to solve it. [21:09] hvgotcodes: raynos: whats the issue? [21:09] JusticeFries has joined the channel [21:10] arpegius has joined the channel [21:12] hvgotcodes: raynos: i gotta step out for a while but will be back in an hour [21:12] hvgotcodes: thanx for the help [21:13] techwraith: issacs, a|i: I prefer conversations where both participants are wrong _and_ crazy :) [21:13] a|i: techwraith: I wish I was not busy coding right now :) [21:14] raynos: techwraith: those are the best :) [21:14] raynos: ali: I wish I was busy coding right now :( [21:14] sholmes has joined the channel [21:14] a|i: raynos: here is an idea to code: can node push video/audio? [21:14] indiefan2a has joined the channel [21:14] raynos: ali: as raw data yes. [21:15] a|i: I hate flash media server, can node replace it please? [21:15] techwraith: I wish amazon wasn't down and breaking heroku who in turn is breaking zencoder, which in turn doesn't allow me to code a progress bar. [21:15] reid has joined the channel [21:15] raynos: Can it stream it? That's hard. Does it need to work outside html5 ? [21:15] raynos: ali: do you need to support non html5 browsers? [21:15] a|i: raynos: yes, probably something like wowza. [21:15] Ori_P has joined the channel [21:15] sholmes: How do I use this Akshell thing? [21:16] sholmes: I know one of the developers was here at one time. [21:16] raynos: ali: non html5 browsers require flash. Then you might aswell use a flash based solution [21:17] a|i: raynos: the problem is live video, I don't think if there is a full html5 support for live video [21:18] a|i: you can receive live video in html5, but not send it. [21:18] raynos: ali: I'd have to read the html5 video specification. I'll get back to you on that [21:18] a|i: raynos: great. [21:18] k1ttty has joined the channel [21:19] Know1edge has joined the channel [21:20] Know1edge has left the channel [21:20] azend: I think the browser can now read html 5 video streams regardless of the file length [21:20] azend: I don't think it can send though [21:21] a|i: there is no access to cam/mic from html5. [21:21] kmiyashiro: tjholowaychuk: no way to use escaped vars in attributes? input(type: 'submit', id: #{method.MethodName}) [21:21] tjholowaychuk: kmiyashiro: they are escaped by default [21:22] kmiyashiro: oh [21:22] tjholowaychuk: kmiyashiro: input(type: 'submit', id: method.MethodName) [21:22] piscisaureus has joined the channel [21:22] kmiyashiro: so #{} is just for using vars in the content? [21:22] azend: http://slides.html5rocks.com/#video-audio [21:22] tjholowaychuk: kmiyashiro: yeah [21:23] raynos: aji: yes html5 can receive but it can't send video feeds to the server. [21:23] raynos: you would need a firefox/chrome extension to manage this. Or hackery. [21:23] mscdex: you could always do live video frame by frame using xhr with multipart/x-mixed-replace [21:23] mscdex: :P [21:24] a|i: raynos: it doesn't matter, we can always use a flash client to send data, and push it by http streaming, which is supported by html5 and flash clients. [21:25] a|i: does anyone know why socketio clientside swf so huge? [21:26] fairwinds has joined the channel [21:27] mscdex: a|i: https://github.com/gimite/web-socket-js [21:28] sh1mmer: is there an obvious way I'm missing to get the socket from a net.Server? I trying to avoid having to do process.binding('net') to get access to bind() to create bound sockets [21:28] eb4890 has joined the channel [21:29] iFire has joined the channel [21:29] iFire has joined the channel [21:29] sjmikem has left the channel [21:29] raynos: ali: http://www.whatwg.org/specs/web-apps/current-work/complete/#devices [21:30] a|i: mscdex: wow, I think it's that crypto lib: https://github.com/gimite/web-socket-js/blob/master/flash-src/com/hurlant/crypto/cert/MozillaRootCertificates.as [21:31] raynos: ali: wait a second. That's bigger then I thought let me narrow down the html5 webcam stuff. Its got to be somewhere [21:31] a|i: raynos: wondering about the same thing [21:31] zivester has joined the channel [21:32] pengwynn has joined the channel [21:32] ryanj has joined the channel [21:32] raynos: ali: http://ohtml5.com/search/html5-webcam-demo/ keep that around. If there server doesnt die the demo might work [21:33] mscdex: sh1mmer: well, you could get at the fd i suppose and make a socket with that fd [21:33] sh1mmer: well that's kind of the goal [21:33] a|i: raynos: nope, it's dead. [21:33] sh1mmer: mscdex: passing fds around without having to bind net [21:33] mscdex: server.fd [21:34] stidged has joined the channel [21:35] sh1mmer: mscdex: I don't see that property [21:35] mscdex: it's used in the Server code in net.js [21:35] mscdex: :S [21:35] sh1mmer: I'll poke around some more [21:36] raynos: ali: http://www.whatwg.org/specs/web-apps/current-work/complete/video-conferencing-and-peer-to-peer-communication.html#video-conferencing-and-peer-to-peer-communication [21:36] stidged has joined the channel [21:36] raynos: video conferencing is what you want. Doubt its supported anywhere. Go check minefield, chrome-dev or opera. [21:36] sh1mmer: mscdex: I'm an idiot. have to bind with listen() first. [21:37] sveimac has joined the channel [21:37] sh1mmer: ACTION looks for more caffine [21:37] mscdex: oh [21:37] raynos: ali: http://my.opera.com/core/blog/2011/03/23/webcam-orientation-preview looks like opera are on the ball [21:37] stidged: does anyone know if nodejs works one a shared server :/ [21:38] ckknight: stidged: yes, I use nodester which has about 500 apps running on one EC2 instance [21:38] ckknight: that number might be an outright fabrication, but it sounds right. [21:38] a|i: raynos: I think using flash as data input is much more practical, these specs would not be implemented for a long time, and when they are implemented, there is this damn internet explorer. [21:38] raynos: ali: but we hate flash, right? [21:38] mikeal has joined the channel [21:39] raynos: Yes its practical but you can limit yourself to only opera _today_ and use pure html5 :). [21:39] mscdex: ew opera [21:39] mscdex: :p [21:39] stidged: caus I want to install this app, which req notejs, but it clearly states that you need a dedicated/VPS server :( [21:39] a|i: raynos: just use it at the clientside for input, then push it as html5 or whatever you like. rmember 1 person broadcasts, 100's watch. [21:39] raynos: opera is great for being cutting edge with web standards [21:39] mscdex: not cutting edge with everything [21:39] mscdex: heh [21:40] raynos: Whats wrong with opera 11? [21:40] thomblake has left the channel [21:40] arpegius has joined the channel [21:41] JimBastard has joined the channel [21:41] mscdex: i've ran into several issues with opera in the past with regards to proper support for various things [21:41] mscdex: i usually just say screw it and move on [21:41] mscdex: :P [21:42] http402 has joined the channel [21:42] mscdex: although apparently it took them until 11.x to get things right [21:42] mscdex: like websockets and sse [21:42] mscdex: :S [21:42] eldar has joined the channel [21:43] mscdex: and i don't think multipart/x-mixed-replace works on opera [21:43] mscdex: even with 11 [21:44] qFxo has joined the channel [21:44] stalled has joined the channel [21:46] JimBastard: I'm going to tweet @Chamillionaire everyday until he acknowledges node.js and the node.js rap [21:46] JimBastard: Try and stop me [21:47] blueadept: node.js rap? [21:47] mscdex: what if he's not digging async? [21:47] blueadept: look don't make node any more popular than it needs to be, then everyone will be doing node [21:48] dgathright has joined the channel [21:48] jeromegn has joined the channel [21:49] asdfsafdsa: why is that bad? [21:49] JimBastard_ has joined the channel [21:49] JimBastard_: oops [21:49] raynos: asdfsafdsa: yes its a big problem. [21:50] raynos: If everyone starts doing node.js then well get back node.js code everywhere like we did with javascript. [21:50] indiefan2a1 has joined the channel [21:50] stride: undefined=1; [21:51] davidsklar has joined the channel [21:53] jesusabdullah: get back node.js code? What? [21:53] raynos: bad* [21:53] JimBastard_: raynos: its okay, it will be 10x worse then the worst PHP spaghetti you've ever seen [21:53] JimBastard_: then people like us well get big bucks to fix it [21:54] Country has joined the channel [21:54] JimBastard_: if you thought poorly written procedural PHP was bad! [21:54] jspiros has joined the channel [21:54] raynos: JimBastard_: Unless they throw node away and start from scratch in php [21:54] JimBastard_: wait till you see async soup! [21:54] ckknight: node.js has a certain barrier to entry. It has to look fashionable and it has to perform enough for people to want it, but it has to be challenging enough so that not every Joe Schmoe can do it well [21:54] eee_c has joined the channel [21:54] JimBastard_: ckknight: Aye, that's a good point too. [21:54] ckknight: :P [21:54] ckknight: granted, that mentality can create a walled garden [21:54] raynos: ckknight: I hope so. If I find node.js hard then it's either not easy or I'm a Joe Schmoe [21:54] caolanm has joined the channel [21:54] ckknight: which has its own ups and downs [21:55] ckknight: it's okay, raynos, clearly everyone is just equally inferior to me [21:55] JimBastard_: jesusabdullah: whats your deal with employment. you have a summer gig right? [21:55] raynos: ckknight: code-off. You and me. Mano-a-mano. You've insulted my competence. [21:55] ckknight: raynos: I'm hacking nodester right now, maybe after. [21:55] saikat has joined the channel [21:56] raynos: Am I the only person not employed to write node? [21:56] ckknight: I'm not [21:56] ckknight: I'm looking for a node.js job now, btw [21:56] ckknight: I may have left my grown-up job today [21:56] systemfault: Whoa [21:56] JimBastard_: ckknight: I wouldn't waste your time on that project, its pretty badly written... [21:56] systemfault: That would be a dream job :P [21:57] techwraith: ckknight++ [21:57] v8bot: techwraith has given a beer to ckknight. ckknight now has 1 beers. [21:57] raynos: nodester is down? [21:57] JimBastard_: ckknight: I hear there is a new library coming out from the people who wrote all the core libraries it uses...and its much better... [21:57] ckknight: JimBastard_: yeah, it could be a lot better. Regardless, I want to get this one patch in. [21:57] systemfault: I'm sure no company uses that in Montreal... [21:57] ckknight: JimBastard_: and if and when it comes out, I'll be more than happy to switch [21:57] JimBastard_: ;-) [21:57] ckknight: techwraith: icwatudidthar [21:57] raynos: ckknight++ [21:57] v8bot: ckknight is getting too many beers. Don't let ckknight get drunk! [21:57] ckknight: you don't know me. [21:58] ckknight: oh v8bot, you're the best [21:58] ckknight: ...hic! [21:58] raynos: ckknight: good luck getting a job in node. [21:58] techwraith: I'm not drunk, I'm just buzzed :) [21:58] ckknight: techwraith: but it's a Thursday, and it's 3 PM where you are. [21:58] techwraith: raynos: Are you looking? [21:58] techwraith: With a beer full of fridge, it [21:58] agileguy has joined the channel [21:58] techwraith: ... [21:58] techwraith: lol [21:59] ckknight: techwraith: not just buzzed, methinks [21:59] raynos: techwraith: I plan to get a job in node. Can't at the moment. [21:59] techwraith: No, but really, we have a fridge full of beer here, it's always 5 o'clock ;) [21:59] raynos: techwraith: and you get any work done? [21:59] esundahl has joined the channel [22:00] techwraith: More work than I've done in most of my other jobs combined :) [22:00] raynos: Is that because of the beer? [22:00] ckknight: techwraith: at, well my last job, very little work got done on Fridays, since we went out drinking at 2, where most people were generally challenged to keep up with the boss, who has _way_ too high of an alcohol tolerance [22:00] ckknight: fun, though. [22:00] techwraith: No, it's the awesome people :) [22:00] raynos: techwraith: where do you work? [22:00] techwraith: Yammer, inc. [22:01] techwraith: https://www.yammer.com/jobs if you're interested [22:01] raynos: Ah. Realtime stuff, node's calling. [22:02] flippyhead has joined the channel [22:02] raynos: I'm full time employed at the moment. I might be looking for work in the UK in a few months. [22:02] ckknight: I wish I hadn't bought so much (IRL) stuff. I miss living out of a suitcase and a laptop bag. [22:02] ckknight: now I'm saddled with so much crap [22:03] stonebranch has joined the channel [22:04] raynos: What would people recommend in terms of portfolio building for landing a node job? [22:04] no-gooder has joined the channel [22:04] raynos: As in what should I focus my efforts towards. If anything in particular. [22:04] ckknight: I plan on making shiny things. [22:04] techwraith: Modules up on Github, experience in another node project, that kind of things [22:05] ckknight: and be like - look, shiny, it's running on node! [22:05] raynos: getting into a non one-man node project is going to be interesting. [22:06] ckknight: there's an easy solution for that: split personalities and multiple github accounts [22:06] raynos: are there any other communities apart from github that look good? [22:06] ckknight: "why hello there notCkknight, I see you wanting to join my github project" [22:06] raynos: ckknight: I go for lying and multiple github accounts [22:06] ckknight: raynos: for node.js, github is _where it is at_ [22:07] raynos: ckknight: Oh i've got the github set up. I'm just wondering whether there are any other communities apart from here. [22:08] raynos: I see that node.js on stackoverflow is gathering steam. [22:10] chendrix has joined the channel [22:11] blueadept: those two are pretty much it [22:11] blueadept: and this room [22:11] chendrix: Does anyone know why when I build and install node and npm, some random time later, it no longer shows up as an executable? [22:12] chendrix: I'm installing it on my laptop (Snow Leopard) if that makes a difference [22:12] mnemonic: do you have the reference of a book to learn "good javascript" (not ugly js ...) that would be useful for node/express ? [22:12] raynos: the good parts [22:13] mnemonic: yes the good parts of JS raynos [22:13] raynos: Its a book. [22:13] steveklabnik: mnemonic: it's a book [22:13] mnemonic: ha ok [22:13] steveklabnik: javascript, the good parts. [22:13] raynos: http://www.amazon.co.uk/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742 [22:13] mnemonic: thanks dudes [22:13] AntelopeSalad: http://nodebeginner.org has been a huge help for getting started and understanding some tricky things about js [22:13] mnemonic: thx AntelopeSalad [22:14] raynos has left the channel [22:14] raynos has joined the channel [22:15] chendrix: does no one have any idea about my problem? it's happened to me at least 3 or 4 times now [22:15] raynos: sorry, nope :( [22:15] chendrix: it's an odd issue. I'll come back to my laptop and try $ node and get command not found. and which node gives me nothing, even though my path hasn't changed [22:16] raynos: Do we have any node.js game frameworks in progress before I reinvent the wheel. [22:17] tobias has joined the channel [22:17] ckknight: chendrix: I'd install it, then see what `which node` returns [22:17] chendrix: ckknight, mind if I pm? [22:17] ckknight: sure [22:19] dgathright has joined the channel [22:19] bradleymeck: raynos nothing good [22:20] raynos: bradleymeck: good to hear. I'll start something off. [22:22] kmwallio has joined the channel [22:22] sunblush has joined the channel [22:23] techwraith: raynos: What kind of framework did you have in mind? [22:23] techwraith: I'd like to keep my eye on it if you don't mind :) [22:23] techwraith: Possibly help out if it looks like something I could use for a personal project :) [22:24] stefounet has joined the channel [22:25] stefounet has left the channel [22:25] raynos: techwraith: event based. [22:25] techwraith: raynos: lol, obviously [22:25] techwraith: but what are your plans for it [22:25] raynos: techwraith: once I get it to the tech demo stage I'll show you. [22:26] techwraith: is it an MMO engine? Server side rendering engine? [22:26] techwraith: Just the backend components or front end ones as well? [22:26] raynos: techwraith: A generic game engine. for browsers. [22:26] raynos: I'll ship it with a generic front end component with a rendering engine on SVG. [22:27] techwraith: no webGL? [22:27] techwraith: :P [22:27] raynos: It'll be design for heavy client/server setups with lots of code re-use [22:27] robmason has joined the channel [22:27] raynos: techwraith: then I have to make a 3D demo. I like 2d games. [22:27] hosh_work has joined the channel [22:29] jtrudeau has joined the channel [22:35] davro has joined the channel [22:36] EM03: using express.....i have it installed globally but the things it bought in are local [22:36] demastrie has joined the channel [22:37] EM03: well i guess they are in a node_modules directly inside of the express dir ....is this normal? [22:38] techwraith: issacs: npm usage question ^ [22:38] tjholowaychuk: EM03: yeah that is normal [22:38] isaacs: ACTION meeting [22:38] isaacs: tjholowaychuk++ [22:38] v8bot: isaacs has given a beer to tjholowaychuk. tjholowaychuk now has 24 beers. [22:38] isaacs: yes, normal [22:38] techwraith: :) [22:38] tjholowaychuk: we need an isaac bot [22:38] ircretary has joined the channel [22:38] tjholowaychuk: to parse npm questions [22:38] k1ttty has joined the channel [22:38] isaacs: ACTION is a bot [22:39] raynos: isaacs: intelligent AI ! Let's break him [22:39] demastrie has left the channel [22:40] EM03: tjholowaychuk: so it will put all the depedencies in the thing you want? [22:41] bradleymeck: anyone know if we will get raw sockets or at least ICMP sometime? [22:41] tjholowaychuk: EM03: each module's dependencies are pulled in to ./node_modules [22:41] EM03: when I do local they all go in one dir ...node_modules ....but globally its express and then the things it needs [22:41] tjholowaychuk: EM03: yeah.. that's how dependency resolution works [22:41] tjholowaychuk: it's a recursive process [22:41] tk has joined the channel [22:41] EM03: locally .....node_modules express connect qs ...........globally express (inside express) connect and qs ....locallythey are not in the actual express folder [22:42] EM03: get what I mean here [22:42] raynos: bradleymeck: just write a v8 plugin to expose ICMP. [22:42] raynos: I mean C++ plugin to node.js. [22:43] bradleymeck: raynos source? and does it work on windows? [22:43] raynos: bradleymeck: I mean write your own C++ code to expose ICMP to javascript. If you write it im sure it'll support windows ;) [22:45] zilch has joined the channel [22:46] bradleymeck: snot quite that simple, id have to integrate w/ node's net sockets if i want ICMP to work and doing that would be painful if the socket wasnt raw to start w/. [22:46] shiawuen has joined the channel [22:47] zilch: do we have any module supporting the position object as defined in http://dev.w3.org/geo/api/spec-source.html#position_interface [22:49] perlmonkey2 has joined the channel [22:51] jpld has joined the channel [22:51] cwang has joined the channel [22:51] pastak has joined the channel [22:53] mscdex: zilch: not that i'm aware of [22:53] esundahl has left the channel [22:53] mscdex: bradleymeck: for ping or ? [22:54] wadey: heading over to Joyent for the workup [22:54] wadey: perhaps i'll see a few of you there [22:54] wadey: :) [22:54] dguttman has joined the channel [22:55] FireFly|n900 has joined the channel [22:56] samsonjs has joined the channel [22:56] johnciacia has joined the channel [22:56] FireFly|n900 has joined the channel [22:57] kevliu has joined the channel [22:57] kevliu: hey all! [22:57] kevliu: is there a way to set a timeout on an http client request? [22:58] Casperin has joined the channel [22:59] stagas: kevliu: use setTimeout and req.abort() [22:59] levi501d has joined the channel [23:00] zackattack has joined the channel [23:01] zackattack: Hello. I'm looking to hire a Node.js developer for about one day's work. What's the best way to find such a developer? [23:01] konobi: jobs.nodejs.org ? [23:01] zackattack: Whoa--there's a node.js meetup in san francisco going on RIGHT NOW? [23:02] devrim has joined the channel [23:03] zilch: mscdex, np :) [23:04] stepheneb has joined the channel [23:07] cloudhead has joined the channel [23:07] cloudhea1_ has joined the channel [23:09] dnolen has joined the channel [23:09] malkomalko has joined the channel [23:09] EM03: you have to restart express each and every time you make a change? [23:09] alessio_alex23 has joined the channel [23:10] techwraith: EM03: It's the same as any node app [23:10] Booths has joined the channel [23:10] techwraith: unless you use node-dev or something like it [23:10] EM03: this is my first node app.... [23:10] techwraith: `npm install node-dev` [23:11] techwraith: then use`node-dev app.js` instead of regular node. [23:11] EM03: https://github.com/fgnass/node-dev .....so this? [23:11] esundahl has joined the channel [23:11] EM03: its crazy how popular node.js has gotten [23:11] EM03: crazy if you think about it [23:12] techwraith: yep, that's the one [23:12] EM03: Thanks [23:12] EM03: cause yea some ruby frameworks are like and and man do I hate having to restart manually [23:13] EM03: is v8 just going to get faster and faster? [23:14] EM03: or has it hit a peak? [23:14] techwraith: It's still getting considerably faster [23:14] aho: it's going to get faster for the foreseeable future [23:14] EM03: really? [23:15] EM03: i mean its right now from the benchmarks I see ....its very close to compiled languages [23:15] samsonjs_ has joined the channel [23:15] aho: naaaah :) [23:15] aho: only if you do things like regex [23:15] cbiscardi has joined the channel [23:16] EM03: huh? [23:16] aho: regex centric micro benchmarks [23:16] fairwinds has joined the channel [23:16] EM03: so its not that good performance wise? [23:17] EM03: it looks like the fastest scripting language out there [23:17] isaacs: ACTION back [23:17] techwraith: Oh, it's good, it's just that it can get much faster too [23:17] EM03: ah [23:17] aho: yes, it's fast compared to other scripting languages [23:17] aho: such as perl, python, ruby, or php [23:17] EM03: from the benchmarks it looks faster than erlang [23:18] pengwynn has joined the channel [23:18] aho: but it's not as fast as luajit yet [23:18] tjholowaychuk: that's not really a language specific thing, just the scalability / concurrency model [23:18] aho: or java/scala [23:18] EM03: think it will get there? [23:18] aho: luajit, guess so. java... huuum... dunno :> [23:19] aho: it will probably get close though [23:19] EM03: I think what that team already has done is amazing [23:20] MikhX has joined the channel [23:20] markwubben has joined the channel [23:21] k1ttty has joined the channel [23:23] tedsuo has joined the channel [23:25] gaarf has joined the channel [23:25] jonaslund: one nice thing with Javascript is that it's a relatively "wart-free" language [23:25] tjholowaychuk: i wouldnt say that haha [23:25] jonaslund: tjholowaychuk: well compare it to php f.ex. [23:26] tjholowaychuk: yeah [23:26] tjholowaychuk: i hate classes so i like js in that respect [23:26] jonaslund: ACTION just shudders at trying to make an optimizing compiler for php [23:26] tjholowaychuk: pretty flexible language [23:26] EM03: ACTION loves classes [23:26] ckknight: jonaslund: facebook tried with a PHP to C++ converter [23:26] EM03: like a 10 percent improvement [23:26] EM03: if that [23:26] JusticeFries has joined the channel [23:27] jonaslund: wasn't it more? [23:27] tjholowaychuk: from what i saw it was like a 45% increase or so [23:27] tjholowaychuk: something like that [23:27] EM03: dont think so [23:27] EM03: maybe in some isolated cases but i saw an interview with rasmus where he said 10-15 [23:27] ckknight: classes are an abstraction away from object-oriented programming, EM03. You stick an unneeded concept of "classes" between the data and the business logic. [23:27] tjgillies: whats the best full featured nodejs framework MVC? [23:28] jonaslund: ckknight: well making a naive compiler will give you a good performance boost compared to having an interpreter (some people argue otherwise but you need to invest so much work that you could aswell do a compiler by then) [23:28] EM03: for web tjgillies ? [23:28] jonaslund: ckknight: apperantly they also did some optimizations, but they were quite explicit about leaving out features aswell [23:28] EM03: I think express is sorta almost the only option hehe [23:29] tjholowaychuk: there are lots of options [23:29] ckknight: jonaslund: yep. [23:29] tjgillies: does express have models? [23:29] tjholowaychuk: no [23:29] tjgillies: well there goes MVC [23:29] ckknight: node.js is more of a plug-and-play framwork [23:29] ckknight: framework* [23:29] ckknight: choose what model system you want [23:29] ji0n has joined the channel [23:29] ckknight: choose what routing system you want [23:29] ckknight: and so forth [23:29] tjgillies: right. so have someone built a real framework on top of node [23:29] EM03: I just realized jade template system is like a haml ..... :( [23:29] tjgillies: or do i have to swallow your mantra? [23:30] tjgillies: s,have,has [23:30] neel has joined the channel [23:30] jonaslund: tjgillies: look at the node module page [23:30] Gelegrodan: jonaslund: tjholowaychuk : "With HipHop we've been able to reduce the CPU usage on our web servers on average by about fifty percent depending on the page" [23:30] tjholowaychuk: tjgillies: if you want a framework that attempts to do everything for you but fails, use rails [23:30] dgathright has joined the channel [23:30] BrianTheCoder has joined the channel [23:30] tjgillies: jonaslund: some of those are really outdated/not being deved anymore. thats why i was asking if there was a defacto one [23:30] jonaslund: tjgillies: https://github.com/joyent/node/wiki/modules [23:30] cbiscardi: tjholowaychuk: haha [23:30] JimBastard_: gessssh.... me: Hey, can I bug you for a minute? Sent at 7:26 PM on Thursday 7:28 PM Casey: if its quick. I don't know if you heard about this amazon thing, but I'm fucked today [23:31] JimBastard_: poor web dude [23:31] aaronblohowiak has joined the channel [23:31] techwraith: tjgillies: I'm working on an express + Mongoose framework [23:31] tjgillies: tjholowaychuk: because all the popular/successful sites on the internet that run rails are failures. thats a huge generalization [23:31] techwraith: that has models, routes, controllers, views, etc. [23:31] EM03: is jade the only option? [23:31] techwraith: along with generators [23:31] tjholowaychuk: EM03: no lol [23:31] tjholowaychuk: EM03: many others [23:31] tjholowaychuk: read some docs man [23:31] EM03: is there anything just sorta standard [23:32] ckknight: what is a standard? [23:32] ckknight: what is your definition of "standard" [23:32] ckknight: if you'd like, I could call something a standard, then you won't have to think for yourself. [23:32] EM03: regular html with variables and some presenation code in between some sort of tags [23:33] kevliu: stagas: if i setTimeout and request.abort(); do I have to do anything else? [23:33] kevliu: i'm also detatching the listening for the response [23:33] kevliu: but i am afraid that the request is not actually killed. [23:33] ckknight: EM03: https://github.com/joyent/node/wiki/modules#templating [23:33] tjholowaychuk: need an express section on there [23:33] tjholowaychuk: and connect if there is not one [23:34] tjgillies: techwraith: whats it called? [23:34] cbiscardi: does anyone know of a mongodb example of serving images/files through gridfs to a browser? [23:34] techwraith: tjgillies: It's unnamed as of yet [23:34] techwraith: but I'm working with csanz on it [23:34] techwraith: and we're looking for help if you'd like to join in [23:35] techwraith: I'll get something up on github soon [23:35] drudge: EM03: use jade, it's the shit [23:35] tjgillies: techwraith: sounds cool. [23:35] tjgillies: techwraith: i'll pimp it in my talk at nodeconf [23:36] EM03: drudge: when I think of things like that I think of a performance killer :( [23:36] tjholowaychuk: tjgillies: what's your talk? [23:36] tjholowaychuk: EM03: hahaha no [23:36] EM03: and when doing psd to html I like to do all the html first then just copy and paste into templates how I need it you know [23:36] techwraith: Yeah, we're hoping to get socket.io and backbone support on the front-end too [23:36] tjholowaychuk: the mustache implementations [23:36] tjholowaychuk: are no faster [23:36] EM03: haml had horrible performance [23:36] tjholowaychuk: s/haml/ruby/ [23:37] ovnicraft has joined the channel [23:37] drudge: zing [23:37] techwraith: Yeah, so far Handlebars takes the cake for best templating language for me [23:37] tjgillies: tjholowaychuk: 'dity little hacks: how to use and abuse nodejs' [23:37] techwraith: Mustache + paths and easy helper functions [23:37] tjholowaychuk: haha sweet [23:37] tjgillies: s,dity,dirty [23:37] daekano has joined the channel [23:39] sorens3n: i find mustache to be easier to use with backbone, and jade easier with express [23:39] tjgillies: nodejs suffers from the lisp curse: http://www.winestockwebdesign.com/Essays/Lisp_Curse.html [23:39] sorens3n: both are good [23:39] blueadept: tjholowaychuk: are you aware of this issue? http://stackoverflow.com/questions/5612777/stylus-and-express-stylesheets-are-not-re-compiled-when-modified [23:39] blueadept: i'm having the same problem, have any suggestions? [23:40] tjholowaychuk: lol [23:40] tjholowaychuk: static() needs to be below [23:40] tjholowaychuk: to serve them [23:40] tjholowaychuk: :p [23:40] tjholowaychuk: jesus, I should have a nodeconf talk soley about how middleware order matters haha :D [23:40] blueadept: wait a minute [23:40] blueadept: forget the configuration [23:40] blueadept: let me get my configuation, it's different [23:41] tjholowaychuk: yeah that would be best [23:41] blueadept: http://pastie.org/private/iedb2b0mhl0zqxzneckxw [23:42] drudge: same problem [23:42] tjholowaychuk: blueadept: you can use compress: true now in the options instead of a custom compiler btw [23:42] tjholowaychuk: it's common enough that I added that [23:42] tjholowaychuk: but yeah same issue [23:42] tjholowaychuk: the css itself is served by static() [23:42] tjholowaychuk: stylus just compiles it [23:43] [[zz]] has joined the channel [23:43] tjholowaychuk: and methodOverride() should be below bodyParser() [23:43] tjholowaychuk: otherwise it has no req.body to use [23:43] tk has joined the channel [23:43] mnutt has joined the channel [23:43] blueadept: right, but shouldn't it compile every time i change the stylus file? [23:43] blueadept: using nodemon btw [23:43] tjholowaychuk: yeah [23:43] tjholowaychuk: it should [23:43] tjholowaychuk: actually [23:43] tjholowaychuk: no [23:43] blueadept: right, that's the issue i'm having, my configuration works fine, stylus works [23:43] tjholowaychuk: it wont in that case [23:43] Tobsn: anyone ever tried cascading upserts in mongodb? [23:44] tjholowaychuk: it wont because if it is compiled already, static() will simply serve it [23:44] tjholowaychuk: as-is [23:44] tjholowaychuk: so stylus wont be able to check if its mtime has changed [23:44] blueadept: what's the best way to force stylus to recompile on every nodemon change? [23:44] blueadept: if i say compile: force ? [23:44] tjholowaychuk: dude [23:44] tjholowaychuk: move up the middleware [23:44] tjholowaychuk: lol [23:45] blueadept: oh [23:45] blueadept: lol [23:45] blueadept: ok, let me try this [23:45] blueadept: haha [23:45] SvenDowideit has joined the channel [23:46] drudge: tjholowaychuk: i think you need to have that nodeconf talk ;) [23:46] sendark has joined the channel [23:47] tjholowaychuk: haha i've explained it enough [23:48] wadey has joined the channel [23:50] saikat has joined the channel [23:50] zilch: zackattack, I just sent you a message on private room [23:50] malkomalko: hey tjholowaychuk... how do I force reload stylus? [23:51] malkomalko: I kid I kid [23:51] tjholowaychuk: ahahaha [23:51] tjholowaychuk: :p [23:51] malkomalko: amazon being down = skynet taking over? [23:52] techwraith: I think someone needs to write an IRC bot that just asks tj every 5+/-2 minutes about middleware crap :P [23:52] duncanbeevers: I thought Skynet was hosted at Facebook's Prineville data-center. [23:52] techwraith: Preferably with a different name each time [23:53] tjholowaychuk: haha [23:53] tjholowaychuk: yeah that would be .. awesome [23:53] techwraith: duncanbeevers: That's only the part that keeps track of the peasants ;) [23:53] malkomalko: that fb data-center read with all the pictures was a good post [23:53] aaronblohowiak: .. or someone should make middleware more debuggable [23:53] tjholowaychuk: you just need to think about where you place them [23:53] tjholowaychuk: it's not magical [23:53] duncanbeevers: Yeah, I think lots and lots of people having the same problem is something of a symptom. [23:53] aaronblohowiak: so you can be like "EXPLAIN /users/1/pancakes/5" and it would explain the middleware that would handle the req [23:54] malkomalko: req.lucy(route) "Lucy.. you got some Explain'n to do" [23:54] aaronblohowiak: malkomalko: ;) [23:54] aaronblohowiak: 'splainin [23:54] malkomalko: ahh yes! [23:54] malkomalko: haha [23:55] Aria has joined the channel [23:56] blueadept: awesome, working now tj, thanks man! [23:56] skm has joined the channel [23:56] tjholowaychuk: woot [23:56] tjholowaychuk: ACTION is now accepting starbucks gift cards [23:58] SubStack: a wild tjholowaychuk appears [23:58] tjholowaychuk: ahaha [23:58] tjholowaychuk: pokemon? [23:58] SubStack: tjholowaychuk: you are up to 50.08 modules on npmtop! [23:58] SubStack: ACTION can't keep up [23:58] tjholowaychuk: wew [23:59] davidcoallier has joined the channel [23:59] sorens3n: lol [23:59] tjholowaychuk: wait .08? [23:59] tjholowaychuk: haha [23:59] MatthewS has joined the channel