[00:00] khrome has joined the channel [00:01] eignerchris_ has joined the channel [00:02] josh-k has joined the channel [00:03] jlank has joined the channel [00:03] blup has joined the channel [00:04] l_h2o_l has joined the channel [00:05] sh1mmer has joined the channel [00:06] enmand has joined the channel [00:07] Poetro has left the channel [00:07] mikeal has joined the channel [00:08] RobWC has joined the channel [00:08] RobWC has left the channel [00:08] jaw187 has left the channel [00:09] carlyle has joined the channel [00:10] EhevuTov: Chicago Node.js Meetup starting soon: http://www.meetup.com/Chicago-Nodejs/events/48613752/ [00:11] blup has joined the channel [00:11] Mezriss: 0.6.11 has the same problem. it seems that I'm stuck with 0.4.12, at least on amazon [00:12] relling has joined the channel [00:12] al3xnull has joined the channel [00:13] githogori has joined the channel [00:14] sandfox has joined the channel [00:14] igl1 has joined the channel [00:14] k1ttty has joined the channel [00:15] k1ttty has joined the channel [00:15] sardaven has joined the channel [00:16] ashishg has joined the channel [00:18] bindr has joined the channel [00:19] igl has joined the channel [00:20] joshfinnie has joined the channel [00:20] sh1mmer has joined the channel [00:20] subbyyy has joined the channel [00:20] bindr has joined the channel [00:23] horofox has joined the channel [00:26] dbrain has joined the channel [00:28] dmwuw has joined the channel [00:29] cha0s has joined the channel [00:29] cha0s has joined the channel [00:29] pradeebv has joined the channel [00:30] ekryski has joined the channel [00:31] gr4yscale has joined the channel [00:32] Wizek-other has joined the channel [00:33] huggies has joined the channel [00:33] brianleroux has joined the channel [00:34] dimdm has joined the channel [00:35] xaq has joined the channel [00:38] lzskiss has joined the channel [00:38] bindr has joined the channel [00:41] davehamptonusa has joined the channel [00:41] e4r has joined the channel [00:42] bartt has joined the channel [00:42] davehamptonusa: isaacs: I'm setting up a local npm repository within my company, yet still need to restrict access to either individuals or internal ip's. Do you recommend setting up that authentication in couchdb's users and security tables or via a front end proxy to couchdb using mod_access or something similar? [00:44] isaacs: davehamptonusa: whatever's easier. [00:44] isaacs: davehamptonusa: couch's security tables can probably do what you want, but mod_access has a lot of configurability [00:45] davehamptonusa: will npm prompt for user/password on GETS if security is in place at the couchdb level? [00:45] davehamptonusa: as it does for publishing? [00:45] isaacs: davehamptonusa: no. you can set the always-auth config flag to make it always send auth [00:45] isaacs: davehamptonusa: i mean, not by default, unless you hit that flag [00:46] davehamptonusa: ok. So, without thhe auth-config flag - it will just fail to get [00:47] davehamptonusa: issacs: s/always-config/always-auth/ [00:47] isaacs: davehamptonusa: yeah [00:47] isaacs: davehamptonusa: i don't think it's smart enough to respond to a 401 by re-requesting with auth [00:47] gr4yscale has joined the channel [00:51] davehamptonusa: Does always_auth send what is stored in .npmrc, or prompt before connecting? [00:51] hexTech has joined the channel [00:52] dreamr has joined the channel [00:52] isaacs: davehamptonusa: what's in .npmrc [00:52] isaacs: davehamptonusa: so you still have to npm adduser [00:52] davehamptonusa: isaacs: the email and _auth from publishing [00:52] isaacs: davehamptonusa: just the _auth [00:52] isaacs: davehamptonusa: the email is just for setting the maintainers field [00:52] replore_ has joined the channel [00:52] replore has joined the channel [00:53] davehamptonusa: isaacs: so the auth is more of a token [00:53] isaacs: davehamptonusa: it's Base64 [00:53] davehamptonusa: isaacs: awesome. Then I'll just make a security document and manage from there [00:54] davehamptonusa: isaacs: From within couchdb that is... [00:54] isaacs: davehamptonusa: that should work, then [00:55] mcav` has joined the channel [00:55] davehamptonusa: isaacs: Thanks for your help. P.S. Always love the intelligent and snarky docs and responses in github. Fun to read. [00:56] samuelgoodwin has joined the channel [00:56] isaacs: thanks? [00:56] isaacs: :) [00:57] dreamr: If anyone wants to be an angel and check this out for me... https://gist.github.com/1880284 [00:57] dreamr: I cannot get relationships to work with nodejs and mongoose :( [00:57] hotchkiss has joined the channel [00:57] jesusabdullah: You should base your relationships on love and trust instead. [00:58] dlg: amen [00:58] jesusabdullah: ladies dig trust [00:58] jesusabdullah: haha [00:59] davehamptonusa: isaacs: Yes. Was a compliment. Snarky without going too far is an art. This is one of my favorites: https://github.com/isaacs/npm/issues/1204 [00:59] spcshpopr8r has joined the channel [01:00] spcshpopr8r: hi #node.js is there something funky going on between 6.10 and 6.11 that would affect the way request parameters are handled in http? [01:01] postwait has joined the channel [01:01] ashishg has joined the channel [01:02] dreamr: no one? https://gist.github.com/1880284 [01:05] westg has joined the channel [01:05] dubenstein has joined the channel [01:05] criswell has joined the channel [01:06] trotter has joined the channel [01:07] superlou has joined the channel [01:07] dreamdust1 has joined the channel [01:08] mrkurt: how can I get the fqdn of the current host in nodejs? [01:08] mrkurt: os.hostname returns the short hostname, I need something like Socket.gethostbyname in ruby/python [01:10] spcshpopr8r: wtf....I deploy a little express app on a fedora or a ubuntu machine and I'm having all sorta weird shit happening with routes and request parameters [01:11] westg: be more descriptive ^ [01:11] spcshpopr8r: ...however, it works on my local machine (arch linux) and on my buddies box gentoo [01:12] spcshpopr8r: node 6.11 on my buddy's machine and 6.10 on mine...express same 2.5.8 [01:12] spcshpopr8r: westg: I'll try [01:12] tkahn6_ has joined the channel [01:13] Skaag has joined the channel [01:13] westg: express isn't working in general? [01:13] StanlySoManly1 has joined the channel [01:14] spcshpopr8r: express is working just fine on my local machine and my buddies...but we deploy to a box that's running fedora only real difference and request parameters are disappearing when moving to next() function in routes [01:14] dubenstein has joined the channel [01:16] igl has joined the channel [01:18] dubenstein has joined the channel [01:18] bkaney has joined the channel [01:19] abraxas has joined the channel [01:19] wingie: isaacs: there? [01:20] isaacs: hi [01:20] spcshpopr8r: hallo...can any y'all confirm whether this is legit http://nodejs.tchol.org/ [01:20] sven_oostenbrink has joined the channel [01:20] spcshpopr8r: I've got funky shit happening with node, express on fedora [01:20] isaacs: spcshpopr8r: i can't vouch for it [01:20] isaacs: spcshpopr8r: i'd recommend building from source. [01:20] spcshpopr8r: ^ again...same app working peachy on arch and gentoo [01:20] spcshpopr8r: isaacs: done that [01:20] isaacs: spcshpopr8r: chrislea's stuff is pretty ok [01:20] isaacs: but that's deb, not rpm [01:21] spcshpopr8r: isaacs: chrislea? do you have a link? [01:21] sorensen__ has joined the channel [01:21] wingie: isaacs: i recall that you could specify in the package.json so that you could do require('foo/bar') to require a sub file instead of the whole package [01:21] phz has joined the channel [01:21] wingie: but now i can't find that info .. you can still do that with npm? [01:22] bindr has joined the channel [01:22] mikeal has joined the channel [01:22] davehamptonusa has left the channel [01:22] blubberbob has joined the channel [01:23] astropirate has joined the channel [01:24] phoenixz has joined the channel [01:24] phoenixz has joined the channel [01:24] isaacs: wingie: no. [01:24] isaacs: wingie: i mean, you can [01:24] isaacs: wingie: just put a file called "bar" in the root of your package. [01:24] willwhit_ has joined the channel [01:24] isaacs: wingie: or do require("foo/lib/path/to/bar.js") [01:24] isaacs: wingie: ie, packages are just folder. [01:24] isaacs: you can dive right into them [01:25] wingie: isaacs: ah so you removed the need for speciying them in package.json? [01:25] xaq has joined the channel [01:25] ningu has joined the channel [01:25] dylanvee has joined the channel [01:26] themiddleman_itv has joined the channel [01:26] dylanvee: Hi all, quick newbie question: how do I override an exported method? e.g. https://github.com/visionmedia/reds/blob/master/lib/reds.js#L48 [01:26] isaacs: wingie: exactly [01:26] isaacs: spcshpopr8r: https://launchpad.net/~chris-lea/+archive/node.js [01:26] jlaire has joined the channel [01:27] dylanvee: I did "var reds = require('reds'); reds.createClient = function () { // blablabla }" but it isn't getting picked up. [01:27] isaacs: dylanvee: var reds = require("reds"); reds.createClient = myFunction [01:27] Wa has joined the channel [01:27] dylanvee: isaacs: Hmm, that's what I thought [01:28] isaacs: dylanvee: are you setting it *after* already creating a client? [01:28] dylanvee: isaacs: I have my own client that I want createClient to return [01:28] dylanvee: isaacs: Right now I just threw in a console.log to make sure it's getting called, and it's not [01:30] papachan has joined the channel [01:30] looopy has joined the channel [01:31] wingie: isaacs: cool works great [01:31] tmike has joined the channel [01:31] willwhite has joined the channel [01:32] dylanvee: isaacs: oops, I put it right after require('reds') and everything works now. sorry to waste your time! [01:32] isaacs: dylanvee: :) [01:33] ningu: maybe I'm just a newbie, but it's been nice to find that almost every problem I've had has been due to my own mistakes :) [01:33] ningu: I ran into one today with jsdom that was different [01:33] ningu: it has a memory leak apparently [01:33] colinclark has joined the channel [01:34] ningu: but I solved that by running one child process per file I wanted to scrape [01:34] dreamr: can someone please look at this? property('raceId', { type: ObjectId, ref: 'Race'}); [01:34] dreamr: oops [01:34] dreamr: this https://gist.github.com/1880284 [01:35] maxogden: oh dude are you making a captain planet app? [01:35] maxogden: line 10 of unit.js sounds promising [01:36] ningu: haha [01:36] markq has joined the channel [01:36] wingie: ningu: what validation lib are you using? [01:37] igl1 has joined the channel [01:37] willwhit_ has joined the channel [01:37] ningu: wingie: for what? [01:37] ningu: forms? [01:37] zomgbie has joined the channel [01:37] dreamr: maxogden: line 10 has nothing to do with race :D [01:37] wingie: i see some validation functions like validatesPresenceOf(), validatesLengthOf() [01:38] ningu: eh? I didn't post any of my code [01:38] wingie: is that from a validation lib or are they your own code? [01:38] dreamr: wingie: i think you are looking at mine [01:38] wingie: dreamr: ah yeah =) [01:38] dekub has joined the channel [01:38] maxogden: ningu: why are you stealing dreamr's code! [01:38] dreamr: lol [01:38] pendlepants has joined the channel [01:39] wingie: dreamr: its your own code or from a lib? [01:39] dreamr: the validations? [01:39] wingie: yeah [01:39] dreamr: from mongoose [01:39] wingie: ah ok [01:39] dreamr: if I could just get the damn belongs to relationship to work :* [01:41] dreamr: im not married to this tech. anyone got a link to a good place to pick up on nodejs model relationships? [01:41] ningu: dreamr: I use mongoose, what's going on? [01:41] enmand has joined the channel [01:41] dreamr: ningu: I cant get relationships to work [01:41] dreamr: but im new to nosql, so I may just be stupid still [01:42] dreamr: https://gist.github.com/1880284 [01:42] ningu: well, it works a bit different in mongodb [01:42] dreamr: did I define the race right? [01:42] ningu: I'd have to see your schema definitions [01:42] dreamr: gist [01:42] dreamr: ahh shema got dropped [01:42] dreamr: one sec [01:43] ningu: basically you have to decide if you want to embed docs or use dbrefs [01:43] tonymilne has joined the channel [01:43] dreamr: ningu: https://gist.github.com/1880284 [01:43] dreamr: im fine with embedding [01:44] ningu: hrm, I've never used that describe method [01:44] ningu: but I can imagine what it does [01:44] ningu: anyway, yes, race is defined correctly [01:44] ningu: if by correctly you mean you want a ref and want to be able to populate it [01:45] ningu: but you have to tell mongoose to populate it [01:45] dreamr: i guess. but I get raceId instead of race [01:45] dreamr: ahh [01:45] dreamr: ok ill look into that part [01:45] dreamr: thanks [01:45] ningu: well, that part is identical to the sql case [01:45] ningu: except you can't do it in one query, but mongoose papers over that [01:46] ningu: db.model('Unit').find({}).populate('race').run(...) [01:46] QaDeS_ has joined the channel [01:47] dreamr: ahh, its like :include for AR [01:47] pizthewiz has joined the channel [01:47] dreamr: ok, makes sense now [01:47] ningu: AR is another ORM? [01:47] ningu: oh, yeah, in rails [01:47] ningu: activerecord [01:47] dreamr: :D [01:47] \mSg has joined the channel [01:47] ningu: I looked at the code for that a long time ago when I was working on an ORM [01:49] rwaldron has joined the channel [01:49] icewhite has joined the channel [01:50] bradleymeck has joined the channel [01:51] willwhite has joined the channel [01:54] imsky has joined the channel [01:54] jyp has joined the channel [01:55] carlyle has joined the channel [01:55] ^robertj has joined the channel [01:56] criswell has joined the channel [01:56] ciccio has joined the channel [01:56] ciccio has left the channel [01:57] heavysixer has joined the channel [01:58] sven_oostenbrink has joined the channel [02:01] Emmanuel` has joined the channel [02:02] oht has joined the channel [02:02] copongcopong1 has joined the channel [02:02] richardr_ has joined the channel [02:03] dreamdust has joined the channel [02:03] krucial has joined the channel [02:03] mikeal has joined the channel [02:03] brianseeders has joined the channel [02:04] dreamdust has left the channel [02:04] CarterL has joined the channel [02:05] samuelgoodwin has joined the channel [02:05] JulioBarros_ has joined the channel [02:05] mcav has joined the channel [02:06] blubberbob has joined the channel [02:08] willwhit_ has joined the channel [02:08] parshap has joined the channel [02:09] ashishg_ has joined the channel [02:10] dshaw_ has joined the channel [02:10] orangesea has joined the channel [02:11] boccato has joined the channel [02:11] carlyle has joined the channel [02:11] phoenixz has joined the channel [02:11] phoenixz has joined the channel [02:12] mandric has joined the channel [02:13] Rob__ has joined the channel [02:14] ryanfitz has joined the channel [02:16] nerdfiles1 has joined the channel [02:16] oht has joined the channel [02:17] markq has joined the channel [02:18] bicranial has joined the channel [02:18] oht has joined the channel [02:21] pradeebv has joined the channel [02:22] whaley has joined the channel [02:25] cha0s has joined the channel [02:26] vicapow has joined the channel [02:27] samsonjs has joined the channel [02:28] ceej has joined the channel [02:28] fomatin has joined the channel [02:29] al3xnull_ has joined the channel [02:30] Daegalus: how would be the best way to process output from other apps. Something like "hg tags | node ~/regex.js" [02:31] maxogden: Daegalus: process.stdin [02:31] maxogden: Daegalus: code example https://github.com/maxogden/commonjs-html-prettyprinter/blob/master/bin/html.js [02:32] Daegalus: perfect thanks. I felt it might be stdin, but wasnt sure [02:32] rope has joined the channel [02:33] JulioBarros has joined the channel [02:35] richardr_ has left the channel [02:41] sven_oostenbrink has joined the channel [02:42] samuelgo1dwin has joined the channel [02:43] Aria has joined the channel [02:45] a_suenami has joined the channel [02:45] teslana has joined the channel [02:49] _th_n has joined the channel [02:49] sven_oostenbrink has joined the channel [02:49] harthur has joined the channel [02:49] pradeebv has joined the channel [02:51] ryanfitz has joined the channel [02:54] SamBarboza has joined the channel [02:54] copongcopong has joined the channel [02:54] SamBarboza: Hello everybody. [02:54] tuhoojabotti: good night [02:54] SamBarboza: I need help from a Node.js expert. [02:55] mikeal has joined the channel [02:55] SamBarboza: tuhoojabotti [02:55] SamBarboza: are you an expert? [02:56] maxogden: SamBarboza: state your case and the room shall judge [02:57] SamBarboza: Ok. I'm creating a service, that sends the user data through socket.io. But the app can't be used by two (or more) people at same time, its variables get confused. [02:57] Wa has joined the channel [02:57] SamBarboza: and one people receives other data and vice versa. [02:57] sven_oostenbrink has joined the channel [02:57] SamBarboza: Should I use child process ? [02:57] SubStack: SamBarboza: don't use .broadcast() [02:57] copongcopong: session id checking? [02:57] maxogden: SamBarboza: each socketio connection has unique ids and stuff on it [02:58] SamBarboza: yeah. [02:58] SubStack: you can call .send() on each connection individually [02:59] SamBarboza: Should I avoid the use of child process? [02:59] SubStack: SamBarboza: that doesn't even make sense for the scope of your problem [02:59] maxogden: child process is for spawning child processes, you have a process already [03:00] SamBarboza: hm... [03:00] SamBarboza: Ok. [03:00] SubStack: also you should gist your code [03:00] SamBarboza: My problem is that, users data get confused throught them [03:00] SubStack: then people can look at it and help you out [03:00] SamBarboza: Ok. [03:00] SamBarboza: Let me gist it. [03:00] tuhoojabotti: I said, good night. [03:00] SamBarboza: https://github.com/sambarboza/Retweets/blob/master/retweets.js [03:01] SamBarboza: Here is the code. [03:01] SamBarboza: What I need is that each user, get its own data. [03:01] SamBarboza: I think that I'm doing all wrong. [03:01] maxogden: io.sockets.emit sends it to everyone [03:02] RyanS__ has joined the channel [03:02] maxogden: you wanna only emit to the socket var in the callback here https://github.com/sambarboza/Retweets/blob/master/retweets.js#L251 [03:03] nodebiscut has joined the channel [03:03] blubberbob has joined the channel [03:03] SamBarboza: The data is sent on retweetsOfMe(); method. [03:04] SamBarboza: maxogden [03:04] SamBarboza: are you looking it? [03:05] Skaag has joined the channel [03:06] maxogden: yes that is how i gave you the suggestion above. retweetsOfMe calls parseTweets which calls getRetweets which does io.sockets.emit [03:06] SamBarboza: So, should i send io.sockets.socket(socketid).emit [03:07] SamBarboza: irhgt? [03:07] SamBarboza: rifht? [03:07] SamBarboza: dam [03:07] maxogden: ummm something like that [03:07] SamBarboza: damm [03:07] teadict: who's done backbone + socket.io? [03:07] maxogden: SamBarboza: are you related to http://en.wikipedia.org/wiki/Hector_Barbossa [03:07] SamBarboza: No no hehe [03:07] teadict: is it messy to mix them? [03:07] maxogden: SamBarboza: i dunno the exact syntax but youre on the right track with that [03:07] SamBarboza: I tried this. [03:07] SamBarboza: but it isn't enough. [03:08] SamBarboza: The loop. [03:08] SamBarboza: get confused. [03:08] orlandovftw has joined the channel [03:08] maxogden: welcome to nodejs :) [03:08] SamBarboza: i think that I need some OO here. [03:08] gkatsev has joined the channel [03:08] SamBarboza: grab all the data... [03:08] SamBarboza: and send it when completed. [03:09] blubberbob has joined the channel [03:09] r04r has joined the channel [03:10] juyeong_park has joined the channel [03:10] phoenixz has joined the channel [03:10] warz has joined the channel [03:10] warz has joined the channel [03:10] SamBarboza: Thanks maxogden [03:11] _th_n has joined the channel [03:11] nodebiscut has joined the channel [03:12] ericmuyser has joined the channel [03:13] wiel has joined the channel [03:14] r04r has joined the channel [03:14] piscisaureus_ has joined the channel [03:15] pastak has joined the channel [03:15] wiel: I am trying to scrape a page that is loaded after i submit a form but a "please wait" page is shown before i get to that page. how can i wait till the page i need is loaded? [03:15] shanebo has joined the channel [03:17] hotchkiss has joined the channel [03:17] dreamdust has joined the channel [03:18] hotchkiss_ has joined the channel [03:18] kirbysayshi has joined the channel [03:19] r04r has joined the channel [03:20] gavin_huang has joined the channel [03:21] mikeal has joined the channel [03:22] tmike: is the please wait a js thing or does it redirect? [03:24] r04r has joined the channel [03:26] wiel: tmike, it redirects [03:26] jaw187 has joined the channel [03:28] tmike: ACTION is trying to remember the name of the module that wraps http requests and follows redirects [03:29] r04r has joined the channel [03:29] r04r has joined the channel [03:30] tmike: d'oh, it's called request [03:30] wiel: what should i do when its not a redirect tmike? [03:30] EhevuTov has joined the channel [03:30] tmike: github.com/mikeal/request [03:30] tmike: you'll have to figure that one out [03:30] subway_tester has joined the channel [03:31] tmike: I couldn't tell you without seeing the behavior of the specific page you're talking about [03:32] subway_tester has left the channel [03:32] wiel: www.aa.com [03:32] tmike: I can't check it out right now. What does it do? [03:32] mudman has joined the channel [03:33] bulatshakirzyano has joined the channel [03:33] mudman: If a node application is expected to run continuously for days weeks on end, is there any reason not to require/load all files during startup? [03:33] wiel: i have scraped other sites with post forms but Im not sure whats different with this one [03:34] r04r has joined the channel [03:35] rwaldron has joined the channel [03:35] wiel: when the page that i need does load i see this in the address bar. matrixFlightSearchResultsAccess.do?v_mobileUAFlag=AA&v_locale=en_JM&bookingPathStateId=1329881658752-801 [03:35] tmike: So have you tried messing with those params? [03:36] salva has joined the channel [03:36] kmiyashiro has joined the channel [03:36] wiel: how i initially submit the form is by passing the parameters in the address but Im stumped as to how to pass the params to this new link [03:36] tmike: mudman I can't think of any. It might be easier to load them just before you need them, but depending on the activity of your application that probably wouldn't save you much. [03:36] bicranial has joined the channel [03:36] tmike: wiel I'm sure curl can do something [03:37] tmike: And node will let you form post requests too [03:39] r04r has joined the channel [03:40] mudman: tmike: The node.js server side will always be running, there are not form posts from node.js [03:40] tmike: You can't form POST requests? [03:40] mudman: tmike: Oh cross topic, nevermind. [03:41] tmike: lol sorry about that [03:42] mudman: tmike: The reason for wanting to load everything up front instead of delayed is so that I don't have to worry about something being available and I can just do something like var person = new My.Models.Person(); without worrying if it's been required yet or not. [03:42] tmike: yeah go for it [03:42] fasecharmer has joined the channel [03:44] r04r has joined the channel [03:46] coderarity: http://www.apple.com/itunes/25-billion-app-countdown/ < I don't know if it's wise to sleep [03:47] isaacs has joined the channel [03:48] r04r has joined the channel [03:51] maletor has joined the channel [03:52] sreeix has joined the channel [03:54] r04r has joined the channel [03:54] bingomanatee has left the channel [03:55] Sadin has joined the channel [03:58] r04r has joined the channel [03:59] blueadept has joined the channel [03:59] retornam has joined the channel [04:01] dnolen has joined the channel [04:02] willwhite has joined the channel [04:03] patcito has joined the channel [04:03] r04r has joined the channel [04:04] blueadept has left the channel [04:04] blueadept has joined the channel [04:05] copongcopong has joined the channel [04:08] r04r has joined the channel [04:08] r04r has joined the channel [04:08] tlrobinson has joined the channel [04:09] tonymilne has left the channel [04:11] tommyvyo has joined the channel [04:11] parshap has joined the channel [04:12] r04r has joined the channel [04:12] r04r has joined the channel [04:12] ryanfitz has joined the channel [04:14] deeprogram has joined the channel [04:16] r04r has joined the channel [04:16] draginx has joined the channel [04:17] CrypticSwarm has joined the channel [04:17] draginx has left the channel [04:19] westg has joined the channel [04:19] jtsnow has joined the channel [04:21] arnorhs has joined the channel [04:21] r04r has joined the channel [04:26] r04r has joined the channel [04:26] mikeal has joined the channel [04:28] TooTallNate has joined the channel [04:28] warz has joined the channel [04:28] warz has joined the channel [04:30] r04r has joined the channel [04:31] average_drifter has joined the channel [04:34] r04r has joined the channel [04:35] hexTech has joined the channel [04:37] devaholic has joined the channel [04:37] AphelionZ has joined the channel [04:39] r04r has joined the channel [04:39] mikeal has joined the channel [04:40] wiwillia has joined the channel [04:41] blueadept has joined the channel [04:41] blueadept has joined the channel [04:41] niloy has joined the channel [04:42] orlandovftw has joined the channel [04:42] joshkehn has joined the channel [04:43] SubStack: oakcity js shirts! http://teespring.com/oaklandjs [04:43] r04r has joined the channel [04:44] gr4yscale has joined the channel [04:44] c0smikdebris has joined the channel [04:45] joshkehn1 has joined the channel [04:45] joshkehn1 has left the channel [04:46] testmachine123 has joined the channel [04:46] testmachine123: i have a php question [04:46] testmachine123: php is invite only [04:47] wiwillia: register [04:47] testmachine123: how can i encapsulate array data that has to be looped through [04:47] wiwillia: register with neckserv [04:47] wiwillia: nickserv [04:47] wiwillia: that's the only req for #php [04:47] testmachine123: ok how [04:47] wiwillia: http://freenode.net/using_the_network.shtml [04:48] Wa has joined the channel [04:49] r04r has joined the channel [04:49] testmachine123: still locked out [04:49] testmachine123: do u know php wiwillia [04:50] shanebo has joined the channel [04:50] wiwillia: testmachine123 after you register login [04:51] asteros has joined the channel [04:51] testmachine123: you mean restart [04:51] jesusabdullah: No, /msg nickserv identify yourpassword [04:51] jesusabdullah: also try ##php [04:51] meso has joined the channel [04:53] testmachine123: ty [04:53] testmachine123: no one here wants to talk [04:53] SubStack: about php [04:54] r04r has joined the channel [04:54] testmachine123: yeah [04:54] OmidRaha has joined the channel [04:57] isaacs: i kinda like talking about php. [04:57] isaacs: the good old days. [04:58] isaacs: $foo = "bar"; $bar = "baz"; echo $$foo; [04:58] mikeal1 has joined the channel [04:58] isaacs: that kinda stuff [04:58] fabioboris has joined the channel [04:58] r04r has joined the channel [05:00] pizthewiz has joined the channel [05:01] testmachine123_ has joined the channel [05:03] mikeal has joined the channel [05:03] r04r has joined the channel [05:04] Aria: Heh. Back when [05:04] wiwillia: http://teespring.com/oaklandjs awesome [05:04] Aria: PHP was novel and new and was interesting in that it was so easy to parse. [05:04] isaacs: wiwillia: you should get one [05:04] wiwillia: in the process [05:04] brendan_ has joined the channel [05:04] isaacs: sweet! [05:05] SubStack: I wonder how people found out about the last one [05:05] copongcopong has joined the channel [05:05] brendan_ has left the channel [05:06] mikeal1 has joined the channel [05:08] r04r has joined the channel [05:10] wiwillia: I think people will here [05:10] wiwillia: hear* [05:10] TooTallNate has joined the channel [05:10] michaelmartinez has joined the channel [05:11] teslan has joined the channel [05:17] r04r has joined the channel [05:17] _th_n has joined the channel [05:20] JmZ_ has joined the channel [05:21] r04r has joined the channel [05:22] jasonw22 has joined the channel [05:24] jasonw22: looking for js mvc/mvp/mvvm that does ui binding, knows about pushstate, can run client & server side, and serve full page refreshes to old IE & search engines, partials to modern browsers. exists, or do i need to go make it? [05:25] socketio\test\90 has joined the channel [05:25] wssr has joined the channel [05:25] wssr has left the channel [05:25] r04r has joined the channel [05:26] sdsfd9d has joined the channel [05:26] shimondoodkin has joined the channel [05:26] sven_oostenbrink has joined the channel [05:30] r04r has joined the channel [05:30] umren has joined the channel [05:30] michaelmartinez has joined the channel [05:31] stef has joined the channel [05:31] jdeibele has joined the channel [05:33] ashishg has joined the channel [05:35] sreeix has joined the channel [05:35] r04r has joined the channel [05:35] spion has joined the channel [05:35] brainproxy: if any jasmine -> mocha converts here have been missing the `waitsFor` facility jasmine provided, I whipped up a work-a-like [05:35] brainproxy: https://github.com/michaelsbradleyjr/waitsFor [05:36] shimondoodkin: anybody knows how to profile memory leaks? [05:37] shimondoodkin: google found solutions seem to not work [05:37] SubStack: brainproxy: what the craps is that supposed to do? [05:37] SubStack: I honestly do not get why people would ever write anything with jasmine [05:37] SubStack: it's so opaque and ridiculous [05:38] crutex has joined the channel [05:38] crutex has joined the channel [05:38] SubStack: not to say that your project isn't useful [05:38] SubStack: I just hate jasmine so much [05:39] mudman: I just saw something like var f = (0,eval)(src); What is this? Why is there the (0, eval) instead of just eval? [05:40] r04r has joined the channel [05:40] SubStack: mudman: maybe to trick jslint into not complaining about using eval()? [05:40] mudman: Interesting. [05:40] pouledodue has joined the channel [05:40] michaelmartinez: Substack what do you use for testing? [05:41] mudman: Heh, jslint doesn't even understand the comma in this: (0,eval)('alert("hi");'); [05:42] codepal: anybody know how to import a file into the current document with sublime? [05:42] codepal: alternative for a snippet for jQuery? [05:44] jaime has joined the channel [05:44] richardr has joined the channel [05:44] RyanS___ has joined the channel [05:44] RyanS___ has left the channel [05:44] r04r has joined the channel [05:44] michaelmartinez: command-p ??? [05:45] madhums has joined the channel [05:45] ryan12 has joined the channel [05:45] ryan12: hiu [05:45] ryan12: hi [05:46] MrNko has joined the channel [05:46] SubStack: michaelmartinez: I use node-tap for server code and built http://testling.com/ for browser code [05:47] rwaldron has joined the channel [05:48] michaelmartinez: nice... I will def check out testling. Still a n00b on the server. Trying to decide if I want to go full-stack. [05:48] SubStack: and testling is basically just node-tap with a few extras [05:48] SubStack: you can pretty much just take a tap test and replace the require('tap').test with require('testling') and it'll work on testling [05:48] SubStack: PLUS, tap just got awesome diffs [05:48] SubStack: http://substack.net/images/screenshots/tap_using_difflet.png [05:49] SubStack: testling is about to get these too http://substack.net/images/screenshots/testling_using_difflet.png [05:49] michaelmartinez: Sweet. I read CJNO's book on jsTestDriver and have tried to write tests with webstorm and it just pissed me off. [05:49] r04r has joined the channel [05:50] SubStack: yeah jsTestDriver is ridiculous >_< [05:50] SubStack: selenium is not designed for unit tests and repurposing it to do them is amazingly awkward [05:50] wingie: is there a way to cache readFile() so the subsequents call reading the same file will use the cache and not hit the fs? [05:51] wingie: or is it recommended i just do it manually in a wrapper function [05:51] brainproxy: SubStack: it allows for one to detect that a side-effect has occurred [05:51] jesusabdullah: wingie: just save the results in memory [05:51] brainproxy: w/o having to wire up an eventemitter or something else around that side-effect [05:51] SubStack: oh I see [05:52] SubStack: what sort of side-effects? [05:52] brainproxy: SubStack: it's not the best solution at all times, but it's just the simplest thing to do in certain circumstances [05:52] brainproxy: like that variable x has changed from value 0 to value 'another value' [05:52] brainproxy: or whatever [05:52] SubStack: hmmm [05:52] michaelmartinez: it works, when a pro like cjno writes the tests it damn sure better. Howev, when I dove in... yikes [05:53] SubStack: does it just poll x for changes? [05:53] brainproxy: SubStack: yes, which is why it's useful more for testing and not recommended for wiring together production logic [05:53] brainproxy: because it's obviously fragile [05:53] brainproxy: and subject to glitches [05:53] brainproxy: but in certain situations, like writing specs w/ mocha, it's nice [05:53] r04r has joined the channel [05:54] SubStack: sounds easy to do with just setInterval/clearInterval? [05:56] brainproxy: well yes, but then maybe you want timeout logic, maybe a timeout message, and so on [05:56] deeprogram has joined the channel [05:56] SubStack: oh that makes sense then [05:56] brainproxy: and if if you're doing it many times, across test suites ... well, then its nice to encapsulate [05:56] SubStack: I just hate jasmine is all :p [05:57] SubStack: and any test harness that pukes a bunch of globals into your namespace [05:57] brainproxy: lol, well I'm off the sauce, and mocha is my new hotness [05:57] brainproxy: but I missed jasmine's waitsFor [05:57] satyr has joined the channel [05:57] brainproxy: SubStack: what test harness to you like? [05:57] SubStack: tap [05:58] SubStack: is my current favorite [05:58] SubStack: and testling api is highly influenced by it [05:58] brainproxy: cool [05:59] r04r has joined the channel [05:59] brainproxy: well anyway, waitsFor is completely generic and doesn't do anything funny w/ globals, so it can be used w/ whatever [05:59] brainproxy: the mention of jasmine is just to give a sense of where it came from [05:59] SubStack: makes sense [06:00] SubStack: is it on npm? [06:00] philips_ has joined the channel [06:00] brainproxy: yup, `npm install waitsFor` [06:00] SubStack: aha I see that it is [06:00] SubStack: good stuff [06:00] brainproxy: thanks for your feedback btw [06:00] brainproxy: it's good to have someone force you to justify where/how dev time is spent [06:00] philips has joined the channel [06:01] SubStack: yeah totally [06:01] SubStack: also check this http://testling.com/docs/#using-npm [06:01] SubStack: if you want to use waitsFor with testling for browser tests it's super easy! [06:01] brainproxy: awesome, will def take a look [06:02] wingie: jesusabdullah: worked great :) [06:02] jesusabdullah: word [06:02] SubStack: also this if you like mocha-esque bdd-style tests http://substack.net/posts/1db3bb/roll-your-own-test-runner-for-testling [06:02] tonist has joined the channel [06:03] tylerstalder has joined the channel [06:04] r04r has joined the channel [06:04] ditesh|cassini has joined the channel [06:06] SubStack: TEST ALL THE THINGS [06:06] brainproxy: :) [06:06] brainproxy: I def like bdd style, will check out the 2nd link, thanks again [06:07] erikzaadi has joined the channel [06:08] r04r has joined the channel [06:10] michaelmartinez: What would you all suggest as a good starting point 4 a n00b node wannabe [06:13] r04r has joined the channel [06:15] jyc has joined the channel [06:16] wookiehangover: http://learncodethehardway.org/ [06:16] woodzee has left the channel [06:17] r04r has joined the channel [06:19] lohkey has joined the channel [06:19] sh1mmer has joined the channel [06:20] michaelmartinez has left the channel [06:22] r04r has joined the channel [06:22] r04r has joined the channel [06:23] _th_n has joined the channel [06:24] garrensmith has joined the channel [06:26] c0smikdebris has joined the channel [06:27] r04r has joined the channel [06:31] s33k has joined the channel [06:32] IamRyo has joined the channel [06:32] s33k: i'm trying to run a web server using node in arch linux [06:32] IamRyo: Is this thing on? [06:32] IamRyo: I have an error [06:32] hackband has joined the channel [06:32] r04r has joined the channel [06:33] s33k: but when i try to listen to port 80, i get an error saying [06:33] s33k: | |node.js:201 [06:33] s33k: | | throw e; // process.nextTick error, or 'error'\ [06:33] s33k: | | event on first tick [06:33] s33k: | | ^ [06:33] s33k: | |Error: listen EACCES [06:33] s33k: | | at errnoException (net.js:642:11) [06:33] s33k: | | at Array.0 (net.js:728:28) [06:33] s33k: | | at EventEmitter._tickCallback (node.js:192:40) [06:33] chjj: s33k: are you root? [06:34] s33k: no [06:34] s33k: ok [06:34] chjj: s33k: you need root privelages to bind to port 80 [06:34] subhaze has joined the channel [06:34] s33k: awesome.. got it [06:34] s33k: thanks [06:35] IamRyo: I'm trying to istall and use Chrome's dev toos autosave [06:35] IamRyo: tool [06:36] IamRyo: Here's the error [06:36] IamRyo: node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: No such module at Object. (/usr/lib/node_modules/npm/lib/utils/config-defs.js:5:21) at Module._compile (module.js:441:26) at Object..js (module.js:459:10) at Module.load (module.js:348:31) at Function._load (module.js:308:12) at Module.require (module.js:354:17) at require (module.js:37 [06:37] IamRyo: I installed node.js and ran $ npm install -g autosave [06:37] r04r has joined the channel [06:37] IamRyo: hello? [06:40] jesusabdullah: I'm not familiar with this tool [06:40] jesusabdullah: you may need to run that as root IamRyo [06:40] IamRyo: I tried sudo too [06:40] jesusabdullah: you *are* globally installing it after all! [06:40] IamRyo: No dice [06:40] IamRyo: maybe try no global? [06:40] jesusabdullah: naw [06:41] jesusabdullah: that'd install it locally [06:41] IamRyo: YEah, it didn't work anyways [06:41] isaacs: IamRyo: npm -v <-- what's that print out [06:41] IamRyo: I get an error [06:41] jesusabdullah: damn son [06:41] jesusabdullah: when npm -v throws it's time to get a new npm [06:41] IamRyo: right? [06:42] IamRyo: expand on that? [06:42] isaacs: IamRyo: also, why is npm in /usr/lib/node_modules rather than /usr/local/lib/node_modules? [06:42] isaacs: IamRyo: how did you install node and npm initially? [06:42] garrensmith has joined the channel [06:42] r04r has joined the channel [06:42] r04r has joined the channel [06:42] IamRyo: I just ran the node.js installer [06:43] isaacs: IamRyo: which node.js installer? [06:43] isaacs: the pkg installer for a mac? [06:43] IamRyo: yeah [06:43] isaacs: ok [06:43] isaacs: run this: `which node` [06:43] isaacs: what's that show you? [06:43] IamRyo: usr/local/bin/node [06:43] isaacs: ok [06:44] isaacs: so... why is npm in /usr/bin/npm [06:44] isaacs: rather than /usr/local/bin [06:44] isaacs: did you install some other version once upon a time? [06:44] IamRyo: got me... [06:44] isaacs: IamRyo: which npm [06:44] isaacs: run that^ [06:44] IamRyo: usr/bin/npm [06:45] isaacs: sudo mv /usr/bin/npm{,-BROKEN} ; hash -r ; npm -v [06:45] IamRyo: I think I'm seeing the problem here... [06:45] isaacs: :D [06:45] isaacs: if you used the mac pkg installer, you have some working version of npm in /usr/local/bin/npm, I'm guessing. [06:45] isaacs: but /usr/bin/npm is first in your path. [06:45] SamuraiJack has joined the channel [06:45] isaacs: not sure how *that* one got there. [06:46] isaacs: anyone's guess. [06:46] IamRyo: boom! [06:46] churp has joined the channel [06:46] IamRyo: Yeah, I may have been working on something else at some point... Who knows [06:47] IamRyo: But thanks for the help [06:47] r04r has joined the channel [06:47] r04r has joined the channel [06:51] r04r has joined the channel [06:51] fangel has joined the channel [06:52] thurmda has joined the channel [06:54] nowjs8 has joined the channel [06:54] lohkey has joined the channel [06:54] pid1 has joined the channel [06:54] nowjs8: hello guys, i want to ask you guys, i am trying to develop a chat (im server). node.js is suitable for me [06:54] khrome has joined the channel [06:55] nowjs8: but i will have more and more users, so i need a way to scale the system. [06:55] nowjs8: i have looked the demo chat written with node.js however i need a distribted system [06:55] nowjs8: any recommendations* [06:56] r04r has joined the channel [06:59] Emmanuel`: nowjs8: what do you mean with distributed system for chat ? [06:59] Emmanuel`: you mean several, synchronised, chat server [06:59] blueadept: what happens if you dont declare a variable specically through the var init in node.js? does the compiler just tack it on? [07:00] mansoor has joined the channel [07:00] nowjs8: Emmanuel`: yes i mean it [07:01] nowjs8: Emmanuel`: meaning, i will never have 1000-2000 users. so i need to have more than 1 server and a scalable system [07:01] jiboumans_ has joined the channel [07:01] r04r has joined the channel [07:01] r04r has joined the channel [07:02] munichlinux has joined the channel [07:06] r04r has joined the channel [07:06] r04r has joined the channel [07:07] asteros has joined the channel [07:09] verdoc has joined the channel [07:09] \mSg has joined the channel [07:10] nowjs8: Emmanuel`: : any comments? [07:10] r04r has joined the channel [07:11] mappum has joined the channel [07:15] deeprogram_ has joined the channel [07:15] r04r has joined the channel [07:18] QaDeS has joined the channel [07:19] nowjs8: i want to ask you guys, i am developing a chat server. which people will be able to talk with each other. should i use a xmpp server or node.js ? [07:19] Emmanuel`: nowjs8: you will never have 1000 users ? [07:19] Emmanuel`: then why would you need scalability [07:19] Emmanuel`: what kind of protocol do you want to use ? [07:20] Emmanuel`: you should definitely use xmpp, I don't see any good reason to redevelop these kind of thing with node [07:20] Emmanuel`: (but I might be wrong) [07:20] tdegrunt has joined the channel [07:20] r04r has joined the channel [07:20] Emmanuel`: as far as I know, all the "chat" stuff in node are just for demo/example [07:20] braoru has joined the channel [07:20] Emmanuel`: if you really have strong need, even an IRC server (that is : the thing you are connected at right now) would be good [07:22] nowjs8: Emmanuel`: : thanks but i know what is internet relay chat :) [07:22] nowjs8: Emmanuel`: : i am trying to accomplish "whatzapp" [07:22] nowjs8: you know it ? [07:22] Emmanuel`: I kind of assumed you did :) [07:22] Emmanuel`: I know whatsapp [07:23] nowjs8: so, do you think node.js is suitable for a such solution ? [07:23] Emmanuel`: probably, but that sounds a bit overkill [07:23] nowjs8: i see that as node.js is asnyc, it can handle many concurrent connections at the same time [07:23] Emmanuel`: as any xmpp server would do [07:24] dlg: its more webscale [07:24] nowjs8: Emmanuel`: so i should setup a xmpp server and write soem code in html5 for clients and let them chat each other running xmpp server ? [07:25] r04r has joined the channel [07:25] odinswand has joined the channel [07:26] edjafarov has joined the channel [07:28] sugyan has joined the channel [07:28] paulwe has joined the channel [07:28] odinswand has joined the channel [07:29] lmorchard has joined the channel [07:29] r04r has joined the channel [07:29] r04r has joined the channel [07:31] catshirt has joined the channel [07:33] satyr has joined the channel [07:34] r04r has joined the channel [07:35] stagas has joined the channel [07:35] niloy has joined the channel [07:36] sigurding has joined the channel [07:37] socketio\test\03 has joined the channel [07:39] r04r has joined the channel [07:39] gut4 has joined the channel [07:41] simenbrekken has joined the channel [07:43] r04r has joined the channel [07:43] r04r has joined the channel [07:43] Wizek-other has joined the channel [07:44] hackband has joined the channel [07:45] edjafarov_ has joined the channel [07:45] ph^ has joined the channel [07:46] o0xSG1z has joined the channel [07:48] groom has joined the channel [07:48] r04r has joined the channel [07:48] Morkel has joined the channel [07:48] r04r has joined the channel [07:49] panosru has joined the channel [07:51] stepheneb has joined the channel [07:53] jetienne has joined the channel [07:53] r04r has joined the channel [07:53] Epeli: What is the high level File System module for Node? I'd like have the basic operations with simple api. Copy, move etc. [07:54] `3rdEden has joined the channel [07:54] daglees has joined the channel [07:57] pleaz has joined the channel [07:57] dobber has joined the channel [07:58] ccare has joined the channel [07:58] tonist has joined the channel [07:58] r04r has joined the channel [08:02] zomg: Epeli: fs [08:02] aliem has joined the channel [08:02] fangel has joined the channel [08:03] maletor has joined the channel [08:03] r04r has joined the channel [08:05] isaacs: Epeli: you can do recursive copy pretty easily with fstream [08:05] isaacs: Epeli: most of the other things you'd want are implemented as one-offs in npm. [08:05] boltR has joined the channel [08:05] stagas has joined the channel [08:05] isaacs: Epeli: mkdirp, rimraf, etc. [08:05] zomg: mkderp [08:05] zomg: =) [08:06] Epeli: isaacs: Ah, thanks. I'll take a look at it [08:07] pleaz has left the channel [08:07] ph^_ has joined the channel [08:08] mraleph has joined the channel [08:08] pleaz_ has joined the channel [08:08] r04r has joined the channel [08:09] dannyamey has joined the channel [08:09] pleaz_ has left the channel [08:10] serby_ has joined the channel [08:10] stagas has joined the channel [08:10] stonebranch has joined the channel [08:10] nphase has joined the channel [08:12] tonist has joined the channel [08:13] infynyxx has joined the channel [08:13] erikzaadi has joined the channel [08:14] [AD]Turbo has joined the channel [08:14] [AD]Turbo: hi there [08:14] Chel has joined the channel [08:15] tdegrunt has joined the channel [08:15] stonebranch has joined the channel [08:16] margle has joined the channel [08:16] r04r has joined the channel [08:17] ph^ has joined the channel [08:20] hipsterslapfight has joined the channel [08:21] r04r has joined the channel [08:21] r04r has joined the channel [08:21] benjixx has joined the channel [08:22] ppcano has joined the channel [08:23] thalll has joined the channel [08:23] slaskis has joined the channel [08:25] huggies has joined the channel [08:26] Daegalus has joined the channel [08:26] r04r has joined the channel [08:27] Daegalus has joined the channel [08:28] jomoho has joined the channel [08:29] ablomen has joined the channel [08:29] Druid_ has joined the channel [08:30] pleaz_ has joined the channel [08:31] r04r has joined the channel [08:32] Yester_x2 has joined the channel [08:32] felixhummel has joined the channel [08:32] dobber has joined the channel [08:35] r04r has joined the channel [08:35] pradeebv_ has joined the channel [08:35] ph^ has joined the channel [08:36] hkjels has joined the channel [08:37] richardr_ has joined the channel [08:37] jkridner_ has joined the channel [08:37] Skola has joined the channel [08:38] pleaz_ has joined the channel [08:39] tomoj has joined the channel [08:39] johnhamelink has joined the channel [08:40] r04r has joined the channel [08:41] tornad has joined the channel [08:41] robhawkes has joined the channel [08:42] pleaz007 has joined the channel [08:42] pleaz007 has left the channel [08:42] adambeynon has joined the channel [08:42] ppcano has left the channel [08:43] danielss89 has joined the channel [08:43] sugyan has joined the channel [08:44] Chel: question: where can i read about ISODate javascript object ? [08:44] r04r has joined the channel [08:44] rendar has joined the channel [08:45] lperrin has joined the channel [08:45] joshgillies has joined the channel [08:47] richardr has joined the channel [08:48] tomoj: suppose you're writing a node.js process which will be entirely devoted to streaming data from some source out over stdio - another process will start you and ask for messages by writing 'next\n' into your stdin, then reading messages until you send 'sync', at which point it loops [08:48] tomoj: if you have no messages available, you are expected to sleep (..setTimeout?) for 1ms to avoid pegging the cpu, or you can just peg the cpu if you don't care [08:49] r04r has joined the channel [08:50] booyaa: arse don't hink i can make it to lnug [08:50] booyaa: sorely disappointed won't hear dscape's talk [08:50] booyaa: Chel: try using Date.parse? [08:51] booyaa: is isodate long date? yyyy-mm-dd hh:mm:ss ? [08:51] tomoj: you're expected to send a sync without blocking for too long after 'next', because the parent process might also notify you with a status message instead of sending 'next', and while it is waiting for 'sync' it will not send these [08:51] tomoj: what damage will this cause to an event-brained node.js programmer working under this framework? [08:51] kwmiebach has joined the channel [08:52] fluk3 has joined the channel [08:53] Chel: booyaa: yes, it's a long date. [08:53] r04r has joined the channel [08:53] r04r has joined the channel [08:54] Chel: Object Tue Feb 21 2012 04:00:00 GMT+0400 (MSK) has no method 'parse' [08:55] hackband has joined the channel [08:56] booyaa: Chel: i think the Date object doesn't handle timezones [08:56] booyaa: well according to MDN it does [08:56] booyaa: looks like you'll need to find a library that does [08:56] booyaa: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse#Example:_Using_parse [08:57] booyaa: mmm [08:57] booyaa: chel just tired parsing that date seems to work [08:58] booyaa: .. var bob = new Date(Date.parse('Tue Feb 21 2012 04:00:00 GMT+0400 (MSK)')); bob [08:58] catb0t: { Mon Feb 20 2012 19:00:00 GMT-0500 (EST) } [08:58] r04r has joined the channel [08:58] booyaa: maybe v8 fixed it? [08:59] criswell has joined the channel [08:59] Chel: booyaa: did you tried in node console ? [08:59] booyaa: yes [08:59] booyaa: mind you i'm on an old node [08:59] booyaa: that's cause i'm at work [09:00] booyaa: not sure why it would stop working in a more recent version too [09:00] aaronmcadam has joined the channel [09:00] booyaa: can you gist what you're typing in? [09:00] Chel: yes. it wouldn't [09:00] booyaa: catb0t is a node vm [09:00] plutoniix has joined the channel [09:00] catb0t: node I'd like to consume information being written to a local file descriptor, but is he is [09:00] Chel: ok. understand catb0t, will learn how to use him in future [09:00] catb0t: understand your code and o start future [09:01] booyaa: Chel: he's a bit mad [09:01] Chel: booyaa: please wait, i will pastebin a code [09:01] booyaa: gist it man [09:01] booyaa: pastebin is verboten at work [09:01] Chel: booyaa: =) like every bot [09:01] panosru: hello, iOS simulator is not working for me I always get an error The simulated application quit. Click Relaunch to try again. I have posted the console output here: https://gist.github.com/08f9fce113ca76e6f2e5 [09:01] booyaa: ACTION shakes his fist at work [09:01] panosru: lol [09:01] panosru: sorry [09:01] panosru: wrong channel! [09:01] booyaa: panosru: lolz indeed [09:02] tekky has joined the channel [09:02] Chel: https://gist.github.com/a5bd25a5eb228c3425d7 [09:02] Chel: just a small code [09:02] niloy has joined the channel [09:02] icebox has joined the channel [09:03] Chel: booyaa: [09:03] dve has joined the channel [09:03] r04r has joined the channel [09:03] booyaa: so console.log(date) spits out the isodate we just parsed in catb0t? [09:03] catb0t: consolelogdate isodate [09:04] hipsterslapfight has joined the channel [09:04] Chel: console.log(date.parse()) also throws en exception [09:04] Chel: ^en^an [09:05] Blkt has joined the channel [09:05] booyaa: whjere do you get the iso date? [09:05] ParadoxQuine has joined the channel [09:05] booyaa: i think it needs to be placed in date.parse(variableWithIsODate) [09:06] Chel: let me check. i have isodate in mongo [09:07] aristidesfl has joined the channel [09:07] booyaa: line 9 just maps template variables populated from lines 3-6) [09:07] Chel: https://gist.github.com/a9125f6d303f66d44fee [09:07] Chel: this code also throws an exception [09:07] Chel: booyaa: about map, yes. [09:08] satyr has joined the channel [09:08] booyaa: right... that is odd... [09:08] booyaa: one sec [09:08] Chel: just maps variables [09:08] r04r has joined the channel [09:08] r04r has joined the channel [09:08] ph^ has joined the channel [09:08] booyaa: docs[0].date is just a string right? you've typeof'd it to be certain it's not a date object? [09:08] skylamer` has joined the channel [09:08] booyaa: not that i think it matters [09:09] Chel: docs[0].date is ISODate from moongodb, i think it stores it in a bson isodate millisecundes [09:10] booyaa: chel but it looks like this right? Tue Feb 21 2012 04:00:00 GMT+0400 (MSK) [09:10] booyaa: it's not millseconds [09:10] Chel: yes typeof isodate is Tue, 21 Feb 2012 00:00:00 GMT [09:11] booyaa: ah [09:11] booyaa: heh yes okay [09:12] herbySk has joined the channel [09:12] dbrain has joined the channel [09:12] Chel: wait =) my bad [09:12] Chel: typeof isodate is Object [09:12] booyaa: yeah you spotted the problem too? [09:12] sgimeno has joined the channel [09:12] booyaa: oh [09:13] booyaa: use JSON.stringify to have a peek [09:13] booyaa: btw [09:13] booyaa: i know what your problem is with your code [09:13] booyaa: i will add a fix [09:13] r04r has joined the channel [09:14] lzskiss has joined the channel [09:14] booyaa: parse is a static method [09:14] booyaa: you need to call it using the Date object not an instance [09:14] booyaa: https://gist.github.com/d4fda1e913fdfa4b581e [09:14] booyaa: brb [09:15] Chel: ahhh [09:16] Chel: thaks [09:16] Chel: +n [09:16] sandfox has joined the channel [09:17] ryantm has joined the channel [09:18] r04r has joined the channel [09:18] r04r has joined the channel [09:19] ningu has joined the channel [09:19] riven has joined the channel [09:19] riven has joined the channel [09:20] tdegrunt has joined the channel [09:20] booyaa: np [09:21] eddyb has joined the channel [09:23] NetRoY has joined the channel [09:23] r04r has joined the channel [09:24] riven` has joined the channel [09:27] cosmincx has joined the channel [09:28] r04r has joined the channel [09:28] thalll has joined the channel [09:29] pokoli has joined the channel [09:29] thalll has joined the channel [09:32] r04r has joined the channel [09:32] r04r has joined the channel [09:33] maritz has joined the channel [09:33] TomY has joined the channel [09:36] copongcopong has joined the channel [09:36] looopy has joined the channel [09:37] ajackbot has joined the channel [09:37] r04r has joined the channel [09:37] Gruni|NA has joined the channel [09:37] misza222 has joined the channel [09:39] riven has joined the channel [09:39] riven has joined the channel [09:40] gut4 has joined the channel [09:40] markwubben has joined the channel [09:41] dannyamey has joined the channel [09:42] r04r has joined the channel [09:42] ryantm1 has joined the channel [09:45] i42n has joined the channel [09:45] hellp has joined the channel [09:47] r04r has joined the channel [09:47] pradeebv has joined the channel [09:49] eldios has joined the channel [09:51] r04r has joined the channel [09:54] AvianFlu has joined the channel [09:56] r04r has joined the channel [09:56] pickels has joined the channel [09:57] rurufufuss has joined the channel [09:58] xamius has joined the channel [10:00] riven has joined the channel [10:00] riven has joined the channel [10:00] r04r has joined the channel [10:00] dbrain has joined the channel [10:01] davidvip has joined the channel [10:02] davidvip: hi there, i already set PYTHON env variable to python2 but still hit the SyntaxError as specified at https://github.com/joyent/node/wiki/Installation [10:02] jimmysparkle has joined the channel [10:03] davidvip: i also set the PYTHONHOME to /usr [10:03] plutoniiix has joined the channel [10:04] odinswand has joined the channel [10:04] [[zzz]] has joined the channel [10:04] rurufufuss: is there a good document to read about multi-node node.js? [10:04] niloy has joined the channel [10:04] rurufufuss: that can answer questions like "how do people usually handle persistent objects in two node.js nodes?" [10:04] davidvip: if i change the PYTHONHOME=/usr/lib then hit a LookupError [10:05] r04r has joined the channel [10:05] aslant has joined the channel [10:05] r04r has joined the channel [10:05] davidvip: Fatal Python error: Py_Initialize: Unable to get the locale encoding [10:05] davidvip: LookupError: no codec search functions registered: can't find encoding [10:05] davidvip: ./configure: line 19: 30788 Aborted "${WORKINGDIR}/tools/waf-light" --jobs=1 configure $* [10:05] davidvip: any ideas? [10:08] hz has joined the channel [10:08] tdegrunt has joined the channel [10:09] iangreenleaf has joined the channel [10:09] cjm has joined the channel [10:09] c0smikdebris has joined the channel [10:10] r04r has joined the channel [10:11] dgathright has joined the channel [10:12] riven` has joined the channel [10:12] tomasztomczyk has joined the channel [10:13] davidvip has left the channel [10:14] aaron_ has joined the channel [10:14] r04r has joined the channel [10:14] r04r has joined the channel [10:15] HardFu has joined the channel [10:16] dgathright has joined the channel [10:16] jimmysparkle_ has joined the channel [10:18] oal: Probably a common question around here, but how do you avoid boomerang/banana code and callback hell? Is the "async" module what you'd recommend? [10:19] booyaa: cal, there are a lot of async modules. check out toolbox.no.de or search.npmjs.org to find one you like the sound of [10:19] booyaa: i think dailyjs.com did a review of the most widely used ones [10:19] r04r has joined the channel [10:19] r04r has joined the channel [10:19] rendar has joined the channel [10:20] booyaa: i've used caolan's async fairly easy to use [10:20] oal: Thanks, booyaa. :) [10:20] Glenjamin: oal: that's my preferred choice [10:20] booyaa: rurufufuss: use a common db or keystore? [10:20] chjj has joined the channel [10:21] cha0s has joined the channel [10:21] igl has joined the channel [10:22] josh-k has joined the channel [10:23] rurufufuss: booyaa: keystore [10:23] rurufufuss: well, since most web apps are stateless, everything is usually done by "pull from db, modify, push back to db", sometimes with caching etc [10:23] rurufufuss: but what about if you have a highly dynamic object (e.g a chatroom) [10:24] booyaa: rurufufuss: use messagequeue technology since it's closer to that type of application? [10:24] robi42 has joined the channel [10:25] rurufufuss: booyaa: like redis pubsub? [10:25] booyaa: rabbitmq [10:25] booyaa: i think pusher may even be in this arena [10:25] abraxas: any c++ addon developers on who could quickly verify something for me? [10:26] abraxas: I see bugs in other people's code (or I'm really confused about what I read) [10:26] rurufufuss: cool, thanks, will tkae a look [10:26] booyaa: rurufufuss: dunno about pubsub, well not used it, but i suspect subscribing to new chat events could work [10:26] booyaa: rurufufuss: how does the multi nodedness work? are you trying to load balance a chat server? [10:27] rurufufuss: booyaa: suppose I made a chat app in node.js [10:27] dubenstein has joined the channel [10:27] rurufufuss: and everything's going fine for one node (every chatroom object) is held in one server [10:27] rurufufuss: how does one scale up from one server to two? [10:28] booyaa: right i get you [10:28] booyaa: rurufufuss: i think you want to think about clustering technology too in addtiojn to shaerd storage/or message queues [10:28] huggies has joined the channel [10:29] booyaa: thinsg like hookio or i think dnode [10:29] r04r has joined the channel [10:29] rurufufuss: right, dnode would be used for clients connecting to server A, but where the chatroom is located in server B huh [10:29] rurufufuss: .. this sounds like reimplementing IRC haha [10:29] catb0t: Exception: SyntaxError: Unexpected identifier [10:29] SubStack: dnode would more be for letting the servers talk to each other [10:30] SubStack: redis might be a better fit for sharing state like that [10:30] kwmiebach_ has joined the channel [10:30] rurufufuss: I suppose redis is fast enough for chatroom purposes huh [10:30] booyaa: redis is plenty fast enough for most apps [10:30] SubStack: if you want to manage a federated architecture spanning lots of processes check out http://github.com/substack/seaport [10:31] dubenstein has joined the channel [10:31] booyaa: don't voxer use it or is it riak? [10:31] SubStack: they use both [10:31] DrPheltRight has joined the channel [10:31] rurufufuss: SubStack: I was expecting a cartoonish doodle which may or may not involve a ninja turtle [10:32] rurufufuss: instead there seems to be a postmodernish structure as the logo [10:32] riven has joined the channel [10:32] riven has joined the channel [10:32] SubStack: rurufufuss: it's one of these http://www.oaklandmofo.com/images/port-of-oakland-cranes.jpg [10:32] ningu: someone really needs to write redis philbin to go along with kathy lee giffer [10:33] SubStack: I got tired of drawing it so I left it in that condition [10:33] SubStack: I was going to draw a ship [10:33] rurufufuss: ah, makes sense with "seaport" [10:33] ningu: you should also draw the crowds of occupy people closing the port [10:33] rurufufuss: and the pool's closed guy [10:34] r04r has joined the channel [10:34] dubenstein has joined the channel [10:35] papertigers has joined the channel [10:36] krilla has joined the channel [10:37] RLa has joined the channel [10:37] jldbasa has joined the channel [10:37] krilla: hi [10:38] a_meteorite has joined the channel [10:38] shanebo has joined the channel [10:39] r04r has joined the channel [10:39] dubenstein has joined the channel [10:39] tomaszto_ has joined the channel [10:40] niloy has joined the channel [10:41] garrensmith has joined the channel [10:42] herbySk has joined the channel [10:42] Morkel has joined the channel [10:44] robi42 has joined the channel [10:44] fermion has joined the channel [10:44] r04r has joined the channel [10:44] r04r has joined the channel [10:44] michaelhartau has joined the channel [10:44] dubenste1n has joined the channel [10:44] einaros has joined the channel [10:45] dubenstein has joined the channel [10:47] pradeebv_ has joined the channel [10:48] AdTaylor_ has joined the channel [10:48] ningu: json is really what xml wanted to be and never was... or I should say, what people thought xml should be instead of a markup language ;) [10:49] r04r has joined the channel [10:49] rodgerdb has joined the channel [10:49] SubStack: calling a data exchange format a markup language is the first mistake [10:49] ningu: I'm glad that people don't seem to be talking about json in hushed tones anymore as if they were embarrassed to admit they were using it. in 2005 or so, as I recall, it was seen as a hack. [10:49] ningu: SubStack: no, it went the other way around historically -- it's call x*ML* after all [10:50] SubStack: really? the first time I saw it I thought "yes, fucking finally" [10:50] ningu: and then people said hey, it can be used for data exchange as well [10:50] ajackbot has joined the channel [10:50] dubenste1n has joined the channel [10:51] jimmy- has joined the channel [10:51] ningu: me too. but apparently there were/are corporate types convinced that xml was the right thing (people who didn't really understand the tech, I'm sure) [10:51] benvie: verbosity is an enemy I wish to kill [10:51] torvalamo: i remember when xhtml was all the hype. that wasn't so long ago. i think it was last week. [10:51] benvie: dhtml is where it's at [10:51] ningu: yes, but html actually is a markup language [10:51] margle has joined the channel [10:51] torvalamo: oh hell yeah, dhtml [10:51] benvie: remember that shit? [10:51] torvalamo: dude i got a menu that follows the page as you scroll! [10:51] benvie: that was javascript once upon a time...dhtml [10:52] torvalamo: i also hae a bunny for a cursor [10:52] maritz: torvalamo: me too, but it's a sticky note i put on my bosses monitor. works great. [10:52] ningu: I was just reading about dart [10:52] rjack has joined the channel [10:52] ningu: wonder if it will ever come to pass [10:52] torvalamo: of course it will [10:53] torvalamo: it's google, they'll make it. the question is if people will use it [10:53] benvie: it's not going to displace javascript in the foreseeable future [10:53] ningu: that's what I meant [10:53] ningu: I know they'll make it [10:53] r04r has joined the channel [10:53] ningu: but imo, js, though flawed, is basically a good language that can be made to do what you want with a bit of effort perhaps for browser cross-compat [10:53] torvalamo: it's technically not a replacement for js, is it? it's more of a replacement for a webpage. at least that's what i got out of it. [10:53] benvie: there's too much intertia behind what exists. You're more likely to see changes pop up as part of shifts to completely different mediums [10:54] ningu: I don't think js is that flawed, it's just a bit messy with some odd semantics for historical reasons [10:54] benvie: the story for the web medium has been written [10:54] benvie: the html/css/js/document whatever [10:54] benvie: that's not going to change [10:54] torvalamo: sure it is [10:54] ningu: well, I don't mean whether browsers will drop support for js, which presumably they won't [10:54] ningu: but whether new sites will shift [10:54] benvie: well no, they won't [10:55] jimmysparkle has left the channel [10:55] torvalamo: i can totally foresee html disappearing into oblivion [10:55] ningu: html5 support is real enough and will be a big change [10:55] benvie: it would need to be something that was largely isolated from what exists [10:55] OmidRaha has joined the channel [10:55] ningu: there is already a fair amount of html5 support in webkit, right? [10:55] benvie: sites won't just switch to something [10:56] torvalamo: from an objective point of view html is a clunky and far too static way to create apps... [10:56] benvie: it needs to have 95% support amongst their customers first [10:56] benvie: and how will that happen [10:56] torvalamo: i'm sure some genius will come up with a new way to define apps [10:56] richardr has joined the channel [10:56] ningu: well, apps are not pure html, I doubt they ever could be [10:56] torvalamo: like a DOM-thingy without the HTML fuzz [10:57] ningu: in fact, those xml "programming languages" always made me wonder what those people were smoking :) [10:57] benvie: yeah I'm just saying you're more likely to see the whole medium displaced than to see say javascript replaced by dart or anything in what we call the web now [10:57] torvalamo: xslt anyone? [10:57] benvie: or html or any of the pillars [10:57] torvalamo: with sugar? [10:57] ningu: someone made something called X++ [10:57] rendar: i think the first thing to do, is change http [10:58] benvie: virtual reality has to come some day right [10:58] larsschenk has joined the channel [10:58] ningu: http is successful because it's so simple, though [10:58] benvie: when http ceases being a sufficient pipe for piping in our virtual reality headsets [10:58] looopy has joined the channel [10:58] r04r has joined the channel [10:58] larsschenk has left the channel [10:58] torvalamo: actually http itself isn't too bad, you just need to upgrade it a bit to allow for two-way communication [10:58] benvie: and we need laser-http-ULTRA [10:58] rendar: then, also urls has an old syntax, often friends of mine paste to me urls of about 800 charachters, where 780 are sha hashes or something, wouldn't it cool pass just a name? [10:59] benvie: usually you see new technologies simply adapting and monkeypatching existing stuff. It takes a real fundamental technological shift to outright build something new [10:59] torvalamo: you mean like a domain name? [10:59] rendar: i think the things should be re-thinked from the ground up for the future.. [10:59] torvalamo: i remember those days [11:00] ts___: is there a way to do something like this in node : var module = require('some source code in a string') ? [11:00] rendar: torvalamo: yes, instead of http://imgur.com/49d94if i pass you just rendar/fun_pic [11:00] ningu: the old days when a man was lord of his domain (name)? [11:00] torvalamo: rendar, so essentially a context-based address system? [11:00] ningu: ts___: eval? [11:00] torvalamo: what a shit idea if i ever heard one [11:00] torvalamo: no offense [11:01] blup has joined the channel [11:01] rendar: torvalamo: a context-based? nope.. [11:01] torvalamo: that's like telling the post office to deliver a postcard to your neighbour... and you just put "neighbour" on it [11:02] ningu: rendar: ok, but there aren't a small number of users, won't the names get just as ugly? [11:02] ts___: ningu: so if i load a module js file and pass it to eval is the same as require(moduleFilename) ? [11:02] rendar: names+namespaces and hierarchy, like actual DNS, but more modern [11:02] ningu: ts___: eval just takes a string and evaluates the code in it, it can come from wherever [11:02] torvalamo: namespaces = context based [11:02] ningu: it isn't a node feature [11:02] rendar: look at the companies which reigsters bookmar.ks chatwith.me and so on [11:03] r04r has joined the channel [11:03] r04r has joined the channel [11:03] ts___: alright [11:03] rendar: that .me or .ks TLDs are not used for countries anymore, but just as name extension.. :) [11:03] dekub has left the channel [11:03] torvalamo: I KNOW [11:03] d0k has joined the channel [11:04] ningu: ts___: eval(string), you can do that in js generally [11:04] ts___: yep [11:04] ningu: although it's dangerous to do for user-passed code obviously [11:04] torvalamo: i've decided to stop telling people that [11:05] ningu: haha [11:05] torvalamo: i wanna see what the worst thing that can happen is [11:05] rendar: torvalamo: don't you think its quite unuseful using TLDs in that way? maybe just names like 'chatwithme' or 'bookmarks' would be cool, i was saying just that.. [11:05] torvalamo: rendar, i know what you mean, but who's to say who gets 'bookmarks' when there are dozens of bookmarks.something sites [11:06] plutoniix has joined the channel [11:07] rendar: torvalamo: it happens also now, you can have only 1 bookmar.ks domain name, you first register it, you have it, it will happen in this way, if you register 'bookmarks' you have it, other will register some other name.. [11:07] torvalamo: yeah but then essentially it would be a domain name system with no extensions and less available domains [11:07] torvalamo: how does that help? [11:08] rendar: torvalamo: wrong, because in that case there will be namespaces which helps to have much more available domains, even more than now can exist with these limited TLDs [11:08] r04r has joined the channel [11:09] torvalamo: so how would these namespaces work then [11:11] Skyjoker has joined the channel [11:11] rjack has joined the channel [11:12] c0smikdebris has joined the channel [11:13] rendar: torvalamo: well, this is a good question, and not of easy solution, you can have a global namespace, like happens now, then stuff-related namespaces, user-defined namspaces..and so on, it will help also with searching something related by argument as happens in android/iOS market, when you search an application, instead of having a context-less search engine like google which have to process [11:13] rendar: millions of pages.. [11:13] dgathright has joined the channel [11:13] r04r has joined the channel [11:18] Cromulent has joined the channel [11:19] Wizek has joined the channel [11:20] OmidRaha has joined the channel [11:21] Chel: is it true, that there is no any method to get sprintf("%.2F",strin) ? do i need to use regexp or three is a better way ? [11:21] Chel: in V8 of course [11:21] dlg: you want to turn a string into number? [11:21] Chel: i want to round a number 3.33333 to 3.33 [11:21] Doikor: toFixed [11:21] dlg: floor? [11:22] Doikor: http://www.w3schools.com/jsref/jsref_tofixed.asp [11:22] Chel: thanks [11:24] simenbrekken has joined the channel [11:25] wingie: anyone knows where cloudhead has gone? [11:25] wingie: he doesn't seem to care much about this libs [11:27] wingie: im very wrong .. he's still active [11:32] kolektiv has joined the channel [11:32] janjongboom has joined the channel [11:33] kolektiv: i wonder if anyone knows... [11:33] kolektiv: i'm using connect static via express [11:33] kolektiv: if i set the max age, what ends up in the browser is always a factor of 3 less than what i have in the code! [11:34] kolektiv: so maxAge: 86400000 (one day) ends up in the browser as 86400 (1/1000 of a day) [11:34] kolektiv: anyone seen this before?! [11:35] Skaag has joined the channel [11:35] janjongboom: weird [11:36] kolektiv: yes - that's what i thought! [11:36] janjongboom: i think connect wants seconds [11:36] janjongboom: instead of ticks [11:36] janjongboom: 86400 / 24 / 60 / 60 = 1 [11:36] devaholic has joined the channel [11:37] dmwuw has joined the channel [11:37] kolektiv: well, 24*60*60*60 = 86400000 (ms in one day) [11:37] aslanted has joined the channel [11:37] kolektiv: that ends up as 86400 in the browser, which wants ms [11:38] __doc__ has joined the channel [11:38] kolektiv: sorry, that first bit should have had *1000 on it! [11:38] kolektiv: so it's as if it actually wants 10^-6 seconds... [11:38] smgt has joined the channel [11:38] kolektiv: which seems over-precise :) [11:38] mc_greeny has joined the channel [11:38] rio{ has joined the channel [11:39] johnhamelink: I'm trying to use the global object in order to give dependencies to modules I load within my app.js file… but they don't seem to work - at all. How can I debug this? [11:40] ts___: oh [11:40] ts___: found Module.wrap(sourceCode) [11:41] janjongboom: oh i think the browser expects it in seconds [11:41] janjongboom: and connect in ms [11:41] janjongboom: so they're actually the same? [11:41] janjongboom: it just seems off if you check HTTP headers [11:42] airandfingers has joined the channel [11:42] janjongboom: have you verified that the browser expires the content too soon or is this just what you thought when inspecting he headers? [11:43] RLa: also, not all browsers treat max-age same [11:44] johnhamelink: Actually, the question I really want to ask is: how can I Pass require()s (not always in the node_modules folder for logistics reasons) into the scope of modules I load later? [11:45] johnhamelink: I have a custom libs I want to require() and be able to use within modules that I dynamically load from my "vendor" directory. [11:45] rodgerdb has left the channel [11:45] RLa: how global object does not work? [11:46] RLa: properties do not appear in the other module? [11:46] johnhamelink: Indeed [11:46] satyr has joined the channel [11:46] johnhamelink: I'm using node 0.6.8 [11:46] johnhamelink: When doing global.express = require('express'), I get: ypeError: Object # has no method 'get' [11:47] johnhamelink: the "get" method it's referring to is: express.get('/'+this.moduleName,middleware.getParams,standard.list); [11:48] looopy has joined the channel [11:48] johnhamelink: Previously I was using an init() function within each module to send an obj with all the modules inside… this became problematic [11:53] tttthet has joined the channel [11:56] janjongboom: @johnhamelink, shou;dn't you do var app = express.createServer(); then do an app.get [11:57] johnhamelink: Ahh, I think I was passing { express: app } into the module previously… that would explain it >_> [11:57] serby has joined the channel [11:59] janjongboom: :-) [12:00] r04r has joined the channel [12:02] cjroebuck has joined the channel [12:04] ph^ has joined the channel [12:09] level09 has joined the channel [12:10] stagas has joined the channel [12:13] shinuza has joined the channel [12:14] lperrin has joined the channel [12:14] fluk3 has joined the channel [12:15] michaelh has joined the channel [12:17] fly-away has joined the channel [12:18] daithi44 has joined the channel [12:18] joeytwiddle has joined the channel [12:20] gut4 has joined the channel [12:20] bnoordhuis has joined the channel [12:21] volkan has joined the channel [12:22] spcshpopr8r has joined the channel [12:23] tommyvyo has joined the channel [12:23] DrPheltRight has joined the channel [12:23] sreeix: Is it a good idea to use Node.js(instead of C) to write a proxy for redis(like haproxy but understanding redis protocol)? [12:25] rio{ has joined the channel [12:26] RLa: what should the proxy do? [12:28] sreeix: It needs to receive connections and forward it to the redis master…. [12:28] sreeix: and keep track of redises coming up and going down so that it can it can issue the right slave commands [12:29] rauchg has joined the channel [12:29] jimmy- has joined the channel [12:29] Edy has joined the channel [12:29] Edy has joined the channel [12:29] jimmysparkle has joined the channel [12:31] jimmy-_ has joined the channel [12:31] jetienne has joined the channel [12:32] ryanfitz has joined the channel [12:34] dannyamey has joined the channel [12:35] githogori has joined the channel [12:36] take_cheeze has joined the channel [12:39] garrensm_ has joined the channel [12:40] matt_c has joined the channel [12:44] garrensmith has joined the channel [12:47] erichynds has joined the channel [12:50] mikaelb has joined the channel [12:50] k1ttty has joined the channel [12:52] simenbrekken has joined the channel [12:52] level09_ has joined the channel [12:52] aimantec has joined the channel [12:56] kolektiv has left the channel [12:56] jetienne_ has joined the channel [12:57] enmand has joined the channel [13:02] briancray has joined the channel [13:03] jxie has joined the channel [13:04] hotchkiss has joined the channel [13:05] stagas has joined the channel [13:08] cjroebuck has joined the channel [13:09] aranw has joined the channel [13:11] madhums has joined the channel [13:11] Yester_x2: does somebody know a modul for node which makes statistics about your site e.g. visitor numbers per day or traffic? [13:12] Yester_x2: or how do you guys handle this [13:12] dubenstein has joined the channel [13:13] RLa: google analytics [13:14] Yester_x2: oh awesome thx. :) sry if this was a stupid question it's my first time developing [13:14] oal: Yester_x2: yup, Google analytics is great [13:16] Metapony has joined the channel [13:16] vguerra has joined the channel [13:16] Tug has joined the channel [13:17] crutex has joined the channel [13:18] Nss has joined the channel [13:18] r04r has joined the channel [13:19] gorekee has joined the channel [13:19] MartinCleaver has joined the channel [13:19] ts___: what article or readme i need to read before publishing to npm registry ? [13:20] Industrial: Is this a honest test? https://gist.github.com/1885154 [13:20] charlenopires has joined the channel [13:20] Industrial: defineMultipleVars consistently scores faster :P [13:20] SubStack: ts___: if you have a valid package.json just do `npm publish` [13:20] Industrial: tdegrunt: ^ [13:20] Behi has joined the channel [13:21] MartinCleaver: huh. http://nodejs.debuggable.com/ could do with a search box.. [13:21] ts___: SubStack: any recommendation on naming directory structure etc ? [13:21] SubStack: however you want! [13:21] SubStack: npm doesn't judge you [13:21] andrehjr has joined the channel [13:22] ts___: SubStack: okay :) [13:22] subbyyy has joined the channel [13:23] HeikkiV_ has joined the channel [13:24] Yester_x2: has someone tried webalizer with node? [13:24] mosca_ has joined the channel [13:26] MartinCleaver: I'm trying to use a javascript library into node. Although individual modules in the js library load from my app they can't see each other (ie resolve internal dependencies). I accept I need to modify that library. but am trying to do so as unintrusively as possible as I don't want to take ownership of it [13:26] r04r has joined the channel [13:26] Joeysomo has joined the channel [13:26] CIA-102: node: 03Myles Byrne 07master * r21374c3 10/ Makefile : build: remove unused makefile target - http://git.io/lP6-ow [13:26] Joeysomo has joined the channel [13:29] Gloorian has joined the channel [13:29] Gloorian: hello [13:29] Gloorian: Does anyone know how to check wether the data returned by fs.readFile is empty or not ? [13:30] Behl has joined the channel [13:30] Industrial: Gloorian: erm, http://nodejs.org/docs/latest/api/fs.html#fs.readFile ? [13:30] Industrial: The callback is passed two arguments (err, data), where data is the contents of the file. [13:31] Industrial: check the contents of data. [13:31] Gloorian: yes [13:31] fumanchu182 has joined the channel [13:31] rio{ has joined the channel [13:31] Gloorian: but it seems that even if the file is empty, the if(data) returns true [13:31] ramitos has joined the channel [13:31] Industrial: so check the contents, not existance, of data [13:32] Joeysomo has joined the channel [13:32] Yester_x2: if(data == "" || data === undefined) { } [13:32] infynyxx has joined the channel [13:32] janjongboom: either do fs.readFile(path, "utf8", function (err, data) so data is a string [13:33] janjongboom: and you can do if (!data) {} [13:33] janjongboom: or check for data.length [13:33] janjongboom: because data is a Buffer in that case, and has length = 0 when no content is there [13:33] Gloorian: ok, thank you :D [13:34] horofox has joined the channel [13:34] janjongboom: you can use something like http://c9.io or node-inspector to debug an application, check content of a variable on the fly [13:35] Tug: Any idea what sort of proxy can I use to add servers dynamically (ie using an API not modifying a config file and reloading the thing) ? [13:35] stafamus has joined the channel [13:35] MartinCleaver: So, my question is: what I need to do to make the loading of one of my 3rd party libraries automatically load others -- I see in http://nodejs.org/docs/v0.4.3/api/all.html#folders_as_Modules that I can specify the path to fetch it using ("main" : "./lib/some-library.js" } in package.json - or that I can build an index.js file - I suspect the former won't work [13:36] aslant has joined the channel [13:36] MartinCleaver: but I think that packages should have a package.json file, even if they have a whacky structure [13:36] r04r has joined the channel [13:37] MartinCleaver: in fact, I don't think I could have done "npm link" to my js library had I not made one [13:37] janjongboom: @MatinCleaver I don't really get what youre trying here [13:38] _th_n has joined the channel [13:38] janjongboom__ has joined the channel [13:39] MartinCleaver: thanks janjongboom -- so, https://github.com/mrjcleaver/freshbooks-javascript-library/tree/master/library/FreshBooks/TimeEntry.js needs Element.js for a definition of FreshBooks_Element() [13:39] janjongboom: reference it on top of your file, with a relative url [13:40] janjongboom: lemme check ur folder structure [13:40] janjongboom: just do [13:40] janjongboom: var Element = require("./Element") [13:40] janjongboom: if your files are in the same package, just use relative paths to reference them [13:41] MartinCleaver: this is a js library, pre-node. I'm not sure that will work…. checking now. [13:41] MartinCleaver: (I'd like to not mess with the code in the library too much, so I was wondering if I can make node fulfill this module's path dependencies using changes at the top of the library) [13:42] janjongboom: you'll have to change the code a bit to let it work with the CommonJS system [13:42] snearch has joined the channel [13:43] tvw has joined the channel [13:43] EhevuTov has joined the channel [13:44] MartinCleaver: Just gives: Error: Cannot find module 'Element' [13:44] janjongboom: how do you include it? some code please [13:44] r04r has joined the channel [13:44] r04r has joined the channel [13:45] MartinCleaver: npm linked from my project to another project with a git checkout [13:45] MartinCleaver: Then in my code: var timeEntry = require('freshbooks-javascript-library/library/FreshBooks/TimeEntry'); [13:46] MartinCleaver: It loads TimeEntry, but not Element [13:46] janjongboom: don't do absolute paths [13:46] janjongboom: what's the code for timenentry? [13:46] MartinCleaver: https://github.com/mrjcleaver/freshbooks-javascript-library/blob/master/library/FreshBooks/TimeEntry.js [13:46] janjongboom: you'll have to do a `var Element = require("./Element")` in that file [13:47] Tug: MartinCleaver: You need to modify every file wich are used by TimeEntry => add module.exports in Element.js [13:47] nicki9knuckles has left the channel [13:47] MartinCleaver: I had added var Element = require('Element'); [13:47] MartinCleaver: to the top [13:48] Tug: in the file Element.js [13:48] Tug: add module.exports = FreshBooks_Element [13:48] _Steve_: MartinCleaver: see janjongboom comment, you're missing './' [13:48] Tug: and use require('./Element.js') [13:48] _Steve_: in front of the file [13:49] janjongboom: check this intro for commonjs: http://51elliot.blogspot.com/2011/07/simple-intro-to-nodejs-modules.html [13:49] stafamus has joined the channel [13:50] davidsklar has joined the channel [13:51] looopy has joined the channel [13:51] Druid_ has joined the channel [13:51] MartinCleaver: I' tried ./ in var timeEntry = require('freshbooks-javascript-library/library/FreshBooks/TimeEntry'); [13:51] MartinCleaver: -> this causes it to not find the library at all [13:51] MartinCleaver: (perhaps I need package.json to refer to main?) [13:52] janjongboom: https://gist.github.com/1885247 [13:52] janjongboom: forget about package.json for this @MartinCleaver [13:52] janjongboom: has nothing to do with it [13:53] Tug: I think you cannot require a file without './' except if the path is added to require.paths [13:54] MartinCleaver: ACTION comments to https://gist.github.com/1885247#comments [13:54] lazyshot has joined the channel [13:54] tommyvyo has joined the channel [13:54] MartinCleaver: ok - I will have to continue with this tomorrow [13:54] MartinCleaver: thanks for your help guys [13:55] vkareh has joined the channel [13:55] janjongboom: answered [13:56] dnolen has joined the channel [13:58] djazz has joined the channel [13:58] achuraev has joined the channel [13:59] andrehjr has joined the channel [13:59] shinuza has joined the channel [14:00] cjm has joined the channel [14:00] r04r has joined the channel [14:01] tokumine has joined the channel [14:01] c4milo has joined the channel [14:01] catshirt has joined the channel [14:01] fasecharmer has joined the channel [14:02] bbttxu has joined the channel [14:02] qsobad has joined the channel [14:03] achuraev: Hello [14:03] Poetro has joined the channel [14:05] Nss has joined the channel [14:07] jaha has joined the channel [14:08] rwaldron has joined the channel [14:08] cccp526 has joined the channel [14:08] jaw187 has joined the channel [14:09] dubenstein has joined the channel [14:11] AaronMT has joined the channel [14:12] thomblake has joined the channel [14:12] thomblake has left the channel [14:13] brianseeders has joined the channel [14:13] broofa has joined the channel [14:14] dubenstein has joined the channel [14:15] ceej has joined the channel [14:15] jaw187: good morning node [14:18] mikaelb has joined the channel [14:19] lduros has joined the channel [14:19] garrensmith has joined the channel [14:21] CIA-102: node: 03T.C. Hollingsworth 07master * r3d1b670 10/ (configure node.gyp): [14:21] CIA-102: node: build: support shared V8 properly [14:21] CIA-102: node: -don't pull in bundled v8 as a dependency when node_shared_v8==true [14:21] CIA-102: node: -use node_shared_v8_includes for v8.h and v8-debug.h - http://git.io/63p4mQ [14:22] benvie has joined the channel [14:22] joshsmith has joined the channel [14:23] gut4 has joined the channel [14:24] mrkurt: sreeix: we use node for a mongo proxy, it seems to work really well in our initial testing, but it's not heavily used yet. [14:24] benvie: and I made it work on Windows https://github.com/Benvie/wxNode [14:25] jdeibele has joined the channel [14:25] sreeix: thanks mrkurt that's what i was hoping to hear. [14:25] sreeix: i did not want to end up having the proxy run slower than redis itself…. [14:26] Cromulent has joined the channel [14:26] bkaney has joined the channel [14:27] webguynow has joined the channel [14:27] _th_n has joined the channel [14:30] lzskiss has joined the channel [14:30] sreeix: how hard was it to implement the mongo proxy mrkurt ? [14:30] Johnsknees has joined the channel [14:31] carlyle has joined the channel [14:32] mrkurt: sreeix: not super hard, just simple sockets and a binary parser [14:33] mrkurt: it seems to add about 90 microseconds of latency for a "normal" command round trip [14:33] sreeix: cool… it's probably simpler because of redis's simpler protocol [14:34] sreeix: awesome. Thanks a lot. By any chance is it opensourced? [14:34] icebox has joined the channel [14:35] M1l3n1um has joined the channel [14:35] mikaelb has joined the channel [14:35] EhevuTov_ has joined the channel [14:36] piscisaureus_ has joined the channel [14:36] mrkurt: it's not, maybe someday! [14:38] nodebiscut has joined the channel [14:38] SubStack: ACTION blogged! http://news.ycombinator.com/item?id=3620972 [14:38] SubStack: pretty object diffs in javascript! [14:38] SubStack: already being used by testling and node-tap [14:39] Connorhd has joined the channel [14:41] sreeix: thanks mrkurt [14:41] TimTimTim has joined the channel [14:41] r04r has joined the channel [14:42] ppcano has joined the channel [14:43] ppcano has joined the channel [14:44] jstash has joined the channel [14:44] st_luke has joined the channel [14:45] peterrs has joined the channel [14:46] st_luke has joined the channel [14:46] krucial has joined the channel [14:46] ningu: SubStack: does it understand collection order differences? [14:46] RyanD has joined the channel [14:46] ppcano has joined the channel [14:46] peterrs: in express.. is it possible to render a multiple templates inside a view? like res.render("mytpl.ejs") -> partial("mysubtmpl.ejs", {}); ? [14:47] diva has joined the channel [14:47] SubStack: ningu: objects don't have a defined order [14:47] SubStack: only arrays do [14:48] ningu: SubStack: not really true, in mongodb {a:1,b:2} != {b:2,a:1} [14:48] ph^ has joined the channel [14:48] ppcano has joined the channel [14:48] Industrial: SubStack: dumb question about dnode; I've read the browser example and it uses src="/dnode.js" but I can't find that file ... [14:48] ningu: and the js spec has details for how the collection order should be saved [14:48] mmalecki: .. {a:1,b:2} == {a:1, b:2} [14:48] catb0t: Exception: SyntaxError: Unexpected token : [14:49] ningu: mmalecki: I don't know if you can just do it with == but mongodb uses that order for comparing objects [14:49] mmalecki: .. { a: 1, b: 2} == {a: 1, b: 2} [14:49] catb0t: Exception: SyntaxError: Unexpected token : [14:49] mmalecki: wat [14:49] mmalecki: ningu: hm, it doesn't do regular JS comparison? [14:49] ningu: so you have to normalize the order if you want to make them compare properly [14:49] SubStack: Industrial: it's injected into the webapp like socket.io does [14:49] ningu: not sure if there's a js-native method for that [14:50] booyaa: dscape: going to have to miss you talk today :( got a poorly missus and house packing to do :( [14:50] booyaa: ACTION had hoped to partake in some beerage tonight oh well [14:50] ningu: mmalecki: you can test it from the mongo shell easily [14:50] mmalecki: ACTION installs mongo [14:51] ningu: db.foo.find({ blah: {a:1,b:2} }) versus {b:2,a:1} [14:51] Industrial: SubStack: just by having a app.use(connect.static('somedir')); ? [14:51] vicapow has joined the channel [14:51] _tors has joined the channel [14:52] BadCodSmell has joined the channel [14:52] Industrial: ningu: db.foo.find({'blah.a': 1, 'blah.b': 1}) ? they really should return the same documents .. [14:52] SubStack: Industrial: no it's messier than that [14:53] Industrial: SubStack: k, I'll take a good look then =) [14:54] BadCodSmell: I'm new to node.js and have heard complaints about it being single threaded. If this really true as there is a worker module? If I wanted to create a database driver, and did so in JS, would I give that it's own thread which would call completion callbacks on the main thread when done or does that use pseudo threads rather than hardware? [14:54] bizniz98 has joined the channel [14:54] BadCodSmell: is this* [14:55] ppcano has joined the channel [14:55] BadCodSmell: cluster, not worker :P [14:55] markbao has joined the channel [14:55] ningu: Industrial: if you search like that it does the right thing [14:55] ningu: but not the way I had it [14:55] ningu: well, for certain definitions of "the right thing" ;) [14:56] ppcano has joined the channel [14:56] ningu: if you search with dot notation it doesn't pay attention to ordering [14:56] TimTimTim: what are the drawbacks to implementating my own LRU cache directly in my node app script? [14:56] vicapow has joined the channel [14:57] TimTimTim: is there anything i should look out for other than memory consumption and backups? [14:57] ppcano has joined the channel [14:59] EvRide has joined the channel [14:59] ppcano has joined the channel [14:59] ppcano has joined the channel [14:59] pid1 has joined the channel [15:00] dscape: booyaa: :( [15:00] EhevuTov: TimTimTim, have looked into the current LRU npm's? [15:00] ppcano has joined the channel [15:00] TimTimTim: looking into it now [15:01] ppcano has joined the channel [15:02] nodebiscut has joined the channel [15:03] ppcano has joined the channel [15:03] chuck_daniel has joined the channel [15:04] CarterL has joined the channel [15:04] c0smikdebris has joined the channel [15:04] ppcano has joined the channel [15:05] ppcano has joined the channel [15:05] barberdt has joined the channel [15:06] pastak has joined the channel [15:06] booyaa: dscape: looks like this evening's lnug is going to awesome as well [15:06] arnorhs has joined the channel [15:06] joshkehn has joined the channel [15:06] dscape: hopefully :) [15:07] robi42 has joined the channel [15:07] joshkehn has left the channel [15:07] Johnsknees has joined the channel [15:08] webben has joined the channel [15:08] dobber has joined the channel [15:10] cjm has joined the channel [15:10] infynyxx has joined the channel [15:11] mikeal has joined the channel [15:11] cjm has joined the channel [15:13] cha0s has joined the channel [15:13] cha0s has joined the channel [15:13] satyr has joined the channel [15:16] pastak has joined the channel [15:17] robi42 has joined the channel [15:17] jmar777 has joined the channel [15:17] pokoli has joined the channel [15:18] hexTech has joined the channel [15:18] sandropadin has joined the channel [15:18] aheckmann has joined the channel [15:19] joshfinnie has joined the channel [15:19] Joeysomo has joined the channel [15:20] mikeal has joined the channel [15:20] napperjabber has joined the channel [15:21] ashishg has joined the channel [15:21] stepheneb has joined the channel [15:21] shiawuen has joined the channel [15:21] bindr has joined the channel [15:21] thinkt4nk has joined the channel [15:22] themiddleman_itv has joined the channel [15:22] chrisvwebdev has joined the channel [15:23] bradleymeck has joined the channel [15:23] carlyle has joined the channel [15:23] chrisvwebdev has left the channel [15:24] baudehlo has joined the channel [15:25] vicapow has joined the channel [15:25] bartt has joined the channel [15:25] c4milo has joined the channel [15:26] Joeysomo has joined the channel [15:26] Destos has joined the channel [15:27] willwhite has joined the channel [15:27] SubStack: hmmm JSONStream.stringify() only seems to do streaming arrays [15:27] jscheel has joined the channel [15:27] jscheel has joined the channel [15:28] RLa: streaming array? [15:28] SubStack: when you .write() objects to it, it emits elements in an array [15:28] gsmcwhirter has joined the channel [15:30] iskren has joined the channel [15:30] kevwil has joined the channel [15:30] cha0s has joined the channel [15:30] cha0s has joined the channel [15:32] westg has joined the channel [15:32] SubStack: sending dominic a pull req [15:35] ryanfitz has joined the channel [15:37] postwait has joined the channel [15:37] artusrocha has joined the channel [15:38] VladGh has joined the channel [15:39] Joeysomo has joined the channel [15:39] Morkel has joined the channel [15:39] mikeal has joined the channel [15:42] sven_oostenbrink has joined the channel [15:43] mandric has joined the channel [15:43] colinclark has joined the channel [15:43] janjongboom: is it possible in Colloquy to ignore all the 'joined' and 'left' messages? [15:45] andrehjr has joined the channel [15:45] fatjonny has joined the channel [15:46] bkaney has joined the channel [15:48] looopy has joined the channel [15:49] AndreasMadsen has joined the channel [15:50] blubberbob has joined the channel [15:50] kirbysayshi has joined the channel [15:52] thinkt4nk has joined the channel [15:52] jyp has joined the channel [15:52] wankdanker has joined the channel [15:53] Skaag has joined the channel [15:54] wiwillia has joined the channel [15:55] slickplaid: Anyone have experience trying to figure out SSL certificate issues in connect/express? I've got the full cert chain installed and it's using it in the options properly { ca: certChainArray } but my certificate is being reported as 'self signed' even with the proper certificate in the `cert:` option for createServer(options). I've tried adding/removing it to the ca: array with no real affect. [15:55] slickplaid: Just trying to figure out if this is something I need to contact the SSL certificate issuer for or something I'm doing wrong. [15:55] dmsuperman has joined the channel [15:56] dmsuperman: Can I somehow get the full path to a module based on my require() command? [15:56] dmsuperman: I basically need to get the source code for a lib and return it [15:56] dmsuperman: Would like to avoid hard-coding paths [15:56] slickplaid: `openssl s_client` returns an error code of `Verify return code: 19 (self signed certificate in certificate chain)` [15:57] slickplaid: dmsuperman: __dirname + '/relative/path/from/node/app/root' [15:57] riven has joined the channel [15:57] bnoordhuis: slickplaid: that's an issue with the certificate [15:57] riven has joined the channel [15:57] jimmy- has joined the channel [15:57] dmsuperman: slickplaid: no, I want the lib wherever it is. require.paths has more than just the app root in it [15:57] slickplaid: bnoordhuis: Thanks :D I thought I was losing my mind or something trying to figure it out. [15:58] dmsuperman: I want it to run through wherever require searches in whichever fashion it behaves but just get the filename [15:59] c4milo has joined the channel [15:59] slickplaid: dmsuperman: Can any of this help? http://nodejs.org/docs/latest/api/path.html [15:59] pendlepants has joined the channel [15:59] slickplaid: or if you want to actually go through the filesystem, use fs [15:59] slickplaid: http://nodejs.org/docs/latest/api/fs.html [15:59] maletor has joined the channel [16:00] whaley has joined the channel [16:00] dmsuperman: Right I get how to open the file and how to resolve paths [16:00] dmsuperman: I'm only talking about the require method [16:00] dmsuperman: I want to emulate it [16:01] woodzee has joined the channel [16:01] dmsuperman: So given "verification" I want it to search every path in require.paths in the same way that require does and resolve it like that [16:01] dmsuperman: kind of like http://nodejs.org/docs/latest/api/path.html#path.resolve [16:01] slickplaid: ah gotcha [16:01] phidah has joined the channel [16:01] mmalecki: require.resolve [16:02] dmsuperman: awesome! [16:02] dmsuperman: exactly what I needed, thanks much :) [16:02] slickplaid: mmalecki++ [16:02] catb0t: mmalecki now has 1 beer [16:02] tuhoojabotti: gah [16:03] tuhoojabotti: what's the newest version of express? [16:03] slickplaid: 2.4.5? [16:03] slickplaid: no [16:03] tuhoojabotti: So why am I getting 1.0.7 :D [16:03] slickplaid: i think express is in 3.x [16:03] tuhoojabotti: which is not working [16:03] _th_n has joined the channel [16:03] slickplaid: package.json not updated for it? [16:03] tuhoojabotti: it should be [16:04] tuhoojabotti: I even tried * [16:04] slickplaid: Express 3.x (master branch) is compatible with node 0.6.x and connect 2.x [16:04] slickplaid: have you updated connect as well? [16:04] alvaro_o has joined the channel [16:04] tuhoojabotti: "express": ">=3.0.0" this should work? [16:04] jtsnow has joined the channel [16:04] vdemedes has joined the channel [16:04] tuhoojabotti: won't it install connect with it then? [16:04] bkaney_ has joined the channel [16:05] tuhoojabotti: I knew something was wrong when I got the error that sys doesn't exist anymore :D [16:05] slickplaid: I usually do "express": "3.x.x" to make sure it doesn't jump to a newer, possibly breaking version [16:05] slickplaid: hehe [16:05] tuhoojabotti: yeah [16:06] tuhoojabotti: is the package name "express" [16:06] tuhoojabotti: or expressjs [16:06] tuhoojabotti: because npm can't find express version higher than 1.0.7 [16:06] tuhoojabotti: which is weird [16:07] tuhoojabotti: nope [16:07] tuhoojabotti: it's ok [16:07] tuhoojabotti: hmm [16:07] tuhoojabotti: could be npm cache.. [16:08] tuhoojabotti: nope [16:09] gsmcwhirter: tuhoojabotti: version of node? [16:09] slickplaid: http://search.npmjs.org/#/express [16:10] bradleymeck has joined the channel [16:10] tuhoojabotti: slickplaid: Yeah, but mine won't even find newer than 1.0.7 [16:10] tuhoojabotti: gsmcwhirter: 0.7.x [16:10] tuhoojabotti: but I have 0.6.6 too [16:10] gsmcwhirter: tuhoojabotti: npm is probably using the 0.7.x and express specifies engine < 0.7.0 [16:10] gsmcwhirter: probably since 1.0.7 + 1 [16:11] tuhoojabotti: yeah [16:11] gsmcwhirter: yeah. 1.0.7 just says >= 0.2.0 for engine, so that is the last compatible build it is finding [16:11] tuhoojabotti: could be [16:11] apcshields has joined the channel [16:12] tuhoojabotti: I'll switch to 0.6.6 [16:12] tuhoojabotti: yeah seems to work [16:12] themiddleman_itv has joined the channel [16:12] _dmb has joined the channel [16:12] tuhoojabotti: thanks for your help [16:13] slickplaid: nice catch [16:13] slickplaid: didn't even think about that part [16:13] tuhoojabotti: I did think about it actually [16:13] tuhoojabotti: But I was too busy thinking about cache ":D" [16:13] ramitos has joined the channel [16:14] CrypticSwarm has joined the channel [16:14] redir has joined the channel [16:14] jazz__ has joined the channel [16:14] jazz__ has left the channel [16:15] davehamptonusa has joined the channel [16:16] TheJH has joined the channel [16:17] oht has joined the channel [16:18] Renegade001 has joined the channel [16:18] jazz__ has joined the channel [16:19] jazz__: Hi. How could I setup wheat and express to work together? [16:19] creationix: jazz__, wheat is a connect middleware [16:20] creationix: jazz__, so I think .use on the server [16:20] creationix: I haven't tried it personally, but it shouldn't be hard [16:22] jazz__: creationix, thnx for pointing out. [16:23] ts__ has joined the channel [16:24] st_luke_ has joined the channel [16:25] kenperkins has joined the channel [16:25] sandropadin has left the channel [16:26] gorekee has joined the channel [16:26] steveoh has joined the channel [16:26] cam|work: what are the benefits of using express over not using it? [16:27] steveoh has left the channel [16:27] shanebo has joined the channel [16:27] joshthecoder has joined the channel [16:28] tuhoojabotti: cam|work: I'm using it the first time [16:28] tuhoojabotti: My first site is my handwritten mess ;D [16:28] xtianw has joined the channel [16:28] Zzaichik has joined the channel [16:29] k1ttty has joined the channel [16:29] ramitos has joined the channel [16:30] johnhamelink: Can anyone give me a hint as to why my prototype doesn't exist here: https://gist.github.com/c7f28f8a83781f4cb80c ? [16:30] rio{ has joined the channel [16:31] thurmda has joined the channel [16:31] BadCodSmell: make lib a function? [16:31] RLa: cam|work, you can use plain connect too [16:31] BadCodSmell: you could also ass prototype:{} but that would be stupid :P [16:32] BadCodSmell: also use* [16:32] RLa: cam|work, it has support for lot of things [16:32] Yester_x2: how knows how this works: i use express and session middleware and a user logs in, so i save it with req.session.user = . then he connects to a socket using socket.io. how can i get the username from the io.on('connection', function(socket) { < socket variable [16:32] e-1 has joined the channel [16:32] e-1 has joined the channel [16:33] wilmoore has joined the channel [16:33] norviller has joined the channel [16:34] slickplaid: Yester_x2: http://www.danielbaulig.de/socket-ioexpress/ [16:35] paera has joined the channel [16:35] brianleroux has joined the channel [16:35] Yester_x2: slickplaid: yes i tried this one, but if it didn't work. i tried everything from google and was confused. i think i try something else thanks [16:36] jazz__ has left the channel [16:36] johnhamelink: Thanks BadCodSmell, that looks like it'll do it. That was the last piece of the puzzle - I think I'm starting to grok how prototyping works in JS now :) [16:37] sandropadin has joined the channel [16:37] rauchg has joined the channel [16:37] johnhamelink: ACTION hopes BadCodSmell has a warm fuzzy feeling, because he aught to [16:37] johnhamelink: ^_^ [16:37] sandropadin has left the channel [16:37] ekryski has joined the channel [16:38] stepheneb has joined the channel [16:38] satyr has joined the channel [16:39] Poetro has joined the channel [16:40] _tors has joined the channel [16:40] eldios has joined the channel [16:40] arnorhs has joined the channel [16:41] paera has left the channel [16:42] dmwuw has joined the channel [16:43] _dmb has joined the channel [16:43] jerrysv has joined the channel [16:43] kevwil has joined the channel [16:43] ryanfitz has joined the channel [16:45] triptec has joined the channel [16:45] Skaag has joined the channel [16:46] pig_ has joined the channel [16:46] rickibalboa has joined the channel [16:47] gut4 has joined the channel [16:49] broofa has joined the channel [16:49] shinuza has joined the channel [16:50] cjm has joined the channel [16:51] Poetro has joined the channel [16:51] tmike has joined the channel [16:51] CarterL has joined the channel [16:51] dmsuperman has left the channel [16:52] thalll has joined the channel [16:52] themiddleman_itv has joined the channel [16:52] satyr has joined the channel [16:53] zomgbie has joined the channel [16:55] criswell has joined the channel [16:57] logicalparadox has joined the channel [16:57] jaw187: Anyone using Calpiso? [16:57] Robdor has joined the channel [16:58] JMHNilbog has joined the channel [16:58] tdegrunt has joined the channel [16:58] JMHNilbog: Anyone working with the latest node-restify? [17:00] marknic has joined the channel [17:00] Robdor: Hey guys, I'm having a weird problem with node 0.6 that is causing my processes to randomly exit with a 0 status code with no error messages. This didn't happen with node 0.4. Any ideas about what is causing this? [17:01] tmike: Robdor have you been tracing your callbacks? [17:02] JMHNilbog: I had that happen once…can't remember what I did, if anything, to fix it, though. Sorry! [17:02] simoon has joined the channel [17:02] Robdor: tmike: I haven't, how would I go about doing that? [17:02] Wizek-other has joined the channel [17:02] themiddleman_itv: Robdor: I've been having that problem too, really annoying [17:03] jiboumans_ has joined the channel [17:03] tmike: Well you can either use the debug tracer, one of the various debug modules, or put console.log statements in them [17:03] themiddleman_itv: tmike: do you have more information on that? [17:04] tmike: On why it's happening? [17:04] tmike: Nope. [17:04] tmike: It's never happened to me. [17:04] themiddleman_itv: on how to set that up [17:04] tmike: node debug yourfilehere.js [17:04] cosmincx has joined the channel [17:04] jj0hns0n has joined the channel [17:04] wamberg has joined the channel [17:05] EuroNerd has joined the channel [17:05] Robdor: tmike: Thanks, I'll give that a try. Worst case scenario I can go back to the warm comfort of 0.4. [17:06] tmike: I don't know TOO much about why node quits, but a lot of it seems to have to do with how many different callbacks are waiting to happen and so on [17:07] jazz_aiman has joined the channel [17:07] Robdor: It seems to happen when the applications are under heavy load [17:07] tmike: Interesting. [17:08] Broolucks has joined the channel [17:08] ph^ has joined the channel [17:08] TheFuzzball has joined the channel [17:08] Robdor: There are few issues about the problem on github, but none have workable solutions yet. [17:08] k1ttty has joined the channel [17:09] brianleroux has joined the channel [17:11] Venom_X has joined the channel [17:11] tmike: Has it been happening all of 0.6 or just recent versions? [17:11] whaley has joined the channel [17:13] Robdor: The first version I upgraded to was 0.6.8, so since at least since then. One of the issues seemed to indicate it was a problem in dev 0.5 too. [17:13] slloyd has joined the channel [17:14] tmike: wild [17:14] tmike: too bad [17:15] colinclark has joined the channel [17:15] rrjamie has joined the channel [17:17] trotter has joined the channel [17:18] overthemike has joined the channel [17:19] tmike: don't be over me. If you fall I'll get hurt. [17:20] RLa: hm, anyway, what happens if callbacks queue becomes full? [17:20] willwhite has joined the channel [17:20] RLa: will it start blocking io or just crash? [17:21] sorensen__ has joined the channel [17:21] shinuza has joined the channel [17:23] stephank has joined the channel [17:24] kmiyashiro has joined the channel [17:25] isaacs has joined the channel [17:26] looopy has joined the channel [17:26] riven has joined the channel [17:26] riven has joined the channel [17:26] gr4yscale has joined the channel [17:26] orlandovftw has joined the channel [17:27] CrypticSwarm has joined the channel [17:27] samBiotic has joined the channel [17:27] markwubb_ has joined the channel [17:28] mmalecki: chjj: hah, looks like pty.js is getting lots of love :D [17:29] lperrin has joined the channel [17:31] permaflex68 has joined the channel [17:31] permaflex68: ciao [17:31] permaflex68: !list [17:31] permaflex68 has left the channel [17:32] gr4yscale has joined the channel [17:32] margle has joined the channel [17:33] kmiyashiro_ has joined the channel [17:35] AndreasMadsen: Is there some v8 way I can log the node output to a file? [17:35] spion has joined the channel [17:35] k00k has joined the channel [17:35] bitprobe has joined the channel [17:35] AndreasMadsen: The node process is deattached from the terminal. [17:35] themiddleman_itv: RLa: it wil just OOM [17:36] AvianFlu: AndreasMadsen, are you talking about stdio? [17:37] AndreasMadsen: AvianFlu: yes, stdout and stderr [17:37] RLa: themiddleman_itv, but isn't there something to do about that? [17:37] RLa: reserve some memory to handle bad situations? :) [17:37] margle has joined the channel [17:37] AvianFlu: AndreasMadsen, how'd you detach it? it can be re-routed before then, but I don't know about after it's detached [17:38] AndreasMadsen: https://github.com/AndreasMadsen/immortal/blob/refactor/lib/executables/execute.js [17:38] themiddleman_itv: RLa: We have never ran out of memory for that reason specifically, if you are you are probably doing something wrong [17:38] AndreasMadsen: AvianFlu: That script starts a new process and kill itself. [17:39] ningu: a suicidal process? [17:39] criswell has joined the channel [17:39] AndreasMadsen: ningu: yes, but the child will still be alive [17:40] AvianFlu: it's a double-fork, basically, but in node [17:40] garrensmith has joined the channel [17:40] margle has joined the channel [17:40] AndreasMadsen: AvianFlu: yes [17:40] looopy has joined the channel [17:40] pastak has joined the channel [17:42] AvianFlu: AndreasMadsen, I think you'd have to have separate logging to a file in the ultimate child process [17:42] AvianFlu: I don't think node has a way to redirect a child at present [17:42] philips has joined the channel [17:42] tmike: That's what I was thinking. [17:42] wamberg has joined the channel [17:42] AndreasMadsen: AvianFlu: Yes I know, but I'm facing an error there isn't logged [17:42] philips has joined the channel [17:42] k00k: anyone have any favorite npm(s)/methods for working with DOM elements on the server-side in node.js? I need to wrap all words of an inbound value with tags if they aren't already in a [17:43] isaacs: k00k: jsdom? [17:43] AndreasMadsen: AvianFlu: the process has no parent [17:43] caycep has joined the channel [17:43] k00k: isaacs: yeah, was going to ask that, haven't played with it at all [17:43] AndreasMadsen: AvianFlu: and I suspect it is some uv error there can't be try catched [17:43] AvianFlu: AndreasMadsen, what are you seeing? is it just not staying alive? [17:44] AndreasMadsen: AvianFlu: I have 3 processes. Daemon, pump and child [17:44] AndreasMadsen: When I kill daemon this function execute: https://github.com/AndreasMadsen/immortal/blob/refactor/lib/executables/pump.js#L63L78 [17:45] metavers_ has joined the channel [17:45] AndreasMadsen: ^ and that is confirmed by logging to a file [17:45] AndreasMadsen: but when it execute child.kill(); the pump dies [17:45] AviMarcus has joined the channel [17:45] AndreasMadsen: ^ sure the child dies too [17:45] wamberg has joined the channel [17:45] AvianFlu: okay, so, the parent dies, and the child dies with it [17:46] AvianFlu: that makes sense, since I don't think you're actually detached there [17:46] AndreasMadsen: AvianFlu: no, if I outcomment child.kill() [17:46] AndreasMadsen: the pump is still alive [17:46] AndreasMadsen: and child.kill() should kill the child process, not the pump process (the script itself) [17:47] tjholowaychuk has joined the channel [17:48] closure000_ has joined the channel [17:48] AndreasMadsen: AvianFlu: so it isn't because I have deatached wrong, something is just happening when I call child.kill(), and it can't be logged by process.on('uncaughtexception').' [17:49] tmcw has joined the channel [17:49] AvianFlu: AndreasMadsen, I see what you're saying [17:49] AndreasMadsen: So I'm hopeing I could parse some argument when spawning the pump so the output is logged in a native way. [17:49] AvianFlu: you could strace -f, if you feel like wading through syscalls [17:49] jetienne_ has joined the channel [17:49] AvianFlu: you'd probably at least see the last error then [17:49] closure000 has joined the channel [17:49] EhevuTov_ has joined the channel [17:50] AndreasMadsen: AvianFlu: hmm, that would be an option - will try it now [17:50] AvianFlu: but node hasn't got an argument like that... yet [17:50] AndreasMadsen: AvianFlu: I hoped v8 had [17:51] pastak has joined the channel [17:52] AndreasMadsen: I can't run dtrace, "dtrace: error on enabled probe ID 1766 (ID 228: syscall::execve:return): invalid address (0x10fa16190) in action #12 at DIF offset 24" [17:52] adamkittelson has joined the channel [17:53] closure000 has left the channel [17:53] AndreasMadsen: ^ I can run it but it dies and I don't need to do anything [17:53] AvianFlu: I've never used dtrace - don't have solaris or whatever [17:54] skeptic_ has joined the channel [17:54] AndreasMadsen: AvianFlu: mac :) - will boot up my linux vm [17:54] AvianFlu: I was suggesting you use strace, in case you misread [17:54] AvianFlu: I don't think dtrace works on linux [17:54] mmalecki: sadly it doesn't [17:55] closure000 has joined the channel [17:55] AndreasMadsen: AvianFlu: dtrace is a port of strace to mac, if I remember [17:55] AvianFlu: I thought dtrace was some crazy advanced solaris/sunos thing [17:55] AvianFlu: that we all wish we had except we don't know about it yet [17:56] mmalecki: lol yeah [17:56] mmalecki: AvianFlu: gotta ask hij1nx, he does lots of stuff with it [17:56] tobo has joined the channel [17:57] creationix: dtrace was invented by by ryah's boss for solaris, but was later ported to osx [17:57] TheJH: isaacs, what's the status of the npm site stuff? [17:57] redir has joined the channel [17:57] AvianFlu: creationix, cool, thanks [17:57] retornam has joined the channel [17:57] creationix: very different than strace [17:57] creationix: and sadly, no dtrace in linux [17:57] hipsterslapfight has joined the channel [17:58] AndreasMadsen: cloning repo now [17:58] wmage has joined the channel [17:58] davehamptonusa has left the channel [18:00] ritch- has joined the channel [18:00] slaskis_ has joined the channel [18:02] volkan has joined the channel [18:02] hh__: is there anyway to see how a file is required? for instance, var q = require('blah') , to be able to see blah was required as q ? [18:03] hh__: during run time i mean [18:03] felixhummel has joined the channel [18:03] kmiyashiro_ has joined the channel [18:03] dthompso99 has joined the channel [18:03] gr-eg has joined the channel [18:04] creationix: hh__, nope [18:04] creationix: hh__, from within blah.js you're asking right? [18:04] context: hh__: YES. [18:04] context: track it yourself ;) [18:05] AndreasMadsen: AvianFlu: hmm, linux seams to act a littel diffrent with immortal, can I get back to you later? [18:05] hh__: no, from the parent file that required it [18:05] hh__: how do i track it? [18:05] tonist has joined the channel [18:05] creationix: hh__, what's your goal? [18:05] stagas has joined the channel [18:05] rio{ has joined the channel [18:06] hh__: trying to do a dynamic way of looking up functions and being able to refer to it during runtime [18:06] codepal has joined the channel [18:06] closure000 has left the channel [18:06] context: if its a global var .... maybe but have fun? [18:07] context: hh__: when it comes to node i think its better to be less magical ? [18:07] hh__: well my thinking so far is, look through user defined var and look at each properties to see if the function exists [18:07] vguerra has joined the channel [18:07] hh__: but i have no idea how to look up user defined vars... don't think its even possible [18:08] isao has joined the channel [18:08] rtgibbons has joined the channel [18:09] hotchkiss has joined the channel [18:10] harthur has joined the channel [18:11] aranw has joined the channel [18:11] donfrancisco has joined the channel [18:11] eignerchris has joined the channel [18:12] hh__: well just to double check, if i had var q = require('blah'); delete(require.cache['blah']); it should free/garbage collect 'q' from memory and so forth yea? [18:13] ph^ has joined the channel [18:14] tomoj has left the channel [18:14] hh__: i guess i should delete(q); just to be safe [18:15] AvianFlu: AndreasMadsen, sure, I'll be around [18:15] RLa: q is just variable, you mean object referenced by q? [18:15] hh__: yea [18:15] RLa: then it depends whether something else references the object [18:15] dilvie has joined the channel [18:15] zemanel has joined the channel [18:15] RLa: since modules are cached internally i think it will not collect it [18:15] Cromulent has joined the channel [18:15] RLa: unless whole cache is collected [18:16] johnmdonahue has joined the channel [18:16] RLa: and i have no idea how/when that happens [18:16] RLa: tho it would pretty nice if node collected everything [18:16] hh__: hmm are you sure? because i've tried deleting the cache to say 'blah' and any other thing that refers to some function in blah thats in memory will error [18:16] hh__: as it's no lonegr there [18:17] RLa: hm, wait [18:17] RLa: you can access internal module cache with require.cache? [18:17] RLa: i guess then it works well [18:17] TooTallNate has joined the channel [18:18] briancra_ has joined the channel [18:18] RLa: "any other thing that refers to some function in blah thats in memory will error" <- can you give such code? [18:19] robi42 has joined the channel [18:19] ph^ has joined the channel [18:19] mikeal has joined the channel [18:19] RLa: or you want that error to raise? [18:19] dgathright has joined the channel [18:20] hh__: no, it's fine, i just was double checking it's collected from memory, so i'm not increasing memory when i'm going with a dynamically requiring modules that have been initially required approach to my problem [18:20] cha0s has joined the channel [18:22] lalala has joined the channel [18:22] trronning has joined the channel [18:22] lalala: hey everybody! [18:22] tylerstalder has joined the channel [18:23] lalala: is it possible to call a function in a DLL from nodejs? [18:23] reid has joined the channel [18:23] reid has joined the channel [18:23] lalala: is there any easy way to do this? [18:23] pizthewiz has joined the channel [18:24] shinuza has joined the channel [18:24] flagg0204 has joined the channel [18:24] RLa: lalala, you need to write bindings or use generic ffi [18:24] RLa: lalala, if you know c++ you might want to write bindings [18:25] fmeyer has joined the channel [18:26] rio{{ has joined the channel [18:26] Kevlar_ has joined the channel [18:27] ningu: I wonder what going appshit would mean [18:28] jashkenas has joined the channel [18:28] lalala: RLa, thanks for the answer - I don't have experience with c++; I was hoping for some quick solution; I understand node-ffi introduces some serious overhead in the process [18:29] CarlosC has joined the channel [18:29] uchuff has joined the channel [18:29] dshaw_ has joined the channel [18:29] igl1 has joined the channel [18:29] russfrank: anyone know how i can make winston make file logs that don't suck [18:29] russfrank: ie, that aren't this json crap [18:29] jashkenas: quick question: are folks generally using felix's mysql client library these days? [18:29] RLa: depends how often you call functions in dll [18:29] jashkenas: or is there something preferred? [18:29] iksik has joined the channel [18:31] lalala: @RLa, yup; I guess I'll give that a try berfore anything else, then; Thanks again! [18:31] fmeyer has joined the channel [18:31] RLa: no problem [18:32] jgornick has joined the channel [18:32] StanlySoManly has joined the channel [18:32] jashkenas: the reason I ask is because the latest version doesn't seem to properly handle reading timestamp columns [18:33] tornad has joined the channel [18:34] maxogden: jashkenas: https://github.com/felixge/node-mysql/issues/166 ? [18:34] richardr has joined the channel [18:34] jashkenas: not quite that ticket... [18:34] jashkenas: I'm able to save timestamps fine. [18:34] jashkenas: but reading them later, they're all just (new Date) ... ie right now. [18:34] jashkenas: If no one knows what I'm talking about, I'll proceed to dig into the guts -- thanks all. [18:35] maxogden: jashkenas: dunno but https://github.com/felixge/node-mysql/blob/master/lib/query.js#L82 [18:36] fmeyer has joined the channel [18:36] xaq has joined the channel [18:36] jashkenas: yep. [18:36] jashkenas: just console logging in there. [18:36] gr4yscale has joined the channel [18:37] sarlalian has joined the channel [18:38] benvie: npm install node-ffi [18:38] benvie: for calling dlls from js [18:39] blueadept has joined the channel [18:39] blueadept has joined the channel [18:39] nerdy has joined the channel [18:40] jashkenas has left the channel [18:40] riven` has joined the channel [18:41] fmeyer has joined the channel [18:41] kevwil has joined the channel [18:42] garrensmith has joined the channel [18:42] edjafarov has joined the channel [18:43] franciscallo has joined the channel [18:45] spcshpopr8r has joined the channel [18:45] tylerstalder has joined the channel [18:46] eignerchris_ has joined the channel [18:46] spcshpopr8r: hello #node.js [18:46] spcshpopr8r: I am having the damnedest time with this: https://gist.github.com/1886591 [18:46] spcshpopr8r: ^ these results of this function https://gist.github.com/1886582 [18:46] shinuza has joined the channel [18:46] spcshpopr8r: why is my session coming up empty when running my app on a remote machine...am I silently blocking a cookie or something? [18:46] spcshpopr8r: how can I find out? [18:46] fmeyer has joined the channel [18:47] willwhite has joined the channel [18:47] wiwillia has joined the channel [18:48] vicapow has joined the channel [18:48] igl has joined the channel [18:48] parshap has joined the channel [18:49] gr4yscale has joined the channel [18:51] CarterL has joined the channel [18:51] fmeyer has joined the channel [18:54] gr4yscal_ has joined the channel [18:54] maxogden: look at the HTTP, is there a set-cookie header? [18:54] maxogden: in your browser is there a cookie set? [18:55] spcshpopr8r: maxogden: ah...I just looked a cookies in chrome [18:55] spcshpopr8r: running my app on localhost I get a nice cookie with a connect.sid [18:55] patcito has joined the channel [18:56] spcshpopr8r: same app on remote host, I get some cookie with a gobbledeygook name contains no attributes [18:56] spcshpopr8r: wtf? [18:56] `3rdEden has joined the channel [18:56] cjlicata has joined the channel [18:56] fmeyer has joined the channel [18:57] spcshpopr8r: please help [18:57] dannyamey has joined the channel [18:57] tristanz has joined the channel [18:57] kmiyashiro has joined the channel [18:57] mandric has joined the channel [18:58] tristanz: does anybody know why if I move my c++ module code into a header file, to enable reuse, it still compiles but I no longer can load the module? [18:58] tristanz: a simple example is: https://gist.github.com/1886636 [18:58] tristanz: I get: Error: Unable to load shared library [18:59] PElshoff has joined the channel [19:00] reid has joined the channel [19:00] reid has joined the channel [19:00] patcito_ has joined the channel [19:00] patcito has joined the channel [19:01] johnmdonahue has joined the channel [19:01] jdeibele1 has joined the channel [19:01] fmeyer has joined the channel [19:02] Axsuul has joined the channel [19:02] xaq has joined the channel [19:02] carlyle has joined the channel [19:03] patcito has joined the channel [19:03] orlandovftw has joined the channel [19:04] mikaelb has joined the channel [19:05] tomasztomczyk has joined the channel [19:05] shinuza has joined the channel [19:05] khrome has joined the channel [19:06] jxson has joined the channel [19:06] TooTallNate: tristanz: run `file node` and `file addon.node` [19:06] TooTallNate: they're probably different archs [19:07] fmeyer has joined the channel [19:07] euforic has joined the channel [19:08] tristanz: Don't think so: complex.node: Mach-O 64-bit dynamically linked shared library x86_64 [19:08] tristanz: and /usr/local/bin/node: Mach-O 64-bit executable x86_64 [19:08] sechrist has joined the channel [19:09] tristanz: What's strange is that if I leave the implementation in C++, it works. [19:10] tristanz: And tool -L shows same linked shared libraries. [19:11] vicapow has joined the channel [19:12] fmeyer has joined the channel [19:12] whitman has joined the channel [19:14] donwb has joined the channel [19:15] criswell has joined the channel [19:16] phidah_ has joined the channel [19:16] descipher has joined the channel [19:16] vicapow has joined the channel [19:17] tuhoojabotti: how does express.static work? [19:17] fmeyer has joined the channel [19:17] cha0s has joined the channel [19:17] aristidesfl has joined the channel [19:18] tuhoojabotti: oh sorry [19:18] tuhoojabotti: that's not a node question [19:19] exos has joined the channel [19:19] isaacs: tuhoojabotti: tha's fine. it's node-ish [19:19] lohkey has joined the channel [19:19] tuhoojabotti: I set it up app.use(express.static(__dirname + '/web/assets')); like so, but how do I access them files [19:20] Marko has joined the channel [19:20] tuhoojabotti: got it [19:20] tmcw has joined the channel [19:20] jetienne_ has joined the channel [19:21] lperrin has joined the channel [19:21] xuser has joined the channel [19:22] eignerchris has joined the channel [19:22] aaronmcadam has joined the channel [19:22] Kevlar_ has joined the channel [19:22] fmeyer has joined the channel [19:25] tornad1 has joined the channel [19:25] DeepEd has joined the channel [19:26] madhums has joined the channel [19:26] tuhoojabotti: so simple I didn't get it. ;) [19:27] fmeyer has joined the channel [19:28] gorekee has joined the channel [19:28] tonist has joined the channel [19:29] volkan has joined the channel [19:30] Skola has joined the channel [19:30] stonebranch has joined the channel [19:30] jiboumans_ has joined the channel [19:31] colinclark_ has joined the channel [19:31] riven has joined the channel [19:33] fmeyer has joined the channel [19:35] shinuza has joined the channel [19:35] cha0s has joined the channel [19:35] cha0s has joined the channel [19:35] colinclark has joined the channel [19:36] hipsterslapfight has joined the channel [19:36] hipsterslapfight has joined the channel [19:38] fmeyer has joined the channel [19:39] Wa has joined the channel [19:41] EaterOfGerms has joined the channel [19:41] trronning has left the channel [19:43] fmeyer has joined the channel [19:44] hz has joined the channel [19:44] xaq has joined the channel [19:44] willwhite has joined the channel [19:44] dodo_ has joined the channel [19:45] meder has joined the channel [19:46] ryanfitz has joined the channel [19:46] adambeynon has joined the channel [19:47] richardr has joined the channel [19:48] dshaw_ has joined the channel [19:48] idefine has joined the channel [19:48] fmeyer has joined the channel [19:48] simenbrekken has joined the channel [19:49] BillyBreen has joined the channel [19:50] jomoho2 has joined the channel [19:51] robi42 has joined the channel [19:53] fmeyer has joined the channel [19:54] nibblebot has joined the channel [19:55] albertosh has joined the channel [19:55] shinuza has joined the channel [19:58] madhums has joined the channel [19:58] fmeyer has joined the channel [19:58] richardr has left the channel [19:58] hackband has joined the channel [19:58] xaq has joined the channel [20:00] CIA-102: libuv: 03Igor Zinkovsky 07v0.6 * rc0e7044 10/ (src/win/internal.h src/win/tcp.c src/win/winsock.c): windows: avoid IOCP short-circuit if non-ifs lsps are detected - http://git.io/YE076A [20:01] willwhite has joined the channel [20:01] robhawkes has joined the channel [20:03] looopy has joined the channel [20:03] ixti has joined the channel [20:03] fmeyer has joined the channel [20:04] Behi has joined the channel [20:04] ph^ has joined the channel [20:05] CIA-102: node: 03Igor Zinkovsky 07v0.6 * r35c1f68 10/ (3 files): update libuv to c0e7044862 - http://git.io/GzygHQ [20:06] ritch has joined the channel [20:06] ritch has left the channel [20:08] fmeyer has joined the channel [20:11] felixge has joined the channel [20:11] felixge has joined the channel [20:13] jgaui has joined the channel [20:14] fmeyer has joined the channel [20:14] CarterL has joined the channel [20:15] mcav has joined the channel [20:16] pizthewiz has joined the channel [20:18] gr4yscale has joined the channel [20:18] janjongboom has joined the channel [20:19] fmeyer has joined the channel [20:21] stafamus has joined the channel [20:22] willwhite has joined the channel [20:23] stonebranch has joined the channel [20:23] mcav` has joined the channel [20:24] fmeyer has joined the channel [20:25] vl4kn0 has joined the channel [20:26] vl4kn0 has left the channel [20:26] Destos has joined the channel [20:28] b_erb has joined the channel [20:29] fmeyer has joined the channel [20:29] b_erb: is there a clear distinction between sync vs. async and blocking vs.non-blocking on I/O level? [20:32] graeme_f has joined the channel [20:33] kriszyp has joined the channel [20:33] RLa: aren't they same? [20:34] b_erb: RLa: http://www.ibm.com/developerworks/linux/library/l-async/ [20:34] cronopio has joined the channel [20:34] fmeyer has joined the channel [20:34] gf3 has joined the channel [20:35] jmar777 has joined the channel [20:35] localhost has joined the channel [20:35] b_erb: but i've problems to place node.js. at least from a developer's perspective, it is async + non-blocking. [20:37] Druid_ has joined the channel [20:37] jkridner has joined the channel [20:38] jazz has joined the channel [20:38] louissmit has joined the channel [20:38] jazz has left the channel [20:39] fmeyer has joined the channel [20:40] bartt has joined the channel [20:44] djazz has joined the channel [20:44] michaelmartinez has joined the channel [20:45] fmeyer has joined the channel [20:45] Behl has joined the channel [20:48] StanlySoManly has joined the channel [20:49] granz has joined the channel [20:50] fmeyer has joined the channel [20:50] stagas has joined the channel [20:50] westg has joined the channel [20:50] queso has joined the channel [20:52] bizniz98 has joined the channel [20:52] queso: When I do npm install whatever, it installs in ~/.npm/ . How I do get it to install in another directory? (I'm planning on putting the installed packages into a git repo for use with an app.) [20:54] paera has joined the channel [20:54] Alex____ has joined the channel [20:55] fmeyer has joined the channel [20:56] fomatin has joined the channel [20:56] odinswand has joined the channel [20:57] paera has left the channel [20:57] BillyBreen has joined the channel [20:57] wookiehangover has joined the channel [21:00] joshontheweb has joined the channel [21:00] djazz has joined the channel [21:00] fmeyer has joined the channel [21:00] piscisaureus_ has joined the channel [21:00] megalomix has joined the channel [21:00] megalomix: hello [21:01] megalomix: i'm using cluster module that fork three processes [21:01] megalomix: i would like to close all of those processes at once [21:01] megalomix: is this possible? [21:02] megalomix: i mean that i'm listing SIGUSER event, so when it is throw i need to close all the workes [21:02] megalomix: *workers [21:02] megalomix: how can i do it? [21:02] bizniz98 has joined the channel [21:04] nicki9knuckles has joined the channel [21:05] MartinCleaver_ has joined the channel [21:05] KBM has joined the channel [21:05] fmeyer has joined the channel [21:06] bartt has joined the channel [21:06] megalomix: no? [21:06] dtrejo has joined the channel [21:06] KBM has left the channel [21:07] Glenn has joined the channel [21:07] maritz has joined the channel [21:07] Glenn: Hey all. Is Isaac here? [21:08] odinswand has joined the channel [21:08] baudehlo: Glenn: doesn't look like it. [21:08] Glenn: @baudehlo thanks! [21:08] Glenn: is there an npm irc room? [21:08] baudehlo: not sure. I usually see npm questions here. [21:09] snoj: megalomix, couldn't you keep track of the clusters using an array and loop through that when you get the SIGUSER event? [21:09] tonist has joined the channel [21:09] krnl has joined the channel [21:09] megalomix: snoj, yes but if i receive death event [21:09] megalomix: how can i delete the worker for that list ? [21:10] fmeyer has joined the channel [21:10] Swizec has joined the channel [21:10] megalomix: i mean....i create a list.............add the workers in it......and a worker die......i need to remove it from the list because i fork() another child [21:10] dubenstein has joined the channel [21:10] megalomix: so how can i remove the worker to have an updated list of workers ? [21:11] MartinCleaver_ has joined the channel [21:11] MartinCleaver_ has joined the channel [21:12] djazz has left the channel [21:12] fermion has joined the channel [21:13] ryan1 has joined the channel [21:14] CEObitch has joined the channel [21:14] jiboumans_ has joined the channel [21:14] JJMalina has joined the channel [21:15] fmeyer has joined the channel [21:15] jaime has joined the channel [21:16] dtrejo has joined the channel [21:17] vkandy has joined the channel [21:18] jergason has joined the channel [21:18] clarkfischer has joined the channel [21:18] johnhamelink has joined the channel [21:18] harthur has joined the channel [21:20] alejandromg has joined the channel [21:20] bneff has left the channel [21:20] fmeyer has joined the channel [21:21] CIA-102: node: 03Cam Pedersen 07master * r7f94b5c 10/ doc/api/net.markdown : docs: remove duplicate socket.write - http://git.io/tVjY9Q [21:21] joshfinnie has joined the channel [21:22] dbrain has joined the channel [21:22] dve has joined the channel [21:23] vicapow has joined the channel [21:25] willwhite has joined the channel [21:25] bindr has joined the channel [21:26] fmeyer has joined the channel [21:27] Swizec has joined the channel [21:29] robi42 has joined the channel [21:31] bartt has joined the channel [21:31] fmeyer has joined the channel [21:33] jaime: hi [21:33] Wizek has joined the channel [21:35] tjholowaychuk has joined the channel [21:36] fmeyer has joined the channel [21:37] nibblebo_ has joined the channel [21:37] bnoordhuis: http://lwn.net/Articles/483031/ <- quick everyone, update! critical vulnerability in cvs! [21:37] jiboumans_ has joined the channel [21:40] overthemike has left the channel [21:41] fmeyer has joined the channel [21:41] TypoAway has joined the channel [21:41] dtrejo: arg i am going to be vulnerable [21:41] dtrejo: i use cvs-git [21:43] nmir has joined the channel [21:43] aslanted has joined the channel [21:44] h4mz1d has joined the channel [21:44] ningu: bnoordhuis: I use walgreens [21:44] VladGh_ has joined the channel [21:44] swaagie_ has joined the channel [21:44] aranw has left the channel [21:45] nmir: anyone in here using coffekup? [21:45] ningu: nmir: every morning? [21:45] nmir: ningu: the coffeescript based templating engine [21:46] ningu: I know, just being silly, sorry [21:46] ningu: I don't use it [21:46] dtrejo has joined the channel [21:46] fmeyer has joined the channel [21:46] i42n has joined the channel [21:49] dreamdust has joined the channel [21:50] michaelmartinez has joined the channel [21:50] jesusabdullah: Why do you ask, nmir? [21:50] jesusabdullah: I'm personally not a coffeescript fan [21:51] jesusabdullah: as much as I like coffee! [21:51] nmir: jesusabdullah: had an issue with it [21:51] jesusabdullah: ah [21:51] nmir: jesusabdullah: not interested in a coffeescript debate, sorry [21:51] jesusabdullah: nmir: APOLOGY ACCEPTED ;) [21:51] fmeyer has joined the channel [21:51] jesusabdullah: nmir: I figure it's about as risque as saying, "I don't really like broccoli" [21:51] jesusabdullah: know what I mean? [21:51] Blorb has joined the channel [21:51] mandric has joined the channel [21:52] jesusabdullah: (I love broccoli, as an aside) [21:52] ningu: I think the proper alternative to javascript would be sumatrascript [21:52] tommyvyo has joined the channel [21:52] jesusabdullah: still waiting for breakfastscript [21:52] nmir: guys, get back to writing code ;) [21:52] jesusabdullah: NO [21:52] jesusabdullah: it's too hot out! [21:52] jesusabdullah: I seriously have a personal fan on full blast 2 ft from my face and it's still not enough :C [21:53] VladGh has joined the channel [21:53] jesusabdullah: Sometimes I wish I could do, /names | grep nick [21:53] jesusabdullah: that would be awesome [21:53] ningu: something wrong with /whois? [21:54] jesusabdullah: it doesn't tell me if someone's in the channel? [21:54] ningu: sure it does, if you're in the channel too [21:54] jesusabdullah: I turned off join and part notifications [21:54] ningu: or the channel is not hidden [21:54] jesusabdullah: well, like, for example [21:55] jesusabdullah: suppose I suspect that nmir has left the channel [21:55] ningu: yes [21:55] tmike: I tried that. Got really annoying when I went to talk to someone fifteen minutes later and they had left [21:55] ningu: [22:54] >>> jesusabdullah ~jesusabdu@li225-26.members.linode.com [21:55] ningu: [22:54] >>> channels : #Node.js [21:55] dtrejo: anyone here do development on npm? I am having a problem where `request` does not actually do a request when npm is the one running my module, but when I run it using node mycode.js, `request` works just fine [21:55] jesusabdullah: yeah, I suppose so [21:55] nathanielk: jesusabdullah: i'd hope irssi has a way of doing a pipe like that [21:55] nathanielk: but i'm not sure [21:55] jesusabdullah: yeah, me too [21:55] vicapow has joined the channel [21:55] nathanielk: i tend to just use tab completion... [21:55] tylerstalder has joined the channel [21:55] jesusabdullah: what I *really* want to do is build an irc client in node [21:55] jesusabdullah: I use tab completes too but sometimes I like to be sure! [21:55] nathanielk: hehe :) [21:56] nathanielk: i did an irc bot in node [21:56] nathanielk: it's a slophack though and needs to be cleaned up [21:56] tmike: I've been working on one of those [21:56] nathanielk: i was relatively proud of its plugin system and a coworker added ssl support [21:56] nathanielk: it did JS evaling like catb0t [21:56] catb0t: evaling like catb0t forgets stuff like [21:56] fmeyer has joined the channel [21:56] ningu: it might be fun the bot was hooked up to a node site and you could mess with it [21:56] thinkjson has joined the channel [21:57] VladGh has joined the channel [21:57] dtrejo: ningu: the bot exposes a repl to you? ;) [21:57] dtrejo: or to catb0t [21:57] catb0t: or maybe just converted it from the table groups from a database , that'll grab you the html page I e an do I process the next item internally [21:57] thinkjson: If I link a C++ module, is that code bound to the ~2GB RAM limit, or is it just the js code? [21:57] apoc_ has joined the channel [21:58] dtrejo: is the 2GB ram limit still around? [21:58] tmike: My plugin system just requires modules from a folder and attaches the objects to a list of plugins [21:58] jesusabdullah: I've written a few node irc bots [21:58] jesusabdullah: basic ones are easy enough [21:59] rrjamie has joined the channel [21:59] StanlySoManly has joined the channel [21:59] thinkjson: dtrejo: yep. I hit it all the time. :) [21:59] dtrejo: :| [22:00] felixhummel has joined the channel [22:00] tmike: each plugin has a name and a handler, and if it sees !name in a channel it runs the handler [22:00] jiboumans__ has joined the channel [22:00] jolo2 has joined the channel [22:00] dtrejo: but there is a fix coming out with some new version of v8, no? [22:00] Tatort79 has joined the channel [22:00] thinkjson: here's hoping [22:00] dtrejo: aw [22:00] dtrejo: thinkjson++ [22:00] thinkjson: but in any event, would C++ be bound by that? [22:00] dtrejo: (sorry, no idea) [22:00] joshgillies has joined the channel [22:00] dtrejo: can you code something up and try it? [22:00] ningu: is there much communication between the node devs and the v8 folks? [22:00] mandric has joined the channel [22:00] thinkjson: I guess there's only one way to find out :) [22:01] thinkjson: ningu: sure [22:01] dtrejo: ningu: I think there's a decent amount? [22:01] ningu: just curious, cause node's needs must differ from various other users of v8, they might have special requests [22:01] thinkjson: dtrejo: have you written a .node module before? it's not exactly trivial. I'll git er done, though. :( [22:01] thinkjson: s/(/)/ [22:01] dtrejo: I haven't [22:01] thinkjson: it's kind of a pain [22:01] fmeyer has joined the channel [22:01] dtrejo: I'm pampered [22:01] thinkjson: mostly switching data types [22:02] graeme_f: dtrejo that would be a 32bit thing, no? [22:02] thinkjson: I'm running 64-bit [22:02] rrjamie has joined the channel [22:02] Alex____ has joined the channel [22:02] thinkjson: it's a V8 VM thing [22:02] Alex____: Hi Everyone, quick question. Is there a setenv(http://linux.die.net/man/3/setenv) equivalent function in nodejs ? [22:02] thinkjson: I want to expose one of the STL data structures [22:02] graeme_f: but the c++ bits would have to be compiled to 64bit wouldn't they? [22:03] VladGh_ has joined the channel [22:03] slickplaid: weird... I'm getting an odd error with cradle now. [22:03] mmalecki: Alex____: process.env.key = value [22:03] ningu: Alex____: process.env [22:03] Fuu has joined the channel [22:03] thinkjson: the C++ bits would compile to whatever you compile on ;) [22:03] isaacs has joined the channel [22:03] graeme_f: oh, right. that's handy :) [22:03] Alex____: @mmalecki and ningu, will it be persistent after process exit? [22:04] redir has joined the channel [22:04] colinclark has joined the channel [22:04] thinkjson: Alex____: no [22:04] slickplaid: Seems like headers is undefined in the code for cradle, unless i'm missing something. https://github.com/cloudhead/cradle/blob/master/lib/cradle.js#L116 [22:04] Alex____: so I have to implement it by my self then [22:05] thinkjson: the only way to have persistent ENV is to put it in the startup script for your shell [22:06] joshgillies has joined the channel [22:06] joshfinnie has joined the channel [22:06] Alex____: @thinkjson, I'm aware of that. I need to set/change some env variables so after the script exit, other script can still read it [22:06] VladGh has joined the channel [22:06] ningu: Alex____: that's not how environment variables work [22:06] fmeyer has joined the channel [22:07] nibblebot has joined the channel [22:07] isaacs: Alex____: you can only affect your *own* environment, not the parent process's [22:08] michaelhartau has joined the channel [22:08] Alex____: @issacs and ningu, thanks for the info [22:08] h4mz1d has joined the channel [22:09] isaacs: Alex____: that's why nvm has to be put in your .bashrc, not just run as a script. [22:09] Alex____: I understand we can only change process env, but just wondering is there a way to hack the shell environment [22:10] isaacs: Alex____: whereas nave starts a subshell, so it doesn't have to update the current env. [22:10] isaacs: Alex____: check out how nave does it. [22:10] isaacs: Alex____: you just set the environment in a *child* shell, and then run your program in there. [22:10] brianleroux has joined the channel [22:10] nibblebo_ has joined the channel [22:10] voodootikigod has joined the channel [22:10] isaacs: Alex____: actually, with the latest version of nave, you can add whatever you want to your ~/.naverc file, and then `nave use 0.6.10 node foo.js` will run it with that environment setup [22:11] larsschenk1 has joined the channel [22:11] larsschenk1 has left the channel [22:11] Alex____: @issacc, thanks, I will take a look at nave. [22:11] ts__: is there a way to override a builtin module ? for example i want to test some code by using a mock of the fs module ? [22:11] isaacs: ts__: no, there is not. [22:11] Alex____: Thanks everyone for the help [22:12] fmeyer has joined the channel [22:12] ts__: isaacs: i suppose its not a good idea to mess with the module cache ? [22:12] isaacs: ts__: you can do something like require(process.env.NODE_ENV === 'testing' ? './my-fs.js' : 'fs') [22:12] traph has joined the channel [22:12] isaacs: ts__: not a great idea, no, but it is an option. tread carefully :) [22:12] ts__: okay , thanks! [22:12] Alex____: @ts__, you can check out mockery [22:12] Alex____: npm install mockery, it will do what you want [22:13] Alex____: https://github.com/mfncooper/mockery [22:13] ts__: okay, i'll check it out [22:14] PatF has joined the channel [22:15] ohtogo has joined the channel [22:16] mcav` has joined the channel [22:16] mikeal has joined the channel [22:16] mikeal has joined the channel [22:17] Behi has joined the channel [22:17] fmeyer has joined the channel [22:17] ramitos has joined the channel [22:17] dve has joined the channel [22:19] Phoenixz has joined the channel [22:19] graeme_f: ts__ be wary of mocking things you don't own though, can be dangerous [22:20] lohkey has joined the channel [22:20] Phoenixz: Due to cross domain restrictions, I can not mix my node webpages with iframes that use PHP, so I think (am affraid) that I need to somehow server PHP through node.. Why not do everything in node? We have 3 months of devel ready in PHP, we don't want to redo that in node.. [22:20] misza222 has joined the channel [22:20] ts__: graeme_f: yep [22:20] nathanielk: Phoenixz: what about CORS? [22:20] Phoenixz: So.. What would be t he posibilities of serving PHP through node? I checked node-php, which is more or less in the direction, but its not really what I need.. [22:21] Phoenixz: nathanielk: CORS? Dont know it.. googling.. [22:21] nathanielk: ie, have a server serve the PHP and set CORS appropriately [22:21] nathanielk: i don't know if that would work but i've done it to hit different ports with ajax from a given page [22:21] Phoenixz: nathanielk: Im sorry, now I am at a loss... What is CORS exactly? a node module? [22:21] konobi: Phoenixz: reverse proxy [22:21] StanlySoManly has joined the channel [22:22] nathanielk: yeah, reverse proxy with fast cgi (or whatever) is probably the best way [22:22] fmeyer has joined the channel [22:22] nathanielk: Phoenixz: http://www.w3.org/TR/cors/ [22:22] Phoenixz: Sounds interresting! [22:22] graeme_f: ts__: especially as node is still in 0.x, it could change the way it works and your tests would still pass. integration tests would be safer [22:23] tttthet has joined the channel [22:24] Phoenixz: http://bergie.iki.fi/blog/dnode-make_php_and_node-js_talk_to_each_other/ is also interr.. [22:24] eeemsi_: hi there [22:24] eeemsi_: did someone play with leveldb? [22:24] FuzzYspo0N has joined the channel [22:24] salva has joined the channel [22:24] lohkey: using leveldb in prod [22:24] FuzzYspo0N: any suggestions on JS doc generators? doxygen is super tedious to tell how to describe things [22:25] eeemsi_: lohkey: cool … could you please me something about its performence and what you are using it for? [22:25] jamund has joined the channel [22:25] Phoenixz: FuzzYspo0N: Ah, if you find one, please please let me know! :) Looking for the same.. Isnt there somthing like javadoc for javascript? [22:25] eeemsi_: *please tell me… [22:25] slickplaid: Has anyone updated to the newest version of cradle to find the error ReferenceError: headers is not defined? [22:25] FuzzYspo0N: iv'e seen a bunch of people mention them along the way here... [22:26] lohkey: eeemsi_: it's been performing just fine, were using it for our messaging system [22:26] johnhamelink has joined the channel [22:26] arash has joined the channel [22:26] FuzzYspo0N: tjholowaychuk, didn't you know/make one? [22:26] eeemsi_: lohkey: what language are you using to communicate with it? [22:26] tjholowaychuk: what? [22:27] FuzzYspo0N: tjholowaychuk, documentation generators for js [22:27] slickplaid: Oh well, issued pointless pull request regardless. https://github.com/cloudhead/cradle/pull/142 [22:27] fmeyer has joined the channel [22:27] tjholowaychuk: FuzzYspo0N dox [22:27] FuzzYspo0N: ah yea. [22:27] mschneider has joined the channel [22:28] FuzzYspo0N: Phoenixz, https://github.com/visionmedia/dox [22:28] FuzzYspo0N: thanks tjholowaychuk [22:29] cjm has joined the channel [22:30] davidbanham has joined the channel [22:31] norviller_ has joined the channel [22:32] fmeyer has joined the channel [22:32] lmorchard has joined the channel [22:33] ceej has joined the channel [22:35] CoverSlide has joined the channel [22:35] megalomix: hello, please someone colud help me to optimize this code: https://gist.github.com/1888023 ? [22:36] slaskis has joined the channel [22:36] CoverSlide: Ctrl+A, [22:36] briancray has joined the channel [22:37] kevwil has joined the channel [22:38] megalomix: ?? [22:39] voodootikigod has joined the channel [22:39] shinuza has joined the channel [22:39] CoverSlide: It's 5 lines of code [22:39] baudehlo: you want help optimising 3 lines of code? [22:39] CoverSlide: if it works, just use it [22:39] baudehlo: here, this is faster: function () {} [22:40] robi42 has joined the channel [22:40] megalomix: ahahah [22:40] megalomix: no no i'm not talking about the number of lines.....are only few lines [22:40] megalomix: i'm talking about the return ctr[req.params.controller][req.params.action].call() [22:40] baudehlo: I seriously doubt you have a bottleneck there. [22:40] megalomix: return ctr[req.params.controller][req.params.action].call() OR return ctr[req.params.controller][req.params.action]() [22:40] megalomix: i need call() = [22:41] voodootikigod has joined the channel [22:41] megalomix: ? [22:41] hh__: not a fan of your syntax style [22:42] isaacs: megalomix: wait, you wnat to assign to a function call result? that's not possible. [22:42] hackband has joined the channel [22:42] isaacs: megalomix: `call()` is not a valid LHS expression. [22:42] megalomix: hh__ me too, :D i asked how to change it for this reason :) [22:42] WeeJeWel has joined the channel [22:43] megalomix: no no isaacs i need to call a function that i have in the module [22:43] megalomix: ctr[req.params.controller][req.params.action] <--- this is a function [22:43] CoverSlide: ctr[req.params.controller][req.params.action]() <-- this should work [22:43] megalomix: can i add () and stop ? [22:43] megalomix: ok [22:43] isaacs: megalomix: yeah [22:43] isaacs: () calls a function [22:43] megalomix: ok ok perfect [22:43] isaacs: that's how it works :) [22:43] isaacs: megalomix: you should make sure before you call it, though :) [22:43] nathanielk: :) context may not be what you expect, i think that's the only caveat [22:43] megalomix: isaacs, did you see my code? [22:44] isaacs: megalomix: you wouldn't want me crashing your server by requesting foo/?action=something_that_doesnt_exist [22:44] troy-- has joined the channel [22:44] megalomix: isaacs, i do: if (req.params.action && typeof ctr[req.params.controller][req.params.action] === 'function') [22:44] troy--: yo, why can't node find my modules? I keep getting Error: Cannot find module 'mootools-more' [22:44] isaacs: megalomix: that's fine, then [22:44] megalomix: it works for url like: domain.com/controller/action [22:44] megalomix: ok [22:44] megalomix: perfect! [22:45] mcav` has joined the channel [22:46] graeme_f: hey is there any way to find out when NodeUp is being recorded in advance? would like to be in IRC for one of them :) [22:46] graeme_f: but I'm guessing by the schedule that they're not planned that far in advance ;) [22:46] nicholasf: what's NodeUp? [22:46] catshirt has joined the channel [22:47] nicholasf: gotcha [22:47] megalomix: more redable: https://gist.github.com/1888084 :-D [22:47] graeme_f: http://nodeup.com [22:47] CoverSlide: #nodeup [22:48] graeme_f: oh, didn't know there was a separate channel for that… it's not been explicitly mentioned as long as I've been listening [22:48] ovaillancourt has joined the channel [22:48] arduix has joined the channel [22:48] salva1 has joined the channel [22:48] ramitos has joined the channel [22:49] troy--: any help [22:49] troy--: ? [22:49] tjholowaychuk: isaacs: quick question. I have something like "main": "./lib/mocha", but have ./lib-cov instrumented, and throughout the tests require('../') what would you recommend to make that work? [22:49] graeme_f: also it's not mentioned on the website as far as i could see :) [22:49] tjholowaychuk: I used to use require.paths for that but maybe some NODE_PATH trickery could do it [22:50] isaacs: tjholowaychuk: ew. [22:50] isaacs: why not just have a shim that requires the instrumented thing if it's in test-mode? [22:50] isaacs: instrumented-mode, i mean [22:50] al3xnull has joined the channel [22:50] SubStack: instruments! [22:51] isaacs: if (process.env.PLAY_ALL_COVERAGE_INSTRUMENTS) { return module.exports = require('../lib-cov/mocha') } [22:51] Bonuspunkt: isaacs about the fuzzy versioning thing, why not drop versioning completly and force ppl to do NPM TEST :) [22:51] TooTallNate: tjholowaychuk: setting NODE_PATH should work though too, but then you'd probably change all the requires to require('mocha') [22:51] tjholowaychuk: yeah i guess [22:51] tjholowaychuk: kinda lame [22:51] whaley has joined the channel [22:51] tjholowaychuk: TooTallNate tried that [22:51] isaacs: tjholowaychuk: better to do this the simple easy way. [22:52] isaacs: tjholowaychuk: i mean, if you can do it in one line, even one ugly line, that's better than a big ugly hack somewhere else, just to have one cleaner-line [22:52] FuzzYspo0N: tjholowaychuk, where can i render this json stuff from dox (using jade or similar?) [22:52] tjholowaychuk: FuzzYspo0N: anything [22:52] FuzzYspo0N: tjholowaychuk, i mean 'to html converting' without me manually coding it? [22:52] tjholowaychuk: isaacs something less obtrusive would be nice but it will do [22:53] isaacs: tjholowaychuk: you could just have a main file that does nothing else. [22:53] Tobsn has joined the channel [22:54] tjholowaychuk: isaacs: yeah that's what I'll do. It was just kinda nice the old way since you could use it with any lib untouched [22:54] tjholowaychuk: not a huge deal [22:54] isaacs: tjholowaychuk: ie, mocha/main.js would do module.exports=require(doCoverage ? './lib-cov/mocha.js' : './lib/mocha.js') [22:54] isaacs: or something [22:55] isaacs: tjholowaychuk: the way to do this cleverly would be to hijack the require.extensions[".js"] to check for a covered version of the script being loaded. [22:55] isaacs: but still, you have to explicitly do that *somewhere* [22:55] isaacs: ie, rather that /lib-cov/mocha.js you'd have perhaps coverage/lib/mocha.js, and prepend that bit if it's in covered mode. [22:56] graeme_f has joined the channel [22:56] tjholowaychuk: the ternary is a good excuse to keep all my ./index.js files intead of using "main" [22:56] tjholowaychuk: haha [22:56] tjholowaychuk: so that works [22:58] WeeJeWel has joined the channel [22:59] artusrocha has joined the channel [22:59] prestonparris has joined the channel [22:59] joshsmith has joined the channel [23:00] skm has joined the channel [23:02] prestonparris has joined the channel [23:03] ovnicraft has joined the channel [23:04] tylerstalder has joined the channel [23:04] brianseeders has joined the channel [23:05] krucial has joined the channel [23:10] jmar777 has joined the channel [23:12] cconstantine_ has joined the channel [23:12] mikeal has joined the channel [23:13] overthemike has joined the channel [23:14] cconstantine_: hey all, I did a 'sudo npm install -g ' and that installed the package into /usr/local/lib/node_modules, but in node I can't require it [23:15] sorensen__ has joined the channel [23:15] cconstantine_: any ideas? [23:15] fmeyer has joined the channel [23:15] wingie has joined the channel [23:16] mmalecki: yes. don't install modules globally, node can't require them. [23:16] cconstantine_: oh :/ [23:16] mmalecki: install them locally and it'll be fine [23:16] mmalecki: or use NODE_PATH env variable [23:16] cconstantine_: ok, I was gonna say, what's the point of global install if you can't ever use them [23:17] isaacs: cconstantine_: running bins on the command line [23:17] overthemike has left the channel [23:17] cconstantine_: gotcha [23:17] cconstantine_: thanks :) [23:17] robo has joined the channel [23:17] rrjamie has left the channel [23:19] wendall911 has joined the channel [23:20] hotchkiss has joined the channel [23:25] zanefactory has joined the channel [23:27] mikeal has joined the channel [23:28] nicholasf: cconstantine_: also see npm link [23:28] nicholasf: you can install on a global path then link locally [23:28] joshkehn has joined the channel [23:28] testmachine123 has joined the channel [23:29] AaronMT has joined the channel [23:30] rauchg has joined the channel [23:32] cconstantine_: ah, interesting [23:32] cconstantine_: thanks nicholasf [23:32] sarlalian has left the channel [23:33] ovaillan_ has joined the channel [23:34] michaelmartinez_ has joined the channel [23:35] koo3 has joined the channel [23:36] koo4 has joined the channel [23:36] redir has joined the channel [23:38] bicranial has joined the channel [23:39] iangreenleaf: isaacs: I'm playing around with a project that installs npm locally as a dependency, and it's freaking out when I try to uninstall or update it. Is that known behavior? [23:39] isaacs: iangreenleaf: i think there was an issue with the man pages, is that what youre' seeing? [23:40] iangreenleaf: yep [23:40] crutex has joined the channel [23:40] crutex has joined the channel [23:40] isaacs: iangreenleaf: if so, it should be fixed on npm master, but i don't knwo if i've published yet [23:40] isaacs: guess not [23:40] isaacs: i'll try to get to that later today [23:40] iangreenleaf: isaacs: Cool, I won't worry about it then. Easy enough to trash node_modules for now. [23:41] isaacs: iangreenleaf: the issue is that npm 1.1.1 is still installing local packages' man pages into the global place, which is clearly wrong [23:41] subhaze has joined the channel [23:41] markwubben has joined the channel [23:42] napperjabber has joined the channel [23:42] lohkey has joined the channel [23:43] gregmoreno has joined the channel [23:46] felixge_ has joined the channel [23:46] felixge_ has joined the channel [23:47] kborchers_ has joined the channel [23:48] coderarity_ has joined the channel [23:48] eeemsi has joined the channel [23:48] cburyta has joined the channel [23:49] rummik_ has joined the channel [23:49] jeedey_ has joined the channel [23:49] RushPL_ has joined the channel [23:49] wookiehangover_ has joined the channel [23:50] nicod has joined the channel [23:50] iangreen_ has joined the channel [23:50] bentruyman_ has joined the channel [23:50] aristidesfl1 has joined the channel [23:50] harthur has joined the channel [23:50] iangreen_: tjholowaychuk: In mocha, is there a good way to define setup/teardown behavior for all tests (i.e. across multiple files)? [23:51] blueadept` has joined the channel [23:51] Lingerance has joined the channel [23:51] Kester` has joined the channel [23:51] MikeCron1 has joined the channel [23:51] Jalava_ has joined the channel [23:51] jeremyb_ has joined the channel [23:51] Aikar_ has joined the channel [23:52] chrisina1ar has joined the channel [23:52] drey_ has joined the channel [23:52] stylus_ has joined the channel [23:52] timoxley: iangreen_ var setup = require('./setupTeardownStuff') and then call setup() in your code [23:53] jj0hns0n has joined the channel [23:53] DrPizza_ has joined the channel [23:53] keks___ has joined the channel [23:53] timoxley: iangreen_ and the setup function contains calls to before/after [23:53] timoxley: iangreen_ is one way to do it. [23:53] dthompso99 has joined the channel [23:53] iangreen_: timoxley: Yeah, I guess that's not too bad. Could even shorten it to require('./setupTeardownStuff')() [23:53] timoxley: iangreen_ fosho [23:54] willwh_ has joined the channel [23:54] masch_ has joined the channel [23:54] kraft has joined the channel [23:54] Industrial has joined the channel [23:54] oht has joined the channel [23:54] SvenDowideit has joined the channel [23:54] kraft has joined the channel [23:54] dnz- has joined the channel [23:54] iangreen_: timoxley: But man, I just want my test framework to take care of it for me. I don't want to run some of my tests against an unclean state just because I forgot the setup() line :) [23:54] tjholowaychuk: iangreen_ you can use the hooks at the root level [23:54] zomg has joined the channel [23:54] tjholowaychuk: before(function(){ [23:54] bhelx has joined the channel [23:54] strmpnk has joined the channel [23:54] tjholowaychuk: when not nested in a describe() etc [23:55] SlexAxton has joined the channel [23:55] bindr has joined the channel [23:55] copongcopong has joined the channel [23:55] looopy has joined the channel [23:57] cconstantine_: *sigh* I should just learn coffeescript shouldn't I? [23:57] konobi has joined the channel [23:57] ningu: cconstantine_: why? [23:58] iangreen_: tjholowaychuk: Perfect, thanks! In retrospect, seems like something I could have guessed at myself :) [23:58] cconstantine_: I keep seeing it all over the place and ->\n\t is way shorter than function [23:58] cconstantine_: also it does inheritance? [23:58] tjholowaychuk: cconstantine_ if you type "function" you're doing it wrong :p [23:58] tjholowaychuk: utilize them editors! [23:58] cconstantine_: -_- [23:58] cconstantine_: editors shouldn't be making up for language warts :P [23:59] iangreen_: cconstantine_: IMO it depends on to what degree working in Javascript grates on your patience. [23:59] tjholowaychuk: sure, but typing should not be a programmers bottleneck [23:59] tjholowaychuk: it never really is [23:59] cconstantine_: agreed [23:59] Druid_ has joined the channel [23:59] jl_hki has joined the channel [23:59] tjholowaychuk: if anything it's the opposite, having clear code (not code that happens to look like english) increases productivity