[00:01] omygawshkenas has joined the channel [00:01] malkomalko has joined the channel [00:01] iFire has joined the channel [00:02] matyr has joined the channel [00:03] draginx: http://pastie.org/private/zshkhh4coqmseirxpng78q any idea why my UDP is not working correctly? O_o when sending "AS2_INFO" it's suppose to return data but doesnt O_o [00:03] Poetro has left the channel [00:03] MikhX has joined the channel [00:04] mike_miller has joined the channel [00:06] xandrews has joined the channel [00:11] olauzon has joined the channel [00:11] Croms: Gigawatt: As you're running the server, it seems to me you've got full control over what requests get securely served? [00:11] elliottcable has joined the channel [00:11] chrisdickinson: tiny, belated plug for my templating language, plate (github.com/chrisdickinson/plate) [00:12] chrisdickinson: (it implements most of django template language's filters and tags, and is async) [00:12] chrisdickinson: [00:12] iFire has joined the channel [00:13] draginx1 has joined the channel [00:13] dnolen has joined the channel [00:13] reid has joined the channel [00:14] mike_miller: Has anyone here integrated FB logon into their node.js app? [00:14] mike_miller: I'm pulling my hair out ;) [00:14] creationix has joined the channel [00:15] creationix has left the channel [00:16] dnolen has joined the channel [00:16] Croms: Gigawatt: http://nodejs.org/docs/v0.4.3/api/url.html#url.parse Parse the protocol for "https:". [00:16] tim_smart: mike_miller: node-oauth can help there [00:17] mike_miller: tim_smart: My understanding is that the JS SDK is the preferred way. Do I still have to use oauth on the server side? [00:17] McMAGIC-- has joined the channel [00:18] tim_smart: oauth is how you access the API once you have thier access token [00:18] iFire has joined the channel [00:19] ajsie: what is the difference between jade and ejs? [00:19] tjholowaychuk: ajsie: they are complete opposites [00:19] tim_smart: mike_miller: Just read this http://developers.facebook.com/docs/authentication/ [00:19] tjholowaychuk: ajsie: look at the examples [00:19] mike_miller: tim_smart: ok< i have an access_token, secret, session_key, uid [00:19] ryth has joined the channel [00:19] syskk: for some reason I get "Error: Socket is not writable" on my server, but it works fine on my local PC [00:20] syskk: the socket file is chmodded 777 [00:20] tim_smart: mike_miller: https://github.com/ciaranj/node-oauth [00:20] mike_miller: tim_smart: thanks, I'll give that a try [00:21] kixxauth has joined the channel [00:21] bingomanatee: What are you guys like for drop and run wikis nowadays? [00:21] ajsie: so with jade you are rendering html with haml like format [00:22] ajsie: and with ejs you are having regular html but you drop in some replacement text with javascript [00:22] tjholowaychuk: yes [00:22] ajsie: i guess what i want to do is not possible with jade then [00:22] ajsie: cause i want javascript embedded in ruby file [00:23] ajsie: jade => haml , ejs => erb [00:23] iFire` has joined the channel [00:24] ryanfitz: are there any good examples of using express with sqlite, or any relational db really? [00:24] russell_h: anyone know why if I assign an anonymous function to a variable it shows up as anonymous in a stacktrace, but when I assign it as a property of an object it has the property name in the stack trace? [00:25] f00f-: russell_h: give your anonymous function a name if you want it to show up in the trace [00:26] russell_h: f00f-: yeah, I know, I'm just curious why I don't have to if I'm assigning it to an object [00:26] russell_h: (or a prototype) [00:26] russell_h: ohhh, ok its some v8 thing [00:27] russell_h: functionName vs methodName [00:27] Draggor has joined the channel [00:28] beejeebus has joined the channel [00:28] drunknbass: could i fire up a node instance on demand via node running via upstart? that way i can fire up an admin app just to do some remote work, etc and then kill it when im done so it doesnt always need to be listening on a port? [00:28] sh1mmer: yes [00:29] shiawuen has joined the channel [00:29] sh1mmer: but you probably don't need upstart [00:29] drunknbass: no, what i meant was thats how my main node app is managed [00:30] drunknbass: thats the one thatd spawn off another [00:30] unflores has joined the channel [00:30] zachsmith: can anyone who knows about writing c extensions tell me how hard it would be to implement weakrefs? [00:31] SubStack: crazy hard [00:31] sh1mmer: drunknbass: right, but you probably don't need to use upstart to spawn a seperate process for an admin interface [00:31] zachsmith: Persistent handles have a makeWeak function [00:32] sh1mmer: drunknbass: although you could just make an http server and then kill it at will too [00:32] zachsmith: I don't suppose I could just wrap that and expose it client side, huh? [00:32] drunknbass: oh really [00:32] drunknbass: can you do that with nginx? [00:33] sh1mmer: no I mean in node [00:33] Hello71 has joined the channel [00:33] Hello71 has joined the channel [00:33] drunknbass: oh [00:33] sh1mmer: just make another http server object and just start it when you need it [00:33] drunknbass: ok [00:33] sh1mmer: you could also spin out a seperate child process if you wanted to [00:33] sh1mmer: but I don't see the point [00:34] beejeebus: socket.io question: how to determine if a websocket connection is 'ws' or 'wss' in the websocket.js transport code? [00:35] drunknbass: sure. i guess it was just to keep it isolated [00:35] beejeebus: i need to fix a bug where socket.io assumes that a connection from a http origin is automatically 'ws', even if the client actually opened a 'wss' connection [00:35] Ori_P has joined the channel [00:36] sh1mmer: drunknbass: you can also use vm [00:37] ajsie: if i want to have an API like couchdb where the url is the object i want to create/update: PUT http://couchbase:5984/recipes/FishStew [00:37] dyer has joined the channel [00:37] ajsie: how do i do it in express [00:37] sh1mmer: although be careful about that because require is blocking [00:37] drunknbass: what system management software does everyone prefer? [00:37] drunknbass: something that works well with node/mongodb etc [00:37] ajsie: since the url is dynamic .. and app.get('/', function(req, res) { is only listening for / [00:38] timcosgrove has joined the channel [00:39] DTrejo has joined the channel [00:39] darshanshankar has joined the channel [00:42] iFire has joined the channel [00:42] kmiyashiro has joined the channel [00:42] kkaefer: with npm's start command, is there a way to pass parameters? [00:43] isaacs: kkaefer: { "scripts" : { "start" : "node foo.js some params" } } [00:43] kkaefer: yeah [00:43] kkaefer: I mean [00:43] kkaefer: from the command line [00:43] isaacs: like: npm start foo some params? [00:43] isaacs: no [00:43] kkaefer: yes [00:43] kkaefer: would you accept a patch that adds that? [00:43] samcday: lawl - one of our sites got facebook'd'd yesterday - was getting 600 connections per second [00:43] ajsie: anyone? [00:43] isaacs: kkaefer: i'm not sure. why do you need that? [00:44] kkaefer: npm start --config settings.json [00:44] kkaefer: or npm start --verbose [00:44] kkaefer: etc. [00:44] isaacs: kkaefer: what about: npm config set my-package:settings settings.json ; and then readSettings(process.env.npm_package_config_settings) [00:45] timcosgrove has left the channel [00:45] isaacs: npm config set my-package:port 8080, {"scripts":{"start":"node server.js"}} and in server.js: server.listen(process.env.npm_config_port) [00:45] kkaefer: not sure about that [00:46] kkaefer: is there anything wrong with passing through the arguments? [00:46] techwraith: is there an event I can listen to on an http server response that will fire off right before the response is sent? [00:46] isaacs: kkaefer: well, it gets a bit hairy [00:46] isaacs: since npm start is a one-line module, and it's actualy just calling run-script, which is also used in other places. [00:46] kkaefer: hm, you basically can't accept any more parameters? [00:46] kkaefer: yes [00:46] kkaefer: like, any parameters that should remain in npm [00:46] isaacs: right [00:47] isaacs: which you can already do because npm's option parser stops parsing at -- [00:47] isaacs: but, still, it'd have to know in run-script.js that anything trailing gets passed on [00:47] isaacs: also, it's actually calling sh, not your program directly [00:47] isaacs: so it'd have to sanitize the args and append them to the -c string [00:47] kkaefer: yeah [00:48] kkaefer: "start": "PATH=\"node_modules/.bin:$PATH\" node index" [00:48] thrashaholic has joined the channel [00:48] kkaefer: that's what I have right now [00:48] isaacs: kkaefer: oh, you dont' have to do that. [00:48] kkaefer: with the contents of "node" being "n use 0.4.4 $@" [00:48] isaacs: kkaefer: npm already puts ./node_modules/.bin at the start of the $PATH [00:48] thrashaholic: has anyone here used socket.io with connect/express and session? i'm having trouble with the xhr-polling transport. [00:49] soulofpeace has joined the channel [00:49] kkaefer: ahhmm [00:49] kkaefer: but when I remove it, it starts my system-wide node interpreter [00:49] kkaefer: not the alias in node_modules/.bin [00:50] thrashaholic: what im doing is essentially parsing the cookie and loading the session from the store manually, but unfortunately with xhr-polling the request and response objects are destroyed before i can read the cookies... [00:51] Gimpyfuzznut has joined the channel [00:51] EyePulp has joined the channel [00:52] abraham has joined the channel [00:52] isaacs: kkaefer: oh, wait, that's broken. [00:52] isaacs: ACTION gets to fixin it... [00:52] isaacs: you're using 1.0? [00:52] kkaefer: yes [00:52] kkaefer: let me update to the most recent rc you just pushed [00:55] templaedhel: Is there a way to do a redirect? Using headers maybe? [00:59] useware has joined the channel [01:00] BillyBreen has joined the channel [01:00] Jamool has joined the channel [01:00] hij1nx has joined the channel [01:00] fenngle has joined the channel [01:01] vckt has joined the channel [01:02] davidascher has joined the channel [01:02] marcosvm has joined the channel [01:04] edude03 has joined the channel [01:04] isaacs: kkaefer: yeah, it's broken there, too [01:04] isaacs: pushing another one just a sec [01:04] kkaefer: cool, thanks [01:06] charlenopires has joined the channel [01:06] k1ttty has joined the channel [01:07] hvgotcodes: im wondering, is node appropriate for building a web site, or is it more appropriate for middleware -- maybe firing off some sort of webservices request. or both? [01:08] kkaefer: you can do both, but if you're building a web site, you must be willing to experiment [01:08] kkaefer: it's not a turnkey solution like rails, or some php cms [01:09] hvgotcodes: kkaefer: what do you mean by experiment? [01:09] hvgotcodes: is there a module for authorization/authentication? [01:09] tmzt_: hvgotcodes: both [01:09] ajsie: tjholowaychuk: good move with screencasts=) [01:09] kkaefer: authorization of what, against what? [01:09] tmzt_: both middleware and websites [01:09] bwinton has joined the channel [01:10] tjholowaychuk: ajsie: thanks [01:10] hvgotcodes: for users [01:10] techwraith: hvgotcodes: if you're looking into creating a website with node, I recommend using the express framework [01:10] hvgotcodes: techwraith: yeah i saw that [01:10] broofa: Anyone here implemented an http proxy that uses the CONNECT method to tunnel https? [01:11] hvgotcodes: but not an authentication/authorization module managing users [01:11] broofa: 'Wondering if that's possible/feasible with the http/https modules. [01:12] kkaefer: hvgotcodes: that's where it begins; there are lots of ways to do that [01:12] hvgotcodes: kkaefer: so how [01:13] kkaefer: well, it depends on how you want to do it [01:13] kkaefer: that's what I mean with "experiment" [01:13] hvgotcodes: im talking standard roles for users, with different services locked down in different ways [01:13] hvgotcodes: so there is no standard [01:13] hvgotcodes: ? [01:13] kkaefer: there's no single trotten path [01:13] kkaefer: yes [01:13] timmywil has joined the channel [01:13] hvgotcodes: so for example, in grails/java there is spring security [01:14] hvgotcodes: which handles pretty much any auth scheme you want [01:14] hij1nx has joined the channel [01:14] isaacs: kkaefer: ok, ready? [01:14] isaacs: kkaefer: now [01:14] isaacs: hot off the vims [01:15] kkaefer: so, I update with npm update npm? [01:15] kkaefer: or how? [01:15] kkaefer: so far, I've been nuking/reinstalling it [01:15] kmiyashiro has joined the channel [01:15] isaacs: kkaefer: sure. a regular "update" won't work trivially, unless you do it this way: `npm update npm -g --tag rc [01:15] isaacs: kkaefer: you could also: `npm i npm@rc -g [01:16] yhahn has joined the channel [01:16] isaacs: kkaefer: because it's not on the "latest" default tag, you have to specify it explicitly [01:16] kkaefer: yeah [01:16] kkaefer: ok [01:16] isaacs: also, -g to install it globally [01:16] kkaefer: yep, that did it [01:16] kkaefer: (the PATH fix) [01:16] kkaefer: thanks [01:16] isaacs: np [01:17] isaacs: every time i try to be clever, it's a mistake. [01:17] kkaefer: heh [01:17] isaacs: or at least, there's a mistake in it somewhere that doesn't show up until it breaks something [01:19] dgathright has joined the channel [01:19] bwinton has joined the channel [01:19] Me1000 has joined the channel [01:20] zorzar has joined the channel [01:20] matyr has joined the channel [01:20] techwraith: Whats the best way to have multiple node processes write to a file at the same time (without stepping on eachothers toes)? [01:21] eee_c has joined the channel [01:21] JimBastard has joined the channel [01:21] jacobolus has joined the channel [01:21] saikat has joined the channel [01:21] JimBastard: that was a crazy npm bug, would only allow me to require a package once? i upgrade to latest and re-linked, seems to work now [01:21] techwraith: Basically, I have three child processes that all need to write to the parent's log file, any ideas? [01:21] JimBastard: prob had to do with nested linked deps [01:22] zentoooo has joined the channel [01:22] techwraith: Can I just open a write stream from each of them and have it work? [01:23] samcday: Question! If I have a C++ method that calls another C++ method that has a return signature of Handle, and that called method returns ThrowException(..myexceptionhere..); Do I have to catch that exception in the first method, or can I just return it? [01:24] spuddleziz has joined the channel [01:24] samcday: Like from first method: return scope.Close(MyOtherFn());. Then from MyOtherFn(): return scope.Close(ThrowException(Exception::Error(String::New("oh bummer.")))); [01:24] tim_smart: isaacs: ping - problem with updating a -g package that installs a bin. "npm ERR! File exists: /usr/local/bin/npm-deploy" [01:24] tim_smart: Instead of overwriting it, it says that. [01:25] piscisaureus has joined the channel [01:25] htilford has joined the channel [01:25] isaacs: tim_smart: yeah, it does that when there's something there that wasn't installed by npm 1.0 [01:25] isaacs: tim_smart: you can --force over it, or delete it manually,or hwatever. [01:25] spuddleziz: guys im gonna go mental - im trying to profile my node js app, im using latest node from git and its missing some of the python tools used to parse the v8 profiler log files - im using multi-node too so I have to pass in the arguments to my child processes to run in profile mode too - anyone have any experience wdoing something similar? [01:25] thrashaholic: techwraith: you can pass file descriptors for std's iirc [01:26] techwraith: so just use the same fd for each writeableStream and it will work? [01:26] spuddleziz: if i can get linux-tick-processor.py to work i think im sorted [01:26] isaacs: techwraith: yeah, but you don't want to use fs file descriptors as stdouts [01:26] isaacs: thrashaholic: ^ [01:27] isaacs: techwraith: log = fs.createWriteStream("file.log"); cp1.on("data", log.write.bind(log)); cp2.stdout.on("data", log.write.bind(log)) ... [01:27] isaacs: techwraith: then when all three are closed, you can close the write stream [01:28] isaacs: techwraith: and your child procs should just spew to stdout [01:28] thrashaholic: yes, what isaacs said :) [01:29] davidascher has joined the channel [01:29] themiddleman has joined the channel [01:29] techwraith: So, it's best to have the master process do the writting to the log and have each child send stuff out to stdout [01:29] techwraith: ? [01:29] isaacs: techwraith: yes. [01:29] techwraith: Got it, will do, thanks! [01:29] isaacs: techwraith: worker programs should use standard io, because that is the universal interface [01:29] draginx1: http://pastie.org/private/zshkhh4coqmseirxpng78q any idea why my UDP is not working correctly? O_o when sending "AS2_INFO" it's suppose to return data but doesnt O_o [01:32] mscdex: spuddleziz: you mean like.... https://github.com/joyent/node/blob/master/deps/v8/tools/linux-tick-processor [01:32] mscdex: spuddleziz: :-P [01:32] mscdex: last time i used it it worked [01:33] spuddleziz: mscdex: lol - i had a look in the code for node-profile and it was using the py script - is that a replacement? [01:34] mscdex: spuddleziz: well, it comes with node as you can see [01:34] mscdex: all it does is analyze the profile log file [01:34] mscdex: displays the results on stdout [01:34] mscdex: :) [01:35] spuddleziz: mscdex: cheers for the pointer, yeah i can see it now - ideal! my app slows down over time hopefully i can figure out whats happening thanks again [01:35] jimt_ has joined the channel [01:38] draginx1: d [01:38] mscdex: e [01:38] draginx1: how do I sconvert string to hex? [01:38] mscdex: :p [01:38] draginx1: :P [01:39] mscdex: str.toString(16) [01:39] mscdex: er wait [01:39] e2i has joined the channel [01:39] mscdex: that's for numbers [01:39] draginx1: string.toHex() is what i want :P [01:39] matyr has joined the channel [01:41] broofa: draginx1 will (parseInt(s)).toString(16) do what you're after? [01:41] mscdex: unless the string has letters [01:41] mscdex: heh [01:42] broofa: mscdex actually, I think you can do parseInt(s, 36) to parse as base 36 with a-z... not that anyone would want to do that. [01:42] draginx1: O_o not sure [01:43] broofa: ... but that's beside the point. And if what draginx1 wants are hex octets for the ascii code of each char, than that's a whole diffent ball of wax. [01:44] perlmonkey2: anyone know if dnode has jquery as a dep? [01:46] mscdex: draginx1: this?: https://gist.github.com/09c6f681719d65fcc547 [01:46] draginx1: sure I guess :S [01:46] fadeddata has joined the channel [01:46] draginx1: thanks :) [01:47] broofa: draginx1 mscdex or in one line: Array.prototype.slice.call(new Buffer('this is my string', 'ascii'), 0).map(function(i) {return (0x100 + i).toString(16).substr(1)}).join('') [01:47] perlmonkey2: ah, nevermind. Stupid question about jquery/dnode. [01:47] mscdex: converting to array is inefficient! [01:47] mscdex: :p [01:48] broofa: mscdex yeah, but my code is prettier. ;) [01:48] mscdex: if you say so lol [01:48] mscdex: don't get me wrong, i'm all for one-liners, but still.... :) [01:49] harth has joined the channel [01:51] jherdman has joined the channel [01:51] isaacs: guys, Buffer(myString).toString("hex") [01:52] keyvan has joined the channel [01:52] timcosgrove has joined the channel [01:52] isaacs: draginx1: ^ [01:52] mscdex: buffer overhead! [01:52] mscdex: :D [01:52] isaacs: hehe [01:52] isaacs: er, new Buffer(myString).toString("hex") [01:52] isaacs: if you just wanna get the hexadecimal bytes [01:52] draginx1: O_o nice [01:52] isaacs: you're not actually converting a "string" to hex, but rather a buffer, but it's probably what you want [01:52] draginx1: i didnt realize Buffer had that [01:53] draginx1: yer [01:53] isaacs: draginx1: it's new-ish [01:53] isaacs: ACTION wrote it [01:53] draginx1: :D nice [01:53] isaacs: > new Buffer("foo").toString("hex") [01:53] isaacs: '666f6f' [01:53] saikat has joined the channel [01:53] broofa: isaacs - yeah, getting unknown encoding (node 0.4.4) [01:53] draginx1: isaacs: Error: Unknown encoding U LIE [01:53] draginx1: do i need 0.5? [01:54] isaacs: draginx1: yeah, i think that was on master [01:54] draginx1: how do i update the 0.4 to 0.5? :S [01:54] isaacs: * | 0aa1a8a isaacs Closes GH-695 Add 'hex' encoding to Buffer (6 weeks ago) [01:54] mscdex: never heard of the "U LIE" encoding ;-) [01:55] isaacs: draginx1: git clone git://github.com/joyent/node.git ; cd node; ./configure && make install [01:56] broofa: v4 version: require('util').inspect(new Buffer('hello world')).replace(/^]/g, '') [01:56] bingomanatee: why encourage people to go up to 0.5 ? I thought 0.4 was stable and ryan's been bugging people to use 0.4 [01:56] c4milo1 has joined the channel [01:56] isaacs: bingomanatee: well, if you wanna use master, there it is :) [01:56] isaacs: it's not stable [01:56] draginx1: meh may be ill wait for stable :( when does npm 1.0 come out? [01:56] broofa: draginx1 ^^^ [01:56] isaacs: draginx1: it's in rc mode now [01:57] isaacs: draginx1: soon! [01:57] draginx1: hopefully :D [01:57] draginx1: hopefully npm can update itself too? ;x [01:57] isaacs: draginx1: it can [01:57] isaacs: draginx1: npm install npm -g [01:57] draginx1: not sure what u mean broofa let me try something [01:58] kmiyashiro: what's the -g? [01:58] bingomanatee: perhaps if you update npm@1.0 you can open a rift in the space time continuum and pull in the release version from the future. [01:58] bingomanatee: save isaacs some time [01:58] isaacs: kmiyashiro: blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [01:58] isaacs: kmiyashiro: http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/ [01:58] draginx1: broofa: 4153325f494e474f is that correct hexidicmal? :P [01:58] kmiyashiro: oh right [01:58] kmiyashiro: makes sense [01:59] gazumps has joined the channel [02:00] gozala has joined the channel [02:00] kmiyashiro: uh oh, that broke my npm [02:00] isaacs: kmiyashiro: what version were you using? [02:01] kmiyashiro: 1.0 [02:01] isaacs: oh, sorry, whoops [02:01] isaacs: curl http://npmjs.org/install.sh | npm_install=rc sh [02:01] isaacs: next time: npm i npm@rc -g [02:01] isaacs: the @rc says "install the rc tag, not the @latest" [02:01] isaacs: latest is still 0.3 [02:01] kmiyashiro: ah, ok [02:02] mlncn has joined the channel [02:02] dnyy has joined the channel [02:02] briznad has joined the channel [02:03] vilsonvieira has joined the channel [02:05] tjholowaychuk: css gradient magic coming to a stylus near you https://gist.github.com/2e38e74b00b6a80e8725 [02:06] kmiyashiro: what's a stylus? [02:07] tjholowaychuk: kmiyashiro: http://learnboost.github.com/stylus/ [02:08] kmiyashiro: replacing sass/compass? [02:08] Croms has joined the channel [02:08] kmiyashiro: (typo on the page, no space after GitHub) [02:08] tjholowaychuk: kmiyashiro: it's a language like less/sass [02:08] kmiyashiro: head over to GitHubfor more information. [02:08] tjholowaychuk: doh [02:09] Croms_ has joined the channel [02:09] tjholowaychuk: kmiyashiro: it's sass on steroids [02:09] kmiyashiro: how so? [02:10] skm has joined the channel [02:10] skm has joined the channel [02:11] skm has joined the channel [02:12] skm has joined the channel [02:12] kmiyashiro: hm, the image-size function is neat [02:12] timcosgrove has left the channel [02:12] matschaffer has joined the channel [02:12] skm has joined the channel [02:13] kriszyp has joined the channel [02:13] skm has joined the channel [02:13] tjholowaychuk: kmiyashiro: it's got a lot more than that. for example that gist there, you can dynamically duplicate properties to apply vendor specific function calls like gradients etc [02:13] tjholowaychuk: in sass / less you would have to create a mixin, that woudl be highly opinionated [02:13] tjholowaychuk: and only work for a few things [02:13] tjholowaychuk: and it is not even remotely transparent [02:14] skm has joined the channel [02:14] deepthawtz has joined the channel [02:14] skm has joined the channel [02:15] skm has joined the channel [02:15] hornairs has joined the channel [02:15] ajsie: i cant get it to work .. app.put(/[^\/]+/g, function(req, res) { should capture "myway" and "items" if the url is /myway/items .. but when console.log(req.params) give me empty array [02:16] kmiyashiro: not sure what you mean by opinionated (<-- not a programmer) [02:16] skm has joined the channel [02:16] llkazu has joined the channel [02:16] skm has joined the channel [02:17] tjholowaychuk: ajsie: uhh, what are you trying to do? [02:17] skm has joined the channel [02:17] tjholowaychuk: ajsie: app.put('/user/:id') PUT /user/12 req.params.id => '12' [02:17] tjholowaychuk: for example [02:17] yhahn has left the channel [02:17] ajsie: tjholowaychuk: i want to let the coder do PUT /feature1/feature2/feature3 and i caputre them to create folders feature1/feature2/feature3 [02:17] tjholowaychuk: you can use regexps, but you need capture groups.. [02:18] tjholowaychuk: I see [02:18] tjholowaychuk: well [02:18] tjholowaychuk: do [02:18] skm has joined the channel [02:18] tjholowaychuk: app.put(':paths(*)', function(req){ req.params.paths.split('/') }) [02:18] tjholowaychuk: gotta run [02:18] skm has joined the channel [02:19] skm has joined the channel [02:20] skm has joined the channel [02:20] ryanfitz has joined the channel [02:20] alek_br has joined the channel [02:21] jashkenas has joined the channel [02:27] shaunau has joined the channel [02:27] tfe_ has joined the channel [02:28] templaedhel: Is it possible to redirect the client with node? Like change the headerr location to point somewhere else? I tried writeHead({'Location':'url'}); [02:29] incon has joined the channel [02:30] aho: templaedhel, the url must be complete (with protocol and stuff) [02:31] templaedhel: aho: res.writeHead(200, {'Location': 'http://google.com'}); [02:31] aho: 200 is the wrong status code [02:31] incon has joined the channel [02:31] templaedhel: Ah [02:31] mscdex: yeah [02:31] aho: try 301 = perm [02:31] aho: or 307 = temp [02:32] DTrejo has joined the channel [02:32] templaedhel: Well I am redirecting after a logout, which would be more acceptable? [02:32] aho: temp [02:33] aho: permanently = this site got a new home, forget that this url ever existed :> [02:34] DTrejo: templaedhel: yes there is! [02:34] aho: use 301 if you move a site to a new domain or if you do non-www to www redirects (or vice versa) [02:35] templaedhel: Ok, and now with a 307 session.js is not working [02:35] DTrejo: nvm me, I came in after missing 2hrs of conversation, oop [02:36] draginx1: How can I read data sent back from a UDP send? [02:36] templaedhel: I guess I need a 200 response code for the session.js to work [02:36] templaedhel_ has joined the channel [02:37] mbrochh has joined the channel [02:37] mbrochh has joined the channel [02:38] aho: "doesn't work" isn't very specific, by the way [02:39] templaedhel_: aho: Well there's not much more to say, the server can't set the cookie, so it doesn't change. [02:41] draginx1: is there a way to echo out the raw socket values (hex codes, etc) in nodejs? [02:41] jacobolus has joined the channel [02:42] shaunau: draginx1 - there was a description of using udp posted to the email list/group about a week ago. [02:42] draginx1: shaunau: anyway of retrieving that? :S [02:42] shaunau: it outlined reading the response [02:42] sub_pop has joined the channel [02:42] shaunau: its on the google group [02:43] dmshann0n_ has joined the channel [02:43] unlink has joined the channel [02:44] draginx1: shaunau: https://github.com/pgriess/node-jspack this? :) [02:44] shaunau: not sure [02:45] hvgotcodes: what are the top3 modules to be aware of? [02:45] shaunau: hve a look at "Receiving on an Unix-Dgram-Socket" thread on the group [02:47] shaunau: hvgotcodes, um, Elle mc'pherson, that hot black chick from runway models.. and um.. hm i cant think of another one.. [02:47] shaunau: :) [02:47] hvgotcodes: lol -- what [02:49] shaunau: Tyra Banks :) yeah.. thats her.. [02:49] matschaffer has joined the channel [02:51] ukev has joined the channel [02:52] piscisaureus has joined the channel [02:52] jtsnow has joined the channel [02:54] abraxas has joined the channel [02:54] astropirate has joined the channel [02:54] skm has joined the channel [02:56] kmiyashiro has joined the channel [02:57] abraxas: I'm new to Node.js, and I was wondering which MySQL client library is considered most stable and feature complete. Does anyone have any useful comments on that? [02:57] mscdex: shaunau: http://www.youtube.com/watch?v=6oQojElFQag [02:58] pauls has joined the channel [02:58] mscdex: abraxas: imho node-mysql works pretty well, but may lack features the other libs have [02:58] mscdex: like stored procedures and blob support [02:58] mscdex: :\ [02:58] templaedhel_: abraxas: Do you have to use mysql? [02:58] abraxas: Pretty much. [02:59] adlan has joined the channel [02:59] draginx1: how can I skip the first four characters of a string? [02:59] templaedhel_: Substr [03:00] luke` has joined the channel [03:00] techwraith: abraxas: node has some pretty good support for Postgres, is that close enough? ;) [03:01] bentruyman has joined the channel [03:01] findchris has joined the channel [03:01] f1lt3r_bocoup has joined the channel [03:01] draginx1: thats not going to work with my problem actually :| I need to somehow get the raw code from a UDP packet, any way to do this? =/ [03:02] abraxas: techwraith: afraid not :( we're kinda stuck with mysql on this one. [03:02] tim_smart: Anyone can recommend a cool optparsing library for cli tools? [03:03] abraxas: So, Joyent backs the node-mysql module? [03:03] F1LT3R has joined the channel [03:04] abraham has joined the channel [03:08] deepthawtz has joined the channel [03:10] DTrejo: tim_smart: you saw the one that isz released I'm guessing [03:10] keyvan has joined the channel [03:11] tim_smart: DTrejo: Not yet :p [03:12] DTrejo: oh, let me see if I can find it [03:12] tim_smart: Got it :) [03:12] DTrejo: nice [03:13] abraxas: mscdex: wouldn't the libmysqlclient module be a more stable / safe bet, in terms of stability? [03:13] mscdex: abraxas: i can't say, i've never used that module [03:13] abraxas: Okay [03:13] abraxas: mscdex: Ever had any trouble at all with node-mysql? [03:14] mscdex: abraxas: the only problem i've have is the lack of proper blob field support, although i have a patch that adds that [03:14] bingomanatee: ACTION would like to kow peoples experience using mysql with node [03:14] mscdex: s/have/had [03:15] mscdex: i admit i haven't used node-mysql in production, but felixge does [03:15] abraxas: mscdex: You mean binary data in general is a problem? [03:15] slickplaid: bingomanatee: I've been so redis-crazy that I have yet to even touch MySQL in node :D [03:15] bingomanatee: me neither - I roll with the Mongo crowd. [03:16] bingomanatee: Honestly do not look forward to getting back to mysql but thats how the world rolls nowadays. [03:16] mscdex: abraxas: well, blob fields are really the only binary fields, the rest are string (or auto converted to the proper js datatype if you specify so in the config) [03:16] deepthawt has joined the channel [03:16] galaxywatcher has joined the channel [03:17] abraxas: mscdex: well, in mysql you can make any string type binary. the problem you mention is that not ending up in binary buffers? [03:17] abraxas: mscdex: or is there a problem when it comes to storing large chunks of data? [03:18] mscdex: abraxas: iirc any non-blob field is at least converted to string in node-mysql currently [03:19] abraxas: mscdex: alright [03:19] mscdex: well, blobs are converted to string too [03:19] mscdex: unless you apply my patch [03:19] mscdex: :\ [03:19] abraxas: :) ok [03:19] abraxas: I don't think I'll be dealing with binary data in this project, so it's not really a concern at the moment. [03:19] mscdex: abraxas: but apprently node-mysql doesn't play nice with stored procedures either [03:20] abraxas: Not using those either luckily. [03:20] mscdex: me either, but thought it's worth mentioning [03:20] abraxas: mscdex: but it makes one wonder if it doesn't then makes more sense to use libmysqlclient instead? [03:20] beejeebus has left the channel [03:20] abraxas: mscdex: or is that too legacy? ;) [03:21] mscdex: i'd say just give them both a try and see which one suits your fancy [03:21] abraxas: will do [03:23] VegansAreFurrier has joined the channel [03:24] eventi has joined the channel [03:26] gilesgoatboy has joined the channel [03:27] briznad has joined the channel [03:28] gilesgoatboy: anybody been successful using Jasmine to do BDD against jQuery toggle()? I'm getting some pretty disheartening results [03:30] matyr has joined the channel [03:30] mscdex: oh jeez... this little epia machine has been compiling chrome 10 for an hour and a half so far [03:30] mscdex: :S [03:31] mt3 has joined the channel [03:31] malkomalko has joined the channel [03:31] mscdex: 667mhz of pure processing power! [03:31] Sami_ZzZ__ has joined the channel [03:33] deepthawtz has joined the channel [03:33] kuhrt has joined the channel [03:34] akivab has joined the channel [03:34] muk_mb has joined the channel [03:34] iFire has joined the channel [03:37] mike5w3c has joined the channel [03:38] noahcampbell has joined the channel [03:39] Draggor: I wonder how long it'd take to compile node on a pentium MMX [03:40] DTrejo: 0_o [03:40] noocx has joined the channel [03:40] noocx: re [03:40] tbranyen: how long does it take to compile on an i7 i wonder [03:40] Draggor: I have a bunch of old Toshiba Tecra 550 CDTs [03:40] VegansAreFurrier: Are we going to take down the Ruby On Rails dorks? [03:40] davidvanleeuwen has joined the channel [03:40] fromz has joined the channel [03:41] tbranyen: VegansAreFurrier: take down how? [03:41] Spion_ has joined the channel [03:41] tbranyen: they've done a pretty good job of that themselves [03:41] mscdex: tbranyen: it takes about 35 seconds or so on my i7 [03:42] tbranyen: mscdex: thats insane [03:42] tbranyen: :D [03:42] mscdex: it used to be 30 seconds [03:42] mscdex: :) [03:42] tbranyen: it must plow through v8 [03:42] mscdex: on 0.2.x [03:42] tbranyen: thats wher emy q6600 hangs [03:42] tbranyen: it goes pretty fast tho [03:42] VegansAreFurrier: tbranyen: I want to stop having to tell newbs that come into my multi-hundred-thousand dollars projects suggesting Ruby on Rails that we're going with node.js as to stfu [03:43] iFire has joined the channel [03:43] tbranyen: whats a multi-hundred-thousand dollars project like? [03:43] tbranyen: must be glamorous [03:44] VegansAreFurrier: tbranyen: Mostly commodities trading software (I'm in New York) [03:44] tbranyen: oh i work on multi hundred dollar projects [03:44] VegansAreFurrier: CDO management web apps, etc. [03:44] tim_smart: How would I leave `# /usr/bin/env node` at the top of a compiled coffee file? [03:44] tbranyen: many many hundos [03:44] tim_smart: Wrong room... [03:45] VegansAreFurrier: tbranyen: I'm trying to make node.js known on Wall Street. So far, at least they let me use it [03:45] ryah: VegansAreFurrier: from your nickname i wouldn't expect it [03:46] tbranyen: wallstreet is a face paced world that doesn't have time for blocking i/o [03:46] tbranyen: fast* [03:47] VegansAreFurrier: ryah: Don't worry about my nickname. I'm pretty flamboyent. [03:47] iFire has joined the channel [03:47] VegansAreFurrier: tbranyen: right [03:47] tbranyen: VegansAreFurrier: tell wallstreet wiimote is on the way [03:48] jeff_horton has joined the channel [03:50] mscdex: i bet investors would really pull the trigger on wiimotes [03:50] mscdex: ba-dum-bum-tsshhhh [03:50] fromz: I'm playing around with node.js and like everyone else who gives it a shot, I'm loving it. I'm using express at the moment. but for templating engines I notice there are a number of choices - which are you using, if you're using any. I'm looking at jade now. [03:51] tfe_ has joined the channel [03:51] tfe_ has joined the channel [03:51] skm has joined the channel [03:52] deepthawtz has joined the channel [03:52] saschagehlich_ has joined the channel [03:53] akivab: does anybody use node.js with nginx? [03:53] VegansAreFurrier: akivab: Sue [03:53] VegansAreFurrier: *Sure [03:54] strmpnk has joined the channel [03:55] tim_smart: isaacs: ping - Does nopt allow you to list files etc? [03:56] isaacs: tim_smart: what do you mean? [03:56] Yuffster has joined the channel [03:56] tim_smart: mybin -xyz file.ext [03:57] isaacs: tim_smart: yeah, i mean, i do stuff like that in npm [03:57] isaacs: tim_smart: you can define an option with a type of path, and then it'll path.resolve it and give your app the full path [03:58] dgathright has joined the channel [03:58] isaacs: npm install foo --prefix ./node_modules/bar [03:58] isaacs: so npm would see {prefix: "/full/path/to/node_modules/bar" } [03:58] isaacs: tim_smart: and then positional params are just passed through on the parsed.argv object [03:59] tim_smart: isaacs: I'm working on a node powered gist cli, and want to give the user to gist a bunch of files I.e. gist --private one.js two.js three.js [03:59] isaacs: tim_smart: yeah, so, just define "private" as a boolean (maybe with -p as a shorthand for it) and then read the filenames off the positional params on parsed.argv.remain [03:59] no-gooder has joined the channel [04:00] Jamool has joined the channel [04:01] tim_smart: isaacs: https://gist.github.com/6c4cd1f88da8e06b06c3 [04:02] tim_smart: remain is empty :( [04:02] isaacs: tim_smart: it's odd that argv.remain isn't showing ["package.json"] [04:02] isaacs: just a second.. [04:03] tonymilne has joined the channel [04:03] no-gooder has joined the channel [04:03] iFire has joined the channel [04:03] isaacs: tim_smart: oh, ha, you're passing in a literal boolean [04:03] isaacs: TypeError: Object true has no method 'match' [04:04] spuddleziz: ive got the weirdest problem at the moment - I can't figure out what ive changed recently that would cause it - my socket server slows down over time!? anyone noticed a similar pattern before? [04:04] isaacs: on line 15, should just be p: ['--private'] or maybe p: ['--private', 'true'], but not p: ['--private', yes] [04:04] tim_smart: isaacs: Ah right [04:05] isaacs: tim_smart: i should stringify those things, i guess. [04:05] Horofox has joined the channel [04:06] abraxas: How do people using NodeJS generally deal with handling errors and callbacks? Throw exceptions, or always pass around 2 callbacks, onsuccess and onerror? Catching exceptions can be a problem when using asynchronous IO-bound modules, right? [04:06] tim_smart: isaacs: Bonus points if you add a method for generating a command reference list for a --help [04:06] isaacs: tim_smart: yeah, people have asked for that. [04:06] Aria: I always pass two callbacks. [04:06] isaacs: tim_smart: but since npm won't use it, i'm less motivated to :) [04:06] tim_smart: I might patch it... [04:06] isaacs: abraxas: one cb, first arg is an error. [04:06] zakabird has joined the channel [04:07] isaacs: tim_smart: as long as it doesn't ruin what npm is using nopt for, or makeit much bigger, i'm game [04:07] abraxas: Are there any modules out there that throw exceptions? [04:07] abraxas: (as far as you guys know....) [04:09] spuddleziz: my server talks to a back end soap server :( and I connect, get 20 documents and disconnect, everytime I run the function that does that beforemance drops by about 5% - im hoping someone might inspire me ive ran profiling and found nothin untoward - it makes no sense [04:09] tim_smart: isaacs: Weird... https://gist.github.com/eee42338f44a99266c93 [04:09] JimBastard has joined the channel [04:09] tim_smart: isaacs: I have to pass in 'true' I guess [04:09] isaacs: tim_smart: oh, that's odd... [04:10] draginx has joined the channel [04:10] vladikoff` has joined the channel [04:10] tim_smart: Nope, passing in 'true' fails as well :/ [04:10] eventi has joined the channel [04:11] eventi has left the channel [04:11] draginx: if I have a string like "63737472696b65" how can I convert that to ASCII? (it's hex) [04:12] DTrejo: use math! [04:12] DTrejo: parseInt(str, 16) [04:12] DTrejo: and then.. [04:12] DTrejo: you have a number [04:12] no-gooder: http://www.synchrosinteractive.com/blog/9-nodejs/66-was-nodejs-dead-before-it-got-started [04:12] tim_smart: isaacs: I'm heading home. My gtalk/mail is tim@fostle.com if you want to let me know something. [04:12] isaacs: tim_smart: there is something odd going on. ok, i'm reproducing [04:12] isaacs: tim_smart: something magic about -p, it looks like :) [04:13] sreeix has joined the channel [04:13] DTrejo has joined the channel [04:14] tim_smart: I love and hate magic :p [04:14] tim_smart: Alright. /me gone. [04:14] no-gooder: what are you guys thins about this article : http://www.synchrosinteractive.com/blog/9-nodejs/66-was-nodejs-dead-before-it-got-started ???? [04:14] no-gooder: think* [04:15] eventi has joined the channel [04:15] Draggor: That's a pretty dumb article [04:15] noocx: :) [04:15] draginx: DTrejo: what do I do with the #? :P [04:16] DTrejo: hmm, let me whip up an example [04:17] tbranyen: node is so dead which is why the community is thriving why can't you guys see this??? [04:18] mjr_: Can node.js make me a cocktail? No? Why the hell are so many people using it then! [04:18] DTrejo: draginx: then you use it like normal: https://gist.github.com/895804 [04:18] Draggor: Seriously, between node and haskell, I've never been happier with a programmer community [04:18] no-gooder: mjr_, :D [04:18] Draggor: it gives me warm fuzzies [04:19] isaacs: LOL [04:19] DTrejo: we should write our webservers in bash [04:19] isaacs: "a business model where highly efficient, I/O intensive applications can create a huge competitive edge or perhaps even makes something possible that wasn't possible before." [04:19] isaacs: yes, HOW WILL WE EVER FIND ONE OF THOSE!!!??? [04:19] tbranyen: Impossible nobody uses the internet [04:19] tbranyen: its just a fad [04:19] isaacs: the sentence that comes after that is fanTAStic [04:19] mjr_: Keep looking for Sasquatch, you freaks. [04:20] Draggor: ACTION works for an exchange, logs terabytes worth of data every day [04:20] mjr_: You work for microsoft exchange? [04:20] isaacs: IO BOUND APPS ARE NOWHERE. [04:20] draginx: DTrejo: parseInt(str, 16) just makes them into integers O_o [04:21] DTrejo: right, that's the goal right? [04:21] draginx: no [04:21] draginx: i want hex into ascii [04:21] DTrejo: oh, then do num + '' [04:21] DTrejo: or num.toString() [04:21] DTrejo: I think [04:21] tbranyen: 0xff .toString(10) [04:21] tbranyen: heh [04:21] isaacs: draginx: you're not on node master, right? [04:21] DTrejo: oh [04:21] draginx: O_o im on 04.4. [04:21] isaacs: draginx: if so, you can do new Buffer(hexStr, "hex").toString("utf8") [04:22] draginx: DTrejo: still confused let me try th .toString? [04:22] DTrejo: draginx: yeah, I didn't understand well what you wanted [04:22] draginx: isaacs: ive been picking @ master though :P getting osme hex functions =x [04:22] DTrejo: apologies for any confusion I might have caused [04:22] draginx: toString() did not work :( [04:22] draginx: uhhhh isaacs I knooooow but im not on it [04:22] draginx: and i dont think 0.5 is coming out anytime soon [04:23] tbranyen: draginx: heh toString(10) would just convert from hex to base 10 [04:23] isaacs: draginx: you can also read through your string 2 chars at a time, joining each together, and then doing parseInt(twoChars, 16), create an array of those, and then do new Buffer(theArray).toString("utf8") [04:23] DTrejo: to toString(16) ? [04:23] Draggor: I'm half tempted to comment on that post with something like "You must be an (emacs|vim) user" [04:24] tbranyen: DTrejo: toString(16) would do nothing to a hex value [04:24] draginx: toString(16) doesnt change anything nor (10) [04:24] draginx: i think i have to go with isaac's solution [04:24] DTrejo: yeah, ignore me hehe :) [04:24] tbranyen: draginx: yeah toString( 10 ) wouldn't give you an ascii conversion i assumed you meant base 10 [04:24] DTrejo: how many noders does it take to answer a hex--> string question? [04:25] isaacs: draginx: new Buffer('68656c6c6f'.match(/../g).map(function (n) { return parseInt(n, 16) })).toString("utf8") [04:25] draginx: lmao a gazllion :P [04:27] Draggor: isaacs: purdy [04:27] isaacs: that's assuming that each byte is 2 chars. [04:27] isaacs: zero-padded etc [04:27] isaacs: and no endian bs [04:27] iFire has joined the channel [04:28] draginx: isaacs: im running into endian bs lol :p [04:30] CarterA has joined the channel [04:32] draginx: some have 5 codes too O-o not an even number… *sighs* [04:32] tbranyen: big or little [04:32] tbranyen: indians come in all sizes [04:33] jeff_horton has joined the channel [04:33] astropirate: lol [04:34] dgathright has joined the channel [04:34] VegansAreFurrier: MapReduce is the holygrail guys [04:35] no-gooder: here is another attack for async programming from microsoft : http://channel9.msdn.com/Blogs/Charles/Anders-Hejlsberg-Introducing-Async [04:36] VegansAreFurrier: no-gooder: Is there any merit to the attack? [04:38] sub_pop has joined the channel [04:39] matyr_ has joined the channel [04:39] abraham has joined the channel [04:41] ryah: oh. it's so easy to write node compared to c [04:41] ryah: ACTION remembers why he made this [04:42] robotarmy has joined the channel [04:42] dnyy has joined the channel [04:43] mhooker has joined the channel [04:43] DTrejo: ryah: you should write a nostalgic piece, and get quote from those who remember the old days [04:43] DTrejo: *quotes [04:43] VegansAreFurrier: ryah: I actually enjoy writing modules or node.js in C++ [04:43] ryah: on the other hand, i can write much faster servers in C than I can in Node :) [04:44] tbranyen: +1 to that [04:44] tbranyen: i'm doing wiimote stuff with cwiid in node [04:44] tbranyen: and its actually fun [04:44] tbranyen: since i've been writing js for years and years [04:44] tbranyen: neat to finally be able to do wiimote.rumble( true ); [04:44] VegansAreFurrier: :p [04:44] tbranyen: working on a basic shooter game in the browser atm, and my coworker is going to do some stuff with webgl [04:45] tbranyen: would be sick to get multiplayer working [04:46] tbranyen: also the indexOf trip with bitwise operators is so awesome [04:46] tbranyen: !!~'test'.indexOf('test') === true, !!~'test'.indexOf('lol') === false [04:46] tbranyen: !! only needed to coerce to boolean [04:47] tbranyen: if( ~'test'.indexOf('test') ) { //test!!! } [04:48] sprout has joined the channel [04:49] Draggor: tbranyen: oh nice [04:49] Draggor: ACTION goes to make changes now [04:49] tbranyen: Draggor: yeah the tilda is really handy for a number of cases in JS [04:49] tbranyen: ~function() { //executes now!! }(); [04:49] tbranyen: instead of (function() { })(); [04:50] Draggor: huh [04:50] Draggor: spiffy [04:50] perezd has joined the channel [04:50] Draggor: I've been spoiled by haskell's $ operator [04:51] davidascher has joined the channel [04:51] ajsie: i want to print out received body [04:51] JojoBoss: How do you set the environment when running your script? [04:51] ajsie: req.on('data', function(data) { console.log(req.data) }); [04:51] Draggor: Man am I happy, just got dynamic plugin loading working and having the option of specifying which channels and/or users it listens on [04:51] isaacs: Draggor: what's $ in haskell do? [04:52] ajsie: but nothing gets print out .. either i didn't send a body or the code is wrong [04:52] ajsie: oh [04:52] Draggor: isaacs: functionA $ functionB argToB, that will run functionB with its arg, then pass the result as an arg to functionA [04:52] JojoBoss: n/m. figured it out [04:52] isaacs: Draggor: like ()? [04:52] ajsie: could smeone help me [04:53] saikat has joined the channel [04:53] isaacs: Draggor: a(b(arg)) [04:53] Draggor: Yup [04:53] Draggor: except when chained it can still look readable [04:53] Draggor: no mass of ) at the end, heh [04:55] beawesomeinstead has joined the channel [04:55] beawesomeinstead has joined the channel [04:56] techwraith has joined the channel [04:56] mscdex: ajsie: your log statement is wrong, it should be: console.log(data) [04:56] ajsie: mscdex: yeah i have fixed that [04:56] ajsie: but it still doesnt print anything [04:57] mscdex: are you sure you are sending a body? [04:57] ajsie: mscdex: im using http-console and it works now [04:58] ajsie: curl -X PUT http://localhost:3000/way/items/sell_items/add_items -d "asd" [04:58] ajsie: didnt work [04:58] ajsie: i thought you sent a body with -d [04:58] mscdex: ah [04:59] mscdex: it should [04:59] ajsie: hmm [04:59] skm has joined the channel [04:59] tonymilne: Hey all :) Does anyone know if any sanitizing goes on in either Connect's bodyDecoder or MongoDB Native's insert/update functions? [04:59] torgeir has joined the channel [04:59] torgeir has left the channel [05:00] matyr has joined the channel [05:00] tim_smart has joined the channel [05:00] mscdex: ajsie: what does req.headers say when you connect with curl? [05:02] orch has joined the channel [05:02] mscdex: ajsie: also can you post your code? [05:02] tim_smart: isaacs++ [05:02] v8bot: tim_smart has given a beer to isaacs. isaacs now has 12 beers. [05:02] techwraith: Is there a way for me to tell how many beers I have? [05:03] DTrejo: `v beers [05:03] v8bot: DTrejo: has 0 beers. [05:03] tim_smart: Look in the fridge or w/e you keep your beer [05:03] DTrejo: wtf I didn't drink any beers [05:03] tim_smart: Real life beer has more value [05:03] cou929 has joined the channel [05:03] DTrejo: do they disappear on every logout or something? [05:03] techwraith: tim_smart: thanks, Iooks like I have 3 beers [05:03] DTrejo: prolly [05:04] tim_smart: Poor techwraith :( [05:04] tim_smart: ACTION can't be bothered to look in the garage fridge to count the beers [05:05] techwraith: `v beers [05:05] v8bot: techwraith: has 0 beers. [05:05] tbranyen: beer is a downer [05:05] tbranyen: can't drink it [05:05] techwraith: My office has more... [05:05] tbranyen: coffee or gatorade [05:05] ajsie: mscdex: https://gist.github.com/895847 [05:05] techwraith: I think the beer delivery guy came today [05:06] Draggor: `v beers [05:06] v8bot: Draggor: has 0 beers. [05:07] mscdex: ajsie: my guess is something is wrong with express.... a plain http server works just fine with the same curl command [05:07] ajsie: mscdex: it seems to be wrong with curl? [05:07] ajsie: cause http-console worked [05:08] mscdex: ajsie: try this with curl: https://gist.github.com/74720b9ffd4df7174464 [05:08] mscdex: the same curl line [05:11] Jamool_ has joined the channel [05:12] micheil: In case anyone didn't see mraleph's latest experiment: http://blog.mrale.ph/post/4217120977/improved-v8-external-arrays-support-and-nodejs-buffer [05:12] micheil: /cc ryah there [05:12] skm has joined the channel [05:12] ajsie: mscdex: yeah .. it didnt print out request ended [05:13] Aria: Mmhm! Ryah tweeted that this morning! [05:13] ajsie: but http-console did [05:13] mscdex: ajsie: .... what version of node are you on? [05:13] sreeix has joined the channel [05:14] datapimp has joined the channel [05:14] ajsie: what the hell is the problem with curl .. however .. express handled that request because i put a console.log("handled") inside app.put() and it worked [05:14] ajsie: 0.4.0 [05:16] mscdex: ajsie: wierd... it prints out both the "DATA" and "Request ended" lines for me [05:16] mscdex: i'm on node 0.4.4 [05:16] mscdex: with curl 7.19.7 [05:17] ajsie: mscdex: with your code it worked [05:17] ajsie: if i registered a req handler in createServer() directly [05:17] mscdex: yeah, so it's something in express [05:18] ajsie: hmm yepp [05:18] ajsie: have to wait for tjo [05:18] mscdex: yeah i was about to say :) [05:18] mscdex: looks like he's gone atm [05:18] ajsie: yeah :( [05:18] ajsie: he is a very good tech supporter=) [05:19] mscdex: you could post on the mailing list too [05:19] ajsie: mscdex: are you using express? [05:19] luke` has joined the channel [05:19] dnolen has joined the channel [05:19] ajsie: i hate mailing lists [05:19] ajsie: so 90s =) [05:19] mscdex: no, i have yet to step foot into web framework stuff [05:19] Vertice has joined the channel [05:19] mscdex: ajsie: google groups has a nice interface [05:19] mscdex: :) [05:19] DTrejo: ajsie: what is IRC? [05:20] ajsie: 70s! [05:20] mscdex: IRC is full of win! [05:20] DTrejo: :) [05:20] ajsie: i hate 90s [05:20] ajsie: love 70s [05:20] luke`_ has joined the channel [05:20] DTrejo: gnight guys, sleep well [05:21] mscdex: time to bust out the odyssey2 then! :-D [05:21] ajsie: odyssey2? [05:22] torgeir has joined the channel [05:24] mscdex: magnavox odyssey2, came out in the late 70's i think [05:24] mscdex: game console :) [05:26] crodas has joined the channel [05:28] codivan has joined the channel [05:29] kenney has joined the channel [05:30] dgathright_ has joined the channel [05:30] ajsie: mscdex: nice little issue https://github.com/visionmedia/express/issues/610 [05:30] ajsie: i feel so good when i have submitted an issue [05:31] mscdex: hehe [05:32] Me1000 has joined the channel [05:32] mscdex: maybe it's specific to PUT... did you try POST? [05:33] beawesomeinstead has joined the channel [05:33] ajsie: mscdex: it didnt work either [05:34] mscdex: huh... strange [05:34] ajsie: but worked for node.js [05:34] ajsie: so it has to do with express like you said [05:34] darshanshankar has joined the channel [05:34] mscdex: is this the latest version of express ? or 1.0? [05:34] ajsie: 1.0.7 [05:35] gozala has joined the channel [05:35] ajsie: i guess its the latest [05:35] mscdex: i think 2.0 is out now [05:36] mscdex: 2.2 looks like the latest git tag [05:36] mscdex: ooo "Express 1.x is compatible with node 0.2.x and connect < 1.0" [05:36] mscdex: maybe there's an issue there [05:37] blueadept: http://pastie.org/private/1i4pgqilmmc8nvpwuxps7q anyone know why i might be getting a type error on this line of code? [05:37] mscdex: ajsie: migration guide is here for 1.x to 2.x: http://expressjs.com/migrate.html [05:38] mscdex: blueadept: yeah, comments is undefined :) [05:38] ajsie: mscdex: why do i get the 1.0.7 version with npm install [05:39] blueadept: mscdex: refresh, now look at how i have defined the variables [05:39] blueadept: i have it defined in the commnets as Comment Schema which is set up at the top [05:40] mscdex: blueadept: oh, sorry, i'm not familiar with that nosql stuff yet :S [05:40] mscdex: whichever db that is [05:40] deepthawtz has joined the channel [05:40] blueadept: ah ok, yeah its mongoose [05:40] mscdex: ajsie: i'm not sure, i don't even see it on search.npmjs.org [05:41] ajsie: maybe he has not updated the npm [05:41] ajsie: im wondering .. should one use npm to install things or just use the github version [05:41] ajsie: with npm link [05:41] skm has joined the channel [05:42] andrewfff has joined the channel [05:42] mscdex: i dunno, i don't use npm except to occasionally update packages i have on there [05:42] mscdex: i always download from github [05:42] atiti has joined the channel [05:43] ajsie: mscdex: how do you "install" them then? [05:44] mscdex: if i'm using it globally, i stick it in ~/.node_modules [05:44] mscdex: otherwise i just put it in a 'deps' subdirectory of whatever project i'm working on [05:44] ajsie: what are the advantages of this instead of using npm? [05:45] mscdex: less bugs and less hassle? :p [05:45] mscdex: npm stores dependencies though [05:46] mscdex: so i guess you'd have to track those down manually too if you don't have those already [05:46] ajsie: eg. expressjs is dependent on connect [05:46] ajsie: how do i fix this with git repos? [05:46] mscdex: ajsie: you can probably just extract the tarball from the repo into the directory where npm is currently storing express [05:47] mscdex: replace the directory [05:47] michaelku has joined the channel [05:47] isaacs: ajsie: git clone git://github.com/visionmedia/express ; cd express ; git clone git://github.com/visionmedia/connect ./node_modules/connect [05:47] isaacs: ajsie: then do the same for qs and mime [05:48] ajsie: isaacs: i cloned express [05:48] ajsie: and did npm link express [05:48] isaacs: ajsie: k [05:48] ajsie: but i got an error : npm ERR! error linking, rollback Error: No satisfying version found for 'connect'@'>=1.2.0 <2.0.0' [05:49] ajsie: but i have installed latest connect though [05:49] isaacs: ajsie: well, that's clearly not true [05:49] isaacs: ajsie: what version fo npm you usin? [05:49] isaacs: $ npm view 'connect'@'>=1.2.0 <2.0.0' version [05:49] isaacs: connect@1.2.0 '1.2.0' [05:49] isaacs: connect@1.2.1 '1.2.1' [05:50] darshanshankar has joined the channel [05:50] asdfsafdsa: How do I write buffer to console? It comes out as numbers [05:50] ajsie: npm info using npm@0.2.12-1 [05:50] ajsie: npm info using node@v0.4.0 [05:50] ajsie: connect@1.2.0 '1.2.0' [05:50] ajsie: connect@1.2.1 '1.2.1' [05:50] isaacs: ajsie: that is a very very old version of npm. [05:50] ajsie: oh [05:50] ajsie: hmm [05:50] isaacs: ajsie: update to 0.3 at least. [05:50] ajsie: how do i do that [05:50] isaacs: asdfsafdsa: myBuffer.toString() [05:50] isaacs: ajsie: npm install npm [05:51] orch has joined the channel [05:51] isaacs: (update *might* work, but i dunno) [05:51] soulofpeace_ has joined the channel [05:51] ajsie: npm ERR! install failed Error: ENOENT, No such file or directory [05:51] isaacs: ajsie: curl http://npmjs.org/install.sh | sh [05:52] isaacs: ajsie: steamroll over it [05:52] asdfsafdsa: isaacs: thanks [05:53] overra has joined the channel [05:53] ajsie: curl http://npmjs.org/install.sh | sh worked [05:53] ajsie: but not: curl http://npmjs.org/install.sh | npm_install=rc sh [05:53] ajsie: which is on the git page [05:54] ajsie: maybe you should update it or tell people about: curl http://npmjs.org/install.sh | sh [05:55] ajsie: isaacs: still the problem occurs : im doing npm link express and i get: npm ERR! error linking, rollback Error: No satisfying version found for 'connect'@'>=1.2.0 <2.0.0' [05:55] ajsie: npm show connect shows me 1.2.1 version [05:55] ajsie: view i mean [05:56] isaacs: ajsie: oh, i see. connect requires node >=0.4.1 [05:56] isaacs: you have 0.4.0 [05:56] isaacs: so it's ignoring those versions [05:56] ajsie: how did you know i have 0.4.0 [05:56] isaacs: ajsie: scroll up :) [05:57] ajsie: =) [05:57] isaacs: ajsie: npm info using node@v0.4.0 [05:57] ajsie: i dont quite get it all .. so connect needs 0.4.1 .. but i installed 1.2.1 successfully [05:57] ajsie: how come [05:58] bwinton has joined the channel [06:00] tfe_ has joined the channel [06:01] ajsie: however .. installing the latest node.js now [06:03] FireFly|n900 has joined the channel [06:04] ajsie: hah [06:04] ajsie: i did brew install node and i got me 0.2.0 version [06:04] ajsie: so funny [06:06] ajsie: a bad thing about package managers is that they have to be kept up to date .. it's far better if they relied on github repos instead [06:08] Aria: Assuming you trust that github will always be there ;-) [06:12] ajsie: isaacs: feature request: i do "npm dev-install express" and npm should fork the repo from the github to my own one (i enter my credentials) and then it clones it and use that one in ~/npm/repos (or whatever known folder) .. then do "git remote add source " so i can fetch latest changes ... now i could change the code easily to learn, fix bugs, code new features and do pull requests [06:12] skm has joined the channel [06:12] unlink has joined the channel [06:12] isaacs: ajsie: what is your actual use case? you want to check out the code, mess with it, and push it to github? [06:12] isaacs: that sounds like a job for git.. [06:13] ajsie: isaacs: but i cant mess with it if it has a lot of dependencies [06:13] ajsie: cause its using npm [06:13] isaacs: ajsie: ok, so cd into it, and bundle/install the deps [06:13] isaacs: or just cd into it, and do `npm link` [06:14] isaacs: npm will (hopefully!) never be a github client [06:14] ajsie: why is that [06:14] ajsie: github not good enough for hosting packages? [06:15] ajsie: integration is very essential in my mind .. or there will be a lot of manual work if there is no real automated workflow [06:15] meatmanek has joined the channel [06:18] JimBastard has joined the channel [06:18] isaacs: ajsie: github is good for hosting code and collaborating on it [06:18] isaacs: ajsie: but as a package registry, i prefer registry.npmjs.org [06:18] isaacs: which is what npm uses. [06:18] isaacs: publishign a package should be a very deliberate thing [06:18] tbranyen: <3 unpublish [06:19] isaacs: that too^ [06:19] isaacs: you don't usually actually *want* the kind of granularity that git gives you when dealing wiht packages. [06:19] m64253 has joined the channel [06:19] isaacs: what oyu want are human-readable version tags that represent a promise on the part of the develope [06:19] isaacs: r [06:19] ajsie: since source codes === our apps .. and most of them lie on github .. why not use github as _the_ repo (aka package) central .. if your repo is dependent on another repo you just have that repo location and tag in the package.json [06:19] isaacs: ajsie: been there. done that. it sucks. [06:20] jy0ung has joined the channel [06:20] ajsie: isaacs: why? [06:21] ajsie: maybe im wrong then .. it sounded like a good solution [06:21] isaacs: 1. the package metadata is much harder to manage and juggle. for things like searching and listing packages, this is a Big Deal. [06:21] tbranyen: jquery is in the process of hosting all its plugins in git [06:21] tbranyen: will be interesting to see how that works out [06:22] skm has joined the channel [06:22] isaacs: 2. you run into issues where there's a bunch of forks of stuff, and now you have to be concerned with whose copy of foo you'e installed, instead of just which version [06:22] isaacs: 3. now you have to go through git to view the data, or github's json api, instead of couch's native awesomeness [06:22] isaacs: 4. forking the *entire registry* is a lot harder, whereas with couch you can replicate it anywhere. [06:23] isaacs: 5. ownership of a given name is not as clear. [06:23] isaacs: 6. instead of just validating a tarball, shasums become THE way to address things. That is a fail. [06:25] isaacs: don't get me wrong, git is a *damn near perfect* tool for source control tracking. [06:25] AAA_awright: isaacs: That's a feature not a fail [06:25] mike_miller has joined the channel [06:25] isaacs: where you want very low level granularity of tracking every byte of content. [06:25] AAA_awright: And who cares about "ownership" what you are looking for is specific functionality [06:26] AAA_awright: I don't install a package because xyz made it, I might select a package for that reason, but I use it because it offers some functionality that my program depends on [06:26] ph^ has joined the channel [06:26] isaacs: AAA_awright: `npm install express`. which version? becomes whose? what branch? what commit? [06:26] AAA_awright: isaacs: You just listed off everything wrong with `npm install` [06:27] isaacs: AAA_awright: I KNOW!!! and using git for thatwould make it worse, not better. [06:27] isaacs: that's why git-based package managers generally suck. [06:27] tbranyen: does brew count? [06:27] tbranyen: i think just the recipes are stored in git [06:27] AAA_awright: You can't just use git, that's about equally as useless [06:28] isaacs: tbranyen: this is most of my frustration with brew, yes [06:28] AAA_awright: Why would you need a "git-based" package manager when you have submodules [06:28] isaacs: `brew install node` <-- what version does that install? [06:28] ajsie: main reason why im thinking in these circles is that now its divided between git repos and npm packages .. often there is no API doc (or one that sucks) and some bug fixes a developer almost want to look at the source code and bug fix, debug, code new features etc. "install" things are for users only .. developers _need_ to look at the source code.. make changes .. that is part of the everyday life .. so im really pleased with npm li [06:28] ajsie: just clone and do npm link to "install" it locally and use it [06:28] isaacs: AAA_awright: right, and you can do that, easily, just using git, if you want that level of granularity. I do. [06:28] isaacs: AAA_awright: i don't use npm to install npm's dependencies. [06:28] AAA_awright: What does version matter? I'm looking for functionality [06:28] tbranyen: AAA_awright: heh in the case of node [06:28] tbranyen: version matters a hella lot [06:28] isaacs: AAA_awright: because funcrtionality changes between versions. [06:29] tbranyen: big diff between .2, .3, .4, .4.* [06:29] AAA_awright: That's different functionality, who cares about that [06:29] isaacs: AAA_awright: a version is a promise on the part of the developer that a certain set of functionality is present, and that the version will change when the functionality does. [06:29] isaacs: AAA_awright: why not just copy and paste their code then? [06:29] isaacs: you don't care about files, just functionality. [06:29] AAA_awright: Specifically, versioning is semantic in some sense [06:29] AAA_awright: isaacs: Also, NIH syndrome that's why [06:30] isaacs: AAA_awright: yes. commit shas are not semantic in the same way. [06:30] muhqu has joined the channel [06:30] AAA_awright: They identify a perticular library [06:30] AAA_awright: A particular revision of a particular library [06:30] isaacs: AAA_awright: no, they identify a specific set of blo bs. [06:31] isaacs: or a sepcific blob. or a specific commit, or a tree, or any other object that git cares about. [06:31] isaacs: they're as "semantic" as your DNA [06:31] AAA_awright: In general yes, but as it relates to installing libraries [06:31] isaacs: i'd prefer to refer to you as "AAA_awright" rather than GCTCATCAGATCGATAGCATTGATCGACTAGCTGCAGATACG... [06:32] AAA_awright: That's for convienence, not because it's useful in some way/shape/form [06:32] AAA_awright: *otherwise useful [06:32] AAA_awright: That's why tags exist [06:33] isaacs: AAA_awright: you're right. convenience is somehow different from "usefulness" [06:33] samcday: Oooh looks like I came in at the right time :D /popcorn [06:33] deepthawtz has joined the channel [06:35] matyr has joined the channel [06:35] ajsie: isaacs: okay ..so i could/should do this to have a good dev workflow instead of using npm install everytime i want to use/change a repo .. fork it on github .. clone it to my local server .. cat repo/package.json to see all dependencies .. fork and clone them and view deps .. npm link the one without deps .. moving to the next and then the original repo .. thats the workflow for using/changing the repo right? [06:36] k1ttty has joined the channel [06:36] fangel has joined the channel [06:36] isaacs: ajsie: you don't need to read the package.json [06:36] isaacs: ajsie: git clone whatever; cd whatever; npm link; (edit edit, test, test, commit, push, etc.) [06:36] ajsie: npm link takes care of deps? [06:37] isaacs: ajsie: yes [06:37] ajsie: :D [06:37] ajsie: *kisses* [06:37] isaacs: ajsie: and also installs bins and stuff, and doesn't need to be re-run when you make changs. [06:37] isaacs: *changes [06:37] ajsie: yeah i noticed [06:37] ajsie: that is awesome! [06:37] isaacs: writing a github client would be trickier [06:39] marlun has joined the channel [06:39] marlun has joined the channel [06:39] groom has joined the channel [06:40] kristsk has joined the channel [06:40] mhooker has joined the channel [06:42] AAA_awright: isaacs: I'm referring to a particular type/subset of convienence, as in conversation. [06:42] AAA_awright: With package managers particularly ones like apt that have no concept of revisions, it's just a way to download and install things in a pre-determined way. There's no concept of functionality or features, or at least the most it does have if any is "Hey let the man package know that I'm installed" [06:42] AAA_awright: *convenience [06:43] raphdg has joined the channel [06:43] isaacs: sure [06:43] AAA_awright: One of the reasons Git is so much better than other revision control systems is because it tracks _content_ not _files_ [06:43] springify has joined the channel [06:43] isaacs: AAA_awright: when i'm using a package manager, i don't even want to track files [06:43] isaacs: i don't really care what teh files are. [06:44] isaacs: i want to know that when i do "blah" on teh comand line, it'll work like it says it does [06:44] isaacs: or when i do require("blah"), it'll return an object that looks like the docs say it does [06:44] atiti has joined the channel [06:45] AAA_awright: Package managers have yet to catch up on that concept, to track _functionality_ not _libraries_. Git can track a line as it moves across a file in a repository, why can't my package manager track the library with the "parse_date_string" definition or whatever as it travels across packages [06:45] SamuraiJack has joined the channel [06:45] AAA_awright: (If it were to do that, it would be about as uncommon as similar refactoring in a project when you split apart a file) [06:48] ajsie: isaacs: one problem .. i git cloned express from my fork and ran "npm link express" .. it installed everything [06:48] ajsie: connect@1.2.1 active installed High performance middleware framework framework web middleware connect rack [06:48] ajsie: express@9999.0.0-LINK-1d92c63c active installed [06:48] ajsie: mime@1.2.1 active installed A comprehensive library for mime-type mapping util mime [06:48] ajsie: qs@0.0.7 active installed querystring parser [06:48] ajsie: $ express [06:48] ajsie: -bash: /usr/local/bin/express: No such file or directory [06:48] ajsie: but it cant find it [06:49] isaacs: ajsie: ack. ok. [06:49] ajsie: bug or is it just mine? [06:49] isaacs: not sure [06:49] isaacs: ajsie: ls -laF /usr/local/bin/express* [06:49] isaacs: what's that report^? [06:50] ajsie: lrwxr-xr-x 1 johnnyluu admin 16 Dec 6 10:24 /usr/local/bin/expresso@ -> ./expresso@0.7.0 [06:50] ajsie: -rwxr-xr-x 1 johnnyluu admin 705 Dec 6 10:24 /usr/local/bin/expresso@0.7.0* [06:50] ajsie: i dont want expresso..i want express! [06:56] matyr has joined the channel [06:56] mattikus has joined the channel [06:57] ivanfi has joined the channel [06:58] mike_miller has joined the channel [06:59] mytrile has joined the channel [07:03] nils_r has joined the channel [07:03] yozgrahame has joined the channel [07:04] marlun: I'm having problems with jasmine-node. I've installed it but if I try require('jasmine') I get an error that it can't find module 'jasmine'. npm ls installed lists jasmine-node. [07:04] blaines has joined the channel [07:04] isaacs: marlun: what's `npm config get root -s` print out? [07:05] markwubben has joined the channel [07:05] mikeal has joined the channel [07:05] blaines has joined the channel [07:05] luke` has joined the channel [07:05] marlun: isaacs: /usr/local/lib/node [07:06] marlun: and jasmine-node is also in there. [07:06] isaacs: marlun: echo export NODE_PATH=/usr/local/lib/node >> ~/.bashrc ; . ~/.bashrc [07:06] marcosvm has joined the channel [07:07] drunknbass has joined the channel [07:08] marlun: isaacs: allready in there. Other moduels are working fine. [07:08] isaacs: marlun: oh, ok. maybe it's lacking a "main" field in teh package.json? [07:09] isaacs: marlun: works for me? [07:09] isaacs: > require("jasmine-node") [07:09] isaacs: (node) process.compile should not be used. Use require('vm').runInThisContext instead. [07:09] isaacs: { unimplementedMethod_: [Function] [07:09] isaacs: oh, hay, you're doing require("jasmine") [07:10] isaacs: should be require("jasmine-node") [07:10] isaacs: it's always the name of the pacakge. [07:11] marlun: ah ok. I'm probably also not setting up my project the correct way to use jasmine-node. But I guess that is a question for the jasmine google group :) [07:12] mAritz has joined the channel [07:13] zomgbie has joined the channel [07:13] ajsie: i have a express folder that is also a npm package .. there is a bin/cmd.js that is an executable .. i want to be able to run "cmd" and it will run the express server .. so in my cmd.js i have : require("../app.js") but it doesnt start the server like doing "node app.js" [07:14] isaacs: ajsie: dunno [07:14] ajsie: so i tried with require('child_process').exec('node ' + appPath, callback) [07:15] ajsie: it works but gives me no output on the terminal [07:15] ajsie: just blank [07:15] ajsie: even though node app.js gives me output [07:15] samcday: Child process output doesn't go to terminal [07:15] kawaz_air has joined the channel [07:15] dgathright has joined the channel [07:15] samcday: Unless you pipe it [07:16] marcosvm_ has joined the channel [07:16] ajsie: samcday: http://nodejs.org/docs/v0.4.4/api/child_processes.html#child_process.exec [07:16] ajsie: shouldn't it just output to the console on that example [07:16] ajsie: to stdout [07:17] timcosgrove has joined the channel [07:17] samcday: Oh, yeah I'm retarded - I was thinking of child_process.spawn [07:17] ollie has joined the channel [07:17] timcosgrove has left the channel [07:17] adambeynon has joined the channel [07:18] zomgbie has joined the channel [07:19] Vertice has joined the channel [07:20] drunknbass has joined the channel [07:21] marlun: isaacs: Thanks for the help before :) [07:21] isaacs: np :) [07:22] isaacs: child_process.exec and spawn both have streams [07:22] isaacs: neither one goes ot the std's unless you give it the std fd's as customFds [07:22] isaacs: child_process.spawn("cat", [], { customFds:[0, 1, 2]}) [07:24] jonaslund has joined the channel [07:25] derferman has joined the channel [07:27] jeromegn has joined the channel [07:27] __tosh has joined the channel [07:27] blueadept has joined the channel [07:29] mc_greeny has joined the channel [07:29] ajsie: oh [07:29] msucan has joined the channel [07:29] ajsie: i get the problem now [07:29] ajsie: "High-level way to execute a command as a child process, buffer the output, and return it all in a callback." [07:29] adulteratedjedi has joined the channel [07:30] ajsie: it buffers the output .. when the command is exiting it outputs the buffered output [07:30] ajsie: node app.js don't exit [07:30] ajsie: so i get nothing [07:30] drunknbass has joined the channel [07:30] V1 has joined the channel [07:30] tfe_ has joined the channel [07:30] tfe_ has joined the channel [07:30] tim_smart: ajsie: .exec() also returns the process object [07:31] tim_smart: So you can: child = child_process.exec('command'); child.stdout.pipe(...); [07:31] McMAGIC-- has joined the channel [07:31] harth has joined the channel [07:32] haumold has joined the channel [07:32] ajsie: i dont get the stdout and stdin that well [07:33] shift__ has joined the channel [07:33] kal-EL_ has joined the channel [07:33] tim_smart: stdout and stderr are readable streams on a child process, stdin is a writable stream. [07:34] troessner has joined the channel [07:34] adulteratedjedi has joined the channel [07:36] ajsie: so if i have a child process and it has stdin and stdout .. then i write to stdin ..and it will come out in stdout? [07:38] blueadept: what's a better statement style, example 1, or example 2 ? [07:38] blueadept: http://pastie.org/private/itawaonvlw2h4w0s6worq [07:38] tim_smart: ajsie: stdin and stdout are (st)an(d)ard ways of doing (in)put and (out)put [07:38] ajsie: but was my example correct? [07:39] tim_smart: ajsie: echo "Writing this to stdin" | myapp [07:39] tim_smart: Then 'myapp' will send the processed output to stdout [07:39] tim_smart: Which in the case of the terminal, will be to print it. [07:40] ajsie: tim_smart: yeah now it worked [07:40] tim_smart: Cool [07:40] JimBastard has joined the channel [07:41] ajsie: tim_smart: http://pastie.org/1738373 [07:41] ajsie: the callback was just triggered when the child was excited [07:41] ajsie: so i better listen on the events sent [07:42] drunknbass has joined the channel [07:46] zakabird: 1 [07:46] eschnou has joined the channel [07:47] nils_r has joined the channel [07:48] ajnasz has joined the channel [07:49] koti has joined the channel [07:49] koti has left the channel [07:50] ajsie: tim_smart: this worked too [07:50] ajsie: child = exec('node ' + appPath); [07:50] ajsie: child.stdout.pipe(process.stdout) [07:50] ajsie: thanks for the tip ... now i get how it works :) [07:51] drunknbass has joined the channel [07:52] mhausenblas has joined the channel [07:52] mhausenblas_ has joined the channel [07:53] samal has joined the channel [07:54] auscompgeek has joined the channel [07:55] beawesomeinstead has joined the channel [07:59] tk has joined the channel [08:02] pomodoro has joined the channel [08:02] adulteratedjedi: [08:03] jbergstroem has joined the channel [08:03] tisba has joined the channel [08:03] secoif has joined the channel [08:03] mraleph has joined the channel [08:04] meso_ has joined the channel [08:06] zomgbie has joined the channel [08:08] Croms has joined the channel [08:09] m64253 has joined the channel [08:10] auscompgeek: adulteratedjedi: what's with the blank line? [08:10] V1: Free spacing [08:13] adulteratedjedi: sorry, it was a case of having the wrong window focused and looking out the window whilst typing lol [08:15] __tosh has joined the channel [08:17] zomgbie has joined the channel [08:19] herbySk has joined the channel [08:20] jonaslund has joined the channel [08:24] stagas: SubStack: ping [08:25] Charuru has joined the channel [08:25] aklt has joined the channel [08:27] SubStack: pong [08:27] pdrummond has joined the channel [08:28] zomgbie has joined the channel [08:28] stagas: SubStack: what's sesame expecting from a db store? [08:29] mhausenblas_ has joined the channel [08:29] SubStack: a way to pull down all records and a setter [08:30] TomY_ has joined the channel [08:31] luke`_ has joined the channel [08:31] tbranyen: i'd say presence is one of my favorite zeppelin albums... but i mean [08:31] tbranyen: it feels wrong having to pick one [08:31] pdrummond has joined the channel [08:31] saikat has joined the channel [08:34] YongdongNode has joined the channel [08:34] YongdongNode: Hi there [08:34] YongdongNode: Anybody around ? [08:34] ntelford has joined the channel [08:35] adulteratedjedi: YongdongNode: ish... [08:35] YongdongNode: I need some help on "https.request" [08:35] YongdongNode: This is the problem : http://groups.google.com/group/nodejs/browse_thread/thread/26fe89b18cb7280f [08:36] skohorn has joined the channel [08:37] YongdongNode: :-/ [08:39] mhausenblas_ has joined the channel [08:39] matyr_ has joined the channel [08:45] sh1mmer has joined the channel [08:50] chapel: what are your options? [08:51] skm has joined the channel [08:55] pdelgallego has joined the channel [08:57] tmzt_: SubStack: could browserify + chrome be used to prototype a node webserver offline? [08:57] forzan has joined the channel [08:58] tmzt_: also, do you think express or something with an express-like api would work on top of browserify [08:59] bzinger has joined the channel [09:00] bzinger has joined the channel [09:02] tbassetto has joined the channel [09:04] Jonasbn_ has joined the channel [09:05] zomgbie has joined the channel [09:06] teemow has joined the channel [09:08] SubStack: tmzt_: if you wrote a wrapper around net and http then possibly [09:08] eirikurn has joined the channel [09:09] tmzt_: I'm thinking of having something under http, like with fcgi, it doesn't make sense to parse HTTP when fcgi doesn't need it [09:09] nivoc has joined the channel [09:10] tmzt_: and logically, running http middleware/framework in the browser if replacing the HTTP request from the network with an event ultimately traced to clicking on a link (say in jquery) [09:10] tmzt_: and providing a buffer (really a DOM .innerHTML target) for the results, instead of a socket/stream [09:12] xla has joined the channel [09:13] m00p has joined the channel [09:15] mike5w3c has joined the channel [09:16] Validatorian has joined the channel [09:16] skm_ has joined the channel [09:16] chapel: see sammy.js and backbone.js for what you are talking about [09:16] chapel: sammy.js does a sinatra style syntax [09:16] chapel: very similar to express [09:17] d0k has joined the channel [09:17] tmzt_: I know, I love sammy for handling POSTs, though it's hashchange implmentation is too heavy/buggy [09:17] tmzt_: so I've revereted to using jq for POSTs [09:18] tmzt_: backbone is pretty confusing, it might be because most of the docs I've read mostly talk about underscore [09:18] tmzt_: but in either case, I want the same routes and the same routing whether done client side or server side, this is the power of using javascript [09:18] robhawkes has joined the channel [09:18] kuwabara has joined the channel [09:19] chapel: heh tmzt_ [09:19] tmzt_: the same code should be able to be used on both, like having a unified ORM, having a remoted version (dnode-based) and a local version [09:19] chapel: well there are many ways to handle it [09:20] chapel: I am working on a dnode/backbone implementation that I would like to make that a simple process (having the same dynamic/static routes) [09:20] FireFly|n900 has joined the channel [09:20] SubStack: guybrush too! [09:20] tmzt_: cool [09:20] chapel: yeah [09:20] chapel: well Im sure its not new [09:20] SubStack: https://github.com/guybrush/backbone-rpc-example [09:21] chapel: and in fact Ive been talking about it for a long time [09:21] SubStack: could look at this for ideas [09:21] tmzt_: anyway, what I mean about prototyping, I would like to be able to visit a webpage, even one that's offline, and put together a node+express+dnode+[backbone,etc.]+jade(or ejs) application [09:21] chapel: when people were doing socket.io/backbone stuff [09:21] tmzt_: using local storage for sql, and having one ORM (like rails does) with the power of mongoose, backbone, sequalous, etc. [09:22] tmzt_: and it wouldn't have to be chrome, that just makes sense because it's v8, but if it's es5 it should work on firefox too [09:22] stagas: SubStack: I get Error: A ProxyHandler must have the property 'enumerate' on all examples in sesame [09:22] tmzt_: then this would all be deployable with just FTP and fcgi to any host (when they start compiling node) [09:22] Remoun has joined the channel [09:23] SubStack: peculiar that is an issue with harmony proxies [09:23] Evet has joined the channel [09:24] markwubben has joined the channel [09:24] tmzt_: hey, if you already have a fully js ssh client, then implementing a sftp client wouldn't be so hard [09:25] tmzt_: though you need a real socket class in the browser, which is unlikely because of security restrictions [09:25] saschagehlich has joined the channel [09:25] tmzt_: so I guess it still has to be a browser extension [09:26] shiawuen has left the channel [09:27] stagas: SubStack: ok had to reinstall node-proxy@latest [09:29] fenngle has left the channel [09:36] eee_c has joined the channel [09:39] dcelix has joined the channel [09:40] m64253 has joined the channel [09:40] nivoc has joined the channel [09:41] matyr has joined the channel [09:45] stagas: SubStack: sent you a pull on node-sesame, needs chaos@latest [09:46] ozzymcduff_ has joined the channel [09:48] mattikus has joined the channel [09:51] abraxas: Do you guys consider NodeJS to be stable/ready for production environments? (compared to say PHP, ..) [09:53] fermion has joined the channel [09:53] mbrochh]2 has joined the channel [09:53] unfo-: I don't consider PHP to be ready for production environments, but that's just my opinion ;) [09:54] jesusabdullah: lol [09:55] abraxas: That's fine :) But I'm mentioning it, because that, in my case, is an accepted level of stability. [09:55] abraxas: (ie: I'm not developing software to run a bank) [09:55] mape: abraxas: people are building buisnesses on it [09:55] JimBastard: abraxas: we use node for production stuff all the time [09:55] abraxas: Great [09:55] d0k has joined the channel [09:56] JimBastard: you just need to understand the risks of using software which is pre v1.0.0 as per SemVer [09:56] JimBastard: and plan accordingly [09:56] abraxas: That sounds reasonable. [09:56] abraxas: Is NodeJS at a point where, if a serious bug is discovered, an update will be released within days? [09:58] JimBastard: abraxas: If it could be fixed within a few days and warranted an immediate fix, sure? [09:58] abraxas: Good [09:59] markc has joined the channel [09:59] pdelgallego_ has joined the channel [10:00] fly-away has joined the channel [10:00] daglees has joined the channel [10:03] mape: abraxas: joyent.com is running a lot of software on node [10:03] mape: and ryan works there [10:04] mape: https://no.de/ [10:04] syskk: any way I can improve this http://pastebin.com/4rtAYCja or make it work? [10:04] syskk: the chmod seems to faill all the time [10:05] pdelgallego_ has joined the channel [10:06] noocx has joined the channel [10:06] noocx: hi [10:07] e-sev has joined the channel [10:07] e-sev has left the channel [10:08] abraxas: So, can anyone tell me if Joyent has a datacenter in Japan? (or is this the wrong chan for that?) [10:10] beejeebus has joined the channel [10:11] unlink has joined the channel [10:11] unlink has joined the channel [10:13] [AD]Turbo has joined the channel [10:17] ajnasz has joined the channel [10:18] no-gooder has joined the channel [10:18] Maarten_ has joined the channel [10:18] abraxas: I'm getting mixed messages on that. [10:18] no-gooder has left the channel [10:20] mape: abraxas: tried their support? [10:20] Maarten_: Hi! Let me just barge in here.I'm trying to install node on w7 and have already installed cygwin. I'm using the cygwin bash shell to try and copy the repository from github, but I keep getting the error "fatal: unable to connect to a socket (connection time out)" [10:21] fangel has joined the channel [10:21] tokumine has joined the channel [10:22] ajnasz has left the channel [10:26] skm has joined the channel [10:27] SubStack: stagas: pushed your sesame stuff [10:27] SubStack: also included chaos in the test suite [10:27] asabil has joined the channel [10:28] stagas: SubStack: great! :) [10:29] zomgbie has joined the channel [10:30] SubStack: featured prominently in the readme too [10:30] SubStack: i like it when sessions are stupid simple [10:30] eirikurn has joined the channel [10:33] vckt has joined the channel [10:34] nivoc has joined the channel [10:36] stagas: I like when everything is stupid simple :P [10:38] bergie has joined the channel [10:38] troessner has joined the channel [10:39] SubStack: and there, now comprehensive integration testing with connect and express over each of the supported persistent backends [10:39] tmzt_: abraxas: it also shares code with v8, so if the bug was in the v8 side it could be fixed there as it also probably affects chrome [10:40] abraxas: Right [10:40] tmzt_: SubStack: do you think a unified ORM could work, with extensions for things like mongo that need their own query syntax? [10:40] abraxas: mape: not yet, just been pondering hosting at Joyent if they host in Japan (latency is crucial for us). [10:41] SubStack: tmzt_: probably not without sucking an awful lot [10:41] SubStack: databases are too fundamentally dissimilar [10:42] SubStack: couch versus redis versus mongo versus postgres [10:42] tmzt_: sequolous and mongoose actaully look pretty simialr [10:42] SubStack: requires different ways of tackling the problem [10:42] SubStack: probably you can find some common subset for specific problems like what sesame does for session management [10:43] gmanika: I want to have node.js and python talk. Is there any RPC scheme that is preferred/"more standard" on the node.js side? [10:43] SubStack: but I'm not so sure the databases are similar enough to have a nice ORM that abstracts over all of them in a reasonable way [10:43] tmzt_: yes, but session management in all those cases doesn't really need an ORM [10:43] tmzt_: there are dnode bindings for python aren't there? [10:43] jesusabdullah: Not yet [10:43] SubStack: they don't work yet [10:43] jesusabdullah: I half-started them [10:43] jesusabdullah: I'm gonna tackle them in May sometime [10:44] jesusabdullah: probably [10:44] gmanika: heh I was looking at jesusabdullah's github repo right now :) [10:44] SubStack: it should be easier now that I split up the protocol logic into dnode-protocol [10:44] jesusabdullah: In the meantime, both should be able to use json-rpc [10:44] jesusabdullah: Yeah, that's my thinking as well [10:45] jesusabdullah: I also want to take a look at twisted. I think it may work well for this [10:45] tmzt_: anybody tried redis keyed on mongo's ObjectID? [10:45] jesusabdullah: I'd talk some more, but sleep calls [10:46] dsirijus has joined the channel [10:46] tmzt_: gmanika: easiest would be REST really, not the best [10:46] tmzt_: also, possibly one of the message queues? (rabbit or ampq) [10:46] SubStack: I've built REST interfaces in python [10:46] SubStack: harder than it should have been really [10:46] tmzt_: not bad with cherrypy [10:46] SubStack: I guess that is partly my disdain for databases seeping through [10:47] tmzt_: maybe the solution isn't ORM, but to have a query syntax that supports joins and nosql stuff, as well as just primary keys [10:48] tmzt_: then build the ORM on top of that [10:48] romcok has joined the channel [10:48] misterncw has joined the channel [10:48] tmzt_: so you have both a unified query builder api, and a unified ORM api, but different implmentations for different DBs (using DB-specific features where appropriate) [10:50] unomi has joined the channel [10:50] SubStack: you could get really mischievous and transform the AST of cb.toString() [10:50] SubStack: to generate queries [10:51] romcok: Hi guys, someone can help me? I have problem with npm. I installed some packages as global installation under root and now i cannot use it with other users in system [10:52] Evet has left the channel [10:52] ajsie: is there node.js app that automate things? [10:52] ajsie: kinda like Thor for ruby [10:53] nivoc has joined the channel [10:53] Twelve-60` has joined the channel [10:54] romcok: ajsie: jake? [10:54] ajsie: jake is more like rake [10:54] ajsie: not Thor [10:54] ajsie: for system wide operations [10:56] tmzt_: system wide really means directory wide now doesn't it? [10:56] tmzt_: SubStack: cb.toString()? [10:56] ajsie: yeah [10:57] SubStack: v8: (function (x) { return 4 < x < 10 }).toString() [10:57] v8bot: SubStack: "function (x) { return 4 < x < 10 }" [10:57] SubStack: parsing that AST [10:57] SubStack: to generate queries [10:57] ajsie: or am i forced to write my own [10:57] SubStack: would be so awesomely hackish [10:57] tmzt_: ah [10:57] tmzt_: what is cb though [10:58] SubStack: a query callback [10:58] tmzt_: ah [10:58] tmzt_: yeah that would be awesome [10:58] stagas: did a really stupid module https://github.com/stagas/jsontry [10:58] tmzt_: does reduce do something like ethat? [10:58] tmzt_: also, for mongo/couch, push the js to the db [10:58] tmzt_: after sanatizing it [10:58] SubStack: yep! [10:58] SubStack: well sanatizing and passing in parameters [10:59] SubStack: which you could do with the AST transform and some eval() hackery [10:59] tmzt_: I think that sequolous, mongo-native, zend use about the same json jquery syntax though [10:59] tmzt_: it's not bad [10:59] romcok: hey, i get this error: Error: Cannot find module 'cradle', but i have cradle package already installed :( , someone can tell me where is the problem? [11:00] littke has joined the channel [11:00] SubStack: but imagine how awesome it would be to just write pure javascript [11:00] tmzt_: I guess what's really needed is a libdrizzle-native with localstorage based sqlite binding [11:00] SubStack: without having to bend your problem around a direct query DSL [11:00] tmzt_: {$js : (function(params..){})} [11:01] tmzt_: of just typeof to function, but I don't know if that collides [11:01] chapel: stagas: whats the point of that? [11:02] benmonty has joined the channel [11:02] tmzt_: what I really want is to be able to write some ORM-dependent code and deply on fcgi/mysql, browserify/localstorage (or remoted ORM) and mongo [11:02] tmzt_: with redis-based cache [11:03] stagas: chapel: JSON.parse will throw if it's not proper json, and I was tired of rewriting that function in almost every project :P [11:04] chapel: uhh, well send it proper json [11:04] chapel: :P [11:04] stagas: why not try catch it [11:04] tmzt_: and return null? [11:05] chapel: idk, I just dont see the reason, the whole point of parsing json, is to parse json [11:05] tmzt_: sounds like the c# I was writting last year [11:05] tmzt_: everything was try{parseSomething}catch{return null} [11:05] stagas: of course, but why not get the original value back instead of throwing and do something with that? [11:05] tmzt_: (no LINQ-to-sql on that version of vs) [11:06] tmzt_: how hard would a regex to clean up js-valid syntax to json be? [11:06] chapel: eh, or why not write it to work with a callback and send an error up the stack [11:06] chapel: or stagas why not run it through JSON.stringify if it fails :P [11:06] chapel: then parse it [11:07] tmzt_: how do you run a string through stringify? [11:07] tmzt_: if you can parse it why do you need stringify? [11:07] stagas: it will return the same object [11:07] chapel: v8: JSON.stringify({test: 'test'}); [11:07] v8bot: chapel: "{\"test\":\"test\"}" [11:07] tmzt_: you might also want to put your code in lib :) [11:07] k1ttty has joined the channel [11:08] Nexxy has joined the channel [11:08] tmzt_: why are you returning a string? [11:08] chapel: v8: JSON.stringify('{test: "test"}'); [11:08] v8bot: chapel: "\"{test: \\"test\\"}\"" [11:09] chapel: odd [11:10] stagas: a string is a valid json object [11:10] skm has joined the channel [11:10] tmzt_: yeah function(o, cb) { try ( var o = JSON.parse(o); cb(null, o); } catch{ cb('error', o); }}; [11:10] Nexxy: I needs opinion: best mongdb ORM for node? [11:10] tmzt_: yes it is, but it's still a string when it comes out [11:11] chapel: tmzt_: I think that would be more valuable [11:11] chapel: then you could throw it up the stack and not get a hard throw [11:11] Nexxy: I liek mongoose. Is good? [11:12] tmzt_: but if you want a sync version, just return null and test for null [11:12] tmzt_: but, null is valid json as well [11:12] tmzt_: v8: JSON.stringify(null) [11:12] v8bot: tmzt_: "null" [11:13] tmzt_: v8: JSON.parse('null') [11:13] v8bot: tmzt_: null [11:13] chapel: v8: var jsontry = function(o, cb) { try ( var o = JSON.parse(o); cb(null, o); } catch{ cb('error', o); }}; jsontry('{test: "test"}', function(err, data) { if (err) return console.log(err); else console.log(data); }); [11:13] v8bot: chapel: SyntaxError: Unexpected token ( [11:14] chapel: bah [11:14] tmzt_: v8: var f = function(o, cb) { try ( var o = JSON.parse(o); cb(null, o); } catch{ cb('error', o); }}; f('null', function(err, o) { console.log(err); console.log(o)}); [11:14] v8bot: tmzt_: SyntaxError: Unexpected token ( [11:14] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch{ cb('error', o); }}; f('null', function(err, o) { console.log(err); console.log(o)}); [11:14] v8bot: tmzt_: SyntaxError: Unexpected token { [11:14] mscdex: heh [11:14] benmonty: hi, does anybody know if there is an irc channel for express? [11:14] chapel: v8: var jsontry = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch{ cb('error', o); }}; jsontry('{test: "test"}', function(err, data) { if (err) return console.log(err); else console.log(data); }); [11:14] v8bot: chapel: SyntaxError: Unexpected token { [11:15] mscdex: benmonty: this channel pretty much [11:15] bwinton has joined the channel [11:15] benmonty: mscdex: thanks [11:15] saschagehlich: is there a way to calculate the size of an object in bytes? [11:15] chapel: v8: var jsontry = function(o, cb) { try{ var o = JSON.parse(o); cb(null, o); } catch{ cb('error', o); }}; jsontry('{test: "test"}', function(err, data) { if (err) return console.log(err); else console.log(data); }); [11:15] v8bot: chapel: SyntaxError: Unexpected token { [11:15] chapel: bah no more [11:15] chapel: sorry [11:15] tmzt_: benmonty: question? [11:15] mscdex: chapel: you're missing (e) after catch [11:15] chapel: ACTION doesn't use try/catch [11:15] tmzt_: both of us [11:15] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch(ex){ cb('error', o); }}; f('null', function(err, o) { console.log(err); console.log(o)}); [11:16] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch(ex){ cb('error', o); }}; f('"x"', function(err, o) { console.log(err); console.log(o)}); [11:16] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch(ex){ cb('error', o); }}; f('"x"', function(err, o) { console.log(err); console.log(o)}); f [11:16] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch(ex){ cb('error', o); }}; f [11:16] v8bot: tmzt_: function (o, cb) { try { var o =… [11:16] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch(ex){ cb('error', o); }}; f('"x"', function(err, o) { console.log(err); console.log(o);}); f [11:16] chapel: hmm [11:16] Nexxy: holy pastebin [11:16] tmzt_: v8: var f = function(o, cb) { try { var o = JSON.parse(o); cb(null, o); } catch(ex){ cb('error', o); }}; f('"x"', function(err, o) { console.log(err); console.log(o);}); [11:16] mscdex: :S [11:16] chapel: ? [11:17] tmzt_: v8: var f = function(s, cb) { try { var o = JSON.parse(s); cb(null, o); } catch(ex){ cb('error', o); }}; f('"x"', function(err, o) { console.log(err); console.log(o);}); [11:17] tmzt_: I don't get it [11:17] tmzt_: v8: var f = function(s, cb) { try { var o = JSON.parse(s); cb(null, o); } catch(ex){ cb('error', o); }}; f('"x"', null); [11:17] v8bot: tmzt_: TypeError: object is not a function [11:18] chapel: v8: var jsontry = function(o, cb) { try{ var o = JSON.parse(o); cb(null, o); } catch(e){ cb(e, o); }}; jsontry('{test: "test"}', function(err, data) { if (err) return console.log(err); else console.log(data); }); [11:18] v8bot: chapel: {stack:"SyntaxError: Unexpected token ILLEGAL\n at Object.parse (native)\n at eval at (evalmachine.:26:5)\n at eval at (evalmachine.:26:5)\n at evalmachine.:26:9\n at evalmachine.:30:2\n at Socket.run (/home/inimino/v8bot/lib/sandbox/shovel.js:76:19)\n at Socket.emit (events.js:39:17)\n at Socket._onReadabl [Output truncated...] [11:18] chapel: there [11:19] demolithion has joined the channel [11:19] benmonty has joined the channel [11:19] beawesomeinstead has joined the channel [11:20] romcok has left the channel [11:21] benmonty: i'm building my first express web app (a blog) and i'm having some issues getting the regular expression constraints to work on my routes. i'm attempting to view a post with '/post/:id(\d+)', but it responds with "Cannot GET /post/0". however, if i do something like '/post/:id(1), it displays the post with id=1, but not any other posts. [11:22] matyr_ has joined the channel [11:22] chapel: the :id and regex don't work together [11:22] chapel: its and either or thing as far as I remember [11:23] eyesUnclouded has joined the channel [11:24] benmonty: hmm. i'm using the syntax described by http://expressjs.com/guide.html (right before the "Passing Route Control" section) [11:24] chapel: idk, I haven't messed with it in some time [11:25] tim_smart: npm install gista <3 [11:25] chapel: gista? [11:25] broofa_ has joined the channel [11:27] eirikurn: benmonty: I don't see your syntax explained in the guide [11:27] chapel: tim_smart: you know I created ngist [11:27] FireFly has joined the channel [11:27] eirikurn: benmonty: seems mostly to be either regex or :syntax with limited * and ? support [11:27] tim_smart: chapel: Yeah I saw that as I got permission errors trying to publish as 'ngist' :p [11:27] noocx has joined the channel [11:28] benmonty: eirikurn: first paragraph _above_ http://expressjs.com/guide.html#passing-route control [11:28] sth: has anyone done much with working with binary data in node? [11:29] benmonty: eirikurn: "Typically we may use a “dumb” placeholder such as “/user/:id” which has no restrictions, however say for example we are limiting a user id to digits, we may use ‘/user/:id(\d+)’ which will not match unless the placeholder value contains only digits." [11:29] eirikurn: benmonty: ok, see it now. quite a small paragraph for such a cool feature [11:29] chapel: tim_smart: was ngist not adequate enough? [11:29] benmonty: eirikurn: yeah :) [11:29] tim_smart: chapel: I wanted stdin [11:30] tim_smart: Unless you already have it? [11:30] chapel: well it would have been really easy for me to add stdin [11:30] chapel: no one requested it [11:30] chapel: but eh [11:30] chapel: whatever [11:30] FireFly|n900 has joined the channel [11:31] tim_smart: chapel: I also made node-gist as part of it [11:31] chapel: ngist has a module already :) [11:32] chapel: ngist = require('ngist'); [11:32] tim_smart: Yeah, I wanted to keep my cli seperate :p [11:32] chapel: but no worries [11:32] tomask has joined the channel [11:32] tomask has joined the channel [11:32] eirikurn: benmonty: which quotes did you use when you tried the syntax. the backslash in "\d" might have failed [11:34] kmiyashiro has joined the channel [11:34] tmzt_: benmonty: are those strings or regexes? [11:34] tmzt_: is it possible to name capture groups with Object regexes? [11:34] tmzt_: and do those work for express as params [11:35] eirikurn: tmzt_: was wondering the same. the guide only mentioned numeric capture groups. [11:35] eirikurn: but I would assume named groups should work the same [11:35] mscdex: you can't do named capture groups in js regex [11:35] mscdex: afaik [11:35] tmzt_: v8 /:test(\d)/ [11:35] v8bot: tmzt_: v8 is no longer supported (except in PM). Try v8: or v8> [11:35] tmzt_: v8: /:test(\d)/ [11:35] v8bot: tmzt_: /:test(\d)/ [11:36] benmonty: i tried both single and double quotes with no luck [11:36] tmzt_: v8: /:test(\d)/.match('1') [11:36] v8bot: tmzt_: TypeError: Object /:test(\d)/ has no method 'match' [11:36] mbrochh has joined the channel [11:36] astropirate has joined the channel [11:37] lightharut has joined the channel [11:38] lightharut: how to delete record in collection using node.js mongodb native driver? [11:38] joshontheweb has joined the channel [11:39] tmzt_: v8: var r = /:test(\d); '1'.match(r) [11:39] v8bot: tmzt_: SyntaxError: Invalid regular expression: missing / [11:39] tmzt_: v8: var r = /:test(\d)/; '1'.match(r) [11:39] v8bot: tmzt_: null [11:39] tmzt_: v8: var r = /(\d)/; '1'.match(r) [11:39] v8bot: tmzt_: ["1","1"] [11:40] eirikurn: tmzt_: that is not a syntax for named groups. it's express's extension [11:40] ph^ has joined the channel [11:41] tmzt_: http://xregexp.com/ [11:41] tmzt_: I see that [11:41] tmzt_: v8: var r = /(?Ptest(\d))/; '1'.match(r) [11:41] v8bot: tmzt_: SyntaxError: Invalid regular expression: /(?Ptest(\d))/: Invalid group [11:41] eirikurn: tmzt_: built in named groups are more like (?) [11:41] eirikurn: and google confirms js doesn't support named groups, sadly [11:42] tmzt_: v8: var r = /(?(\d))/; '1'.match(r) [11:42] v8bot: tmzt_: SyntaxError: Invalid regular expression: /(?(\d))/: Invalid group [11:42] tmzt_: right [11:43] tmzt_: v8: var x = require('http://xregexp.com/xregexp-min.js'); [11:43] v8bot: tmzt_: ReferenceError: require is not defined [11:43] tmzt_: right, of course [11:43] eirikurn: tmzt_: but reading express's source, it seems to include special logic for "/:id(regex)" syntax [11:43] tmzt_: in any case, it would require that the regex be expressed as a string, might as well just extend express [11:44] eirikurn: benmonty: so it should work [11:44] tmzt_: v8: var r = new RegExp() [11:44] v8bot: tmzt_: undefined [11:44] tmzt_: v8: var r = new //; [11:44] v8bot: tmzt_: SyntaxError: Unexpected end of input [11:44] tmzt_: v8: var r = //; [11:44] v8bot: tmzt_: SyntaxError: Unexpected end of input [11:44] tmzt_: v8: var r = new RegEx() [11:44] v8bot: tmzt_: ReferenceError: RegEx is not defined [11:45] tmzt_: eirikurn: how does express convert the string to a RegExp? [11:46] eirikurn: connect/lib/middleware/router.js:normalizePath() [11:46] eirikurn: it matches a slash or a dot, the capture name, an optional regex group "anything contained in ()" and the optional symbol ? [11:47] eirikurn: if regex group is skipped, it will use "([^/]+?)" instead [11:47] benmonty: just as an FYI guys, this is my 2nd day playing around with node/express [11:47] benmonty: and i installed everything using npm install [11:48] benmonty: so i'm assuming that everything i have is up to date [11:48] ph^ has joined the channel [11:48] benmonty: not sure if you tried to reproduce the issue or not [11:48] eirikurn: benmonty: haha, 2 days is old in node land :D [11:48] eirikurn: but you can always run npm update [11:48] tmzt_: v8: var r = new RegExp('/x/') [11:48] v8bot: tmzt_: undefined [11:48] tmzt_: v8: var r = new RegExp('/x/'); r [11:48] v8bot: tmzt_: //x// [11:49] benmonty: eirikurn: i like what i see :) [11:49] jeremyselier has joined the channel [11:49] benmonty: i'm coming from the perl/catalyst world [11:49] eirikurn: yes, it's a lot of fun [11:49] tmzt_: benmonty: there's also a way to trap the :id earlier than the individual route [11:49] tmzt_: you could just validate it there [11:50] benmonty: tmzt_: it's cool. i'm just playing around and don't really need to do validation on anything. [11:51] benmonty: tmzt_: i'll just go submit a but report or request that the guide stays in sync with the project :P [11:51] nivoc has joined the channel [11:51] benmonty: btw, did you guys try to reproduce the issue? [11:52] tmzt_: do params callbacks work in experss? [11:53] benmonty: mm, not exactly sure what that means [11:53] benmonty: you can do app.param('my_custom_param', function () ... ); [11:53] nonnikcam has joined the channel [11:54] benmonty: and then use '/my/route/:my_custom_param' [11:54] tmzt_: oh, you can just use params[] [11:54] tmzt_: like params[0] [11:54] benmonty: yeah, that too [11:54] tmzt_: then capture groups should work [11:56] devrim has joined the channel [11:56] ivanfi has joined the channel [11:56] benmonty: idk, if i were working on a bigger project, i would be hesitant to do my validation inline like that anyway [11:57] benmonty: maybe it's better than i can't :P [11:57] benmonty: s/than/that/ [11:58] tmzt_: just use parseInt :)) [11:58] pdelgallego has joined the channel [11:58] tmzt_: and typeof != 'NaN' I think [11:58] mscdex: isNaN() [11:58] mscdex: v8: isNaN [11:58] v8bot: mscdex: function isNaN() { [native code]… [11:59] tmzt_: ok [11:59] tmzt_: v8: NaN [11:59] v8bot: tmzt_: NaN [11:59] tmzt_: v8: typeof NaN [11:59] v8bot: tmzt_: "number" [11:59] tmzt_: ah [11:59] tmzt_: right [11:59] mscdex: :) [11:59] tmzt_: the age old quandry [12:00] JimBastard has joined the channel [12:00] tmzt_: v8: NaN == null [12:00] v8bot: tmzt_: false [12:00] tmzt_: v8: NaN == 0 [12:00] v8bot: tmzt_: false [12:00] tmzt_: v8: NaN + 0 [12:00] v8bot: tmzt_: NaN [12:01] tmzt_: v8: 0 + 0 [12:01] v8bot: tmzt_: 0 [12:01] tmzt_: v8: NaN * 0 [12:01] v8bot: tmzt_: NaN [12:01] michaelku: Hi, does anyone know an api/lib to emit big JSON documents to streams, without building them in memory as JS objects first? [12:01] tmzt_: well, so I think we can implment logic on top of that [12:01] tmzt_: instead of bools [12:01] suckerpunch has joined the channel [12:02] SubStack: michaelku: https://github.com/DTrejo/json-streamify [12:02] benmonty: tmzt_ & eirikurn, i'm going to head out. thanks for your help [12:03] tmzt_: bitwise? [12:03] tmzt_: I think I'm bored [12:04] michaelku: SubStack: thanks — I think this is exactly what I didn’t find on google somehow [12:04] shaunau has joined the channel [12:05] mischief has joined the channel [12:05] alek_br has joined the channel [12:06] charlenopires has joined the channel [12:07] charlenopires has joined the channel [12:09] eee_c has joined the channel [12:09] charlenopires has joined the channel [12:10] thegreatape has joined the channel [12:10] mattikus has joined the channel [12:11] some1else has joined the channel [12:11] pdelgallego_ has joined the channel [12:13] ajsie: why does node have readFileSync [12:13] ajsie: who not readFile(..., false) to specify sync [12:13] ajsie: looks so stupid with Sync after the method names [12:14] ajsie: ryah: reconsider! [12:14] mscdex: ajsie: because async functions always use callback as the last parameter [12:14] mscdex: and the Sync prefixes makes it clear that it's the sync version [12:14] mscdex: er postfix [12:14] SubStack: because if you really shouldn't be using it very often then it should look a little bit stupid [12:14] ajsie: SubStack: =) [12:15] ajsie: maybe .. if i dont pass a callback then its synced [12:16] ajsie: or if i pass false then its synced [12:16] ajsie: will look neater [12:16] ajsie: reconsider! [12:17] eirikurn: a single sync call will stall the event loop. [12:17] eirikurn: which is BAD, for scaling [12:17] eirikurn: so it should be very obvious for the only few ways that allow that to happen [12:17] eb4890 has joined the channel [12:17] ElDios has joined the channel [12:18] ajsie: eirikurn: still not a good excuse imo to have an ugly API =) [12:19] ajsie: false is false .. if you set false you know its synced .. if you don't understand you dont get node.js and shouldn't use it in the first place or learn it right? [12:20] matyr has joined the channel [12:21] eirikurn: funny, cuz in .Net Framework, all api's are by default sync, and include an alias with a Async postfix :) [12:23] eirikurn: but I see what you mean. I just doubt it will change since node's fundamental mantra is to frown upon all things sync [12:24] mscdex: ajsie: the thing is you can leave off callbacks for async functions and have it work just fine [12:25] mscdex: for things that you don't care when they finish [12:25] mscdex: it's probably not a good idea, since errors can happen, but still [12:25] tyler_boyd has joined the channel [12:25] ajsie: mscdex: yeah but a false could set that to sync [12:25] mscdex: meh [12:25] ajsie: anyway =) [12:26] shaunau: ajsie: i'd prefer it the way it is because it's clear explicit [12:26] mscdex: i personally like the *Sync, it's more clearer [12:26] mscdex: as to what you're doing [12:26] shaunau: yap [12:26] eyesUnclouded has joined the channel [12:26] shaunau: s/a/e [12:26] ajsie: and since we all just use asynched version we save 0.00001 s for not having a wrapper like i suggested =) [12:27] ajsie: mcdonalds here i come [12:27] DoNaLd`: i'm here ! :) [12:27] framlin: ajsie: its much mor ugly to pass two diffrent types of param at the same param and that the two types change semantics, than to have two functions for that [12:27] shaunau: ajsie: you can always wrap it in your own modeule [12:28] shaunau: framlin: absolutley [12:28] ajsie: framlin: thats the beauty of js =) [12:29] jscheel has joined the channel [12:29] jscheel has joined the channel [12:29] ajsie: dynamically typed [12:29] shaunau: ajsie: just because you can, doesnt mean you should.. [12:29] shaunau: i pity whoever has to maintain that.. [12:29] ajsie: then its a flaw on all dynamically typed langs [12:30] shaunau: no its not [12:30] ajsie: its should be static [12:30] mikegerwitz: I happen to think dynamic typing is a design flaw. [12:30] framlin: I know that its possible, but one should avoid such signatures, because its heavy to debug [12:30] ajsie: yeah i know [12:30] ajsie: just want to know what it the point of having dynamically typed langs then [12:31] framlin: ajsie: you do not have such crsy things like c++-templates or (I do not know, whats the name for Java) [12:31] Gigawattz has joined the channel [12:31] ludicco has joined the channel [12:32] framlin: you can build generyc function that use the same algo for diffrent DataTypes and pass it through the same param [12:32] ludicco: Hey guy, anyone know how to access as directory with spaces in its name for the child_process exec method? [12:32] mikegerwitz: ajsie: simplicity and ease of use..which is fine for a quick script, but not for an entire application imo [12:33] ludicco: "/Users/marcos/Library/Application\ Support/TextMate/Bundles/Javascript-Workflow.tmbundle/Support/bin/tooltip" [12:33] mikegerwitz: ludicco: does prefixing the space with a backslash work? I haven't ever had to try [12:34] ludicco: doesn't works is says [12:34] ludicco: "/Users/marcos/Library/Application" doesn't exists [12:34] ludicco: it stops at "Application" :( [12:34] Gigawattz: You guys seen this bundle of node for windows ? http://node-js.prcn.co.cc/ [12:34] edude03 has joined the channel [12:34] mikegerwitz: ludicco: what about quoting it? [12:34] ludicco: mikegerwitz: how do you mean? :) [12:34] mikegerwitz: Gigawattz: Yes, we use that for the developers who have Windows pcs [12:35] shaunau: ludicco '/Users/marcos/Library/Application\ Support' [12:35] Gigawattz: its pretty kool right, works pretty well aswell [12:35] mikegerwitz: ludicco: '/Users/marcos/Library/Application Support/' [12:35] fumanchu182 has joined the channel [12:35] mikegerwitz: Gigawattz: Honestly I haven't used it. But I know it works well for the others :) [12:35] ludicco: mikegerwitz: yes, the same thing happens [12:36] ludicco: I also tried with path.resolve but on the time of the execution it accuse the same thing [12:36] mikegerwitz: ludicco: Ah, I'm unsure then. Those were just suggestions coming from a shell [12:36] ludicco: yes, it's pretty weird, isn't it [12:36] ludicco: Apple and its spaced named directories :/ [12:36] Gigawattz: yea, i think ryan is working / talking about creating a decnt distro for windows ? [12:37] shaunau: ludicco: did you try escaping the space like i showed above? [12:37] mikegerwitz: Gigawattz: he said there's someone sponsoring Windows development [12:37] ludicco: shaunau: yes, the same thing happens unfortunately [12:38] kriszyp has joined the channel [12:38] shaunau: ludicco: you might need multiple slashes [12:38] ludicco: http://cl.ly/5dln [12:38] ludicco: here's a screenshot [12:38] shaunau: 3 probably. [12:38] samcday: Hmm, does anyone know if there'd be an issue allocating an EMPTY handle in a thread that is NOT the main V8 thread? [12:38] shaunau: ludicco: make them single quotes [12:39] ludicco: hey!!! [12:39] ludicco: \\ works [12:39] ludicco: two slashed instead one :D [12:40] ludicco: do you guys know why it this happens? [12:40] jherdman has joined the channel [12:41] mikegerwitz: v8: '\ moo' [12:41] v8bot: mikegerwitz: " moo" [12:41] arpegius has joined the channel [12:41] mikegerwitz: forgot about that :) my bad. [12:41] mscdex: escaping spaces is only necessary for bash [12:41] muhqu_ has joined the channel [12:42] zomgbie_ has joined the channel [12:42] christophsturm has joined the channel [12:42] christophsturm has joined the channel [12:42] mikegerwitz: ludicco: JS will remove the backslash for any char. Which, coming from other languages, is bizzare. But that's why [12:42] shaunau: ludicco: http://www.grymoire.com/Unix/Quote.html [12:42] mscdex: ludicco: you can also just enclose the whole command string in double quotes and be done with it :) [12:43] dylang_ has joined the channel [12:43] perlmonkey2 has joined the channel [12:43] ludicco: great guys...really good to know that :) [12:43] ludicco: cheers [12:43] mscdex: e.g. exec('"/home/foo/bar/baz with spaces/blah blah/foo"', function(..) {}) [12:44] mikegerwitz: mscdex: Does it have to be double? Single quotes didn't work [12:44] mscdex: i think it has to be double [12:44] mikegerwitz: mscdex: huh. [12:44] tiagoa has joined the channel [12:45] vckt has joined the channel [12:45] littke has joined the channel [12:46] dyer has joined the channel [12:47] ludicco: mscdex: but what if you are using something like this path.resolve(__dirname, "program") [12:47] ludicco: where the __dirname is a path containin spaces? [12:47] mscdex: dunno, never used resolve [12:47] ludicco: it throws and error too just like before [12:48] misterncw has joined the channel [12:48] mscdex: that's a bug then [12:48] ludicco: I think I will have to replace chars perhaps [12:49] meandi has joined the channel [12:50] ludicco: yes that's right [12:50] ludicco: __dirname.replace(" ", "\\ ") [12:51] flasomm has joined the channel [12:53] mscdex: wait... it doesn't throw an error for me [12:53] mscdex: if __dirname has spaces and i call path.resolve(__dirname, "foo") [12:53] mscdex: works just fine [12:53] ludicco: mscdex can I ask you which node version you're running? [12:53] mikegerwitz: mscdex: oh he means when you use the return value as an argument to a child process [12:54] ludicco: yes [12:54] ludicco: that's right [12:54] mscdex: oh, then yeah just do what i said before, wrap it in double quotes [12:54] ludicco: on require("child_process").exec(...) [12:54] mscdex: :) [12:54] mscdex: require('child_process').exec('"' + path.resolve(__dirname, "foo") + '"', function(..){}) [12:54] ph^ has joined the channel [12:55] mscdex: that should work for paths both with and without spaces [12:55] jlecker has joined the channel [12:55] suckerpunch has joined the channel [12:56] beejeebus: looking for pointers for node process management. i need to dynamically spin up/shut down node process. right now, i'm planning to supervisord, but i'm wondering if there's anything in the node world to this yet? [12:56] mikegerwitz: and doesn't require the overhead of performing a string replacement [12:56] SubStack: beejeebus: forever [12:56] mendel_ has joined the channel [12:56] beejeebus: SubStack: that's a long time ;-) [12:56] b3f0r3 has joined the channel [12:57] SubStack: https://github.com/indexzero/forever [12:57] beejeebus: SubStack: thanks, looking [12:57] boaz has joined the channel [12:58] rfay has joined the channel [13:00] lessthanzero has joined the channel [13:02] arpegius has joined the channel [13:02] dmshann0n_ has joined the channel [13:04] dnolen has joined the channel [13:04] mbrochh has joined the channel [13:04] mbrochh has joined the channel [13:04] beejeebus: SubStack: very interesting. i'm still surprised at how much code already exists that targets node [13:04] dnolen has joined the channel [13:05] SubStack: beejeebus: yep, there are 1513 modules on npm [13:06] nivoc has joined the channel [13:06] SubStack: from 628 users [13:06] SubStack: npm ls -s latest | perl -nle'm/=(\S+)/ && print $1' | sort | uniq | wc -l [13:07] ludicco: mscdex: you're right this really works [13:07] ludicco: thanks :) [13:08] tk has joined the channel [13:10] christophsturm: beejeebus: do you need to spin up node for integration tests or for deployment? [13:11] beejeebus: christophsturm: deployment [13:11] beejeebus: christophsturm: a web interface queues a message to beanstalkd, a worker pulls it off, does some setup, starts a node process [13:12] beejeebus: christophsturm: all of the node instances are the same, but they'll have a different config file [13:12] m64253 has joined the channel [13:12] beejeebus: christophsturm: not sure forever is as feature rich as supervisord at this point [13:13] pomodoro has joined the channel [13:13] jtsnow has joined the channel [13:16] jetienne has joined the channel [13:17] dmshann0n_ has joined the channel [13:18] ntelford has joined the channel [13:18] unflores has joined the channel [13:18] pauls has joined the channel [13:18] Horofox has joined the channel [13:19] markc: is it possible to get request.on() events inside a script.runInNewContext() ? [13:21] ameghji has joined the channel [13:21] SubStack: sure, just pass in request in the context [13:21] davidsklar has joined the channel [13:22] markc: SubStack: thanks, I've been trying that and also as an argument to the embedded function call [13:22] SubStack: > var em = new(require('events').EventEmitter); require('vm').runInNewContext('em.on("x", console.log)', { em : em, console : console }); em.emit('x', 'moo') [13:22] SubStack: works [13:23] markc: SubStack: thhanks again, I'll have to digest that somewhat [13:25] ben_alman has joined the channel [13:25] Booths has joined the channel [13:25] ajpiaNOU has joined the channel [13:26] xla has joined the channel [13:26] mlncn has left the channel [13:26] unomi has joined the channel [13:27] ben_alman has joined the channel [13:27] markc: where are the docs for runInNewContext, it does not appear anywhere on this page -> http://nodejs.org/docs/v0.4.4/api/all.html [13:28] fmarceau has joined the channel [13:28] gazumps has joined the channel [13:28] zomgbie has joined the channel [13:29] flasomm has joined the channel [13:30] matschaffer has joined the channel [13:31] mAritz: is there an easy way to uninstall all inactive (outdated) npm packages and their respective cache? [13:31] markc: ah, I was using ~script=process.binding('evals').Script ... script.runInNewContext(file, sandbox) [13:32] arpegius has joined the channel [13:32] mikegerwitz: mscdex: Yeah that's the old way of doing it. vm is new (and undocumented?) [13:32] mikegerwitz: markc: * [13:32] alek_br has joined the channel [13:32] mscdex: heh [13:33] mikegerwitz: tab-complete will be the death of me one day [13:33] onr has joined the channel [13:34] mikegerwitz: markc: http://nodejs.org/docs/v0.2.2/api.html has some info on it, though :) [13:35] markc: mikegerwitz: eek, right, no wonder there are things stuck in my forehead [13:35] pastak has joined the channel [13:36] beawesomeinstead has joined the channel [13:36] beawesomeinstead has joined the channel [13:36] serio_ has joined the channel [13:41] Poetro has joined the channel [13:41] trotter has joined the channel [13:41] markc: would anyone know of any code examples that uses the "vm" module fairly extensively, on node v1? [13:42] V1: v1 ;)? [13:42] V1: silly highlights [13:42] eventi has joined the channel [13:43] jasong_at_apache has joined the channel [13:43] markc: or node from master I guess I should say [13:43] hellp has joined the channel [13:44] vckt has joined the channel [13:45] markc: all I want to do is capture some POSTed variables inside an externally executed script [13:45] xandrews has joined the channel [13:46] amacleod has joined the channel [13:48] markc: ah, there is my answer, capture them beforehand and pass them to script.runInNewContext() within request.on(end, function...) in the main script [13:49] m64253 has joined the channel [13:51] vckt has joined the channel [13:52] jmar777 has joined the channel [13:54] xandrews has joined the channel [13:54] alex_b has joined the channel [13:55] useware has joined the channel [13:57] eirikurn has joined the channel [13:57] thomblake has joined the channel [13:58] ajsie: isn't it better to use EventEmitter to return results instead of asynched libraries [13:59] jano has joined the channel [13:59] ajsie: when the callback has results to return it just sends it through the eventEmitter and all listeners are triggered [13:59] benmonty has joined the channel [13:59] jano: is there any way to reuse HTTP connections up to a maximum number of concurrent ones? [13:59] jano: (google didn't show anything) [14:00] davidvanleeuwen has joined the channel [14:01] jano: (i recall seeing that node 0.4 provided a kind of connection pooling or something) [14:02] arpegius has joined the channel [14:02] vckt has joined the channel [14:02] lukegalea: jano: ya.. there's "agents".. and a max agents. [14:03] jano: lukegalea: grepping the docs now, thank you [14:03] arpegius has joined the channel [14:03] zomgbie_ has joined the channel [14:03] fadeddata has joined the channel [14:03] hvgotcodes has joined the channel [14:03] ryanfitz has joined the channel [14:04] bradleymeck has joined the channel [14:06] datapimp has joined the channel [14:06] davidwalsh has joined the channel [14:06] markc: ajsie: sounds good but I don't know how to apply that to an external script, I need to rtfm++ [14:06] aetius_ has joined the channel [14:07] baudehlo has joined the channel [14:07] ajsie: markc: that is what im doing on frontend at the moment [14:07] ajsie: the problem with asynch libraries are that they will end up in a lot of nesting + unmaintainable libraries since they have to pass a "callback" [14:08] markc: ajsie: yep, discovering that pain as I go... is your project on github? [14:08] ajsie: i can show you the code [14:08] ajsie: its pretty simple but powerful [14:09] markc: sure [14:09] galaxywatcher has joined the channel [14:09] galaxywatcher has joined the channel [14:09] aetius_: what is the best way to continously deploy my app? [14:09] Vladimir1 has joined the channel [14:09] aetius_: i'm running cygwin locally and ubuntu remote [14:10] framlin: ajsie: where is the difference between registring a callback at an EventEmitter and passing a callback to a async-function? [14:10] timmywil has joined the channel [14:10] KrisGosser has joined the channel [14:10] ajsie: framlin: you dont have the nestings [14:11] markc: ajsie: I'm keen to have a look at what you are doing [14:11] ajsie: but maybe im wrong .. following the async library makes me having to have everything inside its function scope [14:11] ajsie: yeah cant find it [14:11] ajsie: wait [14:11] framlin: ajsie: You do not need to have nestings, if you define named functions on "top-level" and pass them as callbacks [14:12] sivy_ has joined the channel [14:12] yhahn has joined the channel [14:12] tiagoa has joined the channel [14:12] baudehlo: people end up with ugly async code because they don't follow good coding conventions of splitting things into functions. [14:12] strmpnk has joined the channel [14:12] baudehlo: and expect their usual "one function with 600 lines" style to work. [14:13] KrisGosser: hello everyone! i'm wondering if anyone saw Campaign Monitor's new "World View" feature? I'm thinking of doing a similar project for my company's product (monitoring completed phone calls), and am thinking this might be the perfect opportunity to dive into node.js [14:13] KrisGosser: http://www.campaignmonitor.com/worldview/demo/ is a link if curious [14:13] jano: lukegalea: i'm not sure how i'd be able to make 1000 http requests to a single server, with a maximum of 10 concurrent connections. any ideas? [14:13] BigWookie: is there a module that acts as a one file db with the interface as a object? [14:13] baudehlo: BigWookie: like sqlite? [14:13] lukegalea: janos: If you just try and open 1000 requests, it'll max out at the max agents.. [14:13] lukegalea: which by default is 5 [14:13] lukegalea: I think.. [14:13] lukegalea: but you can increase to 10. [14:14] alek_br has joined the channel [14:14] brianloveswords has joined the channel [14:14] BigWookie: baudehlo: more like a wrapper around file write and read that interfaces as an object I can use [14:14] dcelix has joined the channel [14:14] lukegalea: jano: ^^^^ [14:14] BigWookie: like a persisten object [14:14] zomgbie has joined the channel [14:15] seivan has joined the channel [14:15] baudehlo: ormnomnom@0.0.1 =chrisdickinson remote Another ORM for Node, supporting sqlite and postgres node-pg sql [14:15] jano: lukegalea: as far as i can tell, it's not using concurrent connections at all... [14:15] baudehlo: that kind of thing? [14:15] damien__ has joined the channel [14:16] damien__ has left the channel [14:16] BigWookie: baudehlo: nope without a database in the backend [14:16] ajsie: http://pastie.org/1739539 [14:16] baudehlo: BigWookie: so you want a database without a database? [14:17] ocrampal has joined the channel [14:17] BigWookie: I want something like a database (sorry msisphrased that) [14:17] baudehlo: yes but you want it persistent to disk? [14:17] BigWookie: from the usage just a js object that is automatically synced to a file on the harddrive [14:17] baudehlo: right. [14:17] baudehlo: which seems to be what ormnomnom does [14:17] baudehlo: if you use sqlite as the backend, that's just a file on the harddrive. [14:18] lukegalea: lukegalea: one sec [14:18] lukegalea: taking a look [14:18] lukegalea: I meant: jano ;) [14:18] eyesUnclouded has joined the channel [14:18] BigWookie: baudehlo: you have to define a database connection and models in order to use it, it dosn't seam like the right thing [14:19] lukegalea: jano: there's an agent.maxSockets which says how many sockets each agent can open.. (default 5). and I believe there is one agent per host & port. [14:19] baudehlo: ok to be fair it might not be... But what you want is an ORM of some sort. [14:19] lukegalea: So you if just make a whole bunch of requests it should run 5 in parallel. [14:19] baudehlo: and use SQLite as the backend. [14:20] ajsie: i feel that this way im doing it is more clean and leveraging the basic operations of event on node.js and sproutcore [14:20] lukegalea: jano: I've played around with it for stress testing and never had problems. [14:20] eyesUnclouded_ has joined the channel [14:20] lukegalea: Want to post a gist? [14:20] baudehlo: otherwise you're hoping that someone else can code as well as the SQLite guys can in terms of data safety, which is VERY unlikely. [14:21] jano: lukegalea: i will, one sec [14:21] ajsie: framlin: i do name my functions and pass them as callbacks .. but the async lib is forcing me to code in a certain way: https://github.com/caolan/async [14:23] BigWookie: baudehlo: what I was searching for was permafrost [14:23] akivab has joined the channel [14:24] ajsie: following strict rules .. one function used in waterflow can not be used in parallel etc [14:24] ddollar has joined the channel [14:24] baudehlo: BigWookie: sure, if you want: "This thing is still quite buggy. I wouldn't use it for anything important yet." [14:24] framlin: ajsie: but IMHO you does not have to pass anonymous ("inline") functions. I think, that is only an example, only one code style [14:25] jimt has joined the channel [14:25] no-gooder has joined the channel [14:25] BigWookie: baudehlo: I don't need it for important work [14:26] baudehlo: FWIW permafrost uses supermarket which uses sqlite. [14:26] no-gooder has left the channel [14:26] framlin: there is no reason,not to define any function named function and pass it. And if you need clousures, you can develop a function that returns the callback and takes the clousure-variables as parameters [14:26] Yuffster has joined the channel [14:27] lukegalea: jano: I need to step away from my machine for a sec, but just paste it in or email me at luke@almlabs.com and I'll take a look. I wrote something very very similar so I'm sure I can help. [14:27] BigWookie: baudehlo: i never said i don't want to use sqlite, i don't want to use a an extra service , but a one file db [14:27] framlin: ajsie: but I do not know this async.js lib [14:27] jano: lukegalea: great, i'm removing the noise from my code so as not to distract too much from the main issue. thanks a lot [14:27] edude03 has joined the channel [14:28] akahn has joined the channel [14:28] ajsie: framlin: after a while your libraries are kinda a mess and you are forced to use those functions with the library .. and waterfall functions cannot be used in parallel etc [14:28] baudehlo: BigWookie: yeah that's cool, I'm just saying, at least they did the right thing :) [14:28] ajsie: kinda messy [14:28] Me1000 has joined the channel [14:28] ajsie: but that could be that im using it wrong though [14:28] baudehlo: esp. since node.js has no file locking (grrrr!) [14:29] ajsie: but if im using it wrong then its wrong with the doc =) [14:29] BigWookie: baudehlo: :) thanks anyway, you had the right motiv [14:29] seivan has joined the channel [14:29] ddollar has joined the channel [14:30] k1ttty has joined the channel [14:30] ajsie: but since node.js is event based .. i thought why not leverage that in your code .. that is what its all about [14:30] ajsie: and sproutcore the same [14:30] c4milo has joined the channel [14:31] ajsie: and its pretty simple too .. after a while it becomes your new "return" style in the synced coding [14:31] framlin: ajsie: I think JavaScript is JavaScript and the examples in that async-doc should run with both styles [14:32] gozala has joined the channel [14:32] mbrochh]2 has joined the channel [14:33] briznad has joined the channel [14:33] framlin: for me, there is no great diffrence in coding-styles using EventEmitter or callbacks. Both use callbacks and both may be implemented the anonymous-inline-style or the named-function-style ... or maybe, I misanderstand your point ;) [14:34] warz_ has joined the channel [14:34] MrTopf has joined the channel [14:34] jtsnow has joined the channel [14:35] charlenopires has joined the channel [14:35] amoebe has joined the channel [14:36] warz has joined the channel [14:37] colinclark has joined the channel [14:37] ajsie: framlin: if i pass a callback then i only have one function to process the result .. if i use eventEmitter i can have multiple responders to the returned data [14:37] ajsie: i can make a callback that are calling multiple functions .. but that is somewhat unusual [14:38] ajsie: and you dont see it clearly [14:38] sivy has joined the channel [14:38] hvgotcodes: how do i tell where a module got installed to using nvm? [14:38] ajsie: and if i pass a callback that in turn is an async function that need a callback that in turn is doing something async that needs a callback [14:38] ajsie: man .. then you are really lost [14:39] framlin: ajsie: ah ok, I see. thats right, there may be situations, where this may be usefull. [14:39] BillyBreen has joined the channel [14:39] ajsie: or maybe its just me again since im really noob in this async coding [14:39] ceej has joined the channel [14:41] hij1nx has joined the channel [14:42] heythisisdave has joined the channel [14:42] ajsie: coming from sync coding i code 1000 lines all in order .. 1 before 2, 2 before 3 etc .. now i found myself needing to nest 1000 times .. because the later one has to be a callback to the previous one .. and if the dependecy depth is 1000 .. then you get very confused .. i stopped when the depth was around 5-10 [14:43] framlin: ajsie: maybe ;) I code async-communicating apps since 5 years at my dayly work, so I do not see the things you do any more ;) [14:43] ajsie: better to just return a result immediately that is an eventemitter .. just like what node is already doing [14:43] ameghji has joined the channel [14:43] ajsie: framlin: but how do you do? [14:44] Rob_ has joined the channel [14:44] ajsie: i mean you clearly must have a way of coding it .. what is your secret? [14:44] framlin: mostly I use a object, that is handling this for me in the background [14:44] ajsie: but that is using eventEmitter? [14:44] ajsie: its either callback or eventEmitter [14:44] javaanse_jongens has joined the channel [14:45] vladikoff has joined the channel [14:45] framlin: I can add finalizers and successors and "direct"-callbacks to some function calls [14:45] framlin: yes, as I said, for me, there is no major diffrence [14:46] arpegius_ has joined the channel [14:46] framlin: you define functions, that are cqlled, if siomething happens [14:46] ajsie: but you have to use an eventEmitter .. cause a callback that needs a callback that needs a callback is unmaintainable [14:46] BigWookie: SubStack: :/ I'm sorry to bug you but is it possible that permafrost can't find nStore (both installed via npm)? [14:46] framlin: if you pass this functions as arguments to other functions or if you asign them to object-properties is no diffrence [14:46] pifantastic has joined the channel [14:47] aheckmann has joined the channel [14:47] mikegerwitz: ajsie: They have different uses. EventEmitter is not always the answer. Do not nest too deeply. Reference another function. [14:47] SubStack: BigWookie: nstore != nStore [14:48] ajsie: mikegerwitz: but if every function is ascyned .. then i have to use callbacks [14:48] BigWookie: :O [14:48] BigWookie: SubStack: thanks, that was the probelm , i would add it to the package.js [14:48] BigWookie: *json [14:48] mikegerwitz: ajsie: Split the logic out into different functions/methods the same way you would other code. You don't want a 1000 line function. You'd factor that into many separate functions. Using that same logic, make those separate functions. But rather than calling them one after another, put the references as the callbacks. [14:49] framlin: ajsie: this is only unmaintainable, if you pass all this callbacks as nested anonymous functions, but you do not have to .... [14:50] mikegerwitz: so maybe foo.readFile( 'bar', processFile ); rather than foo.readFile( 'bar', function() { /* 100 more lines */ } ); [14:50] ajsie: mikegerwitz: but what im trying to say is that if im using 10 asynched functions in a row .. the first one returning result to the other one .. then i have to pass callbacks to callbacks and so on .. [14:50] mikegerwitz: ajsie: Yes, you do. But they don't need to be nested functions [14:50] akahn has left the channel [14:50] ajsie: hmm ok [14:51] SubStack: ajsie: there are flow control libs for that [14:51] SubStack: if you want anonymous functions without the nesting [14:51] BigWookie: SubStack: apart from that, :) Thanks, really cool again [14:52] SubStack: BigWookie: oh keep in mind that supermarket has some concurrency problems on account of sqlite [14:52] ajsie: next time i run into this coding style again ill look into it how i could do it [14:52] kuebk has joined the channel [14:52] SubStack: I should probably write a chaos adapter for supermarket now [14:52] kuebk: hello [14:52] SubStack: erm [14:52] kuebk: how can i pull request? [14:52] SubStack: for permafrost, I mean [14:52] ajsie: and give you all some ways of doing it and see what fits best [14:52] SubStack: kuebk: fork, commit to your fork, click pull request button on github [14:53] kuebk: ah [14:53] kuebk: that way [14:53] kuebk: ok [14:53] Joe7 has joined the channel [14:54] Joe7: hi [14:54] jakehow has joined the channel [14:54] Joe7: Newbie question: how do u go installing a module/package (namely 'less') without NPM? Am on amd64 (freebsd), which npm is not compatible with apparently. [14:55] kuebk: SubStack: thanks [14:55] jeremyselier has joined the channel [14:57] ajsie: im doing readFileSync('app.js', 'utf8) but i get : Error: EBADF, Bad file descriptor 'app.js' [14:58] davidascher has joined the channel [14:58] beawesomeinstead has joined the channel [14:58] F1LT3R: Anyone plan to go to the NodeJS training in Portland? [14:58] Kingdutch has joined the channel [14:59] beawesomeinstead has joined the channel [14:59] hij1nx_ has joined the channel [14:59] F1LT3R: Node.js training in Portland OR: http://gul.ly/yn [15:00] Kingdutch has joined the channel [15:00] ajsie: will the training be recorded? [15:00] kuebk: SubStack: how can i commit my change from local repo to github repo? [15:00] ajsie: not everyone can go there .. maybe we could pay for the video=) [15:00] KrisGosser has left the channel [15:01] liquidproof has joined the channel [15:01] sirkitree has joined the channel [15:03] mike5w3c has joined the channel [15:03] ameghji:  [15:03] SubStack: kuebk: if you've set up your remote repo as 'origin' and branch as 'master', you can git push origin master [15:03] vckt has joined the channel [15:03] SubStack: git remote -v to list your remotes [15:03] riven has joined the channel [15:04] pietern has joined the channel [15:05] dmcquay has joined the channel [15:05] nonnikcam has joined the channel [15:05] rolando__ has joined the channel [15:06] F1LT3R: ajsie: I don't think it is being recorded. It's a paid workshop from the NodeJitsu guys: http://gul.ly/yn [15:07] ajsie: yeah [15:07] ajsie: but it should [15:07] ajsie: since not everyone can attend [15:07] ajsie: but maybe 5 000 more are interested [15:07] ajsie: money to make .. knowledge to share [15:09] lukus has joined the channel [15:09] lukus has joined the channel [15:09] hvgotcodes: does anyone use node-qunit? HOw do i tell if a module has dependencies? [15:09] F1LT3R: johnnywengluu, you're right, however, I would think filming/editing the event would drive up the cost for the people attending considerably. [15:09] johnnywengluu: could someone help me: var packageInfo = fs.readFileSync('./features.js', 'utf8') gives me Error: EBADF, Bad file descriptor 'features.js' [15:10] johnnywengluu: F1LT3R: or drive down those who are buying the video =) [15:10] johnnywengluu: like i said: why waste [15:10] Booths has joined the channel [15:10] varioust has joined the channel [15:11] F1LT3R: johnnywengluu, you want to come film and edit and produce the video? :) [15:11] johnnywengluu: internet age is here .. easy to share videos .. easy to pay [15:11] mikegerwitz: johnnywengluu: the file likely does not exist. [15:11] wookiehangover has joined the channel [15:11] mc_greeny has joined the channel [15:11] mikegerwitz: johnnywengluu: make sure the path is correct. You're using a relative path so make sure you understand where it's loading the file from. [15:12] johnnywengluu: var packageInfo = fs.readFileSync(path.join(__dirname, 'features.js', 'utf8')); [15:12] Ori_P has joined the channel [15:12] johnnywengluu: this gives the same error [15:12] johnnywengluu: no [15:12] johnnywengluu: my fault [15:12] johnnywengluu: it works now [15:12] johnnywengluu: mikegerwitz: thanks [15:13] johnnywengluu: F1LT3R: it shouldn't be hard to edit and produce .. a lot of simple softwares available .. so i dont think that is a good argument for not recording/sharing it [15:14] johnnywengluu: i just believe on internet and taking part of knowledge should be simple [15:14] colinclark_ has joined the channel [15:14] johnnywengluu: not everyone fly all the way to sit down in a room to learn stuff when there is internet =) [15:15] F1LT3R: johnnywengluu, right, but finding someone who will step up and do it (and do it at the professional level) is a whole other issue. [15:16] deedubs has joined the channel [15:16] johnnywengluu: F1LT3R: a video recorder is really cheap and can be very professional .. it doesn't need to be superpro [15:17] c4milo has joined the channel [15:17] F1LT3R: johnnywengluu, you really want to be talking to Ben Alman at Bocoup, he's director of training. He hangs out in irc://irc.freenode.net/bocoup if you want to push for video recordings. [15:19] johnnywengluu: F1LT3R: yeah thanks for the link .. just wondering why some don't leverage internet to its max potential [15:19] johnnywengluu: to gain the greatest profit for the least amount of work [15:19] mraleph has joined the channel [15:19] johnnywengluu: cause its the _least_ amount of work compared to traditional distribution channels [15:19] deedubs: anyone with experience with Learnboosts cluster? Can it be made to only listen on socket? [15:20] johnnywengluu: its golden era [15:20] johnnywengluu: okay .. back to coding [15:21] luke` has joined the channel [15:22] benmonty has left the channel [15:22] sunnyohno has joined the channel [15:22] luke`_ has joined the channel [15:23] sub_pop has joined the channel [15:24] hvgotcodes: is there a method to get the root directory of the project? [15:25] johnnywengluu: hvgotcodes: __dirname for the current script location [15:25] yozgrahame has joined the channel [15:25] hvgotcodes: johnnywengluu: where is the documentation for sys [15:25] johnnywengluu: there is no sys [15:26] johnnywengluu: or what od you mean? [15:26] mikegerwitz: hvgotcodes: sys is now util [15:26] hvgotcodes: mikegerwitz: oh ok [15:26] mikegerwitz: hvgotcodes: if you still have sys, you'll need to upgrade :) [15:26] hvgotcodes: yeah [15:26] hvgotcodes: i dont [15:26] hvgotcodes: i have just seen it all over the place [15:27] hvgotcodes: grrr trying to get qunit to run [15:27] hvgotcodes: on existing js code [15:27] johnnywengluu: hvgotcodes: on node.js? [15:27] hvgotcodes: johnnywengluu: yes [15:27] hvgotcodes: porting existing js with existing qunit tests to node.js [15:27] Venom_X has joined the channel [15:27] johnnywengluu: okay [15:28] hvgotcodes: which is turning out to not be trivial [15:28] briznad has joined the channel [15:28] johnnywengluu: jasmine works both on node.js and on frontend and is hell of a test library .. just so you dont miss it =) [15:30] hij1nx_ has joined the channel [15:30] flippyhead_ has joined the channel [15:31] matschaffer has joined the channel [15:31] fadeddata has joined the channel [15:31] fangel has joined the channel [15:32] tjholowaychuk has joined the channel [15:33] framlin: ajsie: http://pastie.org/1739827 [15:33] briznad has joined the channel [15:34] devinus has joined the channel [15:35] johnnywengluu: framlin: =) [15:35] johnnywengluu: yeah [15:35] johnnywengluu: there is just one tiny problem (for me) with this [15:35] johnnywengluu: its getting to mathematical [15:35] johnnywengluu: i dont see what is happening [15:36] jmhnilbog has joined the channel [15:36] johnnywengluu: it looks powerful though [15:36] ohtogo has joined the channel [15:36] sprout has joined the channel [15:37] some1else has joined the channel [15:38] isaacs has joined the channel [15:38] harth has joined the channel [15:39] framlin: johnnywengluu: it does not something usefull, but it shows, that you do not have to have nested anonymous functions to implement functions, that get callbacks, that get callbacks, that get callbacks passed .... [15:40] montylounge has joined the channel [15:41] framlin: is computes 1 + (1 - 3) ... [15:41] Spion__ has joined the channel [15:42] balaa has joined the channel [15:42] hvgotcodes: johnnywengluu: yeah, but im just trying to get the existing tests to run [15:42] Treffynnon has joined the channel [15:42] johnnywengluu: hvgotcodes: yeah [15:42] elux has joined the channel [15:42] bitmonk has joined the channel [15:43] hvgotcodes: johnnywengluu: can you look at this: https://github.com/kof/node-qunit -- Im trying to run the tests using the "via api " instructions -- for that i created a test.js file and am doing node test.js -- is this correct? [15:44] tfe_ has joined the channel [15:44] tfe_ has joined the channel [15:44] dgathright has joined the channel [15:44] eirikurn has joined the channel [15:46] hvgotcodes: also, is there a way to get the root directory of a project? [15:46] mAritz: isaacs: is there a way to uninstall all inactive (aka outdated) packages in npm? (and clear the cache for those) [15:46] isaacs: mAritz: not in 0.x [15:46] isaacs: mAritz: in 1.0, that doesn't happen [15:46] mAritz: okay, thanks [15:47] isaacs: but, you can remove *unnecessary* packages (ie, not declared as dependencies) in 1.0 with `npm prune1 [15:47] isaacs: *prune [15:47] synkro has joined the channel [15:47] mAritz: oh, okay. that's awesome :) [15:47] Horofox has joined the channel [15:47] brolin has joined the channel [15:48] mAritz: i had the cloud9 npm package installed at some point and was quite surprised of the npm disk usage until i discovered the old cloud9 files in the cache :D [15:48] isaacs: an [15:48] isaacs: ah [15:48] isaacs: npm cache clean [15:48] mAritz: already done :) [15:48] isaacs: yeah, cloud9 is pretty giant [15:48] Yuffster_work has joined the channel [15:50] brolin: someone know what happen with npm .tgz file [15:50] mAritz: you mean "cloud9 is a pretty giant" ;D [15:50] isaacs: mAritz: :) [15:50] saschagehlich has joined the channel [15:50] isaacs: brolin: what do you mean? [15:50] brolin: i'm trying install it in a beagle board but get errors related with file type [15:50] brolin: tar: This does not look like a tar archive [15:50] brolin: tar: Error exit delayed from previous errors [15:50] brolin: It failed [15:50] ckknight has joined the channel [15:51] isaacs: brolin: what operating system? [15:51] brolin: linux [15:51] isaacs: brolin: what's `tar --version`? [15:51] wink_: brolin: what are your args to tar? if its tgz, you need to gunzip it first [15:51] dmshann0n_ has joined the channel [15:52] brolin: uhmm [15:52] tjholowaychuk: mape: haha I just did items.mape(function(item){}) :D [15:52] wink_: try tar -zxvf archive.tgz [15:52] brolin: i gonna check [15:52] isaacs: wink_: npm calls tar and gzip [15:52] mape: tjholowaychuk: give me a sec and I'll give you a module for that.. :P [15:52] isaacs: wink_: so he's not passing args to tar, most likely [15:52] jdalton has joined the channel [15:52] tjholowaychuk: haha [15:53] brolin: yes but with manager in ubuntu neither works [15:53] wink_: isaacs: ah, i thought he was trying to unpack npm, not that npm was failing to unpack something? [15:53] isaacs: brolin: so, what's `tar --version`? [15:53] isaacs: what does that output? [15:54] brolin: in the beagleboard the tar and gzip are packed inside busybox command [15:54] isaacs: brolin: um... [15:54] brolin: tar (GNU tar) 1.20 [15:54] isaacs: brolin: can you update that to gnu tar 1.24? [15:54] johnnywengluu: framlin: yeah i get you [15:54] isaacs: brolin: also, what command are you running? [15:54] johnnywengluu: framlin: here is my current style : https://gist.github.com/896631 [15:55] arpegius has joined the channel [15:55] brolin: i will try [15:55] johnnywengluu: its working for me cause i get this kind of code better =) [15:55] johnnywengluu: not that mathematical .. just simple logic [15:55] jdalton has left the channel [15:56] johnnywengluu: is it something bad with my kind of coding? [15:57] johnnywengluu: https://gist.github.com/896634 [15:57] johnnywengluu: with highligting =) [15:58] johnnywengluu: but it feels kinda powerful .. multiple functions can listen on funA .. or funB .. can hook up but i don't have to change anything in the functions [15:58] johnnywengluu: kinda very modular [15:58] Horofox has joined the channel [15:58] framlin: johnnywengluu: seem to be a bit more nested-syle ;) [15:59] johnnywengluu: yeah but not that kinda hard looking nesting style like the code i had with callbacks [15:59] Booths has joined the channel [15:59] brolin: isaacs: the last package of tar is 1.23, for the 1.24 i need to build it [15:59] isaacs: brolin: oh, ok, well 1.23 should work, too [16:00] framlin: did you compare my code-snippet with yours and think my callback-style is more nested? [16:00] aho has joined the channel [16:00] johnnywengluu: i didnt mean your style [16:00] johnnywengluu: i meant mine [16:00] johnnywengluu: =) [16:00] hij1nx_ has joined the channel [16:00] framlin: ahh, ok, I see ;) [16:00] nate2 has joined the channel [16:00] johnnywengluu: but still .. the advantage is easy hooking up to events [16:00] johnnywengluu: and easy unregistering [16:01] _ralph has joined the channel [16:02] noahcampbell has joined the channel [16:02] _ralph: yo babes [16:02] _ralph: anyone written a cms with team collaboration using node? [16:02] jakehow has joined the channel [16:02] _ralph: go on, tell me it has been doneth [16:03] EyePulp has joined the channel [16:05] willwhite has joined the channel [16:05] rpflo has joined the channel [16:05] voodootikigod has joined the channel [16:05] norviller has joined the channel [16:07] marcosvm has joined the channel [16:07] johnnywengluu: framlin: here is the plain style [16:07] johnnywengluu: https://gist.github.com/896661 [16:08] johnnywengluu: kinda cool [16:08] liquidproof has joined the channel [16:08] useware has joined the channel [16:08] kmiyashiro: so [16:08] johnnywengluu: everything is possible if the core functions return an event emitter..i love this style =) [16:09] brolin: isaacs: with tar zxvf npm-x-x.tgz works, but with the script not [16:09] brolin: what could be the reason [16:09] Nomon has joined the channel [16:10] daniellindsley has joined the channel [16:11] johnnywengluu: and the best part is that it's jquery/sproutcore "compliant" .. you work with this some time and you really get asynched way of doing things [16:12] kmiyashiro: if I have a server instance and it's set to return results using an event emitter in the global scope, why is it that if two people request stuff at the same time, the response can go to either person? [16:12] brolin: is for the gzip! node ./cli.js install -g output https://gist.github.com/896669 [16:12] eresair has joined the channel [16:12] fadeddata has joined the channel [16:12] johnnywengluu: and not one single callback .. except the one that is listening on "ready" [16:13] tjholowaychuk: :s [16:13] tjholowaychuk: not a fan [16:13] johnnywengluu: but that is kinda my "glue" callback .. not a real implemented one [16:13] johnnywengluu: tjholowaychuk: talking to me? [16:13] blueadept has joined the channel [16:13] jscheel: hey guys, quick express question: I have a block of content that can be passed straight into my layout, without needing it's own view. Should I just make a "blank" view, or is there a way to pass content right into the layout? [16:13] tjholowaychuk: yeah [16:13] droops has joined the channel [16:13] johnnywengluu: =) [16:13] johnnywengluu: you have suggestions? [16:14] johnnywengluu: still trying to figure out a good style of doing async coding [16:14] tjholowaychuk: jscheel: a layout is just a regular view, so if needed you can do res.render('layout', { body: html }); [16:14] tjholowaychuk: johnnywengluu: callbacks [16:14] johnnywengluu: eventEmitter was the easiest for me [16:14] jscheel: tjholowaychuk: hah, thanks. [16:14] vladikoff has joined the channel [16:15] johnnywengluu: tjholowaychuk: http://pastie.org/1739827 [16:15] johnnywengluu: it looks to mathematical for me [16:15] tjholowaychuk: johnnywengluu: event emitters are for things that either succeed or fail [16:15] tjholowaychuk: sorry *callbacks [16:15] tjholowaychuk: haha [16:15] e2i has joined the channel [16:15] MikhX has joined the channel [16:15] tjholowaychuk: it doesnt make sense to pass around even emitters for a yes/no reply [16:15] mattrobenolt has joined the channel [16:16] losing has joined the channel [16:16] johnnywengluu: its not yes or no reply [16:16] johnnywengluu: it contains data [16:16] tjholowaychuk: and it would add significant overhead [16:16] jetienne_ has joined the channel [16:16] johnnywengluu: could someone do this with callbacks https://gist.github.com/896634 [16:16] ryah: isaacs: do you have a command line flags parsing module? [16:16] dustinwhittle has joined the channel [16:16] arpegius_ has joined the channel [16:16] johnnywengluu: hm maybe i could do it myself [16:17] johnnywengluu: bbl [16:19] bingomanatee has joined the channel [16:19] bingomanatee: Good morning noders [16:20] tjholowaychuk: morning [16:20] walkah has joined the channel [16:21] unlink has joined the channel [16:21] unlink has joined the channel [16:21] ecNode has joined the channel [16:22] gozala has joined the channel [16:22] robotarmy has joined the channel [16:23] SubStack: nodelings [16:23] mattikus has joined the channel [16:23] broofa has joined the channel [16:24] Draggor: nodelings, I like it [16:25] saikat has joined the channel [16:25] johnnywengluu: framlin, tjholowaychuk : https://gist.github.com/896694 [16:25] johnnywengluu: with callbacks [16:26] ako has joined the channel [16:27] ryanfitz has joined the channel [16:27] dgathright has joined the channel [16:28] Draggor: unomi: I have a release right around the corner I think. Have dynamic plugin loading/unloading, and you can specify channels/users to respond to. Working on deny lists now. [16:29] sorens3n has joined the channel [16:29] orch has joined the channel [16:30] johnnywengluu: dont know .. i love event emitters .. maybe it will be multiple data loads, like streaming? or maybe i want to add more observers rather than one and i don't want to know about the other observers [16:30] perezd has joined the channel [16:30] orch has left the channel [16:31] johnnywengluu: making me wanna choose one of these 2 ways of doing async coding [16:31] johnnywengluu: so i'll be consistent [16:31] tjholowaychuk: they have different purposes [16:31] johnnywengluu: yeah .. i know [16:31] johnnywengluu: eventemitter sounds more like for events [16:31] johnnywengluu: :) [16:31] johnnywengluu: streaming etc [16:31] alek_br_ has joined the channel [16:32] johnnywengluu: callbacks for one time return [16:32] johnnywengluu: math [16:32] Me1000 has joined the channel [16:32] johnnywengluu: thats kinda me .. have to choose ONE and stick to it no matter what =) [16:32] johnnywengluu: kinda bad habit [16:33] dguttman has joined the channel [16:33] losing has joined the channel [16:33] tjholowaychuk: that's like sticking with one programming language no matter what [16:33] unomi: Draggor, super cool [16:33] gozala has joined the channel [16:33] tjholowaychuk: even if one is WAY better for the task [16:33] alek_br_ has joined the channel [16:33] sprout has joined the channel [16:33] timcosgrove has joined the channel [16:34] timcosgrove has left the channel [16:34] johnnywengluu: tjholowaychuk: thats why im doing js on server, frontend, database and mobile now [16:34] tjholowaychuk: yeah but it's not always the right tool [16:34] johnnywengluu: agreed [16:34] unomi: heresy! [16:34] tjholowaychuk: sometimes bash is far superior, sometimes c, sometimes c++ etc [16:34] johnnywengluu: i just take time / learning / costs into account too [16:35] johnnywengluu: cant afford to learn iphone sdk, android sdk, java, obj c, c++ etc etc [16:35] tjholowaychuk: just saying you might want to re-think what you are trying to do :p [16:35] Draggor: unomi: What other things were you looking for? For this first release it'll just be nick/chan allow/deny, and only on plugin load. Next release is modifying the listeners while the plugin is loaded, and then dealing with irc statuses, such as being identified, having voice, etc [16:35] johnnywengluu: tjholowaychuk: what am i trying to do? [16:35] tjholowaychuk: use event emitters everywhere [16:35] johnnywengluu: yeah [16:36] Eber has joined the channel [16:36] johnnywengluu: definetely need callbacks=) [16:36] johnnywengluu: and pringles [16:36] tjholowaychuk: pringles++ [16:36] v8bot: tjholowaychuk has given a beer to pringles. pringles now has 1 beers. [16:37] unomi: draggor, what would be really nice is to have good support for using it for message passing from other systems, bidirectional would be awesome as well, but not quite sure how that would look [16:37] prettyrobots: johnnywengluu: http://www.salon.com/technology/ask_the_pilot/2011/03/22/pringles/index.html [16:38] prettyrobots: Some Pringles reading. [16:38] johnnywengluu: :) [16:38] johnnywengluu: we love it here in sweden [16:38] johnnywengluu: pringles + coke [16:38] johnnywengluu: i have no coke [16:38] johnnywengluu: ! [16:38] johnnywengluu: coke -- [16:38] sreeix has joined the channel [16:38] unomi: So you have some external process that can just send something like "network, user / channel, message" [16:39] kjeldahl has joined the channel [16:40] hij1nx has joined the channel [16:41] adambeynon has joined the channel [16:44] bingomanatee: Johnny: you willing to trade node work for coke? [16:44] Erik__ has joined the channel [16:45] bingomanatee: tjholowaychuk: when one programmer sticks to a programming language (because its the only one he knows) its called ignorance. [16:45] bingomanatee: When a million programmers do it its called "Best Practices" :D [16:46] saschagehlich has joined the channel [16:46] unflores has joined the channel [16:47] arpegius has joined the channel [16:48] stevereed has joined the channel [16:49] mcantelon has joined the channel [16:50] highermath_away has joined the channel [16:50] abraham has joined the channel [16:51] abraham has joined the channel [16:54] davidwalsh has joined the channel [16:54] BigWookie: xD [16:54] BigWookie: programming and religion, they have so much in common [16:54] tjholowaychuk: hell no [16:54] tjholowaychuk: lol [16:54] littke has joined the channel [16:54] mnbvasd: BigWookie: they both require faith in some mythical diety? [16:54] tjholowaychuk: ACTION athiest [16:56] BigWookie: I was just reffering to the wars fought about it :) [16:57] baudehlo: I created a blog post, feel free to disagree with it: https://baudehlo.wordpress.com/2011/03/31/whats-wrong-with-node-js-and-javascript/ [16:57] mnbvasd: BigWookie: never heard of anyone getting killed over a sub routine - though I'm sure it's happened, but not on the international scale ;) [16:57] Sami_ZzZ__ has joined the channel [16:57] baudehlo: I could kill some of my co-workers for their code sometimes. [16:58] mnbvasd: baudehlo: but you don't... a big difference! :) [16:58] pquerna: it seems most people only find that morallly acceptable in video games [16:58] pquerna: which is a bummer [16:58] mnbvasd: ACTION hugs baudehlo  [16:58] pquerna: sometimes. [16:59] gerad has joined the channel [16:59] mraleph: baudehlo: the only thing wrong with javascript is javascript. [16:59] baudehlo: heh [17:00] baudehlo: it's mostly a nice language. It just has some rough edges. [17:00] baudehlo: and the "browser" focus means it's purposely a bit weak. [17:00] tjholowaychuk: i dislike js less than most languages [17:00] timcosgrove has joined the channel [17:00] SubStack: ACTION indoctrinates tjholowaychuk  [17:00] tjholowaychuk: that's the win for me [17:00] vckt has joined the channel [17:01] timcosgrove has left the channel [17:01] Tobsn has joined the channel [17:01] mnbvasd: I like js almost as much as I like perl. [17:01] baudehlo: the fact that you can do for (var blah;...) but not if (var blah = whatever) is so retarded. [17:01] Tobsn: mornin [17:01] SubStack: node does smooth over the rougher parts of javascript [17:01] mnbvasd: you can do pure evil with it! :D [17:01] mraleph: "There�s no easy way to get line numbers of callers"... why on earth you want something like that? [17:01] SubStack: like having a mmodule system baked in is pretty nice [17:01] baudehlo: mraleph: logging [17:01] mytrile has joined the channel [17:02] Tobsn: can someone tell me if this is still a valid socket server on 0.5.0? http://pastebin.com/CHn2xH9j [17:02] SubStack: mraleph: sure there is! you could throw an exception and parse the stack trace with a regexp [17:02] mraleph: don't even need to throw [17:03] blkcat: mnbvasd: another perl guy? :) [17:03] onr: is there a module for process management, pid files, etc? [17:03] mraleph: but I have a better solution: just don't log the same message from different places. [17:03] gozala has joined the channel [17:03] SubStack: onr: github.com/indexzero/forever [17:03] mnbvasd: blkcat: and others... I generally use it for admin tasks where bash/grep/sed/awk just start to become painful. [17:03] mraleph: this way you'll have one-to-one correspondence between lines and log messages. [17:04] baudehlo: ? [17:04] onr: SubStack: thanks [17:05] blkcat: forever <3 [17:05] mraleph: no, I am having hard time imagining case when you need to log the same log message from different places. [17:05] jimt has joined the channel [17:05] devinus has left the channel [17:05] timmywil has joined the channel [17:05] dmcquay_ has joined the channel [17:06] hvgotcodes: is there a simple example of how to write a test without any testing libraries? [17:06] hvgotcodes: basically i want to set up a server, then use my own custom client to do an 'xhr' (mocked) [17:06] tbranyen: hvgotcodes: using the commonjs assertion shiz? [17:06] Tobsn: hvgotcodes if( myfunction() ) { works } [17:06] Tobsn: ;) [17:06] baudehlo: mraleph: to be honest it's just an ease of debugging thing. Finding a line number is a lot easier than a string. [17:06] johnnywengluu: hvgotcodes: why dont you want to use testing libraries? [17:06] dans has joined the channel [17:06] mraleph: that is true [17:07] hvgotcodes: johnnywengluu: just trying to get simple validation for now [17:07] tbranyen: hvgotcodes: check out the commonjs module for assertions its very easy to understand [17:07] tbranyen: and is built into node [17:07] hvgotcodes: the real question is how do i set up a running server that always returns the same thing, and then use that in a test [17:07] baudehlo: mraleph: also I've used it in code which gets called from multiple places, and providing two levels of line numbers is useful there too. [17:07] johnnywengluu: hvgotcodes: with testing frameworks=) [17:08] johnnywengluu: that supports teardown [17:08] SubStack: hvgotcodes: express is pretty simple to hack something up with [17:08] johnnywengluu: and setup [17:08] hvgotcodes: johnnywengluu: whats the simplest one [17:08] johnnywengluu: hvgotcodes: jasmine! [17:08] johnnywengluu: if you ask me [17:08] hvgotcodes: dont want dbb [17:08] hvgotcodes: bdd [17:08] mnbvasd: baudehlo: http://js.5sh.net/starttls.js [17:08] mnbvasd: a bit nasty but... [17:08] johnnywengluu: bdd is just a name [17:09] jetienne_: mraleph: is there some guidelines on how to write fast js on v8 ? [17:09] johnnywengluu: it means nothing .. test is test [17:09] SubStack: hvgotcodes: here's an example of an expresso test https://github.com/substack/node-ent/blob/master/test/codes.js [17:09] johnnywengluu: and assertion is assertion [17:09] hvgotcodes: SubStack: i dont need another dependency. i just need a server that returns some json [17:09] SubStack: it is pretty much the same as using the vanilla assert module except it runs your exports [17:09] baudehlo: mnbvasd: do you have an example usage? [17:09] johnnywengluu: bdd just tries to make it all more understandable rather than just providing assertion functions [17:09] SubStack: hvgotcodes: npm install expresso and you're done [17:10] SubStack: ACTION doesn't get why people are so hostile to dependencies :/ [17:10] hvgotcodes: SubStack: I dont need expresso [17:10] akahn has joined the channel [17:10] johnnywengluu: eg. describe("MyClass#hello"), it("should say hello") [17:10] hvgotcodes: im not writing a web app here [17:10] hvgotcodes: i am testing a library [17:10] SubStack: ... [17:10] mnbvasd: baudehlo: http://js.5sh.net/node-net.js [17:10] hvgotcodes: johnnywengluu: i already have jasmine installed [17:10] SubStack: hvgotcodes: that example I gave tests a library [17:10] mnbvasd: baudehlo: or my xmpp server, which is linked to from the main site.. [17:11] akahn has left the channel [17:11] hvgotcodes: so i have to create a spec directory right? [17:11] mnbvasd: baudehlo: it's like using the normal tls stuff, but you call: socket.upgrade(options); and it upgrades your cleartext socket. [17:11] TooTallNate has joined the channel [17:12] baudehlo: that code doesn't call upgrade :) [17:12] mnbvasd: baudehlo: erm, yeah it gets called from somewhere else on the main socket.. [17:12] hij1nx: [ann] for anyone attending nodeConf, check out our nodejs classes, http://training.bocoup.com/Pre-NodeConf2011/ [17:12] baudehlo: but thanks I'll definitely bookmark that. [17:13] baudehlo: free code? MIT license? [17:13] mnbvasd: baudehlo: http://js.5sh.net/c2s.js - line 86 [17:13] mraleph: jetienne_: I am not aware of any. There is a book "High Performance JavaScript" but I have not seen it's contents so I can't really recommend it. [17:13] mnbvasd: baudehlo: sure.. [17:15] Tobias| has joined the channel [17:15] qFox has joined the channel [17:15] mraleph: jetienne_: in general I have only three guidelines: 1) write correct maintanable code first 2) when writing code keep in mind basic complexity metrics 3) don't optimize random things --- profile your code first. [17:15] stephank has joined the channel [17:15] baudehlo: k, I added links to my TODO file. TBH I'm hoping SMTP TLS is someone else's itch. [17:15] dgathright has joined the channel [17:15] baudehlo: as I don't need it really. [17:16] mnbvasd: xmpp-tls was my itch ;) [17:16] baudehlo: yeah nice. [17:17] baudehlo: is there a non-blocking XML parser for node then? [17:17] yozgrahame has joined the channel [17:17] arpegius has joined the channel [17:17] bitmonk has joined the channel [17:18] mnbvasd: baudehlo: yeah, there's a few.. mine which does a bad job at it doesn't 'block' theoretically. [17:18] _derferman has joined the channel [17:18] hvgotcodes: hmm im returning json from a simple http, and my browser is doing a download, not showing the json -- is there a way to get it to just show the result? [17:19] mattrobenolt has joined the channel [17:20] SamuraiJack has joined the channel [17:20] Tobsn: application/text ? [17:22] saikat has joined the channel [17:22] hermansc has joined the channel [17:24] davidascher has joined the channel [17:24] Tobsn: application/json would be the correct one [17:26] cadorn has joined the channel [17:26] isaacs has joined the channel [17:26] alek_br has joined the channel [17:27] jetienne_: mraleph: ok thanks [17:30] jscheel: tjholowaychuk: finally got to test rendering the layout directly. One thing I found, is that you have to define layout: false, or it res.render() will try to render the layout inside of the layout :P [17:31] Fullmoon has joined the channel [17:31] jscheel: tjholowaychuk: I wonder, would it be more intuitive to have to option to just pass an object to res.render(), in which case it will use the layout automatically? [17:31] Tidwell has joined the channel [17:31] SamuraiJack has joined the channel [17:32] tjholowaychuk: jscheel: ah, yes :) [17:32] tschundeee has joined the channel [17:32] tjholowaychuk: not sure what you mean [17:32] tjholowaychuk: "just pass an object" ? [17:32] jmhnilbog has joined the channel [17:32] jscheel: tjholowaychuk: so, res.render('viewname', {data: 'blah'}); for regular views [17:33] jscheel: tjholowaychuk: but, to just use the layout: [17:33] draginx has joined the channel [17:33] jscheel: res.render({body: 'blah'}); [17:33] jscheel: so, if the first argument is not a string, but is an object, automatically default to the layout [17:34] jscheel: jscheel: dunno if that is too much magic though :) [17:34] mjr_ has joined the channel [17:34] pyrony has joined the channel [17:37] mscdex: lol 18 hours to build chromium [17:37] tjholowaychuk: jscheel: meh not really interested in that because you should still specify the view you are rendering [17:37] tjholowaychuk: for example you are not bound to a single layout [17:37] tjholowaychuk: so it doesn't make much sense to assume just "layout" [17:37] meandi has joined the channel [17:37] jscheel: tjholowaychuk: ah, true [17:38] tjholowaychuk: rendering a layout with res.render() is pretty rare I'd think [17:38] jscheel: tjholowaychuk: yeah, I'm doing something kinda odd :) [17:38] V1 has joined the channel [17:38] jscheel: tjholowaychuk: thanks for the help! [17:39] reid_ has joined the channel [17:39] unomi has joined the channel [17:40] Tobsn: does anyone know why i cant data.trim() the addlistener "data" event in a server? [17:42] findchris has joined the channel [17:43] mscdex: Tobsn: it's probably a Buffer [17:43] mscdex: convert it to string first [17:43] Tobsn: yeah... it tells me its a object [17:43] mscdex: (''+data).trim() [17:43] Tobsn: oh [17:43] Tobsn: oooooh... [17:43] ricklon: Anyone worked with node-serial? I'm finding that it stops listening on the port after about 8 reads or the buffer empties. [17:44] mscdex: Tobsn: otherwise you can have it automatically convert to string using setEncoding on the request or socket [17:44] sh1mmer has joined the channel [17:45] emattias has joined the channel [17:45] Tobsn: mscdex, but net.createServer(function(socket){socket.addListener('data',function(data){ sys.puts(data); });}).listen(123); [17:45] Tobsn: thats still a correct socket server waiting for data coming, right? [17:46] Tobsn: im getting confused with .on() and onRead() and whatnot [17:46] mscdex: on is the new way to do addListener [17:46] Tobsn: oh [17:46] Tobsn: thats actually the new way [17:46] mscdex: what version of node are you using? [17:46] Tobsn: now [17:46] Tobsn: 0.5.0 [17:47] mscdex: ok [17:47] mscdex: sys is now util also [17:47] arpegius_ has joined the channel [17:48] mscdex: but you could do something like this: net.createServer(function(socket){socket.setEncoding('utf8'); socket.on('data', function(data){console.log(data); });}).listen(123); [17:48] ricklon: Tobsn: Good question node-serial uses on, other examples I saw used listen [17:48] timcosgrove has joined the channel [17:48] wirehead has joined the channel [17:48] Tobsn: yeah i just put in the setencoding [17:48] mscdex: Tobsn: setEncoding will make the 'data' event always emit a string instead of Buffer [17:48] timcosgrove has left the channel [17:48] mscdex: ok :) [17:48] Tobsn: lets see if i can change that on the client and see if it works [17:48] Tobsn: k [17:49] Tobsn: because right now i get crazy results [17:49] mytrile has joined the channel [17:49] Tobsn: client side i do write('blah1'); -> blah6 [17:49] Tobsn: and the client read listener returns only blah1 and blah2 [17:49] mscdex: Tobsn: can you gist your code? [17:49] Tobsn: everything else just gets lost [17:49] bitmonk has joined the channel [17:49] tilgovi has joined the channel [17:50] Tobsn: let me put that utf8 in place and see if it still produces crap [17:50] ricklon: This examples for about 7 events and the quits, and doesn't stay running. https://github.com/ricklon/Nodejs-web-serial-console/blob/master/seriallisten.js [17:51] Ori_P has joined the channel [17:52] blkcat: so where's everyone hosting their node apps, anyhow? [17:53] Draggor: unomi: Like System A talks to System B via the irc bot? [17:53] no-gooder has joined the channel [17:53] terite: Is there an easier way to navigate than typing the whole url in, or keeping the index open? [17:53] terite: What I'd like to do is something like nodejs.org/http [17:55] eventi: isaacs: npm 1.0... awesome [17:55] isaacs: eventi: :D [17:55] eventi: you've outdone yourself [17:55] isaacs: thanks [17:56] jano has joined the channel [17:56] briznad has joined the channel [17:56] ricklon: In order to use emmiter.on does it need to be chained from a emmiter.addListener? [17:57] raphdg has joined the channel [17:57] kriszyp has joined the channel [17:57] terite: ricklon: It's already a copy of addListener [17:57] terite: Nothing special should be necessary [17:58] ricklon: So a program should no exit while emmiter.on event is still valid? [17:58] dmcquay has joined the channel [17:58] Tobsn: mscdex, yeah its my client (titanium) - it sends all strings together [17:58] unomi: Draggor if by System B you mean an irc user, then yes [17:58] mscdex: :S [17:58] Validatorian has left the channel [17:58] Tobsn: socket.write( string ) - [blah1,blah2,blah3,blah4,blah5,blah6] - ends up on the server ads blah1\0blah2blah3blah4blah5blah6\0 [17:59] Tobsn: i mean wtf... even if i put in my own seperator like string + "\0" - same result [17:59] mscdex: baudehlo: libxmljs has a push parser that's quite nice [17:59] Tobsn: is on( 'data' ) the correct event? [17:59] eventi: isaacs: I do have a problem on one machine not being able to find something npm says is there - where should I start troubleshooting? [17:59] mscdex: baudehlo: also, TLS would not be difficult to implement really for SMTP [17:59] isaacs: eventi: where does npm say it is? [17:59] unomi: Draggor, fx, it could be used to easily hack up something that pipes error logs, build reports - what not [17:59] astropirate has joined the channel [18:00] dguttman has joined the channel [18:00] ricklon: For example: sp.on("data", function (data) {console.log("Count: " + count++ + " Data: " + data);}); [18:00] eventi: isaacs: http://pastie.org/1740384 [18:01] isaacs: eventi: you've installed redis-node@0.4.0 [18:01] isaacs: eventi: so do require("redis-node") [18:01] datapimp has joined the channel [18:01] isaacs: eventi: or npm install redis [18:01] eventi: i thought so - not sure why it's working on a diff machine [18:01] mscdex: Tobsn: probably something simple. let me know if you get a chance to gist your code [18:02] terite: ricklon: That doesn't really keep the process alive [18:02] kristsk has joined the channel [18:02] torgeir has joined the channel [18:02] Draggor: unomi: Then yeah, I mean, I'm just writing a bot that allows easy use of plugins to interface with irc, write code that takes a message from some socket, and get access to the bot and write it. [18:02] terite: I'm new so if someone else has a better explanation go ahead, but AFAIK node won't quit automatically while there's an open connection to something. [18:03] creationix has joined the channel [18:03] creationix has left the channel [18:03] ricklon: terite: That's the misunderstanding I've got. What would keep the process alive? [18:03] alek_br has joined the channel [18:03] terite: Well, whatever sp is would need to remain open I think [18:04] Tobsn: i'll gist it but prepare to read some bs ;) [18:04] mscdex: terite: as long as there's something for the event loop to do [18:04] mscdex: ricklon: are you using the latest version of node-serialport from voodootikigod's repo? [18:04] unomi: Draggor, sure, I had been meaning to write such a plugin - but got sidetracked with work [18:04] ricklon: mscdex: As of Saturday [18:04] mattrobenolt: Anyone attempted to stream a file upload to YouTube via their API? [18:05] meandi2 has joined the channel [18:05] Draggor: unomi: I'm still not entirely sure what it is you're after, if you give me an actual use case, maybe I can put something together if it fits what I'm aiming for [18:05] terite: Who maintains the nodejs website? [18:06] timcosgrove has joined the channel [18:06] timcosgrove has left the channel [18:06] mike_miller has joined the channel [18:06] mscdex: terite: ryah [18:07] Tobsn: mscdex, https://gist.github.com/3ad6f41c6efa48cb7713 [18:07] xandrews_ has joined the channel [18:07] unomi: Draggor, well - honestly it seems that you should just carry on what you are doing with enhancing the bot itself [18:08] Fullmoon has joined the channel [18:08] eventi: isaacs: it's def working that way on my mac, but I'm afraid that I do a lot of experimenting there - do you know how I can find out where that lib is? [18:08] doubletap has joined the channel [18:09] ricklon: I'm using node-serialport ver 0.2.3 [18:09] Horofox has joined the channel [18:09] isaacs: eventi: require.resolve("redis") [18:09] doubletap has left the channel [18:09] mhooker has joined the channel [18:09] eventi: actually, more to the point, I guess it's still using the libs that npm@<1.0 installed, but no longer shows them in ls [18:09] isaacs: eventi: that is correct. [18:09] unomi: what I am after would likely be more suitable as a plugin anyway. But to answer your question, I am after either a socket or port that I can pass a string in a suitable format and it would pass that along into irc-space [18:09] Tobsn: mscdex, the debug output of titanium right now, as the code is in the gist: [18:09] Tobsn: [INFO] reading: "blah1 - 1" [18:09] Tobsn: [INFO] reading: "blah2blah3blah4blah5 - 1" [18:10] eventi: ok - thanks again [18:10] Tobsn: (coming from the addlistener "read" event) [18:10] isaacs: eventi: npm install npm -g; npm rm redis; curl ... =rc sh [18:10] isaacs: eventi: npm 1.0 is blissfully unaware of the symlink mess that is npm 0x [18:11] Tobsn: mscdex, if you put a Ti.API.info() right where the socket.write() is it putputs each string by itself - and not jumpled up as the client receives it [18:11] eventi: look FORWARD!!! [18:11] eventi: lol [18:11] pquerna: are there any pure-js xml validating-ish xml parsers out there? the module lists seems to only like ones that pull in libxml2... [18:11] unomi: Draggor, I am after something that I can build tiny middlewares against - but are probably best not part of the bot itself [18:11] eventi: I'm tempted to just blow away /usr/local/lib [18:12] tschundeee has joined the channel [18:12] max_dev has joined the channel [18:13] mscdex: pquerna: only pure-js ones i'm aware of are node-xml and sax-js [18:13] msilverman2 has joined the channel [18:13] hosh_work has joined the channel [18:14] m64253 has joined the channel [18:14] jpick has joined the channel [18:14] mscdex: Tobsn: ok, and what is the output on the nodejs side? [18:14] Tobsn: which one [18:14] pquerna: hmm. maybe to just hack through using jsdom then. [18:14] Tobsn: directly sys.puts(data) ? [18:14] xandrews has joined the channel [18:15] Tobsn: blah1 [18:15] Tobsn: blah2blah3blah4blah5 [18:15] Tobsn: thats what node gets [18:15] Tobsn: i guess their iphone sdk client libs are just fucked up [18:16] Tobsn: i mean i can even send string + "\0" or +"\n" or + "\r\n" and node.js still only gets blah2blah3blah4blah5 from the client [18:17] hornairs has joined the channel [18:17] arpegius has joined the channel [18:18] mscdex: huh... yeah i've never used that titanium stuff before [18:18] ChrisCi has joined the channel [18:18] highermath: has anyone tested a node.js reverse proxy against, say, varnish? [18:19] ChrisCi: Last night I posted a message (actually it was one and 2 replies) on https.request on the google group and the message is not there anymore... I wonder why/ [18:19] Country has joined the channel [18:20] draginx1 has joined the channel [18:20] Tobsn: mscdex [18:20] Tobsn: <-blah1--> [18:20] Tobsn: [ 'blah1\u0000' ] [18:20] Tobsn: <-blah2blah3blah4blah5--> [18:20] Tobsn: [ 'blah2\u0000blah3\u0000blah4\u0000blah5\u0000' ] [18:20] Tobsn: second line is console.log [18:20] Vladimir1 has joined the channel [18:20] Tobsn: why wouldnt node split that? [18:21] teemow has joined the channel [18:21] Tobsn: ah because it is already [18:21] Tobsn: there is something behind blah1\u0000 that is already removed which isnt in the second string [18:22] Tobsn: cause i set the \0 manually in the write(string+"\0") on the client [18:23] Tobsn: whats the BSD default line terminator? [18:24] Tobsn: *bsd sockets [18:24] mscdex: there is no terminator for sockets [18:25] Tobsn: but something is separating them [18:26] Tobsn: if i send a string + "\r" node.js is giving me an array for the second var [18:26] dberlinger has joined the channel [18:26] pquerna: isaacs: hey, what are your current thoughts on https://github.com/isaacs/npm/issues/150 ? [18:27] davidwalsh has joined the channel [18:27] isaacs: pquerna: npm help registry [18:27] isaacs: pquerna: it's a lot easier now [18:27] pquerna: isaacs: it seems to be to replicate the couchdb to my own local one, and then have my own things added? [18:28] pquerna: okay [18:28] isaacs: yeah [18:28] isaacs: talking to multiple registries is hard. [18:28] isaacs: going from 1->many is much harder than going from 0->1 [18:28] max_dev has joined the channel [18:28] edw has joined the channel [18:28] isaacs: more specifically: it's hard to do in an elegant way that doesn't offend my esthetic senses. [18:29] edw: I have a question about the redis client. [18:29] edw: Can I depend on the Node.js redis library converting a list to a string in HMSET calls where I supply a hash as an argument? [18:29] pquerna: hmm [18:29] edw: E.g. client.hmset('foo', {a: [1, 2, 3]}); client.hget('foo', a', [18:29] edw: function(e,o) { console.log(typeof o); }) [18:30] pquerna: right, i think this couch replication is fine, just need to figure out how to safelyish secure it with private packages. [18:30] dguttman_ has joined the channel [18:31] gdusbabek has joined the channel [18:31] isaacs: pquerna: also, nowadays, if you replicate the registry, you get search.npmjs.org for free :) [18:31] Tobsn: mscdex, yeah somthing is wrong with that titanium sdk... i can turn off the striptermiantor \0 inside the createsocket - than its sending it raw and it ends up a 'blah1' and 'blah2blah3blah4blah...' [18:31] saikat has joined the channel [18:31] Tobsn: like something is separating thow two parts but i cant really seew hat it is [18:34] muk_mb has joined the channel [18:34] Tobsn: mscdex, if i put some more writes into a timeout each 500ms away from each other, it works just fine [18:35] tokumine has joined the channel [18:35] ChrisCi: edw: what are you trying to do ? [18:36] Joe7 has left the channel [18:36] nciagra has joined the channel [18:36] maushu has joined the channel [18:37] steffkes has joined the channel [18:37] edw: ChrisCi: I have an object with a field that is a list of strings, and the strings aren't being used as a key into anything, so I was thinkinh it would be nice if I could depend on the API to automagically join them for me and put them in a string. [18:37] insin has joined the channel [18:38] ChrisCi: I do not think you can do that. but you can call join o nthe array. [18:38] ChrisCi: edw: see above [18:38] beckje01 has joined the channel [18:39] Tobsn: mscdex, wanna know the workaround? [18:39] Tobsn: setTimeout( function(){ TiSocket.socket.write( string ); }, this.writec * 50 );this.writec++; [18:39] mscdex: :S [18:39] Tobsn: if i fire a write ever 50 secs, it works... [18:39] Tobsn: but not lower [18:39] mscdex: that's gotta be a bug heh [18:39] Tobsn: if i set 30 for example i get blah1 - blah2blah3 - blah4blah5 ... [18:39] Tobsn: i mean wtf. [18:39] Tobsn: yeah [18:40] Tobsn: but where [18:40] mscdex: in their sdk somewhere i guess [18:40] Tobsn: and its weird that nobody else saw it [18:40] Tobsn: i already looked into their iphone sdk [18:40] Tobsn: but i couldnt even find the socket functions haha [18:40] Tobsn: wanna bet if you put it on the iphone it works without jumbling it up ;) [18:41] marcosvm has joined the channel [18:41] edw: ChrisCi: I tested it, it joins the list and stores it as a string. I was surprised. [18:41] hij1nx has joined the channel [18:41] Aria has joined the channel [18:41] edw: ChrisCi: Joins it with commas. [18:41] zakabird has joined the channel [18:41] Horofox: damn i've built a rocket in node.js [18:42] techwraith has joined the channel [18:43] TheIronWolf has joined the channel [18:44] ChrisCi: edw: array_name.join("") should work -> http://www.w3schools.com/jsref/jsref_join.asp [18:45] dmcquay has joined the channel [18:46] edw: ChrisCi: Oh, I know it'll work. I just want to know if I can depend on that client.hmset() behavior. (Unless I know I can, I'll be doing some join()ing.) [18:46] insin: ACTION turns his W3Schools alarm off [18:46] insin: Google need to work on -1 [18:47] voodootikigod: ricklon: yt [18:47] ricklon: voodootikigod: hi there [18:48] voodootikigod: ricklon: what was up with SP? [18:48] ricklon: I was working with node-serialport recently. [18:48] arpegius_ has joined the channel [18:48] edw: insin: While I agree with you in theory, a -1 seems like it would be a lot easier to use for evil e.g. people trying to delist sites as part of do-gooder boycotts. [18:48] voodootikigod: ricklon: ok [18:48] voodootikigod: ricklon: anything you need help with [18:49] ricklon: i think I might using it in correclty. Here's the sample code: [18:49] ricklon: voodootikigod: https://github.com/ricklon/Nodejs-web-serial-console/blob/master/seriallisten.js [18:49] edw: insin: Which sounds great IF you happen to agree with whatever group is trying to screw whomever. [18:50] ricklon: i got about 7-8 readlines and then it stopped [18:50] zylo has joined the channel [18:51] raidfive has joined the channel [18:51] ricklon: voodootikigod: My guess is that code should go inside some kind of listern? [18:51] voodootikigod: try adding a sp.on("error", function() { console.log(arguments) }) [18:51] voodootikigod: no you are fine [18:51] voodootikigod: i am thinking its an issue with serial stack [18:52] techwraith has joined the channel [18:54] ricklon: Kinda my guess too, but I'm not sure how to debug it [18:54] voodootikigod: add the code from above [18:54] voodootikigod: also add one for end events [18:54] ricklon: ok. Working on adding that code [18:55] mrjjwright has joined the channel [18:55] davidcoallier: ryah: ping [18:56] s0urce has joined the channel [18:56] s0urce: sup [18:56] V1 has joined the channel [18:56] m64253 has joined the channel [18:57] ryah: davidcoallier: pong [18:58] davidcoallier: Do you mind if I corner you? :) [18:58] ohtogo has joined the channel [18:59] davidcoallier: Meaning "PM" [18:59] ryah: sure PM me [18:59] s0urce: any1 got a tip how to get node react on file changes? [19:00] onr: ryah: is there a way to package nodejs scripts into standalone executables? [19:01] liar has joined the channel [19:01] draginx1: s0urce: perhaps fs.stat? [19:02] ryah: onr: yes - but it takes some work and there's no docs - checkout "third_party_main" in src/node.js [19:02] s0urce: i already found it on google, but does this works with express? [19:02] iFire has joined the channel [19:02] draginx1: O_o yes [19:02] draginx1: well my method works but i dont use stat [19:02] s0urce: looks a bit overstated [19:03] s0urce: what do u use? [19:03] tjholowaychuk: s0urce: cluster has a reload() plugin, that's what I use http://learnboost.github.com/cluster/ [19:03] s0urce: isnt a whi [19:03] draginx1: s0urce: http://stackoverflow.com/questions/3806488/detect-file-changes-in-node-js-via-watchfile [19:03] s0urce: le with timeeout enough? [19:03] mytrile has joined the channel [19:04] draginx1: s0urce: I think "forever" is a betetr alternative than cluster (for this case) [19:04] tjholowaychuk: although I dont care much for auto-reloading even in development [19:04] s0urce: and again this cluster [19:04] s0urce: what is it for? [19:04] drudge: cluster is the shit [19:04] s0urce: i hear this very often [19:04] draginx1: Cluster is a process manager (in anutshell I guess?) [19:04] tjholowaychuk: s0urce: cluster manages servers distributed across several processes [19:05] drudge: how is the web plugin coming tj [19:05] ricklon: voodootikigod: Oh my, it works well on one system, and not on another. [19:05] s0urce: its rly a cluster? [19:05] tjholowaychuk: drudge: haven't had time to work on it any more yet [19:05] onr: ryah: thanks [19:05] voodootikigod: what is the os for each system [19:05] voodootikigod: ? [19:05] s0urce: so u got running serveral servers with node? [19:05] ricklon: Mac desktop vs mac laptop [19:05] ricklon: mac os x 10.6.6 [19:06] vckt has left the channel [19:06] drudge: s0urce: yes [19:06] ricklon: The other is 10.6.7 [19:06] voodootikigod: hmm [19:06] galaxywatcher has joined the channel [19:06] voodootikigod: do you have the same FTDI drivers installed [19:06] voodootikigod: ? [19:07] ricklon: voodootikigod: I'm going to have to check [19:07] s0urce: whats the npm name of fs.stat [19:07] patcito has joined the channel [19:07] isaacs: s0urce: huh? [19:07] isaacs: s0urce: fs.stat is built into node [19:07] s0urce: i tried npm install fs/stat/fs.stat [19:07] s0urce: o [19:07] s0urce: h [19:07] s0urce: ok ^ [19:07] isaacs: s0urce: var fs = require("fs"); fs.stat(...) [19:08] s0urce: ty [19:08] drudge: you might want to read the docs [19:08] s0urce: btw. isaacs i know u from anywhere [19:08] isaacs: s0urce: http://nodejs.org/docs/v0.4.4/api/fs.html [19:08] isaacs: s0urce: orly? have we met? [19:08] s0urce: i think so, but i am not sure [19:08] s0urce: my from ape? [19:08] isaacs: you ever at yahoo? [19:08] timcosgrove has joined the channel [19:09] isaacs: between 2006 and 2010 [19:09] s0urce: i got a yahoo mail account since 14 years [19:09] s0urce: but never do anything @ yahoo [19:09] isaacs: oh, ok [19:09] isaacs: i dunno :) [19:09] isaacs: it's a small internet [19:09] s0urce: u r not at ape project, r u? [19:09] piscisaureus has joined the channel [19:09] isaacs: oh, that was the spidermonkey+stuff thing, right? [19:09] sreeix has left the channel [19:09] piscisaureus: ACTION waves [19:09] s0urce: yrs [19:09] s0urce: yes* [19:10] isaacs: s0urce: i didn't actually work on it, but i played with it a little bit. [19:10] timcosgrove has left the channel [19:10] isaacs: iv'e been into ssjs for a pretty long time. [19:10] Clooth has joined the channel [19:10] isaacs: narwhal, k7, etc. [19:10] s0urce: i did a realtime sync flashgame with it, is nice, but a bit unstable [19:10] isaacs: yeah, it seemed a bit flaky [19:11] isaacs: the thing i liked more about node is that it started with a solid IO story, and then chose js just because it happened to be a good fit. [19:11] s0urce: after the memory leak fix, its ok, but not what i will stay at :) [19:11] s0urce: thats why i am here ^^ [19:11] isaacs: i felt like some of the other ssjs platforms went the other direction. [19:11] isaacs: ie, first pick js, and then try to find the platform that fits it [19:12] s0urce: the most funny thing at node is, there a some tutorial vids out there, spoken from a german guy in english, but no german vid or tutorial anywhere -.- [19:13] s0urce: back to fs, now i know how to watch file changes, but how can i reload my express file? [19:13] s0urce: just re-exec app.get(...)? [19:14] iFire has joined the channel [19:14] tjholowaychuk: s0urce: that's the issue with reloading.. you basically have to reload everything [19:15] s0urce: ... [19:15] tjholowaychuk: IMO it's more or less useless not to [19:15] s0urce: restart on command line each change is more annoying [19:15] ChrisCi: Hi there, I have a problem with https.request that seem to cut the request data/ [19:15] tjholowaychuk: s0urce: no, but something like cluster can do it for you [19:16] rboyd has joined the channel [19:16] s0urce: but should i rly use cluster just for reload function? [19:16] tjholowaychuk: im just saying in general that you should reload the entire thing [19:16] tjholowaychuk: not just try and hack reloading of modules [19:17] darshanshankar has joined the channel [19:17] tschundeee has joined the channel [19:17] s0urce: but it works :) [19:17] tjholowaychuk: barely [19:17] ricklon: voodootikigod: 2_2_16 on the machin giving me trouble. [19:17] tjholowaychuk: you just have issues like you are right now [19:17] ricklon: I just reinstalled them [19:18] tjholowaychuk: when it takes < 1 second to spawn the new process who cares [19:18] arpegius_ has joined the channel [19:18] s0urce: and what does cluster do? [19:19] s0urce: oh [19:19] tjholowaychuk: re-spawns the process [19:19] s0urce: <-- silly :) [19:19] s0urce: ejs changes also works without fs ^ [19:19] tjholowaychuk: express only caches the templates in production [19:19] voodootikigod: ricklon: see if you have anything else installed [19:20] ricklon: Nothing else is connected serially. I'm doing a system restart just in case. [19:20] s0urce: looks like i have many to learn ;/ [19:20] eazyigz has joined the channel [19:21] eazyigz: I am trying to erase a file's contents by doing: fs.writeFile('/cache.manifest', ''). However, that doesn't do anything. [19:21] eazyigz: any ideas? [19:21] draginx1: haml/jade changes also respawn (but im not sure with cluster) [19:21] s0urce: so i need to do the reload inside the main app.js and not inside the project one, right? [19:21] draginx1: eazyigz: doesnt the second param need to be "w"? [19:21] draginx1: for write O_o [19:21] draginx1: wait nvm [19:21] draginx1: doesnt make sense [19:22] s0urce: writeFile(xxx,"read") would be a bit strange ;) [19:22] s0urce: a+ :) [19:22] dguttman has joined the channel [19:22] draginx1: right but there has to be a way [19:22] draginx1: for nodejs to know whether u want to file_append [19:22] draginx1: or not [19:23] draginx1: eazyigz: try creating a callback and see if u get an error.. [19:23] eazyigz: When you do fs.open('/cache.manifest', 'a', 666, function(e, id) {.... [19:23] draginx1: coul dbe writing permissions [19:23] eazyigz: that opens it for appending [19:23] eazyigz: but I just want to overwrite all contents in the file [19:23] eazyigz: so... [19:24] iFire` has joined the channel [19:24] s0urce: is there a require function at node? [19:24] s0urce: or include [19:24] draginx1: … require() :P [19:25] s0urce: :) [19:28] s0urce: i tested this now: http://pastebin.com/b1FEhmf7 [19:28] s0urce: any1 an idea, why this wont start express? [19:28] harth has joined the channel [19:28] s0urce: app.js = the express project main file [19:29] ricklon: voodootikigod: still same problem. However, same problem with 2 different arduinos [19:31] ricklon: in development branch I get: ERROR - 2011-03-31 19:30:29 --> CAUGHT ERROR: Undefined index: authorize_commands in /var/www/simiangrid/Grid/common/Factory.php at line 130 [19:31] void_ has joined the channel [19:31] ricklon: oops wrong window [19:31] ricklon: sorry [19:31] drudge: tjholowaychuk: server.js is where it's at [19:32] tjholowaychuk: drudge: haha [19:32] bergie has joined the channel [19:32] drudge: you know it's true [19:33] dguttman has joined the channel [19:33] tjholowaychuk: drudge: o ya shit, I downloaded one of your apps the other day, but I didn't realize it needed that third-party fever thing [19:33] tjholowaychuk: haha [19:33] tjholowaychuk: which sucks, it looks sweet but 30$ for a feed reader is lame [19:33] drudge: ah yeah [19:33] tjholowaychuk: unless its really that cool [19:34] drudge: Chill Pill is very nice, but Fever isn't worth 30 bucks [19:34] drudge: Chill Pill 2.0 is going to support GR [19:34] tjholowaychuk: awesome [19:35] drudge: tjholowaychuk: have you tried Reeder for Mac? [19:35] tjholowaychuk: drudge: yeah, it's missing all the management stuff though [19:35] tjholowaychuk: and my GR is a massive mess [19:35] tjholowaychuk: so that is what I need the most, google's UI is to painful [19:35] drudge: ah [19:35] tjholowaychuk: beyond painful [19:36] tjholowaychuk: my blind cat could design something better [19:36] V1: You can always try socialite app tjholowaychuk [19:37] drudge: tjholowaychuk: that can be said about most google products :) [19:37] tjholowaychuk: V1: ya would be kinda nice to have them all in the same spot [19:37] kmiyashiro: security question: If I customize my markdown processor to look for http://gist.github.com/blah.js and wrap it in script tags so it embeds it, am I opening a giant hole? Isn't it just as secure as any gist embed? [19:38] mraleph has joined the channel [19:38] s0urce: can any1 have a look at this plz and tell me what i got wrong http://pastebin.com/b1FEhmf7 [19:38] ehedenst has joined the channel [19:39] V1: But once you have all feeds nicely managed and tagged I would still recommend Reeder, it handles my 500 feeds without a sweat [19:39] tjholowaychuk: haha yeah the management is my issue right now, might just clear it all out and start fresh [19:40] beawesomeinstead has joined the channel [19:40] beawesomeinstead has joined the channel [19:40] kmiyashiro: I'm about to attempt a web app prototype in express [19:40] kmiyashiro: lets see how long thist akes [19:42] isaacs has joined the channel [19:43] nextbit has joined the channel [19:43] pandeiro has joined the channel [19:45] Horofox has joined the channel [19:45] gg411 has joined the channel [19:46] mikl has joined the channel [19:46] hellp has joined the channel [19:48] SamuraiJack has joined the channel [19:48] arpegius has joined the channel [19:49] GriffenJBS: any solutions for circular json? [19:49] markwubben has joined the channel [19:50] nextbit has left the channel [19:51] ChrisCi: Hi [19:51] ChrisCi: If I think there is a bug in node.js what should I do ? [19:52] s0urce: isaacs, http://stackoverflow.com/questions/1972242/auto-reload-of-files-in-node-js [19:52] s0urce: i know now u know how ;) [19:52] mjr_: ChrisCi: can you fix it? [19:53] tjholowaychuk: s0urce: $ watch --interval=1 node app.js [19:53] tjholowaychuk: bam [19:53] tjholowaychuk: haha [19:53] ehedenst has joined the channel [19:53] SamuraiJack_ has joined the channel [19:53] tjholowaychuk: well [19:53] tjholowaychuk: actually that probably wont work [19:53] ChrisCi: No... I only can see what happens. [19:53] kmiyashiro: tjholowaychuk: node sass doesn't support scss format? [19:53] ChrisCi: There is not a lot of documentation on how to use https.request. [19:53] tjholowaychuk: kmiyashiro: no, it's really old, and doesn't support a lot of things [19:53] tjholowaychuk: use stylus [19:53] kmiyashiro: haha... [19:54] kmiyashiro: I see how it is [19:54] ChrisCi: Everythign works when I do a call at the time but when I start having different tequest at the same time there are problems. [19:54] kmiyashiro: how do I switch an express project to use stylus? [19:54] ricklon: voodootikigod: still baffled screen runs fine. [19:54] icebox has joined the channel [19:54] tjholowaychuk: kmiyashiro: stylus ships with connect middleware that is similar to connect.compiler [19:54] tjholowaychuk: what you are probably using right now [19:55] onr: ryah: where to start embedding nodejs interpreter into c/c++? [19:55] mjr_: ChrisCi: can you get a reproducible test case? [19:55] noahcampbell has joined the channel [19:55] blkcat: onr: erm, v8? :) [19:56] onr: blkcat: v8, libev, libeio? it means rewriting node.js :) [19:56] jmhnilbog has joined the channel [19:56] lessthanzero has joined the channel [19:56] kmiyashiro: app.use(express.compiler({ src: __dirname + '/public', enable: ['stylus'] })); ? [19:56] Spion__: hmm, I wonder, does adding #!/usr/bin/node at the top of a js file do anything on your machine(s)? [19:56] tjholowaychuk: kmiyashiro: nope, app.use(stylus.middleware(....)) [19:57] Spion__: oh wait, now it works perfectly here. [19:57] mikegerwitz: Spion__: if you `chmod +x` a file, then attempt to execute it, the shell will attempt to execute it regardless of extension. So it should work, yes. [19:57] piscisaureus: ryah: here? [19:58] johnnywengluu: anyone is using irccloud.com? [19:58] johnnywengluu: can't login into freenode [19:58] jimt has joined the channel [19:59] Spion__: mikegerwitz, exactly; thanks :) strange that it used to report that the (node) binary can't be found before... (even though it was clearly there) [19:59] Spion__: but now it works fine. [19:59] dmcquay_ has joined the channel [19:59] baudehlo: if I recurse forever will the node stack overflow? [19:59] baudehlo: do I need to do onNextTick() instead? [19:59] mikegerwitz: baudehlo: yes [19:59] davidwalsh has joined the channel [19:59] baudehlo: k, ta. [19:59] mikegerwitz: baudehlo: process.nextTick() :) [20:00] johnnywengluu: anyone have a good tip on how to generate a good online documentation with markdown? [20:00] baudehlo: mikegerwitz: yeah yeah, would have looked up the docs :) [20:01] mike_miller has joined the channel [20:01] icebox: Hello... I need a bit of help about Step: http://pastebin.com/734XV2qE I read the doc, but I don't understand how to get data in the next step using this.parallel()... what am I doing wrong? I get always, it seems a response object... "request" returns error, response and data. [20:01] baudehlo: man, I can write super complex programs, but give me stupid easy maths to do and I sit here for ages trying to figure it out. [20:02] Gigawatt has joined the channel [20:03] Gigawatt: guys, if i do a for loop on an array, and use i to hold the index [20:03] Gigawatt: and within the for loop i do a switch statement like switch(i){} [20:04] Gigawatt: why do i have to mark the key as a string when doing the case, like so: case '1': [20:04] Gigawatt: case 1: does not register :/ [20:04] drefined has joined the channel [20:05] mikegerwitz: v8: for ( var i = 0; i < 5; i++ ) { switch ( i ) { case 1: console.log( 'foo' ); } } [20:05] v8bot: mikegerwitz: "foo" [20:05] mikegerwitz: Gigawatt: Shouldn't have to :/ [20:06] mscdex: Gigawatt: depends on the data type [20:06] drefined has joined the channel [20:06] Gigawatt: mscdex, see this code [20:06] Gigawatt: http://pastebin.com/W7XF6iaZ [20:06] mikegerwitz: oh. [20:06] Gigawatt: everything get's pushed into the params, but if i wrap them in qoutes, it works [20:07] drefined has joined the channel [20:07] Spion has joined the channel [20:07] mrjjwright has joined the channel [20:07] mikegerwitz: Gigawatt: yeah that's a bit different. Keys are always returned as strings. If pathCleaned is an array, I wouldn't use for..in. It's slower [20:08] Gigawatt: use length ? [20:08] mikegerwitz: var len = arr.length; for ( var i = 0; i < len; i++ ) , yeah. [20:08] beawesomeinstead has joined the channel [20:08] Gigawatt: and that should return intergers ? [20:09] baudehlo: you can initialise both locally: for (var i=0,len=arr.length; i < len; i++ ) [20:09] mikegerwitz: Gigawatt: i will always be an integer in that case, yes [20:09] s0urce: the first time i load express it works [20:09] Gigawatt: teset and works, thanks [20:09] drefined has joined the channel [20:09] s0urce: the second time it wont [20:09] s0urce: need i die kill the server before? [20:09] Gigawatt: is there areason why a for / in returns strings ? [20:10] s0urce: if yes, how can i do? [20:10] drudge: s0urce: how isn't it working? what do you mean second time? [20:10] s0urce: sec [20:10] mikegerwitz: v8: var obj = { foo: 'foo', bar: 'bar' }; for ( key in obj ) { console.log( key ) } [20:10] s0urce: http://pastebin.com/UKeRD8ir [20:10] fadeddata has joined the channel [20:10] s0urce: this loads it once [20:11] s0urce: but onchange [20:11] s0urce: i get an error [20:11] mikegerwitz: v8: var obj = { foo: 'foo', bar: 'bar' }; for ( key in obj ) { console.log( key ); } [20:11] mikegerwitz: hm! [20:11] mikegerwitz: Well, because that returns object properties, not just array elements :) [20:12] eee_c has joined the channel [20:12] ggoodman has joined the channel [20:13] s0urce: drudge, u see what i try? [20:13] MrTopf has joined the channel [20:13] Rodtusker has joined the channel [20:14] s0urce: i just put the express default app.js into a this.app=function(....) [20:14] beejeebus has joined the channel [20:15] c4milo: tjholowaychuk: tj ! [20:15] tjholowaychuk: whatup [20:16] c4milo: tjholowaychuk: do you know who many concurrent connections supports expressjs/connect/nodejs [20:16] c4milo: ? [20:16] c4milo: tjholowaychuk: http connections [20:16] hij1nx has joined the channel [20:16] tjholowaychuk: 50 million [20:16] tjholowaychuk: s/million/billion/ [20:16] c4milo: tjholowaychuk: doing streaming [20:16] ggoodman: SubStack: are you there? your masterwork seems to be crashing Chrome on a regular basis for me :p [20:16] c4milo: trillion [20:17] tjholowaychuk: no clue man [20:17] tbranyen: c4milo: that really really really depends on your setup and the clients [20:17] tbranyen: and the tubes [20:17] tjholowaychuk: haven't even begun to test anything like that [20:17] c4milo: I got a trillion measure [20:17] tjholowaychuk: and like he said ^ [20:17] tjholowaychuk: depends on tons [20:17] Draggor: How does one get a project into npm? [20:17] tbranyen: Draggor: npm publish its in the readme/docs [20:17] c4milo: tbranyen: hello world [20:18] c4milo: tbranyen: yes I know that, I just wanted to see what does TJ say when he is drunk [20:18] tbranyen: r u drank? [20:18] tbranyen: el purple [20:18] arpegius has joined the channel [20:18] tjholowaychuk: haha im not drunk [20:18] unflores: el morado [20:18] Gigawatt: when securing against attempts to use ../ what would i have to do, use unescape and replace ? [20:18] unflores: it's pretty good [20:20] templaedhel has joined the channel [20:20] ricklon has joined the channel [20:20] ricklon: voodootikigod: Are the D2xx drivers needed? [20:21] mikl has joined the channel [20:21] s0urce: how can i kill the express process without killing the whole node process? [20:22] doubletap has joined the channel [20:22] nilyt has joined the channel [20:22] tjholowaychuk: s0urce: who cares just kill the whole thing man lol you are wasting your time [20:22] s0urce: if i kill the whole process my script ends and then? [20:22] s0urce: how can i reload it, if its killed once [20:23] tjholowaychuk: re-executing the same command with node's child_process mod [20:23] templaedhel has left the channel [20:23] tjholowaychuk: or ... just use something that exists already [20:24] s0urce: mb it works with forever? [20:24] tjholowaychuk: dunno [20:24] kmiyashiro: muscle memory is making me write invalid stylus syntax [20:24] SubStack: ggoodman: hooray, which one? [20:25] tjholowaychuk: kmiyashiro: haha :) later tonight if I have some time, I will have transparent gradient support [20:25] ggoodman: SubStack: dnode when trying a server --> client RPC [20:25] tjholowaychuk: which will blow sass out of the water [20:25] tjholowaychuk: well compass [20:25] kmiyashiro: what about compass? [20:25] kmiyashiro: oh [20:25] tjholowaychuk: compass in stylus would be soooooooo much better [20:25] kmiyashiro: my only complaint with compass is that it doesn't support multiple shadows/backgrounds yet [20:26] s0urce: omfg [20:26] s0urce: it works!! [20:26] ggoodman: SubStack: I don't even know where to begin debugging as I get the "Aw Snap" from chrome [20:26] s0urce: so f... easy [20:26] tjholowaychuk: compass: "+linear-gradient(color-stops(white, black), left)" (looks gross, limited syntax, not even remotely transparent) [20:26] s0urce: onchange -> kill and this started with forever -.- [20:26] SubStack: ggoodman: flash maybe? [20:26] SubStack: I get that 'aw snap' thing from google maps [20:27] tjholowaychuk: stylus: background: linear-gradient(top, white, black); [20:27] tjholowaychuk: expands to vendor functions [20:27] ggoodman: SubStack: interesting, i'd have to try disabling that transport [20:27] tjholowaychuk: magically [20:27] ggoodman: SubStack: what would it normally default to? [20:27] SubStack: well websockets in chrome [20:27] SubStack: hmm [20:27] SubStack: ggoodman: stack overflow perhaps? [20:27] ggoodman: yeah, pretty sure that was what was being used as I had to fix it to make it work :p [20:27] SubStack: unbounded recursion anywhere? [20:27] SubStack: or does it crash on the examples too? [20:28] saikat has joined the channel [20:28] tbranyen: firefox mobile has websockets support which is pretty baller [20:28] ggoodman: no idea, I'm using this w/ browserify and coffee script so it may be a bit too intense [20:28] wasabista has joined the channel [20:29] ggoodman: SubStack: on an related note, do you think built-in support for now.js / socket.io for browserify is on the near horizon? [20:29] highermath_away has joined the channel [20:29] highermath_away has joined the channel [20:29] murz has joined the channel [20:29] SubStack: well socket.io for sure [20:30] alek_br_ has joined the channel [20:30] mike_miller has joined the channel [20:30] SubStack: but I'm trying to get package maintainers to add browserify fields to their package.jsons themselves [20:31] ggoodman: makes more sense.. how would I go about adding those fields to a local checkout? [20:31] SubStack: just update the package.json [20:31] SubStack: check out dnode/package.json for an example [20:31] SamuraiJack_ has joined the channel [20:32] ggoodman: i'll give it a whirl [20:32] mytrile has joined the channel [20:32] eaton has joined the channel [20:32] eaton has joined the channel [20:33] s0urce: if i want express to keep a var snyced, i need socket.io? [20:33] tbranyen: urgh its weird mobile firefox claims to have websockets but socket.io doesn't work with it [20:33] tbranyen: grrr [20:33] s0urce: like this time @ http://s0urce.de:3000/ [20:35] V1: tbranyen: probably disabled by default, as they did with FF4 [20:35] tanepiper: ryah: ping [20:36] darshanshankar has joined the channel [20:37] tbranyen: haha actually it does work, just sooooo slowwww [20:37] draginx1: tbranyen: no it's not… FF4 disabled it ;) [20:38] ehedenst has joined the channel [20:38] ggoodman: SubStack: So supposing the browser lib that is served cannot be served statically; it requires some parsing, how would that translate to a "browserify" entry? [20:39] tfe_ has joined the channel [20:39] tfe_ has joined the channel [20:39] tfe__ has joined the channel [20:40] Tobsn: what is it called again if you have the arguments attached at the ned of a function? var foo = (function(a,b){})('xy','xy'); [20:40] mikegerwitz: Tobsn: Generally just a self-executing function [20:41] Tobsn: aaah [20:41] s0urce: <3 forever ;) [20:41] aho: immediately invoked function expression [20:41] s0urce: gn8 ;) [20:41] daniellindsley has joined the channel [20:41] Tobsn: invoked function [20:41] Tobsn: there ya go [20:41] Tobsn: thanks ;) [20:41] mikegerwitz: Tobsn: well not necessarily ;) any time you call a function, you invoke it [20:41] Tobsn: btw. is there some hipster tutorial how to build a class module, the correct way [20:42] Tobsn: well i want a class with a constructor but i want to write it like a object [20:42] Tobsn: im wondering if thats possible [20:42] aho: IFFE (~iffy) :> [20:42] tbranyen: draginx1: i went into about:config and it says websockets are enabled [20:42] tbranyen: i do typeof WebSocket and i get function [20:42] tbranyen: its most definitely enabled [20:42] aho: *IIFE [20:42] Tobsn: var x = {blah:function(){}} y = new x(1,2) [20:43] Tobsn: i think that will not work [20:43] Tobsn: :/ [20:43] tfe_ has joined the channel [20:44] mikegerwitz: v8: var Foo = function( x ){}; x.prototype.blah = function() { return this.x; }; ( new Foo() ).blah(); [20:44] v8bot: mikegerwitz: ReferenceError: x is not defined [20:44] Tobsn: i saw you can mix it somehow with a function that prototypes itself inside the function [20:44] mikegerwitz: oops [20:44] mikegerwitz: v8: var Foo = function( x ){ this.x = x; }; x.prototype.blah = function() { return this.x; }; ( new Foo() ).blah(); [20:44] v8bot: mikegerwitz: ReferenceError: x is not defined [20:44] mikegerwitz: I hate one-lines [20:44] mikegerwitz: liners* [20:44] strmpnk has joined the channel [20:44] Tobsn: hehe [20:44] mikegerwitz: v8: var Foo = function( x ){ this.x = x; }; Foo.prototype.blah = function() { return this.x; }; ( new Foo() ).blah(); [20:44] v8bot: mikegerwitz: undefined [20:44] hunterloftis has joined the channel [20:44] mikegerwitz: well, if you actually pass a value for x, it'll be defined :) [20:45] ryah: w/window 12 [20:45] Tobsn: v8: var foo = function(x){ this.x = x; foo.fn = { 'blah':function(){ return this.x; } } }; foo.blah(); [20:45] v8bot: Tobsn: TypeError: Object function (x){ this.x = x; foo.fn = { 'blah':function(){ return this.x; } } } has no method 'blah' [20:45] mikeal has joined the channel [20:46] Tobsn: v8: var foo = function(x){ this.x = x; foo.fn = foo.prototype = { 'blah':function(){ return this.x; } } }; foo.blah(); [20:46] v8bot: Tobsn: TypeError: Object function (x){ this.x = x; foo.fn = foo.prototype = { 'blah':function(){ return this.x; } } } has no method 'blah' [20:46] Tobsn: damnit. [20:46] mikegerwitz: Tobsn: You need to define the function on foo's prototype [20:46] mikegerwitz: Tobsn: foo.prototype.blah [20:46] Tobsn: why cant you just pass in the object [20:46] mikegerwitz: Then use new foo() [20:47] mikegerwitz: Tobsn: How do you mean? [20:47] Tobsn: hmm [20:47] kmiyashiro: Anyone aware of a forum built on Express? [20:47] mikegerwitz: Tobsn: Oh, sorry. Again the one-liner confused me. I see what you're trying to do [20:47] varioust has joined the channel [20:48] mikegerwitz: Tobsn: You can do foo.prototype = {}. But don't put that within function foo(), because then the prototype will be redefined every time you instantiate it [20:48] Tobsn: v8: var foo = function(x){ var foo = functoin(){ return new foo.init(); }; foo.init = function(){}; foo.fn = foo.init.prototype = { 'blah':function(){ return this.x; } } }; foo.blah(); [20:48] v8bot: Tobsn: SyntaxError: Unexpected token { [20:49] mikegerwitz: Tobsn: In your above example, you need to do ( new foo( 5 ) ).blah(). [20:49] arpegius_ has joined the channel [20:49] dguttman has joined the channel [20:49] Tobsn: v8: var foo = function(){ var foo = function(){ return new (foo()).init(); }; foo.init = function(){}; foo.fn = foo.init.prototype = { 'blah':function(){ return this.x; } }; foo.blah(); [20:49] v8bot: Tobsn: SyntaxError: Unexpected end of input [20:50] Tobsn: v8: var foo = function(){ var foo = function(){ return new foo.init(); }; foo.init = function(){}; foo.fn = foo.init.prototype = { 'blah':function(){ return this.x; }; }; foo.blah(); [20:50] v8bot: Tobsn: SyntaxError: Unexpected token ; [20:50] Tobsn: yeah that will just not end well [20:50] Tobsn: either way [20:51] mikegerwitz: Tobsn: heh, if you look up prototypes in Javascript, you should find what you need [20:51] Tobsn: v8: var foo = function(){ var foo = function(){ return new foo.init(); }; foo.init = function(){}; foo.fn = foo.init.prototype = { 'blah':function(){ return this.x; } }; foo.blah(); [20:51] v8bot: Tobsn: SyntaxError: Unexpected end of input [20:51] Tobsn: arg [20:51] Tobsn: i just hate doing the whole .prototype thing [20:51] fly-away has joined the channel [20:52] Tobsn: i with i could make an object that i can create with new and has a constructor [20:52] Tobsn: that would look so pretty [20:52] Tobsn: :P [20:54] mikl_ has joined the channel [20:54] vckt has joined the channel [20:56] [[zzz]] has joined the channel [20:58] doubletap has left the channel [20:58] Me1000 has joined the channel [20:58] davida has joined the channel [20:59] esmaxwill has joined the channel [20:59] beejeebus has left the channel [20:59] draginx1: tbranyen: weird not really sure =/ [21:00] tbranyen: draginx1: firefox 4 isn't the same thing as firefox mobile [21:00] davida_ has joined the channel [21:00] draginx1: didnt realize u were on mobile [21:00] thomblake has left the channel [21:00] tbranyen: yeah i said firefox mobile ;-) [21:00] tbranyen: its neat [21:00] draginx1: perhaps socketIO does a browser detection [21:00] tbranyen: no it works, it was just mad slow [21:00] draginx1: and doesnt take mobile into effect [21:00] draginx1: oooo [21:00] draginx1: nice :D [21:01] sunnyohno has joined the channel [21:03] mrjjwright has joined the channel [21:04] mscdex: there is firefox 4 mobile now though :p [21:04] Tobias| has joined the channel [21:06] Gigawatt: mscdex: How big woudl you recommend the buffer to be whens treaming static files via the http? [21:06] Gigawatt: would* [21:06] Gigawatt: streaming* [21:06] tfe_ has joined the channel [21:06] tfe_ has joined the channel [21:06] mscdex: Gigawatt: what do you mean? [21:06] TooTallNate: Gigawatt: you should stream it out with fs.ReadStream [21:07] Gigawatt: i have a directory called www, where i hold all public files, images, css, etc, when a request comes in a sanitize therequest and if the static file exists i will send [21:07] meandi has joined the channel [21:07] useware has joined the channel [21:07] Gigawatt: but im's not going to load the files into the memory im going to send them in chunks [21:07] Gigawatt: how bigwould you say i should set the chunk size ? [21:07] mscdex: pipe them [21:08] Gigawatt: hmm, does piping do when the data is ready ? [21:08] AAA_awright: Yeah let the OS deal with that [21:08] varioust has joined the channel [21:08] TooTallNate: Gigawatt: something like: "fs.createReadStream(filename).pipe(res);" [21:08] apoc has joined the channel [21:09] Gigawatt: and that would be faster then sending in chunks right [21:09] TooTallNate: what do you mean "chunks"? [21:09] alek_br has joined the channel [21:10] TooTallNate: If you set a 'Content-Length' http response header, then chunked encoding will be disabled [21:11] mike5w3c has joined the channel [21:12] gerad has left the channel [21:13] mrjjwright has joined the channel [21:13] mrjjwright has joined the channel [21:16] davidascher has joined the channel [21:16] balaa has joined the channel [21:18] jeremyselier has joined the channel [21:18] unlink has joined the channel [21:18] unlink has joined the channel [21:19] arpegius_ has joined the channel [21:19] matschaffer has joined the channel [21:20] sh1mmer has joined the channel [21:20] skj has joined the channel [21:20] skj: anyone try sending emails from no.de ? [21:21] ryah: skj: i think the email port is blocked [21:21] skj: oh, too bad [21:23] MikeMakesIt has joined the channel [21:23] beawesomeinstead has joined the channel [21:23] beawesomeinstead has joined the channel [21:24] Roelven has joined the channel [21:24] skj: well, thanks anyway [21:25] saschagehlich has joined the channel [21:25] Gigawatt: mscdex,TooTallNate: for some reason this is not piping, you know why ? fs.createReadStream(resourcePath).pipe(response); [21:25] Gigawatt: do i have to suply the socket ? [21:25] Gigawatt: response.socket ? [21:25] adelcambre has joined the channel [21:26] TooTallNate: no that should not be necessary [21:26] Gigawatt: i basically send http 200, add content type and then that line, when i try access the file via the browser it's just blank but the headers are there and the 200 [21:28] TooTallNate: and you're doing that by calling `res.writeHead(200, headers)` right? [21:29] eee_c has joined the channel [21:30] technoweenie has joined the channel [21:30] mscdex: Gigawatt: it works for me [21:30] mscdex: Gigawatt: gist your code? [21:30] Gigawatt: mscdex, i fixed it, i was calling response.end() after that, so it shut the connection before it could be piped [21:30] mscdex: ah [21:31] mscdex: yeah pipe will automatically call .end() on the writablestream unless you tell it otherwise [21:32] Gigawatt: kool, hows all you guys anyway, any kool new projects in the bakery ? [21:33] Tobsn: sooooo... [21:34] Tobsn: im introducting mmm [21:34] Tobsn: instead of www [21:34] Tobsn: cause it makes the internet sound better [21:34] Tobsn: and i already started with it. [21:34] Tobsn: http://mmm.bacon.gd [21:35] piscisaureus has joined the channel [21:35] Astro has joined the channel [21:35] deepthawtz has joined the channel [21:35] pdelgallego_ has joined the channel [21:35] pdelgallego has joined the channel [21:35] TheFuzzball: What's the name of the building design where you can see everyone from one point but they can't see you? [21:36] Tobsn: mirror [21:36] Tobsn: 2way mirror [21:36] Tobsn: :P [21:36] Gigawatt: whats the point ? [21:37] Tobsn: secret masturbation [21:38] paulrollo: panopticon? [21:38] Croms has joined the channel [21:38] robotarmy has joined the channel [21:38] CIA-1: node: 03Ryan Dahl 07v0.4 * r6631983 10/ (12 files in 5 dirs): Upgrade V8 to 3.1.8.8 - http://bit.ly/dW1RhC [21:38] CIA-1: node: 03Ryan Dahl 07v0.4 * rad861e1 10/ (12 files in 5 dirs): Merge branch 'v8-3.1' into v0.4 - http://bit.ly/emeTzw [21:39] TheFuzzball: pandeiro: That's the one :) [21:39] davidascher has joined the channel [21:39] monokrome: Has anyone here got NodeJS to build in archlinux? [21:39] monokrome: ACTION thinks that it might have issues with gcc 4.6.0? [21:40] jcody has joined the channel [21:41] jcody: hey folks, i seem to be having some trouble getting my mac installation working correctly. all npm install module requests are installing to ./node_modules instead of ~/usr/local/lib/node_modules, and my node-5 is 0.5 prerelease, which I'm not sure if it's as it should be. think anyone could lend a hand? [21:41] Tobsn: --global [21:41] Tobsn: npm install something --global [21:41] mscdex: monokrome: which issue? [21:42] isaacs: jcody: compare: `npm root` vs `npm root -g` [21:42] Tobsn: or first find out if im right [21:42] jcody: well jeez, that was the easiest thing ever :) [21:42] Tobsn: but what does isaacs know anyway :P [21:42] Tobsn: jcody, just had the same problem like 4 hours ago on a new box... [21:42] davida has joined the channel [21:43] jcody: any idea the reason for it? i didn't run across it in the npm docs [21:43] Tobsn: havent looked into it, let isaacs answer that [21:43] isaacs: jcody: where did you look? (actually curious about where this info should be spelled out) [21:43] Tobsn: its probably about where you build your node [21:43] jcody: https://github.com/isaacs/npm#readme [21:43] isaacs: ok [21:44] isaacs: thanks. [21:44] Tobsn: yeah, i had to forum search it too [21:44] isaacs: still working out technical issues, haven't really given the docs the love they deserve yet [21:44] Tobsn: shouldnt that be inverted btw? [21:44] Tobsn: like --global is default and --local would be where you are [21:44] isaacs: Tobsn: npm config set global true [21:44] monokrome: mscdex: Sorry, getting sprunge [21:44] isaacs: Tobsn: but, no. it should not. [21:44] isaacs: :) [21:44] jcody: isaacs: awesome! [21:44] Tobsn: hehe [21:44] monokrome: so that I can paste you the output [21:45] tfe_ has joined the channel [21:45] mscdex: ok [21:45] tfe_ has joined the channel [21:45] Poetro: isaacs: a new cygwin is out stating: "- Avoid potential data loss when sending lots of data through a pipe." maybe this fixes things [21:45] Tobsn: mscdex, i found the issue btw. [21:45] isaacs: Poetro: maybe. [21:45] Tobsn: #lighttpd crazy people showed me why... [21:45] isaacs: Poetro: cygwin is a ghetto [21:45] mjr_: poor isaacs has nothing but hate for cygwin. [21:45] isaacs: i mean, much <3 to the poor souls who maintain it [21:46] mattrobenolt has joined the channel [21:46] Tobsn: its a socket, so there is no termination signal... its literally a stream. the first write() always gets separated and than afterwards "concatted" cause its a stream... [21:46] isaacs: it's just, i don't know. it seems like the type of software that's been on life support for so long, even though we all know what the compassionate thing is. [21:46] Tobsn: and the 50ms timeout worked only cause the kernel assumes the stream ended [21:46] Tobsn: so i had do implement my own temrination string and split() on it [21:46] Tobsn: *fixed [21:46] Poetro: isaacs: as we have much love who maintains the best package manager ever ;) [21:46] isaacs: aww [21:46] wirehead: cygwin was for those sad days before programmers were issued macbooks. [21:47] Tobsn: wirehead, so true [21:47] ezmobius has joined the channel [21:47] dgathright has joined the channel [21:47] baudehlo: ugh. SQLite drivers fail. [21:47] Tobsn: only reason to get windows these days is if you want to develop .net or something similar digusting. [21:47] Tobsn: and even for that i have parallels [21:48] baudehlo: the "sqlite3" driver works nicely, returns SQLITE_BUSY appropriately, but crashes node... [21:48] baudehlo: the "sqlite" driver doesn't return SQLITE_BUSY, so you get database locks. [21:48] baudehlo: I can't f'ing win. [21:48] monokrome: mscdex: Never mind. That package doesn't exist :( [21:49] monokrome: mscdex: http://pastie.org/1741309http://pastie.org/1741309 [21:49] mike_miller has joined the channel [21:49] stonebranch has joined the channel [21:50] monokrome: somanywarnings [21:50] jonaslund has joined the channel [21:51] monokrome: Ouch. Double-paste. http://pastie.org/1741309 [21:52] trotter has joined the channel [21:52] langworthy has joined the channel [21:52] hij1nx has joined the channel [21:52] monokrome: Wondering if it might be a GCC 4.6.0 issue? [21:53] Druide_ has joined the channel [21:54] Tobsn: but scons is installed? [21:54] monokrome: Yes. [21:56] Tobsn: btw. isaacs, why has debian 0.5.0-pre ? [21:56] saschagehlich has joined the channel [21:56] robb1e_ has joined the channel [21:56] mscdex: monokrome: on line 140 of deps/v8/src/SConstruct append the item: '-Wno-unsed-but-set-variable' [21:56] mscdex: then make distclean and try again [21:57] monokrome: mscdex: Append it to arch:arm? [21:58] isaacs: Tobsn: huh? [21:58] isaacs: no idea. [21:58] ikarosdaedalos has joined the channel [21:58] Tobsn: its debian, they should run 0.2.* [21:58] mscdex: monokrome: oops, deps/v8/SConstruct [21:59] gozala has joined the channel [21:59] monokrome: mscdex: and is "unsed" a type of "unused"? [22:00] stephen_mcd has joined the channel [22:00] mscdex: yeah that should be unused not unsed [22:00] monokrome: yep [22:00] monokrome: It's building now. Thank you :) [22:00] mscdex: awesome [22:01] ikarosdaedalos: hey - how can I make an https request using http.get? I can change the port but I don't think that's all I need to do [22:01] monokrome: http://www.silassewell.com/blog/2010/06/03/node-js-https-ssl-server-example/ [22:02] mjr_: ikarosdaedalos: use https.get() [22:02] mscdex: ikarosdaedalos: https.get [22:02] mscdex: heh [22:02] Tobsn: hehe [22:02] monokrome: :o [22:02] Tobsn: and i wanted to write putting an url into the request and not only a port would do it [22:02] ikarosdaedalos: ah, lol, thanks [22:03] matjas has joined the channel [22:03] isaacs: SubStack: hey [22:03] mattrobenolt has joined the channel [22:03] isaacs: SubStack: i'm having trouble compiling bigint if gmp.h is in /opt/local/includes [22:03] isaacs: SubStack: any ideas? [22:04] tschundeee has joined the channel [22:04] Tobsn: checked the bits? [22:05] davidwalsh has joined the channel [22:05] Croms: monokrome: That example is hopelessly outdated. :—) [22:05] monokrome: Yeah [22:05] stagas has joined the channel [22:05] onr: isaacs: iirc, you wrote an article about module development and packaging for node.js, right? [22:05] monokrome: First result on Google [22:05] monokrome: :( [22:06] Tobsn: monokrome, did one of your friends +1'd it? [22:06] Tobsn: ;) [22:06] isaacs: onr: maybe you mean http://howtonode.org/how-to-module? [22:06] monokrome: Hope not [22:06] Tobsn: im just going to randomly +1 porn sites [22:07] muk_mb has joined the channel [22:07] Croms: https://gist.github.com/969a1ea456598d2b5a62 This is slightly better. [22:07] monokrome: Tobsn: I was actually looking for http://nodejs.org/docs/v0.4.4/api/https.html#https.Server [22:07] monokrome: :/ [22:07] Tobsn: thats better [22:07] Tobsn: +1 [22:08] onr: isaacs: yeah. thanks [22:10] beejeebus has joined the channel [22:12] Xano has joined the channel [22:13] stagas has joined the channel [22:13] kuya_ has joined the channel [22:15] dyer has joined the channel [22:15] Draggor: isaacs: You probably have to tell g++ to look there using the -L flag, though I'm unsure how to do that using wscript [22:15] isaacs: Draggor: yeah, i got a patch, gonna send SubStack a pull req [22:16] Draggor: I think once I make bigfloat and bigreal, I'll probably do a bignum package for all three [22:16] Draggor: s/real/rational [22:17] tjholowaychuk has joined the channel [22:18] sep0 has joined the channel [22:19] sep0: hey guys where is npm storing the installed modules? [22:19] isaacs: sep0: what version of npm? [22:19] sep0: isaacs : 0.3.15 [22:19] isaacs: 1.0: local: `npm root` and global: `npm root -g`. 0.x: `npm get root` [22:20] isaacs: sep0: also, check out the `npm faq` commands [22:20] sep0: isaacs : thanks [22:20] isaacs: np :) [22:20] max_dev has joined the channel [22:22] ruxpin` has joined the channel [22:24] unomi has joined the channel [22:27] darshanshankar has joined the channel [22:28] halfhalo has joined the channel [22:29] halfhalo has joined the channel [22:29] Tobsn: http://www.google.com/events/io/2011/ [22:29] halfhalo has joined the channel [22:30] halfhalo has joined the channel [22:30] wirehead has joined the channel [22:30] halfhalo has joined the channel [22:33] Tobsn: nice, if you want to change stuff on your google profile [22:33] Tobsn: you get a Save, and make profile public button [22:33] Tobsn: Google profiles require a public first and last name. [22:33] Tobsn: Your full name is not being displayed on your Google Profile. This option is no longer supported in Google Profiles [22:33] Tobsn: saying this [22:33] Tobsn: way to go google. [22:33] halfhalo has joined the channel [22:34] sveisvei has joined the channel [22:34] tim_smart has joined the channel [22:35] mraleph has joined the channel [22:36] galaxywatcher has joined the channel [22:42] tfe_ has joined the channel [22:42] tfe_ has joined the channel [22:43] raidfive has joined the channel [22:43] mryan has joined the channel [22:43] mryan: System Information: Model: MacBook Pro • CPU: Intel Core 2 Duo T8300 (2 Cores) @ 2.40 GHz • L2: 3.15 MB • Memory: 4.00 GB • Load: 0.60 0.65 0.56 • Uptime: 53mins 19secs • Disk Space: Total: 199.71 GB; Free: 16.75 GB • Graphics: NVIDIA GeForce 8600M GT • OS: Mac OS X 10.6.7 (Build 10J869) • Textual: 2.0.2 K'ed By AJhacks (Build #8177) (Running for 47mins 53secs) [22:44] asabil has joined the channel [22:45] mikeal has joined the channel [22:47] boaz has joined the channel [22:47] sonnym has joined the channel [22:48] c4milo has left the channel [22:48] zylo has joined the channel [22:52] RusAlex has joined the channel [22:52] RusAlex: hi guys, i've newbie question [22:52] derferman has joined the channel [22:53] ckknight: RusAlex: don't ask to ask, just ask [22:53] mike_miller: RusAlex: Speak now, or forever hold your peace ;) [22:53] Tobsn has joined the channel [22:53] tanepiper: isaacs: can i pm you [22:53] RusAlex: im pasting =) [22:53] isaacs: tanepiper: sure :) [22:54] edude03 has joined the channel [22:54] RusAlex: http://pastebin.com/vRFdDaWx this is my code. so next one is my jade template http://pastebin.com/Rcr0ZyF0 [22:54] jscheel has joined the channel [22:54] RusAlex: temlate renders only one LI element. i didn't uderstand why [22:54] RusAlex: but in my console i see 3 docs [22:54] jscheel: tjholowaychuk: any idea why a try catch block around res.render() would not catch when the view is missing in express 2.2.0? [22:55] RusAlex: any idea ? [22:55] tjholowaychuk: jscheel: it's not supposed to, it's there to unwind the stack [22:55] tjholowaychuk: jscheel: and then next(err) [22:56] carnivore has joined the channel [22:56] tjholowaychuk: RusAlex: what version of express? [22:56] jscheel: tjholowaychuk: really? I wonder if I have an older version of express on my work computer, because it would catch the error there, but the same code here doesn't catch it [22:56] tjholowaychuk: RusAlex: and with jade, try - each offer in offers + offer.title [22:56] tjholowaychuk: instead [22:56] RusAlex: express 2.0.0beta3 and node 0.5.0pre [22:56] tjholowaychuk: jscheel it ends up in the callback or next(err) [22:57] tjholowaychuk: it's not supposed to be silent [22:57] jscheel: tjholowaychuk: hmm, so, if sub is defined it will throw an exception though, right [22:57] tjholowaychuk: RusAlex: also you can remove "locals: " the object passed IS the locals now [22:57] tjholowaychuk: but that will still work [22:57] tjholowaychuk: jscheel: yup [22:58] tjholowaychuk: if it's a sub template, it throws, unwinding the stack to prevent several next() calls [22:58] Spion_ has joined the channel [22:58] perlmonkey2 has joined the channel [22:59] RusAlex: tjholowaychuk: oh, now i see elements but they blank. thanks [22:59] jscheel: tjholowaychuk: ahh, it looks like it changed between 2.0.0 and 2.2.0 [22:59] RusAlex: will continue to develop my small app [22:59] tjholowaychuk: jscheel: yeah there was a recent fix [22:59] jscheel: <--- needs to run npm umpdate more [23:00] xandrews has joined the channel [23:00] jscheel: tjholowaychuk: cool, I'll just throw it in the callback, thanks [23:00] tjholowaychuk: jscheel: you can check err.view specifically if you are just looking to target a missing view [23:00] tjholowaychuk: err.view.path etc are available [23:01] RusAlex: tjholowaychuk: also one small question, why res.render used in callback? early it used in express ofter all models finded? [23:01] RusAlex: s/ofter/after/g [23:01] jscheel: tjholowaychuk: ok, thanks. What I'm doing is checking for an existing view first, then, if it doesn't exist, use the url to pull the content from a different site (either new or cached) and display it [23:01] tjholowaychuk: the callback is optional [23:01] jscheel: basically a fallback [23:02] galaxywatcher has joined the channel [23:02] tjholowaychuk: jscheel: ah, then yeah you will want to if (err.view) whatever else next(err) [23:02] RusAlex: tjholowaychuk: let me see, is callback will be more fast and less memory usage ? [23:02] jscheel: tjholowaychuk: next step is res.send(404) :) [23:02] onr has joined the channel [23:02] onr has joined the channel [23:02] tjholowaychuk: RusAlex: should be the same, use NODE_ENV=production to cache the templates to spare cpu [23:03] RusAlex: ok [23:03] RusAlex: thanks for help [23:03] tjholowaychuk: np [23:03] dgathright has joined the channel [23:03] carnivore: Is NODE_ENV a global variable or something? [23:04] carnivore: where can I find a list of such variables? [23:04] tjholowaychuk: it's just an env var [23:04] jscheel: carnivore: console.dir(process.env) [23:04] tjholowaychuk: nothing specific to node [23:04] tjholowaychuk: it's just what I use for configuration with express [23:05] tim_smart: isaacs: Got that gist tool, thanks for nopt :) [23:05] tim_smart: *gist tool done [23:05] isaacs: sweet [23:05] carnivore: jscheel: thanks! [23:05] ryah: ACTION waves [23:05] jscheel: carnivore: welcome [23:05] carnivore: tjholowaychuk: I see, cool [23:05] isaacs: tim_smart: the issue was having a shorthand that is also an unambiguous abbrev of a "real" command [23:06] isaacs: tim_smart: weird bug,easy fix [23:06] tim_smart: isaacs: :%!gista -pn test.js [23:06] tim_smart: <3 [23:06] broofa_ has joined the channel [23:07] sorens3n has joined the channel [23:07] tim_smart: Also :r!gista -f 12345 [23:07] hornairs has joined the channel [23:07] tim_smart: Handy for reading gists into vim [23:07] McMAGIC-- has joined the channel [23:08] tim_smart: I should make "gist aliases", so you can do something like: :r!gista -f server-template [23:09] dmcquay has joined the channel [23:10] yozgrahame has joined the channel [23:11] xandrews has joined the channel [23:11] ckknight has joined the channel [23:11] muk_mb has joined the channel [23:11] konobi: ryah, the hackers are invading? [23:12] ryah: konobi: not yet [23:13] dnolen has joined the channel [23:13] lancerforhire has joined the channel [23:13] mjr_: Anybody doing https server in node at any kind of scale? [23:13] lancerforhire: Helloo [23:14] ckknight: howdy, lancerforhire [23:14] mjr_: Mem usage seems really high. [23:14] ryah: mjr_: how much mem did stunnel use? [23:14] mjr_: hardly any, really [23:14] thurmda-droid has joined the channel [23:14] ryah: stunnel uses openssl [23:14] mjr_: Certainly an ignorable amount. [23:14] glg-droid has joined the channel [23:15] dnolen has joined the channel [23:15] lancerforhire: ive been thinking, if using node can make better use of existing hardware as a web server for example [23:15] lancerforhire: would creating a php process manager with node make things even better? [23:15] muk_mb has joined the channel [23:15] sh1mmer: Hooray it's office hours [23:15] prettyrobots: isaacs: Which gist tool? (I've got junky IRC client that won't search scrollback.) [23:16] tim_smart: prettyrobots: I mentioned something about a gist tool... [23:16] Andi5 has joined the channel [23:16] ckknight|2 has joined the channel [23:17] mjr_: sh1mmer: why do your office hours explicitly not involve beer? [23:17] mjr_: sounds like work [23:17] highermath_away has joined the channel [23:18] sh1mmer: yes [23:18] Andi5: Greetings from Germany (1 AM) [23:18] lancerforhire has left the channel [23:18] techwraith: mjr_: not sure what it's like where you work, but we've got a fridge full of beer at the office. ;) [23:18] mjr_: techwraith: well, I mostly work from home in Hawaii, so I've got one of those too. :) [23:19] mjr_: Our SF office has all manner of alcohol, but we basically never avail ourselves of it. [23:19] tjholowaychuk: hawaii? really? [23:21] captain_morgan has joined the channel [23:21] ckknight has joined the channel [23:21] mrjjwright has joined the channel [23:21] mjr_: tjholowaychuk: yeah, I've been here for a couple of months now. It's pretty great. [23:22] tjholowaychuk: mjr_: wow awesome man congrats [23:22] ckknight: mjr_: I used to live there, left because of the few job opportunities :P [23:22] tjholowaychuk: that's a dream locale for work holy [23:22] isaacs: who's got quesions for ryah? [23:22] mjr_: Yeah, this area is a bit light on jobs. [23:23] sorens3n: mjr: where are you? [23:23] mjr_: My Question: TLS memory use. WTF? [23:23] sorens3n: can't be worse than omaha [23:23] thurmda has joined the channel [23:24] gerad has joined the channel [23:24] Tobsn: alcohol... i import mine from england [23:24] Tobsn: cause the good stuff is illegal in the states [23:24] Tobsn: or cant be found [23:25] iFire has joined the channel [23:25] raidfive has joined the channel [23:26] wilmoore has joined the channel [23:26] ryah: mjr_: :) [23:26] tjholowaychuk: isaacs: not a great question but I'm curious if there are plans to expand the core set of modules [23:26] MatthewS has joined the channel [23:26] techwraith: It would be super useful for logging if I could listen for the 'end' event for an http response, and ideas on how to implement this? [23:26] ryah: mjr_: I would like to reproduce that memleak [23:27] ryah: mjr_: my primative tests are nto doing it [23:27] tjholowaychuk: techwraith: proxy the method [23:27] mjr_: ryah: I'm starting to think it's not actually a leak. It looks like each connection that is active actually consumes a lot of memory, like 1MB. [23:28] tjholowaychuk: techwraith: var end = res.end; res.end = function(){ call end() here }; [23:28] techwraith: tjholowaychuk: wut? [23:28] tjholowaychuk: "wrap" it [23:28] tjholowaychuk: with your functionality, that's what connect does [23:28] tjholowaychuk: for logging [23:28] techwraith: Interesting, that makes sense [23:29] ryah: mjr_: i thought it was growing? [23:29] wirehead has joined the channel [23:29] mjr_: Yeah, I thought i twas too, but it looks like it directly relates to the number of active connections. [23:30] mjr_: When the numbers were lower, I just didn't notice. As we got more popular, each process started taking on over 200 connections, which seems to burn at least 200MB. [23:30] ryah: okay... [23:30] mjr_: I *think* that's what is happening. [23:30] isaacs: tjholowaychuk: i don't think so [23:30] isaacs: (re adding mroe core modules) [23:30] pquerna: mjr_: well, there are openssl issues in general with tls contexts [23:30] tjholowaychuk: k cool :) [23:31] tjholowaychuk: isaacs: is crypto already gone in 0.5.x? [23:31] mjr_: pquerna: 1MB+ per context? [23:31] pquerna: mjr_: http://bazaar.launchpad.net/~nagendra/openssl-patches/trunk/revision/2 [23:31] xandrews has joined the channel [23:32] mjr_: huh. What's that do? Make records "smaller"? [23:33] mjr_: That patch is from 2009, surely here in the glaringly bright future world of 2011 this or something like it has been merged into openssl mainline, no? [23:33] ryah: if that's the case i wonder why stunnel is so small [23:33] pquerna: mjr_: mjr_ http://journal.paul.querna.org/articles/2010/07/10/overclocking-mod_ssl/ [23:33] pquerna: Adam mentions a patch reducing OpenSSL’s default buffer allocations from 50kb to 5kb, and suggests the Tor project has a similar patch. I have been unable to find it. [23:33] pquerna: thats the patch I was linked to in the comments [23:34] isaacs: tjholowaychuk: the word from the room seems to be "Let's not remove it, just remove the sucky bits, and make the api consistent" [23:34] tjholowaychuk: isaacs: ah good to hear [23:34] rolando__ has joined the channel [23:34] isaacs: tjholowaychuk: are you using ciphers? [23:34] isaacs: tjholowaychuk: because that's the sucky bits. [23:34] k1ttty has joined the channel [23:34] isaacs: hashing is pretty important, though. checksums are important. [23:34] isaacs: but they should be a stream interface. [23:35] tjholowaychuk: isaacs: I mostly just use the hashing [23:35] tjholowaychuk: it might be nice to have js equivalents for people who dont have openssl [23:35] mjr_: pquerna: 50KB vs. 9KB is totally ignorable for the issue I'm seeing. My node processes are at 500MB RSS when holding open about 250 https connections. V8 says that heap is about 200MB. [23:35] tjholowaychuk: but maybe not [23:35] ryah: mjr_: we're discussing verbally [23:35] ryah: you should call in [23:35] tjholowaychuk: since that's slow haha [23:35] mjr_: somebody there surely has Voxer. :) [23:36] isaacs: var file = fs.createReadStream("foo"); var hasher = crypto.createHashStream("sha1"); file.pipe(hasher); hash.on("data", function (hash) { ... }) [23:36] ryah: mjr_: hold a sec - we're going to get a conf line [23:36] isaacs: ACTION would love that^ [23:36] isaacs: (the crypto thing, not the conf line) [23:36] mjr_: But seriously, I can call a PSTN number. [23:36] isaacs: though that's nice, too [23:36] isaacs: sh1mmer and pquerna are trying to figure out hte phone system now. [23:36] crodas has joined the channel [23:37] skm has joined the channel [23:37] tjholowaychuk: isaacs: yeah that would be nice [23:37] sh1mmer: if only someone made an app for that [23:37] sh1mmer: The dial in number is +1 415 400 0604 [23:38] sh1mmer: the bridge number is 0642 [23:38] mjr_: sh1mmer: you mean for group messaging that's fundamentally asynchronous but can be streamed live? [23:38] mjr_: I know, seriously. [23:38] mjr_: Lemme go find my land line thing. [23:38] jonaslund: mjr_: 500MB rss is after 250 opened or after running a while with approx 250 median ? [23:38] orls has joined the channel [23:39] bradleymeck has joined the channel [23:40] carnivore: O [23:40] carnivore: I'm curious, is it possible to compile nodejs down to c? [23:40] jonaslund: carnivore: no [23:41] ryah: carnivore: well .. [23:41] tim_smart: ecamscript engine in C - heh [23:41] jonaslund: is there a V8 C dump backend? :) [23:41] ryah: carnivore: you can disassmeble it [23:41] vckt has joined the channel [23:42] jonaslund: tim_smart: I actually made a Ecmascript-C translator prototype [23:42] jonaslund: very small subset [23:42] Remoun has joined the channel [23:42] carnivore: i thought nodejs is written in c [23:42] ckknight: jonaslund: fun [23:43] carnivore: (I have very little knowledge of this, so my comments/questions are pretty stupid) [23:43] carnivore: so how does V8 work? does it take ecmascript and compile it right to bytecode? [23:43] ryah: carnivore: node is written in c++ [23:44] ryah: carnivore: it generates machine code directly [23:44] jonaslund: ckknight: it was interesting.. got performance within a factor of V8 (before the crankshaft update) [23:44] carnivore: ryah: ohhh [23:44] carnivore: ryah: gotcha [23:44] carnivore: ryah: thanks [23:44] Andi5: jonaslund: How fast is this? [23:45] jonaslund: Andi5: maybe half the speed for the small prototype [23:45] tmzt_: ryah: are c bindings possible? [23:45] unlink has joined the channel [23:45] unlink has joined the channel [23:45] mjr_: jonaslund: 250 median number of connections, 500MB RSS is after a while. [23:45] jonaslund: Andi5: very very small subset just to see what kind of performance i would get [23:46] dgathright has joined the channel [23:46] piscisaureus: @ryah: what do you mean when you say you hate writing main functions? [23:47] jonaslund: mjr_: the V8 GC gets info from the bindings (see buffer) about their memory usage, if the SSL bindings don't report every piece of memory it uses then it's obvious that the V8 heap is 200 mb and don't trigger GC's [23:47] Andi5: jonaslund: Would be cool (but surely impossible) to transform your blueprint server JS jobs into C(++) [23:47] Andi5: I think of MongoDB [23:47] jonaslund: Andi5: My main interest was/is to transform the code to use with iPhone,etc [23:48] jonaslund: on the server side V8 will with a pretty big certainty always be faster [23:48] pquerna: isaacs: hey, so.. do you know much about couchdb replication? [23:48] jonaslund: lots of optimizations you really can't do with pre-compilation compared to a jit [23:48] isaacs: pquerna: a little [23:48] pquerna: isaacs: https://gist.github.com/94e453473c7c436099dd [23:48] isaacs: what's up [23:49] Andi5: jonaslund: for sure - V8 is top notch [23:49] timcosgrove has joined the channel [23:49] isaacs: pquerna: that's gross [23:49] Andi5: Isn't it? [23:49] cronopio has joined the channel [23:49] pquerna: yeah [23:49] isaacs: pquerna: just a second, lemme head over there. [23:49] pquerna: k [23:49] isaacs: pquerna: i'll be there in a second. [23:50] isaacs: hold on [23:50] timcosgrove has left the channel [23:50] saikat has joined the channel [23:50] oscarkilhed: anyone know if there is an ES5 fork of v8? [23:51] joshthecoder: ryah: libol is looking pretty sweet :) [23:51] jonaslund: oscarkilhed: I doubt anyone really feels that it's a good idea to maintain a separate fork [23:52] ryah: tmzt_: c++ bindings are possible [23:53] ryah: piscisaureus: i just feel writing a whole program for a simple test is too much [23:53] tmzt_: ryah: so you have to have a c++ layer to call a c library? [23:55] iFire has joined the channel [23:55] ryah: tmzt_: it's all c++ [23:55] ryah: joshthecoder: yeah, hopefully we can get it working properly [23:56] tmzt_: alright, so does libev/libeio from node have an use outside of node? how different is it from the upstream project [23:56] mike_miller has joined the channel [23:56] daleharvey: bit random but figured everyone here does js and some might use emacs [23:57] gozala has joined the channel [23:57] davidcoallier has joined the channel [23:57] daleharvey: does anyone know of fixes for the indentation for js-mode / espresso-mode? [23:57] timcosgrove has joined the channel [23:58] timcosgrove has left the channel [23:58] Andi5: tmzt_: I wondered why the author of libev/libeio does not link to node.js at all ... [23:58] monokrome: Anyone have ideas regarding this? http://pastie.org/1741689 [23:58] monokrome: That makes absolutely no sense, imo. [23:59] tjholowaychuk: monokrome: npm issue [23:59] tjholowaychuk: cant remember what [23:59] tjholowaychuk: NODE_PATH or something i dunno [23:59] monokrome: hmm [23:59] monokrome: Probably related to my --prefix="${HOME}/local" [23:59] monokrome: when I configured node [23:59] tjholowaychuk: mhm